|
|
@ -446,15 +446,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { |
|
|
|
orgIds[j] = deptScore.getKey(); |
|
|
|
j++; |
|
|
|
for ( int i = 0; i < deptScore.getValue().size(); i++){ |
|
|
|
if (NumConstant.ONE_STR.equals(deptScore.getValue().get(i).getIsTotal())){ |
|
|
|
// 是总分 总指数 = IS_TOTAL = 1
|
|
|
|
monthlyFormDTO.setIndexTotal(deptScore.getValue().get(i).getScore()); |
|
|
|
} else { |
|
|
|
// 赋值 党建能力、治理能力、服务能力
|
|
|
|
monthlyFormDTO = this.setValueAblityMonthlyFor(deptScore.getValue().get(i).getIndexCode(), |
|
|
|
deptScore.getValue().get(i).getScore(), |
|
|
|
monthlyFormDTO); |
|
|
|
} |
|
|
|
// 区直街道的总分 就是 治理能力
|
|
|
|
monthlyFormDTO.setIndexTotal(deptScore.getValue().get(i).getScore()); |
|
|
|
// 赋值 治理能力
|
|
|
|
monthlyFormDTO = this.setValueAblityMonthlyFor(deptScore.getValue().get(i).getIndexCode(), |
|
|
|
deptScore.getValue().get(i).getScore(), |
|
|
|
monthlyFormDTO); |
|
|
|
} |
|
|
|
// 查询网格的 上级组织id 和 组织名称
|
|
|
|
ScreenCustomerDeptEntity parentDeptInfo = screenCustomerDeptDao.selectParentDeptInfo(customerId, deptScore.getKey()); |
|
|
@ -775,6 +772,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { |
|
|
|
deptScore2.setIsTotal(NumConstant.ZERO_STR); |
|
|
|
deptScore2.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
deptScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); |
|
|
|
deptScore2.setDelFlag(NumConstant.ZERO_STR); |
|
|
|
insertIndexDeptScore.add(deptScore2); |
|
|
|
} |
|
|
|
deptScoreDao.batchInsertDeptScoreData(insertIndexDeptScore, customerId); |
|
|
@ -784,82 +782,85 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { |
|
|
|
String[] dateArr = yearOrMonth(monthId); |
|
|
|
List<AgencyScoreEntity> insertIndexAgencyScore = new ArrayList<>(); |
|
|
|
for (ScreenCustomerAgencyEntity agencyDTO : mismatchAgencyList){ |
|
|
|
AgencyScoreEntity agencyScore1 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 党建能力指数
|
|
|
|
agencyScore1.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore1.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
//季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
|
|
|
|
agencyScore1.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore1.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore1.setMonthId(monthId); |
|
|
|
agencyScore1.setIsTotal(NumConstant.ZERO_STR); // 0 or 1
|
|
|
|
agencyScore1.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型
|
|
|
|
|
|
|
|
AgencyScoreEntity agencyScore2 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 治理能力
|
|
|
|
agencyScore2.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore2.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
//季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
|
|
|
|
agencyScore2.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore2.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore2.setMonthId(monthId); |
|
|
|
agencyScore2.setIsTotal(NumConstant.ZERO_STR); |
|
|
|
agencyScore2.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); |
|
|
|
|
|
|
|
AgencyScoreEntity agencyScore3 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 服务能力
|
|
|
|
agencyScore3.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore3.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
//季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
|
|
|
|
agencyScore3.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore3.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore3.setMonthId(monthId); |
|
|
|
agencyScore3.setIsTotal(NumConstant.ZERO_STR); |
|
|
|
agencyScore3.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); |
|
|
|
|
|
|
|
if ("community".equals(agencyDTO.getLevel())){ |
|
|
|
AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 全区相关
|
|
|
|
agencyScore4.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore4.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
if ("community".equals(agencyDTO.getLevel()) || "street".equals(agencyDTO.getLevel()) |
|
|
|
|| "district".equals(agencyDTO.getLevel())){ |
|
|
|
AgencyScoreEntity agencyScore1 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 党建能力指数
|
|
|
|
agencyScore1.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore1.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
//季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
|
|
|
|
agencyScore1.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore1.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore1.setMonthId(monthId); |
|
|
|
agencyScore1.setIsTotal(NumConstant.ZERO_STR); // 0 or 1
|
|
|
|
agencyScore1.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型
|
|
|
|
|
|
|
|
AgencyScoreEntity agencyScore2 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 治理能力
|
|
|
|
agencyScore2.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore2.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
//季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
|
|
|
|
agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore4.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore4.setMonthId(monthId); |
|
|
|
agencyScore4.setIsTotal(NumConstant.ONE_STR); |
|
|
|
agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore4.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); |
|
|
|
|
|
|
|
agencyScore4.setDataType("district"); |
|
|
|
agencyScore1.setDataType("district"); |
|
|
|
agencyScore2.setDataType("district"); |
|
|
|
agencyScore3.setDataType("district"); |
|
|
|
insertIndexAgencyScore.add(agencyScore4); |
|
|
|
} else if ("street".equals(agencyDTO.getLevel())){ |
|
|
|
AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 街道相关
|
|
|
|
agencyScore4.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore4.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
agencyScore2.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore2.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore2.setMonthId(monthId); |
|
|
|
agencyScore2.setIsTotal(NumConstant.ZERO_STR); |
|
|
|
agencyScore2.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); |
|
|
|
|
|
|
|
AgencyScoreEntity agencyScore3 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 服务能力
|
|
|
|
agencyScore3.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore3.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
//季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
|
|
|
|
agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore4.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore4.setMonthId(monthId); |
|
|
|
agencyScore4.setIsTotal(NumConstant.ONE_STR); |
|
|
|
agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore4.setIndexCode(IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode()); |
|
|
|
|
|
|
|
agencyScore4.setDataType("street"); |
|
|
|
agencyScore1.setDataType("street"); |
|
|
|
agencyScore2.setDataType("street"); |
|
|
|
agencyScore3.setDataType("street"); |
|
|
|
insertIndexAgencyScore.add(agencyScore4); |
|
|
|
agencyScore3.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore3.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore3.setMonthId(monthId); |
|
|
|
agencyScore3.setIsTotal(NumConstant.ZERO_STR); |
|
|
|
agencyScore3.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); |
|
|
|
|
|
|
|
if ("community".equals(agencyDTO.getLevel())){ |
|
|
|
AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 全区相关
|
|
|
|
agencyScore4.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore4.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
//季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
|
|
|
|
agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore4.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore4.setMonthId(monthId); |
|
|
|
agencyScore4.setIsTotal(NumConstant.ONE_STR); |
|
|
|
agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore4.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); |
|
|
|
|
|
|
|
agencyScore4.setDataType("district"); |
|
|
|
agencyScore1.setDataType("district"); |
|
|
|
agencyScore2.setDataType("district"); |
|
|
|
agencyScore3.setDataType("district"); |
|
|
|
insertIndexAgencyScore.add(agencyScore4); |
|
|
|
} else if ("street".equals(agencyDTO.getLevel()) || "district".equals(agencyDTO.getLevel())){ |
|
|
|
AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); |
|
|
|
// 赋默认值 - 街道相关
|
|
|
|
agencyScore4.setAgencyId(agencyDTO.getAgencyId()); |
|
|
|
agencyScore4.setParentAgencyId(agencyDTO.getPid()); |
|
|
|
//季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
|
|
|
|
agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
agencyScore4.setYearId(dateArr[NumConstant.ZERO]); |
|
|
|
agencyScore4.setMonthId(monthId); |
|
|
|
agencyScore4.setIsTotal(NumConstant.ONE_STR); |
|
|
|
agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); |
|
|
|
agencyScore4.setIndexCode(IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode()); |
|
|
|
|
|
|
|
agencyScore4.setDataType("street"); |
|
|
|
agencyScore1.setDataType("street"); |
|
|
|
agencyScore2.setDataType("street"); |
|
|
|
agencyScore3.setDataType("street"); |
|
|
|
insertIndexAgencyScore.add(agencyScore4); |
|
|
|
} |
|
|
|
insertIndexAgencyScore.add(agencyScore1); |
|
|
|
insertIndexAgencyScore.add(agencyScore2); |
|
|
|
insertIndexAgencyScore.add(agencyScore3); |
|
|
|
} |
|
|
|
insertIndexAgencyScore.add(agencyScore1); |
|
|
|
insertIndexAgencyScore.add(agencyScore2); |
|
|
|
insertIndexAgencyScore.add(agencyScore3); |
|
|
|
} |
|
|
|
agencyScoreDaol.batchInsertAgencyScoreData(insertIndexAgencyScore, customerId); |
|
|
|
} |
|
|
|