From 99591acd969e67638ae6fb717d91f9c03eccf3d9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 30 Dec 2021 10:44:39 +0800 Subject: [PATCH 01/38] monthId --- .../main/resources/mapper/screen/ScreenGovernRankDataDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml index 6f040d326b..ca3642230b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml @@ -91,7 +91,8 @@ rankData.RESOLVED_RATIO, rankData.GOVERN_RATIO, rankData.SATISFACTION_RATIO, - agency.AGENCY_NAME AS parentAgencyName + agency.AGENCY_NAME AS parentAgencyName, + rankData.MONTH_ID as monthId FROM screen_govern_rank_data rankData LEFT JOIN From a9a5826695932c65d5b4a69d87fce5406a72eb19 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 10:47:49 +0800 Subject: [PATCH 02/38] =?UTF-8?q?Revert=20"=E4=B8=B4=E6=97=B6=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E6=96=B9=E6=A1=88=20=E7=BB=84=E7=BB=87=E6=A0=91=20?= =?UTF-8?q?=E5=85=88=E7=BC=93=E5=AD=98"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d69fd238 --- .../java/com/epmet/controller/CustomerAgencyController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 704b9b66b6..43108f3706 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -369,8 +369,8 @@ public class CustomerAgencyController { * @Date 2021/9/8 15:20 */ @PostMapping("agencygridtree") - public Result getOrgTreeData(@LoginUser TokenDto tokenDTO) { - //tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); + public Result getOrgTreeData(/*@LoginUser */TokenDto tokenDTO) { + tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); String orgTreeCacheKey = RedisKeys.getOrgTreeCacheKey(tokenDTO.getUserId()); Object o = redisUtils.get(orgTreeCacheKey); AgencyTreeResultDTO result = null; From 22474ae651ce3088fa2c1c341848abbae8726bbd Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 10:54:31 +0800 Subject: [PATCH 03/38] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=96=B9=E6=A1=88=20=E7=BB=84=E7=BB=87=E6=A0=91=20=E5=85=88?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 6 +++--- .../controller/CustomerAgencyController.java | 19 +++--------------- .../impl/CustomerAgencyServiceImpl.java | 20 ++++++++++++++++--- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 57630deaaf..970f72801a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -630,10 +630,10 @@ public class RedisKeys { /** * desc:临时方案 - * @param userId + * @param agencyId * @return */ - public static String getOrgTreeCacheKey(String userId) { - return rootPrefix.concat("ic:temp:orgtree").concat("userId"); + public static String getOrgTreeCacheKey(String agencyId) { + return rootPrefix.concat("ic:temp:orgtree").concat(agencyId); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 43108f3706..64660eec85 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -20,8 +20,6 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.redis.RedisKeys; -import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; @@ -55,8 +53,6 @@ import java.util.Set; @RestController @RequestMapping("customeragency") public class CustomerAgencyController { - @Autowired - private RedisUtils redisUtils; @Autowired private CustomerAgencyService customerAgencyService; @@ -369,18 +365,9 @@ public class CustomerAgencyController { * @Date 2021/9/8 15:20 */ @PostMapping("agencygridtree") - public Result getOrgTreeData(/*@LoginUser */TokenDto tokenDTO) { - tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); - String orgTreeCacheKey = RedisKeys.getOrgTreeCacheKey(tokenDTO.getUserId()); - Object o = redisUtils.get(orgTreeCacheKey); - AgencyTreeResultDTO result = null; - if (o == null){ - result = customerAgencyService.getOrgTreeData(tokenDTO.getUserId()); - redisUtils.set(orgTreeCacheKey,result,RedisUtils.MINUTE_THIRTY_EXPIRE); - }else { - result = (AgencyTreeResultDTO) o; - } - return new Result().ok(result); + public Result getOrgTreeData(@LoginUser TokenDto tokenDTO) { + //tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); + return new Result().ok(customerAgencyService.getOrgTreeData(tokenDTO.getUserId())); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index f70fdd035a..5e0dc73b52 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -16,6 +16,7 @@ */ package com.epmet.service.impl; + import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -24,6 +25,8 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerAgencyConstant; @@ -81,6 +84,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl page(Map params) { @@ -1122,8 +1127,17 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl getStaffOrgListByStaffId(String staffId) { return baseDao.getStaffOrgListByStaffId(staffId); } -} \ No newline at end of file +} From 72c8e0ea25e5d73421d55c828051cea2f9b3260a Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 10:55:27 +0800 Subject: [PATCH 04/38] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=96=B9=E6=A1=88=20=E7=BB=84=E7=BB=87=E6=A0=91=20=E5=85=88?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/commons/tools/redis/RedisKeys.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 970f72801a..f3c669d7cd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -634,6 +634,6 @@ public class RedisKeys { * @return */ public static String getOrgTreeCacheKey(String agencyId) { - return rootPrefix.concat("ic:temp:orgtree").concat(agencyId); + return rootPrefix.concat("org:temp:orgtree").concat(agencyId); } } From a7c4bd9031637d0fcc2c22ebedbc2e42ad32ebf2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 12:02:50 +0800 Subject: [PATCH 05/38] =?UTF-8?q?=E6=8B=86=E5=88=86sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/ResiBuzzLeftPieChartResultDTO.java | 5 +- .../src/main/java/com/epmet/dao/IssueDao.java | 3 + .../epmet/service/impl/IssueServiceImpl.java | 26 ++++++- .../src/main/resources/mapper/IssueDao.xml | 69 +++++++++++++------ 4 files changed, 80 insertions(+), 23 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java index 8db3918fab..9c12da7c91 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java @@ -37,10 +37,13 @@ public class ResiBuzzLeftPieChartResultDTO implements Serializable { */ private String color; + @JsonIgnore + private String issueId; + public ResiBuzzLeftPieChartResultDTO() { this.count = NumConstant.ZERO; this.categoryCode = ""; this.categoryName = ""; - this.color = "#0091ed"; + this.color = ""; } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index 8ab346293c..5e7e0029d0 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java @@ -262,6 +262,9 @@ public interface IssueDao extends BaseDao { */ List resiBuzzLeftPieChartByIssueIds(@Param("length")Integer length,@Param("issueIds")List issueIds); + List resiBuzzIssueCategoryByIssueIds(@Param("length")Integer length,@Param("issueIds")List issueIds); + List resiBuzzIssueCategoryNameByIssueIds(List categories,@Param("customerId")String customerId); + /** * @Description 查询前50名的议题ID * @param orgId diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 09310d3091..9271042bcf 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -1656,13 +1656,37 @@ public class IssueServiceImpl extends BaseServiceImpl imp if(CollectionUtils.isEmpty(issueIds)){ return new ArrayList<>(); } - List result = baseDao.resiBuzzLeftPieChartByIssueIds(length, issueIds); + List categories = baseDao.resiBuzzIssueCategoryByIssueIds(length, issueIds); + List pieChat = getPieChat(issueIds); + Iterator list = pieChat.iterator(); + while (list.hasNext()){ + ResiBuzzLeftPieChartResultDTO next = list.next(); + for (ResiBuzzLeftPieChartResultDTO category : categories) { + if (next.getIssueId().equals(category.getIssueId())){ + list.remove(); + continue; + } + } + } + categories.addAll(pieChat); +// List result = baseDao.resiBuzzLeftPieChartByIssueIds(length, issueIds); + List result = baseDao.resiBuzzIssueCategoryNameByIssueIds(categories, tokenDto.getCustomerId()); if (CollectionUtils.isEmpty(result)){ return new ArrayList<>(); } return result; } + public List getPieChat(List issueIds){ + List resultDTOS = new ArrayList<>(); + issueIds.forEach(i -> { + ResiBuzzLeftPieChartResultDTO dto = new ResiBuzzLeftPieChartResultDTO(); + dto.setIssueId(i); + resultDTOS.add(dto); + }); + return resultDTOS; + } + /** * @Description 查询组织下每个网格的项目数 * @param formDTO diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index cf309c8106..659f8c1322 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -621,25 +621,25 @@ @@ -700,11 +700,38 @@ IFNULL(cd.CATEGORY_NAME,'其他') AS categoryName, IFNULL(cd.color,'#0091ed') AS color FROM issue_category ic - INNER JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = LEFT(ic.CATEGORY_CODE,#{length}) AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = ic.CUSTOMER_ID) + LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = LEFT(ic.CATEGORY_CODE,#{length}) AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = ic.CUSTOMER_ID) AND ic.ISSUE_ID IN ( #{issueId} - ) GROUP BY categoryName + ) GROUP BY categoryCode + + + \ No newline at end of file From 4d9404affd37715934f03592b9145bea3e9ebe0c Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 12:19:39 +0800 Subject: [PATCH 06/38] =?UTF-8?q?=E5=B7=A1=E6=9F=A5=E7=9A=84=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F1s=20=E6=B6=88=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseGridDailyworkController.java | 2 +- .../OpenDataPatrolChangeEventListener.java | 4 +++- .../service/BaseGridDailyworkService.java | 2 +- .../impl/BaseGridDailyworkServiceImpl.java | 10 ++++++---- .../impl/UserPatrolRecordServiceImpl.java | 18 ++++++++++-------- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BaseGridDailyworkController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BaseGridDailyworkController.java index 4b27f0c0a3..1efda7b0b3 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BaseGridDailyworkController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BaseGridDailyworkController.java @@ -50,7 +50,7 @@ public class BaseGridDailyworkController { @PostMapping("sync") public Result getStaffBaseInfo(@RequestBody(required = false) UpsertPatrolRecordForm formDTO) { ValidatorUtils.validateEntity(formDTO, DefaultGroup.class); - baseGridDailyworkService.insertPatrolRecord(formDTO); + baseGridDailyworkService.insertBaseGridWorkRecord(formDTO); return new Result(); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java index e13b8d01b7..682185ca8a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java @@ -3,6 +3,7 @@ package com.epmet.opendata.mq.listener; import com.alibaba.fastjson.JSON; import com.epmet.commons.rocketmq.constants.MQUserPropertys; import com.epmet.commons.rocketmq.messages.StaffPatrolMQMsg; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.exception.ExceptionUtils; @@ -53,6 +54,7 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr } try { + Thread.sleep(NumConstant.ONE_THOUSAND); msgs.forEach(this::consumeMessage); } catch (Exception e) { logger.error(ExceptionUtils.getErrorStackTrace(e)); @@ -96,7 +98,7 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr aBoolean = SpringContextUtils.getBean(UserPatrolRecordService.class).updatePatrolRecord(patrolRecordForm); break; case SystemMessageType.PATROL_ROUTINE_WORK_ADD: - aBoolean = SpringContextUtils.getBean(BaseGridDailyworkService.class).insertPatrolRecord(patrolRecordForm); + aBoolean = SpringContextUtils.getBean(BaseGridDailyworkService.class).insertBaseGridWorkRecord(patrolRecordForm); break; default: log.error("错误的消息类型:{}", tags); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BaseGridDailyworkService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BaseGridDailyworkService.java index 0d40bb6aea..010b698d63 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BaseGridDailyworkService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BaseGridDailyworkService.java @@ -34,7 +34,7 @@ public interface BaseGridDailyworkService extends BaseService> record = epmetUserOpenFeignClient.getPatrolRoutineWorkList(midPatrolFormDTO); if (record == null || !record.success()) { log.error("获取例行工作记录失败,param:{}", JSON.toJSONString(midPatrolFormDTO)); - return false; + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); } Map deptMap = exDeptService.getDeptDTOMap(patrolRecordForm.getCustomerId()); Map userMap = exUserService.getUserDTOMap(patrolRecordForm.getCustomerId()); @@ -82,7 +84,7 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl> record = dataStatisticalOpenFeignClient.getPatrolRecordList(midPatrolFormDTO); if (record == null || !record.success()) { - log.error("获取巡查记录失败,param:{}", JSON.toJSONString(midPatrolFormDTO)); - return false; + log.error("insertPatrolRecord 获取巡查记录失败,param:{}", JSON.toJSONString(midPatrolFormDTO)); + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); } List data = record.getData(); if (CollectionUtils.isEmpty(data)) { //数据已被删除了 //暂时设置error 用于排错 - log.error("获取巡查记录返回为空,param:{}", JSON.toJSONString(midPatrolFormDTO)); + log.error("insertPatrolRecord获取巡查记录返回为空,param:{}", JSON.toJSONString(midPatrolFormDTO)); int effectRow = baseDao.deleteById(patrolRecordForm.getId()); log.warn("del effectRow:{}", effectRow); - return true; + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); } List insertList = new ArrayList<>(); data.forEach(o-> insertList.add(buildEntity(o))); @@ -94,17 +96,17 @@ public class UserPatrolRecordServiceImpl extends BaseServiceImpl> record = dataStatisticalOpenFeignClient.getPatrolRecordList(midPatrolFormDTO); if (record == null || !record.success()) { - log.error("获取巡查记录失败,param:{}", JSON.toJSONString(midPatrolFormDTO)); - return false; + log.error("updatePatrolRecord 获取巡查记录失败,param:{}", JSON.toJSONString(midPatrolFormDTO)); + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); } List data = record.getData(); if (CollectionUtils.isEmpty(data)) { //数据已被删除了 //暂时设置error 用于排错 - log.error("获取巡查记录返回为空,param:{}", JSON.toJSONString(midPatrolFormDTO)); + log.error("updatePatrolRecord 获取巡查记录返回为空,param:{}", JSON.toJSONString(midPatrolFormDTO)); int effectRow = baseDao.deleteById(patrolRecordForm.getId()); log.warn("del effectRow:{}", effectRow); - return true; + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); } data.forEach(o->{ UserPatrolRecordEntity recordEntity = buildEntity(o); From d7b446e9d12f630eb1a7723efcf48d0c2fe2cc2a Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 30 Dec 2021 12:22:18 +0800 Subject: [PATCH 07/38] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=BF=97=E6=84=BF=E8=80=85=E5=88=86=E5=B8=83=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VolunteerDistributionResultDTO.java | 2 + .../java/com/epmet/dao/IcResiUserDao.java | 2 + .../service/impl/VolunteerServiceImpl.java | 122 +++++++++++------- .../main/resources/mapper/IcResiUserDao.xml | 17 +++ 4 files changed, 99 insertions(+), 44 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VolunteerDistributionResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VolunteerDistributionResultDTO.java index 94a4d4ac88..99f04a4b8d 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VolunteerDistributionResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VolunteerDistributionResultDTO.java @@ -28,6 +28,8 @@ public class VolunteerDistributionResultDTO { @Data public static class Distribution { private Set volunteerCategories; + private String volunteerCategoriesStr; + private String buildingId; private String epmetUserId; private String icResiUserId; private String longitude; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index c3f1da8654..f1822e93f2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -226,4 +226,6 @@ public interface IcResiUserDao extends BaseDao { */ List getPartyMemberEducationList(@Param("orgType") String orgType, @Param("orgId") String orgId, @Param("code") String code); + + List listIcResiInfosByUserIds(@Param("userIds") List userIds); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java index 917268c8cb..e383f91664 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java @@ -7,10 +7,8 @@ import com.epmet.dao.IcResiUserDao; import com.epmet.dao.UserBaseInfoDao; import com.epmet.dto.IcBuildingDTO; import com.epmet.dto.IcFormItemOptionsDTO; -import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.IcFormOptionsQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; -import com.epmet.dto.result.ResiUserBaseInfoResultDTO; import com.epmet.dto.result.VolunteerDistributionResultDTO; import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO; import com.epmet.feign.EpmetHeartOpenFeignClient; @@ -18,10 +16,11 @@ import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.service.VolunteerService; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import com.google.common.collect.Lists; + import java.util.*; import java.util.stream.Collectors; @@ -100,7 +99,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve int pageSize = 100; // 志愿者epmet user id - Set volunteerEpmetUserIds = new HashSet<>(); + List volunteerEpmetUserIds = new ArrayList<>(); // 分页查询志愿者的epmet user id while (true) { @@ -131,54 +130,89 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve VolunteerDistributionResultDTO r = new VolunteerDistributionResultDTO(); + log.info("【志愿者分布】查询到志愿者userId公{}个", volunteerEpmetUserIds.size()); + // 2.填充ic居民信息 - for (String volunteerEpmetUserId : volunteerEpmetUserIds) { - - VolunteerDistributionResultDTO.Distribution distribution = new VolunteerDistributionResultDTO.Distribution(); - - ResiUserBaseInfoResultDTO userBaseInfo = userBaseInfoDao.selecUserBaseInfoByUserId(volunteerEpmetUserId); - if (userBaseInfo == null || StringUtils.isBlank(userBaseInfo.getIdNum())){ - log.warn("getVolunteerDistribution selecUserBaseInfoByUserId return null or idCard is null,volunteerEpmetUserId:{}", volunteerEpmetUserId); - continue; - } - //使用身份证号查询ic resi信息 - IcResiUserDTO icResiUserInfo = icResiUserDao.selectIdByIdCard(customerId, userBaseInfo.getIdNum(), null); - if (icResiUserInfo == null) { - continue; - } - - // 查询志愿者类别 - List volunteerCategories = icResiUserDao.selectVolunteerByUserId(icResiUserInfo.getId()); - //if (CollectionUtils.isEmpty(volunteerCategories)) { - // // 此人没有志愿者信息 - // continue; - //} - - // 将志愿者类型列表字符串,切割放到set中 - Set volunteerTypes = new HashSet(); - for (String vTypesString : volunteerCategories) { - String[] vTypes = vTypesString.split(","); + List> volunteerEpmetUserIdParts = Lists.partition(volunteerEpmetUserIds, 100); + for (List volunteerEpmetUserIdPart : volunteerEpmetUserIdParts) { + + List icResiInfos = icResiUserDao.listIcResiInfosByUserIds(volunteerEpmetUserIdPart); + + // 填充志愿者类型 + for (VolunteerDistributionResultDTO.Distribution icResiInfo : icResiInfos) { + // 将志愿者类型列表字符串,切割放到set中 + Set volunteerTypes = new HashSet(); + String[] vTypes = icResiInfo.getVolunteerCategoriesStr().split(","); if (vTypes != null && vTypes.length > 0) { volunteerTypes.addAll(Arrays.asList(vTypes)); } - } + icResiInfo.setVolunteerCategories(volunteerTypes); + // 填充建筑坐标 + String msg = "【志愿者分布】查询楼栋信息失败"; + IcBuildingDTO building = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingById(icResiInfo.getBuildingId()), + ServiceConstant.GOV_ORG_SERVER, + EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); - String msg = "【志愿者分布】查询楼栋信息失败"; - IcBuildingDTO building = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingById(icResiUserInfo.getBuildId()), - ServiceConstant.GOV_ORG_SERVER, - EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + icResiInfo.setEpmetUserId(icResiInfo.getEpmetUserId()); + icResiInfo.setIcResiUserId(icResiInfo.getIcResiUserId()); + Optional.of(building).ifPresent(b -> { + icResiInfo.setLongitude(b.getLongitude()); + icResiInfo.setLatitude(b.getLatitude()); + }); - distribution.setVolunteerCategories(volunteerTypes); - distribution.setEpmetUserId(userBaseInfo.getUserId()); - distribution.setIcResiUserId(icResiUserInfo.getId()); - Optional.of(building).ifPresent(b -> { - distribution.setLongitude(b.getLongitude()); - distribution.setLatitude(b.getLatitude()); - }); - - r.getDistributions().add(distribution); + } + r.getDistributions().addAll(icResiInfos); } + + // 就有代码,稳定之后可以删掉 + //for (String volunteerEpmetUserId : volunteerEpmetUserIds) { + // + // VolunteerDistributionResultDTO.Distribution distribution = new VolunteerDistributionResultDTO.Distribution(); + // + // ResiUserBaseInfoResultDTO userBaseInfo = userBaseInfoDao.selecUserBaseInfoByUserId(volunteerEpmetUserId); + // if (userBaseInfo == null || StringUtils.isBlank(userBaseInfo.getIdNum())){ + // log.warn("getVolunteerDistribution selecUserBaseInfoByUserId return null or idCard is null,volunteerEpmetUserId:{}", volunteerEpmetUserId); + // continue; + // } + // //使用身份证号查询ic resi信息 + // IcResiUserDTO icResiUserInfo = icResiUserDao.selectIdByIdCard(customerId, userBaseInfo.getIdNum(), null); + // if (icResiUserInfo == null) { + // continue; + // } + // + // // 查询志愿者类别 + // List volunteerCategories = icResiUserDao.selectVolunteerByUserId(icResiUserInfo.getId()); + // //if (CollectionUtils.isEmpty(volunteerCategories)) { + // // // 此人没有志愿者信息 + // // continue; + // //} + // + // // 将志愿者类型列表字符串,切割放到set中 + // Set volunteerTypes = new HashSet(); + // for (String vTypesString : volunteerCategories) { + // String[] vTypes = vTypesString.split(","); + // if (vTypes != null && vTypes.length > 0) { + // volunteerTypes.addAll(Arrays.asList(vTypes)); + // } + // } + // + // + // String msg = "【志愿者分布】查询楼栋信息失败"; + // IcBuildingDTO building = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingById(icResiUserInfo.getBuildId()), + // ServiceConstant.GOV_ORG_SERVER, + // EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + // + // distribution.setVolunteerCategories(volunteerTypes); + // distribution.setEpmetUserId(userBaseInfo.getUserId()); + // distribution.setIcResiUserId(icResiUserInfo.getId()); + // Optional.of(building).ifPresent(b -> { + // distribution.setLongitude(b.getLongitude()); + // distribution.setLatitude(b.getLatitude()); + // }); + // + // r.getDistributions().add(distribution); + //} return r; } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index b10e6e259f..6b07136f1c 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -489,4 +489,21 @@ GROUP BY CULTURE + + From cc08e57c942820ffaa00308d9bddc1700fe75870 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 12:46:01 +0800 Subject: [PATCH 08/38] =?UTF-8?q?=E6=B3=A8=E6=8E=89=E8=BF=99=E4=B8=AA?= =?UTF-8?q?=E6=8C=A8=E5=8D=83=E5=88=80=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/IssueVoteStatisticalController.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java index 7a7c4530f1..5265af8079 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java @@ -35,6 +35,7 @@ import com.epmet.dto.result.VoteResultDTO; import com.epmet.dto.result.VotingTrendResultDTO; import com.epmet.excel.IssueVoteStatisticalExcel; import com.epmet.service.IssueVoteStatisticalService; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -49,10 +50,11 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2020-05-11 */ +@Slf4j @RestController @RequestMapping("issuevotestatistical") public class IssueVoteStatisticalController { - + @Autowired private IssueVoteStatisticalService issueVoteStatisticalService; @@ -129,7 +131,8 @@ public class IssueVoteStatisticalController { **/ @PostMapping("syncvotingcacheanddb") public Result syncVotingCacheAndDb(){ - issueVoteStatisticalService.syncVotingCacheToDb(); + //issueVoteStatisticalService.syncVotingCacheToDb(); + log.error("syncvotingcacheanddb 又执行了"); return new Result(); } @@ -159,4 +162,4 @@ public class IssueVoteStatisticalController { return new Result>().ok(issueVoteStatisticalService.myPartIssues(myPartIssuesFormDTO)); } -} \ No newline at end of file +} From d33c784105d8290fdd675af883556ca45bf299e2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 13:03:30 +0800 Subject: [PATCH 09/38] =?UTF-8?q?=E6=8B=86=E5=88=86sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/ResiBuzzLeftPieChartResultDTO.java | 4 ++++ .../src/main/java/com/epmet/dao/IssueDao.java | 2 ++ .../epmet/service/impl/IssueServiceImpl.java | 17 ++++++++++++++++- .../src/main/resources/mapper/IssueDao.xml | 18 +++++++++++++++++- 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java index 9c12da7c91..ad9a746ca6 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java @@ -40,10 +40,14 @@ public class ResiBuzzLeftPieChartResultDTO implements Serializable { @JsonIgnore private String issueId; + @JsonIgnore + private Boolean status; + public ResiBuzzLeftPieChartResultDTO() { this.count = NumConstant.ZERO; this.categoryCode = ""; this.categoryName = ""; this.color = ""; + this.status = false; } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index 5e7e0029d0..b3b6430af1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java @@ -290,4 +290,6 @@ public interface IssueDao extends BaseDao { */ List selectCategoryNameByIssueIds(@Param("issueIds")List issueIds); + List selectCategoryNameByIssueList(List issueIds,@Param("customerId")String customerId); + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 9271042bcf..2753105e1d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -1605,7 +1605,22 @@ public class IssueServiceImpl extends BaseServiceImpl imp } List list = allList.stream().skip(formDTO.getPageSize() * (formDTO.getPageNo() - NumConstant.ONE)) .limit(formDTO.getPageSize()).collect(Collectors.toList()); - List names = baseDao.selectCategoryNameByIssueIds(allList.stream().map(m -> m.getIssueId()).collect(Collectors.toList())); + List categories = baseDao.resiBuzzIssueCategoryByIssueIds(length, list.stream().map(m -> m.getIssueId()).collect(Collectors.toList())); + List pieChat = getPieChat(list.stream().map(m -> m.getIssueId()).collect(Collectors.toList())); + Iterator listIterator = pieChat.iterator(); + while (listIterator.hasNext()){ + ResiBuzzLeftPieChartResultDTO next = listIterator.next(); + for (int i = 0; i < categories.size(); i++) { + if (next.getIssueId().equals(categories.get(i).getIssueId()) && !next.getStatus()){ + next.setStatus(true); + listIterator.remove(); + continue; + } + } + } + categories.addAll(pieChat); +// List names = baseDao.selectCategoryNameByIssueIds(allList.stream().map(m -> m.getIssueId()).collect(Collectors.toList())); + List names = baseDao.selectCategoryNameByIssueList(categories,tokenDto.getCustomerId()); if (CollectionUtils.isNotEmpty(names)){ list.forEach(l -> names.stream().filter(n -> l.getIssueId().equals(n.getIssueId())).forEach(n -> l.setCategoryName(n.getCn()))); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 659f8c1322..be37e267ae 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -711,7 +711,7 @@ resultType="com.epmet.dto.result.ResiBuzzLeftPieChartResultDTO"> SELECT ISSUE_ID , - IFNULL(LEFT(CATEGORY_CODE,2),'') AS categoryCode + IFNULL(LEFT(CATEGORY_CODE,#{length}),'') AS categoryCode FROM issue_category WHERE DEL_FLAG = '0' AND ISSUE_ID IN( @@ -734,4 +734,20 @@ LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = t1.categoryCode AND cd.CUSTOMER_ID = #{customerId} AND cd.DEL_FLAG = '0' ) )t2 + + + + + + + + \ No newline at end of file From cc290ca05e279cfef5a4075bb638deb29a6f2603 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 13:14:55 +0800 Subject: [PATCH 10/38] =?UTF-8?q?=E6=8B=86=E5=88=86sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IssueServiceImpl.java | 5 +++-- .../gov-issue-server/src/main/resources/mapper/IssueDao.xml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 2753105e1d..5a1eaaeb1c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -1676,8 +1676,9 @@ public class IssueServiceImpl extends BaseServiceImpl imp Iterator list = pieChat.iterator(); while (list.hasNext()){ ResiBuzzLeftPieChartResultDTO next = list.next(); - for (ResiBuzzLeftPieChartResultDTO category : categories) { - if (next.getIssueId().equals(category.getIssueId())){ + for (int i = 0; i < categories.size(); i++) { + if (next.getIssueId().equals(categories.get(i).getIssueId()) && !next.getStatus()){ + next.setStatus(true); list.remove(); continue; } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index be37e267ae..a65070fd4a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -733,6 +733,7 @@ from (select #{c.issueId} as issueId,#{c.categoryCode} as categoryCode) t1 LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = t1.categoryCode AND cd.CUSTOMER_ID = #{customerId} AND cd.DEL_FLAG = '0' ) )t2 + group by t2.categoryName From bc242593ce2c7d96206db50d5fb6bd6420d9f3bf Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 30 Dec 2021 13:20:27 +0800 Subject: [PATCH 11/38] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BF=97=E6=84=BF?= =?UTF-8?q?=E8=80=85=E5=88=86=E5=B8=83=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/VolunteerServiceImpl.java | 18 +++++++++++++----- .../main/resources/mapper/IcResiUserDao.xml | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java index e383f91664..2d5e776c8f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java @@ -16,6 +16,8 @@ import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.service.VolunteerService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -96,7 +98,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve // 1.分页查询出所有志愿者列表 int pageNo = 1; - int pageSize = 100; + int pageSize = 200; // 志愿者epmet user id List volunteerEpmetUserIds = new ArrayList<>(); @@ -142,11 +144,17 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve for (VolunteerDistributionResultDTO.Distribution icResiInfo : icResiInfos) { // 将志愿者类型列表字符串,切割放到set中 Set volunteerTypes = new HashSet(); - String[] vTypes = icResiInfo.getVolunteerCategoriesStr().split(","); - if (vTypes != null && vTypes.length > 0) { - volunteerTypes.addAll(Arrays.asList(vTypes)); + String volunteerCategoriesStr = icResiInfo.getVolunteerCategoriesStr(); + + if (StringUtils.isNotEmpty(volunteerCategoriesStr)) { + String[] vTypes = volunteerCategoriesStr.split(","); + if (vTypes != null && vTypes.length > 0) { + volunteerTypes.addAll(Arrays.asList(vTypes)); + } + icResiInfo.setVolunteerCategories(volunteerTypes); + } else { + icResiInfo.setVolunteerCategories(new HashSet<>()); } - icResiInfo.setVolunteerCategories(volunteerTypes); // 填充建筑坐标 String msg = "【志愿者分布】查询楼栋信息失败"; diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 6b07136f1c..784a2b1427 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -498,7 +498,7 @@ icvol.VOLUNTEER_CATEGORY as volunteerCategoriesStr from user_base_info userbaseinfo inner join ic_resi_user icuser on (userbaseinfo.ID_NUM = icuser.ID_CARD and icuser.DEL_FLAG = '0') - inner join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0') + left join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0') where userbaseinfo.DEL_FLAG = '0' and userbaseinfo.ID_NUM is not null and userbaseinfo.USER_ID in From f1afa6550d7912ed65bdbabad46625f4920f90a5 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 13:26:33 +0800 Subject: [PATCH 12/38] =?UTF-8?q?=E5=AD=98=E4=BB=96=E4=B8=AA=2024=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=20=E7=BB=99=E6=88=91=E7=82=B9=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CustomerAgencyController.java | 4 +- .../java/com/epmet/dao/CustomerAgencyDao.java | 59 ++++++++++++------- .../impl/CustomerAgencyServiceImpl.java | 4 +- .../resources/mapper/CustomerAgencyDao.xml | 34 +++++++++++ 4 files changed, 75 insertions(+), 26 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 64660eec85..2125390944 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -365,8 +365,8 @@ public class CustomerAgencyController { * @Date 2021/9/8 15:20 */ @PostMapping("agencygridtree") - public Result getOrgTreeData(@LoginUser TokenDto tokenDTO) { - //tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); + public Result getOrgTreeData(/*@LoginUser*/ TokenDto tokenDTO) { + tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); return new Result().ok(customerAgencyService.getOrgTreeData(tokenDTO.getUserId())); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index d1a49f7ba3..f379824aae 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -58,6 +58,7 @@ public interface CustomerAgencyDao extends BaseDao { * @Description 组织首页-下级机关列表 **/ List selectSubAgencyById(@Param("pId") String pId, @Param("agencyNum") Integer agencyNum); + List selectSubAgencyByAgencyId(@Param("pId") String pId); /** @@ -79,8 +80,8 @@ public interface CustomerAgencyDao extends BaseDao { CustomerAgencyEntity getAgencyByStaffId(@Param("staffId") String staffId); /** - * @Description 根据agencyId查询地区编码 * @param agencyId 所属机关id + * @Description 根据agencyId查询地区编码 * @author zxc * @date 2020/4/28 15:50 */ @@ -104,6 +105,7 @@ public interface CustomerAgencyDao extends BaseDao { /** * 查询客户根级组织 + * * @param customerId * @return */ @@ -111,10 +113,11 @@ public interface CustomerAgencyDao extends BaseDao { /** * 获取所属机关单位名称(上级-所属) - * @author zhaoqifeng - * @date 2020/5/22 17:53 + * * @param agencyId * @return java.lang.String + * @author zhaoqifeng + * @date 2020/5/22 17:53 */ String selectAgencyName(@Param("agencyId") String agencyId); @@ -127,46 +130,48 @@ public interface CustomerAgencyDao extends BaseDao { List selectAllSubAgency(@Param("subAgencyPids") String subAgencyPids); /** - * @Description 查询一个工作人员最近登录的网格以及机关信息 * @param gridId * @return + * @Description 查询一个工作人员最近登录的网格以及机关信息 * @author wangc * @date 2020.08.17 09:50 - **/ + **/ ExtStaffInfoResultDTO selectAgencyAndGridInfoExt(@Param("gridId") String gridId); + /** - * @Description 当没有工作人员最近访问的gridId时查询该用户所属的组织机关信息 * @param staffId * @return + * @Description 当没有工作人员最近访问的gridId时查询该用户所属的组织机关信息 * @author wangc * @date 2020.08.17 09:50 **/ - ExtStaffInfoResultDTO selectAgencyInfoWhenGridIdIsNull(@Param("staffId")String staffId); + ExtStaffInfoResultDTO selectAgencyInfoWhenGridIdIsNull(@Param("staffId") String staffId); + /** - * @Description 根据agencyId查找指定机构的信息,直属网格、部门 * @param agencyId * @return + * @Description 根据agencyId查找指定机构的信息,直属网格、部门 * @author wangc * @date 2020.08.18 13:41 - **/ - ExtStaffPermissionResultDTO selectAgencyById(@Param("agencyId")String agencyId); + **/ + ExtStaffPermissionResultDTO selectAgencyById(@Param("agencyId") String agencyId); /** - * @Description 根绝agencyId查找其下属机构的信息 * @param pid * @return + * @Description 根绝agencyId查找其下属机构的信息 * @author wangc * @date 2020.08.18 13:42 - **/ + **/ List selectSubAgencyByPid(@Param("pid") String pid); /** - * @Description 根据agencyId查找指定机构直属的部门,将grid与dept分开是因为grid与dept的数量可能不等,造成重复数据无法去重 * @param agencyId * @return + * @Description 根据agencyId查找指定机构直属的部门,将grid与dept分开是因为grid与dept的数量可能不等,造成重复数据无法去重 * @author wangc * @date 2020.08.18 13:42 - **/ + **/ List selectDeptList(@Param("agencyId") String agencyId); /** @@ -186,30 +191,33 @@ public interface CustomerAgencyDao extends BaseDao { AgencyResultDTO selectAgencyByStaffId(@Param("staffId") String staffId); /** - * @Description 返回elementTree结构的agency树 * @param customerId * @param pid * @return java.util.List + * @Description 返回elementTree结构的agency树 * @Author liushaowen * @Date 2020/11/6 14:57 */ - List getAgencyElementTree(@Param("customerId") String customerId,@Param("pid") String pid); + List getAgencyElementTree(@Param("customerId") String customerId, @Param("pid") String pid); /** * @Description 外挂-获取当前组织及部门、网格数据,递归查询所有下级数据 * @author sun **/ OrganizeTreeResultDTO selectorganizeTree(@Param("agencyId") String agencyId); + /** * @Description 外挂-获取当前组织及部门、网格数据,递归查询所有下级数据 * @author sun **/ List selectAgencyGridList(@Param("agencyId") String agencyId); + /** * @Description 外挂-获取当前组织及部门、网格数据,递归查询所有下级数据 * @author sun **/ List selectAgencyDeptList(@Param("agencyId") String agencyId); + /** * @Description 外挂-获取当前组织及部门、网格数据,递归查询所有下级数据 * @author sun @@ -236,6 +244,7 @@ public interface CustomerAgencyDao extends BaseDao { /** * 根据新增人员类型判断查询机关信息 + * * @author sun */ OrgResultDTO selectAgencyDetail(@Param("orgId") String orgId, @Param("orgType") String orgType); @@ -247,40 +256,46 @@ public interface CustomerAgencyDao extends BaseDao { List getStaffOrgListByStaffId(@Param("staffId") String staffId); /** - * @Description 【地图配置】删除 * @param orgId * @param level + * @Description 【地图配置】删除 * @author zxc * @date 2021/10/25 9:39 上午 */ void delMapArea(@Param("orgId") String orgId, @Param("level") String level); /** - * @Description 【地图配置】新增 * @param orgId * @param level * @param coordinates + * @Description 【地图配置】新增 * @author zxc * @date 2021/10/25 9:59 上午 */ - void addMapArea(@Param("orgId") String orgId, @Param("level") String level,@Param("coordinates")String coordinates); + void addMapArea(@Param("orgId") String orgId, @Param("level") String level, @Param("coordinates") String coordinates); /** - * @Description 地图查询下级组织 * @param pid * @param type + * @Description 地图查询下级组织 * @author zxc * @date 2021/10/25 2:30 下午 */ - List selectSonOrg(@Param("pid")String pid,@Param("type")String type); + List selectSonOrg(@Param("pid") String pid, @Param("type") String type); /** - * @Description 查询下级agencyId * @param orgId + * @Description 查询下级agencyId * @author zxc * @date 2021/12/9 4:42 下午 */ List getSonAgencyId(@Param("orgId") String orgId); + /** + * desc:获取组织和网格的数据 树形sql + * @param agencyId + * @return + */ + ExtStaffPermissionResultDTO selectAgencyAndGridById(@Param("agencyId") String agencyId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 5e0dc73b52..a1024cead5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -1131,9 +1131,9 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl + + + + + + + + + + + + + + + + + + + + From bcdb455099b884542df707cdea150ffbe8ae1bbd Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 30 Dec 2021 13:31:20 +0800 Subject: [PATCH 13/38] fix --- .../src/main/resources/mapper/IcResiUserDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 784a2b1427..6b07136f1c 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -498,7 +498,7 @@ icvol.VOLUNTEER_CATEGORY as volunteerCategoriesStr from user_base_info userbaseinfo inner join ic_resi_user icuser on (userbaseinfo.ID_NUM = icuser.ID_CARD and icuser.DEL_FLAG = '0') - left join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0') + inner join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0') where userbaseinfo.DEL_FLAG = '0' and userbaseinfo.ID_NUM is not null and userbaseinfo.USER_ID in From 4f52fcc85da4c5cd919cc3b91bc2bbcb66d72175 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 13:33:03 +0800 Subject: [PATCH 14/38] =?UTF-8?q?=E5=AD=98=E4=BB=96=E4=B8=AA=2024=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=20=E7=BB=99=E6=88=91=E7=82=B9=E6=97=B6=E9=97=B4=20up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/CustomerAgencyController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 2125390944..64660eec85 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -365,8 +365,8 @@ public class CustomerAgencyController { * @Date 2021/9/8 15:20 */ @PostMapping("agencygridtree") - public Result getOrgTreeData(/*@LoginUser*/ TokenDto tokenDTO) { - tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); + public Result getOrgTreeData(@LoginUser TokenDto tokenDTO) { + //tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); return new Result().ok(customerAgencyService.getOrgTreeData(tokenDTO.getUserId())); } From 85289f3115ff581957d91eaa7bbae0beb84a6a5b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 13:52:27 +0800 Subject: [PATCH 15/38] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-issue-server/src/main/resources/mapper/IssueDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index a65070fd4a..9e5e5e583d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -645,7 +645,7 @@ + SELECT * FROM register_relation WHERE DEL_FLAG = 0 AND USER_ID = #{userId} + + From bc45b7a5f3b92c89f17b4d16bf5cda277476756b Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 15:35:17 +0800 Subject: [PATCH 24/38] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=BD=E5=8F=96=20=E6=97=A5=E5=BF=97=E6=8E=92=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dao/project/ProjectDao.java | 3 ++- .../todata/impl/ProjectExtractServiceImpl.java | 13 +++++++++++-- .../com/epmet/service/project/ProjectService.java | 2 +- .../service/project/impl/ProjectServiceImpl.java | 4 ++-- .../main/resources/mapper/project/ProjectDao.xml | 3 +++ 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java index f090c31a71..e154508f30 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java @@ -200,7 +200,8 @@ public interface ProjectDao extends BaseDao { * 获取已转项目事件事件 * * @param customerId + * @param projectId * @return */ - List getEventList(@Param("customerId") String customerId); + List getEventList(@Param("customerId") String customerId, @Param("projectId") String projectId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 3c860e4d37..36b6600d13 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -128,7 +128,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { List projectList = projectService.getProjectInfo(customerId, dateString, projectId); factOriginProjectMainDailyService.deleteByDate(customerId, dateString,projectId); if (!CollectionUtils.isEmpty(projectList)) { - Map projectEventMap = projectService.getEventList(customerId); + Map projectEventMap = projectService.getEventList(customerId, projectId); //提取议题ID List issueIds = projectList.stream().filter(item -> ProjectConstant.ISSUE.equals(item.getOrigin())).map(ProjectDTO::getOriginId).collect(Collectors.toList()); @@ -231,7 +231,9 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } //满意度 + long start = System.currentTimeMillis(); List satisfaction = projectService.getProjectSatisfaction(customerId, projectId); + log.info("saveOriginProjectDaily 满意度 cost:{}",System.currentTimeMillis()-start); if (CollectionUtils.isNotEmpty(satisfaction)) { factOriginProjectMainDailyService.updateBatchById(satisfaction); } @@ -239,7 +241,9 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { final List mainList = list; List logList = new ArrayList<>(); //节点发起人 部门流转退回结案 + start = System.currentTimeMillis(); List processList = projectProcessService.getProcessListByCustomer(customerId, dateString, projectId); + log.info("saveOriginProjectDaily 节点发起人 部门流转退回结案 cost:{}",System.currentTimeMillis()-start); if (!CollectionUtils.isEmpty(processList)) { logList = processList.stream().map(process -> { //获取日期相关维度 @@ -291,7 +295,9 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { }).collect(Collectors.toList()); } //节点发起人 响应 + start = System.currentTimeMillis(); List responseList = projectProcessService.getResponseProcessList(customerId, dateString, projectId); + log.info("saveOriginProjectDaily 节点发起人 响应 cost:{}",System.currentTimeMillis()-start); if (!CollectionUtils.isEmpty(responseList)) { logList.addAll(responseList.stream().map(process -> { //获取日期相关维度 @@ -337,8 +343,9 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } //项目评论人 + start = System.currentTimeMillis(); List satisfactionRecordList = projectProcessService.getSatisfactionRecord(customerId, dateString, projectId); - + log.info("saveOriginProjectDaily 项目评论人 cost:{}",System.currentTimeMillis()-start); satisfactionRecordList.forEach(log -> mainList.stream().filter(project -> log.getProjectId().equals(project.getId())).forEach(main -> { //进行满意度评价的居民的所属机关的父机机关信息 log.setPid(main.getPid()); @@ -367,7 +374,9 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { //节点接收人 + start = System.currentTimeMillis(); List processStaffList = projectProcessService.getProcessStaffByCustomer(customerId, dateString, projectId); + log.info("saveOriginProjectDaily 节点接收人 cost:{}",System.currentTimeMillis()-start); logList.addAll(processStaffList.stream().map(process -> { //获取日期相关维度 DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java index 6b844a3481..87b377d39e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java @@ -202,5 +202,5 @@ public interface ProjectService extends BaseService { * @param projectId * @return */ - Map getEventList(String customerId); + Map getEventList(String customerId, String projectId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java index 990480fa2c..a9664b82e7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java @@ -243,8 +243,8 @@ public class ProjectServiceImpl extends BaseServiceImpl getEventList(String customerId) { - List list = baseDao.getEventList(customerId); + public Map getEventList(String customerId, String projectId) { + List list = baseDao.getEventList(customerId, projectId); if (org.apache.commons.collections4.CollectionUtils.isEmpty(list)) { return Collections.emptyMap(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml index 715b37f605..766636e76b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml @@ -259,6 +259,9 @@ from resi_event_report_org rero inner join resi_event re on rero.RESI_EVENT_ID = re.id and re.SHIFT_PROJECT = 1 and re.DEL_FLAG = '0' where rero.del_flag = '0' + + AND re.PROJECT_ID = #{projectId} + and rero.CUSTOMER_ID = #{customerId} From 9c99e653fff4177a06916f11aa07ead7bb254f16 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 15:40:19 +0800 Subject: [PATCH 25/38] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=BD=E5=8F=96=20=E6=97=A5=E5=BF=97=E6=8E=92=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/FactOriginExtractController.java | 4 ++++ 1 file changed, 4 insertions(+) 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 8d86caed9c..cf3ce5abf5 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 @@ -7,6 +7,7 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.service.evaluationindex.extract.todata.*; import com.epmet.service.stats.DimCustomerService; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -23,6 +24,7 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/9/15 11:06 */ +@Slf4j @RestController @RequestMapping("factorigin") public class FactOriginExtractController { @@ -95,6 +97,7 @@ public class FactOriginExtractController { @PostMapping("project") public Result projectData(@RequestBody ExtractOriginFormDTO extractOriginFormDTO) { + long start = System.currentTimeMillis(); if (StringUtils.isNotBlank(extractOriginFormDTO.getCustomerId())) { List daysBetween; if (StringUtils.isBlank(extractOriginFormDTO.getDateId())) { @@ -115,6 +118,7 @@ public class FactOriginExtractController { projectExtractService.saveOriginProjectDaily(dto); }); } + log.info("projectData end,cost:{}",System.currentTimeMillis() - start); return new Result(); } From f1333e72c7cf0941d3f67c4c323a4a8b71c355c1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 15:52:36 +0800 Subject: [PATCH 26/38] =?UTF-8?q?=E5=B1=85=E6=B0=91=E9=A2=84=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/AppointmentMiniFormDTO.java | 2 ++ .../impl/IcPartyServiceCenterServiceImpl.java | 13 ++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentMiniFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentMiniFormDTO.java index 30afc1b872..cfaf9da56a 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentMiniFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentMiniFormDTO.java @@ -53,10 +53,12 @@ public class AppointmentMiniFormDTO implements Serializable { /** * 组织ID */ + @NotBlank(message = "orgId不能为空",groups = AppointmentMiniForm.class) private String orgId; /** * 组织类型,grid:网格,agency:组织 */ + @NotBlank(message = "orgType不能为空",groups = AppointmentMiniForm.class) private String orgType; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index a2f543d0c3..d4dc851982 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -348,19 +348,10 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl registerRelation = userOpenFeignClient.resiRelationInfo(tokenDto.getUserId()); - if (!registerRelation.success()){ - throw new EpmetException(String.format("查询居民{%s}信息失败",tokenDto.getUserId())); - } IcMatterAppointmentRecordEntity e = ConvertUtils.sourceToTarget(formDTO, IcMatterAppointmentRecordEntity.class); e.setCustomerId(customerId); - if (StringUtils.isNotBlank(formDTO.getOrgId())){ - e.setOrgId(formDTO.getOrgId()); - e.setOrgType(formDTO.getOrgType()); - }else { - e.setOrgId(registerRelation.getData().getGridId()); - e.setOrgType(PartyServiceCenterConstant.ORG_TYPE_GRID); - } + e.setOrgId(formDTO.getOrgId()); + e.setOrgType(formDTO.getOrgType()); if (e.getOrgType().equals(PartyServiceCenterConstant.ORG_TYPE_GRID)){ GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(e.getOrgId()); if (null == gridInfo){ From 698b859bb852ae14673e05b61bb8c76438a4ed2c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 16:25:27 +0800 Subject: [PATCH 27/38] dbupdate --- .../src/main/java/com/epmet/redis/IssueVoteDetailRedis.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java index 79068b4124..580b6a0f76 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java @@ -262,6 +262,11 @@ public class IssueVoteDetailRedis { formDTO.setIssueId(issueId); formDTO.setGridId(issue.getGridId()); voteCache = issueVoteDetailService.selectIssueVotingDetail(formDTO); + IssueVoteStatisticalDTO dto = ConvertUtils.sourceToTarget(voteCache, IssueVoteStatisticalDTO.class); + dto.setVotableCount(voteCache.getShouldVoteCount()); + dto.setSupportCount(voteCache.getSupportAmount()); + dto.setOppositionCount(voteCache.getOppositionAmount()); + issueVoteStatisticalDao.updateBtIssueId(dto); }else { // 状态是关闭,转议题的,直接从结果表查询 voteCache = issueVoteStatisticalDao.selectVoteDetail(issueId); From 3c17877979d3c25c6c6a402e36674877eb843668 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 16:49:32 +0800 Subject: [PATCH 28/38] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=A2=84?= =?UTF-8?q?=E7=BA=A6=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/AllMattersResultDTO.java | 7 +++++++ .../dto/result/AppointmentRecordResultDTO.java | 2 ++ .../com/epmet/dao/IcPartyServiceCenterDao.java | 2 ++ .../impl/IcPartyServiceCenterServiceImpl.java | 14 ++++++++++++++ .../mapper/IcMatterAppointmentRecordDao.xml | 6 ++++-- .../resources/mapper/IcPartyServiceCenterDao.xml | 15 +++++++++++++++ 6 files changed, 44 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AllMattersResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AllMattersResultDTO.java index 59462d429b..cdd4d8d7d6 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AllMattersResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AllMattersResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -40,6 +41,12 @@ public class AllMattersResultDTO implements Serializable { private String centerName; + @JsonIgnore + private String startTime; + + @JsonIgnore + private String endTime; + public AllMattersResultDTO() { this.matterName = ""; this.allowTime = ""; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java index 4858babc52..141659b988 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java @@ -51,6 +51,8 @@ public class AppointmentRecordResultDTO implements Serializable { @JsonIgnore private String timeId; + @JsonIgnore + private String matterId; public AppointmentRecordResultDTO() { this.sort = NumConstant.ZERO; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java index ad1ff57769..065dc62906 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java @@ -59,4 +59,6 @@ public interface IcPartyServiceCenterDao extends BaseDao getAllMatters(@Param("orgId")String orgId); + List getAllMattersByOrgId(@Param("matterIds")List matterIds); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index d4dc851982..822c27d926 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -534,6 +534,20 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl allMatters = baseDao.getAllMattersByOrgId(result.stream().map(m -> m.getMatterId()).collect(Collectors.toList())); + allMatters.forEach(matter -> { + List timeList = getTimeList(matter.getStartTime(), matter.getEndTime(), NumConstant.THIRTY); + AtomicReference sort = new AtomicReference<>(NumConstant.ONE); + result.forEach(r -> { + if (r.getMatterId().equals(matter.getMatterId())){ + r.setSort(sort.getAndSet(sort.get() + NumConstant.ONE)); + List time = new ArrayList<>(); + List list = Arrays.asList(r.getTimeId().split(",")); + list.forEach(l -> timeList.stream().filter( t -> l.equals(t.getTimeId())).forEach(t -> time.add(t.getTime()))); + r.setAppointmentTime(time); + } + }); + }); return new ArrayList<>(); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml index 3709847fd8..b62a6f57d5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml @@ -21,7 +21,8 @@ ar.REMARK, ar.TIME_ID, cm.MATTER_NAME, - ar.ID AS recordId + ar.ID AS recordId, + ar.matter_id as matterId FROM ic_matter_appointment_record ar LEFT JOIN ic_party_service_center_matter cm ON (cm.ID = ar.MATTER_ID AND cm.DEL_FLAG = 0) WHERE ar.DEL_FLAG = 0 @@ -55,7 +56,8 @@ ar.TIME_ID, cm.MATTER_NAME, ar.ID AS recordId, - ar.APPOINTMENT_DATE + ar.APPOINTMENT_DATE, + ar.MATTER_ID as matterId FROM ic_matter_appointment_record ar LEFT JOIN ic_party_service_center_matter cm ON (cm.ID = ar.MATTER_ID AND cm.DEL_FLAG = 0) WHERE ar.DEL_FLAG = 0 diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml index 26fa48e448..190eb1f0d3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml @@ -102,4 +102,19 @@ WHERE sc.DEL_FLAG = 0 AND ID = #{centerId} + + + \ No newline at end of file From 5088ffa3f3e7a9cbffc5a6570f7bf6b0f8712ac9 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 17:07:04 +0800 Subject: [PATCH 29/38] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=A2=84?= =?UTF-8?q?=E7=BA=A6=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcPartyServiceCenterServiceImpl.java | 6 +++--- .../src/main/resources/mapper/IcPartyServiceCenterDao.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 822c27d926..4cd1e6dc3d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -531,8 +531,8 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl appointmentRecordMini(AppointmentRecordMiniFormDTO formDTO,TokenDto tokenDto) { List result = matterAppointmentRecordDao.appointmentRecordMini(formDTO.getGridId(), tokenDto.getUserId()); - if (CollectionUtils.isNotEmpty(result)){ - return result; + if (CollectionUtils.isEmpty(result)){ + return new ArrayList<>(); } List allMatters = baseDao.getAllMattersByOrgId(result.stream().map(m -> m.getMatterId()).collect(Collectors.toList())); allMatters.forEach(matter -> { @@ -548,7 +548,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl(); + return result; } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml index 190eb1f0d3..97f5e43cbf 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml @@ -111,7 +111,7 @@ cm.end_time FROM ic_party_service_center_matter cm where cm.DEL_FLAG = 0 - AND cm.MATTER_ID in ( + AND cm.ID in ( #{m} From 7a88c5ac39249d3e29dcf670bcad1b07d440f8be Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 30 Dec 2021 17:23:57 +0800 Subject: [PATCH 30/38] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8A=BD=E5=8F=96?= =?UTF-8?q?=E6=95=88=E7=8E=87=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ProjectExtractServiceImpl.java | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 3c860e4d37..5ee0d941bd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -127,17 +127,30 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { //获取项目信息 List projectList = projectService.getProjectInfo(customerId, dateString, projectId); factOriginProjectMainDailyService.deleteByDate(customerId, dateString,projectId); + List issueList = new ArrayList<>(); + List topicList = new ArrayList<>(); if (!CollectionUtils.isEmpty(projectList)) { Map projectEventMap = projectService.getEventList(customerId); //提取议题ID List issueIds = projectList.stream().filter(item -> ProjectConstant.ISSUE.equals(item.getOrigin())).map(ProjectDTO::getOriginId).collect(Collectors.toList()); - //获取议题信息 - List issueList = issueService.getIssueInfoByIds(issueIds); - //提取话题ID - List topicIds = issueList.stream().map(IssueDTO::getSourceId).collect(Collectors.toList()); - //获取话题信息 - List topicList = topicService.getTopicByIds(topicIds); + if(CollectionUtils.isNotEmpty(issueIds)) { + //批次数量 + int batchCount = 200; + //获取议题信息 + + for (int i = 0; i < issueIds.size(); i += batchCount) { + int lastIndex = Math.min(i + batchCount, issueIds.size()); + issueList.addAll(issueService.getIssueInfoByIds(issueIds.subList(i, lastIndex))); + } + //提取话题ID + List topicIds = issueList.stream().map(IssueDTO::getSourceId).collect(Collectors.toList()); + //获取话题信息 + for (int i = 0; i < topicIds.size(); i += batchCount) { + int lastIndex = Math.min(i + batchCount, topicIds.size()); + topicList.addAll(topicService.getTopicByIds(topicIds.subList(i, lastIndex))); + } + } //获取网格认证党员 List partyMemberList = partyMemberService.getPartyMemberByCustomer(customerId); //生成DTO From aaa6d179e44fe386024b90bd4fe8ae4c2e9c0088 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 17:39:28 +0800 Subject: [PATCH 31/38] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ProjectExtractServiceImpl.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 5ee0d941bd..6db4bc6c4c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -38,6 +38,7 @@ import com.epmet.util.DimIdGenerator; import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -134,21 +135,17 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { //提取议题ID List issueIds = projectList.stream().filter(item -> ProjectConstant.ISSUE.equals(item.getOrigin())).map(ProjectDTO::getOriginId).collect(Collectors.toList()); - if(CollectionUtils.isNotEmpty(issueIds)) { - //批次数量 - int batchCount = 200; + if (CollectionUtils.isNotEmpty(issueIds)) { + //分批次获取 //获取议题信息 - - for (int i = 0; i < issueIds.size(); i += batchCount) { - int lastIndex = Math.min(i + batchCount, issueIds.size()); - issueList.addAll(issueService.getIssueInfoByIds(issueIds.subList(i, lastIndex))); - } + List> partition = ListUtils.partition(issueIds, NumConstant.FIFTY); + partition.forEach(part -> issueList.addAll(issueService.getIssueInfoByIds(part))); //提取话题ID List topicIds = issueList.stream().map(IssueDTO::getSourceId).collect(Collectors.toList()); - //获取话题信息 - for (int i = 0; i < topicIds.size(); i += batchCount) { - int lastIndex = Math.min(i + batchCount, topicIds.size()); - topicList.addAll(topicService.getTopicByIds(topicIds.subList(i, lastIndex))); + if (CollectionUtils.isNotEmpty(topicIds)) { + //获取话题信息 + List> topicPart = ListUtils.partition(topicIds, NumConstant.FIFTY); + topicPart.forEach(part -> topicList.addAll(topicService.getTopicByIds(part))); } } //获取网格认证党员 From fdceeece40d827082e991b069a40c23a15233793 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 30 Dec 2021 17:40:24 +0800 Subject: [PATCH 32/38] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=201.=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=BF=97=E6=84=BF=E8=80=85=E4=BF=A1=E6=81=AF=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=EF=BC=8C=E5=BC=82=E6=AD=A5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/EpmetHeartOpenFeignClient.java | 8 + .../EpmetHeartOpenFeignClientFallback.java | 5 + .../controller/ResiVolunteerController.java | 14 + .../epmet/service/VolunteerInfoService.java | 7 + .../impl/VolunteerInfoServiceImpl.java | 7 + .../service/impl/VolunteerServiceImpl.java | 241 ++++++++++-------- 6 files changed, 172 insertions(+), 110 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index 4bad8f25d7..b75ac8e39b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -66,4 +66,12 @@ public interface EpmetHeartOpenFeignClient { */ @PostMapping("/heart/resi/volunteer/page") Result> queryVolunteerPage(@RequestBody VolunteerCommonFormDTO input); + + /** + * 查询志愿者数量 + * @param input + * @return + */ + @PostMapping("/heart/resi/volunteer/count") + Result getVolunteerCount(@RequestBody VolunteerCommonFormDTO input); } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index 27c2c9bdc8..5271fb57e0 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -60,4 +60,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result> queryVolunteerPage(VolunteerCommonFormDTO input) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "queryVolunteerPage", input); } + + @Override + public Result getVolunteerCount(VolunteerCommonFormDTO input) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getVolunteerCount", input); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java index e1d18e5536..6205fb524a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java @@ -144,4 +144,18 @@ public class ResiVolunteerController { List l = volunteerInfoService.queryVolunteerPage(customerId, pageNo, pageSize); return new Result>().ok(l); } + + /** + * 查询志愿者数量 + * @param input + * @return + */ + @PostMapping("count") + public Result getVolunteerCount(@RequestBody VolunteerCommonFormDTO input) { + ValidatorUtils.validateEntity(input, VolunteerCommonFormDTO.VolunteerPage.class); + String customerId = input.getCustomerId(); + + Integer volunteerCount = volunteerInfoService.getVolunteerCount(customerId); + return new Result().ok(volunteerCount); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java index 6a84fb67a1..4fa082f5e3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java @@ -97,4 +97,11 @@ public interface VolunteerInfoService extends BaseService { List queryListVolunteer(String customerId,String userRealName); List queryVolunteerPage(String customerId, Integer pageNo, Integer pageSize); + + /** + * 查询志愿者数量 + * @param customerId + * @return + */ + Integer getVolunteerCount(String customerId); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index ac87cc6b4c..9d1e7a9240 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -278,4 +278,11 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl query = new LambdaQueryWrapper<>(); + query.eq(VolunteerInfoEntity::getCustomerId, customerId); + return baseDao.selectCount(query); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java index 2d5e776c8f..238b70cc41 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.service.impl; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.dao.IcResiUserDao; import com.epmet.dao.UserBaseInfoDao; @@ -16,7 +17,6 @@ import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.service.VolunteerService; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -24,6 +24,8 @@ import org.springframework.stereotype.Service; import com.google.common.collect.Lists; import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; import java.util.stream.Collectors; /** @@ -94,135 +96,154 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve * @return */ public VolunteerDistributionResultDTO getVolunteerDistribution(String customerId) { - //epmetHeartOpenFeignClient.queryVolunteerPage() + VolunteerDistributionResultDTO r = new VolunteerDistributionResultDTO(); + + // 1.==========分页查询出所有志愿者列表========== + + String vcErrorMsg = "【志愿者分布】查询志愿者总数出错"; + VolunteerCommonFormDTO volunteerCountForm = new VolunteerCommonFormDTO(); + volunteerCountForm.setCustomerId(customerId); + Integer volunteerCount = getResultDataOrThrowsException(epmetHeartOpenFeignClient.getVolunteerCount(volunteerCountForm), + ServiceConstant.EPMET_HEART_SERVER, + EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), + vcErrorMsg, + vcErrorMsg); + + if (volunteerCount == null || volunteerCount == 0) { + // 没得志愿者,直接返回 + return r; + } - // 1.分页查询出所有志愿者列表 - int pageNo = 1; + // 计算页数 int pageSize = 200; + int pageCount = volunteerCount / pageSize; + int lastPageItems = volunteerCount % pageSize; + pageCount = lastPageItems > 0 ? ++pageCount : pageCount; - // 志愿者epmet user id + // 志愿者epmet user id 集合 List volunteerEpmetUserIds = new ArrayList<>(); // 分页查询志愿者的epmet user id - while (true) { - - VolunteerCommonFormDTO volunteerForm = new VolunteerCommonFormDTO(); - volunteerForm.setCustomerId(customerId); - volunteerForm.setPageNo(pageNo); - volunteerForm.setPageSize(pageSize); - - String errorMsg = "【志愿者分布】分页查询志愿者列表失败"; - List volunteerPage = getResultDataOrThrowsException(epmetHeartOpenFeignClient.queryVolunteerPage(volunteerForm), - ServiceConstant.EPMET_HEART_SERVER, - EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), - errorMsg, - errorMsg); - - // 将本页userId添加到总集中去 - volunteerEpmetUserIds.addAll(volunteerPage.stream().map(v -> v.getUserId()).collect(Collectors.toSet())); - - if (volunteerPage.size() < pageSize) { - // 说明是最后一页了 - break; - } - - pageNo++; + List>> volsPageFutures = new ArrayList<>(); + + for (int pageNo = 1 ; pageNo <= pageCount ; pageNo ++) { + + int pageNoTemp = pageNo; + CompletableFuture> future = CompletableFuture.supplyAsync(() -> { + return listVolunteersByPage(customerId, pageNoTemp, pageSize) + .stream() + .map(v -> v.getUserId()) + .collect(Collectors.toSet()); + }); + + volsPageFutures.add(future); } - - VolunteerDistributionResultDTO r = new VolunteerDistributionResultDTO(); - + // 阻塞,等待子线程返回结果,然后添加到志愿者userId集合中去 + for (CompletableFuture> future : volsPageFutures) { + try { + volunteerEpmetUserIds.addAll(future.get()); + } catch (InterruptedException e) { + log.error("【志愿者分布】异步获取志愿者userId列表被中断:{}", ExceptionUtils.getErrorStackTrace(e)); + } catch (ExecutionException e) { + log.error("【志愿者分布】异步获取志愿者userId列表失败:{}", ExceptionUtils.getErrorStackTrace(e)); + } + } + log.info("【志愿者分布】查询到志愿者userId公{}个", volunteerEpmetUserIds.size()); - // 2.填充ic居民信息 + // 2.==========异步填充ic居民信息========== + List>> volResiInfoFutures = new ArrayList<>(); + + // 将所有的userId按100固定分割成多个部分,循环用每个部分去查询,然后填充 List> volunteerEpmetUserIdParts = Lists.partition(volunteerEpmetUserIds, 100); - for (List volunteerEpmetUserIdPart : volunteerEpmetUserIdParts) { - List icResiInfos = icResiUserDao.listIcResiInfosByUserIds(volunteerEpmetUserIdPart); + for (List volunteerEpmetUserIdPart : volunteerEpmetUserIdParts) { - // 填充志愿者类型 - for (VolunteerDistributionResultDTO.Distribution icResiInfo : icResiInfos) { - // 将志愿者类型列表字符串,切割放到set中 - Set volunteerTypes = new HashSet(); - String volunteerCategoriesStr = icResiInfo.getVolunteerCategoriesStr(); - - if (StringUtils.isNotEmpty(volunteerCategoriesStr)) { - String[] vTypes = volunteerCategoriesStr.split(","); - if (vTypes != null && vTypes.length > 0) { - volunteerTypes.addAll(Arrays.asList(vTypes)); - } - icResiInfo.setVolunteerCategories(volunteerTypes); - } else { - icResiInfo.setVolunteerCategories(new HashSet<>()); - } + log.info("【志愿者分布】查询ic居民信息,切割后,本组的userId个数:{}", volunteerEpmetUserIdPart.size()); - // 填充建筑坐标 - String msg = "【志愿者分布】查询楼栋信息失败"; - IcBuildingDTO building = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingById(icResiInfo.getBuildingId()), - ServiceConstant.GOV_ORG_SERVER, - EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + CompletableFuture> future = CompletableFuture.supplyAsync(() -> { + return listIcResiInfosByUserIds(volunteerEpmetUserIdPart); + }); - icResiInfo.setEpmetUserId(icResiInfo.getEpmetUserId()); - icResiInfo.setIcResiUserId(icResiInfo.getIcResiUserId()); - Optional.of(building).ifPresent(b -> { - icResiInfo.setLongitude(b.getLongitude()); - icResiInfo.setLatitude(b.getLatitude()); - }); + volResiInfoFutures.add(future); + } + // 阻塞的,获取各个子线程计算结果 + for (CompletableFuture> volResiInfoFuture : volResiInfoFutures) { + try { + List distributions = volResiInfoFuture.get(); + r.getDistributions().addAll(distributions); + } catch (InterruptedException e) { + log.error("【志愿者分布】异步获取志愿者的居民信息被中断:{}", ExceptionUtils.getErrorStackTrace(e)); + } catch (ExecutionException e) { + log.error("【志愿者分布】异步获取志愿者的居民信息失败:{}", ExceptionUtils.getErrorStackTrace(e)); } - r.getDistributions().addAll(icResiInfos); } - - // 就有代码,稳定之后可以删掉 - //for (String volunteerEpmetUserId : volunteerEpmetUserIds) { - // - // VolunteerDistributionResultDTO.Distribution distribution = new VolunteerDistributionResultDTO.Distribution(); - // - // ResiUserBaseInfoResultDTO userBaseInfo = userBaseInfoDao.selecUserBaseInfoByUserId(volunteerEpmetUserId); - // if (userBaseInfo == null || StringUtils.isBlank(userBaseInfo.getIdNum())){ - // log.warn("getVolunteerDistribution selecUserBaseInfoByUserId return null or idCard is null,volunteerEpmetUserId:{}", volunteerEpmetUserId); - // continue; - // } - // //使用身份证号查询ic resi信息 - // IcResiUserDTO icResiUserInfo = icResiUserDao.selectIdByIdCard(customerId, userBaseInfo.getIdNum(), null); - // if (icResiUserInfo == null) { - // continue; - // } - // - // // 查询志愿者类别 - // List volunteerCategories = icResiUserDao.selectVolunteerByUserId(icResiUserInfo.getId()); - // //if (CollectionUtils.isEmpty(volunteerCategories)) { - // // // 此人没有志愿者信息 - // // continue; - // //} - // - // // 将志愿者类型列表字符串,切割放到set中 - // Set volunteerTypes = new HashSet(); - // for (String vTypesString : volunteerCategories) { - // String[] vTypes = vTypesString.split(","); - // if (vTypes != null && vTypes.length > 0) { - // volunteerTypes.addAll(Arrays.asList(vTypes)); - // } - // } - // - // - // String msg = "【志愿者分布】查询楼栋信息失败"; - // IcBuildingDTO building = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingById(icResiUserInfo.getBuildId()), - // ServiceConstant.GOV_ORG_SERVER, - // EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); - // - // distribution.setVolunteerCategories(volunteerTypes); - // distribution.setEpmetUserId(userBaseInfo.getUserId()); - // distribution.setIcResiUserId(icResiUserInfo.getId()); - // Optional.of(building).ifPresent(b -> { - // distribution.setLongitude(b.getLongitude()); - // distribution.setLatitude(b.getLatitude()); - // }); - // - // r.getDistributions().add(distribution); - //} return r; } + /** + * userId列表批量获取他们对应的志愿者信息 + * @param volunteerEpmetUserIdPart + * @return + */ + private List listIcResiInfosByUserIds(List volunteerEpmetUserIdPart) { + List icResiInfos = icResiUserDao.listIcResiInfosByUserIds(volunteerEpmetUserIdPart); + + // 填充志愿者类型 + for (VolunteerDistributionResultDTO.Distribution icResiInfo : icResiInfos) { + // 将志愿者类型列表字符串,切割放到set中 + Set volunteerTypes = new HashSet(); + String volunteerCategoriesStr = icResiInfo.getVolunteerCategoriesStr(); + + if (StringUtils.isNotEmpty(volunteerCategoriesStr)) { + String[] vTypes = volunteerCategoriesStr.split(","); + if (vTypes != null && vTypes.length > 0) { + volunteerTypes.addAll(Arrays.asList(vTypes)); + } + icResiInfo.setVolunteerCategories(volunteerTypes); + } else { + icResiInfo.setVolunteerCategories(new HashSet<>()); + } + + // 填充建筑坐标 + String msg = "【志愿者分布】查询楼栋信息失败"; + IcBuildingDTO building = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingById(icResiInfo.getBuildingId()), + ServiceConstant.GOV_ORG_SERVER, + EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + + icResiInfo.setEpmetUserId(icResiInfo.getEpmetUserId()); + icResiInfo.setIcResiUserId(icResiInfo.getIcResiUserId()); + Optional.of(building).ifPresent(b -> { + icResiInfo.setLongitude(b.getLongitude()); + icResiInfo.setLatitude(b.getLatitude()); + }); + + } + + return icResiInfos; + } + + /** + * 分页查询志愿者列表 + * @param customerId + * @param pageNo + * @param pageSize + * @return + */ + private List listVolunteersByPage(String customerId, Integer pageNo, Integer pageSize) { + VolunteerCommonFormDTO volunteerForm = new VolunteerCommonFormDTO(); + volunteerForm.setCustomerId(customerId); + volunteerForm.setPageNo(pageNo); + volunteerForm.setPageSize(pageSize); + + String errorMsg = "【志愿者分布】分页查询志愿者列表失败"; + return getResultDataOrThrowsException(epmetHeartOpenFeignClient.queryVolunteerPage(volunteerForm), + ServiceConstant.EPMET_HEART_SERVER, + EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), + errorMsg, + errorMsg); + } } From e99b34a4d1725e1fe708083140e2ba553615a8c5 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 18:27:12 +0800 Subject: [PATCH 33/38] =?UTF-8?q?=E5=AD=98=E4=B8=AA=E5=8D=8A=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=E5=90=A7=20=E8=AE=A9=E4=BB=96=E8=BF=9E=E7=BB=AD?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=97=B6=20=E5=88=AB=E5=86=8D=E9=80=A0?= =?UTF-8?q?=E6=88=91=E7=9A=84=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/CustomerAgencyServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index a1024cead5..a6972b1dcc 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -1133,7 +1133,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl Date: Fri, 31 Dec 2021 09:20:00 +0800 Subject: [PATCH 34/38] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E3=80=90=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/AppointmentRecordResultDTO.java | 2 ++ .../main/resources/mapper/IcMatterAppointmentRecordDao.xml | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java index 141659b988..c3024a6bbb 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java @@ -41,6 +41,8 @@ public class AppointmentRecordResultDTO implements Serializable { private String remark; private String recordId; + private String centerName; + private String address; /** * 预约时间 diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml index b62a6f57d5..4270ac8b44 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml @@ -57,9 +57,12 @@ cm.MATTER_NAME, ar.ID AS recordId, ar.APPOINTMENT_DATE, - ar.MATTER_ID as matterId + ar.MATTER_ID as matterId, + c.CENTER_NAME, + c.ADDRESS FROM ic_matter_appointment_record ar LEFT JOIN ic_party_service_center_matter cm ON (cm.ID = ar.MATTER_ID AND cm.DEL_FLAG = 0) + LEFT JOIN ic_party_service_center c ON (c.ID = cm.PARTY_SERVICE_CENTER_ID AND c.DEL_FLAG = 0) WHERE ar.DEL_FLAG = 0 AND ar.ORG_ID = #{orgId} AND ar.CREATED_BY = #{userId} From 70db8dec1788fa0ab1274f6ea7a4482504f1a7ad Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 31 Dec 2021 10:16:17 +0800 Subject: [PATCH 35/38] =?UTF-8?q?=E6=B2=A1=E6=AF=9B=E7=97=85=EF=BC=8C?= =?UTF-8?q?=E5=B0=B1=E6=98=AF=E8=BF=94=E5=9B=9Enull,=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E6=98=AF=E5=BD=93=E6=97=B6=E7=BA=A6=E5=AE=9A=E5=A5=BD=E7=9A=84?= =?UTF-8?q?=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/VolunteerInfoServiceImpl.java | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index 8fe4ff348d..b973a249a1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -24,10 +24,8 @@ import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.StrConstant; -import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; -import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; @@ -38,7 +36,6 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.SendMqMsgUtils; import com.epmet.constant.SmsTemplateConstant; import com.epmet.constant.SystemMessageType; import com.epmet.dao.VolunteerInfoDao; @@ -46,11 +43,7 @@ import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.HeartUserInfoDTO; import com.epmet.dto.VolunteerInfoDTO; -import com.epmet.dto.form.CommonCustomerFormDTO; -import com.epmet.dto.form.CustomerGridFormDTO; -import com.epmet.dto.form.SendVerificationCodeFormDTO; -import com.epmet.dto.form.VolunteerRegResiFormDTO; -import com.epmet.dto.form.SystemMsgFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO; import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO; import com.epmet.dto.result.ResiUserBaseInfoResultDTO; @@ -74,11 +67,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Optional; +import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -234,15 +223,15 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl NumConstant.ZERO){ - // 获取志愿者信息 - VolunteerInfoDTO dto = baseDao.selectVolunteerInfoByUserId(tokenDto.getUserId()); + // 获取志愿者信息 + // Integer volunteerFlag = baseDao.queryVolunteerFlagByUserId(tokenDto.getUserId()); + VolunteerInfoDTO dto = baseDao.selectVolunteerInfoByUserId(tokenDto.getUserId()); + if (null!=dto){ resultDTO.setVolunteerIntroduce(dto.getVolunteerIntroduce() == null ? "" : dto.getVolunteerIntroduce()); resultDTO.setVolunteerSignature(dto.getVolunteerSignature() == null ? "" : dto.getVolunteerSignature()); // 遗留数据处理,如果表中数据为空,一律返回null,前端重新获取 网格信息 resultDTO.setGridId( "".equals(dto.getGridId()) ? null : dto.getGridId()); - resultDTO.setGridName( "".equals(dto.getGridName()) ? null : dto.getGridName()); + resultDTO.setGridName( "".equals(dto.getGridName()) ? null : dto.getGridName()); } } else { logger.error("获取用户基本信息失败"); From 876614fc2c5bf531c97b23660cdf5b166f435855 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 31 Dec 2021 11:00:27 +0800 Subject: [PATCH 36/38] =?UTF-8?q?=E5=90=88=E5=B9=B6dev=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E4=B8=94=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/feign/EpmetHeartOpenFeignClient.java | 2 +- .../fallback/EpmetHeartOpenFeignClientFallback.java | 2 +- .../epmet/controller/ResiVolunteerController.java | 4 ++-- .../java/com/epmet/service/VolunteerInfoService.java | 2 +- .../epmet/service/impl/VolunteerInfoServiceImpl.java | 12 ++++++++++-- .../java/com/epmet/task/AutoEvaluateDemandTask.java | 2 +- .../com/epmet/service/impl/VolunteerServiceImpl.java | 1 + 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index fa1010d5be..ffce4482d0 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -74,7 +74,7 @@ public interface EpmetHeartOpenFeignClient { * @return */ @PostMapping("/heart/residemand/autoevaluate") - Result AutoEvaluateDemand(@RequestBody AutoEvaluateDemandFormDTO formDTO); + Result autoEvaluateDemand(@RequestBody AutoEvaluateDemandFormDTO formDTO); /** * 查询志愿者数量 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index 3f1b877e63..db83d85a27 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -68,7 +68,7 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli * @return */ @Override - public Result AutoEvaluateDemand(AutoEvaluateDemandFormDTO formDTO) { + public Result autoEvaluateDemand(AutoEvaluateDemandFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "autoEvaluate",formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java index f9467f995b..ed5609eed3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java @@ -153,10 +153,10 @@ public class ResiVolunteerController { */ @PostMapping("count") public Result getVolunteerCount(@RequestBody VolunteerCommonFormDTO input) { - ValidatorUtils.validateEntity(input, VolunteerCommonFormDTO.VolunteerPage.class); String customerId = input.getCustomerId(); + String pidsPrefix = input.getSuperiorAgencyId(); - Integer volunteerCount = volunteerInfoService.getVolunteerCount(customerId); + Integer volunteerCount = volunteerInfoService.getVolunteerCount(customerId, pidsPrefix); return new Result().ok(volunteerCount); } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java index 6f7f26df7b..adf45e6437 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java @@ -102,5 +102,5 @@ public interface VolunteerInfoService extends BaseService { * @param customerId * @return */ - Integer getVolunteerCount(String customerId); + Integer getVolunteerCount(String customerId, String pidsPrefix); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index 408627e3ae..0713d4bfdd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -385,9 +385,17 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl query = new LambdaQueryWrapper<>(); - query.eq(VolunteerInfoEntity::getCustomerId, customerId); + + Optional.ofNullable(customerId).ifPresent((cId) -> { + query.eq(VolunteerInfoEntity::getCustomerId, cId); + }); + + Optional.ofNullable(pidsPrefix).ifPresent((pidsPrefixt) -> { + query.likeRight(VolunteerInfoEntity::getPids, pidsPrefixt); + }); + return baseDao.selectCount(query); } } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluateDemandTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluateDemandTask.java index c1ce071d0e..23d5d34787 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluateDemandTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluateDemandTask.java @@ -26,6 +26,6 @@ public class AutoEvaluateDemandTask implements ITask { if (StringUtils.isNotBlank(params)) { formDTO = JSON.parseObject(params, AutoEvaluateDemandFormDTO.class); } - Result result = heartOpenFeignClient.AutoEvaluateDemand(formDTO); + Result result = heartOpenFeignClient.autoEvaluateDemand(formDTO); } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java index 2eed9f1d3f..9aa05b6b27 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java @@ -103,6 +103,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve String vcErrorMsg = "【志愿者分布】查询志愿者总数出错"; VolunteerCommonFormDTO volunteerCountForm = new VolunteerCommonFormDTO(); volunteerCountForm.setCustomerId(customerId); + volunteerCountForm.setSuperiorAgencyId(agencyId); Integer volunteerCount = getResultDataOrThrowsException(epmetHeartOpenFeignClient.getVolunteerCount(volunteerCountForm), ServiceConstant.EPMET_HEART_SERVER, EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), From 3987c54b0358b3988d56b25220e10767d1326b7a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 31 Dec 2021 15:31:01 +0800 Subject: [PATCH 37/38] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E8=A1=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.9__add_data_type.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql new file mode 100644 index 0000000000..a852a3bef7 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql @@ -0,0 +1,10 @@ +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000012', 'grid_type', '网格类型', '', '12', '1067246875800000001', '2021-12-21 16:29:58', '1067246875800000001', '2021-12-21 16:29:58'); + +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000300', '1000000000000000012', '党政机关', '0', '0', '', '0', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000301', '1000000000000000012', '企业', '1', '0', '', '0', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000302', '1000000000000000012', '园区', '2', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000303', '1000000000000000012', '商圈', '3', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000304', '1000000000000000012', '市场', '4', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000305', '1000000000000000012', '景区', '5', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000306', '1000000000000000012', '医院', '6', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000307', '1000000000000000012', '学校', '7', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); From e8396c2f5d6d83b4efef3a77a354e33aad9efc6f Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 31 Dec 2021 16:23:08 +0800 Subject: [PATCH 38/38] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.9__add_data_type.sql | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql index a852a3bef7..d4aebf1828 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql @@ -1,10 +1,10 @@ -INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000012', 'grid_type', '网格类型', '', '12', '1067246875800000001', '2021-12-21 16:29:58', '1067246875800000001', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000012', 'grid_type', '网格类型', '', 12, 0, 0, '', '2021-12-23 18:23:27', '', '2021-12-23 18:23:27'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000300', '1000000000000000012', '党政机关', '0', '0', '', '0', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000301', '1000000000000000012', '企业', '1', '0', '', '0', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000302', '1000000000000000012', '园区', '2', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000303', '1000000000000000012', '商圈', '3', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000304', '1000000000000000012', '市场', '4', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000305', '1000000000000000012', '景区', '5', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000306', '1000000000000000012', '医院', '6', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000307', '1000000000000000012', '学校', '7', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000300', 1000000000000000012, '党政机关', '0', '0', '', 0, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000301', 1000000000000000012, '企业', '1', '0', '', 0, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000302', 1000000000000000012, '园区', '2', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000303', 1000000000000000012, '商圈', '3', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000304', 1000000000000000012, '市场', '4', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000305', 1000000000000000012, '景区', '5', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000306', 1000000000000000012, '医院', '6', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000307', 1000000000000000012, '学校', '7', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18');