|
@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.commons.tools.utils.HttpClientManager; |
|
|
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.constant.DataSourceConstant; |
|
|
import com.epmet.constant.DataSourceConstant; |
|
|
import com.epmet.dto.indexcal.CalculateCommonFormDTO; |
|
|
import com.epmet.dto.indexcal.CalculateCommonFormDTO; |
|
@ -78,30 +77,27 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { |
|
|
try { |
|
|
try { |
|
|
CalculateCommonFormDTO param = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); |
|
|
CalculateCommonFormDTO param = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); |
|
|
flag = cpcIndexCalculateService.cpcIndexCalculate(param); |
|
|
flag = cpcIndexCalculateService.cpcIndexCalculate(param); |
|
|
log.info("indexCalculate cpcIndexCalculate return result:{}", flag); |
|
|
log.info("客户Id:{}【党员相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("indexCalculate cpcIndexCalculate exception", e); |
|
|
log.error("indexCalculate cpcIndexCalculate exception", e); |
|
|
throw new RenException("indexCalculate cpcIndexCalculate exception", e); |
|
|
throw new RenException("indexCalculate cpcIndexCalculate exception", e); |
|
|
} |
|
|
} |
|
|
//测试用
|
|
|
//测试用
|
|
|
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【党员相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
|
|
|
|
|
|
|
|
|
//计算网格
|
|
|
//计算网格
|
|
|
start = System.currentTimeMillis(); |
|
|
start = System.currentTimeMillis(); |
|
|
try { |
|
|
try { |
|
|
flag = gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); |
|
|
flag = gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); |
|
|
log.info("indexCalculate calculateGridCorreLation return result:{}", flag); |
|
|
log.info("客户Id:{}【网格相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("indexCalculate calculateGridCorreLation exception", e); |
|
|
log.error("indexCalculate calculateGridCorreLation exception", e); |
|
|
throw new RenException("indexCalculate calculateGridCorreLation exception", e); |
|
|
throw new RenException("indexCalculate calculateGridCorreLation exception", e); |
|
|
} |
|
|
} |
|
|
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【网格相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
|
|
|
//计算社区
|
|
|
//计算社区
|
|
|
start = System.currentTimeMillis(); |
|
|
start = System.currentTimeMillis(); |
|
|
try { |
|
|
try { |
|
|
flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId()); |
|
|
flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId()); |
|
|
log.info("indexCalculate calCommunityAll return result:{}", flag); |
|
|
log.info("客户Id:{}【社区相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); |
|
|
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【社区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("indexCalculate calCommunityAll exception", e); |
|
|
log.error("indexCalculate calCommunityAll exception", e); |
|
|
throw new RenException("indexCalculate calAll exception", e); |
|
|
throw new RenException("indexCalculate calAll exception", e); |
|
@ -111,8 +107,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { |
|
|
start = System.currentTimeMillis(); |
|
|
start = System.currentTimeMillis(); |
|
|
try { |
|
|
try { |
|
|
flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId()); |
|
|
flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId()); |
|
|
log.info("indexCalculate calStreetAll return result:{}", flag); |
|
|
log.info("客户Id:{}【街道相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); |
|
|
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【街道相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("indexCalculate calStreetAll exception", e); |
|
|
log.error("indexCalculate calStreetAll exception", e); |
|
|
throw new RenException("indexCalculate calStreetAll exception", e); |
|
|
throw new RenException("indexCalculate calStreetAll exception", e); |
|
@ -122,8 +117,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { |
|
|
start = System.currentTimeMillis(); |
|
|
start = System.currentTimeMillis(); |
|
|
try { |
|
|
try { |
|
|
flag = deptScoreService.calculateDeptCorreLation(calculateCommonFormDTO); |
|
|
flag = deptScoreService.calculateDeptCorreLation(calculateCommonFormDTO); |
|
|
log.info("indexCalculate calculateDeptCorreLation return result:{}", flag); |
|
|
log.info("客户Id:{}【区直部门】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); |
|
|
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【区直部门】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("indexCalculate calculateDeptCorreLation exception", e); |
|
|
log.error("indexCalculate calculateDeptCorreLation exception", e); |
|
|
throw new RenException("indexCalculate calculateDeptCorreLation exception", e); |
|
|
throw new RenException("indexCalculate calculateDeptCorreLation exception", e); |
|
@ -133,8 +127,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { |
|
|
start = System.currentTimeMillis(); |
|
|
start = System.currentTimeMillis(); |
|
|
try { |
|
|
try { |
|
|
indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId()); |
|
|
indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId()); |
|
|
log.info("indexCalculate calDistrictAll return result:{}", flag); |
|
|
log.info("客户Id:{}【全区相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); |
|
|
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【全区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("indexCalculate calDistrictAll exception", e); |
|
|
log.error("indexCalculate calDistrictAll exception", e); |
|
|
throw new RenException("indexCalculate calDistrictAll exception", e); |
|
|
throw new RenException("indexCalculate calDistrictAll exception", e); |
|
@ -148,7 +141,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { |
|
|
start = System.currentTimeMillis(); |
|
|
start = System.currentTimeMillis(); |
|
|
try { |
|
|
try { |
|
|
factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(formDTO.getMonthId(), formDTO.getCustomerId()); |
|
|
factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(formDTO.getMonthId(), formDTO.getCustomerId()); |
|
|
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 分数插入到大屏显示库完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
log.info("客户Id:{}分数插入到大屏显示库完毕,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("indexCalculate insertScreenIndexDataMonthlyAndYearly exception", e); |
|
|
log.error("indexCalculate insertScreenIndexDataMonthlyAndYearly exception", e); |
|
|
flag = false; |
|
|
flag = false; |
|
|