Browse Source

增加try catch

master
luyan 2 years ago
parent
commit
4c293e5280
  1. 10
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

10
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

@ -1959,7 +1959,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
@Override @Override
public EventAnalysisResultDTO getEventAnalysis(String orgId, String orgType, String eventType) { public EventAnalysisResultDTO getEventAnalysis(String orgId, String orgType, String eventType) {
String orgPath = getOrgPath(orgId, orgType); String orgPath = getOrgPath(orgId, orgType);
log.info(orgPath); try {
EventAnalysisResultDTO dto = baseDao.getEventBySourceTypeCount(orgPath);//根据事件来源获取事件数量 EventAnalysisResultDTO dto = baseDao.getEventBySourceTypeCount(orgPath);//根据事件来源获取事件数量
Integer total; Integer total;
if (StringUtils.isEmpty(eventType)) { if (StringUtils.isEmpty(eventType)) {
@ -1969,6 +1969,10 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
dto.getZhiTongLianBan() : dto.getWangGeHua(); dto.getZhiTongLianBan() : dto.getWangGeHua();
} }
return biuldData(dto, orgPath, eventType, total); return biuldData(dto, orgPath, eventType, total);
} catch (Exception e) {
e.getMessage();
return null;
}
} }
private EventAnalysisResultDTO biuldData(EventAnalysisResultDTO dto, String orgPath, String eventType, Integer total) { private EventAnalysisResultDTO biuldData(EventAnalysisResultDTO dto, String orgPath, String eventType, Integer total) {
@ -1980,6 +1984,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
* 已归档 只要包含一条归档数据即为已归档(应该只有一条) * 已归档 只要包含一条归档数据即为已归档(应该只有一条)
* manageType: 0上报 1阅收 2完结 3审核 4事件评价 5结案归档 * manageType: 0上报 1阅收 2完结 3审核 4事件评价 5结案归档
*/ */
try {
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
Integer temp; Integer temp;
if (i == 0) { if (i == 0) {
@ -2004,6 +2009,9 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
dto.setGuiDangRate(new BigDecimal((double) temp / total).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()); dto.setGuiDangRate(new BigDecimal((double) temp / total).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
} }
} }
}catch (Exception e){
e.getMessage();
}
return dto; return dto;
} }

Loading…
Cancel
Save