From afe39de165c889437c328b47ceaef511921efa1f Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 26 Aug 2020 15:29:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=20=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=85=A5?= =?UTF-8?q?=E5=8F=82=E5=A2=9E=E5=8A=A0=EF=BC=9AallParentIds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/screencoll/form/CustomerGridFormDTO.java | 5 +++++ .../epmet/dto/screencoll/form/DifficultyDataFormDTO.java | 6 +++++- .../com/epmet/dto/screencoll/form/EventDataFormDTO.java | 5 +++++ .../com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java | 5 +++++ .../epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java | 5 +++++ .../com/epmet/entity/screen/ScreenCustomerGridEntity.java | 4 ++++ .../com/epmet/entity/screen/ScreenDifficultyDataEntity.java | 4 ++++ .../java/com/epmet/entity/screen/ScreenEventDataEntity.java | 4 ++++ .../com/epmet/entity/screen/ScreenOrgRankDataEntity.java | 4 ++++ .../epmet/entity/screen/ScreenPartyUserRankDataEntity.java | 4 ++++ .../main/resources/mapper/screen/ScreenCustomerGridDao.xml | 6 ++++-- .../resources/mapper/screen/ScreenDifficultyDataDao.xml | 6 ++++-- .../src/main/resources/mapper/screen/ScreenEventDataDao.xml | 6 ++++-- .../main/resources/mapper/screen/ScreenOrgRankDataDao.xml | 6 ++++-- .../resources/mapper/screen/ScreenPartyUserRankDataDao.xml | 6 ++++-- 15 files changed, 65 insertions(+), 11 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java index 38094a105a..75eb13a0fa 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java @@ -48,4 +48,9 @@ public class CustomerGridFormDTO implements Serializable { * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) */ private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java index 7d136c4b27..e446e073a3 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java @@ -94,9 +94,13 @@ public class DifficultyDataFormDTO implements Serializable { */ private Integer eventHandledCount; - /** * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) */ private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java index 21e8ee718e..6c2cbe43a5 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java @@ -121,4 +121,9 @@ public class EventDataFormDTO implements Serializable { * 数据更新至: yyyy|yyyMM|yyyyMMdd 8.21增加字段 */ private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java index 8b0a753839..5e962e47bb 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java @@ -79,4 +79,9 @@ public class OrgRankDataFormDTO implements Serializable { * 满意率,最大值100,保留小数点后四位 */ private BigDecimal satisfactionRatio; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java index 29b35aa147..5d9f5da32b 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java @@ -73,4 +73,9 @@ public class PartyUserRankDataFormDTO implements Serializable { * 名 */ private String name; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java index 99b6c99553..62dddc6960 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java @@ -78,4 +78,8 @@ public class ScreenCustomerGridEntity extends BaseEpmetEntity { */ private String dataEndTime; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java index 845bbb7db0..9a4d3af36b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java @@ -127,4 +127,8 @@ public class ScreenDifficultyDataEntity extends BaseEpmetEntity { */ private String dataEndTime; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java index e666f852b0..0242ab8ce2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java @@ -144,4 +144,8 @@ public class ScreenEventDataEntity extends BaseEpmetEntity { */ private String dataEndTime; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java index a732eda4b9..abbdbb7d20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java @@ -109,4 +109,8 @@ public class ScreenOrgRankDataEntity extends BaseEpmetEntity { */ private BigDecimal satisfactionRatio; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java index 702e184439..c542da7085 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java @@ -98,4 +98,8 @@ public class ScreenPartyUserRankDataEntity extends BaseEpmetEntity { */ private String dataEndTime; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 5381e9ddd2..9a37bd23c0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -29,7 +29,8 @@ CREATED_TIME, UPDATED_BY, UPDATED_TIME, - DATA_END_TIME + DATA_END_TIME, + ALL_PARENT_IDS ) values ( @@ -47,7 +48,8 @@ now(), 'APP_USER', now(), - #{item.dataEndTime} + #{item.dataEndTime}, + #{item.allParentIds} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index e26c43115c..fb9a087e42 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -35,7 +35,8 @@ UPDATED_BY, UPDATED_TIME, LATEST_OPERATE_DESC, - DATA_END_TIME + DATA_END_TIME, + ALL_PARENT_IDS ) values ( @@ -63,7 +64,8 @@ 'APP_USER', now(), #{item.latestOperateDesc}, - #{item.dataEndTime} + #{item.dataEndTime}, + #{item.allParentIds} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml index be95b118df..9c950e18e1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -38,7 +38,8 @@ EVENT_STATUS_CODE, EVENT_STATUS_DESC, LATEST_OPERATE_DESC, - DATA_END_TIME + DATA_END_TIME, + ALL_PARENT_IDS ) values ( @@ -69,7 +70,8 @@ #{item.eventStatusCode}, #{item.eventStatusDesc}, #{item.latestOperateDesc}, - #{item.dataEndTime} + #{item.dataEndTime}, + #{item.allParentIds} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml index 4ebe5e2c28..345deacd5d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -35,7 +35,8 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + ALL_PARENT_IDS ) values ( @@ -59,7 +60,8 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.allParentIds} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 070e952878..cf93e38a5f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -29,7 +29,8 @@ CREATED_TIME, UPDATED_BY, UPDATED_TIME, - DATA_END_TIME + DATA_END_TIME, + ALL_PARENT_IDS ) values ( @@ -51,7 +52,8 @@ now(), 'APP_USER', now(), - #{item.dataEndTime} + #{item.dataEndTime}, + #{item.allParentIds} ) From 389f2401dab5315c0dc4c84dba9ad07f96662da1 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 26 Aug 2020 15:29:30 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9->=20?= =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=BC=95=E9=A2=86=EF=BC=9A=204=E3=80=81?= =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=8E=92=E8=A1=8C=E6=A6=9C=E5=8D=95-?= =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=94=AF=E9=83=A8=E6=8E=92=E8=A1=8C=205?= =?UTF-8?q?=E3=80=81=E5=85=88=E8=BF=9B=E6=8E=92=E8=A1=8C=E6=A6=9C=E5=8D=95?= =?UTF-8?q?-=E5=85=88=E8=BF=9B=E5=85=9A=E5=91=98=E6=8E=92=E8=A1=8C=20?= =?UTF-8?q?=E5=9F=BA=E5=B1=82=E6=B2=BB=E7=90=86=EF=BC=9A=201=E3=80=81?= =?UTF-8?q?=E7=83=AD=E5=BF=83=E5=B8=82=E6=B0=91=E7=A7=AF=E5=88=86=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=202=E3=80=81=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9-?= =?UTF-8?q?=E8=80=97=E6=97=B6=E6=9C=80=E9=95=BF|=E6=B6=89=E5=8F=8A?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=9C=80=E5=A4=9A|=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=20=E4=BD=BF=E7=94=A8ALL=5FPARENT=5FIDS?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E6=A8=A1=E7=B3=8A=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenDifficultyDataDao.xml | 2 +- .../src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml | 2 +- .../resources/mapper/screen/ScreenPartyUserRankDataDao.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index e77b00012b..77f6fb0108 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -22,7 +22,7 @@ AND eve.DEL_FLAG = '0' WHERE diff.DEL_FLAG = '0' - AND diff.PARENT_ID = #{agencyId} + AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') ORDER BY CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml index 26007e2997..b15df8d588 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -17,7 +17,7 @@ screen_org_rank_data WHERE DEL_FLAG = '0' - AND PARENT_ID = #{agencyId} + AND all_parent_ids LIKE CONCAT('%',#{agencyId},'%') AND MONTH_ID = #{monthId} ORDER BY (PARTY_TOTAL + GROUP_TOTAL + ISSUE_TOTAL + PROJECT_TOTAL + CLOSE_PROJECT_RATIO + SATISFACTION_RATIO) DESC, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 66fb4d6a80..a61e832fab 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -12,7 +12,7 @@ screen_party_user_rank_data WHERE del_flag = '0' - AND org_id = #{agencyId} + AND all_parent_ids LIKE CONCAT('%',#{agencyId},'%') ORDER BY point_total DESC, user_name @@ -30,7 +30,7 @@ screen_party_user_rank_data WHERE DEL_FLAG = '0' - AND ORG_ID = #{agencyId} + AND all_parent_ids LIKE CONCAT('%',#{agencyId},'%') AND PARTY_FLAG = '1' ORDER BY POINT_TOTAL DESC From e7866cd5f13ced39566c6d127baeadd6b97ffae7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 26 Aug 2020 15:39:57 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcal/CalculateCommonFormDTO.java | 1 + .../dto/indexcal/CustomerGridInfoDTO.java | 28 +++++ .../dto/indexcal/ExtremeValueCommonDTO.java | 1 + .../dto/screen/ScreenCustomerGridDTO.java | 116 ++++++++++++++++++ .../dao/screen/ScreenCustomerGridDao.java | 19 +++ .../indexcal/GridCorreLationService.java | 1 + .../impl/GridCorreLationServiceImpl.java | 39 +++++- .../mapper/screen/ScreenCustomerGridDao.xml | 23 ++++ 8 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java index 1d56dd17b1..4c43a57890 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java @@ -12,6 +12,7 @@ import java.io.Serializable; */ @Data public class CalculateCommonFormDTO implements Serializable { + private static final long serialVersionUID = -5689788391963427717L; /** * 月份id: yyyyMM */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java new file mode 100644 index 0000000000..16ede875bb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.indexcal; + +import com.epmet.dto.ScreenCustomerGridDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 客户下所有网格 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 13:45 + */ +@Data +public class CustomerGridInfoDTO implements Serializable { + private static final long serialVersionUID = -3211409107659568304L; + + /** + * 网格总数 + */ + private Integer total; + + /** + * 网格列表 + */ + private List gridList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java index 63dbb58262..fd383a61dd 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java @@ -14,6 +14,7 @@ import java.math.BigDecimal; @Data public class ExtremeValueCommonDTO implements Serializable { + private static final long serialVersionUID = -6295067080250068024L; /** * 最小值 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java new file mode 100644 index 0000000000..ee7863d40b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 网格(党支部)信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-26 + */ +@Data +public class ScreenCustomerGridDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID 主键ID + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党支部(=网格)的位置 + */ + private String partyMark; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java index c9fa856582..60f5a64ef4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; import com.epmet.entity.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; @@ -55,4 +56,22 @@ public interface ScreenCustomerGridDao extends BaseDao * @Date 10:52 2020-08-18 **/ void batchInsertCustomerGrid(@Param("list") List list, @Param("customerId")String customerId); + + /** + * @return java.lang.Integer + * @param customerId + * @author yinzuomei + * @description 查询客户下网格总数 + * @Date 2020/8/26 15:33 + **/ + Integer selectCountByCustomerId(@Param("customerId") String customerId); + + /** + * @return java.util.List + * @param customerId + * @author yinzuomei + * @description 查询客户下网格信息 + * @Date 2020/8/26 15:33 + **/ + List selectListByCustomerId(@Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java index 89001f5d4f..7b7905a535 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java @@ -1,5 +1,6 @@ package com.epmet.service.indexcal; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.indexcal.CalculateCommonFormDTO; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 70a6a9222b..a192fafc6a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,7 +1,18 @@ package com.epmet.service.indexcal.impl; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.dto.indexcal.CustomerGridInfoDTO; import com.epmet.service.indexcal.GridCorreLationService; +import io.swagger.annotations.Authorization; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** @@ -12,6 +23,16 @@ import org.springframework.stereotype.Service; */ @Service public class GridCorreLationServiceImpl implements GridCorreLationService { + private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); + @Autowired + private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; + @Autowired + private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao; + @Autowired + private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; + /** * @param formDTO @@ -22,6 +43,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ @Override public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { - return null; + return true; + } + + + + /** + * @return com.epmet.dto.indexcal.CustomerGridInfoDTO + * @param customerId + * @author yinzuomei + * @description 查询客户下网格信息 + * @Date 2020/8/26 15:37 + **/ + public CustomerGridInfoDTO queryCustomerGridInfo(String customerId){ + CustomerGridInfoDTO customerGridInfoDTO=new CustomerGridInfoDTO(); + customerGridInfoDTO.setTotal(screenCustomerGridDao.selectCountByCustomerId(customerId)); + customerGridInfoDTO.setGridList(screenCustomerGridDao.selectListByCustomerId(customerId)); + return customerGridInfoDTO; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 5381e9ddd2..80450ccb6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -52,4 +52,27 @@ + + + + + From 3538826d9d63ee27cd540d785588976d7bce8d42 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Aug 2020 16:13:01 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=A6=81=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E7=9A=84=E6=8C=87=E6=A0=87=E6=98=8E=E7=BB=86=E6=9D=83?= =?UTF-8?q?=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/screen/IndexGroupDetailDTO.java | 60 +++++++++++++++++++ .../screen/result/IndexGroupDetailResult.java | 28 +++++++++ .../com/epmet/dao/screen/IndexGroupDao.java | 4 ++ .../epmet/dao/screen/IndexGroupDetailDao.java | 6 +- .../entity/screen/IndexGroupDetailEntity.java | 10 ++++ .../IndexGroupDetailTemplateEntity.java | 5 ++ .../epmet/model/IndexExcelDataListener.java | 23 ++++--- .../screen/IndexGroupDetailService.java | 9 ++- .../impl/IndexCalculateServiceImpl.java | 6 ++ .../impl/IndexGroupDetailServiceImpl.java | 16 +++++ .../mapper/screen/IndexGroupDetailDao.xml | 5 ++ .../screen/IndexGroupDetailTemplateDao.xml | 2 +- 12 files changed, 162 insertions(+), 12 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java new file mode 100644 index 0000000000..efe372f027 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java @@ -0,0 +1,60 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.screen; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +public class IndexGroupDetailDTO { + + private static final long serialVersionUID = 1L; + + /** + * index_group.id + */ + private String indexGroupId; + + /** + * 指标id + */ + private String indexId; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 阈值 如果是百分比 则为除以100以后的值 + */ + private BigDecimal threshold; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java new file mode 100644 index 0000000000..0d6cea89c8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java @@ -0,0 +1,28 @@ +package com.epmet.dto.screen.result; + +import com.epmet.dto.screen.IndexGroupDetailDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * desc:计算指标时 获取要计算的组的指标 + * + * @author liujianjun + */ +@Data +public class IndexGroupDetailResult implements Serializable { + private static final long serialVersionUID = 3937041236261115759L; + + /** + * 是否有下一组 + */ + private Boolean hasNextGroup; + + /** + * desc:指标详情列表 如果hasNextGroup是true则返回的是明细,否则返回的是上级的分组的指标明细 + * 例如:网格的三大能力上次已经返回完毕,下一次调用时返回的是网格相关的三大能力的 指标明细 + */ + private List indexGroupDetailList; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java index 5458720940..c873ffdb0b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java @@ -21,6 +21,8 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.IndexGroupEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 客户指标分组 * @@ -31,4 +33,6 @@ import org.apache.ibatis.annotations.Mapper; public interface IndexGroupDao extends BaseDao { int inertGroupFromTable(String customerId); + + List getDetailByCode(String indexCode, Integer offset); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java index 1a7dd4a0a8..8c7a4e82fb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java @@ -20,6 +20,9 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.IndexGroupDetailEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 客户指标详情 @@ -29,5 +32,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IndexGroupDetailDao extends BaseDao { - + + List getDetailListByParentCode(@Param("customerId") String customerId, @Param("indexCode") String indexCode); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java index c0088d5383..1336dd050f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java @@ -62,4 +62,14 @@ public class IndexGroupDetailEntity extends BaseEpmetEntity { */ private String status; + /** + * 阈值 如果是百分比 则为除以100以后的值 + */ + private BigDecimal threshold; + + /** + * 所有指标code拼接的字符串 冒号隔开 + */ + private String allParentIndexCode; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java index 569cda48d9..20162b1198 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java @@ -62,4 +62,9 @@ public class IndexGroupDetailTemplateEntity extends BaseEpmetEntity { */ private BigDecimal threshold; + /** + * 所有指标code拼接的字符串 冒号隔开 + */ + private String allParentIndexCode; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 931b9afd55..d19fb1d628 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -3,6 +3,7 @@ package com.epmet.model; import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.UniqueIdGenerator; import com.epmet.entity.screen.IndexDictEntity; import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; @@ -122,7 +123,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(index.getLevel1Index(), group1); } - + StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); String level2GroupId = UniqueIdGenerator.generate(); @@ -139,14 +140,16 @@ public class IndexExcelDataListener extends AnalysisEventListener { //构建 分组明细 templateEntity = indexGroupDetailMap.get(level4Index); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2); + buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); + allIndexCodeSb.append(StrConstant.COLON); + allIndexCodeSb.append(group2.getIndexCode()); templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5); + buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5); } } else { //todo 测试完去掉 @@ -162,7 +165,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(index.getLevel1Index(), group1); } - + StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); String level2GroupId = UniqueIdGenerator.generate(); @@ -179,14 +182,15 @@ public class IndexExcelDataListener extends AnalysisEventListener { //构建 分组明细 templateEntity = indexGroupDetailMap.get(level2Index); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2); + buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); - + allIndexCodeSb.append(StrConstant.COLON); + allIndexCodeSb.append(group2.getIndexCode()); templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5); + buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5); } } //} @@ -195,10 +199,11 @@ public class IndexExcelDataListener extends AnalysisEventListener { LOGGER.info("所有指标分组明细数据解析完成:{}", JSON.toJSONString(indexGroupDetailMap.values())); } - private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, String groupId, Integer level) { + private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, IndexGroupTemplateEntity parentGroup, String allIndexCode, Integer level) { IndexGroupDetailTemplateEntity templateEntity; templateEntity = new IndexGroupDetailTemplateEntity(); - templateEntity.setIndexGroupId(groupId); + templateEntity.setIndexGroupId(parentGroup.getId()); + templateEntity.setAllParentIndexCode(allIndexCode); templateEntity.setIndexId(indexDictEntity.getId()); if (level == 5) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java index ea03e298a1..aa69cba8e7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java @@ -20,6 +20,8 @@ package com.epmet.service.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.entity.screen.IndexGroupDetailEntity; +import java.util.List; + /** * 客户指标详情 * @@ -27,5 +29,10 @@ import com.epmet.entity.screen.IndexGroupDetailEntity; * @since v1.0.0 2020-08-19 */ public interface IndexGroupDetailService extends BaseService { - + /** + * desc:根据all_parent_index_code 获取指标明细 + * @param customerId + * @param indexCode + */ + List getDetailListByParentCode(String customerId,String... indexCode); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java index 54a368044b..d51cf3ea88 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java @@ -3,6 +3,8 @@ package com.epmet.service.screen.impl; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.screen.IndexGroupDao; +import com.epmet.dao.screen.IndexGroupDetailDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; @@ -31,6 +33,10 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @Autowired private GridCorreLationService gridCorreLationService; + @Autowired + private IndexGroupDao indexGroupDao; + @Autowired + private IndexGroupDetailDao indexGroupDetailDao; @Override public Boolean indexCalculate(IndexCalculateForm formDTO) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java index db9fe1f411..6c22b360d6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java @@ -18,11 +18,15 @@ package com.epmet.service.screen.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.dao.screen.IndexGroupDetailDao; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.service.screen.IndexGroupDetailService; import org.springframework.stereotype.Service; +import java.util.List; + /** * 客户指标详情 * @@ -33,4 +37,16 @@ import org.springframework.stereotype.Service; public class IndexGroupDetailServiceImpl extends BaseServiceImpl implements IndexGroupDetailService { + @Override + public List getDetailListByParentCode(String customerId,String... indexCode) { + if (indexCode == null || indexCode.length == 0){ + throw new RenException("参数错误"); + } + StringBuilder sb = new StringBuilder(); + for (String code:indexCode){ + sb.append(code).append(StrConstant.COLON); + } + sb = sb.deleteCharAt(sb.length()); + return baseDao.getDetailListByParentCode(customerId,sb.toString()); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml index b7854f3338..ac4ad73bd5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml @@ -3,4 +3,9 @@ + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml index c044654dd8..8ec562b386 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml @@ -7,7 +7,7 @@ delete from index_group_detail_template