|  |  | @ -1,9 +1,8 @@ | 
			
		
	
		
			
				
					|  |  |  | package com.epmet.service.evaluationindex.extract.impl; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.dynamic.datasource.annotation.DataSource; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.constant.DataSourceConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.DateUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.constant.ExtractConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.constant.ProjectEvaluateConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; | 
			
		
	
	
		
			
				
					|  |  | @ -13,11 +12,13 @@ import com.epmet.dto.extract.form.GridIssueCountResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.extract.result.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.evaluationindex.extract.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.stats.FactArticlePublishedGridDailyService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.stats.user.FactRegUserGridMonthlyService; | 
			
		
	
		
			
				
					|  |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.beans.BeanUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.util.CollectionUtils; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import java.math.BigDecimal; | 
			
		
	
	
		
			
				
					|  |  | @ -33,15 +34,17 @@ import java.util.stream.Collectors; | 
			
		
	
		
			
				
					|  |  |  |  */ | 
			
		
	
		
			
				
					|  |  |  | @Service | 
			
		
	
		
			
				
					|  |  |  | @Slf4j | 
			
		
	
		
			
				
					|  |  |  | @DataSource(DataSourceConstant.EVALUATION_INDEX) | 
			
		
	
		
			
				
					|  |  |  | //@DataSource(DataSourceConstant.EVALUATION_INDEX)
 | 
			
		
	
		
			
				
					|  |  |  | public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private IssueExtractService issueExtractService; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private FactIndexGovrnAblityGridMonthlyDao governAbilityDao; | 
			
		
	
		
			
				
					|  |  |  |     private FactIndexGovernAbilityGridMonthlyService governAbilityGridMonthlyService; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private FactIndexPartyAbilityGridMonthlyService partyAbilityGridMonthlyService; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private FactIndexPartyAblityGridMonthlyDao partyAbilityGridDao; | 
			
		
	
		
			
				
					|  |  |  |     private FactIndexGovrnAblityGridMonthlyDao governAbilityDao; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private FactOriginProjectMainDailyService projectMainService; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
	
		
			
				
					|  |  | @ -50,6 +53,10 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  |     private FactRegUserGridMonthlyService userGridMonthlyService; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private FactOriginTopicMainDailyService topicMainService; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private FactArticlePublishedGridDailyService articlePublishedGridDailyService; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private GroupExtractService groupExtractService; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * @Description  计算网格指标党建能力 | 
			
		
	
	
		
			
				
					|  |  | @ -70,11 +77,24 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  |         List<CreateTopicCountResultDTO> partyCreateTopicCountList = topicMainService.selectCreateTopicCount(customerId, monthId, NumConstant.ONE); | 
			
		
	
		
			
				
					|  |  |  |         // 网格群众人均提出话题数
 | 
			
		
	
		
			
				
					|  |  |  |         List<CreateTopicCountResultDTO> massCreateTopicCountList = topicMainService.selectCreateTopicCount(customerId, monthId, NumConstant.ZERO); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         // 网格党员人均提出的议题转项目数
 | 
			
		
	
		
			
				
					|  |  |  |         List<ShiftProjectCountResultDTO> partyShiftProjectCountList = issueExtractService.selectShiftProjectCountPlus(customerId, monthId, NumConstant.ONE); | 
			
		
	
		
			
				
					|  |  |  |         // 网格群众人均提出的议题转项目数
 | 
			
		
	
		
			
				
					|  |  |  |         List<ShiftProjectCountResultDTO> massShiftProjectCountList = issueExtractService.selectShiftProjectCountPlus(customerId, monthId, NumConstant.ZERO); | 
			
		
	
		
			
				
					|  |  |  |         // 网格的发文数量
 | 
			
		
	
		
			
				
					|  |  |  |         List<PublishCountResultDTO> publishCountList = articlePublishedGridDailyService.selectArticlePublishCount(customerId, monthId); | 
			
		
	
		
			
				
					|  |  |  |         // 网格议题转项目率
 | 
			
		
	
		
			
				
					|  |  |  |         List<GridIssueCountResultDTO> gridIssueTotalList = issueExtractService.selectIssueTotal(customerId, monthId); | 
			
		
	
		
			
				
					|  |  |  |         List<GridProjectCountResultDTO> gridProjectTotalList = issueExtractService.selectGridProjectCount(customerId, monthId, ExtractConstant.SHIFT_PROJECT); | 
			
		
	
		
			
				
					|  |  |  |         List<GridProjectCountResultDTO> gridIssueShiftProjectRatio = getGridIssueShiftProjectRatio(gridIssueTotalList, gridProjectTotalList); | 
			
		
	
		
			
				
					|  |  |  |         // 建群党员数
 | 
			
		
	
		
			
				
					|  |  |  |         List<PartyCreateGroupCountResultDTO> partyCreateGroupCountList = groupExtractService.selectPartyCreateGroupCount(customerId, monthId); | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         result.forEach(r -> { | 
			
		
	
		
			
				
					|  |  |  |             r.setMonthId(monthId); | 
			
		
	
		
			
				
					|  |  |  |             r.setQuarterId(quarterId); | 
			
		
	
		
			
				
					|  |  |  |             r.setYearId(yearId); | 
			
		
	
		
			
				
					|  |  |  |             // 1. 网格群众用户数 , 网格党员用户数
 | 
			
		
	
		
			
				
					|  |  |  |             if (!CollectionUtils.isEmpty(gridUserCountList)){ | 
			
		
	
		
			
				
					|  |  |  |                 gridUserCountList.forEach(count -> { | 
			
		
	
	
		
			
				
					|  |  | @ -99,9 +119,48 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             // 4. 网格党员人均提出的议题转项目数
 | 
			
		
	
		
			
				
					|  |  |  |             if (!CollectionUtils.isEmpty(partyShiftProjectCountList)){ | 
			
		
	
		
			
				
					|  |  |  |                 partyShiftProjectCountList.forEach(party -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (r.getGridId().equals(party.getGridId())){ | 
			
		
	
		
			
				
					|  |  |  |                         r.setPartyAvgShiftProjectCount(party.getShiftProjectCount()); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             // 5. 网格群众人均提出的议题转项目数
 | 
			
		
	
		
			
				
					|  |  |  |             if (!CollectionUtils.isEmpty(massShiftProjectCountList)){ | 
			
		
	
		
			
				
					|  |  |  |                 massShiftProjectCountList.forEach(mass -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (r.getGridId().equals(mass.getGridId())){ | 
			
		
	
		
			
				
					|  |  |  |                         r.setPartyAvgShiftProjectCount(mass.getShiftProjectCount()); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             // 6. 网格的发文数量
 | 
			
		
	
		
			
				
					|  |  |  |             if (!CollectionUtils.isEmpty(publishCountList)){ | 
			
		
	
		
			
				
					|  |  |  |                 publishCountList.forEach(publish -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (r.getGridId().equals(publish.getGridId())){ | 
			
		
	
		
			
				
					|  |  |  |                         r.setPublishArticleCount(publish.getPublishCount()); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             // 7. 网格议题转项目率
 | 
			
		
	
		
			
				
					|  |  |  |             if (!CollectionUtils.isEmpty(gridIssueShiftProjectRatio)){ | 
			
		
	
		
			
				
					|  |  |  |                 gridIssueShiftProjectRatio.forEach(ratio -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (r.getGridId().equals(ratio.getGridId())){ | 
			
		
	
		
			
				
					|  |  |  |                         r.setIssueToProjectRatio(ratio.getIssueToProjectRatio()); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             // 8. 建群党员数
 | 
			
		
	
		
			
				
					|  |  |  |             if (!CollectionUtils.isEmpty(partyCreateGroupCountList)){ | 
			
		
	
		
			
				
					|  |  |  |                 partyCreateGroupCountList.forEach(party -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (r.getGridId().equals(party.getGridId())){ | 
			
		
	
		
			
				
					|  |  |  |                         r.setCreateGroupPartyCount(party.getPartyCreateGroupCount()); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         delAndInsertPartyAbility(result,customerId,monthId); | 
			
		
	
		
			
				
					|  |  |  |         return true; | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -124,15 +183,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  |         //网格总项目数
 | 
			
		
	
		
			
				
					|  |  |  |         List<GridProjectCountResultDTO> gridProjectTotalList = issueExtractService.selectGridProjectCount(customerId, monthId, ExtractConstant.SHIFT_PROJECT); | 
			
		
	
		
			
				
					|  |  |  |         //网格议题转项目率
 | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(gridIssueTotalList) && !CollectionUtils.isEmpty(gridProjectTotalList)) { | 
			
		
	
		
			
				
					|  |  |  |             gridProjectTotalList.forEach(project -> { | 
			
		
	
		
			
				
					|  |  |  |                 gridIssueTotalList.forEach(issue -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (project.getGridId().equals(issue.getGridId())) { | 
			
		
	
		
			
				
					|  |  |  |                         project.setIssueToProjectRatio(getRound(new BigDecimal(project.getProjectTotal() / issue.getIssueTotal()))); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         List<GridProjectCountResultDTO> gridIssueShiftProjectRatio = getGridIssueShiftProjectRatio(gridIssueTotalList, gridProjectTotalList); | 
			
		
	
		
			
				
					|  |  |  |         //网格自治项目数 从议题创建到项目关闭,包括处理人,自始至终没有出过议题所属网格
 | 
			
		
	
		
			
				
					|  |  |  |         List<AutoNoMyResultDTO> projectAutoNoMyList = projectLogService.selectProjectAutoNoMy(customerId, monthId); | 
			
		
	
		
			
				
					|  |  |  |         Map<String,Integer> autoMap = new HashMap<>(16); | 
			
		
	
	
		
			
				
					|  |  | @ -160,9 +211,9 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  |         List<GridProjectClosedTotalResultDTO> gridProjectClosedTotalList = projectMainService.selectGridClosedProject(customerId, monthId, ExtractConstant.CLOSED); | 
			
		
	
		
			
				
					|  |  |  |         //网格吹哨部门准确率  【没被退回的项目数/项目总数 】
 | 
			
		
	
		
			
				
					|  |  |  |         List<NotReturnProjectResultDTO> notReturnProjectList = projectLogService.selectNotReturnProject(customerId, monthId, ExtractConstant.RETURN_ACTION_CODE, ExtractConstant.GRID_ORG_TYPE); | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(gridProjectTotalList) && !CollectionUtils.isEmpty(notReturnProjectList)){ | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(gridIssueShiftProjectRatio) && !CollectionUtils.isEmpty(notReturnProjectList)){ | 
			
		
	
		
			
				
					|  |  |  |             notReturnProjectList.forEach(not -> { | 
			
		
	
		
			
				
					|  |  |  |                 gridProjectTotalList.forEach(total -> { | 
			
		
	
		
			
				
					|  |  |  |                 gridIssueShiftProjectRatio.forEach(total -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (not.getGridId().equals(total.getGridId())){ | 
			
		
	
		
			
				
					|  |  |  |                         not.setTransferRightRatio(getRound(new BigDecimal(not.getNotReturnProject()/total.getProjectTotal()))); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
	
		
			
				
					|  |  | @ -202,8 +253,12 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  |                 resultSatisfactionScore.put(gridId,getRound(new BigDecimal(allScore.get()/scoreMap.size()))); | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         result.forEach(r -> { | 
			
		
	
		
			
				
					|  |  |  |             r.setMonthId(monthId); | 
			
		
	
		
			
				
					|  |  |  |             r.setQuarterId(quarterId); | 
			
		
	
		
			
				
					|  |  |  |             r.setYearId(yearId); | 
			
		
	
		
			
				
					|  |  |  |             // 1. 网格总议题数目,网格人均议题数目
 | 
			
		
	
		
			
				
					|  |  |  |             if (!CollectionUtils.isEmpty(gridIssueTotalList)) { | 
			
		
	
		
			
				
					|  |  |  |                 gridIssueTotalList.forEach(total -> { | 
			
		
	
	
		
			
				
					|  |  | @ -214,7 +269,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             // 2. 网格总项目数,网格议题转项目率
 | 
			
		
	
		
			
				
					|  |  |  |             if (!CollectionUtils.isEmpty(gridIssueTotalList)){ | 
			
		
	
		
			
				
					|  |  |  |                 gridProjectTotalList.forEach(projectTotal -> { | 
			
		
	
		
			
				
					|  |  |  |                 gridIssueShiftProjectRatio.forEach(projectTotal -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (r.getGridId().equals(projectTotal.getGridId())){ | 
			
		
	
		
			
				
					|  |  |  |                         r.setProjectTotal(projectTotal.getProjectTotal()); | 
			
		
	
		
			
				
					|  |  |  |                         r.setIssueToProjectRatio(projectTotal.getIssueToProjectRatio()); | 
			
		
	
	
		
			
				
					|  |  | @ -254,6 +309,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         delAndInsertGovernAbility(result,customerId,monthId); | 
			
		
	
		
			
				
					|  |  |  |         return true; | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -278,4 +334,52 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { | 
			
		
	
		
			
				
					|  |  |  |     public BigDecimal getRound(BigDecimal d){ | 
			
		
	
		
			
				
					|  |  |  |         return d.setScale(NumConstant.SIX, BigDecimal.ROUND_HALF_UP); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * @Description | 
			
		
	
		
			
				
					|  |  |  |      * @param gridIssueTotalList | 
			
		
	
		
			
				
					|  |  |  |      * @param gridProjectTotalList | 
			
		
	
		
			
				
					|  |  |  |      * @author zxc | 
			
		
	
		
			
				
					|  |  |  |      * @date 2020/9/19 2:53 下午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     public List<GridProjectCountResultDTO> getGridIssueShiftProjectRatio(List<GridIssueCountResultDTO> gridIssueTotalList,List<GridProjectCountResultDTO> gridProjectTotalList){ | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(gridIssueTotalList) && !CollectionUtils.isEmpty(gridProjectTotalList)) { | 
			
		
	
		
			
				
					|  |  |  |             gridProjectTotalList.forEach(project -> { | 
			
		
	
		
			
				
					|  |  |  |                 gridIssueTotalList.forEach(issue -> { | 
			
		
	
		
			
				
					|  |  |  |                     if (project.getGridId().equals(issue.getGridId())) { | 
			
		
	
		
			
				
					|  |  |  |                         project.setIssueToProjectRatio(getRound(new BigDecimal(project.getProjectTotal() / issue.getIssueTotal()))); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         return gridProjectTotalList; | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * @Description  删除并插入党建能力的记录 | 
			
		
	
		
			
				
					|  |  |  |      * @param result | 
			
		
	
		
			
				
					|  |  |  |      * @author zxc | 
			
		
	
		
			
				
					|  |  |  |      * @date 2020/9/19 4:06 下午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void delAndInsertPartyAbility(List<PartyAbilityGridMonthlyFormDTO> result,String customerId,String monthId){ | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(result)){ | 
			
		
	
		
			
				
					|  |  |  |             partyAbilityGridMonthlyService.deleteOldPartyAbility(customerId, monthId); | 
			
		
	
		
			
				
					|  |  |  |             partyAbilityGridMonthlyService.insertPartyAbility(result); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * @Description  删除并插入治理能力的记录 | 
			
		
	
		
			
				
					|  |  |  |      * @param result | 
			
		
	
		
			
				
					|  |  |  |      * @author zxc | 
			
		
	
		
			
				
					|  |  |  |      * @date 2020/9/19 4:06 下午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void delAndInsertGovernAbility(List<GovernAbilityGridMonthlyFormDTO> result,String customerId,String monthId){ | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(result)){ | 
			
		
	
		
			
				
					|  |  |  |             governAbilityGridMonthlyService.deleteOldGovernAbilityRecord(customerId, monthId); | 
			
		
	
		
			
				
					|  |  |  |             governAbilityGridMonthlyService.insertGovernAbilityRecord(result); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
	
		
			
				
					|  |  | 
 |