From 9bbaa708b589035459e31f5766a1e8351e622811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Clyd=E2=80=9D?= <“lyd@datametatech.com”> Date: Sun, 16 Mar 2025 14:32:29 +0800 Subject: [PATCH] =?UTF-8?q?fixbug:=E4=B8=80=E5=BC=A0=E5=9B=BE-=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/kms/yg/cz/dto/CharInfoDto.java | 3 + .../enums/PatrolMaintenanceCategory.java | 18 + .../yxgh/common/enums/ProjectCharEnum.java | 44 ++- .../yxgh/common/enums/StaticIndexEnum.java | 327 ++++++++++++------ .../df/mapper/DfCheckingRecordV2Mapper.java | 2 +- .../DwCheckingProblemV2Controller.java | 2 +- .../DwCheckingRecordV2Controller.java | 10 +- .../DwCheckingV2Controller.java | 10 +- .../DwYhV2Controller.java | 10 +- .../dw/mapper/DwCheckingRecordV2Mapper.java | 4 +- .../sz/mapper/SzCheckingRecordV2Mapper.java | 3 +- 11 files changed, 291 insertions(+), 142 deletions(-) rename shuili-system/src/main/java/com/kms/yxgh/dw/{ontroller => controller}/DwCheckingProblemV2Controller.java (96%) rename shuili-system/src/main/java/com/kms/yxgh/dw/{ontroller => controller}/DwCheckingRecordV2Controller.java (82%) rename shuili-system/src/main/java/com/kms/yxgh/dw/{ontroller => controller}/DwCheckingV2Controller.java (82%) rename shuili-system/src/main/java/com/kms/yxgh/dw/{ontroller => controller}/DwYhV2Controller.java (83%) diff --git a/shuili-system/src/main/java/com/kms/yg/cz/dto/CharInfoDto.java b/shuili-system/src/main/java/com/kms/yg/cz/dto/CharInfoDto.java index 2722a372..ba1aaeb4 100644 --- a/shuili-system/src/main/java/com/kms/yg/cz/dto/CharInfoDto.java +++ b/shuili-system/src/main/java/com/kms/yg/cz/dto/CharInfoDto.java @@ -54,6 +54,9 @@ public class CharInfoDto { @ApiModelProperty(value = "单位") private String unit; + @ApiModelProperty(value = "排序") + private String sort; + @ApiModelProperty(value = "数据") private List data; } diff --git a/shuili-system/src/main/java/com/kms/yxgh/common/enums/PatrolMaintenanceCategory.java b/shuili-system/src/main/java/com/kms/yxgh/common/enums/PatrolMaintenanceCategory.java index 8885e5b5..eb3e59ec 100644 --- a/shuili-system/src/main/java/com/kms/yxgh/common/enums/PatrolMaintenanceCategory.java +++ b/shuili-system/src/main/java/com/kms/yxgh/common/enums/PatrolMaintenanceCategory.java @@ -7,6 +7,24 @@ public enum PatrolMaintenanceCategory { PROJECT_PATROL("工程巡查", "1"), JD_PATROL("机电巡查", "2"), + DW_CATEGORY_MOUSE_EVIL("鼠害", "1"), + DW_CATEGORY_ANT_EVIL("蚁害", "2"), + + YZT_SZ_FXHZ_SUM("分泄洪闸", "1"), + YZT_SZ_JZZ_SUM("节制闸", "2"), + YZT_SZ_PTSZ_SUM("排退水闸", "3"), + YZT_SZ_YJSZ_SUM("引进水闸", "4"), + YZT_SZ_DCZ_SUM("挡潮闸", "5"), + YZT_SZ_CZ_SUM("船闸", "6"), + YZT_("多类型混合闸", "7"), + YZT_SZ_QT_SUM("其他", "9"), + + YZT_DF_HJD_SUM("河江堤", "1"), + YZT_HD_SUM("湖堤", "2"), + YZT_HAID_SUM("海堤", "3"), + YZT_WYD_SUM("围圩堤", "4"), + + DJ_LX("零星", "1"), DJ_YB("一般", "2"), diff --git a/shuili-system/src/main/java/com/kms/yxgh/common/enums/ProjectCharEnum.java b/shuili-system/src/main/java/com/kms/yxgh/common/enums/ProjectCharEnum.java index eb4b54dd..a66affff 100644 --- a/shuili-system/src/main/java/com/kms/yxgh/common/enums/ProjectCharEnum.java +++ b/shuili-system/src/main/java/com/kms/yxgh/common/enums/ProjectCharEnum.java @@ -5,7 +5,13 @@ import com.kms.yg.cz.dto.CharInfoDto; import com.shuili.common.utils.StringUtils; import lombok.Getter; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -39,30 +45,35 @@ public enum ProjectCharEnum { C_DW_14("巡查记录分析", Arrays.asList(StaticIndexEnum.DW_JL_ONE_DATE_SUM, StaticIndexEnum.DW_JL_TWO_DATE_SUM), "数量", Collections.emptyList()), - C_DW_15("巡查缺陷分析", Arrays.asList(StaticIndexEnum.DW_QX_ONE_DATE_SUM, StaticIndexEnum.DW_QX_TWO_DATE_SUM), "数量", Collections.emptyList()), - C_DW_16("缺陷问题等级分析", Arrays.asList(StaticIndexEnum.DW_QX_DJ_LX_SUM, StaticIndexEnum.DW_QX_DJ_JD_SUM, StaticIndexEnum.DW_QX_DJ_ZD_SUM, StaticIndexEnum.DW_QX_DJ_YB_SUM), "数量", Collections.emptyList()), - C_DW_17("缺陷养护对比分析", Arrays.asList(StaticIndexEnum.DW_BD_YH_SUM, StaticIndexEnum.DW_BD_QX_SUM), "数量", Collections.emptyList()), - C_DW_18("巡查项目总数", Collections.singletonList(StaticIndexEnum.DW_XM_SUM), "数量", Collections.emptyList()), + C_DW_15("有害动物防治问题分析", Arrays.asList(StaticIndexEnum.DW_QX_ONE_DATE_SUM, StaticIndexEnum.DW_QX_TWO_DATE_SUM), "数量", Collections.emptyList()), + C_DW_16("有害动物问题等级分析", Arrays.asList(StaticIndexEnum.DW_QX_DJ_LX_SUM, StaticIndexEnum.DW_QX_DJ_JD_SUM, StaticIndexEnum.DW_QX_DJ_ZD_SUM, StaticIndexEnum.DW_QX_DJ_YB_SUM), "数量", Collections.emptyList()), + C_DW_17("问题和处置对比分析", Arrays.asList(StaticIndexEnum.DW_BD_QX_SUM, StaticIndexEnum.DW_BD_YH_SUM), "数量", Collections.emptyList()), + C_DW_18("检查项目总数", Collections.singletonList(StaticIndexEnum.DW_XM_SUM), "数量", Collections.emptyList()), C_DW_1("工程分布", Collections.singletonList(StaticIndexEnum.DW_PROJECT_ADCD_SUM), "数量", Collections.emptyList()), - C_DW_2("巡查分析", Arrays.asList(StaticIndexEnum.DW_CHECKING_ADCD_SUM, StaticIndexEnum.DW_JD_ADCD_SUM), "数量", Collections.emptyList()), - C_DW_3("缺陷和养护对比", Arrays.asList(StaticIndexEnum.DW_QX_ADCD_SUM, StaticIndexEnum.DW_YH_ADCD_SUM), "数量", Collections.emptyList()), + C_DW_2("检查分析", Arrays.asList(StaticIndexEnum.DW_CHECKING_ADCD_SUM, StaticIndexEnum.DW_JD_ADCD_SUM), "数量", Collections.emptyList()), + C_DW_3("问题和处置对比分析", Arrays.asList(StaticIndexEnum.DW_QX_ADCD_SUM, StaticIndexEnum.DW_YH_ADCD_SUM), "数量", Collections.emptyList()), K1("工程数量", Arrays.asList( StaticIndexEnum.YZT_SK_SUM ,StaticIndexEnum.YZT_SZ_SUM ,StaticIndexEnum.YZT_DF_SUM), "数量", Collections.emptyList()), - K2("测报设施建设", Arrays.asList( - StaticIndexEnum.YZT_SSYX_SUM - ,StaticIndexEnum.YZT_SWGCJCCZ_SUM - ,StaticIndexEnum.YZT_SWGCJCCD_SUM + K2("水闸分类统计", Arrays.asList( + StaticIndexEnum.YZT_SZ_FXHZ_SUM + , StaticIndexEnum.YZT_SZ_JZZ_SUM + , StaticIndexEnum.YZT_SZ_PTSZ_SUM + , StaticIndexEnum.YZT_SZ_YJSZ_SUM + , StaticIndexEnum.YZT_SZ_DCZ_SUM + , StaticIndexEnum.YZT_SZ_CZ_SUM + , StaticIndexEnum.YZT_SZ_DLXHHZ_SUM + , StaticIndexEnum.YZT_SZ_QT_SUM ), "数量", Collections.emptyList()), - K3("监督检查总览", Arrays.asList( - StaticIndexEnum.YZT_SUPERVISE_JRGJ_YCL_SUM - ,StaticIndexEnum.YZT_SUPERVISE_JRGJ_DCL_SUM - ,StaticIndexEnum.YZT_SUPERVISE_BYGJ_YCL_SUM - ,StaticIndexEnum.YZT_SUPERVISE_BYGJ_DCL_SUM + K3("堤防分类统计", Arrays.asList( + StaticIndexEnum.YZT_DF_HJD_SUM + , StaticIndexEnum.YZT_HD_SUM + , StaticIndexEnum.YZT_HAID_SUM + , StaticIndexEnum.YZT_WYD_SUM ), "数量", Collections.emptyList()), K4("安全巡查概况", Arrays.asList( StaticIndexEnum.YZT_TOUR_CHECK_RWS_SUM @@ -183,6 +194,7 @@ public enum ProjectCharEnum { series.setName(type.getZhName()); series.setCode(type.name()); series.setUnit(type.getUnit()); + series.setSort(type.getSort()); Map values = dataMap.getOrDefault(type, new HashMap<>()); series.setData(charInfoDto.getXAxis().stream() .map(time -> { diff --git a/shuili-system/src/main/java/com/kms/yxgh/common/enums/StaticIndexEnum.java b/shuili-system/src/main/java/com/kms/yxgh/common/enums/StaticIndexEnum.java index 2a0c661d..640d1411 100644 --- a/shuili-system/src/main/java/com/kms/yxgh/common/enums/StaticIndexEnum.java +++ b/shuili-system/src/main/java/com/kms/yxgh/common/enums/StaticIndexEnum.java @@ -1,3 +1,5 @@ + + package com.kms.yxgh.common.enums; import cn.hutool.core.collection.CollectionUtil; @@ -11,9 +13,12 @@ import com.kms.yg.res.service.AttResBaseService; import com.kms.yg.sz.domain.BsSgcSzSzrw; import com.kms.yg.sz.service.BsSgcSzSafeJbxxService; import com.kms.yg.sz.service.BsSgcSzSzrwService; -import com.kms.yxgh.common.dto.*; +import com.kms.yxgh.common.dto.CountDateDto; +import com.kms.yxgh.common.dto.CountDto; +import com.kms.yxgh.common.dto.ObjectStatisticQueDto; import com.kms.yxgh.common.service.Statistic; import com.kms.yxgh.df.domain.DfCheckingProblemV2; +import com.kms.yxgh.df.domain.DfYhV2; import com.kms.yxgh.df.mapper.DfCheckingProblemV2Mapper; import com.kms.yxgh.df.mapper.DfCheckingRecordV2Mapper; import com.kms.yxgh.df.mapper.DfCheckingV2Mapper; @@ -25,6 +30,7 @@ import com.kms.yxgh.dw.mapper.DwCheckingRecordV2Mapper; import com.kms.yxgh.dw.mapper.DwCheckingV2Mapper; import com.kms.yxgh.dw.mapper.DwYhV2Mapper; import com.kms.yxgh.sz.domain.SzCheckingProblemV2; +import com.kms.yxgh.sz.domain.SzYhV2; import com.kms.yxgh.sz.mapper.SzCheckingProblemV2Mapper; import com.kms.yxgh.sz.mapper.SzCheckingRecordV2Mapper; import com.kms.yxgh.sz.mapper.SzCheckingV2Mapper; @@ -35,7 +41,11 @@ import com.shuili.common.utils.SpringUtils; import lombok.Getter; import java.math.BigDecimal; -import java.util.*; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; import java.util.stream.Collectors; @Getter @@ -45,59 +55,59 @@ public enum StaticIndexEnum { DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.JD_PATROL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_JL_TWO_DATE_SUM("工程巡查", sp -> { DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.PROJECT_PATROL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_QX_ONE_DATE_SUM("机电巡查", sp -> { DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); List list = mapper.countDate(sp, PatrolMaintenanceCategory.JD_PATROL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_QX_TWO_DATE_SUM("工程巡查", sp -> { DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); List list = mapper.countDate(sp, PatrolMaintenanceCategory.PROJECT_PATROL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_QX_DJ_LX_SUM("零星", sp -> { DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_LX); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_QX_DJ_YB_SUM("一般", sp -> { DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_YB); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_QX_DJ_JD_SUM("较大", sp -> { DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_JD); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_QX_DJ_ZD_SUM("重大", sp -> { DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_ZD); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_BD_YH_SUM("养护次数", sp -> { DfYhV2Mapper mapper = SpringUtils.getBean(DfYhV2Mapper.class); List list = mapper.countYhDto(sp); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_BD_QX_SUM("缺陷次数", sp -> { DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); List list = mapper.countQx(sp); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DF_XM_SUM("巡查项目数", sp -> { DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); @@ -105,34 +115,34 @@ public enum StaticIndexEnum { Map map = new HashMap<>(); map.put("sum", String.valueOf(list)); return map; - }, "个", "0"), + }, "个", "0", "0"), DF_QX_ADCD_SUM("缺陷数量", sp -> { DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); List list = mapper.count(sp); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), DF_YH_ADCD_SUM("养护次数", sp -> { DfYhV2Mapper mapper = SpringUtils.getBean(DfYhV2Mapper.class); List list = mapper.count(sp); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), DF_PROJECT_ADCD_SUM("工程数量", sp -> { DfCheckingV2Mapper mapper = SpringUtils.getBean(DfCheckingV2Mapper.class); List list = mapper.count(sp); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), DF_CHECKING_ADCD_SUM("工程巡查", sp -> { DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); List list = mapper.count(sp, PatrolMaintenanceCategory.PROJECT_PATROL); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), DF_JD_ADCD_SUM("机电巡查", sp -> { DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); List list = mapper.count(sp, PatrolMaintenanceCategory.JD_PATROL); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), @@ -140,59 +150,59 @@ public enum StaticIndexEnum { SzCheckingRecordV2Mapper mapper = SpringUtils.getBean(SzCheckingRecordV2Mapper.class); List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.JD_PATROL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_JL_TWO_DATE_SUM("工程巡查", sp -> { SzCheckingRecordV2Mapper mapper = SpringUtils.getBean(SzCheckingRecordV2Mapper.class); List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.PROJECT_PATROL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_QX_ONE_DATE_SUM("机电巡查", sp -> { SzCheckingProblemV2Mapper mapper = SpringUtils.getBean(SzCheckingProblemV2Mapper.class); List list = mapper.countDate(sp, PatrolMaintenanceCategory.JD_PATROL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_QX_TWO_DATE_SUM("工程巡查", sp -> { SzCheckingProblemV2Mapper mapper = SpringUtils.getBean(SzCheckingProblemV2Mapper.class); List list = mapper.countDate(sp, PatrolMaintenanceCategory.PROJECT_PATROL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_QX_DJ_LX_SUM("零星", sp -> { SzCheckingProblemV2Mapper mapper = SpringUtils.getBean(SzCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_LX); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_QX_DJ_YB_SUM("一般", sp -> { SzCheckingProblemV2Mapper mapper = SpringUtils.getBean(SzCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_YB); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_QX_DJ_JD_SUM("较大", sp -> { SzCheckingProblemV2Mapper mapper = SpringUtils.getBean(SzCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_JD); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_QX_DJ_ZD_SUM("重大", sp -> { SzCheckingProblemV2Mapper mapper = SpringUtils.getBean(SzCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_ZD); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_BD_YH_SUM("养护次数", sp -> { SzYhV2Mapper mapper = SpringUtils.getBean(SzYhV2Mapper.class); List list = mapper.countYhDto(sp); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_BD_QX_SUM("缺陷次数", sp -> { SzCheckingProblemV2Mapper mapper = SpringUtils.getBean(SzCheckingProblemV2Mapper.class); List list = mapper.countQx(sp); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), SZ_XM_SUM("巡查项目数", sp -> { SzCheckingRecordV2Mapper mapper = SpringUtils.getBean(SzCheckingRecordV2Mapper.class); @@ -200,269 +210,343 @@ public enum StaticIndexEnum { Map map = new HashMap<>(); map.put("sum", String.valueOf(list)); return map; - }, "个", "0"), + }, "个", "0", "0"), SZ_QX_ADCD_SUM("缺陷数量", sp -> { SzCheckingProblemV2Mapper mapper = SpringUtils.getBean(SzCheckingProblemV2Mapper.class); List list = mapper.count(sp); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), SZ_YH_ADCD_SUM("养护次数", sp -> { SzYhV2Mapper mapper = SpringUtils.getBean(SzYhV2Mapper.class); List list = mapper.count(sp); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), SZ_PROJECT_ADCD_SUM("工程数量", sp -> { SzCheckingV2Mapper mapper = SpringUtils.getBean(SzCheckingV2Mapper.class); List list = mapper.count(sp); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), SZ_CHECKING_ADCD_SUM("工程巡查", sp -> { SzCheckingRecordV2Mapper mapper = SpringUtils.getBean(SzCheckingRecordV2Mapper.class); List list = mapper.count(sp, PatrolMaintenanceCategory.PROJECT_PATROL); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), SZ_JD_ADCD_SUM("机电巡查", sp -> { SzCheckingRecordV2Mapper mapper = SpringUtils.getBean(SzCheckingRecordV2Mapper.class); List list = mapper.count(sp, PatrolMaintenanceCategory.JD_PATROL); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), - DW_JL_ONE_DATE_SUM("机电巡查", sp -> { + DW_JL_ONE_DATE_SUM("鼠害检查", sp -> { DwCheckingRecordV2Mapper mapper = SpringUtils.getBean(DwCheckingRecordV2Mapper.class); - List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.JD_PATROL); + List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.DW_CATEGORY_MOUSE_EVIL); return dataGroup(list); - }, "个", "0"), - DW_JL_TWO_DATE_SUM("工程巡查", sp -> { + }, "个", "0", "0"), + DW_JL_TWO_DATE_SUM("蚁害检查", sp -> { DwCheckingRecordV2Mapper mapper = SpringUtils.getBean(DwCheckingRecordV2Mapper.class); - List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.PROJECT_PATROL); + List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.DW_CATEGORY_ANT_EVIL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), - DW_QX_ONE_DATE_SUM("机电巡查", sp -> { + DW_QX_ONE_DATE_SUM("鼠害检查", sp -> { DwCheckingRecordV2Mapper mapper = SpringUtils.getBean(DwCheckingRecordV2Mapper.class); - List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.JD_PATROL); + List list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.DW_CATEGORY_MOUSE_EVIL); return dataGroup(list); - }, "个", "0"), - DW_QX_TWO_DATE_SUM("工程巡查", sp -> { + }, "个", "0", "0"), + DW_QX_TWO_DATE_SUM("蚁害检查", sp -> { DwCheckingProblemV2Mapper mapper = SpringUtils.getBean(DwCheckingProblemV2Mapper.class); - List list = mapper.countDate(sp, PatrolMaintenanceCategory.PROJECT_PATROL); + List list = mapper.countDate(sp, PatrolMaintenanceCategory.DW_CATEGORY_ANT_EVIL); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DW_QX_DJ_LX_SUM("零星", sp -> { DwCheckingProblemV2Mapper mapper = SpringUtils.getBean(DwCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_LX); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DW_QX_DJ_YB_SUM("一般", sp -> { DwCheckingProblemV2Mapper mapper = SpringUtils.getBean(DwCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_YB); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DW_QX_DJ_JD_SUM("较大", sp -> { DwCheckingProblemV2Mapper mapper = SpringUtils.getBean(DwCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_JD); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), DW_QX_DJ_ZD_SUM("重大", sp -> { DwCheckingProblemV2Mapper mapper = SpringUtils.getBean(DwCheckingProblemV2Mapper.class); List list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_ZD); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), - DW_BD_YH_SUM("养护次数", sp -> { + DW_BD_YH_SUM("问题次数", sp -> { DwYhV2Mapper mapper = SpringUtils.getBean(DwYhV2Mapper.class); List list = mapper.countYhDto(sp); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), - DW_BD_QX_SUM("缺陷次数", sp -> { + DW_BD_QX_SUM("处置次数", sp -> { DwCheckingProblemV2Mapper mapper = SpringUtils.getBean(DwCheckingProblemV2Mapper.class); List list = mapper.countQx(sp); return dataGroup(list); - }, "个", "0"), + }, "个", "0", "0"), - DW_XM_SUM("巡查项目数", sp -> { + DW_XM_SUM("检查项目数", sp -> { DwCheckingRecordV2Mapper mapper = SpringUtils.getBean(DwCheckingRecordV2Mapper.class); int list = mapper.countXm(sp); Map map = new HashMap<>(); map.put("sum", String.valueOf(list)); return map; - }, "个", "0"), + }, "个", "0", "0"), - DW_QX_ADCD_SUM("缺陷数量", sp -> { + DW_QX_ADCD_SUM("问题数量", sp -> { DwCheckingProblemV2Mapper mapper = SpringUtils.getBean(DwCheckingProblemV2Mapper.class); List list = mapper.count(sp); return adcdGroup(list, sp); - }, "个", "0"), - DW_YH_ADCD_SUM("养护次数", sp -> { + }, "个", "0", "0"), + DW_YH_ADCD_SUM("处置次数", sp -> { DwYhV2Mapper mapper = SpringUtils.getBean(DwYhV2Mapper.class); List list = mapper.count(sp); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), DW_PROJECT_ADCD_SUM("工程数量", sp -> { DwCheckingV2Mapper mapper = SpringUtils.getBean(DwCheckingV2Mapper.class); List list = mapper.count(sp); return adcdGroup(list, sp); - }, "个", "0"), - DW_CHECKING_ADCD_SUM("工程巡查", sp -> { + }, "个", "0", "0"), + DW_CHECKING_ADCD_SUM("鼠害检查", sp -> { DwCheckingRecordV2Mapper mapper = SpringUtils.getBean(DwCheckingRecordV2Mapper.class); - List list = mapper.count(sp, PatrolMaintenanceCategory.PROJECT_PATROL); + List list = mapper.count(sp, PatrolMaintenanceCategory.DW_CATEGORY_MOUSE_EVIL); return adcdGroup(list, sp); - }, "个", "0"), - DW_JD_ADCD_SUM("机电巡查", sp -> { + }, "个", "0", "0"), + DW_JD_ADCD_SUM("蚁害检查", sp -> { DwCheckingRecordV2Mapper mapper = SpringUtils.getBean(DwCheckingRecordV2Mapper.class); - List list = mapper.count(sp, PatrolMaintenanceCategory.JD_PATROL); + List list = mapper.count(sp, PatrolMaintenanceCategory.DW_CATEGORY_ANT_EVIL); return adcdGroup(list, sp); - }, "个", "0"), + }, "个", "0", "0"), YZT_SK_SUM("水库", sp -> { Map map =new HashMap<>(); AttResBaseService service = SpringUtils.getBean(AttResBaseService.class); map.put("sum",String.valueOf(service.count())); return map; - }, "座", "0"), + }, "座", "0", "0"), YZT_SZ_SUM("水闸", sp -> { Map map =new HashMap<>(); BsSgcSzSafeJbxxService service = SpringUtils.getBean(BsSgcSzSafeJbxxService.class); map.put("sum",String.valueOf(service.count())); return map; - }, "座", "0"), + }, "座", "0", "0"), YZT_DF_SUM("堤防", sp -> { Map map =new HashMap<>(); BsSgcDfSafeJbxxService service = SpringUtils.getBean(BsSgcDfSafeJbxxService.class); map.put("sum",String.valueOf(service.count())); return map; - }, "段", "0"), + }, "段", "0", "0"), YZT_SSYX_SUM("水事影像监测监视点", sp -> { Map map =new HashMap<>(); return map; - }, "个", "125"), + }, "个", "125", "0"), YZT_SWGCJCCZ_SUM("水文工程检测测站数量", sp -> { Map map =new HashMap<>(); AttStBaseService service = SpringUtils.getBean(AttStBaseService.class); map.put("sum",String.valueOf(service.count())); return map; - }, "个", "0"), + }, "个", "0", "0"), YZT_SWGCJCCD_SUM("水文工程检测测点数量", sp -> { Map map =new HashMap<>(); AttStMpService service = SpringUtils.getBean(AttStMpService.class); map.put("sum", String.valueOf(service.count())); return map; - }, "个", "0"), + }, "个", "0", "0"), + + + YZT_SZ_FXHZ_SUM("分泄洪闸", sp -> { + Map map = new HashMap<>(); + AttStMpService service = SpringUtils.getBean(AttStMpService.class); + map.put("sum", String.valueOf(service.count())); + return map; + }, "个", "0", "1"), + + YZT_SZ_JZZ_SUM("节制闸", sp -> { + Map map = new HashMap<>(); + AttStMpService service = SpringUtils.getBean(AttStMpService.class); + map.put("sum", String.valueOf(service.count())); + return map; + }, "个", "0", "2"), + + YZT_SZ_PTSZ_SUM("排退水闸", sp -> { + Map map = new HashMap<>(); + AttStMpService service = SpringUtils.getBean(AttStMpService.class); + map.put("sum", String.valueOf(service.count())); + return map; + }, "个", "0", "3"), + + YZT_SZ_YJSZ_SUM("引进水闸", sp -> { + Map map = new HashMap<>(); + AttStMpService service = SpringUtils.getBean(AttStMpService.class); + map.put("sum", String.valueOf(service.count())); + return map; + }, "个", "0", "4"), + + YZT_SZ_DCZ_SUM("挡潮闸", sp -> { + Map map = new HashMap<>(); + AttStMpService service = SpringUtils.getBean(AttStMpService.class); + map.put("sum", String.valueOf(service.count())); + return map; + }, "个", "0", "5"), + + YZT_SZ_CZ_SUM("船闸", sp -> { + Map map = new HashMap<>(); + AttStMpService service = SpringUtils.getBean(AttStMpService.class); + map.put("sum", String.valueOf(service.count())); + return map; + }, "个", "0", "6"), + YZT_SZ_DLXHHZ_SUM("多类型混合闸", sp -> { + Map map = new HashMap<>(); + AttStMpService service = SpringUtils.getBean(AttStMpService.class); + map.put("sum", String.valueOf(service.count())); + return map; + }, "个", "0", "7"), - YZT_SUPERVISE_JRGJ_YCL_SUM("已处理", sp -> { + YZT_SZ_QT_SUM("其他", sp -> { + Map map = new HashMap<>(); + AttStMpService service = SpringUtils.getBean(AttStMpService.class); + map.put("sum", String.valueOf(service.count())); + return map; + }, "个", "0", "9"), + + + YZT_DF_HJD_SUM("河江堤", sp -> { Map map =new HashMap<>(); map.put("sum","15"); return map; - }, "个", "0"), + }, "个", "0", "1"), - YZT_SUPERVISE_JRGJ_DCL_SUM("待处理", sp -> { + YZT_HD_SUM("湖堤", sp -> { Map map =new HashMap<>(); map.put("sum","47"); return map; - }, "个", "0"), + }, "个", "0", "2"), - YZT_SUPERVISE_BYGJ_YCL_SUM("已处理", sp -> { + YZT_HAID_SUM("海堤", sp -> { Map map =new HashMap<>(); map.put("sum","156"); return map; - }, "个", "0"), + }, "个", "0", "3"), - YZT_SUPERVISE_BYGJ_DCL_SUM("待处理", sp -> { + YZT_WYD_SUM("围圩堤", sp -> { Map map =new HashMap<>(); map.put("sum","975"); return map; - }, "个", "0"), + }, "个", "0", "4"), YZT_TOUR_CHECK_RWS_SUM("任务数", sp -> { Map map =new HashMap<>(); BsSgcSzSzrwService service = SpringUtils.getBean(BsSgcSzSzrwService.class); - map.put("sum",String.valueOf(service.count())); + map.put("sum", String.valueOf(service.count(new LambdaQueryWrapper() + .ge(!Objects.isNull(sp.getStartTime()), BsSgcSzSzrw::getCreateTime, sp.getStartTime()) + .le(!Objects.isNull(sp.getStartTime()), BsSgcSzSzrw::getCreateTime, sp.getStartTime())))); return map; - }, "个", "0"), + }, "个", "0", "0"), YZT_TOUR_CHECK_DJD_SUM("待鉴定", sp -> { Map map =new HashMap<>(); BsSgcSzSzrwService service = SpringUtils.getBean(BsSgcSzSzrwService.class); - int countDtb = service.count(new LambdaQueryWrapper().eq(BsSgcSzSzrw::getStatus, 1)); - int countDsh = service.count(new LambdaQueryWrapper().eq(BsSgcSzSzrw::getStatus, 0)); + int countDtb = service.count(new LambdaQueryWrapper() + // 待审核 + .eq(BsSgcSzSzrw::getStatus, 1) + .ge(!Objects.isNull(sp.getStartTime()), BsSgcSzSzrw::getCreateTime, sp.getStartTime()) + .le(!Objects.isNull(sp.getStartTime()), BsSgcSzSzrw::getCreateTime, sp.getStartTime()) + ); + // 待填报 + int countDsh = service.count(new LambdaQueryWrapper() + .eq(BsSgcSzSzrw::getStatus, 0) + .eq(BsSgcSzSzrw::getStatus, 1) + .ge(!Objects.isNull(sp.getStartTime()), BsSgcSzSzrw::getCreateTime, sp.getStartTime()) + .le(!Objects.isNull(sp.getStartTime()), BsSgcSzSzrw::getCreateTime, sp.getStartTime()) + ); map.put("sum",String.valueOf(countDtb+countDsh)); return map; - }, "个", "0"), + }, "个", "0", "0"), YZT_TOUR_CHECK_YJD_SUM("已鉴定", sp -> { Map map =new HashMap<>(); BsSgcSzSzrwService service = SpringUtils.getBean(BsSgcSzSzrwService.class); - int count = service.count(new LambdaQueryWrapper().eq(BsSgcSzSzrw::getStatus, 2)); + int count = service.count(new LambdaQueryWrapper() + .eq(BsSgcSzSzrw::getStatus, 2) + .ge(!Objects.isNull(sp.getStartTime()), BsSgcSzSzrw::getCreateTime, sp.getStartTime()) + .le(!Objects.isNull(sp.getStartTime()), BsSgcSzSzrw::getCreateTime, sp.getStartTime()) + ); map.put("sum",String.valueOf(count)); return map; - }, "个", "0"), + }, "个", "0", "0"), YZT_DISEASE_RISK_WT_NUMBER_SUM("数量", sp -> { Map map =new HashMap<>(); map.put("sum","98"); return map; - }, "个", "0"), + }, "个", "0", "0"), YZT_DISEASE_RISK_WT_problem_SUM("问题数", sp -> { Map map =new HashMap<>(); map.put("sum","56"); return map; - }, "个", "0"), + }, "个", "0", "0"), YZT_DISEASE_RISK_RW_NUMBER_SUM("任务数", sp -> { Map map =new HashMap<>(); map.put("sum","98"); return map; - }, "个", "0"), + }, "个", "0", "0"), YZT_DISEASE_RISK_RW_YWC_SUM("已完成", sp -> { Map map =new HashMap<>(); map.put("sum","30"); return map; - }, "个", "0"), + }, "个", "0", "0"), YZT_DAILY_YB_NUMBER_SUM("一般", sp -> { Map map =new HashMap<>(); - map.put("sum",String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_YB.getValue()))); + map.put("sum", String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_YB.getValue(), sp))); return map; - }, "个", "0"), + }, "个", "0", "2"), YZT_DAILY_JD_NUMBER_SUM("较大", sp -> { Map map =new HashMap<>(); - map.put("sum",String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_JD.getValue()))); + map.put("sum", String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_JD.getValue(), sp))); return map; - }, "个", "0"), + }, "个", "0", "3"), YZT_DAILY_ZD_NUMBER_SUM("重大", sp -> { Map map =new HashMap<>(); - map.put("sum",String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_ZD.getValue()))); + map.put("sum", String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_ZD.getValue(), sp))); return map; - }, "个", "0"), + }, "个", "0", "4"), YZT_DAILY_JJ_NUMBER_SUM("零星", sp -> { Map map =new HashMap<>(); - map.put("sum",String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_LX.getValue()))); + map.put("sum", String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_LX.getValue(), sp))); return map; - }, "个", "0"), + }, "个", "0", "1"), YZT_DAILY_BL_NUMBER_SUM("比例", sp -> { Map map =new HashMap<>(); - map.put("bl",getYhSum()); + map.put("bl", getYhSum(sp)); return map; - }, "个", "0"), + }, "个", "0", "0"), @@ -472,32 +556,47 @@ public enum StaticIndexEnum { private final Statistic source; private final String unit; private final String defaultValue; + private final String sort; - StaticIndexEnum(String zhName, Statistic source, String unit, String defaultValue) { + StaticIndexEnum(String zhName, Statistic source, String unit, String defaultValue, String sort) { this.zhName = zhName; this.source = source; this.unit = unit; this.defaultValue = defaultValue; + this.sort = sort; } - public static int getProblemGrade(String dj) { + + public static int getProblemGrade(String dj, ObjectStatisticQueDto sp) { DfCheckingProblemV2Service dfQxService = SpringUtils.getBean(DfCheckingProblemV2Service.class); SzCheckingProblemV2Service szQxService = SpringUtils.getBean(SzCheckingProblemV2Service.class); - int dfCount = dfQxService.count(new LambdaQueryWrapper().eq(DfCheckingProblemV2::getProblemLevel, dj)); - int szCount = szQxService.count(new LambdaQueryWrapper().eq(SzCheckingProblemV2::getProblemLevel, dj)); + int dfCount = dfQxService.count(new LambdaQueryWrapper() + .eq(DfCheckingProblemV2::getProblemLevel, dj) + .ge(!Objects.isNull(sp.getStartTime()), DfCheckingProblemV2::getCreateTime, sp.getStartTime()) + .le(!Objects.isNull(sp.getStartTime()), DfCheckingProblemV2::getCreateTime, sp.getStartTime()) + ); + int szCount = szQxService.count(new LambdaQueryWrapper() + .eq(SzCheckingProblemV2::getProblemLevel, dj) + .ge(!Objects.isNull(sp.getStartTime()), SzCheckingProblemV2::getCreateTime, sp.getStartTime()) + .le(!Objects.isNull(sp.getStartTime()), SzCheckingProblemV2::getCreateTime, sp.getStartTime()) + ); return dfCount+szCount; } - public static String getYhSum() { + public static String getYhSum(ObjectStatisticQueDto sp) { DfYhV2Service dfYhV2Service = SpringUtils.getBean(DfYhV2Service.class); SzYhV2Service szYhV2Service = SpringUtils.getBean(SzYhV2Service.class); - int dfCount = dfYhV2Service.count(); - int szCount = szYhV2Service.count(); - - int yb = getProblemGrade(PatrolMaintenanceCategory.DJ_YB.getValue()); - int jd = getProblemGrade(PatrolMaintenanceCategory.DJ_JD.getValue()); - int zd = getProblemGrade(PatrolMaintenanceCategory.DJ_ZD.getValue()); - int lx = getProblemGrade(PatrolMaintenanceCategory.DJ_LX.getValue()); + int dfCount = dfYhV2Service.count(new LambdaQueryWrapper() + .ge(!Objects.isNull(sp.getStartTime()), DfYhV2::getCreateTime, sp.getStartTime()) + .le(!Objects.isNull(sp.getStartTime()), DfYhV2::getCreateTime, sp.getStartTime())); + int szCount = szYhV2Service.count(new LambdaQueryWrapper() + .ge(!Objects.isNull(sp.getStartTime()), SzYhV2::getCreateTime, sp.getStartTime()) + .le(!Objects.isNull(sp.getStartTime()), SzYhV2::getCreateTime, sp.getStartTime())); + + int yb = getProblemGrade(PatrolMaintenanceCategory.DJ_YB.getValue(), sp); + int jd = getProblemGrade(PatrolMaintenanceCategory.DJ_JD.getValue(), sp); + int zd = getProblemGrade(PatrolMaintenanceCategory.DJ_ZD.getValue(), sp); + int lx = getProblemGrade(PatrolMaintenanceCategory.DJ_LX.getValue(), sp); BigDecimal bl= BigDecimal.valueOf(0); BigDecimal qxCount = BigDecimal.valueOf(dfCount + szCount); diff --git a/shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfCheckingRecordV2Mapper.java b/shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfCheckingRecordV2Mapper.java index 302b78e5..f3b9a7df 100644 --- a/shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfCheckingRecordV2Mapper.java +++ b/shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfCheckingRecordV2Mapper.java @@ -69,7 +69,7 @@ public interface DfCheckingRecordV2Mapper extends BaseMapper { List countDateGroup(@Param("data") ObjectStatisticQueDto sp, @Param("category") PatrolMaintenanceCategory category); @Select("