From c0daa0e9e604d9208b1807e87f3d7e73a7edb767 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 29 Oct 2020 11:59:52 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF-=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=94=A8=E6=88=B7=E7=9A=84=E8=AF=A6=E6=83=85=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=89=8B=E6=9C=BA=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/ExtStaffInfoResultDTO.java | 5 +++++ .../src/main/resources/mapper/CustomerStaffDao.xml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtStaffInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtStaffInfoResultDTO.java index e8d385c116..31d5e24a34 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtStaffInfoResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtStaffInfoResultDTO.java @@ -79,6 +79,11 @@ public class ExtStaffInfoResultDTO implements Serializable { * */ private String adminFlag; + /** + * 手机号 + * */ + private String mobile; + /** * 用户角色列表 * */ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 4d88329d42..941861b42a 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -244,6 +244,7 @@ + @@ -257,6 +258,7 @@ staff.REAL_NAME AS nickname, '' AS PROFILE, staff.REAL_NAME AS realName, + staff.MOBILE, role.ROLE_KEY, role.ROLE_NAME, vis.GRID_ID From 8fd2ad3f3408786744d599d8ab1cb1268293c7a9 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 29 Oct 2020 17:09:38 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=8C=89=E6=9C=88=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=90=84=E9=A1=B9=E6=8C=87=E6=A0=87=E6=95=B0=E6=8D=AE=EF=BC=8C?= =?UTF-8?q?=E6=8C=89=E6=9C=88=E4=BB=BD=E6=9F=A5=E8=AF=A2=E5=90=84=E9=A1=B9?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E5=88=86=E6=95=B0=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/result/AblityListResultDTO.java | 4 +++- .../screen/dto/result/ScoreListResultDTO.java | 8 ++++++++ .../resources/mapper/fact/FactIndexAgencyScoreDao.xml | 6 +++++- .../resources/mapper/fact/FactIndexAgencySubScoreDao.xml | 1 + .../resources/mapper/fact/FactIndexCommunityScoreDao.xml | 6 +++++- .../main/resources/mapper/fact/FactIndexGridScoreDao.xml | 6 +++++- 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java index d6cc4cd785..2c8c7b6d00 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java @@ -19,7 +19,7 @@ public class AblityListResultDTO implements Serializable { */ private String name; /** - * 指标对应值(数值或百分比) + * 指标对应值(数值或百分比)原始值 */ private String value = "0"; /** @@ -36,4 +36,6 @@ public class AblityListResultDTO implements Serializable { */ private BigDecimal weight; + private Double score; + } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScoreListResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScoreListResultDTO.java index 9672f58bfe..3b299ac780 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScoreListResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScoreListResultDTO.java @@ -25,9 +25,17 @@ public class ScoreListResultDTO implements Serializable { * 本级分数(保留一位小数) */ private Double agencyScore; + + private Double selfOriginScore; + + private Double agencyWeight; /** * 下级分数(保留一位小数) */ private Double subAgencyScore; + private Double subAgencyWeight; + + private Double subOriginScore; + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml index 85ae080a02..9bc3f57b22 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml @@ -26,7 +26,11 @@ fact.index_code AS "indexCode", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", - ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore" + self.self_score AS selfOriginScore, + self.SELF_WEIGHT AS agencyWeight, + ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", + self.sub_score AS subOriginScore, + self.SUB_WEIGHT AS subAgencyWeight FROM fact_index_agency_score fact INNER JOIN fact_index_agency_self_sub_score self ON fact.agency_id = self.agency_id diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml index 691f149e1c..c31033b5f4 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml @@ -7,6 +7,7 @@ SELECT fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", + fact.score, dict.index_name AS "name", round(fact.WEIGHT,2) AS weight FROM diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml index 29e6d24277..64e645e536 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml @@ -26,7 +26,11 @@ fact.index_code AS "indexCode", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", - ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore" + self.self_score AS selfOriginScore, + self.SELF_WEIGHT AS agencyWeight, + ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", + self.sub_score AS subOriginScore, + self.SUB_WEIGHT AS subAgencyWeight FROM fact_index_community_score fact INNER JOIN fact_index_community_self_sub_score self ON fact.agency_id = self.agency_id diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml index 249f24d125..5ee3c7d5f8 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml @@ -26,7 +26,11 @@ fact.index_code AS "indexCode", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", - ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore" + self.self_score AS selfOriginScore, + self.SELF_WEIGHT AS agencyWeight, + ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", + self.sub_score AS subOriginScore, + self.SUB_WEIGHT AS subAgencyWeight FROM fact_index_grid_score fact INNER JOIN fact_index_grid_self_sub_score self ON fact.grid_id = self.grid_id From 34d98e735473bee0ada75898ad7f1943c51b11d5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 2 Nov 2020 09:43:33 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=B2=BB=E7=90=86=E8=83=BD=E5=8A=9B-?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=9B=B8=E5=85=B3=E6=8C=87=E6=A0=87=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=AA=8C=E8=AF=81=E3=80=81=E5=88=86=E6=89=B9=E6=8F=92?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/FactIndexCollectServiceImpl.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 70b38697ce..2ea0aa08d0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -1,10 +1,12 @@ package com.epmet.service.evaluationindex.indexcoll.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; 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.distributedlock.LockConstants; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.OrgTypeConstant; @@ -29,6 +31,7 @@ import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.redisson.api.RLock; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -200,7 +203,17 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - factIndexGovrnAblityDeptMonthlyDao.batchInsertFactIndexGovrnAblityDeptMonthly(formDTO.getDataList(), customerId); + List dataList = formDTO.getDataList(); + // 有 deptId字段为空时,报错提示 + List deptIsNull = dataList.stream().filter(d -> null == d.getDeptId() || d.getDeptId().equals("")).collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(deptIsNull)){ + throw new RenException("治理能力-部门相关指标计算【deptId为空】的客户ID为:"+customerId+",具体信息信息为:"+ JSON.toJSONString(deptIsNull)); + } + // 改成分批插入 + List> partition = ListUtils.partition(dataList, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + factIndexGovrnAblityDeptMonthlyDao.batchInsertFactIndexGovrnAblityDeptMonthly(p, customerId); + }); } } From bd7fec445880e4138857c0f9e4737380b13779d4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 2 Nov 2020 10:34:05 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/distributedlock/DistributedLock.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/distributedlock/DistributedLock.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/distributedlock/DistributedLock.java index 298a0b238f..6bfb25fe48 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/distributedlock/DistributedLock.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/distributedlock/DistributedLock.java @@ -1,7 +1,6 @@ package com.epmet.commons.tools.distributedlock; import com.epmet.commons.tools.exception.RenException; -import com.epmet.commons.tools.redis.RedisKeys; import org.apache.commons.lang3.StringUtils; import org.redisson.api.RLock; import org.redisson.api.RedissonClient; @@ -9,7 +8,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; /** * @Author zxc @@ -23,6 +21,7 @@ public class DistributedLock { /** * @Description 抢锁🔒 每个锁持有十分钟 + * watchDog模式,每隔10s,自动更改持锁时间,假设宕机,持锁时间达到时,会自动释放锁 * @Param name * @author zxc * @date 2020/10/28 2:52 下午 From 5a4245346ff3ca04ce1c3556c18ee590cc8f75ca Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 3 Nov 2020 14:42:13 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=83=A8=E7=BD=B2report=EF=BC=8Cstatis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml | 2 +- .../resources/mapper/fact/FactIndexCommunitySubScoreDao.xml | 1 + .../src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml index c31033b5f4..e1cbb6850b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml @@ -7,7 +7,7 @@ SELECT fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", - fact.score, + fact.score AS score, dict.index_name AS "name", round(fact.WEIGHT,2) AS weight FROM diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml index db57d11ee3..b0fd69d5cf 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml @@ -8,6 +8,7 @@ fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", dict.index_name AS "name", + fact.score AS score, round(fact.WEIGHT,2) AS weight FROM fact_index_community_sub_score fact diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml index 0cf826892b..eda1991759 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml @@ -8,6 +8,7 @@ fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", dict.index_name AS "name", + fact.score AS score, round(fact.WEIGHT,2) AS weight FROM fact_index_grid_sub_score fact