From e1d4e2dbdc7b05e24ff22a1bfab8b0e42ce9ca73 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Wed, 30 Jun 2021 17:14:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=9F=BA=E7=A1=80=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/CommunityGroupTotalResultDTO.java | 2 +- .../result/CommunityHotTopicResultDTO.java | 4 +- .../result/CommunityIssueResultDTO.java | 2 +- .../result/CommunityProjectResultDTO.java | 2 +- .../result/CommunityTopicIssueResultDTO.java | 2 +- .../result/CommunityTopicStatusResultDTO.java | 2 +- .../screen/result/CommunityUserResultDTO.java | 2 +- .../result/GridGridProjectResultDTO.java | 2 +- .../result/GridGroupTotalResultDTO.java | 2 +- .../screen/result/GridHotTopicResultDTO.java | 4 +- .../dto/screen/result/GridIssueResultDTO.java | 2 +- .../result/GridTopicIssueResultDTO.java | 2 +- .../result/GridTopicStatusResultDTO.java | 2 +- .../dto/screen/result/GridUserResultDTO.java | 2 +- .../screen/result/UploadProjectInfoDTO.java | 7 + .../impl/ScreenBaseReportDataServiceImpl.java | 6 +- .../mapper/screen/ScreenBaseReportDataDao.xml | 1542 +++++++++++++++-- .../mapper/screen/ScreenProjectDataDao.xml | 8 +- .../ScreenBaseReportDataPushTaskImpl.java | 2 +- 19 files changed, 1442 insertions(+), 155 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityGroupTotalResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityGroupTotalResultDTO.java index 052c9819..5c9b12a6 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityGroupTotalResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityGroupTotalResultDTO.java @@ -19,7 +19,7 @@ public class CommunityGroupTotalResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityHotTopicResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityHotTopicResultDTO.java index 4292e2bb..acc19803 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityHotTopicResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityHotTopicResultDTO.java @@ -14,12 +14,10 @@ public class CommunityHotTopicResultDTO implements Serializable { private static final long serialVersionUID = 1L; - - /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityIssueResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityIssueResultDTO.java index 61b93f06..126b0ad3 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityIssueResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityIssueResultDTO.java @@ -19,7 +19,7 @@ public class CommunityIssueResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityProjectResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityProjectResultDTO.java index 4d6757e8..99f9a7a0 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityProjectResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityProjectResultDTO.java @@ -19,7 +19,7 @@ public class CommunityProjectResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicIssueResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicIssueResultDTO.java index 9eb3473d..c8fb13c3 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicIssueResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicIssueResultDTO.java @@ -19,7 +19,7 @@ public class CommunityTopicIssueResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicStatusResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicStatusResultDTO.java index e3c055ad..85555855 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicStatusResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicStatusResultDTO.java @@ -19,7 +19,7 @@ public class CommunityTopicStatusResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityUserResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityUserResultDTO.java index 39d5744d..5d611e40 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityUserResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityUserResultDTO.java @@ -19,7 +19,7 @@ public class CommunityUserResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGridProjectResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGridProjectResultDTO.java index f27483fd..61b290bb 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGridProjectResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGridProjectResultDTO.java @@ -19,7 +19,7 @@ public class GridGridProjectResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGroupTotalResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGroupTotalResultDTO.java index 0927b415..fc883b88 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGroupTotalResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGroupTotalResultDTO.java @@ -19,7 +19,7 @@ public class GridGroupTotalResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridHotTopicResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridHotTopicResultDTO.java index 59287ddb..3fb0ebe7 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridHotTopicResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridHotTopicResultDTO.java @@ -19,7 +19,7 @@ public class GridHotTopicResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id @@ -29,7 +29,7 @@ public class GridHotTopicResultDTO implements Serializable { /** * 网格ID */ - private String grid; + private String gridId; /** * 日期ID diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridIssueResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridIssueResultDTO.java index 256b0ba0..5863d8ef 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridIssueResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridIssueResultDTO.java @@ -19,7 +19,7 @@ public class GridIssueResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicIssueResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicIssueResultDTO.java index 16ac8d19..f82a6e1c 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicIssueResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicIssueResultDTO.java @@ -19,7 +19,7 @@ public class GridTopicIssueResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicStatusResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicStatusResultDTO.java index dc99e72d..ba6b81eb 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicStatusResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicStatusResultDTO.java @@ -19,7 +19,7 @@ public class GridTopicStatusResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridUserResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridUserResultDTO.java index b236e421..87384d1f 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridUserResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridUserResultDTO.java @@ -19,7 +19,7 @@ public class GridUserResultDTO implements Serializable { /** * 客户Id */ - private String customId; + private String customerId; /** * 机关id:网格所属的组织id diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/UploadProjectInfoDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/UploadProjectInfoDTO.java index 8e43180b..f235c1fc 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/UploadProjectInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/UploadProjectInfoDTO.java @@ -108,4 +108,11 @@ public class UploadProjectInfoDTO implements Serializable { */ private String projectLevel; + /** + * 满意度得分 + */ + private Integer satisfactionScore; + + + } diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenBaseReportDataServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenBaseReportDataServiceImpl.java index f13f9e62..1266c1c0 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenBaseReportDataServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenBaseReportDataServiceImpl.java @@ -24,7 +24,7 @@ public class ScreenBaseReportDataServiceImpl extends BaseServiceImpl communityTopicIssueResultDTOS = baseDao.selectCommunityTopicIssueList(customerId); - String dataJson = ScreenDataUtils.getScreenDateJson(communityTopicIssueResultDTOS,true); + List communityGroupTotalResultDTOS = baseDao.selectCommunityGroupTotalList(customerId); + String dataJson = ScreenDataUtils.getScreenDateJson(communityGroupTotalResultDTOS,true); // 数据上报 epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_AGENCY_GROUP_TOTAL, dataJson); return new Result(); diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenBaseReportDataDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenBaseReportDataDao.xml index 45b529a5..c06566a7 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenBaseReportDataDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenBaseReportDataDao.xml @@ -6,9 +6,10 @@ - select - grid.id as gridId, - grid.pid as agencyId, - #{customId} as customerId, - DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') as dateId, - CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'), - 'W', - WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId, - DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId, - CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'), - 'Q', - QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), - '%Y-%m-%d'))) quarterId, - DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId, - count(eg.ID) as groupTotal, - count(eg.ID) as ordinaryTotal, - 0 as branchTotal - from esua_epdc_admin.sys_dept grid - left join esua_epdc_group.epdc_group eg on eg.GRID_ID = grid.id and eg.DEL_FLAG ='0' - where grid.del_flag = '0' - and grid.type_key = 'grid_party' - and grid.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0') - and DATE_FORMAT(eg.CREATED_TIME, '%Y-%m-%d') <= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') - group by grid.id + select grid.id as gridId, + grid.pid as agencyId, + '${customId}' as customerId, + DATE_FORMAT(date_add(now(), interval -1 day), '%Y%m%d') as dateId, + CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'), + 'W', + WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId, + DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId, + CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'), + 'Q', + QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), + '%Y-%m-%d'))) quarterId, + DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId, + ifnull(community.groupTotal,0) as groupTotal, + ifnull(community.ordinaryTotal,0) as ordinaryTotal, + ifnull(community.branchTotal,0) as branchTotal +from esua_epdc_admin.sys_dept grid + left join + + ( + select community.id as communityId, + count(eg.ID) as groupTotal, + count(eg.ID) as ordinaryTotal, + 0 as branchTotal + from esua_epdc_admin.sys_dept community + left join esua_epdc_party_group.epdc_party_group eg + on eg.`DEPT_ID` = community.id and eg.DEL_FLAG = '0' + where community.del_flag = '0' + and community.type_key = 'community_party' + and community.id not in + (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0') + and DATE_FORMAT(eg.CREATED_TIME, '%Y-%m-%d') <= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') + group by community.id) community on community.communityId = grid.pid +where grid.del_flag = '0' and grid.type_key = 'grid_party' +and grid.id not in + (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0') + - + - - - - + resultType="com.elink.esua.epdc.dto.screen.result.CommunityHotTopicResultDTO"> + SELECT + '${customId}' as customerId, + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y%m%d' + ) AS dateId, + CONCAT( + DATE_FORMAT( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y' + ), + '%Y' + ), + 'W', + WEEK ( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y-%m-%d' + ) + ) + ) weekId, + DATE_FORMAT( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y' + ), + '%Y' + ) AS yearId, + CONCAT( + DATE_FORMAT( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y' + ), + '%Y' + ), + 'Q', + QUARTER ( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y-%m-%d' + ) + ) + ) quarterId, + DATE_FORMAT( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y-%m' + ), + '%Y%m' + ) AS monthId, + sdp.id AS agencyId, + sdp.pid AS pid, + COUNT(0) AS topicTotal, + 'hot_discuss' AS STATUS, + SUM( + CASE + WHEN et.STATE = '0' THEN + 1 + ELSE + 0 + END + ) AS topicCount + FROM + esua_epdc_admin.sys_dept sd + LEFT JOIN esua_epdc_admin.sys_dept sdp ON sd.pid = sdp.id + LEFT JOIN esua_epdc_party_group.epdc_party_topic et ON sd.id = et.GRID_ID + WHERE + sd.del_flag = '0' + AND et.DEL_FLAG = '0' + AND sdp.del_flag = '0' + AND sd.id NOT IN ( + SELECT + t.dept_id + FROM + esua_epdc_admin.sys_dept_config t + WHERE + t.del_flag = '0' + ) + GROUP BY + sd.pid + UNION ALL + SELECT + '${customId}' as customerId, + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y%m%d' + ) AS dateId, + CONCAT( + DATE_FORMAT( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y' + ), + '%Y' + ), + 'W', + WEEK ( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y-%m-%d' + ) + ) + ) weekId, + DATE_FORMAT( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y' + ), + '%Y' + ) AS yearId, + CONCAT( + DATE_FORMAT( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y' + ), + '%Y' + ), + 'Q', + QUARTER ( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y-%m-%d' + ) + ) + ) quarterId, + DATE_FORMAT( + STR_TO_DATE( + DATE_FORMAT( + date_add(now(), INTERVAL - 1 DAY), + '%Y-%m-%d' + ), + '%Y-%m' + ), + '%Y%m' + ) AS monthId, + sdgp.id AS agencyId, + sdgp.pid AS pid, + COUNT(0) AS topicTotal, + 'hot_discuss' AS STATUS, + SUM( + CASE + WHEN et.STATE = '0' THEN + 1 + ELSE + 0 + END + ) AS topicCount + FROM + esua_epdc_admin.sys_dept sd + LEFT JOIN esua_epdc_admin.sys_dept sdp ON sd.pid = sdp.id + LEFT JOIN esua_epdc_admin.sys_dept sdgp ON sdp.pid = sdgp.id + LEFT JOIN esua_epdc_party_group.epdc_party_topic et ON sd.id = et.GRID_ID + WHERE + sd.del_flag = '0' + AND et.DEL_FLAG = '0' + AND sdp.del_flag = '0' + AND sdgp.del_flag = '0' + AND sd.id NOT IN ( + SELECT + t.dept_id + FROM + esua_epdc_admin.sys_dept_config t + WHERE + t.del_flag = '0' + ) + + + + + diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml index 4154cb47..a56228c1 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml @@ -49,8 +49,12 @@ when t1.ITEM_STATE = 10 then 3 when t1.ITEM_STATE = 0 and (select COUNT(1) from esua_epdc_events.epdc_item_handle_process where DEL_FLAG ='0' and ITEM_ID = t1.ID) = 1 then 1 when (t1.ITEM_STATE = 0 or t1.ITEM_STATE = 5) and (select COUNT(1) from esua_epdc_events.epdc_item_handle_process where DEL_FLAG ='0' and ITEM_ID = t1.ID) > 1 then 2 - else '' end as projectLevel - from (select * from(select * from esua_epdc_events.epdc_item where DEL_FLAG = '0' + else '' end as projectLevel, + case t1.EVALUATION_SCORE + when 0 then 60 + when 2 then 100 + else 80 end as satisfactionScore + from (select * from(select * from esua_epdc_events.epdc_item where DEL_FLAG = '0' and GRID_ID not in ( SELECT t.`dept_id` FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.`del_flag`= 0) diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenBaseReportDataPushTaskImpl.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenBaseReportDataPushTaskImpl.java index 7ee1debd..2df46ac3 100644 --- a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenBaseReportDataPushTaskImpl.java +++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenBaseReportDataPushTaskImpl.java @@ -12,7 +12,7 @@ import org.springframework.stereotype.Component; * @Author:syp * @Date:2021/6/25 15:19 */ -@Component("screenIndexDataPushTask") +@Component("screenBaseReportDataPushTask") public class ScreenBaseReportDataPushTaskImpl implements ScreenIndexDataPushTask { private final Logger logger = LoggerFactory.getLogger(getClass());