From 2b7d44b2316339334bffae0214dee6068f18572e Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 1 Jul 2021 08:52:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=B0=86?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=840.0.14=20flyway=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=94=B9=E4=B8=BAselect=200;=E8=B7=B3=E8=BF=87=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.14__alter_project_location.sql | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql index 02284815d2..7a51a3f595 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql @@ -1,6 +1 @@ -ALTER TABLE `project` -ADD COLUMN `LOCATE_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置]' AFTER `ORG_ID_PATH`, -ADD COLUMN `LOCATE_LONGITUDE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位经度' AFTER `LOCATE_ADDRESS`, -ADD COLUMN `LOCATE_DIMENSION` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位维度' AFTER `LOCATE_LONGITUDE`; - - +select 0; \ No newline at end of file From 8c66070b638be39e70cb64b408c9ac8083ce7e2f Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 1 Jul 2021 09:04:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=EF=BC=9A=E6=97=A0?= =?UTF-8?q?=E6=95=88=E7=9A=84flyway=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.14__alter_project_location.sql | 1 - .../src/main/resources/db/migration/V0.0.15__update_project.sql | 2 -- 2 files changed, 3 deletions(-) delete mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql delete mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.15__update_project.sql diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql deleted file mode 100644 index 7a51a3f595..0000000000 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql +++ /dev/null @@ -1 +0,0 @@ -select 0; \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.15__update_project.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.15__update_project.sql deleted file mode 100644 index 66e3aed7a3..0000000000 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.15__update_project.sql +++ /dev/null @@ -1,2 +0,0 @@ -update project set locate_address = NULL,locate_longitude = NULL,locate_dimension = NULL; - From b8c9aeab539155a03d8c23a99fee10ab17d826b6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 1 Jul 2021 10:16:19 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8C=87=E6=95=B0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0customerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenIndexDataMonthlyDao.java | 4 +++- .../evaluationindex/screen/ScreenIndexDataYearlyDao.java | 2 +- .../evaluationindex/screen/impl/IndexServiceImpl.java | 8 ++++++-- .../mapper/screen/ScreenIndexDataMonthlyDao.xml | 9 +++++++++ .../resources/mapper/screen/ScreenIndexDataYearlyDao.xml | 3 +++ 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index abb857fb14..976c3c85b4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -47,7 +47,9 @@ public interface ScreenIndexDataMonthlyDao{ * @author zxc * @date 2020/8/20 9:02 上午 */ - List selectMonthBarchart(@Param("agencyId")String agencyId,@Param("monthId") String monthId); + List selectMonthBarchart(@Param("agencyId")String agencyId, + @Param("monthId") String monthId, + @Param("customerId")String customerId); /** * @param subAgencyIndexRankFormDTO diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java index 4300b76ea3..6735487317 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java @@ -40,7 +40,7 @@ public interface ScreenIndexDataYearlyDao{ * @author zxc * @date 2020/8/19 3:43 下午 */ - YearAverageIndexResultDTO selectYearAverageIndex(@Param("agencyId")String agencyId); + YearAverageIndexResultDTO selectYearAverageIndex(@Param("agencyId")String agencyId,@Param("customerId")String customerId); /** * 5、下级部门指数排行(安宁数据段用) - 年 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 12c470cd25..993c590f05 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -53,7 +53,7 @@ public class IndexServiceImpl implements IndexService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO) { - YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId()); + YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId(),yearAverageIndexFormDTO.getCustomerId()); if (null == yearAverageIndexResultDTO){ return new YearAverageIndexResultDTO(); } @@ -119,7 +119,9 @@ public class IndexServiceImpl implements IndexService { result.setXAxis(partyMemberLeadServiceImpl.getXPro()); } // 2. 查询近一年的指数值【包括本月】 - List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(monthBarchartFormDTO.getAgencyId(),monthBarchartFormDTO.getMonthId()); + List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(monthBarchartFormDTO.getAgencyId(), + monthBarchartFormDTO.getMonthId(), + monthBarchartFormDTO.getCustomerId()); if (monthBarchartResults.size() == NumConstant.ZERO){ for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO); @@ -233,8 +235,10 @@ public class IndexServiceImpl implements IndexService { subAgencyIndexRankFormDTO.setYearId(String.valueOf(yearId)); List subAgencyIndexRankResultDTOS = new ArrayList<>(); if (StringUtils.isNotEmpty(subAgencyIndexRankFormDTO.getAreaCode())){ + //area_code不为空,多客户 subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectSubAgencyIndexRankNew(subAgencyIndexRankFormDTO); }else { + //单客户 subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectSubAgencyIndexRank(subAgencyIndexRankFormDTO); } if (CollectionUtils.isEmpty(subAgencyIndexRankResultDTOS)){ diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 26c21cd8b1..f00cc4c23e 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -43,6 +43,9 @@ WHERE del_flag = '0' AND org_id = #{agencyId} + + and customer_id = #{customerId} + AND MONTH_ID <= #{monthId} @@ -64,6 +67,9 @@ AND parent_id = #{agencyId} AND year_id = #{yearId} AND ORG_TYPE != 'department' + + and customer_id = #{customerId} + ORDER BY index_total DESC LIMIT #{topNum} @@ -327,6 +333,9 @@ AND ca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND y.year_id = #{yearId} AND y.ORG_TYPE != 'department' + + and y.customer_id = #{customerId} + ORDER BY y.index_total DESC LIMIT #{topNum} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index 4184ecd513..ad0132dd85 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -15,6 +15,9 @@ WHERE del_flag = '0' AND org_id = #{agencyId} + + and customer_id=#{customerId} + order by year_id desc limit 1