From 2dc95d6b38be2bddcc8228d597dec263f3523ee5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 18 Feb 2022 09:20:40 +0800 Subject: [PATCH 1/7] bug --- .../java/com/epmet/model/ImportBuildingInfoListener.java | 4 +--- .../main/java/com/epmet/model/ImportHouseInfoListener.java | 7 +++---- .../com/epmet/model/ImportNeighborHoodInfoListener.java | 4 +--- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java index 594b64e672..3abe78b418 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java @@ -103,9 +103,7 @@ public class ImportBuildingInfoListener extends AnalysisEventListener Date: Fri, 18 Feb 2022 09:25:23 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/HouseController.java | 2 +- .../main/java/com/epmet/service/impl/BuildingServiceImpl.java | 2 +- .../java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index c0c54f8540..017da95fd9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -289,7 +289,7 @@ public class HouseController implements ResultDataResolver { s = s + "第"+nums.stream().map(String::valueOf).collect(Collectors.joining("、"))+"条导入失败"; return new Result<>().error(9999,String.format(s,num,num - nums.size())); } - return new Result<>().ok(String.format(s,num,num)); + return new Result<>().error(9999,String.format(s,num,num)); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java index a518215b5c..15daabf246 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java @@ -429,7 +429,7 @@ public class BuildingServiceImpl implements BuildingService { s = s + "第"+nums.stream().map(String::valueOf).collect(Collectors.joining("、"))+"条导入失败"; return new Result<>().error(9999,String.format(s,num,num - nums.size())); } - return new Result<>().ok(String.format(s,num,num)); + return new Result<>().error(9999,String.format(s,num,num)); } private List searchAllBuilding(ListIcNeighborHoodFormDTO formDTO) { diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java index dddb2126e0..99db449d72 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java @@ -419,7 +419,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl().error(9999,String.format(s,num,num - nums.size())); } - return new Result<>().ok(String.format(s,num,num)); + return new Result<>().error(9999,String.format(s,num,num)); } /** From f728fd9a1a71e46faf6d2229aeeee64e4e30fe04 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 18 Feb 2022 10:12:38 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dao/IcBuildingDao.java | 4 +-- .../model/ImportBuildingInfoListener.java | 8 +++--- .../epmet/model/ImportHouseInfoListener.java | 18 ++++++------- .../main/resources/mapper/IcBuildingDao.xml | 27 ++++++++++--------- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java index c5ed882ca1..cc052eed19 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java @@ -128,7 +128,7 @@ public interface IcBuildingDao extends BaseDao { * @author zxc * @date 2022/2/14 1:25 下午 */ - List selectAllBuildingByNeighborHoodId(@Param("neighborHoodId")String neighborHoodId); + List selectAllBuildingByNeighborHoodId(@Param("orgId")String orgId); /** * @Description 根据楼栋ID查询楼栋单元 @@ -136,7 +136,7 @@ public interface IcBuildingDao extends BaseDao { * @author zxc * @date 2022/2/14 1:58 下午 */ - List selectAllBuildingUnitByBuildingId(@Param("building")String building); + List selectAllBuildingUnitByBuildingId(@Param("orgId")String orgId); /** * @Description 根据ID查询小区 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java index 3abe78b418..808a69f810 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java @@ -151,7 +151,7 @@ public class ImportBuildingInfoListener extends AnalysisEventListener getBuildingInfos(String neighborHoodId){ - buildingInfoDTOs = icBuildingDao.selectAllBuildingByNeighborHoodId(neighborHoodId); + public Map getBuildingInfos(String orgId){ + buildingInfoDTOs = icBuildingDao.selectAllBuildingByNeighborHoodId(orgId); buildingInfos = buildingInfoDTOs.stream().collect(Collectors.toMap(n -> n.getNeighborHoodId() + "_" + n.getBuildingName(), n -> n.getBuildingId())); icHouseRedis.setTemporaryCacheBuilding(formDTO.getCustomerId(), buildingInfos, formDTO.getUserId()); return buildingInfos; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java index 6025b15a6f..e572980355 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java @@ -142,7 +142,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener ids = needInsertList.stream().map(m -> m.getBuildingUnitId() + "_" + m.getDoorName()).distinct().collect(Collectors.toList()); + List ids = needInsertList.stream().filter(n -> StringUtils.isNotBlank(n.getBuildingUnitId())).map(m -> m.getBuildingUnitId() + "_" + m.getDoorName()).distinct().collect(Collectors.toList()); List existHouses = icBuildingDao.selectExistHouse(ids); existHouses.forEach(e -> { for (ImportGeneralDTO n : needInsertList) { @@ -212,7 +212,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener getBuildingInfos(String neighborHoodId){ - buildingInfoDTOs = icBuildingDao.selectAllBuildingByNeighborHoodId(neighborHoodId); + public Map getBuildingInfos(String orgId){ + buildingInfoDTOs = icBuildingDao.selectAllBuildingByNeighborHoodId(orgId); buildingInfos = buildingInfoDTOs.stream().collect(Collectors.toMap(n -> n.getNeighborHoodId() + "_" + n.getBuildingName(), n -> n.getBuildingId())); icHouseRedis.setTemporaryCacheBuilding(formDTO.getCustomerId(), buildingInfos, formDTO.getUserId()); return buildingInfos; } /** - * @Description 获取楼栋下的单元 - * @param buildingId + * @Description 获取组织下的单元 + * @param orgId * @author zxc * @date 2022/2/14 2:04 下午 */ - public Map getBuildingUnitInfos(String buildingId){ - buildingUnitInfoDTOs = icBuildingDao.selectAllBuildingUnitByBuildingId(buildingId); + public Map getBuildingUnitInfos(String orgId){ + buildingUnitInfoDTOs = icBuildingDao.selectAllBuildingUnitByBuildingId(orgId); if (!CollectionUtils.isEmpty(buildingUnitInfoDTOs)){ buildingUnitInfos = buildingUnitInfoDTOs.stream().collect(Collectors.toMap(n -> n.getBuildingId() + "_" + n.getBuildingUnit(), n -> n.getBuildingUnitId())); icHouseRedis.setTemporaryCacheBuildingUnit(formDTO.getCustomerId(), buildingUnitInfos, formDTO.getUserId()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml index 2611809ecb..ee64e59aca 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml @@ -264,23 +264,26 @@ From 79f4a9ea5fb0e010c6fd854ae4e051b74821698f Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 18 Feb 2022 15:53:12 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=20-=20=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E5=AF=BC=E5=85=A5=EF=BC=9A=E9=99=84=E5=8A=A0=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=A1=A8=E4=B8=AD=EF=BC=8C=E5=88=A4=E6=96=AD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E4=B8=BA=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserImportServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 18cd3cd6ec..0d3332d785 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -1209,7 +1209,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res String userCateRedisKey = RedisKeys.icResiImportResiCategoryKey(newlyOrChangedResi.get().getImportTag(), "add", icResiId); Map < String, Object > addUserMap = redisUtils.hGetAll(userCateRedisKey); - if (addUserMap != null) { + if (addUserMap != null && addUserMap.size() > 0) { //说明是新增居民 ResiImportCategoryData newResiCateData = ConvertUtils.mapToEntity(addUserMap, ResiImportCategoryData.class); newResiCateData.getCategories().put(columnName, "1"); From 841c60dc607efc3e2d4cbed4bcf0bfcfa565fec4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 18 Feb 2022 17:23:21 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8F=98=E5=8A=A8?= =?UTF-8?q?=E7=B2=92=E5=BA=A6=E7=BC=A9=E5=B0=8F=E4=B8=BAprojectId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mq/ProjectChangedCustomListener.java | 54 ++++++++++--------- .../service/impl/ProjectTraceServiceImpl.java | 5 +- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java index a09e63861c..c4c0138ad0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java @@ -10,6 +10,7 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.constant.PingYinConstant; import com.epmet.constant.SystemMessageType; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.service.evaluationindex.extract.todata.FactOriginExtractService; @@ -66,7 +67,7 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently } catch (Exception e) { //失败不重发 logger.error("consumeMessage fail,msg:{}",e.getMessage()); - return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; + return ConsumeConcurrentlyStatus.RECONSUME_LATER; } log.info("consumeMessage success, cost:{} ms",System.currentTimeMillis() - start); return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; @@ -94,7 +95,7 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently } log.info("消费了项目变动消息,customer id:{}", msgObj.getCustomerId()); - if (org.apache.commons.lang.StringUtils.isNotBlank(pendingMsgLabel)) { + if (StringUtils.isNotBlank(pendingMsgLabel)) { try { removePendingMqMsgCache(pendingMsgLabel); } catch (Exception e) { @@ -109,19 +110,14 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently try { String customerId = msgObj.getCustomerId(); distributedLock = SpringContextUtils.getBean(DistributedLock.class); - lock = distributedLock.getLock(String.format("lock:project_changed:%s", customerId) + lock = distributedLock.getLock(String.format("lock:project_changed:%s:%s", customerId, msgObj.getProjectId()) ,30L, 30L, TimeUnit.SECONDS); if (StringUtils.isBlank(customerId)){ logger.error("consumer project_changed fail,msg:{}",customerId); return; } - //消息被消费太快 业务数据还没有完成 歇一会先 - try { - Thread.sleep(60L); - } catch (InterruptedException e) { - logger.error("consumeMessage sleep exception",e); - } + ExtractOriginFormDTO extractOriginFormDTO = new ExtractOriginFormDTO(); extractOriginFormDTO.setCustomerId(customerId); @@ -146,21 +142,8 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently } logger.info("consumer projectChanged msg success,{}",aBoolean); - //发送项目数据上报的mq消息 - if ("6f203e30de1a65aab7e69c058826cd80".equals(customerId)) { - if ("issue_shift_project".equals(msgObj.getOperation()) || "created".equals(msgObj.getOperation()) || "close".equals(msgObj.getOperation())) { - String type; - if ("issue_shift_project".equals(msgObj.getOperation()) || "created".equals(msgObj.getOperation())) { - type = SystemMessageType.PROJECT_ADD; - } else { - type = SystemMessageType.PROJECT_EDIT; - } - List projectList = new ArrayList<>(); - projectList.add(msgObj.getProjectId()); - DisputeProcessMQMsg msg = new DisputeProcessMQMsg(customerId, projectList, type); - SpringContextUtils.getBean(ScreenProjectDataService.class).sendProjectChangeMq(msg); - } - } + sendProject2OpenData(msgObj, customerId); + } catch (RenException e) { // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 logger.error("【RocketMQ】消费项目变动消息失败:",e); @@ -175,6 +158,29 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently } } + /** + * desc:发型项目数据到 opendata + * @param msgObj + * @param customerId + */ + private void sendProject2OpenData(ProjectChangedMQMsg msgObj, String customerId) { + //发送项目数据上报的mq消息 + if (PingYinConstant.PROD_PING_YIN_CUSTOMER_ID.equals(customerId)) { + if ("issue_shift_project".equals(msgObj.getOperation()) || "created".equals(msgObj.getOperation()) || "close".equals(msgObj.getOperation())) { + String type; + if ("issue_shift_project".equals(msgObj.getOperation()) || "created".equals(msgObj.getOperation())) { + type = SystemMessageType.PROJECT_ADD; + } else { + type = SystemMessageType.PROJECT_EDIT; + } + List projectList = new ArrayList<>(); + projectList.add(msgObj.getProjectId()); + DisputeProcessMQMsg msg = new DisputeProcessMQMsg(customerId, projectList, type); + SpringContextUtils.getBean(ScreenProjectDataService.class).sendProjectChangeMq(msg); + } + } + } + @PreDestroy public void saveCalStatus() { //todo diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index 2a56eb3dfc..5bef06a0a2 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -312,7 +312,10 @@ public class ProjectTraceServiceImpl implements ProjectTraceS List staffList = formDTO.getStaffList(); //1.文字内容安全校验 List list = new ArrayList<>(); - list.add(formDTO.getTitle());list.add(formDTO.getBackGround());list.add(formDTO.getPublicReply());list.add(formDTO.getInternalRemark()); + list.add(formDTO.getTitle()); + list.add(formDTO.getBackGround()); + list.add(formDTO.getPublicReply()); + list.add(formDTO.getInternalRemark()); safetyCheck(list); //2.数据准备,查询需要用到的数据 From 229ae8ac42ad06a558508fa2778b84b1f8c1c7e4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 18 Feb 2022 17:42:43 +0800 Subject: [PATCH 6/7] =?UTF-8?q?bug=E6=94=B9=E4=B8=80=E4=B8=8B=20=E4=BE=8B?= =?UTF-8?q?=E8=A1=8C=E5=B7=A5=E4=BD=9C=E6=AC=A1=E6=95=B0=20=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E4=B8=8D=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datastats/impl/DataStatsServiceImpl.java | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java index 0803e2c359..b60e166a5f 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java @@ -2003,10 +2003,6 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve //获取例行工作次数 List workCountList = statsStaffPatrolRecordDailyService.getPatrolRecordCount(patrolForm); - Map> workCountMap = null; - if(workCountList != null && workCountList.size() > NumConstant.ZERO && workCountList.get(NumConstant.ZERO) != null){ - workCountMap = workCountList.stream().collect(Collectors.groupingBy(CustomerDataManageResultDTO.CustomerDataManage::getOrgId)); - } //NumConstant.FOUR.判断是否需要查询起始日期用户、群组、话题、议题、项目、巡查数据 HashMap uStartMap = new HashMap<>(); HashMap gStartMap = new HashMap<>(); @@ -2081,7 +2077,6 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve String patrolDuration = ""; int patrolDurationInteger = NumConstant.ZERO; HashSet set = new HashSet(); - List workCountListTemp; for (CustomerDataManageResultDTO.CustomerDataManage u : patrolEnd) { if (OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel()) && org.getOrgId().equals(u.getOrgId())) { patroCount += u.getPatrolCount(); @@ -2097,21 +2092,14 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve } //例行工作次数累加 int patrolRoutineWorkTimes = NumConstant.ZERO; - if (workCountMap != null){ - workCountListTemp = workCountMap.get(org.getOrgId()); - if (CollectionUtils.isNotEmpty(workCountListTemp)) { - if (OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel())) { - for (CustomerDataManageResultDTO.CustomerDataManage work : workCountListTemp) { - patrolRoutineWorkTimes += work.getPatrolRoutineWorkTimes(); - set.add(work.getStaffId()); - } - } else { - if (!OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel())) { - for (CustomerDataManageResultDTO.CustomerDataManage work : workCountListTemp) { - patrolRoutineWorkTimes += work.getPatrolRoutineWorkTimes(); - set.add(work.getStaffId()); - } - } + if (CollectionUtils.isNotEmpty(workCountList) && workCountList.get(NumConstant.ZERO) != null) { + for (CustomerDataManageResultDTO.CustomerDataManage work : workCountList) { + if (OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel()) && org.getOrgId().equals(work.getOrgId())) { + patrolRoutineWorkTimes += work.getPatrolRoutineWorkTimes(); + set.add(work.getStaffId()); + } else if (!OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel()) && work.getOrgId().contains(org.getOrgId())) { + patrolRoutineWorkTimes += work.getPatrolRoutineWorkTimes(); + set.add(work.getStaffId()); } } } From fa74f114b16b30336b22d9aa828dd16fb676d4f6 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 18 Feb 2022 17:59:25 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BE=8B=E8=A1=8C=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=20=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java index 2d519d41b7..65f55557fe 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java @@ -48,7 +48,7 @@ public class CustomerDataManageExcel { private String patrolDuration; @Excel(name = "例行工作次数") - private String patrolRoutineWorkTimes; + private Integer patrolRoutineWorkTimes; /** * 未转换前的巡查时长