From 11fcd347b5ba97c817f57f1e6b53d01ddf1c6121 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 12 Jan 2021 10:32:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=9F=BA=E5=B1=82=E5=85=9A=E5=BB=BA-?= =?UTF-8?q?=E5=85=9A=E5=91=98=E5=9F=BA=E6=9C=AC=E6=83=85=E5=86=B5=E8=A1=A8?= =?UTF-8?q?=E5=85=9A=E5=91=98=E6=80=BB=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toscreen/impl/PartyBaseInfoServiceImpl.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java index f0999a4605..a7435b914e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java @@ -129,7 +129,8 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { form.setAgeLevel4(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getAgeLevel4))); form.setAgeLevel5(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getAgeLevel5))); form.setAgeLevel6(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getAgeLevel6))); - form.setPartyMemberCount(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getPartyMemberCount))); +// form.setPartyMemberCount(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getPartyMemberCount))); + form.setPartyMemberCount(calPartyMemberCount(form)); form.setResiTotal(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getResiTotal))); form.setRegisterUserCount(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getRegisterUserCount))); result.add(form); @@ -175,6 +176,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { form.setAgeLevel4(disposeAgeArea(partyInfos,NumConstant.FORTY_ONE,NumConstant.FIFTY)); form.setAgeLevel5(disposeAgeArea(partyInfos,NumConstant.FIFTY_ONE,NumConstant.SIXTY)); form.setAgeLevel6(disposeAge(partyInfos,NumConstant.SIXTY,true)); + form.setPartyMemberCount(calPartyMemberCount(form)); form.setCustomerId(customerId); form.setDataEndTime(dateId); form.setParentId(partyInfos.get(NumConstant.ZERO).getAgencyId()); @@ -183,7 +185,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { if (gridId.equals(user.getOrgId())){ form.setResiTotal(user.getResiTotal()); form.setRegisterUserCount(user.getRegisterUserCount()); - form.setPartyMemberCount(user.getPartyMemberCount()); +// form.setPartyMemberCount(user.getPartyMemberCount()); } }); } @@ -210,7 +212,8 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { form.setAgeLevel4(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getAgeLevel4))); form.setAgeLevel5(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getAgeLevel5))); form.setAgeLevel6(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getAgeLevel6))); - form.setPartyMemberCount(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getPartyMemberCount))); +// form.setPartyMemberCount(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getPartyMemberCount))); + form.setPartyMemberCount(calPartyMemberCount(form)); form.setResiTotal(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getResiTotal))); form.setRegisterUserCount(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getRegisterUserCount))); result.add(form); @@ -361,6 +364,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { form.setAgeLevel3(disposeAgeArea(partyInfos,NumConstant.THIRTY_ONE,NumConstant.FORTY)); form.setAgeLevel4(disposeAgeArea(partyInfos,NumConstant.FORTY_ONE,NumConstant.FIFTY)); form.setAgeLevel5(disposeAgeArea(partyInfos,NumConstant.FIFTY_ONE,NumConstant.SIXTY)); + form.setPartyMemberCount(calPartyMemberCount(form)); form.setAgeLevel6(disposeAge(partyInfos,NumConstant.SIXTY,true)); form.setCustomerId(customerId); form.setDataEndTime(dateId); @@ -370,7 +374,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { if (gridId.equals(user.getOrgId())){ form.setResiTotal(user.getResiTotal()); form.setRegisterUserCount(user.getRegisterUserCount()); - form.setPartyMemberCount(user.getPartyMemberCount()); +// form.setPartyMemberCount(user.getPartyMemberCount()); } }); } @@ -379,4 +383,9 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { } return new GridPartyDTO(orgIds, result); } + + public Integer calPartyMemberCount(PartyBaseInfoFormDTO form){ + Integer result = form.getAgeLevel1() + form.getAgeLevel2() + form.getAgeLevel3() + form.getAgeLevel4() + form.getAgeLevel5() + form.getAgeLevel6(); + return result; + } } From af99db100242ee99dc1d395362c547751c62fa6b Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 12 Jan 2021 10:36:24 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=BD=E5=8F=96=20bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactOriginExtractController.java | 14 ++++++++++- .../FactOriginGroupMainDailyServiceImpl.java | 24 ++++++++++--------- .../todata/impl/GroupExtractServiceImpl.java | 2 +- .../stats/impl/DimGridServiceImpl.java | 2 +- .../resources/mapper/group/GroupDataDao.xml | 2 +- .../resources/mapper/stats/DimGridDao.xml | 15 +++++++----- 6 files changed, 38 insertions(+), 21 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java index 2abcd81edd..9542bdc580 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java @@ -1,5 +1,7 @@ package com.epmet.controller; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.extract.form.ExtractOriginFormDTO; @@ -11,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * 原始数据清洗 @@ -114,7 +118,15 @@ public class FactOriginExtractController { **/ @PostMapping("groupdatacleaning") public Result groupDataCleaning(@RequestBody ExtractOriginFormDTO param) { - groupExtractService.extractGroupData(param); + if(StringUtils.isNotBlank(param.getStartDate()) && StringUtils.isNotBlank(param.getEndDate())){ + List finalDaysBetween = DateUtils.getDaysBetween(param.getStartDate(), param.getEndDate()); + ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); + for (int i = 0; i < finalDaysBetween.size(); i++) { + String dateDimId = finalDaysBetween.get(i); + paramNew.setDateId(dateDimId); + groupExtractService.extractGroupData(paramNew); + } + }else groupExtractService.extractGroupData(param); return new Result(); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java index 83195d9902..94fadea5fe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java @@ -85,19 +85,21 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl originGroupData, List memberList,List missing) { - if (isFirst) { - //isFirst - baseDao.deleteBatchMemberByCustomerId(customerId,null,null); - } else { - if(StringUtils.isNotBlank(dateId)){ - baseDao.deleteBatchMemberByCustomerId(customerId,dateId,"date"); + if(!CollectionUtils.isEmpty(originGroupData)) { + if (isFirst) { + //isFirst + baseDao.deleteBatchMemberByCustomerId(customerId, null, null); + } else { + if (StringUtils.isNotBlank(dateId)) { + baseDao.deleteBatchMemberByCustomerId(customerId, dateId, "date"); + } } - } - //删除要插入的组主表数据 - baseDao.deleteBatchByGroupId(customerId,originGroupData.stream().map(FactOriginGroupMainDailyDTO :: getId).distinct().collect(Collectors.toList())); + //删除要插入的组主表数据 + baseDao.deleteBatchByGroupId(customerId, originGroupData.stream().map(FactOriginGroupMainDailyDTO::getId).distinct().collect(Collectors.toList())); - baseDao.insertBatchMain(originGroupData); - baseDao.insertBatchMembers(memberList); + baseDao.insertBatchMain(originGroupData); + baseDao.insertBatchMembers(memberList); + } if(!CollectionUtils.isEmpty(missing)){ baseDao.deleteBatchByGroupId(customerId,missing); baseDao.deleteMemberByGroupList(customerId,missing); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java index 275e8fd4e1..6f6451114d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java @@ -88,7 +88,7 @@ public class GroupExtractServiceImpl implements GroupExtractService { log.info("extractGroupData extractGroupData:result:{},param:{}", JSON.toJSONString(originGroupData), JSON.toJSONString(param)); List memberList = new LinkedList<>(); if (!CollectionUtils.isEmpty(originGroupData)) { - List gridList = dimGridService.getGridAttributes(param.getCustomerId(),originGroupData.stream().map(FactOriginGroupMainDailyDTO::getGridId).distinct().collect(Collectors.toList())); + List gridList = dimGridService.getGridAttributes(param.getCustomerId(),null); if (!CollectionUtils.isEmpty(gridList)) { Map gridMap = diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java index 5062b8e94f..a08e0af4ba 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java @@ -186,7 +186,7 @@ public class DimGridServiceImpl extends BaseServiceImpl getGridAttributes(String customerId,List gridIds) { - if(CollectionUtils.isEmpty(gridIds)) return Collections.EMPTY_LIST; + return baseDao.selectGridAttributes(customerId,gridIds); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml index f47b266eba..9b6da626dc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml @@ -186,7 +186,7 @@ oper.UPDATED_TIME AS joinDate, IF(groupp.CREATED_BY = oper.CUSTOMER_USER_ID,'leader','member') AS leaderFlag, groupp.CREATED_BY AS groupOwnerId, - 'join' AS actionCode + IF(groupp.CREATED_BY = oper.CUSTOMER_USER_ID,'join','create') AS actionCode FROM RESI_GROUP groupp diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml index b83e517441..d7a33deb51 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml @@ -104,11 +104,14 @@ dg.DEL_FLAG = '0' AND da.DEL_FLAG = '0' AND da.CUSTOMER_ID = #{customerId} - AND - ( - - dg.id = #{gridId} - - ) + + AND + ( + + dg.id = #{gridId} + + ) + + \ No newline at end of file From 0c2bc1bbd49be312e55753f75c9de2ed4867e1c4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 12 Jan 2021 12:15:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?PioneerDataExtractService=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 25 ++++++++----- .../impl/PioneerDataExtractServiceImpl.java | 36 +++++++++++++++++-- 2 files changed, 49 insertions(+), 12 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index a22a573819..755705a6ce 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -20,7 +20,6 @@ import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; @@ -47,7 +46,6 @@ import org.springframework.web.bind.annotation.*; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; -import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; @@ -664,12 +662,21 @@ public class DemoController { @Autowired private PublicPartiTotalDataExtractService publicPartiTotalDataExtractService; @PostMapping("insertScreenPioneerData") - public Result insertScreenPioneerData(@RequestParam("customerId") String customerId, @RequestParam("dateId") String dateId) { + public Result insertScreenPioneerData(@RequestParam("customerId") String customerId, @RequestParam("dateId") String dateId,@RequestParam("type") String type) { if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)) { - pioneerDataExtractService.extractGridPioneerData(customerId, dateId); - pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId); - pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId); - } else { + if ("grid".equals(type)) { + pioneerDataExtractService.extractGridPioneerData(customerId, dateId); + } else if ("community".equals(type)) { + pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId); + } else if ("exceptcommunity".equals(type)) { + pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId); + } else { + pioneerDataExtractService.extractGridPioneerData(customerId, dateId); + pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId); + pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId); + } + } + /*else { QueryWrapper customerEntityQueryWrapper = new QueryWrapper<>(); List customerEntityList = dimCustomerDao.selectList(customerEntityQueryWrapper); for (DimCustomerEntity customerEntity : customerEntityList) { @@ -677,8 +684,8 @@ public class DemoController { pioneerDataExtractService.extractCommunityPioneerData(customerEntity.getId(), "20200926"); pioneerDataExtractService.extractExceptCommunityPioneerData(customerEntity.getId(), "20200926"); } - } - return new Result(); + }*/ + return new Result().ok("调用成功"); } @PostMapping("extractPublicPartiTotalData") diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java index f41366eb13..125fdbdc65 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java @@ -66,36 +66,44 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService //何为参与: 议题的表决行为次数总计 //1、党员参与议事 entity.setIssueTotal(calPartyPartiIssueTotal(customerId,gridId,null,null,NumConstant.ONE_STR)); + log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员参与议事issueTotal="+entity.getIssueTotal()); if(entity.getIssueTotal()==0){ entity.setIssueRatio(BigDecimal.ZERO); }else{ //2、党员参与议事占比 int issueTotal=calPartyPartiIssueTotal(customerId,gridId,null,null,null); + log.info("extractGridPioneerData 当前网格id=" + gridId + ";参与议事总数issueTotal=" + issueTotal); BigDecimal issueRatio=new BigDecimal(entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); + log.info("extractGridPioneerData 当前网格id=" + gridId + ";issueRatio=" + issueRatio); entity.setIssueRatio(issueRatio.setScale(NumConstant.SIX,RoundingMode.HALF_UP)); } //3、党员发布话题: entity.setTopicTotal(getTopicTotal(customerId, gridId, null)); + log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布话题topicTotal"+entity.getTopicTotal()); //4、党员发布话题占比: 网格内注册党员发布的话题总数占 网格内话题总数的 比率 if (entity.getTopicTotal() == NumConstant.ZERO) { entity.setTopicRatio(BigDecimal.ZERO); } else { //当前网格内所有话题总数 int gridTopicTotal = getGridOrCommunityTopicTotal(customerId, gridId, null); + log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有话题总数gridTopicTotal="+gridTopicTotal); if(gridTopicTotal == NumConstant.ZERO){ entity.setTopicRatio(BigDecimal.ZERO); }else{ BigDecimal topicRatio=new BigDecimal(entity.getTopicTotal() / gridTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); + log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布话题占比topicRatio="+topicRatio); entity.setTopicRatio(topicRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); } } //当前网格内所有议题总数 int gridIssueTotal = getGridOrCommunityIssueTotal(customerId, gridId, null); + log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有议题总数=" + gridIssueTotal); if (gridIssueTotal != NumConstant.ZERO) { //5、党员发布议题 entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, gridId, null)); + log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布议题publishIssueTotal"+entity.getPublishIssueTotal()); //6、党员发布议题占比 : 占网格内所有议题的比率 if (entity.getPublishIssueTotal() == NumConstant.ZERO) { entity.setPublishIssueRatio(BigDecimal.ZERO); @@ -106,6 +114,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService //7、议题转项目数 entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, gridId, null)); + log.info("extractGridPioneerData 当前网格id=" + gridId +";议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal()); //8、议题转项目占比 : 占网格内议题总数的比率 if(entity.getShiftProjectTotal() == NumConstant.ZERO){ entity.setShiftProjectRatio(BigDecimal.ZERO); @@ -115,7 +124,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService } }else{ -// log.info("当前网格内所有议题总数="+gridIssueTotal); + log.info("extractGridPioneerData 当前网格id="+gridId+";当前网格内所有议题总数 gridIssueTotal =0 "); entity.setPublishIssueTotal(NumConstant.ZERO); entity.setPublishIssueRatio(BigDecimal.ZERO); entity.setShiftProjectTotal(NumConstant.ZERO); @@ -125,11 +134,13 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService // 9、已解决项目 entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, gridId, null, DimObjectStatusConstant.RESOLVED)); + log.info("extractGridPioneerData 当前网格id="+gridId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { entity.setResolvedProjectRatio(BigDecimal.ZERO); } else { // 10、占总结项目 int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, gridId, null, null); + log.info("extractGridPioneerData 当前网格id="+gridId+";总结项目closedProjectTotal="+closedProjectTotal); if(closedProjectTotal == NumConstant.ZERO){ entity.setResolvedProjectRatio(BigDecimal.ZERO); }else { @@ -172,30 +183,36 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService String communityId = entity.getOrgId(); //1、党员参与议事 entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,communityId,null,NumConstant.ONE_STR)); + log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员参与议事issueTotal="+entity.getIssueTotal()); if(entity.getIssueTotal()==0){ entity.setIssueRatio(BigDecimal.ZERO); }else{ //2、党员参与议事占比 int issueTotal=calPartyPartiIssueTotal(customerId,null,communityId,null,null); + log.info("extractCommunityPioneerData 当前communityId="+communityId+";参与议事总数issueTotal="+issueTotal); entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); } //3、党员发布话题: entity.setTopicTotal(getTopicTotal(customerId, null, communityId)); + log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员发布话题topicTotal="+entity.getTopicTotal()); //4、党员发布话题占比: 社区内注册党员发布的话题总数占 社区内话题总数的 比率 if (entity.getTopicTotal() == NumConstant.ZERO) { entity.setTopicRatio(BigDecimal.ZERO); } else { //当前社区内所有话题总数 int communityTopicTotal = getGridOrCommunityTopicTotal(customerId, null, communityId); + log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有话题总数communityTopicTotal="+communityTopicTotal); entity.setTopicRatio(communityTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / communityTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); } //当前社区内所有议题总数 int communityIssueTotal = getGridOrCommunityIssueTotal(customerId, null, communityId); + log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有议题总数communityIssueTotal="+communityIssueTotal); if (communityIssueTotal != NumConstant.ZERO) { //5、党员发布议题 entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, null, communityId)); + log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员发布议题publishIssueTotal="+entity.getPublishIssueTotal()); //6、党员发布议题占比 : 占社区内所有议题的比率 if (entity.getPublishIssueTotal() == NumConstant.ZERO) { entity.setPublishIssueRatio(BigDecimal.ZERO); @@ -204,10 +221,11 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService //7、议题转项目数 entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, null, communityId)); + log.info("extractCommunityPioneerData 当前communityId="+communityId+";议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal()); //8、议题转项目占比 : 占社区内议题总数的比率 entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); }else{ -// log.info("当前社区内所有议题总数="+communityIssueTotal); + log.info("extractCommunityPioneerData 当前communityId="+communityId+"communityIssueTotal =0"); entity.setPublishIssueTotal(NumConstant.ZERO); entity.setPublishIssueRatio(BigDecimal.ZERO); entity.setShiftProjectTotal(NumConstant.ZERO); @@ -217,11 +235,13 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService // 9、已解决项目 entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, null, communityId, DimObjectStatusConstant.RESOLVED)); + log.info("extractCommunityPioneerData 当前communityId="+communityId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { entity.setResolvedProjectRatio(BigDecimal.ZERO); } else { // 10、占总结项目 int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, null, communityId, null); + log.info("extractCommunityPioneerData 当前communityId="+communityId+";总结项目closedProjectTotal="+closedProjectTotal); entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); } }); @@ -243,32 +263,39 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService } else { entity.setAgencyPath(entity.getAgencyPids().concat(StrConstant.COLON).concat(entity.getOrgId())); } + log.info("extractExceptCommunityPioneerData 当前orgId="+entity.getOrgId()+";agencyPath="+entity.getAgencyPath()); //1、党员参与议事 entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),NumConstant.ONE_STR)); + log.info("extractExceptCommunityPioneerData 党员参与议事issueTotal="+entity.getIssueTotal()); if(entity.getIssueTotal()==0){ entity.setIssueRatio(BigDecimal.ZERO); }else{ //2、党员参与议事占比 int issueTotal=calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),null); + log.info("extractExceptCommunityPioneerData 平台参与议事issueTotal="+issueTotal); entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); } //3、党员发布话题: entity.setTopicTotal(getAgencyTopicTotal(customerId, entity.getAgencyPath(),NumConstant.ONE_STR)); + log.info("extractExceptCommunityPioneerData 党员发布话题topicTotal="+entity.getTopicTotal()); //4、党员发布话题占比: 组织内注册党员发布的话题总数占 组织内话题总数的 比率 if (entity.getTopicTotal() == NumConstant.ZERO) { entity.setTopicRatio(BigDecimal.ZERO); } else { //当前组织内所有话题总数 int agencyTopicTotal = getAgencyTopicTotal(customerId, entity.getAgencyPath(),null); + log.info("extractExceptCommunityPioneerData 当前组织内所有话题总数agencyTopicTotal="+agencyTopicTotal); entity.setTopicRatio(agencyTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / agencyTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); } //当前组织内所有议题总数 int agencyIssueTotal = getAgencyIssueTotal(customerId, entity.getAgencyPath()); + log.info("extractExceptCommunityPioneerData 当前组织内所有议题总数agencyIssueTotal="+agencyIssueTotal); if (agencyIssueTotal != NumConstant.ZERO) { //5、党员发布议题 entity.setPublishIssueTotal(getAgencyParyPublishIssueTotal(customerId, entity.getAgencyPath())); + log.info("extractExceptCommunityPioneerData 党员发布议题publishIssueTotal="+entity.getPublishIssueTotal()); //6、党员发布议题占比 : 占社区内所有议题的比率 if (entity.getPublishIssueTotal() == NumConstant.ZERO) { entity.setPublishIssueRatio(BigDecimal.ZERO); @@ -277,10 +304,11 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService //7、议题转项目数 entity.setShiftProjectTotal(getAgencyShiftProjectTotal(customerId, entity.getAgencyPath())); + log.info("extractExceptCommunityPioneerData 议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal()); //8、议题转项目占比 : 占网格内议题总数的比率 entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); }else{ -// log.info("当前组织内所有议题总数="+agencyIssueTotal); + log.info("extractExceptCommunityPioneerData 当前组织内所有议题总数agencyIssueTotal=0"); entity.setPublishIssueTotal(NumConstant.ZERO); entity.setPublishIssueRatio(BigDecimal.ZERO); entity.setShiftProjectTotal(NumConstant.ZERO); @@ -290,11 +318,13 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService // 9、已解决项目 entity.setResolvedProjectTotal(getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), DimObjectStatusConstant.RESOLVED)); + log.info("extractExceptCommunityPioneerData 已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { entity.setResolvedProjectRatio(BigDecimal.ZERO); } else { // 10、占总结项目 int closedProjectTotal = getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), null); + log.info("extractExceptCommunityPioneerData 总结项目closedProjectTotal="+closedProjectTotal); entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); } });