From 88eb05c07bacc6523e5022e535fdc9f5e8b55d9c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 17 Jun 2021 10:10:24 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=AD=94=E6=9D=91=E3=80=81=E9=94=A6?= =?UTF-8?q?=E6=B0=B4=E3=80=81=E6=A6=86=E5=B1=B1=E7=9A=84=20orgType=20?= =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ScreenProjectCategoryOrgDailyServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index 9eb8ac99ea..7430c1abe7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -471,6 +471,12 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl { r.setOrgType(level); r.setDateId(dateId); + // 这么写的目的是:防止把孔村,锦水,榆山的 orgType 赋值成 区县级别 + if (level.equals(ScreenConstant.DISTRICT)){ + if (r.getOrgId().equals(PingYinConstant.KONG_CUN_AGENCY_ID) || r.getOrgId().equals(PingYinConstant.YU_SHAN_AGENCY_ID) || r.getOrgId().equals(PingYinConstant.JIN_SHUI_AGENCY_ID)){ + r.setOrgType(ScreenConstant.STREET); + } + } }); } } From 640710220b529c276baf3e0e36c31c59401e400a Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 17 Jun 2021 13:49:09 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/dataToIndex/IndexOriginExtractService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/IndexOriginExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/IndexOriginExtractService.java index 773e902e00..809826e6fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/IndexOriginExtractService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/IndexOriginExtractService.java @@ -10,7 +10,7 @@ import com.epmet.dto.extract.form.ExtractIndexFormDTO; */ public interface IndexOriginExtractService { /** - * desc:从统计库对象抽取指标数据 + * desc:[月]从统计库对象抽取指标数据 * * @param formDTO */ From 6ab7c7f7c135edf2253d70e2cdceaa8a32334adf Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 17 Jun 2021 15:37:27 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96=20bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notice/service/impl/NoticeReadRecordServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java index 51684f9648..f7c93c7f0f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java @@ -166,13 +166,13 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl Date: Thu, 17 Jun 2021 16:02:46 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0TraceID(Transaction-Seria?= =?UTF-8?q?l)=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E5=A6=82=E6=9E=9Cnginx?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E7=94=9F=E6=88=90=E4=BA=86=E8=AF=A5header?= =?UTF-8?q?=EF=BC=8C=E5=88=99=E7=9B=B4=E6=8E=A5=E7=94=A8nginx=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/filter/CpAuthGatewayFilterFactory.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java index 9e6d7ef077..c9a19fa8b8 100644 --- a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java +++ b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java @@ -13,6 +13,7 @@ import com.epmet.constant.TokenHeaderKeyConstant; import com.epmet.openapi.constant.AuthTypes; import com.epmet.openapi.constant.RequestParamKeys; import com.epmet.utils.ServerHttpRequestUtils; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -67,9 +68,11 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory tranSerials = request.getHeaders().get(AppClientConstant.TRANSACTION_SERIAL_KEY); + if (CollectionUtils.isEmpty(tranSerials) || StringUtils.isBlank(tranSerials.get(0))) { + request.mutate().header(AppClientConstant.TRANSACTION_SERIAL_KEY, new String[]{getTransactionSerial()}); + } String authType = getAuthType(request); String requestUri = request.getPath().pathWithinApplication().value(); From 4775db3f160c653196ceb5d850b666b9234f7cb5 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 17 Jun 2021 16:21:20 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=9F=BA=E5=B1=82=E6=B2=BB=E7=90=86=20?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E7=8E=87=E8=87=AA=E6=B2=BB=E7=8E=87=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E4=BF=AE=E6=94=B9=20=E5=B0=8F=E7=BB=84=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E6=8E=92=E8=A1=8C=E5=85=A5=E5=8F=82=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GovernRankDataExtractServiceImpl.java | 48 +++++++++++++++---- .../com/epmet/dto/form/GroupPointFormDTO.java | 7 +++ .../controller/GroupPointController.java | 8 +++- 3 files changed, 53 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java index 926b253910..e93b4eba0c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java @@ -75,7 +75,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe BigDecimal resolveCount = new BigDecimal(grid.getResolveProjectCount()); BigDecimal selfCount = new BigDecimal(grid.getSelfSolveProjectCount()); if (grid.getResolveProjectCount() != NumConstant.ZERO) { - entity.setGovernRatio(selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP)); + BigDecimal ratio = selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP); + if (ratio.compareTo(hundred) > 0) { + ratio = hundred; + } + entity.setGovernRatio(ratio); } })); } @@ -87,7 +91,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); + if (ratio.compareTo(hundred) > 0) { + ratio = hundred; + } + entity.setResponseRatio(ratio); } })); } @@ -138,7 +146,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); + if (ratio.compareTo(hundred) > 0) { + ratio = hundred; + } + entity.setResponseRatio(ratio); } })); } @@ -149,7 +161,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); BigDecimal count = new BigDecimal(dto.getCount()); - entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); + if (ratio.compareTo(hundred) > 0) { + ratio = hundred; + } + entity.setGovernRatio(ratio); } })); } @@ -198,7 +214,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); + if (ratio.compareTo(hundred) > 0) { + ratio = hundred; + } + entity.setResponseRatio(ratio); } })); } @@ -209,7 +229,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); BigDecimal count = new BigDecimal(dto.getCount()); - entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); + if (ratio.compareTo(hundred) > 0) { + ratio = hundred; + } + entity.setGovernRatio(ratio); } })); } @@ -258,7 +282,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); + if (ratio.compareTo(hundred) > 0) { + ratio = hundred; + } + entity.setResponseRatio(ratio); } })); } @@ -269,7 +297,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); BigDecimal count = new BigDecimal(dto.getCount()); - entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); + if (ratio.compareTo(hundred) > 0) { + ratio = hundred; + } + entity.setGovernRatio(ratio); } })); } diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java index 8da5ab5729..b727bb5d1b 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -12,6 +14,11 @@ import java.io.Serializable; @Data public class GroupPointFormDTO implements Serializable { private static final long serialVersionUID = -3231073030413434313L; + + public interface GroupPoint extends CustomerClientShowGroup {} + public interface GridRank extends CustomerClientShowGroup {} + @NotBlank(message = "小组Id不能为空", groups = {GroupPoint.class, GridRank.class}) private String groupId; + @NotBlank(message = "网格Id不能为空", groups = {GridRank.class}) private String gridId; } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/GroupPointController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/GroupPointController.java index 4984d2ce0b..eed49d25d6 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/GroupPointController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/GroupPointController.java @@ -3,11 +3,12 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.GroupPointFormDTO; -import com.epmet.dto.result.GroupPointRuleResultDTO; -import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO; import com.epmet.dto.result.GroupPointRankingResultDTO; +import com.epmet.dto.result.GroupPointRuleResultDTO; import com.epmet.dto.result.PointRankingResultDTO; +import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO; import com.epmet.service.BizPointTotalDetailService; import com.epmet.service.BizPointUserTotalDetailService; import com.epmet.service.PointRuleService; @@ -47,6 +48,7 @@ public class GroupPointController { */ @PostMapping("pointranking") public Result> pointRanking(@LoginUser TokenDto tokenDto, @RequestBody GroupPointFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GroupPoint.class); List list = bizPointUserTotalDetailService.pointRanking(tokenDto, formDTO); return new Result>().ok(list); } @@ -61,6 +63,7 @@ public class GroupPointController { */ @PostMapping("grouppointranking") public Result> groupPointRanking(@RequestBody GroupPointFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GridRank.class); List list = bizPointTotalDetailService.groupPointRanking(formDTO); return new Result>().ok(list); } @@ -75,6 +78,7 @@ public class GroupPointController { */ @PostMapping("pointdetail") public Result pointDetail(@RequestBody GroupPointFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GroupPoint.class); GroupPointDetailResultDTO result = bizPointTotalDetailService.pointDetail(formDTO); return new Result().ok(result); } From 117c6c82c254ba7f32c9a6cea73f25689e4ab561 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 18 Jun 2021 14:44:36 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=91=98=E5=B7=A1?= =?UTF-8?q?=E6=9F=A5=E8=AE=B0=E5=BD=95bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/StaffPatrolRecordDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml index 002c2372b9..bf38f046e1 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml @@ -22,7 +22,7 @@ pr.STAFF_ID = #{userId} ) - ORDER BY pd.SERIAL_NUM DESC)t GROUP BY ID + GROUP BY pr.STAFF_ID ORDER BY pr.CREATED_TIME DESC)t