From 062e9c812223db2fcaa5c5b6e5276752c6005203 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 25 Jun 2021 17:56:22 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=87=E6=B3=A8=20?= =?UTF-8?q?=E4=B8=BA=E4=BB=80=E4=B9=88=E5=86=85=E5=AD=98=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/epmetuser/impl/EpmetUserServiceImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java index 2ebc6b4613..175525d16d 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java @@ -7,7 +7,6 @@ import com.epmet.dataaggre.constant.DataSourceConstant; import com.epmet.dataaggre.dao.epmetuser.StaffPatrolRecordDao; import com.epmet.dataaggre.dao.epmetuser.StaffRoleDao; import com.epmet.dataaggre.dao.epmetuser.UserBaseInfoDao; -import com.epmet.dataaggre.dto.datastats.result.SubAgencyUserResultDTO; import com.epmet.dataaggre.dto.epmetuser.StaffPatrolDetailDTO; import com.epmet.dataaggre.dto.epmetuser.StaffPatrolRecordDTO; import com.epmet.dataaggre.dto.epmetuser.form.PatrolDateListFormDTO; @@ -21,9 +20,7 @@ import com.epmet.dataaggre.service.epmetuser.StaffPatrolDetailService; import com.epmet.dataaggre.service.epmetuser.StaffPatrolRecordService; import com.epmet.dataaggre.service.govorg.GovOrgService; import lombok.extern.slf4j.Slf4j; -import oracle.sql.NUMBER; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -78,6 +75,7 @@ public class EpmetUserServiceImpl implements EpmetUserService { /** * @Param formDTO * @Description 001、各人员巡查记录列表查询 + * @remark 因为是yi以人为单位的数据 所以要内存分页 * @author sun */ @Override From 458aacf733c4747a7669dbf465b5f1a89b6db9be Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 28 Jun 2021 14:01:50 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=B0=83=E8=AF=95=EF=BC=9A=E8=B7=A8?= =?UTF-8?q?=E5=9F=9F=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java b/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java index 0349eaac8d..bb95213c1f 100644 --- a/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java +++ b/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java @@ -137,6 +137,10 @@ class EpmetWebFilter implements WebFilter, ResultDataResolver { } List accessControlAllowOrigins = configMap.get(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN); + + logger.info("accessControlAllowOrigins:" + accessControlAllowOrigins); + logger.info("origin:" + origin); + if (CollectionUtils.isEmpty(accessControlAllowOrigins)) { return false; } From 367e1b2ead0bc23411de4f4e0afca419d5da8334 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 28 Jun 2021 15:45:40 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E8=A7=84=E5=88=99=20=E6=96=B9=E6=B3=95=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=BAget=20=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/InitPointRuleResultDTO.java | 4 ++- .../feign/EpmetPointOpenFeignClient.java | 2 +- .../EpmetPointOpenFeignClientFallback.java | 5 ++-- .../epmet/controller/BackDoorController.java | 13 ++++----- .../com/epmet/service/PointRuleService.java | 4 +-- .../service/impl/PointRuleServiceImpl.java | 29 ++++++++++++------- .../service/impl/CustomerServiceImpl.java | 2 +- 7 files changed, 34 insertions(+), 25 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/InitPointRuleResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/InitPointRuleResultDTO.java index 4f486cba66..205b69db19 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/InitPointRuleResultDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/InitPointRuleResultDTO.java @@ -42,4 +42,6 @@ public class InitPointRuleResultDTO implements Serializable { * 已经初始化总数 */ private Integer initedTotal; -} \ No newline at end of file + + private String InitedDetail; +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java index 55d2970a5e..8093ad3fee 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java @@ -36,7 +36,7 @@ public interface EpmetPointOpenFeignClient { * @author sun **/ @PostMapping("/point/opback/initpointrule") - Result initPointRule(); + Result initPointRule(String customerId); /** * 获取小组积分 diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java index a54f0b5eab..04e953edc9 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java @@ -10,6 +10,7 @@ import com.epmet.dto.form.GroupPointFormDTO; import com.epmet.dto.result.ResiPointDetailResultDTO; import com.epmet.feign.EpmetPointOpenFeignClient; import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.RequestParam; /** * @Description @@ -25,8 +26,8 @@ public class EpmetPointOpenFeignClientFallback implements EpmetPointOpenFeignCli } @Override - public Result initPointRule() { - return ModuleUtils.feignConError(ServiceConstant.EPMET_POINT_SERVER, "initPointRule"); + public Result initPointRule(@RequestParam String customerId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_POINT_SERVER, "initPointRule",customerId); } /** diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/BackDoorController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/BackDoorController.java index cbbbbeebf5..047ae55ce6 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/BackDoorController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/BackDoorController.java @@ -9,10 +9,7 @@ import com.epmet.dto.InitPointRuleResultDTO; import com.epmet.dto.form.PointRuleFormDTO; import com.epmet.service.PointRuleService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -44,12 +41,12 @@ public class BackDoorController { /** * desc:批量添加规则 * - * @param list + * @param customerId * @return */ - @PostMapping(value = "initpointrule") - public Result initPointRule() { - InitPointRuleResultDTO resultDTO = pointRuleService.initPointRule(); + @GetMapping(value = "initpointrule") + public Result initPointRule(@RequestParam(required = false) String customerId) { + InitPointRuleResultDTO resultDTO = pointRuleService.initPointRule(customerId); return new Result().ok(resultDTO); } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java index cd39750f34..101261fe55 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java @@ -69,7 +69,7 @@ public interface PointRuleService extends BaseService { **/ PointRuleEntity getByEventCodeAndCustomerId(String customerId,String eventCode); - InitPointRuleResultDTO initPointRule(); + InitPointRuleResultDTO initPointRule(String customerId); /** * 获取小组积分规则 @@ -79,4 +79,4 @@ public interface PointRuleService extends BaseService { * @return com.epmet.dto.result.GroupPointRuleResultDTO */ GroupPointRuleResultDTO getGroupRule(String customerId); -} \ No newline at end of file +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java index 2e31394868..de0f13ac4d 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java @@ -16,7 +16,6 @@ */ package com.epmet.service.impl; - import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.common.enu.PointUnitEnum; @@ -196,14 +195,23 @@ public class PointRuleServiceImpl extends BaseServiceImpl> customerListResult = operCrmOpenFeignClient.getAllCustomerList(); - log.info("initPointRule operCrmOpenFeignClient.getAllCustomerList result:{}",JSON.toJSONString(customerListResult)); - if (!customerListResult.success() || CollectionUtils.isEmpty(customerListResult.getData())) { - throw new RenException("获取所有客户列表失败"); + List customerDTOList = null; + if (StringUtils.isBlank(customerId)){ + Result> customerListResult = operCrmOpenFeignClient.getAllCustomerList(); + log.info("initPointRule operCrmOpenFeignClient.getAllCustomerList result:{}",JSON.toJSONString(customerListResult)); + if (!customerListResult.success() || CollectionUtils.isEmpty(customerListResult.getData())) { + throw new RenException("获取所有客户列表失败"); + } + customerDTOList = customerListResult.getData(); + }else{ + customerDTOList = new ArrayList<>(); + CustomerDTO customerDTO = new CustomerDTO(); + customerDTO.setId(customerId); + customerDTOList.add(customerDTO); } - List customerDTOList = customerListResult.getData(); + //获取默认规则列表 List ruleDefaultEntities = pointRuleDefaultDao.selectList(null); if (CollectionUtils.isEmpty(ruleDefaultEntities)) { @@ -221,7 +229,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl> customerRuleMap = customerRule.stream().collect(Collectors.groupingBy(PointRuleEntity :: getCustomerId)); - customerRuleMap.forEach((customerId,ruleList) -> { + customerRuleMap.forEach((cId,ruleList) -> { if(null != ruleList){ List event = new LinkedList<>(defaultEventCodeList); //取差集,event只剩下当前客户没有的积分规则 @@ -234,7 +242,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl resultPoint = epmetPointOpenFeignClient.initPointRule(); + Result resultPoint = epmetPointOpenFeignClient.initPointRule(formDTO.getCustomerId()); if (!resultPoint.success()) { throw new RenException(resultPoint.getCode(), resultPoint.getInternalMsg()); } From 5a1c83e59c489a3cd8de2d58986f33d35f66ade6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 28 Jun 2021 15:50:52 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E7=BE=A4=E4=BC=97=E4=B8=8D=E6=BB=A1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.20__add_satisfaction_score.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.20__add_satisfaction_score.sql diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.20__add_satisfaction_score.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.20__add_satisfaction_score.sql new file mode 100644 index 0000000000..7bc2a498dc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.20__add_satisfaction_score.sql @@ -0,0 +1,2 @@ +-- epmet_evaluation_index库执行以下sql: 增加群众不满得分 +alter table screen_project_data add COLUMN `SATISFACTION_SCORE` decimal(10,6) DEFAULT NULL COMMENT '满意度得分' AFTER LATITUDE; From 17b98c4090ed95102859f3d5fefd07f9c5b60ae3 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 29 Jun 2021 10:05:39 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=B2=BB=E7=90=86=E6=8C=87=E6=95=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datastats/impl/DataStatsServiceImpl.java | 10 +++++----- .../screen/ScreenGovernRankDataDailyDao.xml | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java index fd3115d370..a753c7f00a 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java @@ -1300,22 +1300,22 @@ public class DataStatsServiceImpl implements DataStatsService { } //1.查询组织直属网格列表【网格维度】 - List gridList = dataStatsDao.getSubGridList(formDTO.getAgencyId()); + List gridList = indexService.getSubGridList(formDTO.getAgencyId()); if (gridList.size() < NumConstant.ONE) { return resultList; } - List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList()); + List gridIds = gridList.stream().map(ScreenCustomerGridDTO::getGridId).collect(Collectors.toList()); //2.按日期查找组织直属网格事件治理指数列表 List list = dataStatsDao.getGridGovern(gridIds, formDTO.getDateId()); //3.封装数据 - for (DimGridEntity gr : gridList) { + for (ScreenCustomerGridDTO gr : gridList) { GridGovrnResultDTO dto = new GridGovrnResultDTO(); - dto.setGridId(gr.getId()); + dto.setGridId(gr.getGridId()); dto.setGridName(gr.getGridName()); for (GridGovrnResultDTO re : list) { - if (gr.getId().equals(re.getGridId())) { + if (gr.getGridId().equals(re.getGridId())) { dto.setProblemResolvedCount(re.getProblemResolvedCount()); dto.setGroupSelfGovernRatio(re.getGroupSelfGovernRatio()); dto.setGridSelfGovernRatio(re.getGridSelfGovernRatio()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenGovernRankDataDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenGovernRankDataDailyDao.xml index b38ec6cce5..b738c0f217 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenGovernRankDataDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenGovernRankDataDailyDao.xml @@ -52,7 +52,14 @@ 0 AS RESPONSE_RATIO, 0 AS RESOLVED_RATIO, 0 AS GOVERN_RATIO, - 0 AS SATISFACTION_RATIO + 0 AS SATISFACTION_RATIO, + 0 AS RESPONSE_COUNT, + 0 AS TRANSFER_COUNT, + 0 AS RESOLVED_COUNT, + 0 AS CLOSED_COUNT, + 0 AS GOVERN_COUNT, + 0 AS SATISFACTION_COUNT, + 0 AS CLOSED_PROJECT_COUNT FROM screen_customer_agency WHERE @@ -69,7 +76,14 @@ 0 AS RESPONSE_RATIO, 0 AS RESOLVED_RATIO, 0 AS GOVERN_RATIO, - 0 AS SATISFACTION_RATIO + 0 AS SATISFACTION_RATIO, + 0 AS RESPONSE_COUNT, + 0 AS TRANSFER_COUNT, + 0 AS RESOLVED_COUNT, + 0 AS CLOSED_COUNT, + 0 AS GOVERN_COUNT, + 0 AS SATISFACTION_COUNT, + 0 AS CLOSED_PROJECT_COUNT FROM screen_customer_grid WHERE