From be1ceac10fb775c0acd719be388b212773d73290 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 7 Jan 2021 14:16:18 +0800 Subject: [PATCH 001/101] =?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-=20v2=E5=8D=87=E7=BA=A7=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/DeptGovrnAbilityFormDTO.java | 48 +++++++++++++++ .../form/GridGovrnAbilityFormDTO.java | 36 +++++++++++ .../form/GridPartyAbilityFormDTO.java | 12 ++++ .../form/GridServiceAbilityFormDTO.java | 23 +++++++ .../form/OrgGovrnAbilityFormDTO.java | 60 +++++++++++++++++++ .../screencoll/form/CustomerDeptFormDTO.java | 6 ++ .../screencoll/form/CustomerGridFormDTO.java | 6 ++ .../V0.0.5__screen_org_add_source_col.sql | 39 ++++++++++++ .../FactIndexGovrnAblityDeptMonthlyDao.xml | 20 ++++++- .../FactIndexGovrnAblityGridMonthlyDao.xml | 16 ++++- .../FactIndexGovrnAblityOrgMonthlyDao.xml | 24 +++++++- .../FactIndexPartyAblityGridMonthlyDao.xml | 8 ++- .../FactIndexServiceAblityGridMonthlyDao.xml | 12 +++- .../screen/ScreenCustomerDeptDao.xml | 6 +- .../screen/ScreenCustomerGridDao.xml | 6 +- 15 files changed, 308 insertions(+), 14 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java index b35ca1537a..fac962754f 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java @@ -69,4 +69,52 @@ public class DeptGovrnAbilityFormDTO implements Serializable { * 办结项目满意度 */ private BigDecimal satisfactionRatio; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal respProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal respProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal handleProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal handleProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal closedProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal closedProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFm; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java index 021533fe59..1d2f1e7202 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java @@ -79,4 +79,40 @@ public class GridGovrnAbilityFormDTO implements Serializable { * 网格自治项目数 统计期网格自身内办结的项目数目 */ private Integer selfSolveProjectCount; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal transferRightRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal transferRightRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal issueToProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal issueToProjectRatioFm; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java index 3aa816cafd..c7acdf1827 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java @@ -104,4 +104,16 @@ public class GridPartyAbilityFormDTO implements Serializable { * 党员参加三会一课人次 */ private Integer joinThreeMeetsCount; + + /** + * V2升级字段:issueToProjectRatio的分子:评价周期内转为项目的数量 + * 2020-01-07 新增 + */ + private Integer shiftedProjectTotal; + + /** + * V2升级字段:issueToProjectRatio的分母:评价周期内网格内居民提出的议题数目 + * 2020-01-07 新增 + */ + private Integer issueTotal; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java index 02b7906a36..fe34aaa150 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java @@ -55,4 +55,27 @@ public class GridServiceAbilityFormDTO implements Serializable { */ private BigDecimal partyVolunteerRatio; + /** + * V2升级字段:partyVolunteerRatio的分子:网格党员志愿者数 + * 2020-01-07 + */ + private Integer partyVolunteerTotal; + + /** + * V2升级字段:partyVolunteerRatio的分母:志愿者总数 + * 2020-01-07 + */ + private Integer volunteerTotal; + + /** + * V2升级字段:volunteerRatio的分子:居民且注册志愿者的总人数 + * 2020-01-07 + */ + private Integer volunteerUserTotal; + + /** + * V2升级字段:volunteerRatio的分母:网格内注册居民数 + * 2020-01-07 + */ + private Integer regUserTotal; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java index dc91df6e08..afcb201303 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java @@ -80,4 +80,64 @@ public class OrgGovrnAbilityFormDTO implements Serializable { * 街道办结项目的处理效率, data_type=street时有值 */ private BigDecimal handleProjectRatio; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal respProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal respProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal closedProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal closedProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal overdueProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal overdueProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal handleProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal handleProjectRatioFm; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java index a99713701a..e39b6e1644 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java @@ -48,4 +48,10 @@ public class CustomerDeptFormDTO implements Serializable { * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) */ private String dataEndTime; + + /** + * V2升级必传参数:当前网格所属行政地区编码,去除末尾0 + * 2020-01-07 + */ + private String areaCode; } 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 75eb13a0fa..ad9277c0d8 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 @@ -53,4 +53,10 @@ public class CustomerGridFormDTO implements Serializable { * 所有上级ID,用英文逗号分开(8.26新增) */ private String allParentIds; + + /** + * V2升级必传参数:当前网格所属行政地区编码,去除末尾0 + * 2020-01-07 + */ + private String areaCode; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql new file mode 100644 index 0000000000..6f79e281f0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql @@ -0,0 +1,39 @@ +# alter table screen_customer_agency add column SHIFTED_PROJECT_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:issueToProjectRatio的分子:评价周期内转为项目的数量', +# alter table screen_customer_agency add column ISSUE_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:issueToProjectRatio的分母:评价周期内网格内居民提出的议题数目', + +# alter table fact_index_service_ablity_grid_monthly add column PARTY_VOLUNTEER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:partyVolunteerRatio的分子:网格党员志愿者数', +# alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:partyVolunteerRatio的分母:志愿者总数', +# alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_USER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:volunteerRatio的分子:居民且注册志愿者的总人数', +# alter table fact_index_service_ablity_grid_monthly add column REG_USER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:volunteerRatio的分母:网格内注册居民数', + +# alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', + +# alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', + +# alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', + +# alter table screen_customer_grid add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0', +# alter table screen_customer_dept add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0', + +select 1; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml index b4475c72cd..404cc2f7f8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -52,7 +52,15 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + RESP_PROJECT_RATIO_FZ, + RESP_PROJECT_RATIO_FM, + HANDLE_PROJECT_RATIO_FZ, + HANDLE_PROJECT_RATIO_FM, + CLOSED_PROJECT_RATIO_FZ, + CLOSED_PROJECT_RATIO_FM, + SATISFACTION_RATIO_FZ, + SATISFACTION_RATIO_FM ) values ( @@ -74,7 +82,15 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.respProjectRatioFz}, + #{item.respProjectRatioFm}, + #{item.handleProjectRatioFz}, + #{item.handleProjectRatioFm}, + #{item.closedProjectRatioFz}, + #{item.closedProjectRatioFm}, + #{item.satisfactionRatioFz}, + #{item.satisfactionRatioFm} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index e30d52c675..1a8d1d7aa1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -56,7 +56,13 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + TRANSFER_RIGHT_RATIO_FZ, + TRANSFER_RIGHT_RATIO_FM, + SATISFACTION_RATIO_FZ, + SATISFACTION_RATIO_FM, + ISSUE_TO_PROJECT_RATIO_FZ, + ISSUE_TO_PROJECT_RATIO_FM ) values ( @@ -80,7 +86,13 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.transferRightRatioFz}, + #{item.transferRightRatioFm}, + #{item.satisfactionRatioFz}, + #{item.satisfactionRatioFm}, + #{item.issueToProjectRatioFz}, + #{item.issueToProjectRatioFm} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index 3a4250d1ad..065ac740a3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -63,7 +63,17 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + RESP_PROJECT_RATIO_FZ, + RESP_PROJECT_RATIO_FM, + CLOSED_PROJECT_RATIO_FZ, + CLOSED_PROJECT_RATIO_FM, + SATISFACTION_RATIO_FZ, + SATISFACTION_RATIO_FM, + OVERDUE_PROJECT_RATIO_FZ, + OVERDUE_PROJECT_RATIO_FM, + HANDLE_PROJECT_RATIO_FZ, + HANDLE_PROJECT_RATIO_FM ) values ( @@ -87,7 +97,17 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.respProjectRatioFz}, + #{item.respProjectRatioFm}, + #{item.closedProjectRatioFz}, + #{item.closedProjectRatioFm}, + #{item.satisfactionRatioFz}, + #{item.satisfactionRatioFm}, + #{item.overdueProjectRatioFz}, + #{item.overdueProjectRatioFm}, + #{item.handleProjectRatioFz}, + #{item.handleProjectRatioFm} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml index 9208f9a533..2ea92ebb5d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml @@ -66,7 +66,9 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + SHIFTED_PROJECT_TOTAL, + ISSUE_TOTAL ) values ( @@ -95,7 +97,9 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.shiftedProjectTotal}, + #{item.issueTotal} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml index 2a4d8a7039..be06e22b1a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml @@ -46,7 +46,11 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + PARTY_VOLUNTEER_TOTAL, + VOLUNTEER_TOTAL, + VOLUNTEER_USER_TOTAL, + REG_USER_TOTAL ) values ( @@ -65,7 +69,11 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.partyVolunteerTotal}, + #{item.volunteerTotal}, + #{item.volunteerUserTotal}, + #{item.regUserTotal} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml index 26c34d328b..7dd6ba62a4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml @@ -26,7 +26,8 @@ CREATED_TIME, UPDATED_BY, UPDATED_TIME, - DATA_END_TIME + DATA_END_TIME, + AREA_CODE ) values ( @@ -44,7 +45,8 @@ now(), 'APP_USER', now(), - #{item.dataEndTime} + #{item.dataEndTime}, + #{item.areaCode} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml index 9df4f5941f..147941c2d1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml @@ -27,7 +27,8 @@ UPDATED_BY, UPDATED_TIME, DATA_END_TIME, - ALL_PARENT_IDS + ALL_PARENT_IDS, + AREA_CODE ) values ( @@ -46,7 +47,8 @@ 'APP_USER', now(), #{item.dataEndTime}, - #{item.allParentIds} + #{item.allParentIds}, + #{item.areaCode} ) From 3918015975f4fd5635b91786cd18e71c1adbe449 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 7 Jan 2021 15:34:41 +0800 Subject: [PATCH 002/101] =?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-=20v2=E5=8D=87=E7=BA=A7=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=20-=20entity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...FactIndexGovrnAblityDeptMonthlyEntity.java | 49 +++++++++++++- ...FactIndexGovrnAblityGridMonthlyEntity.java | 37 ++++++++++- .../FactIndexGovrnAblityOrgMonthlyEntity.java | 60 +++++++++++++++++ ...FactIndexPartyAblityGridMonthlyEntity.java | 14 +++- ...ctIndexServiceAblityGridMonthlyEntity.java | 23 +++++++ .../screen/ScreenCustomerDeptEntity.java | 5 ++ .../screen/ScreenCustomerGridEntity.java | 6 ++ .../V0.0.5__screen_org_add_source_col.sql | 66 +++++++++---------- 8 files changed, 223 insertions(+), 37 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java index 47501f13f4..e1d90758ee 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java @@ -25,7 +25,7 @@ import lombok.EqualsAndHashCode; import java.math.BigDecimal; /** - * 治理能力-部门相关数据 + * 治理能力-部门相关数据 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-20 @@ -97,4 +97,51 @@ public class FactIndexGovrnAblityDeptMonthlyEntity extends BaseEpmetEntity { */ private BigDecimal satisfactionRatio; + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal respProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal respProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal handleProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal handleProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal closedProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal closedProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFm; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java index 7b0c61a9fd..e8e9177ed1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -25,7 +25,7 @@ import lombok.EqualsAndHashCode; import java.math.BigDecimal; /** - * 治理能力-网格相关事实表 + * 治理能力-网格相关事实表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-20 @@ -107,4 +107,39 @@ public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { */ private BigDecimal satisfactionRatio; + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal transferRightRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal transferRightRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal issueToProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal issueToProjectRatioFm; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index fe8ee990b8..90a8245ab5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -106,4 +106,64 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { * 街道办结项目的处理效率, data_type=street时有值 */ private BigDecimal handleProjectRatio; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal respProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal respProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal closedProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal closedProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal satisfactionRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal overdueProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal overdueProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal handleProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + * 2020-01-07 + */ + private BigDecimal handleProjectRatioFm; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java index b38d4c4d7a..c19656db68 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java @@ -25,7 +25,7 @@ import lombok.EqualsAndHashCode; import java.math.BigDecimal; /** - * 党建能力-网格相关事实表 + * 党建能力-网格相关事实表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-20 @@ -132,4 +132,16 @@ public class FactIndexPartyAblityGridMonthlyEntity extends BaseEpmetEntity { */ private Integer joinThreeMeetsCount; + + /** + * V2升级字段:issueToProjectRatio的分子:评价周期内转为项目的数量 + * 2020-01-07 新增 + */ + private Integer shiftedProjectTotal; + + /** + * V2升级字段:issueToProjectRatio的分母:评价周期内网格内居民提出的议题数目 + * 2020-01-07 新增 + */ + private Integer issueTotal; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java index fedcaf1637..c296fb4a42 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java @@ -82,4 +82,27 @@ public class FactIndexServiceAblityGridMonthlyEntity extends BaseEpmetEntity { */ private BigDecimal partyVolunteerRatio; + /** + * V2升级字段:partyVolunteerRatio的分子:网格党员志愿者数 + * 2020-01-07 + */ + private Integer partyVolunteerTotal; + + /** + * V2升级字段:partyVolunteerRatio的分母:志愿者总数 + * 2020-01-07 + */ + private Integer volunteerTotal; + + /** + * V2升级字段:volunteerRatio的分子:居民且注册志愿者的总人数 + * 2020-01-07 + */ + private Integer volunteerUserTotal; + + /** + * V2升级字段:volunteerRatio的分母:网格内注册居民数 + * 2020-01-07 + */ + private Integer regUserTotal; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java index 474243815a..6c67961fde 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java @@ -77,4 +77,9 @@ public class ScreenCustomerDeptEntity extends BaseEpmetEntity { private String sourceType; + /** + * V2升级必传参数:当前网格所属行政地区编码,去除末尾0 + * 2020-01-07 + */ + private String areaCode; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java index 0b98a125eb..1da1c7a11d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java @@ -81,4 +81,10 @@ public class ScreenCustomerGridEntity extends BaseEpmetEntity { private String allParentIds; private String sourceType; + + /** + * V2升级必传参数:当前网格所属行政地区编码,去除末尾0 + * 2020-01-07 + */ + private String areaCode; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql index 6f79e281f0..fd07a896c0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql @@ -1,39 +1,37 @@ -# alter table screen_customer_agency add column SHIFTED_PROJECT_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:issueToProjectRatio的分子:评价周期内转为项目的数量', -# alter table screen_customer_agency add column ISSUE_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:issueToProjectRatio的分母:评价周期内网格内居民提出的议题数目', +# alter table fact_index_party_ablity_grid_monthly add column SHIFTED_PROJECT_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:issueToProjectRatio的分子:评价周期内转为项目的数量'; +# alter table fact_index_party_ablity_grid_monthly add column ISSUE_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:issueToProjectRatio的分母:评价周期内网格内居民提出的议题数目'; -# alter table fact_index_service_ablity_grid_monthly add column PARTY_VOLUNTEER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:partyVolunteerRatio的分子:网格党员志愿者数', -# alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:partyVolunteerRatio的分母:志愿者总数', -# alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_USER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:volunteerRatio的分子:居民且注册志愿者的总人数', -# alter table fact_index_service_ablity_grid_monthly add column REG_USER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:volunteerRatio的分母:网格内注册居民数', +# alter table fact_index_service_ablity_grid_monthly add column PARTY_VOLUNTEER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:partyVolunteerRatio的分子:网格党员志愿者数'; +# alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:partyVolunteerRatio的分母:志愿者总数'; +# alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_USER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:volunteerRatio的分子:居民且注册志愿者的总人数'; +# alter table fact_index_service_ablity_grid_monthly add column REG_USER_TOTAL int(11) DEFAULT NULL COMMENT 'V2升级字段:volunteerRatio的分母:网格内注册居民数'; -# alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', -# alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档', +# alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; +# alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FM decimal(10,6) DEFAULT NULL COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table screen_customer_grid add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0', -# alter table screen_customer_dept add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0', - -select 1; +# alter table screen_customer_grid add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0'; +# alter table screen_customer_dept add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0'; From 5c5d610f38e888d803abbadfbb3fc36bbf6d4be5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 14 Jan 2021 13:38:49 +0800 Subject: [PATCH 003/101] =?UTF-8?q?dimCustomer=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0areaCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/result/CustomerAreaCodeResultDTO.java | 25 +++++++++++++++++++ .../epmet/dao/org/StatsCustomerAgencyDao.java | 9 +++++++ .../com/epmet/entity/crm/CustomerEntity.java | 3 +++ .../epmet/entity/stats/DimCustomerEntity.java | 2 ++ .../service/impl/StatsDimServiceImpl.java | 17 +++++++++++++ .../service/org/CustomerAgencyService.java | 9 +++++++ .../org/impl/CustomerAgencyServiceImpl.java | 18 +++++++++++++ .../stats/impl/DimCustomerServiceImpl.java | 2 ++ .../mapper/org/StatsCustomerAgencyDao.xml | 17 +++++++++++++ .../resources/mapper/stats/DimCustomerDao.xml | 2 ++ 10 files changed, 104 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAreaCodeResultDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAreaCodeResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAreaCodeResultDTO.java new file mode 100644 index 0000000000..f3b4a73048 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAreaCodeResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.org.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/1/14 上午11:05 + */ +@Data +public class CustomerAreaCodeResultDTO implements Serializable { + + private static final long serialVersionUID = -4722604654441455214L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 行政区域编码 + */ + private String areaCode; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java index eb02051e91..9c1217bd02 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java @@ -2,6 +2,7 @@ package com.epmet.dao.org; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.AgencySubTreeDto; +import com.epmet.dto.org.result.CustomerAreaCodeResultDTO; import com.epmet.entity.org.CustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -22,4 +23,12 @@ public interface StatsCustomerAgencyDao extends BaseDao { List selectSubAgencyByPid(@Param("pid")String pid); List listAgenciesByUpdatedTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime); + + /** + * @Description 查询客户所属区域编码 + * @Param customerIds + * @author zxc + * @date 2021/1/14 上午11:07 + */ + List selectCustomerAreaCodeById(@Param("customerIds") List customerIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java index a2fa408a43..c6dc6dba64 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java @@ -17,6 +17,7 @@ package com.epmet.entity.crm; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; @@ -88,4 +89,6 @@ public class CustomerEntity extends BaseEpmetEntity { */ private String logo; + @TableField(exist = false) + private String areaCode; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerEntity.java index a287006414..6641ecd2dc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerEntity.java @@ -43,4 +43,6 @@ public class DimCustomerEntity extends BaseEpmetEntity { */ private String customerName; + private String areaCode; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java index 5c09458416..6338145260 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.impl; import com.epmet.constant.RobotConstant; +import com.epmet.dto.org.result.CustomerAreaCodeResultDTO; import com.epmet.entity.crm.CustomerEntity; import com.epmet.entity.org.CustomerAgencyEntity; import com.epmet.entity.org.CustomerDepartmentEntity; @@ -199,6 +200,14 @@ public class StatsDimServiceImpl implements StatsDimService { List customers = customerService.listValidCustomersByCreateTime(lastInitTime, initTime); + // 添加 areaCode + if (!CollectionUtils.isEmpty(customers)){ + List customerIds = customers.stream().map(m -> m.getId()).collect(Collectors.toList()); + List areaCodes = customerAgencyService.selectCustomerAreaCodeById(customerIds); + if (!CollectionUtils.isEmpty(areaCodes)){ + customers.forEach(c -> areaCodes.stream().filter(a -> c.getId().equals(a.getCustomerId())).forEach(a -> c.setAreaCode(a.getAreaCode()))); + } + } return customers; } @@ -212,6 +221,14 @@ public class StatsDimServiceImpl implements StatsDimService { if (lastCreatedDim != null) { // 说明不是首次初始化 List customers = customerService.listValidCustomersByUpdatedTime(lastCreatedDim.getUpdatedTime(), initTime); + // 添加 areaCode + if (!CollectionUtils.isEmpty(customers)){ + List customerIds = customers.stream().map(m -> m.getId()).collect(Collectors.toList()); + List areaCodes = customerAgencyService.selectCustomerAreaCodeById(customerIds); + if (!CollectionUtils.isEmpty(areaCodes)){ + customers.forEach(c -> areaCodes.stream().filter(a -> c.getId().equals(a.getCustomerId())).forEach(a -> c.setAreaCode(a.getAreaCode()))); + } + } return customers; } return new ArrayList<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java index 96669f2ae9..b93c4563ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java @@ -1,5 +1,6 @@ package com.epmet.service.org; +import com.epmet.dto.org.result.CustomerAreaCodeResultDTO; import com.epmet.entity.org.CustomerAgencyEntity; import java.util.Date; @@ -9,4 +10,12 @@ public interface CustomerAgencyService { List listAgenciesByCreateTime(Date statsStartTime, Date statsEndTime); List listAgenciesByUpdatedTime(Date updatedTime, Date now); + + /** + * @Description 查询客户所属区域编码 + * @Param customerIds + * @author zxc + * @date 2021/1/14 上午11:07 + */ + List selectCustomerAreaCodeById(List customerIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java index 4813309176..702da0930d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java @@ -3,11 +3,14 @@ package com.epmet.service.org.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.org.StatsCustomerAgencyDao; +import com.epmet.dto.org.result.CustomerAreaCodeResultDTO; import com.epmet.entity.org.CustomerAgencyEntity; import com.epmet.service.org.CustomerAgencyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -27,4 +30,19 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService { public List listAgenciesByUpdatedTime(Date startTime, Date endTime) { return customerAgencyDao.listAgenciesByUpdatedTime(startTime, endTime); } + + /** + * @Description 查询客户所属区域编码 + * @Param customerIds + * @author zxc + * @date 2021/1/14 上午11:07 + */ + @Override + public List selectCustomerAreaCodeById(List customerIds) { + if (!CollectionUtils.isEmpty(customerIds)){ + List resultDTOS = customerAgencyDao.selectCustomerAreaCodeById(customerIds); + return resultDTOS; + } + return new ArrayList<>(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java index 367b06629b..feae456fb3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java @@ -128,6 +128,7 @@ public class DimCustomerServiceImpl extends BaseServiceImpl #{endTime} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml index 54914e24d0..457801d6b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml @@ -15,6 +15,7 @@ + SELECT + CR.PARENT_CUSTOMER_ID AS customerId, + dc.CUSTOMER_NAME AS customerName, + dc.AREA_CODE AS areaCode, + CR.CUSTOMER_ID AS subCustomerId + FROM + customer_relation cr + LEFT JOIN dim_customer dc ON ( cr.PARENT_CUSTOMER_ID = DC.ID ) + WHERE + cr.DEL_FLAG = '0' + AND cr.`STATUS` = 'open' + AND cr.PARENT_CUSTOMER_ID != '0' + + AND cr.PARENT_CUSTOMER_ID IN + + #{customerId} + + + + + \ No newline at end of file From 4ff8195339df6e6d944397780a18f87557d13941 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 14 Jan 2021 17:32:45 +0800 Subject: [PATCH 009/101] =?UTF-8?q?=E6=8C=87=E6=A0=87=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=EF=BC=8C=E5=85=A5=E5=8F=82CalculateCommonFor?= =?UTF-8?q?mDTO=E7=BB=9F=E4=B8=80=E6=B7=BB=E5=8A=A0customerAreaCode?= =?UTF-8?q?=E3=80=81subCustomerIds:=20processPenddingCalculate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IndexCalculateController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 11e082057a..1bf83298cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -84,6 +84,9 @@ public class IndexCalculateController { CalculateCommonFormDTO form = new CalculateCommonFormDTO(); form.setCustomerId(flag.getForm().getCustomerId()); form.setMonthId(flag.getForm().getMonthId()); + //01.14 add + form.setCustomerAreaCode(flag.getForm().getCustomerAreaCode()); + form.setSubCustomerIds(flag.getForm().getSubCustomerIds()); indexCalculate(form); } }); From 0a84c7e0f7b36947d94d49f49dcdb67eb62f8725 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 15 Jan 2021 10:25:45 +0800 Subject: [PATCH 010/101] =?UTF-8?q?=E5=85=9A=E5=91=98=E7=9B=B8=E5=85=B3-?= =?UTF-8?q?=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B=E5=88=86=E6=95=B0=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E4=BF=AE=E6=94=B9end1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexPartyAblityCpcMonthlyDao.java | 25 +++- .../screen/ScreenCustomerAgencyEntity.java | 4 + .../screen/ScreenCustomerDeptEntity.java | 5 + .../screen/ScreenCustomerGridEntity.java | 5 + .../impl/CpcIndexCalculateServiceImpl.java | 13 +- .../FactIndexPartyAblityCpcMonthlyDao.xml | 118 +++++++++++------- 6 files changed, 120 insertions(+), 50 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index 619b621d7a..1102a159b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcollect.form.GridPartyMemberDataDetailFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; @@ -59,9 +60,29 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao list, @Param("customerId") String customerId); - List> getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize); + /** + * @return java.util.List> + * @param customerId 当前计算的客户id + * @param monthId yyyyMM + * @param offset + * @param pageSize + * @param customerAreaCode 当前计算的客户所属的area_code + * @param subCustomerIds 当前计算的客户下的子客户id + * @description 分页查询党建能力-党员相关 指标原始数据 + * @Date 2021/1/15 10:04 + **/ + List> getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, + @Param("offset") Integer offset, @Param("pageSize") Integer pageSize, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds") List subCustomerIds); - Map getExtremeValue(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * @return java.util.Map + * @param formDTO: customerId 当前计算的客户id;monthId yyyyMM;customerAreaCode 当前计算的客户所属的area_code;subCustomerIds 当前计算的客户下的子客户id + * @description 党员相关-党建能力各个指标值的最大值、最小值(1)有子客户时按照area_code查询(2)没有子客户按照customerId查询 + * @Date 2021/1/15 9:44 + **/ + Map getExtremeValue(CalculateCommonFormDTO formDTO); /** * @return int diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java index 46903b52b5..5f11e113bb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java @@ -105,4 +105,8 @@ public class ScreenCustomerAgencyEntity extends BaseEpmetEntity { */ private String isDisplay; + /** + * desc: 是否参与上级计算yes:参与;no:不参与 add 01.14 + */ + private String upToCal; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java index 6c67961fde..d8adca7a34 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java @@ -82,4 +82,9 @@ public class ScreenCustomerDeptEntity extends BaseEpmetEntity { * 2020-01-07 */ private String areaCode; + + /** + * desc: 是否参与上级计算yes:参与;no:不参与 add 01.14 + */ + private String upToCal; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java index 1da1c7a11d..4a0d8e53c8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java @@ -87,4 +87,9 @@ public class ScreenCustomerGridEntity extends BaseEpmetEntity { * 2020-01-07 */ private String areaCode; + + /** + * desc: 是否参与上级计算yes:参与;no:不参与 add 01.14 + */ + private String upToCal; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index b2e0158aa4..d52c6891c5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -201,7 +201,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { private void calculatePartScore(CalculateCommonFormDTO formDTO) { //计算最大最小值 - Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId(), formDTO.getMonthId()); + Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.warn("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); return; @@ -219,7 +219,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { List> list = null; groupIndexDetailsMap.keySet().forEach(indexCode -> deleteOldData(formDTO, indexCode)); do { - list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); + list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(),(pageNo - 1) * pageSize, pageSize, + formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); if (!CollectionUtils.isEmpty(list)) { //遍历指标分组 计算分数 for (Map.Entry> entry : groupIndexDetailsMap.entrySet()) { @@ -232,6 +233,13 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } while (!CollectionUtils.isEmpty(list) && list.size() == pageSize); } + /** + * @return void + * @param formDTO + * @param indexCode 当前计算指标编码 + * @description 根据客户id、月id、indexCode、allParentCode删除旧数据 + * @Date 2021/1/15 9:52 + **/ @Transactional(rollbackFor = Exception.class) public void deleteOldData(CalculateCommonFormDTO formDTO, String indexCode) { int effectRow; @@ -275,6 +283,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { CpcScoreEntity cpcScoreEntity = new CpcScoreEntity(); cpcScoreEntity.setYearId(String.valueOf(cpcCount.get(IndexCalConstant.YEAR_ID))); + //一定要赋值当前正在计算的客户id cpcScoreEntity.setCustomerId(formDTO.getCustomerId()); cpcScoreEntity.setAgencyId(String.valueOf(cpcCount.get(IndexCalConstant.AGENCY_ID))); cpcScoreEntity.setGridId(String.valueOf(cpcCount.get(IndexCalConstant.GRID_ID))); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml index 788af38336..9610514dcf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml @@ -69,59 +69,85 @@ - - SELECT - MIN( CREATE_TOPIC_COUNT ) CREATE_TOPIC_COUNT_MIN, - MAX( CREATE_TOPIC_COUNT ) CREATE_TOPIC_COUNT_MAX, - MIN( JOIN_TOPIC_COUNT ) JOIN_TOPIC_COUNT_MIN, - MAX( JOIN_TOPIC_COUNT ) JOIN_TOPIC_COUNT_MAX, - MIN( SHIFT_ISSUE_COUNT ) SHIFT_ISSUE_COUNT_MIN, - MAX( SHIFT_ISSUE_COUNT ) SHIFT_ISSUE_COUNT_MAX, - MIN( SHIFT_PROJECT_COUNT ) SHIFT_PROJECT_COUNT_MIN, - MAX( SHIFT_PROJECT_COUNT ) SHIFT_PROJECT_COUNT_MAX, - MIN( JOIN_THREE_MEETS_COUNT ) JOIN_THREE_MEETS_COUNT_MIN, - MAX( JOIN_THREE_MEETS_COUNT ) JOIN_THREE_MEETS_COUNT_MAX, - MIN( GROUP_USER_COUNT ) GROUP_USER_COUNT_MIN, - MAX( GROUP_USER_COUNT ) GROUP_USER_COUNT_MAX, - MIN( GROUP_ACTIVE_USER_COUNT ) GROUP_ACTIVE_USER_COUNT_MIN, - MAX( GROUP_ACTIVE_USER_COUNT ) GROUP_ACTIVE_USER_COUNT_MAX, - MIN( GROUP_TOPIC_COUNT ) GROUP_TOPIC_COUNT_MIN, - MAX( GROUP_TOPIC_COUNT ) GROUP_TOPIC_COUNT_MAX, - MIN( TOPIC_TO_ISSUE_RATIO ) TOPIC_TO_ISSUE_RATIO_MIN, - MAX( TOPIC_TO_ISSUE_RATIO ) TOPIC_TO_ISSUE_RATIO_MAX + MIN( cpc.CREATE_TOPIC_COUNT ) CREATE_TOPIC_COUNT_MIN, + MAX( cpc.CREATE_TOPIC_COUNT ) CREATE_TOPIC_COUNT_MAX, + MIN( cpc.JOIN_TOPIC_COUNT ) JOIN_TOPIC_COUNT_MIN, + MAX( cpc.JOIN_TOPIC_COUNT ) JOIN_TOPIC_COUNT_MAX, + MIN( cpc.SHIFT_ISSUE_COUNT ) SHIFT_ISSUE_COUNT_MIN, + MAX( cpc.SHIFT_ISSUE_COUNT ) SHIFT_ISSUE_COUNT_MAX, + MIN( cpc.SHIFT_PROJECT_COUNT ) SHIFT_PROJECT_COUNT_MIN, + MAX( cpc.SHIFT_PROJECT_COUNT ) SHIFT_PROJECT_COUNT_MAX, + MIN( cpc.JOIN_THREE_MEETS_COUNT ) JOIN_THREE_MEETS_COUNT_MIN, + MAX( cpc.JOIN_THREE_MEETS_COUNT ) JOIN_THREE_MEETS_COUNT_MAX, + MIN( cpc.GROUP_USER_COUNT ) GROUP_USER_COUNT_MIN, + MAX( cpc.GROUP_USER_COUNT ) GROUP_USER_COUNT_MAX, + MIN( cpc.GROUP_ACTIVE_USER_COUNT ) GROUP_ACTIVE_USER_COUNT_MIN, + MAX( cpc.GROUP_ACTIVE_USER_COUNT ) GROUP_ACTIVE_USER_COUNT_MAX, + MIN( cpc.GROUP_TOPIC_COUNT ) GROUP_TOPIC_COUNT_MIN, + MAX( cpc.GROUP_TOPIC_COUNT ) GROUP_TOPIC_COUNT_MAX, + MIN( cpc.TOPIC_TO_ISSUE_RATIO ) TOPIC_TO_ISSUE_RATIO_MIN, + MAX( cpc.TOPIC_TO_ISSUE_RATIO ) TOPIC_TO_ISSUE_RATIO_MAX FROM - fact_index_party_ablity_cpc_monthly - WHERE - CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} - AND MONTH_ID = #{monthId,jdbcType=VARCHAR} - AND DEL_FLAG = '0' + fact_index_party_ablity_cpc_monthly cpc + inner join screen_customer_grid scg on( + cpc.GRID_ID=scg.GRID_ID + and scg.DEL_FLAG='0' + and scg.UP_TO_CAL='yes' + ) + WHERE cpc.DEL_FLAG = '0' + AND cpc.MONTH_ID = #{monthId,jdbcType=VARCHAR} + + + and scg.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + and cpc.CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} + and scg.CUSTOMER_ID=#{customerId,jdbcType=VARCHAR} + + From 5a7c25a69aed9e3faa93f4f251651e843a9723de Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 15 Jan 2021 13:09:25 +0800 Subject: [PATCH 011/101] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=EF=BC=8C=E5=88=86=E5=80=BC=E8=AE=A1=E7=AE=97=E4=BF=AE=E6=94=B9?= =?UTF-8?q?end1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcal/PageQueryGridFormDTO.java | 16 +++++- .../FactIndexGovrnAblityGridMonthlyDao.java | 9 +--- .../FactIndexPartyAblityGridMonthlyDao.java | 5 +- .../FactIndexServiceAblityGridMonthlyDao.java | 4 +- .../screen/ScreenCustomerGridDao.java | 3 +- .../impl/GridCorreLationServiceImpl.java | 41 ++++++++------- .../FactIndexGovrnAblityGridMonthlyDao.xml | 50 ++++++++++++++++-- .../FactIndexPartyAblityGridMonthlyDao.xml | 52 +++++++++++++++++-- .../FactIndexServiceAblityGridMonthlyDao.xml | 34 ++++++++++-- .../screen/ScreenCustomerGridDao.xml | 1 - 10 files changed, 166 insertions(+), 49 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java index 3db0986065..bd156d2aaf 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java @@ -4,6 +4,8 @@ import lombok.Data; import javax.validation.constraints.Min; import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; /** * 分页查询网格列表 @@ -36,13 +38,25 @@ public class PageQueryGridFormDTO implements Serializable { private Integer pageIndex; + /** + * 当前客户所属的地区编码 add 01.14 + */ + private String customerAreaCode = ""; + + /** + * 当前客户下的需要汇聚的子客户列表 add 01.14 + * 暂不使用 + */ + private List subCustomerIds = new ArrayList<>(); - public PageQueryGridFormDTO(String customerId,String monthId,int pageIndex,int pageNo,int pageSize){ + public PageQueryGridFormDTO(String customerId,String monthId,int pageIndex,int pageNo,int pageSize,String customerAreaCode,List subCustomerIds){ this.customerId=customerId; this.monthId=monthId; this.pageIndex=pageIndex; this.pageNo=pageNo; this.pageSize=pageSize; + this.customerAreaCode=customerAreaCode; + this.subCustomerIds=subCustomerIds; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index 2e047268de..a47ebdc88d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -19,7 +19,6 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO; -import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; @@ -44,11 +43,7 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao - * @param customerId - * @param monthId * @author yinzuomei * @description 查询治理能力,网格相关,各五级指标最大值,最小值 * @Date 2020/8/27 13:10 **/ - Map selectGovrnAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + Map selectGovrnAblityGridMinAndMax(CalculateCommonFormDTO formDTO); /** * @return int diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index e15e5cc90b..ec9404e36b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -73,13 +73,12 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao - * @param customerId - * @param monthId + * @param formDTO * @author yinzuomei * @description 查询党建能力,网格相关,各五级指标最大值,最小值 * @Date 2020/8/27 12:51 **/ - Map selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + Map selectPartyAblityGridMinAndMax(CalculateCommonFormDTO formDTO); /** * @return java.lang.Integer diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index 10cabe11f1..ebb543d4b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -71,13 +71,11 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao - * @param customerId - * @param monthId * @author yinzuomei * @description 查询 服务能力,网格相关,各五级指标最大值,最小值 * @Date 2020/8/27 13:15 **/ - Map selectServiceAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + Map selectServiceAblityGridMinAndMax(CalculateCommonFormDTO formDTO); /** * @return int diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index b0e405eace..ab0bc1e653 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -88,14 +88,13 @@ public interface ScreenCustomerGridDao extends BaseDao List pageListByCustomerId(PageQueryGridFormDTO formDTO); /** - * @param customerId 客户id * @param gridId 网格id * @return java.lang.String * @author yinzuomei * @description 查询网格所属的组织id * @Date 2020/8/31 12:35 **/ - ScreenCustomerGridDTO selectParentAgencyId(@Param("customerId") String customerId, @Param("gridId") String gridId); + ScreenCustomerGridDTO selectParentAgencyId(@Param("gridId") String gridId); /** * 返回当前客户下,未匹配到的网格信息 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 231db8eaae..b785d78b4a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -202,7 +202,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX - Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); + Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.warn("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; @@ -218,7 +218,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { formDTO.getMonthId(), pageIndex, pageNo, - IndexCalConstant.PAGE_SIZE)); + IndexCalConstant.PAGE_SIZE, + formDTO.getCustomerAreaCode(), + formDTO.getSubCustomerIds())); //遍历每一个网格的记录 recordList.forEach(recordMap -> { //遍历所有的指标 @@ -430,11 +432,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, calculateResult) -> { GridScoreEntity gridScoreEntity = new GridScoreEntity(); + //一定要赋值当前正在计算的客户id gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); gridScoreEntity.setIsTotal(isTotal); gridScoreEntity.setIndexCode(indexCode); - ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); + ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(gridId); if (null != screenCustomerGridDTO) { if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); @@ -610,7 +613,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX - Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); + Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.warn("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; @@ -626,7 +629,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { formDTO.getMonthId(), pageIndex, pageNo, - IndexCalConstant.PAGE_SIZE)); + IndexCalConstant.PAGE_SIZE, + formDTO.getCustomerAreaCode(), + formDTO.getSubCustomerIds())); //遍历每一个网格的记录 recordList.forEach(recordMap -> { //遍历所有的指标 @@ -683,7 +688,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX - Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); + Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.warn("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; @@ -699,7 +704,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { formDTO.getMonthId(), pageIndex, pageNo, - IndexCalConstant.PAGE_SIZE)); + IndexCalConstant.PAGE_SIZE, + formDTO.getCustomerAreaCode(), + formDTO.getSubCustomerIds())); //遍历每一个网格的记录 recordList.forEach(recordMap -> { //遍历所有的指标 @@ -838,15 +845,14 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { 党员参加“三会一课”人次*/ /** - * @param customerId - * @param monthId + * @param formDTO * @return java.util.Map * @author yinzuomei * @description 查询党建能力,网格相关,各五级指标最大值,最小值 * @Date 2020/8/27 12:47 **/ - public Map queryPartyAblityGridMinAndMax(String customerId, String monthId) { - return factIndexPartyAblityGridMonthlyDao.selectPartyAblityGridMinAndMax(customerId, monthId); + public Map queryPartyAblityGridMinAndMax(CalculateCommonFormDTO formDTO) { + return factIndexPartyAblityGridMonthlyDao.selectPartyAblityGridMinAndMax(formDTO); } @@ -863,15 +869,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { /** - * @param customerId - * @param monthId * @return java.util.Map * @author yinzuomei * @description 查询治理能力,网格相关,各五级指标最大值,最小值 * @Date 2020/8/27 12:48 **/ - public Map queryGovrnAblityGridMinAndMax(String customerId, String monthId) { - return factIndexGovrnAblityGridMonthlyDao.selectGovrnAblityGridMinAndMax(customerId, monthId); + public Map queryGovrnAblityGridMinAndMax(CalculateCommonFormDTO formDTO) { + return factIndexGovrnAblityGridMonthlyDao.selectGovrnAblityGridMinAndMax(formDTO); } /** @@ -886,15 +890,14 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } /** - * @param customerId - * @param monthId + * @param formDTO * @return java.util.Map * @author yinzuomei * @description 查询 服务能力,网格相关,各五级指标最大值,最小值 * @Date 2020/8/27 12:50 **/ - public Map queryServiceAblityGridMinAndMax(String customerId, String monthId) { - return factIndexServiceAblityGridMonthlyDao.selectServiceAblityGridMinAndMax(customerId, monthId); + public Map queryServiceAblityGridMinAndMax(CalculateCommonFormDTO formDTO) { + return factIndexServiceAblityGridMonthlyDao.selectServiceAblityGridMinAndMax(formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index 1a8d1d7aa1..755e3aab60 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -113,16 +113,30 @@ m.SATISFACTION_RATIO FROM fact_index_govrn_ablity_grid_monthly m + inner join screen_customer_grid scg + on( + m.GRID_ID=scg.GRID_ID + and scg.DEL_FLAG='0' + and scg.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - and m.CUSTOMER_ID=#{customerId} and m.MONTH_ID=#{monthId} + + + and scg.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + and m.CUSTOMER_ID=#{customerId} + and scg.CUSTOMER_ID=#{customerId} + + order by m.GRID_ID asc LIMIT #{pageIndex}, #{pageSize} - SELECT m.CUSTOMER_ID, m.GRID_ID, @@ -145,10 +159,24 @@ MAX(m.SATISFACTION_RATIO) AS SATISFACTION_RATIO_MAX FROM fact_index_govrn_ablity_grid_monthly m + inner join screen_customer_grid scg + on( + m.GRID_ID=scg.GRID_ID + and scg.DEL_FLAG='0' + and scg.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - and m.CUSTOMER_ID=#{customerId} and m.MONTH_ID=#{monthId} + + + and scg.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + and m.CUSTOMER_ID=#{customerId} + and scg.CUSTOMER_ID=#{customerId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml index 2ea92ebb5d..a1d0e85e45 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml @@ -126,16 +126,30 @@ m.JOIN_THREE_MEETS_COUNT FROM fact_index_party_ablity_grid_monthly m + inner join screen_customer_grid scg + on( + m.GRID_ID=scg.GRID_ID + and scg.DEL_FLAG='0' + and scg.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} - order by m.GRID_ID asc + + + and scg.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scg.CUSTOMER_ID=#{customerId} + + + order by m.GRID_ID asc LIMIT #{pageIndex}, #{pageSize} - SELECT m.CUSTOMER_ID, m.GRID_ID, @@ -168,10 +182,24 @@ MAX(m.JOIN_THREE_MEETS_COUNT) AS JOIN_THREE_MEETS_COUNT_MAX FROM fact_index_party_ablity_grid_monthly m + inner join screen_customer_grid scg + on( + m.GRID_ID=scg.GRID_ID + and scg.DEL_FLAG='0' + and scg.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + + and scg.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scg.CUSTOMER_ID=#{customerId} + + @@ -180,10 +208,24 @@ count(1) as total FROM fact_index_party_ablity_grid_monthly m + inner join screen_customer_grid scg + on( + m.GRID_ID=scg.GRID_ID + and scg.DEL_FLAG='0' + and scg.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + + and scg.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scg.CUSTOMER_ID=#{customerId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml index be06e22b1a..fa6f11e4a3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml @@ -98,7 +98,7 @@ - SELECT m.CUSTOMER_ID, m.GRID_ID, @@ -111,10 +111,24 @@ MAX(m.PARTY_VOLUNTEER_RATIO) AS PARTY_VOLUNTEER_RATIO_MAX FROM fact_index_service_ablity_grid_monthly m + inner join screen_customer_grid scg + on( + m.GRID_ID=scg.GRID_ID + and scg.DEL_FLAG='0' + and scg.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - and m.CUSTOMER_ID=#{customerId} and m.MONTH_ID=#{monthId} + + + and scg.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + and m.CUSTOMER_ID=#{customerId} + and scg.CUSTOMER_ID=#{customerId} + + @@ -123,10 +137,24 @@ count(1) as total FROM fact_index_service_ablity_grid_monthly m + inner join screen_customer_grid scg + on( + m.GRID_ID=scg.GRID_ID + and scg.DEL_FLAG='0' + and scg.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + + and scg.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scg.CUSTOMER_ID=#{customerId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml index 147941c2d1..8fcea4e572 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml @@ -101,7 +101,6 @@ screen_customer_grid m WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.GRID_ID = #{gridId} From b99eac931b0321d8703b6f46c63fccf30f9f5401 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 15 Jan 2021 13:18:09 +0800 Subject: [PATCH 012/101] =?UTF-8?q?=E5=8C=BA=E7=9B=B4=E9=83=A8=E9=97=A8-?= =?UTF-8?q?=E6=B2=BB=E7=90=86=E8=83=BD=E5=8A=9B=E4=BF=AE=E6=94=B9end1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexGovrnAblityDeptMonthlyDao.java | 5 +- .../indexcal/impl/DeptScoreServiceImpl.java | 4 +- .../FactIndexGovrnAblityDeptMonthlyDao.xml | 48 +++++++++++++++++-- 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index b4f79644d0..b53a2d7a83 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -18,7 +18,6 @@ package com.epmet.dao.evaluationindex.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import org.apache.ibatis.annotations.Mapper; @@ -90,7 +89,9 @@ public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao> selectListByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") Integer offset, - @Param("pageSize") Integer pageSize); + @Param("pageSize") Integer pageSize, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds") List subCustomerIds); /** * @return com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 00ebad6b5d..9224a2679d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -228,7 +228,9 @@ public class DeptScoreServiceImpl extends BaseServiceImpl> list = null; do { - list = factIndexGovrnAblityDeptMonthlyDao.selectListByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); + list = factIndexGovrnAblityDeptMonthlyDao.selectListByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize, + formDTO.getCustomerAreaCode(), + formDTO.getSubCustomerIds()); if (!CollectionUtils.isEmpty(list)) { //遍历指标分组 计算分数 List> crrentFactRecordList = list; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml index 404cc2f7f8..30754c9931 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -101,10 +101,24 @@ count( 1 ) AS total FROM fact_index_govrn_ablity_dept_monthly m + inner join screen_customer_dept scd + on( + m.GRID_ID=scd.GRID_ID + and scd.DEL_FLAG='0' + and scd.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID=#{monthId} + + + and scd.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scd.CUSTOMER_ID=#{customerId} + + @@ -127,10 +141,24 @@ MAX(M.SATISFACTION_RATIO) as SATISFACTION_RATIO_MAX FROM fact_index_govrn_ablity_dept_monthly m + inner join screen_customer_dept scd + on( + m.GRID_ID=scd.GRID_ID + and scd.DEL_FLAG='0' + and scd.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + + and scd.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scd.CUSTOMER_ID=#{customerId} + + @@ -148,10 +176,24 @@ SATISFACTION_RATIO FROM fact_index_govrn_ablity_dept_monthly m + inner join screen_customer_dept scd + on( + m.GRID_ID=scd.GRID_ID + and scd.DEL_FLAG='0' + and scd.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + + and scd.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scd.CUSTOMER_ID=#{customerId} + + ORDER BY m.DEPT_ID ASC LIMIT #{offset},#{pageSize} From eb51561ef270575b62fb896f5536dc57f0608cff Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 15 Jan 2021 14:26:47 +0800 Subject: [PATCH 013/101] =?UTF-8?q?=E7=A4=BE=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 4 +- .../indexcal/CommunityScoreDao.java | 9 + .../indexcal/GridScoreDao.java | 10 + .../FactIndexGovrnAblityOrgMonthlyDao.java | 9 + .../FactIndexPartyAblityOrgMonthlyDao.java | 10 + .../FactIndexServiceAblityOrgMonthlyDao.java | 9 + .../IndexCalculateCommunityService.java | 7 +- .../IndexCalculateCommunityServiceImpl.java | 324 +++++++++++++++++- .../impl/IndexCalculateServiceImpl.java | 2 +- .../indexcal/CommunityScoreDao.xml | 25 ++ .../evaluationindex/indexcal/GridScoreDao.xml | 23 ++ .../FactIndexGovrnAblityOrgMonthlyDao.xml | 25 ++ .../FactIndexPartyAblityOrgMonthlyDao.xml | 20 ++ .../FactIndexServiceAblityOrgMonthlyDao.xml | 20 ++ 14 files changed, 473 insertions(+), 24 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index a22a573819..5b784c25ba 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -177,8 +177,8 @@ public class DemoController { } @PostMapping("zxc2") - public Result getZxc2(){ - indexCalculateCommunityService.calCommunityAll("45687aa479955f9d06204d415238f7cc", "202008"); + public Result getZxc2(@RequestBody CalculateCommonFormDTO formDTO){ + indexCalculateCommunityService.calCommunityAll(formDTO); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java index 95d0f60e84..8ec12f4ede 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java @@ -61,6 +61,15 @@ public interface CommunityScoreDao extends BaseDao selectCommunityInfo(@Param("customerId") String customerId,@Param("monthId")String monthId); + /** + * @Description 查询社区相关信息 存在下级客户 + * @Param areaCode + * @Param monthId + * @author zxc + * @date 2021/1/15 下午2:18 + */ + List selectCommunityInfoExistsSub(@Param("areaCode") String areaCode,@Param("monthId")String monthId); + /** * 根据入参查询 查询社区相关信息 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java index e4eef189fd..0435005a88 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java @@ -78,6 +78,16 @@ public interface GridScoreDao extends BaseDao { */ List selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + /** + * @Description 所有网格的平均值 + * @Param monthId + * @Param indexCode + * @Param areaCode + * @author zxc + * @date 2021/1/15 上午9:24 + */ + List selectSubGridAvgScoreByAreaCode(@Param("monthId")String monthId, @Param("indexCode")String indexCode, @Param("areaCode")String areaCode); + /** * 根据入参查询 网格相关分值记录 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java index 5d172d1e06..48d156cc81 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java @@ -67,6 +67,15 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); + /** + * @Description 社区治理能力各个参数查询【被吹哨次数、办结项目数、项目响应度、超期项目率、【街道办结项目的处理效率,level为street时存在】、办结项目率、办结项目满意度】存在下级客户时 + * @Param areaCode + * @Param monthId + * @author zxc + * @date 2021/1/15 下午1:27 + */ + List> selectCommunityGovernAbilityExistsSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + /** * 根据组织类型删除数据 * @author zhaoqifeng diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index f9ab1ba754..e3c5842b2f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -78,6 +78,16 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao> selectPublishArticleCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); + /** + * @Description 查询社区下的发文数 Map【根据areaCode】 + * @Param customerId + * @Param monthId + * @Param level + * @author zxc + * @date 2021/1/15 上午9:48 + */ + List> selectPublishArticleCountMapbyAreaCode(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + /** * 根据组织类型删除数据 * @author zhaoqifeng diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index c7ea1d7795..bacc7b77ed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -79,6 +79,15 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao> selectActivityCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); + /** + * @Description 社区活动组织次数 存在下级客户 + * @Param monthId + * @Param areaCode + * @author zxc + * @date 2021/1/15 下午1:53 + */ + List> selectActivityCountMapExistsSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + /** * 根据组织类型删除数据 * @author zhaoqifeng diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java index 09d344dd47..cf1e5f19eb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java @@ -1,5 +1,7 @@ package com.epmet.service.evaluationindex.indexcal; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; + /** * @Author zxc * @DateTime 2020/8/26 10:33 上午 @@ -8,10 +10,9 @@ public interface IndexCalculateCommunityService { /** * @Description 计算社区相关总分 - * @param customerId - * @param monthId + * @param formDTO * @author zxc * @date 2020/9/1 4:12 下午 */ - Boolean calCommunityAll(String customerId, String monthId); + Boolean calCommunityAll(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index fa0fc396b3..8c03bf53f5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -81,29 +81,52 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni private CommunitySelfSubScoreDao communitySelfSubScoreDao; /** - * @param customerId - * @param monthId + * @param form * @Description 计算社区相关总分 * @author zxc * @date 2020/9/1 4:12 下午 */ @Override - public Boolean calCommunityAll(String customerId, String monthId) { - Boolean aBoolean = communityPartyCalculate(customerId, monthId);//党建能力 - if (!aBoolean.equals(true)) { - throw new RenException("calculate community-party-ability failure ......"); - } - Boolean bBoolean = communityGovernAbilityCalculate(customerId, monthId);// 治理能力 - if (!bBoolean.equals(true)) { - throw new RenException("calculate community-govern-ability failure ......"); - } - Boolean cBoolean = communityServiceAbilityCalculate(customerId, monthId);// 服务能力 - if (!cBoolean.equals(true)) { - throw new RenException("calculate community-service-ability failure ......"); - } - Boolean dBoolean = communityRelate(customerId, monthId); - if (!dBoolean.equals(true)) { - throw new RenException("calculate community-all insert failure ......"); + public Boolean calCommunityAll(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + if (StringUtils.isEmpty(form.getCustomerAreaCode())) { + Boolean aBoolean = communityPartyCalculate(customerId, monthId);//党建能力 + if (!aBoolean.equals(true)) { + throw new RenException("calculate community-party-ability failure ......"); + } + Boolean bBoolean = communityGovernAbilityCalculate(customerId, monthId);// 治理能力 + if (!bBoolean.equals(true)) { + throw new RenException("calculate community-govern-ability failure ......"); + } + Boolean cBoolean = communityServiceAbilityCalculate(customerId, monthId);// 服务能力 + if (!cBoolean.equals(true)) { + throw new RenException("calculate community-service-ability failure ......"); + } + Boolean dBoolean = communityRelate(customerId, monthId); + if (!dBoolean.equals(true)) { + throw new RenException("calculate community-all insert failure ......"); + } + }else { + // 党建能力 + Boolean aBoolean = communityPartyCalculateExistsSub(form); + if (!aBoolean.equals(true)) { + throw new RenException("calculate community-party-ability-exists-sub failure ......"); + } + // 治理能力 + Boolean bBoolean = communityGovernAbilityCalculateExistsSub(form); + if (!bBoolean.equals(true)) { + throw new RenException("calculate community-govern-ability-exists-sub failure ......"); + } + // 服务能力 + Boolean cBoolean = communityServiceAbilityCalculateExistsSub(form); + if (!cBoolean.equals(true)) { + throw new RenException("calculate community-service-ability-exists-sub failure ......"); + } + Boolean dBoolean = communityRelateExistsSub(form); + if (!dBoolean.equals(true)) { + throw new RenException("calculate community-all-exists-sub insert failure ......"); + } } //计算自身和下级 CalculateCommonFormDTO formDTO = new CalculateCommonFormDTO(); @@ -565,4 +588,269 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni result.setFiveLevel(resultFive); return result; } + + /** + * @Description 社区名义发文数量计算【党建能力】存在下级客户 + * @Param form + * @author zxc + * @date 2021/1/15 上午9:18 + */ + public Boolean communityPartyCalculateExistsSub(CalculateCommonFormDTO form) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(form.getCustomerId(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return true; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCode(form.getMonthId(),IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.warn(IndexCalConstant.GRID_PARTY_AVG_NULL); + } else { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, IndexCalConstant.PAGE_SIZE); + subPartyAvgList.forEach(party -> { + List index1SampleValues = new ArrayList<>(); + party.forEach(c -> { + pid.put(c.getAgencyId(), c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapbyAreaCode( form.getMonthId(),form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(publishArticleCountList)) { + log.warn(IndexCalConstant.COMMUNITY_PUBLISH_ARTICLE_LIST_NULL); + } else { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL, detail.getIndexCode())); + return; + } else { + List decimalList = publishArticleCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(publishArticleCountList, IndexCalConstant.PAGE_SIZE); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString()); + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + log.info("communityPartyCalculateExistsSub getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("communityPartyCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + deleteOldRecord(form.getCustomerId(),form.getMonthId()); + deleteAndInsert(result); + return true; + } + + /** + * @Description 社区治理能力 存在下级客户 + * @Param form + * @author zxc + * @date 2021/1/15 上午10:56 + */ + public Boolean communityGovernAbilityCalculateExistsSub(CalculateCommonFormDTO form) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(form.getCustomerId(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return true; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + detailListByParentCode.forEach(detail -> { + // 社区下属所有网格治理能力汇总(平均值) + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCode(form.getMonthId(),IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(subGridGovernAvg)){ + log.warn("社区下级治理能力平均分集合为空"); + }else{ + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + pid.put(c.getAgencyId(), c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSub(form.getMonthId(),form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.warn(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); + }else{ + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, IndexCalConstant.PAGE_SIZE); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString()); + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + log.info("communityGovernAbilityCalculateExistsSub getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("communityGovernAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + deleteAndInsert(result); + return true; + } + + + /** + * @Description 社区服务能力 存在下级客户 + * @Param form + * @author zxc + * @date 2021/1/15 下午1:42 + */ + public Boolean communityServiceAbilityCalculateExistsSub(CalculateCommonFormDTO form) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(form.getCustomerId(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return true; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCode(form.getMonthId(),IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(subGridServiceAvg)) { + log.warn("查询社区下级所有网格服务能力得分平均值集合为空"); + } else { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, IndexCalConstant.PAGE_SIZE); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + pid.put(c.getAgencyId(), c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSub(form.getMonthId(),form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.warn(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); + }else{ + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, IndexCalConstant.PAGE_SIZE); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString()); + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + log.info("communityServiceAbilityCalculateExistsSub getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("communityServiceAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + deleteAndInsert(result); + return true; + } + + /** + * @Description 社区相关计算 存在下级客户 + * @Param form + * @author zxc + * @date 2021/1/15 下午1:47 + */ + public Boolean communityRelateExistsSub(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(form.getCustomerId(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List factIndexCommunityScoreEntities = factIndexCommunityScoreDao.selectCommunityInfoExistsSub(form.getCustomerAreaCode(),form.getMonthId()); + detailListByParentCode.forEach(detail -> { + factIndexCommunityScoreEntities.forEach(community -> { + if (detail.getIndexCode().equals(community.getIndexCode())) { + community.setScore(community.getScore().multiply(detail.getWeight())); + } + }); + }); + Map> collect = factIndexCommunityScoreEntities.stream().collect(Collectors.groupingBy(FactIndexCommunityScoreDTO::getAgencyId)); + List result = new ArrayList<>(); + collect.forEach((key, value) -> { + FactIndexCommunityScoreDTO score = new FactIndexCommunityScoreDTO(); + score.setIsTotal(NumConstant.ONE_STR); + score.setCustomerId(customerId); + score.setAgencyId(key); + score.setMonthId(monthId); + score.setYearId(DateUtils.getYearId(monthId)); + score.setQuarterId(DateUtils.getQuarterId(monthId)); + score.setIndexCode(IndexCalConstant.COMMUNITY_RELATE); + score.setAllParentIndexCode(NumConstant.ZERO_STR); + score.setWeight(new BigDecimal(NumConstant.ONE_NEG)); + value.forEach(community -> { + score.setScore(score.getScore().add(community.getScore())); + score.setParentAgencyId(community.getParentAgencyId()); + }); + result.add(score); + }); + if (!CollectionUtils.isEmpty(result)){ + factIndexCommunityScoreDao.insertCommunityPartyRecord(result); + } + return true; + } + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index 9a03124895..c29e69bd2b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -135,7 +135,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { //计算社区 start = System.currentTimeMillis(); try { - flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId()); + flag = indexCalculateCommunityService.calCommunityAll(formDTO); log.info("客户Id:{}【社区相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); } catch (Exception e) { log.error("indexCalculate calCommunityAll exception", e); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml index 8be2f83314..0c90b3c798 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml @@ -122,4 +122,29 @@ AND MONTH_ID = #{monthId} ORDER BY AGENCY_ID + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml index 7f3912fa6f..4192c6e192 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml @@ -179,4 +179,27 @@ ORDER BY GRID_ID + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index 065ac740a3..814cda7548 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -149,4 +149,29 @@ AND MONTH_ID = #{monthId} AND data_type = #{type} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index cf9146cc1f..5b9e361e1a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -112,4 +112,24 @@ AND month_id = #{monthId} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index a72642ef9a..18fb1a7352 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -111,4 +111,24 @@ AND customer_id = #{customerId} AND month_id = #{monthId} + + + From fa4688a0e697177d13a3a764ab65e242be7a68b7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 15 Jan 2021 14:54:16 +0800 Subject: [PATCH 014/101] =?UTF-8?q?=E5=85=A5=E5=8F=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/DemoController.java | 12 ++++-------- .../indexcal/IndexCalculateDistrictService.java | 7 ++++--- .../indexcal/IndexCalculateStreetService.java | 7 ++++--- .../impl/IndexCalculateDistrictServiceImpl.java | 7 ++++--- .../indexcal/impl/IndexCalculateServiceImpl.java | 4 ++-- .../impl/IndexCalculateStreetServiceImpl.java | 7 ++++--- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 5b784c25ba..32a113f464 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -486,17 +486,13 @@ public class DemoController { } @PostMapping("streetZxc") - public void getStreet(){ - String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; - String monthId = "202009"; - indexCalculateStreetService.calStreetAll(customerId,monthId); + public void getStreet(@RequestBody CalculateCommonFormDTO form){ + indexCalculateStreetService.calStreetAll(form); } @PostMapping("districtZxc") - public void getDistrict(){ - String customerId = "45687aa479955f9d06204d415238f7cc"; - String monthId = "202009"; - indexCalculateDistrictService.calDistrictAll(customerId,monthId); + public void getDistrict(@RequestBody CalculateCommonFormDTO form){ + indexCalculateDistrictService.calDistrictAll(form); } @PostMapping("gridZxc") public void getGrid(){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateDistrictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateDistrictService.java index 0e8ce09ccf..0ece36742b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateDistrictService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateDistrictService.java @@ -1,5 +1,7 @@ package com.epmet.service.evaluationindex.indexcal; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; + /** * @Author zxc * @DateTime 2020/9/4 9:03 上午 @@ -8,11 +10,10 @@ public interface IndexCalculateDistrictService { /** * @Description 计算全区相关总分 - * @param customerId - * @param monthId + * @param form * @author zxc * @date 2020/9/2 3:12 下午 */ - Boolean calDistrictAll(String customerId, String monthId); + Boolean calDistrictAll(CalculateCommonFormDTO form); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java index c27b6db508..2e44de4a4e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java @@ -1,5 +1,7 @@ package com.epmet.service.evaluationindex.indexcal; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; + /** * @Author zxc * @DateTime 2020/9/2 3:11 下午 @@ -8,11 +10,10 @@ public interface IndexCalculateStreetService { /** * @Description 计算街道相关总分 - * @param customerId - * @param monthId + * @param form * @author zxc * @date 2020/9/2 3:12 下午 */ - Boolean calStreetAll(String customerId, String monthId); + Boolean calStreetAll(CalculateCommonFormDTO form); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 5b18396a66..9347afea2f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -79,14 +79,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict private AgencySelfSubScoreDao agencySelfSubScoreDao; /** - * @param customerId - * @param monthId + * @param form * @Description 计算全区相关总分 * @author zxc * @date 2020/9/2 3:12 下午 */ @Override - public Boolean calDistrictAll(String customerId, String monthId) { + public Boolean calDistrictAll(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); Boolean aBoolean = districtPartyCalculate(customerId, monthId);//党建能力 if (!aBoolean.equals(true)) { throw new RenException("calculate district-party-ability failure ......"); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index c29e69bd2b..443bdd827c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -144,7 +144,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { //计算街道 start = System.currentTimeMillis(); try { - flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId()); + flag = indexCalculateStreetService.calStreetAll(formDTO); log.info("客户Id:{}【街道相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); } catch (Exception e) { log.error("indexCalculate calStreetAll exception", e); @@ -162,7 +162,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { //计算全区 start = System.currentTimeMillis(); try { - flag = indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId()); + flag = indexCalculateDistrictService.calDistrictAll(formDTO); log.info("客户Id:{}【全区相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); } catch (Exception e) { log.error("indexCalculate calDistrictAll exception", e); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 4669ae0cda..372ec6ae73 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -82,14 +82,15 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ private AgencySelfSubScoreDao agencySelfSubScoreDao; /** - * @param customerId - * @param monthId + * @param form * @Description 计算街道相关总分 * @author zxc * @date 2020/9/2 3:12 下午 */ @Override - public Boolean calStreetAll(String customerId, String monthId) { + public Boolean calStreetAll(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); Boolean aBoolean = streetPartyCalculate(customerId, monthId);//党建能力 if (!aBoolean.equals(true)) { throw new RenException("calculate street-party-ability failure ......"); From c396fc3377f92ff2f75100e3018d195a05fc37c5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 15 Jan 2021 16:39:26 +0800 Subject: [PATCH 015/101] jiedao --- .../indexcal/AgencyScoreDao.java | 10 + .../indexcal/CommunityScoreDao.java | 10 + .../FactIndexPartyAblityOrgMonthlyDao.java | 9 + .../impl/IndexCalculateStreetServiceImpl.java | 321 +++++++++++++++++- .../indexcal/AgencyScoreDao.xml | 26 ++ .../indexcal/CommunityScoreDao.xml | 23 ++ .../FactIndexPartyAblityOrgMonthlyDao.xml | 20 ++ 7 files changed, 404 insertions(+), 15 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java index 3046923a98..cbe648701c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -62,6 +62,16 @@ public interface AgencyScoreDao extends BaseDao { */ List selectAgencyScoreInfo(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("dataType")String dataType); + /** + * @Description 查询【fact_index_agency_score】相关信息 存在下级客户 + * @Param areaCode + * @Param monthId + * @Param dataType + * @author zxc + * @date 2021/1/15 下午4:23 + */ + List selectAgencyScoreInfoExistsSub(@Param("areaCode") String areaCode, @Param("monthId")String monthId, @Param("dataType")String dataType); + /** * @Description 区下级街道得分平均值 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java index 8ec12f4ede..1e653e61a7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java @@ -88,6 +88,16 @@ public interface CommunityScoreDao extends BaseDao selectSubCommAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + /** + * @Description 街道下级所有社区得分平均值 存在下级客户 + * @Param monthId + * @Param indexCode + * @Param areaCode + * @author zxc + * @date 2021/1/15 下午3:19 + */ + List selectSubCommAvgScoreExistSub(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode); + /** * 根据入参查询 查询社区id * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index e3c5842b2f..1464481ad6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -78,6 +78,15 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao> selectPublishArticleCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); + /** + * @Description 查询社区下的发文数 Map 存在下级客户 + * @Param monthId + * @Param areaCode + * @author zxc + * @date 2021/1/15 下午3:31 + */ + List> selectPublishArticleCountMapExistSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + /** * @Description 查询社区下的发文数 Map【根据areaCode】 * @Param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 372ec6ae73..9c75a6815d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -91,21 +91,43 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ public Boolean calStreetAll(CalculateCommonFormDTO form) { String customerId = form.getCustomerId(); String monthId = form.getMonthId(); - Boolean aBoolean = streetPartyCalculate(customerId, monthId);//党建能力 - if (!aBoolean.equals(true)) { - throw new RenException("calculate street-party-ability failure ......"); - } - Boolean bBoolean = streetGovernAbilityCalculate(customerId, monthId);// 治理能力 - if (!bBoolean.equals(true)) { - throw new RenException("calculate street-govern-ability failure ......"); - } - Boolean cBoolean = streetServiceAbilityCalculate(customerId, monthId);// 服务能力 - if (!cBoolean.equals(true)) { - throw new RenException("calculate street-service-ability failure ......"); - } - Boolean dBoolean = streetRelate(customerId, monthId); - if (!dBoolean.equals(true)) { - throw new RenException("calculate street-all insert failure ......"); + if (StringUtils.isEmpty(form.getCustomerAreaCode())) { + Boolean aBoolean = streetPartyCalculate(customerId, monthId);//党建能力 + if (!aBoolean.equals(true)) { + throw new RenException("calculate street-party-ability failure ......"); + } + Boolean bBoolean = streetGovernAbilityCalculate(customerId, monthId);// 治理能力 + if (!bBoolean.equals(true)) { + throw new RenException("calculate street-govern-ability failure ......"); + } + Boolean cBoolean = streetServiceAbilityCalculate(customerId, monthId);// 服务能力 + if (!cBoolean.equals(true)) { + throw new RenException("calculate street-service-ability failure ......"); + } + Boolean dBoolean = streetRelate(customerId, monthId); + if (!dBoolean.equals(true)) { + throw new RenException("calculate street-all insert failure ......"); + } + }else { + //党建能力 + Boolean aBoolean = streetPartyCalculateExistsSub(form); + if (!aBoolean.equals(true)) { + throw new RenException("calculate street-party-ability-exists-sub failure ......"); + } + // 治理能力 + Boolean bBoolean = streetGovernAbilityCalculateExistsSub(form); + if (!bBoolean.equals(true)) { + throw new RenException("calculate street-govern-ability-exists-sub failure ......"); + } + // 服务能力 + Boolean cBoolean = streetServiceAbilityCalculateExistsSub(form); + if (!cBoolean.equals(true)) { + throw new RenException("calculate street-service-ability-exists-sub failure ......"); + } + Boolean dBoolean = streetRelateExistsSub(form); + if (!dBoolean.equals(true)) { + throw new RenException("calculate street-all-exists-sub insert failure ......"); + } } //计算自身和下级 CalculateCommonFormDTO formDTO = new CalculateCommonFormDTO(); @@ -569,4 +591,273 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ result.setFiveLevel(resultFive); return result; } + + /** + * @param form + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + public Boolean streetPartyCalculateExistsSub(CalculateCommonFormDTO form) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return true; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + //下属所有社区的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScoreExistSub(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { + log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); + } else if (subCommPartyAvgScore.size() > NumConstant.ZERO) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subCommPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + pid.put(c.getAgencyId(),c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 街道名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSub(monthId,form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(mapList)) { + log.warn(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL); + } else { + String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldName)) { + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL, detail.getIndexCode())); + return; + } else { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(mapList.stream().map(m -> new BigDecimal(m.get(fieldName).toString())).collect(Collectors.toList())); + List>> publishArticleList = ListUtils.partition(mapList, IndexCalConstant.PAGE_SIZE); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString()); + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldName)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("streetPartyAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("streetPartyAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL); + insertDetail(result); + return true; + } + + /** + * @Description 街道治理能力 + * @param form + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + public Boolean streetGovernAbilityCalculateExistsSub(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return true; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = communityScoreDao.selectSubCommAvgScoreExistSub(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(subGridGovernAvg)){ + log.warn("查询街道下属所有社区治理能力汇总为空"); + }else if (subGridGovernAvg.size() > NumConstant.ZERO) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + pid.put(c.getAgencyId(),c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSub(monthId,form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.warn(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); + }else{ + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, IndexCalConstant.PAGE_SIZE); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString()); + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("streetGovernAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("streetGovernAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + insertDetail(result); + return true; + } + + /** + * @Description 街道服务能力 + * @param form + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + public Boolean streetServiceAbilityCalculateExistsSub(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return true; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { + List subCommServiceAvg = communityScoreDao.selectSubCommAvgScoreExistSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(subCommServiceAvg)) { + log.warn("查询街道下属社区服务能力得分平均值为空"); + } else if (subCommServiceAvg.size() > NumConstant.ZERO) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subCommServiceAvg, IndexCalConstant.PAGE_SIZE); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + pid.put(c.getAgencyId(),c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSub(monthId,form.getCustomerAreaCode()); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.warn(IndexCalConstant.STREET_SERVICE_ABILITY_NULL); + }else{ + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, IndexCalConstant.PAGE_SIZE); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString()); + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("streetServiceAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("streetServiceAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + insertDetail(result); + return true; + } + + /** + * @Description 街道相关计算 + * @param form + * @author zxc + * @date 2020/9/3 9:21 上午 + */ + public Boolean streetRelateExistsSub(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List agencyScoreList = agencyScoreDao.selectAgencyScoreInfoExistsSub(form.getCustomerAreaCode(), monthId, IndexCalConstant.STREET_LEVEL); + detailListByParentCode.forEach(detail -> { + agencyScoreList.forEach(community -> { + if (detail.getIndexCode().equals(community.getIndexCode())) { + community.setScore(community.getScore().multiply(detail.getWeight())); + } + }); + }); + Map> collect = agencyScoreList.stream().collect(Collectors.groupingBy(AgencyScoreDTO::getAgencyId)); + List result = new ArrayList<>(); + collect.forEach((key, value) -> { + AgencyScoreDTO score = new AgencyScoreDTO(); + score.setIsTotal(NumConstant.ONE_STR); + score.setCustomerId(customerId); + score.setAgencyId(key); + score.setMonthId(monthId); + score.setYearId(DateUtils.getYearId(monthId)); + score.setQuarterId(DateUtils.getQuarterId(monthId)); + score.setIndexCode(IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode()); + score.setDataType(IndexCalConstant.STREET_LEVEL); + score.setAllParentIndexCode(NumConstant.ZERO_STR); + score.setWeight(new BigDecimal(NumConstant.ONE_NEG)); + value.forEach(street -> { + score.setScore(score.getScore().add(street.getScore())); + score.setParentAgencyId(street.getParentAgencyId()); + }); + result.add(score); + }); + if (!CollectionUtils.isEmpty(result)){ + agencyScoreDao.insertStreetRecord(result); + } + return true; + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index 9de83a3a9a..1bad7b73b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -124,4 +124,30 @@ AND MONTH_ID = #{monthId} ORDER BY AGENCY_ID + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml index 0c90b3c798..5ed019a524 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml @@ -147,4 +147,27 @@ OR cs.INDEX_CODE = "zhilinengli" OR cs.INDEX_CODE = "fuwunengli") + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 5b9e361e1a..69481be8b2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -132,4 +132,24 @@ AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') + + + From 5a5dfe1f27142c3177c8168bc8bb034eba3d9ed0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 16 Jan 2021 11:37:26 +0800 Subject: [PATCH 016/101] =?UTF-8?q?=E5=8C=BA=E7=9B=B4=E9=83=A8=E9=97=A8-?= =?UTF-8?q?=E6=B2=BB=E7=90=86=E8=83=BD=E5=8A=9B=E4=BF=AE=E6=94=B9end2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml index 30754c9931..f782210785 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -103,7 +103,7 @@ fact_index_govrn_ablity_dept_monthly m inner join screen_customer_dept scd on( - m.GRID_ID=scd.GRID_ID + m.DEPT_ID=scd.DEPT_ID and scd.DEL_FLAG='0' and scd.UP_TO_CAL='yes' ) @@ -143,7 +143,7 @@ fact_index_govrn_ablity_dept_monthly m inner join screen_customer_dept scd on( - m.GRID_ID=scd.GRID_ID + m.DEPT_ID=scd.DEPT_ID and scd.DEL_FLAG='0' and scd.UP_TO_CAL='yes' ) @@ -178,7 +178,7 @@ fact_index_govrn_ablity_dept_monthly m inner join screen_customer_dept scd on( - m.GRID_ID=scd.GRID_ID + m.DEPT_ID=scd.DEPT_ID and scd.DEL_FLAG='0' and scd.UP_TO_CAL='yes' ) From dd2cdb15c225c14255a29d8782a2a2c9f075fb7c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 18 Jan 2021 09:55:54 +0800 Subject: [PATCH 017/101] district --- .../indexcal/AgencyScoreDao.java | 13 +- .../indexcal/DeptScoreDao.java | 10 + .../FactIndexPartyAblityOrgMonthlyDao.java | 2 +- .../IndexCalculateDistrictServiceImpl.java | 317 +++++++++++++++++- .../impl/IndexCalculateStreetServiceImpl.java | 4 +- .../indexcal/AgencyScoreDao.xml | 26 +- .../indexcal/CommunityScoreDao.xml | 4 +- .../evaluationindex/indexcal/DeptScoreDao.xml | 23 ++ .../evaluationindex/indexcal/GridScoreDao.xml | 2 +- .../FactIndexGovrnAblityOrgMonthlyDao.xml | 2 +- .../FactIndexPartyAblityOrgMonthlyDao.xml | 4 +- .../FactIndexServiceAblityOrgMonthlyDao.xml | 2 +- 12 files changed, 382 insertions(+), 27 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java index cbe648701c..5e0d0585be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -70,7 +70,7 @@ public interface AgencyScoreDao extends BaseDao { * @author zxc * @date 2021/1/15 下午4:23 */ - List selectAgencyScoreInfoExistsSub(@Param("areaCode") String areaCode, @Param("monthId")String monthId, @Param("dataType")String dataType); + List selectAgencyScoreInfoExistsSub(@Param("areaCode") String areaCode,@Param("areaCodeLength") Integer areaCodeLength, @Param("monthId")String monthId, @Param("dataType")String dataType); /** * @Description 区下级街道得分平均值 @@ -81,6 +81,17 @@ public interface AgencyScoreDao extends BaseDao { */ List selectAgencyScoreAvg(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("dataType")String dataType); + /** + * @Description 区下级街道得分平均值 存在下级客户 + * @Param monthId + * @Param indexCode + * @Param dataType + * @Param areaCode + * @author zxc + * @date 2021/1/18 上午9:09 + */ + List selectAgencyScoreAvgExistsSub(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("dataType")String dataType,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength); + /** * 根据入参查询 区/街道相关分数表 记录 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java index c236c31e6c..a22317c371 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -68,6 +68,16 @@ public interface DeptScoreDao extends BaseDao { */ List selectGovernDeptScoreAvg(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + /** + * @Description 所有直属部门治理能力平均值 存在下级客户 + * @Param areaCode + * @Param monthId + * @Param indexCode + * @author zxc + * @date 2021/1/18 上午9:31 + */ + List selectGovernDeptScoreAvgExistsSub(@Param("areaCode")String areaCode, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + /** * @return int * @param customerId 客户id diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 1464481ad6..ebbdc9424f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -85,7 +85,7 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao> selectPublishArticleCountMapExistSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + List> selectPublishArticleCountMapExistSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength); /** * @Description 查询社区下的发文数 Map【根据areaCode】 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 9347afea2f..592c114fd4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -88,21 +88,43 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict public Boolean calDistrictAll(CalculateCommonFormDTO form) { String customerId = form.getCustomerId(); String monthId = form.getMonthId(); - Boolean aBoolean = districtPartyCalculate(customerId, monthId);//党建能力 - if (!aBoolean.equals(true)) { - throw new RenException("calculate district-party-ability failure ......"); - } - Boolean bBoolean = districtGovernAbilityCalculate(customerId, monthId);// 治理能力 - if (!bBoolean.equals(true)) { - throw new RenException("calculate district-govern-ability failure ......"); - } - Boolean cBoolean = districtServiceAbilityCalculate(customerId, monthId);// 服务能力 - if (!cBoolean.equals(true)) { - throw new RenException("calculate district-service-ability failure ......"); - } - Boolean dBoolean = districtRelate(customerId, monthId); - if (!dBoolean.equals(true)) { - throw new RenException("calculate district-all insert failure ......"); + if (StringUtils.isEmpty(form.getCustomerAreaCode())) { + Boolean aBoolean = districtPartyCalculate(customerId, monthId);//党建能力 + if (!aBoolean.equals(true)) { + throw new RenException("calculate district-party-ability failure ......"); + } + Boolean bBoolean = districtGovernAbilityCalculate(customerId, monthId);// 治理能力 + if (!bBoolean.equals(true)) { + throw new RenException("calculate district-govern-ability failure ......"); + } + Boolean cBoolean = districtServiceAbilityCalculate(customerId, monthId);// 服务能力 + if (!cBoolean.equals(true)) { + throw new RenException("calculate district-service-ability failure ......"); + } + Boolean dBoolean = districtRelate(customerId, monthId); + if (!dBoolean.equals(true)) { + throw new RenException("calculate district-all insert failure ......"); + } + }else { + //党建能力 + Boolean aBoolean = districtPartyCalculateExistSub(form); + if (!aBoolean.equals(true)) { + throw new RenException("calculate district-party-ability-exists-sub failure ......"); + } + // 治理能力 + Boolean bBoolean = districtGovernAbilityCalculateExistSub(form); + if (!bBoolean.equals(true)) { + throw new RenException("calculate district-govern-ability-exists-sub failure ......"); + } + // 服务能力 + Boolean cBoolean = districtServiceAbilityCalculateExistSub(form); + if (!cBoolean.equals(true)) { + throw new RenException("calculate district-service-ability-exists-sub failure ......"); + } + Boolean dBoolean = districtRelateExistSub(form); + if (!dBoolean.equals(true)) { + throw new RenException("calculate district-all-exists-sub insert failure ......"); + } } //计算自身和下级 CalculateCommonFormDTO formDTO = new CalculateCommonFormDTO(); @@ -563,4 +585,269 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict return result; } + + /** + * @param form + * @Description 全区名义发文数量计算【党建能力】 存在下级客户 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + public Boolean districtPartyCalculateExistSub(CalculateCommonFormDTO form) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + List indexDetailList = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(indexDetailList)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return true; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + //党建能力平均值 + indexDetailList.forEach(detail -> { + if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); + } else if (subGridPartyAvgScore.size() > NumConstant.ZERO) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, IndexCalConstant.PAGE_SIZE); + subPartyAvgList.forEach(party -> { + List index1SampleValues = new ArrayList<>(); + party.forEach(c -> { + if (!c.getParentId().equals(NumConstant.ZERO_STR)) { + pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); + SampleValue s = new SampleValue(c.getParentId(), c.getScore()); + index1SampleValues.add(s); + } + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 区名义发文数量 + List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSub(monthId,form.getCustomerAreaCode(),NumConstant.SIX); + if (CollectionUtils.isEmpty(publishArticleCountList)) { + log.warn(IndexCalConstant.DISTRICT_PUBLISH_ARTICLE_LIST_NULL); + } else { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL, detail.getIndexCode())); + return; + } else { + List decimalList = publishArticleCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(publishArticleCountList, IndexCalConstant.PAGE_SIZE); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString()); + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("districtPartyAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtPartyAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL); + insertDetail(result); + return true; + } + + /** + * @param form + * @Description 全区治理能力 存在下级客户 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + public Boolean districtGovernAbilityCalculateExistSub(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return true; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { + List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); + for (int i = 0; i < districtGovernAvgList.size(); i++) { + if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ + districtGovernAvgList.remove(districtGovernAvgList.get(i)); + } + } + if (CollectionUtils.isEmpty(districtGovernAvgList)) { + log.warn("查询所有街道治理能力平均值集合为空"); + } else{ + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(districtGovernAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(districtGovernAvgList, IndexCalConstant.PAGE_SIZE); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + if (!c.getParentId().equals(NumConstant.ZERO_STR)) { + pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); + SampleValue s = new SampleValue(c.getParentId(), c.getScore()); + index1SampleValues.add(s); + } + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); + indexInputVOS.add(index1VO); + }); + } + } else if (IndexCodeEnum.SUO_YOU_ZHI_SHU_BMZLNLPJZ.getCode().equals(detail.getIndexCode())){ + List deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvgExistsSub(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); + for (int i = 0; i < deptScoreAvgList.size(); i++) { + if (deptScoreAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ + deptScoreAvgList.remove(deptScoreAvgList.get(i)); + } + } + if (CollectionUtils.isEmpty(deptScoreAvgList)) { + log.warn("查询所有直属部门治理能力平均值集合为空"); + } else{ + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(deptScoreAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(deptScoreAvgList, IndexCalConstant.PAGE_SIZE); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + pid.put(c.getAgencyId(),c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); + indexInputVOS.add(index1VO); + }); + } + }else{ + // TODO 治理能力暂无自身级别 + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("districtGovernAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtGovernAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + insertDetail(result); + return true; + } + + /** + * @param form + * @Description 全区服务能力 存在下级客户 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + public Boolean districtServiceAbilityCalculateExistSub(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return true; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { + List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); + for (int i = 0; i < subStreetAvgList.size(); i++) { + if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ + subStreetAvgList.remove(subStreetAvgList.get(i)); + } + } + if (CollectionUtils.isEmpty(subStreetAvgList)) { + log.warn("查询区下属街道服务能力汇总平均值集合为空"); + } else{ + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subStreetAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subStreetAvgList, IndexCalConstant.PAGE_SIZE); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + if (!c.getParentId().equals(NumConstant.ZERO_STR)) { + pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); + SampleValue s = new SampleValue(c.getParentId(), c.getScore()); + index1SampleValues.add(s); + } + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + // todo 暂时没有自身级别 + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + if (!CollectionUtils.isEmpty(indexInputVOS)) { + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("districtServiceAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtServiceAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + insertDetail(result); + } + return true; + } + + /** + * @param form + * @Description 区相关计算 存在下级客户 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean districtRelateExistSub(CalculateCommonFormDTO form) { + String customerId = form.getCustomerId(); + String monthId = form.getMonthId(); + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List agencyScoreList = agencyScoreDao.selectAgencyScoreInfoExistsSub(form.getCustomerAreaCode(),NumConstant.SIX,monthId, IndexCalConstant.DISTRICT_LEVEL); + detailListByParentCode.forEach(detail -> { + agencyScoreList.forEach(community -> { + if (detail.getIndexCode().equals(community.getIndexCode())) { + community.setScore(community.getScore().multiply(detail.getWeight())); + } + }); + }); + Map> collect = agencyScoreList.stream().collect(Collectors.groupingBy(AgencyScoreDTO::getAgencyId)); + List result = new ArrayList<>(); + collect.forEach((key, value) -> { + AgencyScoreDTO score = new AgencyScoreDTO(); + score.setIsTotal(NumConstant.ONE_STR); + score.setCustomerId(customerId); + score.setAgencyId(key); + score.setMonthId(monthId); + score.setYearId(DateUtils.getYearId(monthId)); + score.setQuarterId(DateUtils.getQuarterId(monthId)); + score.setDataType(IndexCalConstant.DISTRICT_LEVEL); + score.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); + score.setAllParentIndexCode(NumConstant.ZERO_STR); + score.setWeight(new BigDecimal(NumConstant.ONE_NEG)); + value.forEach(community -> { + score.setScore(score.getScore().add(community.getScore())); + score.setParentAgencyId(community.getParentAgencyId()); + }); + result.add(score); + }); + if (!CollectionUtils.isEmpty(result)){ + agencyScoreDao.insertStreetRecord(result); + } + return true; + } + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 9c75a6815d..c2d488ea41 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -634,7 +634,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ } } else { // 街道名义发文数量 - List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSub(monthId,form.getCustomerAreaCode()); + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSub(monthId,form.getCustomerAreaCode(),NumConstant.NINE); if (CollectionUtils.isEmpty(mapList)) { log.warn(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL); } else { @@ -826,7 +826,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ String customerId = form.getCustomerId(); String monthId = form.getMonthId(); List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); - List agencyScoreList = agencyScoreDao.selectAgencyScoreInfoExistsSub(form.getCustomerAreaCode(), monthId, IndexCalConstant.STREET_LEVEL); + List agencyScoreList = agencyScoreDao.selectAgencyScoreInfoExistsSub(form.getCustomerAreaCode(), NumConstant.NINE, monthId, IndexCalConstant.STREET_LEVEL); detailListByParentCode.forEach(detail -> { agencyScoreList.forEach(community -> { if (detail.getIndexCode().equals(community.getIndexCode())) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index 1bad7b73b5..0ce20b42dd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -141,7 +141,7 @@ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fias.AGENCY_ID WHERE fias.del_flag = 0 - AND CHAR_LENGTH(sca.AREA_CODE) >= 6 + AND CHAR_LENGTH(sca.AREA_CODE) >= #{areaCodeLength} AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND fias.MONTH_ID = #{monthId} AND fias.data_type = #{dataType} @@ -150,4 +150,28 @@ OR fias.INDEX_CODE = "dangjiannengli" OR fias.INDEX_CODE = "fuwunengli") + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml index 5ed019a524..b028814062 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml @@ -139,7 +139,7 @@ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = cs.AGENCY_ID WHERE cs.del_flag = 0 - AND CHAR_LENGTH(sca.AREA_CODE) >= 9 + AND CHAR_LENGTH(sca.AREA_CODE) >= 12 AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND cs.MONTH_ID = #{monthId} AND cs.IS_TOTAL = "0" @@ -164,7 +164,7 @@ WHERE fics.del_flag = '0' AND sca.DEL_FLAG = 0 - AND CHAR_LENGTH(sca.AREA_CODE) >= 6 + AND CHAR_LENGTH(sca.AREA_CODE) >= 9 AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND fics.month_id = #{monthId} AND fics.index_code = #{indexCode} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index b70d136989..05f3193d0c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -150,4 +150,27 @@ AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml index 4192c6e192..51a1600474 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml @@ -197,7 +197,7 @@ AND sca.DEL_FLAG = 0 AND figc.month_id = #{monthId} AND figc.index_code = #{indexCode} - AND CHAR_LENGTH(sca.AREA_CODE) >= 9 + AND CHAR_LENGTH(sca.AREA_CODE) >= 12 AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') GROUP BY figc.agency_id diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index 814cda7548..7cb270630c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -171,7 +171,7 @@ WHERE gm.del_flag = '0' AND gm.month_id = #{monthId} - AND CHAR_LENGTH(sca.AREA_CODE) >= 9 + AND CHAR_LENGTH(sca.AREA_CODE) >= 12 AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 69481be8b2..7454e9d0cd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -128,7 +128,7 @@ WHERE fm.del_flag = '0' AND fm.month_id = #{monthId} - AND CHAR_LENGTH(sca.AREA_CODE) >= 9 + AND CHAR_LENGTH(sca.AREA_CODE) >= 12 AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') @@ -147,7 +147,7 @@ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = pm.AGENCY_ID WHERE pm.del_flag = '0' - AND CHAR_LENGTH(sca.AREA_CODE) >= 6 + AND CHAR_LENGTH(sca.AREA_CODE) >= #{areaCode} AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND pm.month_id = #{monthId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index 18fb1a7352..f4b85f33cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -127,7 +127,7 @@ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = sm.AGENCY_ID WHERE sm.del_flag = '0' - AND CHAR_LENGTH(sca.AREA_CODE) >= 9 + AND CHAR_LENGTH(sca.AREA_CODE) >= 12 AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sm.month_id = #{monthId} From 601687cc5103e1c3b6427ad378e435ffb3139b1c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 19 Jan 2021 11:03:51 +0800 Subject: [PATCH 018/101] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.5__screen_org_add_source_col.sql | 2 +- .../db/migration/V0.0.7__update_agencytb_adduptocal.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql index 253da2d92c..a7de879ca6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql @@ -33,6 +33,6 @@ # alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; # alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; - +-- !!!epmet_evaluation_index、epmet_data_statistical_display 都要执行 # alter table screen_customer_grid add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0'; # alter table screen_customer_dept add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0'; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.7__update_agencytb_adduptocal.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.7__update_agencytb_adduptocal.sql index 17e4f2b0c9..ffbb6886c2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.7__update_agencytb_adduptocal.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.7__update_agencytb_adduptocal.sql @@ -1,4 +1,4 @@ --- epmet_evaluation_index +-- !!!epmet_evaluation_index、epmet_data_statistical_display 都要执行 alter table screen_customer_grid add column UP_TO_CAL varchar(10) DEFAULT 'yes' COMMENT '是否参与上级计算yes:参与;no:不参与'; alter table screen_customer_dept add column UP_TO_CAL varchar(10) DEFAULT 'yes' COMMENT '是否参与上级计算yes:参与;no:不参与'; alter table screen_customer_agency add column UP_TO_CAL varchar(10) DEFAULT 'yes' COMMENT '是否参与上级计算yes:参与;no:不参与'; \ No newline at end of file From b7aa1b46137dd44687643e097e32ae0616047a04 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 21 Jan 2021 12:18:25 +0800 Subject: [PATCH 019/101] =?UTF-8?q?=E3=80=90gateway=E5=86=85=E9=83=A8?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E3=80=91resi/gov=E5=90=8C=E6=97=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81customerId=E5=86=99=E5=85=A5header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/auth/InternalAuthProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java b/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java index 2ee22426f6..6a88ccf73e 100644 --- a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java +++ b/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java @@ -111,7 +111,7 @@ public class InternalAuthProcessor extends AuthProcessor { .header(AppClientConstant.CLIENT,baseTokenDto.getClient()) .header(AppClientConstant.USER_ID,baseTokenDto.getUserId()); - if (StringUtils.equals(baseTokenDto.getApp(), "gov")) {//工作端 + if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI)) {//工作端/居民端 if(StringUtils.isNotBlank(customerId)){ exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId); } From 00cf9003c1db2f7ed97dd6dffd5d1111ba7ba79e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 21 Jan 2021 12:47:15 +0800 Subject: [PATCH 020/101] =?UTF-8?q?1=E3=80=81=E6=8C=87=E6=A0=87=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=EF=BC=9AIndexCalculateService.indexCalculate=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=BF=AE=E6=94=B9;2=E3=80=81=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=8C=87=E6=95=B0=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0@RequestHeader=E4=B8=AD=E7=9A=84customerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/form/MonthBarchartFormDTO.java | 5 + .../screen/dto/form/MonthPieChartFormDTO.java | 5 + .../dto/form/SubAgencyIndexRankFormDTO.java | 5 + .../dto/form/SubAgencyIndexRankYMFormDTO.java | 5 + .../dto/form/YearAverageIndexFormDTO.java | 5 + .../controller/screen/IndexController.java | 26 +++-- .../dto/indexcal/CustomerSubInfoDTO.java | 1 + .../screen/ScreenCustomerAgencyDao.java | 12 ++- .../screen/ScreenCustomerDeptDao.java | 11 ++- .../screen/ScreenCustomerGridDao.java | 8 +- .../epmet/dao/stats/CustomerRelationDao.java | 6 ++ .../indexcal/impl/DeptScoreServiceImpl.java | 2 +- .../impl/IndexCalculateServiceImpl.java | 11 ++- .../indexcoll/FactIndexCollectService.java | 7 +- .../impl/FactIndexCollectServiceImpl.java | 96 ++++++++++--------- .../impl/ShiBeiScreenCollServiceImpl.java | 2 +- .../impl/CustomerRelationServiceImpl.java | 5 + .../screen/ScreenCustomerAgencyDao.xml | 27 +++++- .../screen/ScreenCustomerDeptDao.xml | 19 +++- .../screen/ScreenCustomerGridDao.xml | 18 +++- .../mapper/stats/CustomerRelationDao.xml | 15 ++- 21 files changed, 211 insertions(+), 80 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java index 224ab623db..f028fffeff 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java @@ -26,4 +26,9 @@ public class MonthBarchartFormDTO implements Serializable { * 月份ID,如果此列有值,查询截止到当前monthId的近12个月数据 */ private String monthId; + + /** + * area_code升级,新增此参数,来源于当前token + */ + private String customerId; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java index a5e9c53f26..8b3a973153 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java @@ -21,4 +21,9 @@ public class MonthPieChartFormDTO implements Serializable { */ @NotBlank(message = "机关ID不能为空",groups = {MonthPieChart.class}) private String agencyId; + + /** + * area_code升级,新增此参数,来源于当前token + */ + private String customerId; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java index 608c6b0492..b1ffd9243d 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java @@ -30,4 +30,9 @@ public class SubAgencyIndexRankFormDTO implements Serializable { private Integer topNum; private String yearId; + + /** + * area_code升级,新增此参数,来源于当前token + */ + private String customerId; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankYMFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankYMFormDTO.java index e973fefa50..ebfea119a4 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankYMFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankYMFormDTO.java @@ -53,4 +53,9 @@ public class SubAgencyIndexRankYMFormDTO implements Serializable { * 组织类型 组织:agency 网格:grid */ private String orgType; + + /** + * area_code升级,新增此参数,来源于当前token + */ + private String customerId; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java index e53a94cfa9..a9da3253cf 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java @@ -21,4 +21,9 @@ public class YearAverageIndexFormDTO implements Serializable { */ @NotBlank(message = "机关ID不能为空",groups = {YearAverageIndex.class}) private String agencyId; + + /** + * area_code升级,新增此参数,来源于当前token + */ + private String customerId; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index 00fc8046a5..5ebeef980d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -6,6 +6,7 @@ import com.epmet.datareport.eum.OrgTypeEnum; import com.epmet.datareport.service.evaluationindex.screen.IndexService; import com.epmet.evaluationindex.screen.dto.form.*; import com.epmet.evaluationindex.screen.dto.result.*; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -17,6 +18,7 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:13 */ +@Slf4j @RestController @RequestMapping("/screen/index") public class IndexController { @@ -31,7 +33,9 @@ public class IndexController { * @date 2020/8/19 2:53 下午 */ @PostMapping("yearaverageindex") - public Result yearAverageIndex(@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){ + public Result yearAverageIndex(@RequestHeader("CustomerId") String customerId,@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){ + //area_code升级,新增此参数 + yearAverageIndexFormDTO.setCustomerId(customerId); ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class); return new Result().ok(indexService.yearAverageIndex(yearAverageIndexFormDTO)); } @@ -43,7 +47,9 @@ public class IndexController { * @date 2020/8/19 3:17 下午 */ @PostMapping("monthindexanalysis/piechart") - public Result monthPieChart(@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){ + public Result monthPieChart(@RequestHeader("CustomerId") String customerId,@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){ + //area_code升级,新增此参数 + monthPieChartFormDTO.setCustomerId(customerId); ValidatorUtils.validateEntity(monthPieChartFormDTO, MonthPieChartFormDTO.MonthPieChart.class); return new Result().ok(indexService.monthPieChart(monthPieChartFormDTO)); } @@ -55,7 +61,9 @@ public class IndexController { * @date 2020/8/19 5:27 下午 */ @PostMapping("monthindexanalysis/barchart") - public Result monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO){ + public Result monthBarchart(@RequestHeader("CustomerId") String customerId,@RequestBody MonthBarchartFormDTO monthBarchartFormDTO){ + //area_code升级,新增此参数 + monthBarchartFormDTO.setCustomerId(customerId); ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class); return new Result().ok(indexService.monthBarchart(monthBarchartFormDTO)); } @@ -67,7 +75,9 @@ public class IndexController { * @date 2020/8/20 10:02 上午 */ @PostMapping("subagencyindexrank") - public Result> subAgencyIndexRank(@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){ + public Result> subAgencyIndexRank(@RequestHeader("CustomerId") String customerId,@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){ + //area_code升级,新增此参数 + subAgencyIndexRankFormDTO.setCustomerId(customerId); ValidatorUtils.validateEntity(subAgencyIndexRankFormDTO, SubAgencyIndexRankFormDTO.SubAgencyIndexRank.class); return new Result>().ok(indexService.subAgencyIndexRank(subAgencyIndexRankFormDTO)); } @@ -81,7 +91,9 @@ public class IndexController { * @Date 13:39 2020-09-11 **/ @PostMapping("dataclient/subagencyindexrank") - public Result> getSubAgencyIndexRank(@RequestBody SubAgencyIndexRankYMFormDTO formDTO) { + public Result> getSubAgencyIndexRank(@RequestHeader("CustomerId") String customerId,@RequestBody SubAgencyIndexRankYMFormDTO formDTO) { + //area_code升级,新增此参数 + formDTO.setCustomerId(customerId); ValidatorUtils.validateEntity(formDTO, SubAgencyIndexRankYMFormDTO.SubAgencyIndexRank.class); return new Result>().ok(indexService.getSubAgencyIndexRank(formDTO)); } @@ -118,7 +130,7 @@ public class IndexController { /** * @param formDTO - * @Description 组织月度指数得分 + * @Description 数据改版:组织月度指数得分 * @author sun */ @PostMapping("month/indexscore") @@ -129,7 +141,7 @@ public class IndexController { /** * @param formDTO - * @Description 先进排行-先进支部排行 + * @Description 数据改版:先进排行-先进支部排行 * @author sun */ @PostMapping("advancedbranchrank") diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java index 57f401c301..95d7189f6d 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java @@ -15,6 +15,7 @@ import java.util.List; public class CustomerSubInfoDTO implements Serializable { private String customerId; + private String customerName; /** * 当前客户所属的地区编码 add 01.14 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 3b43d23c4d..c37d2abace 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -71,7 +71,9 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectListMismatcCommunityAgencyInfo(@Param("customerId") String customerId, @Param("agencyIds") String[] agencyIds); + List selectListMismatcCommunityAgencyInfo(@Param("customerId") String customerId, @Param("agencyIds") String[] agencyIds, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds")List subCustomerIds); /** * 根据客户id,查询区/街道 组织名称、id @@ -81,7 +83,9 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectListAgencyInfo(@Param("customerId") String customerId); + List selectListAgencyInfo(@Param("customerId") String customerId, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds")List subCustomerIds); /** * @param agencyId @@ -100,7 +104,9 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectListMismatcStreetAndDistrictAgencyInfo(@Param("customerId") String customerId, @Param("agencyIds") String[] agencyIds); + List selectListMismatcStreetAndDistrictAgencyInfo(@Param("customerId") String customerId, @Param("agencyIds") String[] agencyIds, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds")List subCustomerIds); /** * desc:获取客户的组织条数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java index 3a992c7ca6..5f8e0555c1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java @@ -57,14 +57,13 @@ public interface ScreenCustomerDeptDao extends BaseDao void batchInsertCustomerDept(@Param("list") List list, @Param("customerId")String customerId); /** - * @param customerId * @param deptId * @return com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity * @author yinzuomei * @description 查询部门所属组织id * @Date 2020/9/3 16:32 **/ - ScreenCustomerDeptEntity selectParentAgencyId(@Param("customerId") String customerId, @Param("deptId") String deptId); + ScreenCustomerDeptEntity selectParentAgencyId(@Param("deptId") String deptId); /** * 返回当前客户下,未匹配到的区直部门信息 @@ -76,7 +75,9 @@ public interface ScreenCustomerDeptDao extends BaseDao * @Date 10:45 2020-09-04 **/ List selectListMismatchDeptInfo(@Param("customerId") String customerId, - @Param("deptIds") String[] deptIds); + @Param("deptIds") String[] deptIds, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds")List subCustomerIds); /** * 根据客户id 查询部门 信息 @@ -85,7 +86,9 @@ public interface ScreenCustomerDeptDao extends BaseDao * @Author zhangyong * @Date 16:57 2020-09-03 **/ - List selectListDeptInfo(@Param("customerId")String customerId); + List selectListDeptInfo(@Param("customerId")String customerId, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds")List subCustomerIds); /** * 查询最后一次添加的部门 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index ab0bc1e653..f6d064a62b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -106,7 +106,9 @@ public interface ScreenCustomerGridDao extends BaseDao * @Date 10:45 2020-09-04 **/ List selectListMismatchGridInfo(@Param("customerId") String customerId, - @Param("gridIds") String[] gridIds); + @Param("gridIds") String[] gridIds, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds")List subCustomerIds); /** * 根据客户id 查询网格(党支部)详细信息 @@ -115,7 +117,9 @@ public interface ScreenCustomerGridDao extends BaseDao * @Author zhangyong * @Date 16:57 2020-09-03 **/ - List selectListGridInfo(@Param("customerId")String customerId); + List selectListGridInfo(@Param("customerId")String customerId, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds")List subCustomerIds); /** * @Description 根据agencyId查询网格ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerRelationDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerRelationDao.java index a5c15ff8cc..c5c3e3c927 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerRelationDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerRelationDao.java @@ -34,5 +34,11 @@ import java.util.List; @Mapper public interface CustomerRelationDao extends BaseDao { + /** + * @param customerIds + * @author yinzuomei + * @description 查询当前客户的area_code信息、以及子客户列表 + * @Date 2021/1/21 11:27 + **/ List selectCustomerSubInfo(@Param("list") List customerIds); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 9224a2679d..dd4219e170 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -380,7 +380,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl getCustomerInfoMap(List customerIds) { return customerRelationService.getCustomerInfoMap(customerIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java index 98d0fc95af..158ced77de 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java @@ -1,9 +1,8 @@ package com.epmet.service.evaluationindex.indexcoll; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcollect.form.*; -import java.util.List; - /** * 大屏数据采集api * @@ -110,11 +109,9 @@ public interface FactIndexCollectService { /** * 将网格、社区、区直部门、区/街道分支记录表中的数据,抽取到 指数-指数数据(每月数值) 指数-指数数据(按年统计) - * @param monthId 2020-8 - * @param customerId * @return void * @Author zhangyong * @Date 10:29 2020-09-03 **/ - void insertScreenIndexDataMonthlyAndYearly(String monthId, String customerId); + void insertScreenIndexDataMonthlyAndYearly(CalculateCommonFormDTO calculateCommonFormDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 2ea0aa08d0..a117021b91 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -18,6 +18,7 @@ import com.epmet.dao.evaluationindex.indexcoll.*; import com.epmet.dao.evaluationindex.screen.*; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.DeptScoreDTO; import com.epmet.dto.indexcollect.form.*; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; @@ -44,7 +45,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; /** @@ -225,9 +225,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @date 2020/10/20 2:59 下午 */ @Override - public void insertScreenIndexDataMonthlyAndYearly(String monthId, String customerId) { - if (NumConstant.SIX != monthId.length()) { - throw new RuntimeException("入参monthId格式不正确:monthId =" + monthId); + public void insertScreenIndexDataMonthlyAndYearly(CalculateCommonFormDTO formDTO) { + if (NumConstant.SIX != formDTO.getMonthId().length()) { + throw new RuntimeException("入参monthId格式不正确:monthId =" + formDTO.getMonthId()); } RLock lock = distributedLock.getLock(LockConstants.STATS_LOCK_NAME); try { @@ -236,26 +236,27 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } allParentIds.cleanUp(); // 根据网格类型,删除 指数-指数数据(每月数值)表中 匹配的数据 - this.batchDelIndexDataMonthly(customerId, monthId, OrgTypeConstant.GRID); + this.batchDelIndexDataMonthly(formDTO.getCustomerId(), formDTO.getMonthId(), OrgTypeConstant.GRID); // 开始处理 网格相关分值表 - this.startHandleIndexGridScore(monthId, customerId); + this.startHandleIndexGridScore(formDTO); // 根据组织类型,删除 指数-指数数据(每月数值)表中 匹配的数据 - this.batchDelIndexDataMonthly(customerId, monthId, OrgTypeConstant.AGENCY); + this.batchDelIndexDataMonthly(formDTO.getCustomerId(), formDTO.getMonthId(), OrgTypeConstant.AGENCY); // 开始处理 社区相关分值表 - this.startHandleIndexCommunityScore(monthId, customerId); + this.startHandleIndexCommunityScore(formDTO); // 根据部门类型,删除 指数-指数数据(每月数值)表中 匹配的数据 - this.batchDelIndexDataMonthly(customerId, monthId, OrgTypeConstant.DEPARTMENT); + this.batchDelIndexDataMonthly(formDTO.getCustomerId(), formDTO.getMonthId(), OrgTypeConstant.DEPARTMENT); // 开始处理 区直部门分值表 - this.startHandleIndexDeptScore(monthId, customerId); + this.startHandleIndexDeptScore(formDTO); // 同样是 组织类型,所以不再重复删除了 // 开始处理 区/街道相关分数表 - this.startHandleIndexAgencyScore(monthId, customerId); + //todo + this.startHandleIndexAgencyScore(formDTO); // 根据年,汇总今年各项得到,计算平均值后 插入年表 screen_index_data_yearly - this.insertIndexDataYear(monthId, customerId); + this.insertIndexDataYear(formDTO.getMonthId(), formDTO.getCustomerId()); allParentIds.invalidateAll(); } finally { distributedLock.unLock(lock); @@ -266,13 +267,13 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * 目标:将网格的 党建能力、治理能力、服务能力、总指数 得分。 整理后(4条合1条) 插入 指数-指数数据(月表) * 如果网格相关分值表 中的网格数量不全,需要从 网格(党支部)信息表 中,先查询到缺少的网格信息,赋上默认值后,插入 指数-指数数据(月表) * - * @param monthId - * @param customerId * @return void * @Author zhangyong * @Date 13:44 2020-09-04 **/ - private void startHandleIndexGridScore(String monthId, String customerId){ + private void startHandleIndexGridScore(CalculateCommonFormDTO formDTO){ + String customerId=formDTO.getCustomerId(); + String monthId=formDTO.getMonthId(); List mismatchGridList = new ArrayList<>(); // 查询网格相关分值记录 表已经存在的网格id List indexGridIds = factIndexGridScoreDao.selectListGridId(customerId, monthId); @@ -283,9 +284,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { gridIds[i] = indexGridIds.get(i); } // 进行不匹配查询(即返回网格相关分值表 中不存在的网格信息)。 - mismatchGridList = screenCustomerGridDao.selectListMismatchGridInfo(customerId, gridIds); + mismatchGridList = screenCustomerGridDao.selectListMismatchGridInfo(customerId, gridIds,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } else { - mismatchGridList = screenCustomerGridDao.selectListMismatchGridInfo(customerId, null); + mismatchGridList = screenCustomerGridDao.selectListMismatchGridInfo(customerId, null,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } if (!CollectionUtils.isEmpty(mismatchGridList)){ @@ -295,7 +296,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // fact_index_grid_score 网格相关分值记录表 grid List gridScoreDTOS = factIndexGridScoreDao.selectListGridScore(customerId, monthId); // 开始处理实际分数 - this.insertIndexDataMonthlyByGridScore(monthId, customerId, gridScoreDTOS); + this.insertIndexDataMonthlyByGridScore(monthId, customerId, gridScoreDTOS,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } /** @@ -340,12 +341,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByGridScore(String monthId, String customerId, List gridScoreDTOS) { + private void insertIndexDataMonthlyByGridScore(String monthId, String customerId, List gridScoreDTOS,String customerAreaCode,List subCustomerIds) { List monthlyFormDTOList = new ArrayList<>(); // 根据网格id进行分组,最后组装一条数据 一个网格 对应 4条数据 Map> collect = gridScoreDTOS.stream().collect(Collectors.groupingBy(FactIndexGridScoreDTO::getGridId)); // 查询网格的 上级组织id 和 组织名称 - List parentGridList = screenCustomerGridDao.selectListGridInfo(customerId); + List parentGridList = screenCustomerGridDao.selectListGridInfo(customerId,customerAreaCode,subCustomerIds); if (!CollectionUtils.isEmpty(parentGridList)) { parentGridList.forEach(o -> { allParentIds.put(o.getGridId(), o.getAllParentIds()); @@ -399,13 +400,13 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * 目标:将社区的 党建能力、治理能力、服务能力、总指数 得分。 整理后(4条合1条) 插入 指数-指数数据(月表) * 如果社区相关分值表 中的社区数量不全,需要从 组织机构信息 中,先查询到缺少的社区信息,赋上默认值后,在插入 指数-指数数据(月表) * - * @param monthId - * @param customerId * @return void * @Author zhangyong * @Date 13:44 2020-09-04 **/ - private void startHandleIndexCommunityScore(String monthId, String customerId){ + private void startHandleIndexCommunityScore(CalculateCommonFormDTO formDTO){ + String customerId=formDTO.getCustomerId(); + String monthId=formDTO.getMonthId(); List mismatchAgencyList = new ArrayList<>(); // 查询社区相关分值记录id List indexCommunityIds = factIndexCommunityScoreDao.selectListCommunityId(customerId, monthId); @@ -416,9 +417,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { communityIds[i] = indexCommunityIds.get(i); } // 进行不匹配查询(即返回社区相关分值表 中不存在的【社区级】 组织信息)。 - mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcCommunityAgencyInfo(customerId, communityIds); + mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcCommunityAgencyInfo(customerId, communityIds,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } else { - mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcCommunityAgencyInfo(customerId, null); + mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcCommunityAgencyInfo(customerId, null,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } if (!CollectionUtils.isEmpty(mismatchAgencyList)){ @@ -429,7 +430,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 查询社区相关分值记录 List communityScoreDTOS = factIndexCommunityScoreDao.selectListCommunityScore(customerId, monthId); // 开始处理实际分数 - this.insertIndexDataMonthlyByCommunityScore(monthId, customerId, communityScoreDTOS); + this.insertIndexDataMonthlyByCommunityScore(monthId, customerId, communityScoreDTOS,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } /** @@ -474,12 +475,14 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByCommunityScore(String monthId, String customerId, List communityScoreDTOS) { + private void insertIndexDataMonthlyByCommunityScore(String monthId, String customerId, List communityScoreDTOS, + String customerAreaCode, + List subCustomerIds) { List monthlyFormDTOList = new ArrayList<>(); // 根据组织id 进行分组,最后组装一条数据 一个组织id 对应 4条数据 Map> collect = communityScoreDTOS.stream().collect(Collectors.groupingBy(FactIndexCommunityScoreDTO::getAgencyId)); // 根据客户id,查询区/街道 组织名称、id - List parentAgencyList = screenCustomerAgencyDao.selectListAgencyInfo(customerId); + List parentAgencyList = screenCustomerAgencyDao.selectListAgencyInfo(customerId,customerAreaCode,subCustomerIds); if (!CollectionUtils.isEmpty(parentAgencyList)) { parentAgencyList.forEach(o -> { allParentIds.put(o.getAgencyId(), o.getPids()); @@ -534,13 +537,13 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * 目标:将区直部门的 党建能力、治理能力、服务能力、总指数 得分。 整理后(4条合1条) 插入 指数-指数数据(月表) * 如果 区直部门分值表 中的部门数量不全,需要从 部门信息表 中,先查询到缺少的部门信息,赋上默认值后,在插入 指数-指数数据(月表) * - * @param monthId - * @param customerId * @return void * @Author zhangyong * @Date 13:44 2020-09-04 **/ - private void startHandleIndexDeptScore(String monthId, String customerId){ + private void startHandleIndexDeptScore(CalculateCommonFormDTO formDTO){ + String customerId=formDTO.getCustomerId(); + String monthId=formDTO.getMonthId(); List mismatchDeptList = new ArrayList<>(); // 查询社 区直部门分值表 List indexDeptIds = deptScoreDao.selectListDeptId(customerId, monthId); @@ -549,9 +552,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { for (int i = NumConstant.ZERO; i < indexDeptIds.size(); i++){ depeIds[i] = indexDeptIds.get(i); } - mismatchDeptList = screenCustomerDeptDao.selectListMismatchDeptInfo(customerId, depeIds); + mismatchDeptList = screenCustomerDeptDao.selectListMismatchDeptInfo(customerId, depeIds,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } else { - mismatchDeptList = screenCustomerDeptDao.selectListMismatchDeptInfo(customerId, null); + mismatchDeptList = screenCustomerDeptDao.selectListMismatchDeptInfo(customerId, null,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } if (!CollectionUtils.isEmpty(mismatchDeptList)) { @@ -568,7 +571,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 查询社 区直部门分值表 List deptScoreDTOS = deptScoreDao.selectListDeptScore(customerId, monthId); // 开始处理实际分数 - this.insertIndexDataMonthlyByDeptScore(monthId, customerId, deptScoreDTOS); + this.insertIndexDataMonthlyByDeptScore(monthId, customerId, deptScoreDTOS,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } /** @@ -613,11 +616,13 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByDeptScore(String monthId, String customerId, List deptScoreDTOS){ + private void insertIndexDataMonthlyByDeptScore(String monthId, String customerId, List deptScoreDTOS, + String customerAreaCode, + List subCustomerIds){ List monthlyFormDTOList = new ArrayList<>(); // 根据部门id 进行分组,最后组装一条数据 一个部门id 对应 4条数据 Map> collect = deptScoreDTOS.stream().collect(Collectors.groupingBy(DeptScoreDTO::getDeptId)); - List parentDeptList = screenCustomerDeptDao.selectListDeptInfo(customerId); + List parentDeptList = screenCustomerDeptDao.selectListDeptInfo(customerId,customerAreaCode,subCustomerIds); for(Map.Entry> deptScore : collect.entrySet()){ IndexDataMonthlyFormDTO monthlyFormDTO = new IndexDataMonthlyFormDTO(); // 给4个指数 赋默认值 @@ -666,13 +671,13 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * 目标:将 区/街道的 党建能力、治理能力、服务能力、总指数 得分。 整理后(4条合1条) 插入 指数-指数数据(月表) * 如果 区/街道相关分数表 中的组织数量不全,需要从 组织机构信息 中,先查询到缺少的组织信息,赋上默认值后,在插入 区/街道相关分数表。 一对四 * - * @param monthId - * @param customerId * @return void * @Author zhangyong * @Date 13:44 2020-09-04 **/ - private void startHandleIndexAgencyScore(String monthId, String customerId){ + private void startHandleIndexAgencyScore(CalculateCommonFormDTO formDTO){ + String customerId=formDTO.getCustomerId(); + String monthId=formDTO.getMonthId(); List mismatchAgencyList = new ArrayList<>(); List indexAgencyIds = agencyScoreDaol.selectListAgencyId(customerId, monthId); if (indexAgencyIds.size() > NumConstant.ZERO){ @@ -680,9 +685,10 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { for (int i = NumConstant.ZERO; i < indexAgencyIds.size(); i++){ agencyIds[i] = indexAgencyIds.get(i); } - mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcStreetAndDistrictAgencyInfo(customerId, agencyIds); + //todo 平阴县areaCode重复 + mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcStreetAndDistrictAgencyInfo(customerId, agencyIds,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } else { - mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcStreetAndDistrictAgencyInfo(customerId, null); + mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcStreetAndDistrictAgencyInfo(customerId, null,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } if (!CollectionUtils.isEmpty(mismatchAgencyList)){ @@ -691,7 +697,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // fact_index_agency_score 区/街道相关分数表 agency List agencyScoreDTOS = agencyScoreDaol.selectListAgencyScore(customerId, monthId); // 开始处理实际分数 - this.insertIndexDataMonthlyByAgencyScore(monthId, customerId, agencyScoreDTOS); + this.insertIndexDataMonthlyByAgencyScore(monthId, customerId, agencyScoreDTOS,formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); } /** @@ -704,11 +710,13 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByAgencyScore(String monthId, String customerId, List agencyScoreDTOS) { + private void insertIndexDataMonthlyByAgencyScore(String monthId, String customerId, List agencyScoreDTOS, + String customerAreaCode, + List subCustomerIds) { List monthlyFormDTOList = new ArrayList<>(); // 根据组织id(eg:社区或者街道id) 进行分组,最后组装一条数据 一个组织id 对应 4条数据 Map> collect = agencyScoreDTOS.stream().collect(Collectors.groupingBy(AgencyScoreDTO::getAgencyId)); - List parentAgencyList = screenCustomerAgencyDao.selectListAgencyInfo(customerId); + List parentAgencyList = screenCustomerAgencyDao.selectListAgencyInfo(customerId,customerAreaCode,subCustomerIds); int j = 0; if (!CollectionUtils.isEmpty(parentAgencyList)) { parentAgencyList.forEach(o -> { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java index cd26e20bd2..774fde473b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java @@ -405,7 +405,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { @Transactional(rollbackFor = Exception.class) public Integer initBizOrg(CustomerBizOrgFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); - List entityList = screenCustomerAgencyDao.selectListAgencyInfo(formDTO.getCustomerId()); + List entityList = screenCustomerAgencyDao.selectListAgencyInfo(formDTO.getCustomerId(),null,null); List list = new ArrayList<>(); if (CollectionUtils.isEmpty(entityList)) { return 0; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerRelationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerRelationServiceImpl.java index bbdbb9f386..7a39515309 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerRelationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerRelationServiceImpl.java @@ -25,7 +25,9 @@ import com.epmet.dto.indexcal.CustomerSubInfoDTO; import com.epmet.entity.stats.CustomerRelationEntity; import com.epmet.service.stats.CustomerRelationService; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -51,6 +53,9 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl getCustomerInfoMap(List customerIds) { List list = baseDao.selectCustomerSubInfo(customerIds); + if(CollectionUtils.isEmpty(list)){ + return new HashMap<>(); + } return list.stream().collect(Collectors.toMap(CustomerSubInfoDTO::getCustomerId, customer -> customer)); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index 97eea5c398..cbb54e049f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -70,8 +70,15 @@ screen_customer_agency WHERE DEL_FLAG = '0' - AND CUSTOMER_ID =#{customerId} AND `LEVEL` = 'community' + + + and AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND CUSTOMER_ID =#{customerId} + + AND AGENCY_ID NOT IN @@ -90,7 +97,14 @@ screen_customer_agency WHERE DEL_FLAG = '0' - AND CUSTOMER_ID =#{customerId} + + + and AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND CUSTOMER_ID =#{customerId} + + @@ -122,8 +136,15 @@ screen_customer_agency WHERE DEL_FLAG = '0' - AND CUSTOMER_ID = #{customerId} AND (`LEVEL` = 'street' OR `LEVEL` = 'district') + + + and AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND CUSTOMER_ID = #{customerId} + + ) agency WHERE agencyId NOT IN diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml index 7dd6ba62a4..0f5499d456 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml @@ -60,7 +60,6 @@ screen_customer_dept m WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.DEPT_ID =#{deptId} @@ -73,7 +72,14 @@ screen_customer_dept WHERE DEL_FLAG = '0' - AND CUSTOMER_ID =#{customerId} + + + and AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND CUSTOMER_ID =#{customerId} + + AND DEPT_ID NOT IN @@ -91,7 +97,14 @@ screen_customer_dept WHERE DEL_FLAG = '0' - AND CUSTOMER_ID =#{customerId} + + + and AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND CUSTOMER_ID =#{customerId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerRelationDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerRelationDao.xml index e959443001..11d7c9f637 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerRelationDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerRelationDao.xml @@ -2,15 +2,24 @@ - SELECT CR.PARENT_CUSTOMER_ID AS customerId, dc.CUSTOMER_NAME AS customerName, - dc.AREA_CODE AS areaCode, + dc.AREA_CODE AS customerAreaCode, CR.CUSTOMER_ID AS subCustomerId FROM customer_relation cr - LEFT JOIN dim_customer dc ON ( cr.PARENT_CUSTOMER_ID = DC.ID ) + LEFT JOIN dim_customer dc ON ( cr.PARENT_CUSTOMER_ID = DC.ID and dc.del_flag='0') WHERE cr.DEL_FLAG = '0' AND cr.`STATUS` = 'open' From 1485983686a8c90caf4466edb07355808db475b8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jan 2021 12:49:57 +0800 Subject: [PATCH 021/101] =?UTF-8?q?epmet=5Fevaluation=5Findex=E3=80=81epme?= =?UTF-8?q?t=5Fdata=5Fstatistical=5Fdisplay=E5=BA=93=E6=96=B0=E5=A2=9E146?= =?UTF-8?q?=E4=BD=93=E7=B3=BB=E7=9B=B8=E5=85=B3=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.8__add_146.sql | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql new file mode 100644 index 0000000000..39c8f253e3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql @@ -0,0 +1,59 @@ +-- !!!epmet_evaluation_index、epmet_data_statistical_display 都要执行 +CREATE TABLE `screen_bid_info` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `DATE_ID` varchar(8) NOT NULL COMMENT '截止日期eg:20200101', + `BID_ID` varchar(64) NOT NULL COMMENT '竞标项目id', + `BID_NAME` varchar(512) NOT NULL COMMENT '竞标项目名称', + `STATUS_CODE` varchar(64) NOT NULL COMMENT '状态编码', + `STATUS_DESC` varchar(128) NOT NULL COMMENT '状态描述eg:已中标、未中标、投标中、', + `AMOUNT` double(20,4) NOT NULL COMMENT '金额单位万元', + `RELEASE_TIME` datetime NOT NULL COMMENT '发布时间', + `TOWN_IDS` varchar(1024) NOT NULL COMMENT '发布村镇,以英文逗号隔开', + `TOWN_NAMES` varchar(1024) NOT NULL COMMENT '发布村镇名称,以英文逗号隔开', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='146:竞标管理'; + +CREATE TABLE `screen_contract_info` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `DATE_ID` varchar(8) NOT NULL COMMENT '截止日期eg:20200101', + `CONTRACT_ID` varchar(64) NOT NULL COMMENT '合同id', + `CONTRACT_NAME` varchar(255) NOT NULL COMMENT '合同名称', + `CATEGORY_CODE` varchar(64) NOT NULL COMMENT '合同所属类别编码', + `CATEGORY_NAME` varchar(255) NOT NULL COMMENT '合同所属类别名称', + `DUE_DATE` date NOT NULL COMMENT '合同到期日期:2020-12-31', + `TOWN_IDS` varchar(1024) NOT NULL COMMENT '发布村镇,以英文逗号隔开', + `TOWN_NAMES` varchar(1024) NOT NULL COMMENT '发布村镇名称,以英文逗号隔开', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='146:合同基本信息'; + + +CREATE TABLE `screen_list_info` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `DATE_ID` varchar(8) NOT NULL COMMENT '截止日期eg:20200101', + `LIST_ID` varchar(64) NOT NULL COMMENT '清单id', + `LIST_CODE` varchar(64) DEFAULT NULL COMMENT '清单编码', + `LIST_NAME` varchar(512) NOT NULL COMMENT '名称', + `SORT` int(11) NOT NULL COMMENT '排序', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='146:一张清单列表'; \ No newline at end of file From 5784c39b99f976d656b8a05f35aedbccb67c3c58 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jan 2021 12:53:57 +0800 Subject: [PATCH 022/101] =?UTF-8?q?146=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/plugins/BidFormDTO.java | 60 ++++++++++ .../epmet/dto/plugins/ContractFormDTO.java | 56 ++++++++++ .../com/epmet/dto/plugins/OneListFormDTO.java | 35 ++++++ .../dto/screencoll/ScreenCollFormDTO.java | 5 + .../controller/plugins/OfsController.java | 66 +++++++++++ .../epmet/dao/plugins/ScreenBidInfoDao.java | 40 +++++++ .../dao/plugins/ScreenContractInfoDao.java | 40 +++++++ .../epmet/dao/plugins/ScreenListInfoDao.java | 40 +++++++ .../entity/plugins/ScreenBidInfoEntity.java | 91 +++++++++++++++ .../plugins/ScreenContractInfoEntity.java | 86 +++++++++++++++ .../entity/plugins/ScreenListInfoEntity.java | 68 ++++++++++++ .../com/epmet/service/plugins/OfsService.java | 41 +++++++ .../service/plugins/impl/OfsServiceImpl.java | 104 ++++++++++++++++++ .../mapper/plugins/ScreenBidInfoDao.xml | 54 +++++++++ .../mapper/plugins/ScreenContractInfoDao.xml | 52 +++++++++ .../mapper/plugins/ScreenListInfoDao.xml | 32 ++++++ 16 files changed, 870 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenBidInfoDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenContractInfoDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenListInfoDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenBidInfoEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenContractInfoEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenListInfoEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/OfsService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/OfsServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java new file mode 100644 index 0000000000..154d6c87a0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java @@ -0,0 +1,60 @@ +package com.epmet.dto.plugins; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 【146】竞标管理 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:54 + */ +@Data +public class BidFormDTO implements Serializable { + private static final long serialVersionUID = -9132608534627587213L; + /** + * 竞标项目id + */ + private String bidId; + + /** + * 竞标项目名称 + */ + private String bidName; + + /** + * 状态编码 + */ + private String statusCode; + + /** + * 状态描述eg:已中标、未中标、投标中、 + */ + private String statusDesc; + + /** + * 金额单位万元 + */ + private Double amount; + + /** + * 发布时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date releaseTime; + + /** + * 发布村镇,以英文逗号隔开 + */ + private String townIds; + + /** + * 发布村镇名称,以英文逗号隔开 + */ + private String townNames; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java new file mode 100644 index 0000000000..445885e04c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java @@ -0,0 +1,56 @@ +package com.epmet.dto.plugins; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 【146】合同监管入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:43 + */ +@Data +public class ContractFormDTO implements Serializable { + private static final long serialVersionUID = 971064596156093552L; + /** + * 合同id + */ + private String contractId; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同所属类别编码 + */ + private String categoryCode; + + /** + * 合同所属类别名称 + */ + private String categoryName; + + /** + * 合同到期日期:2020-12-31 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date dueDate; + + /** + * 发布村镇,以英文逗号隔开 + */ + private String townIds; + + /** + * 发布村镇名称,以英文逗号隔开 + */ + private String townNames; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java new file mode 100644 index 0000000000..992e62d2d3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.plugins; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 【146】一张清单 入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:12 + */ +@Data +public class OneListFormDTO implements Serializable { + private static final long serialVersionUID = 8350552654881582654L; + /** + * 清单id + */ + private String listId; + + /** + * 清单编码 + */ + private String listCode; + + /** + * 名称 + */ + private String listName; + + /** + * 排序 + */ + private Integer sort; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java index 760e48b3da..fa3e97d11d 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java @@ -45,4 +45,9 @@ public class ScreenCollFormDTO implements Serializable { public String toString() { return JSON.toJSONString(this); } + + /** + * 当前客户id + */ + private String customerId; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java new file mode 100644 index 0000000000..a7936de52a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java @@ -0,0 +1,66 @@ +package com.epmet.controller.plugins; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.plugins.BidFormDTO; +import com.epmet.dto.plugins.ContractFormDTO; +import com.epmet.dto.plugins.OneListFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.service.plugins.OfsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 146体系数据采集 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:10 + */ +@RestController +@RequestMapping("ofs") +public class OfsController { + + @Autowired + private OfsService ofsService; + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 【146】一张清单 + * @Date 2021/1/22 10:19 + **/ + @PostMapping("onelist") + public Result collOneList(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ofsService.collOneList(formDTO); + return new Result(); + } + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 【146】合同监管 + * @Date 2021/1/22 10:42 + **/ + @PostMapping("contract") + public Result collContract(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ofsService.collContract(formDTO); + return new Result(); + } + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 【146】竞标管理 + * @Date 2021/1/22 10:53 + **/ + @PostMapping("bid") + public Result collBid(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ofsService.collBid(formDTO); + return new Result(); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenBidInfoDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenBidInfoDao.java new file mode 100644 index 0000000000..b269279cfb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenBidInfoDao.java @@ -0,0 +1,40 @@ +/** + * 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.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.BidFormDTO; +import com.epmet.entity.plugins.ScreenBidInfoEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 146:竞标管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Mapper +public interface ScreenBidInfoDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId); + + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenContractInfoDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenContractInfoDao.java new file mode 100644 index 0000000000..c24ae1026e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenContractInfoDao.java @@ -0,0 +1,40 @@ +/** + * 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.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.ContractFormDTO; +import com.epmet.entity.plugins.ScreenContractInfoEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 146:合同基本信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Mapper +public interface ScreenContractInfoDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId); + + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenListInfoDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenListInfoDao.java new file mode 100644 index 0000000000..45627c662b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenListInfoDao.java @@ -0,0 +1,40 @@ +/** + * 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.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.OneListFormDTO; +import com.epmet.entity.plugins.ScreenListInfoEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 146:一张清单列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Mapper +public interface ScreenListInfoDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId); + + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenBidInfoEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenBidInfoEntity.java new file mode 100644 index 0000000000..c9d8658f10 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenBidInfoEntity.java @@ -0,0 +1,91 @@ +/** + * 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.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 146:竞标管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_bid_info") +public class ScreenBidInfoEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 截止日期eg:20200101 + */ + private String dateId; + + /** + * 竞标项目id + */ + private String bidId; + + /** + * 竞标项目名称 + */ + private String bidName; + + /** + * 状态编码 + */ + private String statusCode; + + /** + * 状态描述eg:已中标、未中标、投标中、 + */ + private String statusDesc; + + /** + * 金额单位万元 + */ + private Double amount; + + /** + * 发布时间 + */ + private Date releaseTime; + + /** + * 发布村镇,以英文逗号隔开 + */ + private String townIds; + + /** + * 发布村镇名称,以英文逗号隔开 + */ + private String townNames; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenContractInfoEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenContractInfoEntity.java new file mode 100644 index 0000000000..6d7d69ce3e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenContractInfoEntity.java @@ -0,0 +1,86 @@ +/** + * 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.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 146:合同基本信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_contract_info") +public class ScreenContractInfoEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 截止日期eg:20200101 + */ + private String dateId; + + /** + * 合同id + */ + private String contractId; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同所属类别编码 + */ + private String categoryCode; + + /** + * 合同所属类别名称 + */ + private String categoryName; + + /** + * 合同到期日期:2020-12-31 + */ + private Date dueDate; + + /** + * 发布村镇,以英文逗号隔开 + */ + private String townIds; + + /** + * 发布村镇名称,以英文逗号隔开 + */ + private String townNames; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenListInfoEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenListInfoEntity.java new file mode 100644 index 0000000000..08e7c7e7ff --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenListInfoEntity.java @@ -0,0 +1,68 @@ +/** + * 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.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 146:一张清单列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_list_info") +public class ScreenListInfoEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 截止日期eg:20200101 + */ + private String dateId; + + /** + * 清单id + */ + private String listId; + + /** + * 清单编码 + */ + private String listCode; + + /** + * 名称 + */ + private String listName; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/OfsService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/OfsService.java new file mode 100644 index 0000000000..e2aa01aced --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/OfsService.java @@ -0,0 +1,41 @@ +package com.epmet.service.plugins; + +import com.epmet.dto.plugins.BidFormDTO; +import com.epmet.dto.plugins.ContractFormDTO; +import com.epmet.dto.plugins.OneListFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; + +/** + * 146体系数据采集 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:18 + */ +public interface OfsService { + /** + * @return void + * @param formDTO + * @author yinzuomei + * @description 【146】一张清单 + * @Date 2021/1/22 10:19 + **/ + void collOneList(ScreenCollFormDTO formDTO); + + /** + * @return void + * @param formDTO + * @author yinzuomei + * @description 【146】合同监管 + * @Date 2021/1/22 10:19 + **/ + void collContract(ScreenCollFormDTO formDTO); + + /** + * @return void + * @param formDTO + * @author yinzuomei + * @description 【146】竞标管理 + * @Date 2021/1/22 10:19 + **/ + void collBid(ScreenCollFormDTO formDTO); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/OfsServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/OfsServiceImpl.java new file mode 100644 index 0000000000..cb05167baa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/OfsServiceImpl.java @@ -0,0 +1,104 @@ +package com.epmet.service.plugins.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.plugins.ScreenBidInfoDao; +import com.epmet.dao.plugins.ScreenContractInfoDao; +import com.epmet.dao.plugins.ScreenListInfoDao; +import com.epmet.dto.plugins.BidFormDTO; +import com.epmet.dto.plugins.ContractFormDTO; +import com.epmet.dto.plugins.OneListFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.service.plugins.OfsService; +import com.google.common.collect.Lists; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:20 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class OfsServiceImpl implements OfsService { + @Autowired + private ScreenBidInfoDao screenBidInfoDao; + @Autowired + private ScreenContractInfoDao screenContractInfoDao; + @Autowired + private ScreenListInfoDao screenListInfoDao; + + /** + * @param formDTO + * @return void + * @author yinzuomei + * @description 【146】一张清单 + * @Date 2021/1/22 10:19 + **/ + @Override + public void collOneList(ScreenCollFormDTO formDTO) { + if (CollectionUtils.isEmpty(formDTO.getDataList())) { + return; + } + if (formDTO.getIsFirst()) { + int affectRows = screenListInfoDao.deleteBatch(formDTO.getCustomerId()); + while (affectRows >= NumConstant.ONE) { + affectRows = screenListInfoDao.deleteBatch(formDTO.getCustomerId()); + } + } + Lists.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + screenListInfoDao.insertBatch(list, + formDTO.getCustomerId(), + formDTO.getDateId()); + }); + } + + @Override + public void collContract(ScreenCollFormDTO formDTO) { + if (CollectionUtils.isEmpty(formDTO.getDataList())) { + return; + } + if (formDTO.getIsFirst()) { + int affectRows = screenContractInfoDao.deleteBatch(formDTO.getCustomerId()); + while (affectRows >= NumConstant.ONE) { + affectRows = screenContractInfoDao.deleteBatch(formDTO.getCustomerId()); + } + } + Lists.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + screenContractInfoDao.insertBatch(list, + formDTO.getCustomerId(), + formDTO.getDateId()); + }); + } + + /** + * @param formDTO + * @return void + * @author yinzuomei + * @description 【146】竞标管理 + * @Date 2021/1/22 10:19 + **/ + @Override + public void collBid(ScreenCollFormDTO formDTO) { + if (CollectionUtils.isEmpty(formDTO.getDataList())) { + return; + } + if (formDTO.getIsFirst()) { + int affectRows = screenBidInfoDao.deleteBatch(formDTO.getCustomerId()); + while (affectRows >= NumConstant.ONE) { + affectRows = screenBidInfoDao.deleteBatch(formDTO.getCustomerId()); + } + } + Lists.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + screenBidInfoDao.insertBatch(list, + formDTO.getCustomerId(), + formDTO.getDateId()); + }); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml new file mode 100644 index 0000000000..cb3d221dc5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml @@ -0,0 +1,54 @@ + + + + + + delete from screen_bid_info where CUSTOMER_ID=#{customerId} + + + + INSERT INTO `screen_bid_info` ( + `ID`, + `CUSTOMER_ID`, + `DATE_ID`, + `BID_ID`, + `BID_NAME`, + `STATUS_CODE`, + `STATUS_DESC`, + `AMOUNT`, + `RELEASE_TIME`, + `TOWN_IDS`, + `TOWN_NAMES`, + `DEL_FLAG`, + `REVISION`, + `CREATED_BY`, + `CREATED_TIME`, + `UPDATED_BY`, + `UPDATED_TIME` + ) + VALUES + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.bidId}, + #{item.bidName}, + #{item.statusCode}, + #{item.statusDesc}, + #{item.amount}, + #{item.releaseTime}, + #{item.townIds}, + #{item.townNames}, + '0', + 0, + 'APP_USER', + NOW(), + 'APP_USER', + NOW() + ) + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml new file mode 100644 index 0000000000..24abf9f9f9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml @@ -0,0 +1,52 @@ + + + + + + + delete from screen_contract_info where CUSTOMER_ID=#{customerId} + + + + INSERT INTO `screen_contract_info` ( + `ID`, + `CUSTOMER_ID`, + `DATE_ID`, + `CONTRACT_ID`, + `CONTRACT_NAME`, + `CATEGORY_CODE`, + `CATEGORY_NAME`, + `DUE_DATE`, + `TOWN_IDS`, + `TOWN_NAMES`, + `DEL_FLAG`, + `REVISION`, + `CREATED_BY`, + `CREATED_TIME`, + `UPDATED_BY`, + `UPDATED_TIME` + ) + VALUES + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.contractId}, + #{item.contractName}, + #{item.categoryCode}, + #{item.categoryName}, + #{item.dueDate}, + #{item.townIds}, + #{item.townNames}, + '0', + 0, + 'APP_USER', + NOW(), + 'APP_USER', + NOW() + ) + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml new file mode 100644 index 0000000000..1695f1a726 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml @@ -0,0 +1,32 @@ + + + + + + + delete from screen_list_info where CUSTOMER_ID=#{customerId} + + + + INSERT INTO `screen_list_info` ( `ID`, `CUSTOMER_ID`, `DATE_ID`, `LIST_ID`, `LIST_CODE`, `LIST_NAME`, `SORT`, + `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME` ) + VALUES + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.listId}, + #{item.listCode}, + #{item.listName}, + #{item.sort}, + '0', + 0, + 'APP_USER', + NOW(), + 'APP_USER', + NOW() + ) + + + \ No newline at end of file From 38d96b725fc089e76e4d99f2960a3d5150006b3c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jan 2021 13:50:59 +0800 Subject: [PATCH 023/101] =?UTF-8?q?146=E5=A4=A7=E5=B1=8F=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/plugins/BidInfoResultDTO.java | 15 +++++ .../dto/result/plugins/ContractResultDTO.java | 19 ++++++ .../dto/result/plugins/OneListResultDTO.java | 18 +++++ .../controller/plugins/OfsController.java | 65 +++++++++++++++++++ .../dao/plugins/ScreenBidInfoDao.java | 36 ++++++++++ .../dao/plugins/ScreenContractInfoDao.java | 35 ++++++++++ .../dao/plugins/ScreenListInfoDao.java | 35 ++++++++++ .../service/plugins/OfsService.java | 34 ++++++++++ .../service/plugins/impl/OfsServiceImpl.java | 59 +++++++++++++++++ .../mapper/plugins/ScreenBidInfoDao.xml | 18 +++++ .../mapper/plugins/ScreenContractInfoDao.xml | 18 +++++ .../mapper/plugins/ScreenListInfoDao.xml | 17 +++++ .../controller/plugins/OfsController.java | 2 +- 13 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/BidInfoResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/ContractResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/OneListResultDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/OfsController.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenBidInfoDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenContractInfoDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenListInfoDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/OfsService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/OfsServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/BidInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/BidInfoResultDTO.java new file mode 100644 index 0000000000..5dc420ecde --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/BidInfoResultDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result.plugins; + +import lombok.Data; + +/** + * 【146体系】竞标管理-列表 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 13:37 + */ +@Data +public class BidInfoResultDTO { + private String bidName; + private String statusDesc; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/ContractResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/ContractResultDTO.java new file mode 100644 index 0000000000..e8a655284f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/ContractResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result.plugins; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +/** + * 【146体系】合同监督-列表 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 13:30 + */ +@Data +public class ContractResultDTO { + private String contractListName; + @JsonFormat(pattern = "yyyy.MM.dd", timezone = "GMT+8") + private Date dueDate; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/OneListResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/OneListResultDTO.java new file mode 100644 index 0000000000..f59006896a --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/OneListResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result.plugins; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 【146体系】清单列表 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 13:23 + */ +@Data +public class OneListResultDTO implements Serializable { + private static final long serialVersionUID = -1578923862757670664L; + private String listName; + private String listId; +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/OfsController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/OfsController.java new file mode 100644 index 0000000000..9a2cbb121b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/OfsController.java @@ -0,0 +1,65 @@ +package com.epmet.datareport.controller.plugins; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.datareport.service.plugins.OfsService; +import com.epmet.dto.result.plugins.BidInfoResultDTO; +import com.epmet.dto.result.plugins.ContractResultDTO; +import com.epmet.dto.result.plugins.OneListResultDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * 146体系数据查询 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 12:58 + */ +@RestController +@RequestMapping("plugins/ofs") +public class OfsController { + @Autowired + private OfsService ofsService; + + /** + * @param customerId + * @author yinzuomei + * @description 【146体系】清单列表 + * @Date 2021/1/22 13:36 + **/ + @PostMapping("list") + public Result> oneList(@RequestHeader("CustomerId") String customerId){ + if(StringUtils.isNotBlank(customerId)){ + return new Result().ok(ofsService.queryOneList(customerId)); + } + return new Result(); + } + + /** + * @param customerId + * @author yinzuomei + * @description 【146体系】合同监督-列表 + * @Date 2021/1/22 13:36 + **/ + @PostMapping("contractlist") + public Result> queryContractList(@RequestHeader("CustomerId") String customerId){ + if(StringUtils.isNotBlank(customerId)){ + return new Result().ok(ofsService.queryContractList(customerId)); + } + return new Result(); + } + + @PostMapping("bidlist") + public Result> bidList(@RequestHeader("CustomerId") String customerId){ + if(StringUtils.isNotBlank(customerId)){ + return new Result().ok(ofsService.queryBidList(customerId)); + } + return new Result(); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenBidInfoDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenBidInfoDao.java new file mode 100644 index 0000000000..b379de0b24 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenBidInfoDao.java @@ -0,0 +1,36 @@ +/** + * 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.datareport.dao.plugins; + +import com.epmet.dto.result.plugins.BidInfoResultDTO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 146:竞标管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Mapper +public interface ScreenBidInfoDao{ + + + List selectList(String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenContractInfoDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenContractInfoDao.java new file mode 100644 index 0000000000..2c597dff06 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenContractInfoDao.java @@ -0,0 +1,35 @@ +/** + * 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.datareport.dao.plugins; + +import com.epmet.dto.result.plugins.ContractResultDTO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 146:合同基本信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Mapper +public interface ScreenContractInfoDao { + + List selectList(String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenListInfoDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenListInfoDao.java new file mode 100644 index 0000000000..2b368a041f --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenListInfoDao.java @@ -0,0 +1,35 @@ +/** + * 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.datareport.dao.plugins; + +import com.epmet.dto.result.plugins.OneListResultDTO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 146:一张清单列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Mapper +public interface ScreenListInfoDao { + + List selectList(String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/OfsService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/OfsService.java new file mode 100644 index 0000000000..71185ba723 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/OfsService.java @@ -0,0 +1,34 @@ +package com.epmet.datareport.service.plugins; + +import com.epmet.dto.result.plugins.BidInfoResultDTO; +import com.epmet.dto.result.plugins.ContractResultDTO; +import com.epmet.dto.result.plugins.OneListResultDTO; + +import java.util.List; + +/** + * 146体系数据查询 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:18 + */ +public interface OfsService { + + List queryOneList(String customerId); + + /** + * @param customerId + * @author yinzuomei + * @description 【146体系】合同监督-列表 + * @Date 2021/1/22 13:36 + **/ + List queryContractList(String customerId); + + /** + * @param customerId + * @author yinzuomei + * @description 【146体系】竞标管理-列表 + * @Date 2021/1/22 13:38 + **/ + List queryBidList(String customerId); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/OfsServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/OfsServiceImpl.java new file mode 100644 index 0000000000..7ae8b62e43 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/OfsServiceImpl.java @@ -0,0 +1,59 @@ +package com.epmet.datareport.service.plugins.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.plugins.ScreenBidInfoDao; +import com.epmet.datareport.dao.plugins.ScreenContractInfoDao; +import com.epmet.datareport.dao.plugins.ScreenListInfoDao; +import com.epmet.datareport.service.plugins.OfsService; +import com.epmet.dto.result.plugins.BidInfoResultDTO; +import com.epmet.dto.result.plugins.ContractResultDTO; +import com.epmet.dto.result.plugins.OneListResultDTO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 146体系数据查询 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:20 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class OfsServiceImpl implements OfsService { + @Autowired + private ScreenBidInfoDao screenBidInfoDao; + @Autowired + private ScreenContractInfoDao screenContractInfoDao; + @Autowired + private ScreenListInfoDao screenListInfoDao; + + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) + @Override + public List queryOneList(String customerId) { + return screenListInfoDao.selectList(customerId); + } + + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) + @Override + public List queryContractList(String customerId) { + return screenContractInfoDao.selectList(customerId); + } + + /** + * @param customerId + * @author yinzuomei + * @description 【146体系】竞标管理-列表 + * @Date 2021/1/22 13:38 + **/ + @Override + public List queryBidList(String customerId) { + return screenBidInfoDao.selectList(customerId); + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml new file mode 100644 index 0000000000..ea22e57743 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml new file mode 100644 index 0000000000..9c66e72c65 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml new file mode 100644 index 0000000000..647ff94bd4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java index a7936de52a..833f1f3d4a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*; * @date 2021/1/22 10:10 */ @RestController -@RequestMapping("ofs") +@RequestMapping("plugins/ofs") public class OfsController { @Autowired From 2491425ac62e8a8fed66fecff8970dc16f806d9a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 27 Jan 2021 14:10:14 +0800 Subject: [PATCH 024/101] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E6=9E=90?= =?UTF-8?q?=E8=A1=A8=E8=84=9A=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V0.0.5__screen_org_add_source_col.sql | 4 +- ...dCustomerAreaCodeAndCustomerRelationTb.sql | 5 +- .../V0.0.7__update_agencytb_adduptocal.sql | 3 +- .../db/migration/V0.0.8__add_146.sql | 3 +- .../migration/V0.0.9__add_event_analysis.sql | 51 +++++++++++++++++++ 5 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql index a7de879ca6..89dd93d04e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql @@ -1,3 +1,5 @@ +-- 一、epmet_evaluation_index执行以下sql, +-- 1、五级指标表,采集增加分子分母列 # alter table fact_index_party_ablity_grid_monthly add column SHIFTED_PROJECT_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:issueToProjectRatio的分子:评价周期内转为项目的数量'; # alter table fact_index_party_ablity_grid_monthly add column ISSUE_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:issueToProjectRatio的分母:评价周期内网格内居民提出的议题数目'; @@ -33,6 +35,6 @@ # alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; # alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; --- !!!epmet_evaluation_index、epmet_data_statistical_display 都要执行 +-- 2、epmet_evaluation_index、epmet_data_statistical_display 都要执行,网格和部门增加area_code # alter table screen_customer_grid add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0'; # alter table screen_customer_dept add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0'; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql index 67e8d2771a..00281958a6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql @@ -1,6 +1,7 @@ --- epmet_data_statistical 库sql脚本: +-- 一、epmet_data_statistical 库sql脚本: +-- 1、客户维度表新增 area_code列 alter table dim_customer add COLUMN AREA_CODE varchar(12) default '' comment '客户所属行政地区编码,取值来自客户根组织的area_code(01.14 add)'after CUSTOMER_NAME; - +-- 2、新增客户关系表 CREATE TABLE `customer_relation` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.7__update_agencytb_adduptocal.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.7__update_agencytb_adduptocal.sql index ffbb6886c2..eb7ed9fb05 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.7__update_agencytb_adduptocal.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.7__update_agencytb_adduptocal.sql @@ -1,4 +1,5 @@ --- !!!epmet_evaluation_index、epmet_data_statistical_display 都要执行 +-- 一、epmet_evaluation_index、epmet_data_statistical_display 都要执行 +-- 1、网格、部门、组织新增 一列标识是否参与向上计算 alter table screen_customer_grid add column UP_TO_CAL varchar(10) DEFAULT 'yes' COMMENT '是否参与上级计算yes:参与;no:不参与'; alter table screen_customer_dept add column UP_TO_CAL varchar(10) DEFAULT 'yes' COMMENT '是否参与上级计算yes:参与;no:不参与'; alter table screen_customer_agency add column UP_TO_CAL varchar(10) DEFAULT 'yes' COMMENT '是否参与上级计算yes:参与;no:不参与'; \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql index 39c8f253e3..c02c3284eb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql @@ -1,4 +1,5 @@ --- !!!epmet_evaluation_index、epmet_data_statistical_display 都要执行 +-- 一、epmet_evaluation_index、epmet_data_statistical_display 都要执行 +-- 1、146体系新增3张表 CREATE TABLE `screen_bid_info` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql new file mode 100644 index 0000000000..c2d028fd3c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql @@ -0,0 +1,51 @@ +-- !!!epmet_evaluation_index、epmet_data_statistical_display 都要执行 +-- 1、平阴大屏 事件分析相关新增以下表 +CREATE TABLE `screen_project_grid_daily` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `DATE_ID` varchar(8) NOT NULL COMMENT '日期yyyyMMdd', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', + `PID` varchar(64) NOT NULL COMMENT '网格所属的组织id', + `PIDS` varchar(255) NOT NULL COMMENT '网格所有的父级id,以英文:或者英文,隔开', + `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前日期,网格内项目总数', + `RESOLVED_NUM` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前日期,网格内已解决的项目总数', + `RESOLVED_RATIO` decimal(10,6) NOT NULL DEFAULT '0.000000' COMMENT '解决率=RESOLVED_NUM/PROJECT_TOTAL,存储小数即可,保留小数点后4位', + `EVALUATE_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '对当前网格内项目,参与满意度评价的总次数', + `GOOD_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '对当前网格内项目,满意+非常满意的总次数', + `BAD_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '对当前网格内项目,不满意总次数', + `GOOD_RATIO` decimal(10,6) NOT NULL DEFAULT '0.000000' COMMENT '满意率=good_total/evaluate_total', + `BAD_RATIO` decimal(10,6) NOT NULL DEFAULT '0.000000' COMMENT '不满意率=bad_total/evaluate_total', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', + `REVISION` int(10) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)分析按网格_按天统计'; + + +CREATE TABLE `screen_project_org_daily` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `DATE_ID` varchar(8) NOT NULL COMMENT '日期yyyyMMdd', + `ORG_ID` varchar(64) NOT NULL COMMENT '网格id', + `ORG_TYPE` varchar(64) NOT NULL COMMENT '社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province', + `PID` varchar(64) NOT NULL COMMENT '当前orgId所属的上级id', + `PIDS` varchar(255) NOT NULL COMMENT 'orgId所有的父级id,以英文:或者英文,隔开', + `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前日期,网格内项目总数', + `RESOLVED_NUM` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前日期,网格内已解决的项目总数', + `RESOLVED_RATIO` decimal(10,6) NOT NULL COMMENT '解决率=RESOLVED_NUM/PROJECT_TOTAL,存储小数即可,保留小数点后4位', + `EVALUATE_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '对当前组织内项目,参与满意度评价的总次数', + `GOOD_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '对当前组织内项目,满意+非常满意的总次数', + `BAD_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '对当前组织内项目,不满意总次数', + `GOOD_RATIO` decimal(10,6) NOT NULL COMMENT '满意率=good_total/evaluate_total', + `BAD_RATIO` decimal(10,6) NOT NULL COMMENT '不满意率=bad_total/evaluate_total', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', + `REVISION` int(10) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)分析按组织_按天统计'; \ No newline at end of file From 0fd57e8d52d1fb321b4d9ae6f180f922f1365a58 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 27 Jan 2021 16:35:45 +0800 Subject: [PATCH 025/101] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E6=9E=90?= =?UTF-8?q?=E8=A1=A8=E8=84=9A=E6=9C=AC=E4=BF=AE=E6=94=B9V1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V0.0.9__add_event_analysis.sql | 100 +++++++++++++++++- 1 file changed, 97 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql index c2d028fd3c..abdda06c59 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql @@ -1,5 +1,6 @@ -- !!!epmet_evaluation_index、epmet_data_statistical_display 都要执行 -- 1、平阴大屏 事件分析相关新增以下表 +drop table if EXISTS screen_project_grid_daily; CREATE TABLE `screen_project_grid_daily` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', @@ -24,12 +25,12 @@ CREATE TABLE `screen_project_grid_daily` ( PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)分析按网格_按天统计'; - +drop table if EXISTS screen_project_org_daily; CREATE TABLE `screen_project_org_daily` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', `DATE_ID` varchar(8) NOT NULL COMMENT '日期yyyyMMdd', - `ORG_ID` varchar(64) NOT NULL COMMENT '网格id', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织id', `ORG_TYPE` varchar(64) NOT NULL COMMENT '社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province', `PID` varchar(64) NOT NULL COMMENT '当前orgId所属的上级id', `PIDS` varchar(255) NOT NULL COMMENT 'orgId所有的父级id,以英文:或者英文,隔开', @@ -48,4 +49,97 @@ CREATE TABLE `screen_project_org_daily` ( `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)分析按组织_按天统计'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)分析按组织_按天统计'; + +drop table if EXISTS screen_project_quantity_grid_monthly; +CREATE TABLE `screen_project_quantity_grid_monthly` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `MONTH_ID` varchar(6) NOT NULL COMMENT '日期yyyyMMdd', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', + `PID` varchar(64) NOT NULL COMMENT '网格所属的组织id', + `PIDS` varchar(255) NOT NULL COMMENT '网格所有的父级id,以英文:或者英文,隔开', + `PROJECT_INCR` int(11) NOT NULL DEFAULT '0' COMMENT '当前网格,本月新增的项目数量:转项目日期在当前月份内', + `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前月份:累计项目总数', + `UN_CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前月份:累计未结项目总数', + `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前月份:累计已结项目', + `CLOSED_INCR` int(11) NOT NULL DEFAULT '0' COMMENT '本月新增结案项目数', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', + `REVISION` int(10) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)数量分析按网格_按月统计'; + + +drop table if EXISTS screen_project_quantity_org_monthly; +CREATE TABLE `screen_project_quantity_org_monthly` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `MONTH_ID` varchar(6) NOT NULL COMMENT '日期yyyyMMdd', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织id', + `ORG_TYPE` varchar(64) NOT NULL COMMENT '社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province', + `PID` varchar(64) NOT NULL COMMENT '当前orgId所属的上级id', + `PIDS` varchar(255) NOT NULL COMMENT 'orgId所有的父级id,以英文:或者英文,隔开', + `PROJECT_INCR` int(11) NOT NULL DEFAULT '0' COMMENT '当前组织内,本月新增的项目数量:转项目日期在当前月份内', + `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前月份:累计项目总数', + `UN_CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前月份:累计未结项目总数', + `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '截止到当前月份:累计已结项目', + `CLOSED_INCR` int(11) NOT NULL DEFAULT '0' COMMENT '本月新增结案项目数', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', + `REVISION` int(10) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)数量分析按组织_按月统计'; + +drop table if EXISTS screen_project_category_grid_daily; +CREATE TABLE `screen_project_category_grid_daily` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `DATE_ID` varchar(8) NOT NULL COMMENT '日期yyyyMMdd', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', + `PID` varchar(64) NOT NULL COMMENT '网格所属的组织id', + `PIDS` varchar(255) NOT NULL COMMENT '网格所有的父级id,以英文:或者英文,隔开', + `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', + `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', + `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', + `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数', + `UN_RESOLVED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案无需解决的项目总数', + `RESOLVED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案已解决的项目总数', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', + `REVISION` int(10) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)分类按网格_按天统计'; + +drop table if EXISTS screen_project_category_org_daily; +CREATE TABLE `screen_project_category_org_daily` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `DATE_ID` varchar(8) NOT NULL COMMENT '日期yyyyMMdd', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织id', + `ORG_TYPE` varchar(64) NOT NULL COMMENT '社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province', + `PID` varchar(64) NOT NULL COMMENT '当前orgId所属的上级id', + `PIDS` varchar(255) NOT NULL COMMENT 'orgId所有的父级id,以英文:或者英文,隔开', + `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', + `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', + `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', + `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数', + `UN_RESOLVED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案无需解决的项目总数', + `RESOLVED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案已解决的项目总数', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', + `REVISION` int(10) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)分类按组织_按天统计'; \ No newline at end of file From fd5d30668a8f71a1d94d1dc157422088369547d6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 27 Jan 2021 17:03:20 +0800 Subject: [PATCH 026/101] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E6=9E=90?= =?UTF-8?q?=E8=A1=A8=E8=84=9A=E6=9C=AC=E4=BF=AE=E6=94=B9V2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.9__add_event_analysis.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql index abdda06c59..be29f0a879 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql @@ -105,7 +105,7 @@ CREATE TABLE `screen_project_category_grid_daily` ( `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', `PID` varchar(64) NOT NULL COMMENT '网格所属的组织id', `PIDS` varchar(255) NOT NULL COMMENT '网格所有的父级id,以英文:或者英文,隔开', - `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', + `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数', @@ -129,7 +129,7 @@ CREATE TABLE `screen_project_category_org_daily` ( `ORG_TYPE` varchar(64) NOT NULL COMMENT '社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province', `PID` varchar(64) NOT NULL COMMENT '当前orgId所属的上级id', `PIDS` varchar(255) NOT NULL COMMENT 'orgId所有的父级id,以英文:或者英文,隔开', - `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', + `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数', From 16baf6007ae7ba6700a973c8aeb70a124218f76c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 27 Jan 2021 17:08:56 +0800 Subject: [PATCH 027/101] =?UTF-8?q?146=E8=84=9A=E6=9C=AC=E4=BF=AE=E6=94=B9?= =?UTF-8?q?V1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.8__add_146.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql index c02c3284eb..49e689c4b0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_146.sql @@ -1,5 +1,6 @@ -- 一、epmet_evaluation_index、epmet_data_statistical_display 都要执行 -- 1、146体系新增3张表 +drop table if EXISTS screen_bid_info; CREATE TABLE `screen_bid_info` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', @@ -21,6 +22,7 @@ CREATE TABLE `screen_bid_info` ( PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='146:竞标管理'; +drop table if EXISTS screen_contract_info; CREATE TABLE `screen_contract_info` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', @@ -42,6 +44,7 @@ CREATE TABLE `screen_contract_info` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='146:合同基本信息'; +drop table if EXISTS screen_list_info; CREATE TABLE `screen_list_info` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', From 20f775940abbe658b45691efe09fd49499c655da Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 27 Jan 2021 18:01:05 +0800 Subject: [PATCH 028/101] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenProjectCategoryGridDailyDTO.java | 126 ++++++++++++++++ .../ScreenProjectCategoryOrgDailyDTO.java | 131 ++++++++++++++++ .../ScreenProjectGridDailyDTO.java | 137 +++++++++++++++++ .../ScreenProjectOrgDailyDTO.java | 142 ++++++++++++++++++ .../ScreenProjectQuantityGridMonthlyDTO.java | 121 +++++++++++++++ .../ScreenProjectQuantityOrgMonthlyDTO.java | 126 ++++++++++++++++ ...olProjectCategoryGridDailyListFormDTO.java | 37 +++++ ...ColProjectCategoryOrgDailyListFromDTO.java | 37 +++++ .../form/ColProjectGridDailyListFromDTO.java | 37 +++++ .../form/ColProjectOrgDailyListFromDTO.java | 37 +++++ ...ProjectQuantityGridMonthlyListFromDTO.java | 37 +++++ ...lProjectQuantityOrgMonthlyListFromDTO.java | 37 +++++ .../ScreenProjectDataCollController.java | 17 +++ .../ScreenProjectCategoryGridDailyDao.java | 33 ++++ .../ScreenProjectCategoryOrgDailyDao.java | 33 ++++ .../indexcoll/ScreenProjectGridDailyDao.java | 33 ++++ .../indexcoll/ScreenProjectOrgDailyDao.java | 33 ++++ .../ScreenProjectQuantityGridMonthlyDao.java | 33 ++++ .../ScreenProjectQuantityOrgMonthlyDao.java | 33 ++++ .../ScreenProjectCategoryGridDailyEntity.java | 96 ++++++++++++ .../ScreenProjectCategoryOrgDailyEntity.java | 101 +++++++++++++ .../ScreenProjectGridDailyEntity.java | 107 +++++++++++++ .../ScreenProjectOrgDailyEntity.java | 112 ++++++++++++++ ...creenProjectQuantityGridMonthlyEntity.java | 91 +++++++++++ ...ScreenProjectQuantityOrgMonthlyEntity.java | 96 ++++++++++++ .../ScreenProjectDataCollService.java | 9 ++ .../ScreenProjectDataCollServiceImpl.java | 41 +++++ .../ScreenProjectCategoryGridDailyDao.xml | 28 ++++ .../ScreenProjectCategoryOrgDailyDao.xml | 29 ++++ .../indexcoll/ScreenProjectGridDailyDao.xml | 30 ++++ .../indexcoll/ScreenProjectOrgDailyDao.xml | 31 ++++ .../ScreenProjectQuantityGridMonthlyDao.xml | 27 ++++ .../ScreenProjectQuantityOrgMonthlyDao.xml | 28 ++++ 33 files changed, 2046 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryGridDailyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryOrgDailyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectGridDailyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectOrgDailyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityGridMonthlyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityOrgMonthlyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryGridDailyListFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryOrgDailyListFromDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectGridDailyListFromDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectOrgDailyListFromDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityGridMonthlyListFromDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityOrgMonthlyListFromDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectOrgDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectDataCollServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryGridDailyDTO.java new file mode 100644 index 0000000000..4e031a17ba --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryGridDailyDTO.java @@ -0,0 +1,126 @@ +/** + * 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.indexcollect; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +public class ScreenProjectCategoryGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 类别编码 + */ + private String epmetCategoryCode; + + /** + * 该分类下所有项目总数 + */ + private Integer projectTotal; + + /** + * 该分类下,正在处理中的项目总数 + */ + private Integer pendingTotal; + + /** + * 该分类下已结案的项目总数 + */ + private Integer closedTotal; + + /** + * 该分类下已结案无需解决的项目总数 + */ + private Integer unResolvedTotal; + + /** + * 该分类下已结案已解决的项目总数 + */ + private Integer resolvedTotal; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryOrgDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryOrgDailyDTO.java new file mode 100644 index 0000000000..c046d257b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryOrgDailyDTO.java @@ -0,0 +1,131 @@ +/** + * 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.indexcollect; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +public class ScreenProjectCategoryOrgDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String dateId; + + /** + * 组织id + */ + private String orgId; + + /** + * 社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province + */ + private String orgType; + + /** + * 当前orgId所属的上级id + */ + private String pid; + + /** + * orgId所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 类别编码 + */ + private String epmetCategoryCode; + + /** + * 该分类下所有项目总数 + */ + private Integer projectTotal; + + /** + * 该分类下,正在处理中的项目总数 + */ + private Integer pendingTotal; + + /** + * 该分类下已结案的项目总数 + */ + private Integer closedTotal; + + /** + * 该分类下已结案无需解决的项目总数 + */ + private Integer unResolvedTotal; + + /** + * 该分类下已结案已解决的项目总数 + */ + private Integer resolvedTotal; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectGridDailyDTO.java new file mode 100644 index 0000000000..52c21d9de8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectGridDailyDTO.java @@ -0,0 +1,137 @@ +/** + * 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.indexcollect; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +public class ScreenProjectGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 截止到当前日期,网格内项目总数 + */ + private Integer projectTotal; + + /** + * 截止到当前日期,网格内已解决的项目总数 + */ + private Integer resolvedNum; + + /** + * 解决率=RESOLVED_NUM/PROJECT_TOTAL,存储小数即可,保留小数点后4位 + */ + private BigDecimal resolvedRatio; + + /** + * 对当前网格内项目,参与满意度评价的总次数 + */ + private Integer evaluateTotal; + + /** + * 对当前网格内项目,满意+非常满意的总次数 + */ + private Integer goodTotal; + + /** + * 对当前网格内项目,不满意总次数 + */ + private Integer badTotal; + + /** + * 满意率=good_total/evaluate_total + */ + private BigDecimal goodRatio; + + /** + * 不满意率=bad_total/evaluate_total + */ + private BigDecimal badRatio; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectOrgDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectOrgDailyDTO.java new file mode 100644 index 0000000000..690a63f263 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectOrgDailyDTO.java @@ -0,0 +1,142 @@ +/** + * 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.indexcollect; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +public class ScreenProjectOrgDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String dateId; + + /** + * 组织id + */ + private String orgId; + + /** + * 社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province + */ + private String orgType; + + /** + * 当前orgId所属的上级id + */ + private String pid; + + /** + * orgId所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 截止到当前日期,网格内项目总数 + */ + private Integer projectTotal; + + /** + * 截止到当前日期,网格内已解决的项目总数 + */ + private Integer resolvedNum; + + /** + * 解决率=RESOLVED_NUM/PROJECT_TOTAL,存储小数即可,保留小数点后4位 + */ + private BigDecimal resolvedRatio; + + /** + * 对当前组织内项目,参与满意度评价的总次数 + */ + private Integer evaluateTotal; + + /** + * 对当前组织内项目,满意+非常满意的总次数 + */ + private Integer goodTotal; + + /** + * 对当前组织内项目,不满意总次数 + */ + private Integer badTotal; + + /** + * 满意率=good_total/evaluate_total + */ + private BigDecimal goodRatio; + + /** + * 不满意率=bad_total/evaluate_total + */ + private BigDecimal badRatio; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityGridMonthlyDTO.java new file mode 100644 index 0000000000..ab5100a9c6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityGridMonthlyDTO.java @@ -0,0 +1,121 @@ +/** + * 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.indexcollect; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +public class ScreenProjectQuantityGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 当前网格,本月新增的项目数量:转项目日期在当前月份内 + */ + private Integer projectIncr; + + /** + * 截止到当前月份:累计项目总数 + */ + private Integer projectTotal; + + /** + * 截止到当前月份:累计未结项目总数 + */ + private Integer unClosedTotal; + + /** + * 截止到当前月份:累计已结项目 + */ + private Integer closedTotal; + + /** + * 本月新增结案项目数 + */ + private Integer closedIncr; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityOrgMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityOrgMonthlyDTO.java new file mode 100644 index 0000000000..f816e9d9d3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityOrgMonthlyDTO.java @@ -0,0 +1,126 @@ +/** + * 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.indexcollect; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +public class ScreenProjectQuantityOrgMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String monthId; + + /** + * 组织id + */ + private String orgId; + + /** + * 社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province + */ + private String orgType; + + /** + * 当前orgId所属的上级id + */ + private String pid; + + /** + * orgId所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 当前组织内,本月新增的项目数量:转项目日期在当前月份内 + */ + private Integer projectIncr; + + /** + * 截止到当前月份:累计项目总数 + */ + private Integer projectTotal; + + /** + * 截止到当前月份:累计未结项目总数 + */ + private Integer unClosedTotal; + + /** + * 截止到当前月份:累计已结项目 + */ + private Integer closedTotal; + + /** + * 本月新增结案项目数 + */ + private Integer closedIncr; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryGridDailyListFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryGridDailyListFormDTO.java new file mode 100644 index 0000000000..c292119449 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryGridDailyListFormDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.indexcollect.form; + +import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 上传 项目(事件)分类按网格_按天统计 传入参数 + * @ClassName ColProjectCategoryGridDailyListFormDTO + * @Auth wangc + * @Date 2021-01-27 16:29 + */ +@Data +public class ColProjectCategoryGridDailyListFormDTO implements Serializable { + private static final long serialVersionUID = -5649120224533894681L; + + /** + * 当为true时后台将先删除当前维度的数据,后新增 + */ + @NotNull(message = "是否首次不可为空") + private Boolean isFirst; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + @NotBlank(message = "日期不可为空") + private String dateId; + + @NotNull(message = "缺少数据列表") + @NotEmpty(message = "数据列表不能为空") + private List dataList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryOrgDailyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryOrgDailyListFromDTO.java new file mode 100644 index 0000000000..bd110ad563 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryOrgDailyListFromDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.indexcollect.form; + +import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 上传 项目(事件)分类按组织_按天统计 传入参数 + * @ClassName ColProjectCategoryOrgDailyListFromDTO + * @Auth wangc + * @Date 2021-01-27 16:29 + */ +@Data +public class ColProjectCategoryOrgDailyListFromDTO implements Serializable { + private static final long serialVersionUID = -5606202046322115413L; + + /** + * 当为true时后台将先删除当前维度的数据,后新增 + */ + @NotNull(message = "是否首次不可为空") + private Boolean isFirst; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + @NotBlank(message = "日期不可为空") + private String dateId; + + @NotNull(message = "缺少数据列表") + @NotEmpty(message = "数据列表不能为空") + private List dataList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectGridDailyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectGridDailyListFromDTO.java new file mode 100644 index 0000000000..bf33228f3d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectGridDailyListFromDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.indexcollect.form; + +import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 上传 项目(事件)分析按网格_按天统计 传入参数 + * @ClassName ColProjectGridDailyListFromDTO + * @Auth wangc + * @Date 2021-01-27 16:29 + */ +@Data +public class ColProjectGridDailyListFromDTO implements Serializable { + private static final long serialVersionUID = -7615867900486598440L; + + /** + * 当为true时后台将先删除当前维度的数据,后新增 + */ + @NotNull(message = "是否首次不可为空") + private Boolean isFirst; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + @NotBlank(message = "日期不可为空") + private String dateId; + + @NotNull(message = "缺少数据列表") + @NotEmpty(message = "数据列表不能为空") + private List dataList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectOrgDailyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectOrgDailyListFromDTO.java new file mode 100644 index 0000000000..e8d671459d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectOrgDailyListFromDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.indexcollect.form; + +import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 上传 项目(事件)分析按组织_按天统计 传入参数 + * @ClassName ColProjectOrgDailyListFromDTO + * @Auth wangc + * @Date 2021-01-27 16:30 + */ +@Data +public class ColProjectOrgDailyListFromDTO implements Serializable { + private static final long serialVersionUID = -3813434634371460918L; + + /** + * 当为true时后台将先删除当前维度的数据,后新增 + */ + @NotNull(message = "是否首次不可为空") + private Boolean isFirst; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + @NotBlank(message = "日期不可为空") + private String dateId; + + @NotNull(message = "缺少数据列表") + @NotEmpty(message = "数据列表不能为空") + private List dataList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityGridMonthlyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityGridMonthlyListFromDTO.java new file mode 100644 index 0000000000..2df851e5f1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityGridMonthlyListFromDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.indexcollect.form; + +import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 上传 项目(事件)数量分析按网格_按月统计 传入参数 + * @ClassName ColProjectQuantityGridMonthlyListFromDTO + * @Auth wangc + * @Date 2021-01-27 16:30 + */ +@Data +public class ColProjectQuantityGridMonthlyListFromDTO implements Serializable { + private static final long serialVersionUID = -3662662990777826261L; + + /** + * 当为true时后台将先删除当前维度的数据,后新增 + */ + @NotNull(message = "是否首次不可为空") + private Boolean isFirst; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + @NotBlank(message = "日期不可为空") + private String dateId; + + @NotNull(message = "缺少数据列表") + @NotEmpty(message = "数据列表不能为空") + private List dataList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityOrgMonthlyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityOrgMonthlyListFromDTO.java new file mode 100644 index 0000000000..c5f822c72e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityOrgMonthlyListFromDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.indexcollect.form; + +import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 上传 项目(事件)数量分析按组织_按月统计 传入参数 + * @ClassName ColProjectQuantityOrgMonthlyListFromDTO + * @Auth wangc + * @Date 2021-01-27 16:30 + */ +@Data +public class ColProjectQuantityOrgMonthlyListFromDTO implements Serializable { + private static final long serialVersionUID = -8551691254980519285L; + /** + * 当为true时后台将先删除当前维度的数据,后新增 + */ + @NotNull(message = "是否首次不可为空") + private Boolean isFirst; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + @NotBlank(message = "日期不可为空") + private String dateId; + + @NotNull(message = "缺少数据列表") + @NotEmpty(message = "数据列表不能为空") + private List dataList; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java new file mode 100644 index 0000000000..12f4f9690e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -0,0 +1,17 @@ +package com.epmet.controller; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Description 事件/项目采集接口入口 + * @ClassName ScreenProjectDataCollController + * @Auth wangc + * @Date 2021-01-27 17:10 + */ +@Slf4j +@RestController +@RequestMapping("project") +public class ScreenProjectDataCollController { +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java new file mode 100644 index 0000000000..70e85574f7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.dao.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectCategoryGridDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java new file mode 100644 index 0000000000..1c07640f10 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.dao.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectCategoryOrgDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java new file mode 100644 index 0000000000..2125c3bd0b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.dao.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectGridDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java new file mode 100644 index 0000000000..fa5a4a3dc4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.dao.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectOrgDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java new file mode 100644 index 0000000000..808ce3e53c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.dao.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectQuantityGridMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java new file mode 100644 index 0000000000..63b4315d76 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.dao.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectQuantityOrgMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyEntity.java new file mode 100644 index 0000000000..ec9a069243 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyEntity.java @@ -0,0 +1,96 @@ +/** + * 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.entity.evaluationindex.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_category_grid_daily") +public class ScreenProjectCategoryGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 类别编码 + */ + private String epmetCategoryCode; + + /** + * 该分类下所有项目总数 + */ + private Integer projectTotal; + + /** + * 该分类下,正在处理中的项目总数 + */ + private Integer pendingTotal; + + /** + * 该分类下已结案的项目总数 + */ + private Integer closedTotal; + + /** + * 该分类下已结案无需解决的项目总数 + */ + private Integer unResolvedTotal; + + /** + * 该分类下已结案已解决的项目总数 + */ + private Integer resolvedTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyEntity.java new file mode 100644 index 0000000000..e08ec7a399 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyEntity.java @@ -0,0 +1,101 @@ +/** + * 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.entity.evaluationindex.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_category_org_daily") +public class ScreenProjectCategoryOrgDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String dateId; + + /** + * 组织id + */ + private String orgId; + + /** + * 社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province + */ + private String orgType; + + /** + * 当前orgId所属的上级id + */ + private String pid; + + /** + * orgId所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 类别编码 + */ + private String epmetCategoryCode; + + /** + * 该分类下所有项目总数 + */ + private Integer projectTotal; + + /** + * 该分类下,正在处理中的项目总数 + */ + private Integer pendingTotal; + + /** + * 该分类下已结案的项目总数 + */ + private Integer closedTotal; + + /** + * 该分类下已结案无需解决的项目总数 + */ + private Integer unResolvedTotal; + + /** + * 该分类下已结案已解决的项目总数 + */ + private Integer resolvedTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectGridDailyEntity.java new file mode 100644 index 0000000000..264f74517c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectGridDailyEntity.java @@ -0,0 +1,107 @@ +/** + * 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.entity.evaluationindex.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_grid_daily") +public class ScreenProjectGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 截止到当前日期,网格内项目总数 + */ + private Integer projectTotal; + + /** + * 截止到当前日期,网格内已解决的项目总数 + */ + private Integer resolvedNum; + + /** + * 解决率=RESOLVED_NUM/PROJECT_TOTAL,存储小数即可,保留小数点后4位 + */ + private BigDecimal resolvedRatio; + + /** + * 对当前网格内项目,参与满意度评价的总次数 + */ + private Integer evaluateTotal; + + /** + * 对当前网格内项目,满意+非常满意的总次数 + */ + private Integer goodTotal; + + /** + * 对当前网格内项目,不满意总次数 + */ + private Integer badTotal; + + /** + * 满意率=good_total/evaluate_total + */ + private BigDecimal goodRatio; + + /** + * 不满意率=bad_total/evaluate_total + */ + private BigDecimal badRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectOrgDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectOrgDailyEntity.java new file mode 100644 index 0000000000..4c86636ccc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectOrgDailyEntity.java @@ -0,0 +1,112 @@ +/** + * 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.entity.evaluationindex.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_org_daily") +public class ScreenProjectOrgDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String dateId; + + /** + * 组织id + */ + private String orgId; + + /** + * 社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province + */ + private String orgType; + + /** + * 当前orgId所属的上级id + */ + private String pid; + + /** + * orgId所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 截止到当前日期,网格内项目总数 + */ + private Integer projectTotal; + + /** + * 截止到当前日期,网格内已解决的项目总数 + */ + private Integer resolvedNum; + + /** + * 解决率=RESOLVED_NUM/PROJECT_TOTAL,存储小数即可,保留小数点后4位 + */ + private BigDecimal resolvedRatio; + + /** + * 对当前组织内项目,参与满意度评价的总次数 + */ + private Integer evaluateTotal; + + /** + * 对当前组织内项目,满意+非常满意的总次数 + */ + private Integer goodTotal; + + /** + * 对当前组织内项目,不满意总次数 + */ + private Integer badTotal; + + /** + * 满意率=good_total/evaluate_total + */ + private BigDecimal goodRatio; + + /** + * 不满意率=bad_total/evaluate_total + */ + private BigDecimal badRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyEntity.java new file mode 100644 index 0000000000..9b3badaf19 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyEntity.java @@ -0,0 +1,91 @@ +/** + * 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.entity.evaluationindex.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_quantity_grid_monthly") +public class ScreenProjectQuantityGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 当前网格,本月新增的项目数量:转项目日期在当前月份内 + */ + private Integer projectIncr; + + /** + * 截止到当前月份:累计项目总数 + */ + private Integer projectTotal; + + /** + * 截止到当前月份:累计未结项目总数 + */ + private Integer unClosedTotal; + + /** + * 截止到当前月份:累计已结项目 + */ + private Integer closedTotal; + + /** + * 本月新增结案项目数 + */ + private Integer closedIncr; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyEntity.java new file mode 100644 index 0000000000..dce4964d5f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyEntity.java @@ -0,0 +1,96 @@ +/** + * 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.entity.evaluationindex.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_project_quantity_org_monthly") +public class ScreenProjectQuantityOrgMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String monthId; + + /** + * 组织id + */ + private String orgId; + + /** + * 社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province + */ + private String orgType; + + /** + * 当前orgId所属的上级id + */ + private String pid; + + /** + * orgId所有的父级id,以英文:或者英文,隔开 + */ + private String pids; + + /** + * 当前组织内,本月新增的项目数量:转项目日期在当前月份内 + */ + private Integer projectIncr; + + /** + * 截止到当前月份:累计项目总数 + */ + private Integer projectTotal; + + /** + * 截止到当前月份:累计未结项目总数 + */ + private Integer unClosedTotal; + + /** + * 截止到当前月份:累计已结项目 + */ + private Integer closedTotal; + + /** + * 本月新增结案项目数 + */ + private Integer closedIncr; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java new file mode 100644 index 0000000000..07465008a1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java @@ -0,0 +1,9 @@ +package com.epmet.service.evaluationindex.indexcoll; + +/** + * @Description 事件/项目大屏数据采集service + * @author wangc + * @date 2021.01.27 17:19 +*/ +public interface ScreenProjectDataCollService { +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectDataCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectDataCollServiceImpl.java new file mode 100644 index 0000000000..41c2cfde24 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectDataCollServiceImpl.java @@ -0,0 +1,41 @@ +package com.epmet.service.evaluationindex.indexcoll.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcoll.*; +import com.epmet.service.evaluationindex.indexcoll.ScreenProjectDataCollService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @Description + * @ClassName ScreenProjectDataCollServiceImpl + * @Auth wangc + * @Date 2021-01-27 17:20 + */ +@Slf4j +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class ScreenProjectDataCollServiceImpl implements ScreenProjectDataCollService { + + @Autowired + private ScreenProjectCategoryGridDailyDao categoryGridDailyDao; + + @Autowired + private ScreenProjectCategoryOrgDailyDao categoryOrgDailyDao; + + @Autowired + private ScreenProjectGridDailyDao gridDailyDao; + + @Autowired + private ScreenProjectOrgDailyDao orgDailyDao; + + @Autowired + private ScreenProjectQuantityGridMonthlyDao quantityGridMonthlyDao; + + @Autowired + private ScreenProjectQuantityOrgMonthlyDao quantityOrgMonthlyDao; + + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml new file mode 100644 index 0000000000..d7541618e9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml new file mode 100644 index 0000000000..74aab67dd6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml new file mode 100644 index 0000000000..497787c124 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml new file mode 100644 index 0000000000..e7ec55db6b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml new file mode 100644 index 0000000000..424f17d977 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml new file mode 100644 index 0000000000..ac8995ea27 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From df16c6d3866a1416a828e72c8b084c1ffee7e51a Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 27 Jan 2021 18:19:44 +0800 Subject: [PATCH 029/101] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86service=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E4=BC=A0=E5=8F=82dto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...olProjectCategoryGridDailyListFormDTO.java | 37 ------- ...ColProjectCategoryOrgDailyListFromDTO.java | 37 ------- .../form/ColProjectGridDailyListFromDTO.java | 37 ------- .../form/ColProjectOrgDailyListFromDTO.java | 37 ------- ...ProjectQuantityGridMonthlyListFromDTO.java | 37 ------- ...lProjectQuantityOrgMonthlyListFromDTO.java | 37 ------- ...ScreenProjectCategoryGridDailyService.java | 95 +++++++++++++++++ .../ScreenProjectCategoryOrgDailyService.java | 95 +++++++++++++++++ .../ScreenProjectGridDailyService.java | 95 +++++++++++++++++ .../ScreenProjectOrgDailyService.java | 95 +++++++++++++++++ ...reenProjectQuantityGridMonthlyService.java | 95 +++++++++++++++++ ...creenProjectQuantityOrgMonthlyService.java | 95 +++++++++++++++++ ...enProjectCategoryGridDailyServiceImpl.java | 100 ++++++++++++++++++ ...eenProjectCategoryOrgDailyServiceImpl.java | 99 +++++++++++++++++ .../ScreenProjectGridDailyServiceImpl.java | 100 ++++++++++++++++++ .../ScreenProjectOrgDailyServiceImpl.java | 100 ++++++++++++++++++ ...ProjectQuantityGridMonthlyServiceImpl.java | 100 ++++++++++++++++++ ...nProjectQuantityOrgMonthlyServiceImpl.java | 99 +++++++++++++++++ 18 files changed, 1168 insertions(+), 222 deletions(-) delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryGridDailyListFormDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryOrgDailyListFromDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectGridDailyListFromDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectOrgDailyListFromDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityGridMonthlyListFromDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityOrgMonthlyListFromDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryGridDailyListFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryGridDailyListFormDTO.java deleted file mode 100644 index c292119449..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryGridDailyListFormDTO.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.epmet.dto.indexcollect.form; - -import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.List; - -/** - * @Description 上传 项目(事件)分类按网格_按天统计 传入参数 - * @ClassName ColProjectCategoryGridDailyListFormDTO - * @Auth wangc - * @Date 2021-01-27 16:29 - */ -@Data -public class ColProjectCategoryGridDailyListFormDTO implements Serializable { - private static final long serialVersionUID = -5649120224533894681L; - - /** - * 当为true时后台将先删除当前维度的数据,后新增 - */ - @NotNull(message = "是否首次不可为空") - private Boolean isFirst; - - /** - * 日期Id, 数据更新至:yyyyMMdd - */ - @NotBlank(message = "日期不可为空") - private String dateId; - - @NotNull(message = "缺少数据列表") - @NotEmpty(message = "数据列表不能为空") - private List dataList; -} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryOrgDailyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryOrgDailyListFromDTO.java deleted file mode 100644 index bd110ad563..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectCategoryOrgDailyListFromDTO.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.epmet.dto.indexcollect.form; - -import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.List; - -/** - * @Description 上传 项目(事件)分类按组织_按天统计 传入参数 - * @ClassName ColProjectCategoryOrgDailyListFromDTO - * @Auth wangc - * @Date 2021-01-27 16:29 - */ -@Data -public class ColProjectCategoryOrgDailyListFromDTO implements Serializable { - private static final long serialVersionUID = -5606202046322115413L; - - /** - * 当为true时后台将先删除当前维度的数据,后新增 - */ - @NotNull(message = "是否首次不可为空") - private Boolean isFirst; - - /** - * 日期Id, 数据更新至:yyyyMMdd - */ - @NotBlank(message = "日期不可为空") - private String dateId; - - @NotNull(message = "缺少数据列表") - @NotEmpty(message = "数据列表不能为空") - private List dataList; -} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectGridDailyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectGridDailyListFromDTO.java deleted file mode 100644 index bf33228f3d..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectGridDailyListFromDTO.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.epmet.dto.indexcollect.form; - -import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.List; - -/** - * @Description 上传 项目(事件)分析按网格_按天统计 传入参数 - * @ClassName ColProjectGridDailyListFromDTO - * @Auth wangc - * @Date 2021-01-27 16:29 - */ -@Data -public class ColProjectGridDailyListFromDTO implements Serializable { - private static final long serialVersionUID = -7615867900486598440L; - - /** - * 当为true时后台将先删除当前维度的数据,后新增 - */ - @NotNull(message = "是否首次不可为空") - private Boolean isFirst; - - /** - * 日期Id, 数据更新至:yyyyMMdd - */ - @NotBlank(message = "日期不可为空") - private String dateId; - - @NotNull(message = "缺少数据列表") - @NotEmpty(message = "数据列表不能为空") - private List dataList; -} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectOrgDailyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectOrgDailyListFromDTO.java deleted file mode 100644 index e8d671459d..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectOrgDailyListFromDTO.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.epmet.dto.indexcollect.form; - -import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.List; - -/** - * @Description 上传 项目(事件)分析按组织_按天统计 传入参数 - * @ClassName ColProjectOrgDailyListFromDTO - * @Auth wangc - * @Date 2021-01-27 16:30 - */ -@Data -public class ColProjectOrgDailyListFromDTO implements Serializable { - private static final long serialVersionUID = -3813434634371460918L; - - /** - * 当为true时后台将先删除当前维度的数据,后新增 - */ - @NotNull(message = "是否首次不可为空") - private Boolean isFirst; - - /** - * 日期Id, 数据更新至:yyyyMMdd - */ - @NotBlank(message = "日期不可为空") - private String dateId; - - @NotNull(message = "缺少数据列表") - @NotEmpty(message = "数据列表不能为空") - private List dataList; -} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityGridMonthlyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityGridMonthlyListFromDTO.java deleted file mode 100644 index 2df851e5f1..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityGridMonthlyListFromDTO.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.epmet.dto.indexcollect.form; - -import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.List; - -/** - * @Description 上传 项目(事件)数量分析按网格_按月统计 传入参数 - * @ClassName ColProjectQuantityGridMonthlyListFromDTO - * @Auth wangc - * @Date 2021-01-27 16:30 - */ -@Data -public class ColProjectQuantityGridMonthlyListFromDTO implements Serializable { - private static final long serialVersionUID = -3662662990777826261L; - - /** - * 当为true时后台将先删除当前维度的数据,后新增 - */ - @NotNull(message = "是否首次不可为空") - private Boolean isFirst; - - /** - * 日期Id, 数据更新至:yyyyMMdd - */ - @NotBlank(message = "日期不可为空") - private String dateId; - - @NotNull(message = "缺少数据列表") - @NotEmpty(message = "数据列表不能为空") - private List dataList; -} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityOrgMonthlyListFromDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityOrgMonthlyListFromDTO.java deleted file mode 100644 index c5f822c72e..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/ColProjectQuantityOrgMonthlyListFromDTO.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.epmet.dto.indexcollect.form; - -import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.List; - -/** - * @Description 上传 项目(事件)数量分析按组织_按月统计 传入参数 - * @ClassName ColProjectQuantityOrgMonthlyListFromDTO - * @Auth wangc - * @Date 2021-01-27 16:30 - */ -@Data -public class ColProjectQuantityOrgMonthlyListFromDTO implements Serializable { - private static final long serialVersionUID = -8551691254980519285L; - /** - * 当为true时后台将先删除当前维度的数据,后新增 - */ - @NotNull(message = "是否首次不可为空") - private Boolean isFirst; - - /** - * 日期Id, 数据更新至:yyyyMMdd - */ - @NotBlank(message = "日期不可为空") - private String dateId; - - @NotNull(message = "缺少数据列表") - @NotEmpty(message = "数据列表不能为空") - private List dataList; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java new file mode 100644 index 0000000000..317eb15f74 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java @@ -0,0 +1,95 @@ +/** + * 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.service.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectCategoryGridDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-01-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-01-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectCategoryGridDailyDTO + * @author generator + * @date 2021-01-27 + */ + ScreenProjectCategoryGridDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void save(ScreenProjectCategoryGridDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void update(ScreenProjectCategoryGridDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-01-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java new file mode 100644 index 0000000000..f0515ae68c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java @@ -0,0 +1,95 @@ +/** + * 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.service.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectCategoryOrgDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-01-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-01-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectCategoryOrgDailyDTO + * @author generator + * @date 2021-01-27 + */ + ScreenProjectCategoryOrgDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void save(ScreenProjectCategoryOrgDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void update(ScreenProjectCategoryOrgDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-01-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java new file mode 100644 index 0000000000..3c7c41ecfb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java @@ -0,0 +1,95 @@ +/** + * 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.service.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectGridDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-01-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-01-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectGridDailyDTO + * @author generator + * @date 2021-01-27 + */ + ScreenProjectGridDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void save(ScreenProjectGridDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void update(ScreenProjectGridDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-01-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java new file mode 100644 index 0000000000..e8a10429c0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java @@ -0,0 +1,95 @@ +/** + * 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.service.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectOrgDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-01-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-01-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectOrgDailyDTO + * @author generator + * @date 2021-01-27 + */ + ScreenProjectOrgDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void save(ScreenProjectOrgDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void update(ScreenProjectOrgDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-01-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java new file mode 100644 index 0000000000..34c0890d15 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java @@ -0,0 +1,95 @@ +/** + * 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.service.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectQuantityGridMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-01-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-01-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectQuantityGridMonthlyDTO + * @author generator + * @date 2021-01-27 + */ + ScreenProjectQuantityGridMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void save(ScreenProjectQuantityGridMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void update(ScreenProjectQuantityGridMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-01-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java new file mode 100644 index 0000000000..1ad6c888a4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java @@ -0,0 +1,95 @@ +/** + * 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.service.evaluationindex.indexcoll; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectQuantityOrgMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-01-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-01-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenProjectQuantityOrgMonthlyDTO + * @author generator + * @date 2021-01-27 + */ + ScreenProjectQuantityOrgMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void save(ScreenProjectQuantityOrgMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-01-27 + */ + void update(ScreenProjectQuantityOrgMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-01-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java new file mode 100644 index 0000000000..9d641d142a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.service.evaluationindex.indexcoll.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyDao; +import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity; +import com.epmet.service.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Service +public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl implements ScreenProjectCategoryGridDailyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectCategoryGridDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectCategoryGridDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectCategoryGridDailyDTO get(String id) { + ScreenProjectCategoryGridDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectCategoryGridDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectCategoryGridDailyDTO dto) { + ScreenProjectCategoryGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectCategoryGridDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectCategoryGridDailyDTO dto) { + ScreenProjectCategoryGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectCategoryGridDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java new file mode 100644 index 0000000000..037f4a56e7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -0,0 +1,99 @@ +/** + * 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.service.evaluationindex.indexcoll.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyDao; +import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity; +import com.epmet.service.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Service +public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl implements ScreenProjectCategoryOrgDailyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectCategoryOrgDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectCategoryOrgDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectCategoryOrgDailyDTO get(String id) { + ScreenProjectCategoryOrgDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectCategoryOrgDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectCategoryOrgDailyDTO dto) { + ScreenProjectCategoryOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectCategoryOrgDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectCategoryOrgDailyDTO dto) { + ScreenProjectCategoryOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectCategoryOrgDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java new file mode 100644 index 0000000000..8377b315df --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.service.evaluationindex.indexcoll.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectGridDailyDao; +import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity; +import com.epmet.service.evaluationindex.indexcoll.ScreenProjectGridDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Service +public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl implements ScreenProjectGridDailyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectGridDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectGridDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectGridDailyDTO get(String id) { + ScreenProjectGridDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectGridDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectGridDailyDTO dto) { + ScreenProjectGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectGridDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectGridDailyDTO dto) { + ScreenProjectGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectGridDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java new file mode 100644 index 0000000000..16aeb8fd2d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.service.evaluationindex.indexcoll.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectOrgDailyDao; +import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity; +import com.epmet.service.evaluationindex.indexcoll.ScreenProjectOrgDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Service +public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl implements ScreenProjectOrgDailyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectOrgDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectOrgDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectOrgDailyDTO get(String id) { + ScreenProjectOrgDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectOrgDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectOrgDailyDTO dto) { + ScreenProjectOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectOrgDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectOrgDailyDTO dto) { + ScreenProjectOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectOrgDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java new file mode 100644 index 0000000000..327351ccf2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.service.evaluationindex.indexcoll.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyDao; +import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity; +import com.epmet.service.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Service +public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl implements ScreenProjectQuantityGridMonthlyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectQuantityGridMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectQuantityGridMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectQuantityGridMonthlyDTO get(String id) { + ScreenProjectQuantityGridMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectQuantityGridMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectQuantityGridMonthlyDTO dto) { + ScreenProjectQuantityGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectQuantityGridMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectQuantityGridMonthlyDTO dto) { + ScreenProjectQuantityGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectQuantityGridMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java new file mode 100644 index 0000000000..663e018652 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -0,0 +1,99 @@ +/** + * 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.service.evaluationindex.indexcoll.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyDao; +import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; +import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity; +import com.epmet.service.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Service +public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl implements ScreenProjectQuantityOrgMonthlyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenProjectQuantityOrgMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenProjectQuantityOrgMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenProjectQuantityOrgMonthlyDTO get(String id) { + ScreenProjectQuantityOrgMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenProjectQuantityOrgMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenProjectQuantityOrgMonthlyDTO dto) { + ScreenProjectQuantityOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectQuantityOrgMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenProjectQuantityOrgMonthlyDTO dto) { + ScreenProjectQuantityOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectQuantityOrgMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file From 07b1ec7027dde8063df994bdcd9a31a978f265d5 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 28 Jan 2021 12:39:35 +0800 Subject: [PATCH 030/101] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86controller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenProjectDataCollController.java | 71 +++++++++++++++++ .../ScreenProjectCategoryGridDailyDao.java | 9 ++- .../ScreenProjectCategoryOrgDailyDao.java | 10 ++- .../indexcoll/ScreenProjectGridDailyDao.java | 12 ++- .../indexcoll/ScreenProjectOrgDailyDao.java | 12 ++- .../ScreenProjectQuantityGridMonthlyDao.java | 10 ++- .../ScreenProjectQuantityOrgMonthlyDao.java | 12 ++- ...ScreenProjectCategoryGridDailyService.java | 10 +++ .../ScreenProjectCategoryOrgDailyService.java | 11 +++ .../ScreenProjectDataCollService.java | 9 --- .../ScreenProjectGridDailyService.java | 12 +++ .../ScreenProjectOrgDailyService.java | 11 +++ ...reenProjectQuantityGridMonthlyService.java | 10 +++ ...creenProjectQuantityOrgMonthlyService.java | 11 +++ ...enProjectCategoryGridDailyServiceImpl.java | 23 ++++++ ...eenProjectCategoryOrgDailyServiceImpl.java | 24 ++++++ .../ScreenProjectDataCollServiceImpl.java | 41 ---------- .../ScreenProjectGridDailyServiceImpl.java | 24 ++++++ .../ScreenProjectOrgDailyServiceImpl.java | 25 ++++++ ...ProjectQuantityGridMonthlyServiceImpl.java | 24 ++++++ ...nProjectQuantityOrgMonthlyServiceImpl.java | 24 ++++++ .../ScreenProjectCategoryGridDailyDao.xml | 71 +++++++++++++++++ .../ScreenProjectCategoryOrgDailyDao.xml | 76 ++++++++++++++++++ .../indexcoll/ScreenProjectGridDailyDao.xml | 77 ++++++++++++++++++ .../indexcoll/ScreenProjectOrgDailyDao.xml | 79 +++++++++++++++++++ .../ScreenProjectQuantityGridMonthlyDao.xml | 68 ++++++++++++++++ .../ScreenProjectQuantityOrgMonthlyDao.xml | 71 +++++++++++++++++ 27 files changed, 781 insertions(+), 56 deletions(-) delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectDataCollServiceImpl.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java index 12f4f9690e..d1cb54fa7c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -1,6 +1,15 @@ package com.epmet.controller; +import com.epmet.commons.tools.exception.ValidateException; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.indexcollect.*; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.service.evaluationindex.indexcoll.*; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -14,4 +23,66 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("project") public class ScreenProjectDataCollController { + + @Autowired + private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; + @Autowired + private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService; + @Autowired + private ScreenProjectGridDailyService projectGridDailyService; + @Autowired + private ScreenProjectOrgDailyService projectOrgDailyService; + @Autowired + private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService; + @Autowired + private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService; + + @RequestMapping("category-grid-daily") + public Result categoryGridDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ + if(null == param || CollectionUtils.isEmpty(param.getDataList())) + throw new ValidateException("传入数据不可为空"); + projectCategoryGridDailyService.collect(customerId,param); + return new Result(); + } + + @RequestMapping("category-org-daily") + public Result categoryOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ + if(null == param || CollectionUtils.isEmpty(param.getDataList())) + throw new ValidateException("传入数据不可为空"); + projectCategoryOrgDailyService.collect(customerId,param); + return new Result(); + } + + @RequestMapping("quantity-grid-monthly") + public Result quantityGridMonthly(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ + if(null == param || CollectionUtils.isEmpty(param.getDataList())) + throw new ValidateException("传入数据不可为空"); + projectQuantityGridMonthlyService.collect(customerId,param); + return new Result(); + } + + @RequestMapping("quantity-org-monthly") + public Result quantityOrgMonthly(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ + if(null == param || CollectionUtils.isEmpty(param.getDataList())) + throw new ValidateException("传入数据不可为空"); + projectQuantityOrgMonthlyService.collect(customerId,param); + return new Result(); + } + + @RequestMapping("project-grid-daily") + public Result projectGridDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ + if(null == param || CollectionUtils.isEmpty(param.getDataList())) + throw new ValidateException("传入数据不可为空"); + projectGridDailyService.collect(customerId,param); + return new Result(); + } + + @RequestMapping("project-org-daily") + public Result projectOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ + if(null == param || CollectionUtils.isEmpty(param.getDataList())) + throw new ValidateException("传入数据不可为空"); + projectOrgDailyService.collect(customerId,param); + return new Result(); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java index 70e85574f7..9baea20ee5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 项目(事件)分类按网格_按天统计 @@ -29,5 +33,8 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenProjectCategoryGridDailyDao extends BaseDao { - + + void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + + void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java index 1c07640f10..e512e52e8d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 项目(事件)分类按组织_按天统计 @@ -29,5 +33,9 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenProjectCategoryOrgDailyDao extends BaseDao { - + + void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + + void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java index 2125c3bd0b..abc056a6a7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 项目(事件)分析按网格_按天统计 @@ -29,5 +33,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenProjectGridDailyDao extends BaseDao { - + + + void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + + void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); + + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java index fa5a4a3dc4..4b073ba4dd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 项目(事件)分析按组织_按天统计 @@ -29,5 +33,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenProjectOrgDailyDao extends BaseDao { - + + + void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + + void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); + + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java index 808ce3e53c..d986014dce 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 项目(事件)数量分析按网格_按月统计 @@ -29,5 +33,9 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenProjectQuantityGridMonthlyDao extends BaseDao { - + + void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + + void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java index 63b4315d76..7cd0cb74d7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 项目(事件)数量分析按组织_按月统计 @@ -29,5 +33,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenProjectQuantityOrgMonthlyDao extends BaseDao { - + + + void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + + void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); + + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java index 317eb15f74..c5d2eb30ef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java @@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity; import java.util.List; @@ -92,4 +93,13 @@ public interface ScreenProjectCategoryGridDailyService extends BaseService data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java index f0515ae68c..4dd2d5c715 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java @@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity; import java.util.List; @@ -92,4 +93,14 @@ public interface ScreenProjectCategoryOrgDailyService extends BaseService data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java deleted file mode 100644 index 07465008a1..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.epmet.service.evaluationindex.indexcoll; - -/** - * @Description 事件/项目大屏数据采集service - * @author wangc - * @date 2021.01.27 17:19 -*/ -public interface ScreenProjectDataCollService { -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java index 3c7c41ecfb..51260645aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java @@ -20,7 +20,9 @@ package com.epmet.service.evaluationindex.indexcoll; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity; +import javafx.stage.Screen; import java.util.List; import java.util.Map; @@ -92,4 +94,14 @@ public interface ScreenProjectGridDailyService extends BaseService data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java index e8a10429c0..4c51761e0d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java @@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity; import java.util.List; @@ -92,4 +93,14 @@ public interface ScreenProjectOrgDailyService extends BaseService data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java index 34c0890d15..81ba806027 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java @@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity; import java.util.List; @@ -92,4 +93,13 @@ public interface ScreenProjectQuantityGridMonthlyService extends BaseService data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java index 1ad6c888a4..d8e62061d7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java @@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity; import java.util.List; @@ -92,4 +93,14 @@ public interface ScreenProjectQuantityOrgMonthlyService extends BaseService data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java index 9d641d142a..a9ec67e0aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyDao; import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity; import com.epmet.service.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyService; import org.apache.commons.lang3.StringUtils; @@ -97,4 +102,22 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl data) { + if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); + if(data.getIsFirst()){ + baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + } + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index 037f4a56e7..52ebd193aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyDao; import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity; import com.epmet.service.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyService; import org.apache.commons.lang3.StringUtils; @@ -96,4 +101,23 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl data) { + if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); + if(data.getIsFirst()){ + baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + } + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectDataCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectDataCollServiceImpl.java deleted file mode 100644 index 41c2cfde24..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectDataCollServiceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.epmet.service.evaluationindex.indexcoll.impl; - -import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.indexcoll.*; -import com.epmet.service.evaluationindex.indexcoll.ScreenProjectDataCollService; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Description - * @ClassName ScreenProjectDataCollServiceImpl - * @Auth wangc - * @Date 2021-01-27 17:20 - */ -@Slf4j -@Service -@DataSource(DataSourceConstant.EVALUATION_INDEX) -public class ScreenProjectDataCollServiceImpl implements ScreenProjectDataCollService { - - @Autowired - private ScreenProjectCategoryGridDailyDao categoryGridDailyDao; - - @Autowired - private ScreenProjectCategoryOrgDailyDao categoryOrgDailyDao; - - @Autowired - private ScreenProjectGridDailyDao gridDailyDao; - - @Autowired - private ScreenProjectOrgDailyDao orgDailyDao; - - @Autowired - private ScreenProjectQuantityGridMonthlyDao quantityGridMonthlyDao; - - @Autowired - private ScreenProjectQuantityOrgMonthlyDao quantityOrgMonthlyDao; - - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java index 8377b315df..9eadef0999 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java @@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectGridDailyDao; import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity; import com.epmet.service.evaluationindex.indexcoll.ScreenProjectGridDailyService; import org.apache.commons.lang3.StringUtils; @@ -97,4 +102,23 @@ public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl data) { + if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); + if(data.getIsFirst()){ + baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + } + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java index 16aeb8fd2d..2d98768ec1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java @@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectOrgDailyDao; import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity; import com.epmet.service.evaluationindex.indexcoll.ScreenProjectOrgDailyService; import org.apache.commons.lang3.StringUtils; @@ -97,4 +102,24 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl data) { + if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); + if(data.getIsFirst()){ + baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + } + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java index 327351ccf2..4b797fa009 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java @@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyDao; import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity; import com.epmet.service.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyService; import org.apache.commons.lang3.StringUtils; @@ -97,4 +102,23 @@ public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl baseDao.deleteBatchIds(Arrays.asList(ids)); } + /** + * @Description 数据采集 + * @param customerId + * @param data + * @return void + * @author wangc + * @date 2021.01.28 09:33 + */ + @Transactional(rollbackFor = Exception.class) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) + @Override + public void collect(String customerId, ScreenCollFormDTO data) { + if(StringUtils.isBlank(data.getMonthId())) data.setMonthId(DateUtils.getBeforeNMonth(NumConstant.ONE)); + if(data.getIsFirst()){ + baseDao.deleteByDateIdAndCustomerId(customerId,data.getMonthId()); + } + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java index 663e018652..8a05d8f543 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyDao; import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity; import com.epmet.service.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyService; import org.apache.commons.lang3.StringUtils; @@ -96,4 +101,23 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl< baseDao.deleteBatchIds(Arrays.asList(ids)); } + /** + * @Description 数据采集 + * @param customerId + * @param data + * @return void + * @author wangc + * @date 2021.01.28 09:33 + */ + @Transactional(rollbackFor = Exception.class) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) + @Override + public void collect(String customerId, ScreenCollFormDTO data) { + if(StringUtils.isBlank(data.getMonthId())) data.setMonthId(DateUtils.getBeforeNMonth(NumConstant.ONE)); + if(data.getIsFirst()){ + baseDao.deleteByDateIdAndCustomerId(customerId,data.getMonthId()); + } + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml index d7541618e9..8737b35d75 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml @@ -24,5 +24,76 @@ + + INSERT INTO screen_project_category_grid_daily + ( + id, + customer_id, + date_id, + grid_id, + pid, + pids, + epmet_category_code, + project_total, + pending_total, + closed_total, + un_resolved_total, + resolved_total, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + + #{customerId}, + + #{item.dateId}, + + #{item.gridId}, + + #{item.pid}, + + #{item.pids}, + + #{item.epmetCategoryCode}, + + #{item.projectTotal}, + + #{item.pendingTotal}, + + #{item.closedTotal}, + + #{item.unResolvedTotal}, + + #{item.regIncr}, + + #{item.resolvedTotal}, + + '0', + + 0, + + #{createdBy}, + + now(), + + #{createdBy}, + + now() + ) + + + + + + delete from screen_project_category_grid_daily + where customer_id = #{customerId} + and date_id = #{dateId} + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml index 74aab67dd6..1d035693d8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml @@ -25,5 +25,81 @@ + + INSERT INTO screen_project_category_org_daily + ( + id, + customer_id, + date_id, + org_id, + org_type, + pid, + pids, + epmet_category_code, + project_total, + pending_total, + closed_total, + un_resolved_total, + resolved_total, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + + #{customerId}, + + #{item.dateId}, + + #{item.orgId}, + + #{item.orgType}, + + #{item.pid}, + + #{item.pids}, + + #{item.epmetCategoryCode}, + + #{item.projectTotal}, + + #{item.pendingTotal}, + + #{item.closedTotal}, + + #{item.unResolvedTotal}, + + #{item.regIncr}, + + #{item.resolvedTotal}, + + '0', + + 0, + + #{createdBy}, + + now(), + + #{createdBy}, + + now() + ) + + + + + + delete from screen_project_category_org_daily + where customer_id = #{customerId} + and date_id = #{dateId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml index 497787c124..c3b4d7ed82 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml @@ -26,5 +26,82 @@ + + INSERT INTO screen_project_grid_daily + ( + id, + customer_id, + date_id, + grid_id, + pid, + pids, + project_total, + resolved_num, + resolved_ratio, + evaluate_total, + good_total, + bad_total, + good_ratio, + bad_ratio, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + + #{customerId}, + + #{item.dateId}, + + #{item.gridId}, + + #{item.pid}, + + #{item.pids}, + + #{item.projectTotal}, + + #{item.resolvedNum}, + + #{item.resolvedRatio}, + + #{item.evaluateTotal}, + + #{item.goodTotal}, + + #{item.badTotal}, + + #{item.goodRatio}, + + #{item.badRatio}, + + '0', + + 0, + + #{createdBy}, + + now(), + + #{createdBy}, + + now() + ) + + + + + + delete from screen_project_grid_daily + where customer_id = #{customerId} + and date_id = #{dateId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml index e7ec55db6b..24ff1c1445 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml @@ -27,5 +27,84 @@ + + INSERT INTO screen_project_org_daily + ( + id, + customer_id, + date_id, + org_id, + org_type, + pid, + pids, + project_total, + resolved_num, + resolved_ratio, + evaluate_total, + good_total, + bad_total, + good_ratio, + bad_ratio, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + + #{customerId}, + + #{item.dateId}, + + #{item.orgId}, + + #{item.orgType}, + + #{item.pid}, + + #{item.pids}, + + #{item.projectTotal}, + + #{item.resolvedNum}, + + #{item.resolvedRatio}, + + #{item.evaluateTotal}, + + #{item.goodTotal}, + + #{item.badTotal}, + + #{item.goodRatio}, + + #{item.badRatio}, + + '0', + + 0, + + #{createdBy}, + + now(), + + #{createdBy}, + + now() + ) + + + + + + delete from screen_project_org_daily + where customer_id = #{customerId} + and date_id = #{dateId} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml index 424f17d977..de3a392748 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml @@ -23,5 +23,73 @@ + + INSERT INTO screen_project_quantity_grid_monthly + ( + id, + customer_id, + month_id, + grid_id, + pid, + pids, + project_incr, + project_total, + un_closed_total, + closed_total, + closed_incr, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + + #{customerId}, + + #{item.monthId}, + + #{item.gridId}, + + #{item.pid}, + + #{item.pids}, + + #{item.projectIncr}, + + #{item.projectTotal}, + + #{item.unClosedTotal}, + + #{item.closedTotal}, + + #{item.closedIncr}, + + '0', + + 0, + + #{createdBy}, + + now(), + + #{createdBy}, + + now() + ) + + + + + + delete from screen_project_quantity_grid_monthly + where customer_id = #{customerId} + and date_id = #{monthId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml index ac8995ea27..6fed8b4603 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml @@ -25,4 +25,75 @@ + + INSERT INTO screen_project_quantity_org_monthly + ( + id, + customer_id, + month_id, + org_id, + org_type, + pid, + pids, + project_incr, + project_total, + un_closed_total, + closed_total, + closed_incr, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + + #{customerId}, + + #{item.monthId}, + + #{item.orgId}, + + #{item.orgType}, + + #{item.pid}, + + #{item.pids}, + + #{item.projectIncr}, + + #{item.projectTotal}, + + #{item.unClosedTotal}, + + #{item.closedTotal}, + + #{item.closedIncr}, + + '0', + + 0, + + #{createdBy}, + + now(), + + #{createdBy}, + + now() + ) + + + + + + delete from screen_project_quantity_org_monthly + where customer_id = #{customerId} + and date_id = #{monthId} + + + \ No newline at end of file From 7d59b04fbc9fac3d3954c932887e1ac105aac546 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 28 Jan 2021 13:51:02 +0800 Subject: [PATCH 031/101] canshujiaoyan --- .../ScreenProjectDataCollController.java | 139 +++++++++++------- ...enProjectCategoryGridDailyServiceImpl.java | 5 +- ...eenProjectCategoryOrgDailyServiceImpl.java | 5 +- .../ScreenProjectGridDailyServiceImpl.java | 5 +- .../ScreenProjectOrgDailyServiceImpl.java | 5 +- ...ProjectQuantityGridMonthlyServiceImpl.java | 5 +- ...nProjectQuantityOrgMonthlyServiceImpl.java | 5 +- 7 files changed, 91 insertions(+), 78 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java index d1cb54fa7c..863af7e32c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -6,6 +6,7 @@ import com.epmet.dto.indexcollect.*; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.service.evaluationindex.indexcoll.*; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.RequestBody; @@ -24,65 +25,95 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("project") public class ScreenProjectDataCollController { - @Autowired - private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; - @Autowired - private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService; - @Autowired - private ScreenProjectGridDailyService projectGridDailyService; - @Autowired - private ScreenProjectOrgDailyService projectOrgDailyService; - @Autowired - private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService; - @Autowired - private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService; + @Autowired + private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; + @Autowired + private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService; + @Autowired + private ScreenProjectGridDailyService projectGridDailyService; + @Autowired + private ScreenProjectOrgDailyService projectOrgDailyService; + @Autowired + private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService; + @Autowired + private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService; - @RequestMapping("category-grid-daily") - public Result categoryGridDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ - if(null == param || CollectionUtils.isEmpty(param.getDataList())) - throw new ValidateException("传入数据不可为空"); - projectCategoryGridDailyService.collect(customerId,param); - return new Result(); - } + /** + * @author wangc + * @description 【事件/项目分析】按类别统计-网格 + **/ + @RequestMapping("category-grid-daily") + public Result categoryGridDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { + if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { + throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); + } + projectCategoryGridDailyService.collect(customerId, param); + return new Result(); + } - @RequestMapping("category-org-daily") - public Result categoryOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ - if(null == param || CollectionUtils.isEmpty(param.getDataList())) - throw new ValidateException("传入数据不可为空"); - projectCategoryOrgDailyService.collect(customerId,param); - return new Result(); - } + /** + * @author wangc + * @description 【事件/项目分析】按类别统计-组织 + **/ + @RequestMapping("category-org-daily") + public Result categoryOrgDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { + if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { + throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); + } + projectCategoryOrgDailyService.collect(customerId, param); + return new Result(); + } - @RequestMapping("quantity-grid-monthly") - public Result quantityGridMonthly(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ - if(null == param || CollectionUtils.isEmpty(param.getDataList())) - throw new ValidateException("传入数据不可为空"); - projectQuantityGridMonthlyService.collect(customerId,param); - return new Result(); - } + /** + * @author wangc + * @description 【事件/项目分析】网格内月度数量统计 + **/ + @RequestMapping("quantity-grid-monthly") + public Result quantityGridMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { + if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getMonthId())) { + throw new ValidateException("参数错误:dataList不能为空且monthId不能为空"); + } + projectQuantityGridMonthlyService.collect(customerId, param); + return new Result(); + } - @RequestMapping("quantity-org-monthly") - public Result quantityOrgMonthly(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ - if(null == param || CollectionUtils.isEmpty(param.getDataList())) - throw new ValidateException("传入数据不可为空"); - projectQuantityOrgMonthlyService.collect(customerId,param); - return new Result(); - } + /** + * @author wangc + * @description 【事件/项目分析】组织内月度数量统计 + **/ + @RequestMapping("quantity-org-monthly") + public Result quantityOrgMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { + if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getMonthId())) { + throw new ValidateException("参数错误:dataList不能为空且monthId不能为空"); + } + projectQuantityOrgMonthlyService.collect(customerId, param); + return new Result(); + } - @RequestMapping("project-grid-daily") - public Result projectGridDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ - if(null == param || CollectionUtils.isEmpty(param.getDataList())) - throw new ValidateException("传入数据不可为空"); - projectGridDailyService.collect(customerId,param); - return new Result(); - } + /** + * @author wangc + * @description 【事件/项目分析】网格内事件 + **/ + @RequestMapping("project-grid-daily") + public Result projectGridDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { + if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { + throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); + } + projectGridDailyService.collect(customerId, param); + return new Result(); + } - @RequestMapping("project-org-daily") - public Result projectOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO param){ - if(null == param || CollectionUtils.isEmpty(param.getDataList())) - throw new ValidateException("传入数据不可为空"); - projectOrgDailyService.collect(customerId,param); - return new Result(); - } + /** + * @author wangc + * @description 【事件/项目分析】组织内事件 + **/ + @RequestMapping("project-org-daily") + public Result projectOrgDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { + if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { + throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); + } + projectOrgDailyService.collect(customerId, param); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java index a9ec67e0aa..3e6f889ec4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -21,11 +21,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyDao; import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; @@ -113,7 +111,6 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl data) { - if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); if(data.getIsFirst()){ baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index 52ebd193aa..6202729df7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -21,11 +21,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyDao; import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; @@ -113,7 +111,6 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl data) { - if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); if(data.getIsFirst()){ baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java index 9eadef0999..d18ea97190 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java @@ -21,11 +21,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectGridDailyDao; import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; @@ -114,7 +112,6 @@ public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl data) { - if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); if(data.getIsFirst()){ baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java index 2d98768ec1..b3a9d69487 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java @@ -21,11 +21,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectOrgDailyDao; import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; @@ -115,7 +113,6 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl data) { - if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); if(data.getIsFirst()){ baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java index 4b797fa009..6ea7bddb5d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java @@ -21,11 +21,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyDao; import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; @@ -114,7 +112,6 @@ public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public void collect(String customerId, ScreenCollFormDTO data) { - if(StringUtils.isBlank(data.getMonthId())) data.setMonthId(DateUtils.getBeforeNMonth(NumConstant.ONE)); if(data.getIsFirst()){ baseDao.deleteByDateIdAndCustomerId(customerId,data.getMonthId()); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java index 8a05d8f543..1c6bf17104 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -21,11 +21,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyDao; import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; @@ -113,7 +111,6 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl< @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public void collect(String customerId, ScreenCollFormDTO data) { - if(StringUtils.isBlank(data.getMonthId())) data.setMonthId(DateUtils.getBeforeNMonth(NumConstant.ONE)); if(data.getIsFirst()){ baseDao.deleteByDateIdAndCustomerId(customerId,data.getMonthId()); } From 4add2977afe771cac862df52d430d3c59ca0e10b Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 28 Jan 2021 14:45:26 +0800 Subject: [PATCH 032/101] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=A7=BB=E5=8A=A8=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenProjectCategoryGridDailyDTO.java | 5 +++-- .../ScreenProjectCategoryOrgDailyDTO.java | 5 +++-- .../ScreenProjectGridDailyDTO.java | 6 +++--- .../ScreenProjectOrgDailyDTO.java | 6 +++--- .../ScreenProjectQuantityGridMonthlyDTO.java | 5 +++-- .../ScreenProjectQuantityOrgMonthlyDTO.java | 5 +++-- .../ScreenProjectDataCollController.java | 4 ++-- .../ScreenProjectCategoryGridDailyDao.java | 10 +++++----- .../ScreenProjectCategoryOrgDailyDao.java | 10 +++++----- .../ScreenProjectGridDailyDao.java | 10 +++++----- .../ScreenProjectOrgDailyDao.java | 10 +++++----- .../ScreenProjectQuantityGridMonthlyDao.java | 10 +++++----- .../ScreenProjectQuantityOrgMonthlyDao.java | 10 +++++----- .../ScreenProjectCategoryGridDailyEntity.java | 5 +---- .../ScreenProjectCategoryOrgDailyEntity.java | 5 +---- .../ScreenProjectGridDailyEntity.java | 4 +--- .../ScreenProjectOrgDailyEntity.java | 4 +--- .../ScreenProjectQuantityGridMonthlyEntity.java | 5 +---- .../ScreenProjectQuantityOrgMonthlyEntity.java | 5 +---- .../ScreenProjectCategoryGridDailyService.java | 6 +++--- .../ScreenProjectCategoryOrgDailyService.java | 6 +++--- .../ScreenProjectGridDailyService.java | 7 +++---- .../ScreenProjectOrgDailyService.java | 6 +++--- ...ScreenProjectQuantityGridMonthlyService.java | 6 +++--- .../ScreenProjectQuantityOrgMonthlyService.java | 6 +++--- ...reenProjectCategoryGridDailyServiceImpl.java | 17 ++++++++++------- ...creenProjectCategoryOrgDailyServiceImpl.java | 17 ++++++++++------- .../impl/ScreenProjectGridDailyServiceImpl.java | 17 ++++++++++------- .../impl/ScreenProjectOrgDailyServiceImpl.java | 17 ++++++++++------- ...enProjectQuantityGridMonthlyServiceImpl.java | 17 ++++++++++------- ...eenProjectQuantityOrgMonthlyServiceImpl.java | 17 ++++++++++------- .../ScreenProjectCategoryGridDailyDao.xml | 7 ++++--- .../ScreenProjectCategoryOrgDailyDao.xml | 7 ++++--- .../ScreenProjectGridDailyDao.xml | 7 ++++--- .../ScreenProjectOrgDailyDao.xml | 7 ++++--- .../ScreenProjectQuantityGridMonthlyDao.xml | 9 +++++---- .../ScreenProjectQuantityOrgMonthlyDao.xml | 9 +++++---- 37 files changed, 160 insertions(+), 149 deletions(-) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/{indexcollect => screen}/ScreenProjectCategoryGridDailyDTO.java (98%) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/{indexcollect => screen}/ScreenProjectCategoryOrgDailyDTO.java (98%) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/{indexcollect => screen}/ScreenProjectGridDailyDTO.java (98%) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/{indexcollect => screen}/ScreenProjectOrgDailyDTO.java (98%) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/{indexcollect => screen}/ScreenProjectQuantityGridMonthlyDTO.java (98%) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/{indexcollect => screen}/ScreenProjectQuantityOrgMonthlyDTO.java (98%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/{indexcoll => screen}/ScreenProjectCategoryGridDailyDao.java (73%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/{indexcoll => screen}/ScreenProjectCategoryOrgDailyDao.java (73%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/{indexcoll => screen}/ScreenProjectGridDailyDao.java (74%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/{indexcoll => screen}/ScreenProjectOrgDailyDao.java (74%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/{indexcoll => screen}/ScreenProjectQuantityGridMonthlyDao.java (76%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/{indexcoll => screen}/ScreenProjectQuantityOrgMonthlyDao.java (76%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/{indexcoll => screen}/ScreenProjectCategoryGridDailyEntity.java (96%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/{indexcoll => screen}/ScreenProjectCategoryOrgDailyEntity.java (96%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/{indexcoll => screen}/ScreenProjectGridDailyEntity.java (97%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/{indexcoll => screen}/ScreenProjectOrgDailyEntity.java (97%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/{indexcoll => screen}/ScreenProjectQuantityGridMonthlyEntity.java (96%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/{indexcoll => screen}/ScreenProjectQuantityOrgMonthlyEntity.java (96%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/ScreenProjectCategoryGridDailyService.java (92%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/ScreenProjectCategoryOrgDailyService.java (92%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/ScreenProjectGridDailyService.java (92%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/ScreenProjectOrgDailyService.java (93%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/ScreenProjectQuantityGridMonthlyService.java (92%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/ScreenProjectQuantityOrgMonthlyService.java (92%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/impl/ScreenProjectCategoryGridDailyServiceImpl.java (87%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/impl/ScreenProjectCategoryOrgDailyServiceImpl.java (87%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/impl/ScreenProjectGridDailyServiceImpl.java (87%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/impl/ScreenProjectOrgDailyServiceImpl.java (87%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java (87%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/{indexcoll => screen}/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java (87%) rename epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/{indexcoll => screen}/ScreenProjectCategoryGridDailyDao.xml (90%) rename epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/{indexcoll => screen}/ScreenProjectCategoryOrgDailyDao.xml (90%) rename epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/{indexcoll => screen}/ScreenProjectGridDailyDao.xml (91%) rename epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/{indexcoll => screen}/ScreenProjectOrgDailyDao.xml (91%) rename epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/{indexcoll => screen}/ScreenProjectQuantityGridMonthlyDao.xml (87%) rename epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/{indexcoll => screen}/ScreenProjectQuantityOrgMonthlyDao.xml (88%) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryGridDailyDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java index 4e031a17ba..3124044699 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryGridDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java @@ -15,11 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.dto.indexcollect; +package com.epmet.dto.screen; + +import lombok.Data; import java.io.Serializable; import java.util.Date; -import lombok.Data; /** diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryOrgDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryOrgDailyDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java index c046d257b0..1cd31dd6cf 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectCategoryOrgDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java @@ -15,11 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.dto.indexcollect; +package com.epmet.dto.screen; + +import lombok.Data; import java.io.Serializable; import java.util.Date; -import lombok.Data; /** diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectGridDailyDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java index 52c21d9de8..3d5b49c2b6 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectGridDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dto.indexcollect; +package com.epmet.dto.screen; -import java.io.Serializable; -import java.util.Date; import lombok.Data; +import java.io.Serializable; import java.math.BigDecimal; +import java.util.Date; /** * 项目(事件)分析按网格_按天统计 diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectOrgDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectOrgDailyDTO.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectOrgDailyDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectOrgDailyDTO.java index 690a63f263..c7b3b6f426 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectOrgDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectOrgDailyDTO.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dto.indexcollect; +package com.epmet.dto.screen; -import java.io.Serializable; -import java.util.Date; import lombok.Data; +import java.io.Serializable; import java.math.BigDecimal; +import java.util.Date; /** * 项目(事件)分析按组织_按天统计 diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityGridMonthlyDTO.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityGridMonthlyDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityGridMonthlyDTO.java index ab5100a9c6..26c6fff15d 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityGridMonthlyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityGridMonthlyDTO.java @@ -15,11 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.dto.indexcollect; +package com.epmet.dto.screen; + +import lombok.Data; import java.io.Serializable; import java.util.Date; -import lombok.Data; /** diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityOrgMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityOrgMonthlyDTO.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityOrgMonthlyDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityOrgMonthlyDTO.java index f816e9d9d3..a389215556 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/ScreenProjectQuantityOrgMonthlyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityOrgMonthlyDTO.java @@ -15,11 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.dto.indexcollect; +package com.epmet.dto.screen; + +import lombok.Data; import java.io.Serializable; import java.util.Date; -import lombok.Data; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java index 863af7e32c..3d0754ac8f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -2,9 +2,9 @@ package com.epmet.controller; import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.indexcollect.*; +import com.epmet.dto.screen.*; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.service.evaluationindex.indexcoll.*; +import com.epmet.service.evaluationindex.screen.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java index 9baea20ee5..b17de4183e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.evaluationindex.indexcoll; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity; +import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -34,7 +34,7 @@ import java.util.List; @Mapper public interface ScreenProjectCategoryGridDailyDao extends BaseDao { - void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("createdBy") String createdBy, @Param("timeId") String timeId); - void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); + int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java index e512e52e8d..64be263089 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.evaluationindex.indexcoll; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity; +import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -34,8 +34,8 @@ import java.util.List; @Mapper public interface ScreenProjectCategoryOrgDailyDao extends BaseDao { - void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("createdBy") String createdBy, @Param("timeId") String timeId); - void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); + int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java similarity index 74% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java index abc056a6a7..12c7c1a527 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.evaluationindex.indexcoll; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity; +import com.epmet.dto.screen.ScreenProjectGridDailyDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectGridDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,9 +35,9 @@ import java.util.List; public interface ScreenProjectGridDailyDao extends BaseDao { - void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("createdBy") String createdBy, @Param("timeId") String timeId); - void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); + int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java similarity index 74% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java index 4b073ba4dd..595c9d56c6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.evaluationindex.indexcoll; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity; +import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectOrgDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,9 +35,9 @@ import java.util.List; public interface ScreenProjectOrgDailyDao extends BaseDao { - void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("createdBy") String createdBy, @Param("timeId") String timeId); - void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); + int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java similarity index 76% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java index d986014dce..13b8c56630 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.evaluationindex.indexcoll; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity; +import com.epmet.dto.screen.ScreenProjectQuantityGridMonthlyDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -34,8 +34,8 @@ import java.util.List; @Mapper public interface ScreenProjectQuantityGridMonthlyDao extends BaseDao { - void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("createdBy") String createdBy, @Param("timeId") String timeId); - void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); + int deleteByMonthIdAndCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java similarity index 76% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java index 7cd0cb74d7..218782d6d9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.evaluationindex.indexcoll; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity; +import com.epmet.dto.screen.ScreenProjectQuantityOrgMonthlyDTO; +import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,9 +35,9 @@ import java.util.List; public interface ScreenProjectQuantityOrgMonthlyDao extends BaseDao { - void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("createdBy")String createdBy); + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("createdBy") String createdBy, @Param("timeId") String timeId); - void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); + int deleteByMonthIdAndCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java index ec9a069243..e26954c05e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.evaluationindex.indexcoll; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 项目(事件)分类按网格_按天统计 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java index e08ec7a399..5137fc648c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.evaluationindex.indexcoll; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 项目(事件)分类按组织_按天统计 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectGridDailyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectGridDailyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectGridDailyEntity.java index 264f74517c..485e9e9d41 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectGridDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectGridDailyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.evaluationindex.indexcoll; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 项目(事件)分析按网格_按天统计 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectOrgDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectOrgDailyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectOrgDailyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectOrgDailyEntity.java index 4c86636ccc..59dada8436 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectOrgDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectOrgDailyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.evaluationindex.indexcoll; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 项目(事件)分析按组织_按天统计 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectQuantityGridMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectQuantityGridMonthlyEntity.java index 9b3badaf19..03e3183037 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectQuantityGridMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.evaluationindex.indexcoll; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 项目(事件)数量分析按网格_按月统计 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyEntity.java index dce4964d5f..4d798ad314 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.evaluationindex.indexcoll; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 项目(事件)数量分析按组织_按月统计 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java index c5d2eb30ef..973386dac7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll; +package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; +import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; import java.util.List; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java index 4dd2d5c715..2852987904 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll; +package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; +import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; import java.util.List; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java index 51260645aa..e58e45fb56 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java @@ -15,14 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll; +package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; +import com.epmet.dto.screen.ScreenProjectGridDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity; -import javafx.stage.Screen; +import com.epmet.entity.evaluationindex.screen.ScreenProjectGridDailyEntity; import java.util.List; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java index 4c51761e0d..7deb14919f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll; +package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; +import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenProjectOrgDailyEntity; import java.util.List; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java index 81ba806027..95b6679707 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll; +package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; +import com.epmet.dto.screen.ScreenProjectQuantityGridMonthlyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityGridMonthlyEntity; import java.util.List; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java index d8e62061d7..a964f77411 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll; +package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; +import com.epmet.dto.screen.ScreenProjectQuantityOrgMonthlyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyEntity; import java.util.List; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java index 3e6f889ec4..7d709e2229 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll.impl; +package com.epmet.service.evaluationindex.screen.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -25,11 +25,11 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyDao; -import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO; +import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryGridDailyDao; +import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity; -import com.epmet.service.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyService; +import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryGridDailyService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -112,9 +112,12 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl data) { if(data.getIsFirst()){ - baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + while(affectedRows > 0){ + affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + } } - baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getDateId()); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index 6202729df7..e2c4081477 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll.impl; +package com.epmet.service.evaluationindex.screen.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -25,11 +25,11 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyDao; -import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO; +import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryOrgDailyDao; +import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity; -import com.epmet.service.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyService; +import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryOrgDailyService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -112,9 +112,12 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl data) { if(data.getIsFirst()){ - baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + while(affectedRows > 0){ + affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + } } - baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getDateId()); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java index d18ea97190..7fc206dc3e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll.impl; +package com.epmet.service.evaluationindex.screen.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -25,11 +25,11 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectGridDailyDao; -import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO; +import com.epmet.dao.evaluationindex.screen.ScreenProjectGridDailyDao; +import com.epmet.dto.screen.ScreenProjectGridDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity; -import com.epmet.service.evaluationindex.indexcoll.ScreenProjectGridDailyService; +import com.epmet.entity.evaluationindex.screen.ScreenProjectGridDailyEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectGridDailyService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -113,9 +113,12 @@ public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl data) { if(data.getIsFirst()){ - baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + while(affectedRows > 0){ + affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + } } - baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getDateId()); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java index b3a9d69487..5795e7a74d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll.impl; +package com.epmet.service.evaluationindex.screen.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -25,11 +25,11 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectOrgDailyDao; -import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO; +import com.epmet.dao.evaluationindex.screen.ScreenProjectOrgDailyDao; +import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity; -import com.epmet.service.evaluationindex.indexcoll.ScreenProjectOrgDailyService; +import com.epmet.entity.evaluationindex.screen.ScreenProjectOrgDailyEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectOrgDailyService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -114,9 +114,12 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl data) { if(data.getIsFirst()){ - baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + while(affectedRows > 0){ + affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + } } - baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getDateId()); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java index 6ea7bddb5d..0977e2d627 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll.impl; +package com.epmet.service.evaluationindex.screen.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -25,11 +25,11 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyDao; -import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO; +import com.epmet.dao.evaluationindex.screen.ScreenProjectQuantityGridMonthlyDao; +import com.epmet.dto.screen.ScreenProjectQuantityGridMonthlyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity; -import com.epmet.service.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyService; +import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityGridMonthlyEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -113,9 +113,12 @@ public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl @Override public void collect(String customerId, ScreenCollFormDTO data) { if(data.getIsFirst()){ - baseDao.deleteByDateIdAndCustomerId(customerId,data.getMonthId()); + int affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); + while(affectedRows > 0){ + affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); + } } - baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getMonthId()); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java index 1c6bf17104..0629ada2b1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.service.evaluationindex.indexcoll.impl; +package com.epmet.service.evaluationindex.screen.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -25,11 +25,11 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyDao; -import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO; +import com.epmet.dao.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyDao; +import com.epmet.dto.screen.ScreenProjectQuantityOrgMonthlyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity; -import com.epmet.service.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyService; +import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -112,9 +112,12 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl< @Override public void collect(String customerId, ScreenCollFormDTO data) { if(data.getIsFirst()){ - baseDao.deleteByDateIdAndCustomerId(customerId,data.getMonthId()); + int affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); + while(affectedRows > 0){ + affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); + } } - baseDao.insertBatch(data.getDataList(),customerId,"APP_USER"); + baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getMonthId()); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml index 8737b35d75..a70745bcd7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml @@ -1,9 +1,9 @@ - + - + @@ -52,7 +52,7 @@ #{customerId}, - #{item.dateId}, + #{timeId}, #{item.gridId}, @@ -94,6 +94,7 @@ delete from screen_project_category_grid_daily where customer_id = #{customerId} and date_id = #{dateId} + limit 1000 \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml index 1d035693d8..37d15f1eb0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml @@ -1,9 +1,9 @@ - + - + @@ -54,7 +54,7 @@ #{customerId}, - #{item.dateId}, + #{timeId}, #{item.orgId}, @@ -98,6 +98,7 @@ delete from screen_project_category_org_daily where customer_id = #{customerId} and date_id = #{dateId} + limit 1000 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectGridDailyDao.xml similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectGridDailyDao.xml index c3b4d7ed82..09b2b2f470 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectGridDailyDao.xml @@ -1,9 +1,9 @@ - + - + @@ -56,7 +56,7 @@ #{customerId}, - #{item.dateId}, + #{timeId}, #{item.gridId}, @@ -100,6 +100,7 @@ delete from screen_project_grid_daily where customer_id = #{customerId} and date_id = #{dateId} + limit 1000 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectOrgDailyDao.xml similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectOrgDailyDao.xml index 24ff1c1445..1bf92d587b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectOrgDailyDao.xml @@ -1,9 +1,9 @@ - + - + @@ -58,7 +58,7 @@ #{customerId}, - #{item.dateId}, + #{timeId}, #{item.orgId}, @@ -104,6 +104,7 @@ delete from screen_project_org_daily where customer_id = #{customerId} and date_id = #{dateId} + limit 1000 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.xml similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.xml index de3a392748..d2562ca76b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.xml @@ -1,9 +1,9 @@ - + - + @@ -50,7 +50,7 @@ #{customerId}, - #{item.monthId}, + #{timeId}, #{item.gridId}, @@ -84,10 +84,11 @@ - + delete from screen_project_quantity_grid_monthly where customer_id = #{customerId} and date_id = #{monthId} + limit 1000 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml similarity index 88% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml index 6fed8b4603..ee8245e68f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml @@ -1,9 +1,9 @@ - + - + @@ -53,7 +53,7 @@ #{customerId}, - #{item.monthId}, + #{timeId}, #{item.orgId}, @@ -89,10 +89,11 @@ - + delete from screen_project_quantity_org_monthly where customer_id = #{customerId} and date_id = #{monthId} + limit 1000 From 81a7863b5b308fa88c1df773f989548d2e6b1ea9 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 28 Jan 2021 15:14:45 +0800 Subject: [PATCH 033/101] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenProjectCategoryGridDailyDao.xml | 2 -- .../evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml | 2 -- .../screen/ScreenProjectQuantityGridMonthlyDao.xml | 2 +- .../screen/ScreenProjectQuantityOrgMonthlyDao.xml | 2 +- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml index a70745bcd7..307d11d50d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml @@ -70,8 +70,6 @@ #{item.unResolvedTotal}, - #{item.regIncr}, - #{item.resolvedTotal}, '0', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml index 37d15f1eb0..512e0c6e66 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml @@ -74,8 +74,6 @@ #{item.unResolvedTotal}, - #{item.regIncr}, - #{item.resolvedTotal}, '0', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.xml index d2562ca76b..00be9d5443 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.xml @@ -87,7 +87,7 @@ delete from screen_project_quantity_grid_monthly where customer_id = #{customerId} - and date_id = #{monthId} + and month_id = #{monthId} limit 1000 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml index ee8245e68f..1048cacf7b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml @@ -92,7 +92,7 @@ delete from screen_project_quantity_org_monthly where customer_id = #{customerId} - and date_id = #{monthId} + and month_id = #{monthId} limit 1000 From 74603393817a27fefd0a1fe1e9fd693be55c507b Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 29 Jan 2021 09:23:22 +0800 Subject: [PATCH 034/101] =?UTF-8?q?=E7=A7=AF=E5=88=86=E6=8E=92=E8=A1=8C?= =?UTF-8?q?=E6=A6=9C=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/UserPointTotalServiceImpl.java | 3 +-- .../main/resources/mapper/UserPointStatisticalDailyDao.xml | 7 ++++++- .../src/main/resources/mapper/UserPointTotalDao.xml | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java index 6bace14ee9..b4404dab1f 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java @@ -158,7 +158,7 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl rankList = @@ -199,7 +199,6 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl userIds = rankList.stream().map(ResiPointRankResultDTO::getUserId).collect(Collectors.toList()); diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml index 983301e016..d49ca80396 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml @@ -25,6 +25,8 @@ diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml index e64d984a00..bcf4735cb8 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml @@ -48,6 +48,9 @@ From 3d4ad49b296b2fe3a12a75c13f272d6df74bc16f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 1 Feb 2021 10:30:18 +0800 Subject: [PATCH 035/101] screenProjectGridDaily screenProjectQuantityGrid --- .../com/epmet/constant/PingYinConstants.java | 18 +++ .../pingyin/result/ClosedIncrResultDTO.java | 19 +++ .../result/EvaluateTotalResultDTO.java | 20 +++ .../pingyin/result/ProjectIncrResultDTO.java | 19 +++ .../pingyin/result/ProjectTotalResultDTO.java | 18 +++ .../pingyin/result/ResolvedNumResultDTO.java | 18 +++ .../result/UnClosedTotalResultDTO.java | 19 +++ .../dto/screen/ScreenProjectGridDailyDTO.java | 15 ++ .../ScreenProjectQuantityGridMonthlyDTO.java | 12 ++ .../com/epmet/controller/DemoController.java | 20 +++ .../FactOriginProjectMainDailyDao.java | 56 +++++++ .../screen/ScreenCustomerGridDao.java | 9 ++ .../screen/ScreenProjectGridDailyDao.java | 8 +- .../FactOriginProjectMainDailyService.java | 56 +++++++ ...FactOriginProjectMainDailyServiceImpl.java | 99 ++++++++++++ .../screen/ScreenProjectGridDailyService.java | 8 + ...reenProjectQuantityGridMonthlyService.java | 9 ++ .../ScreenProjectGridDailyServiceImpl.java | 148 ++++++++++++++++++ ...ProjectQuantityGridMonthlyServiceImpl.java | 124 +++++++++++++++ .../extract/FactOriginProjectMainDailyDao.xml | 94 +++++++++++ .../screen/ScreenCustomerGridDao.xml | 16 ++ .../screen/ScreenProjectGridDailyDao.xml | 49 ++++++ 22 files changed, 853 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ClosedIncrResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/EvaluateTotalResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectIncrResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectTotalResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ResolvedNumResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/UnClosedTotalResultDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java new file mode 100644 index 0000000000..95b61d3af8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java @@ -0,0 +1,18 @@ +package com.epmet.constant; + +/** + * @Author zxc + * @DateTime 2021/1/28 下午3:20 + */ +public interface PingYinConstants { + + String GRID_INFO_IS_ZERO = "客户【%s】下的网格信息为空......"; + + String EVALUATE_BAD = "bad"; + String EVALUATE_GOOD = "good"; + String EVALUATE_PERFECT = "perfect"; + + String UN_CLOSED = "unClosed"; + String CLOSED = "closed"; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ClosedIncrResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ClosedIncrResultDTO.java new file mode 100644 index 0000000000..d1f9083b30 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ClosedIncrResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.pingyin.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/2/1 上午9:22 + */ +@Data +public class ClosedIncrResultDTO implements Serializable { + + private static final long serialVersionUID = 4907953818631953766L; + + private String gridId; + + private Integer closedIncr; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/EvaluateTotalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/EvaluateTotalResultDTO.java new file mode 100644 index 0000000000..3eb30a3887 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/EvaluateTotalResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.pingyin.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/1/29 上午9:08 + */ +@Data +public class EvaluateTotalResultDTO implements Serializable { + + private static final long serialVersionUID = -4734985200452228738L; + + private String orgId; + + private Integer evaluateCount = NumConstant.ZERO; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectIncrResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectIncrResultDTO.java new file mode 100644 index 0000000000..6200eb8add --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectIncrResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.pingyin.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/1/29 下午2:28 + */ +@Data +public class ProjectIncrResultDTO implements Serializable { + + private static final long serialVersionUID = -1452144390062903633L; + + private String gridId; + + private Integer projectIncr; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectTotalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectTotalResultDTO.java new file mode 100644 index 0000000000..a356c0ccdb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectTotalResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.pingyin.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/1/28 下午3:15 + */ +@Data +public class ProjectTotalResultDTO implements Serializable { + + private static final long serialVersionUID = 6071988402600005617L; + + private String gridId; + private Integer projectTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ResolvedNumResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ResolvedNumResultDTO.java new file mode 100644 index 0000000000..6710de4469 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ResolvedNumResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.pingyin.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/1/28 下午3:15 + */ +@Data +public class ResolvedNumResultDTO implements Serializable { + + private static final long serialVersionUID = 607198840261205617L; + + private String gridId; + private Integer resolvedNum; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/UnClosedTotalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/UnClosedTotalResultDTO.java new file mode 100644 index 0000000000..d31e85ec28 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/UnClosedTotalResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.pingyin.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/1/29 下午2:59 + */ +@Data +public class UnClosedTotalResultDTO implements Serializable { + + private static final long serialVersionUID = -722723608888414454L; + + private String gridId; + + private Integer projectCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java index 3d5b49c2b6..c1f5f2ed12 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.screen; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -134,4 +135,18 @@ public class ScreenProjectGridDailyDTO implements Serializable { */ private Date updatedTime; + public ScreenProjectGridDailyDTO() { + this.projectTotal = NumConstant.ZERO; + this.resolvedNum = NumConstant.ZERO; + this.resolvedRatio = NumConstant.ZERO_DECIMAL; + this.evaluateTotal = NumConstant.ZERO; + this.goodTotal = NumConstant.ZERO; + this.badTotal = NumConstant.ZERO; + this.goodRatio = NumConstant.ZERO_DECIMAL; + this.badRatio = NumConstant.ZERO_DECIMAL; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + this.delFlag = NumConstant.ZERO_STR; + this.revision = NumConstant.ZERO; + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityGridMonthlyDTO.java index 26c6fff15d..b735ed6e27 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityGridMonthlyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityGridMonthlyDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.screen; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -119,4 +120,15 @@ public class ScreenProjectQuantityGridMonthlyDTO implements Serializable { */ private Date updatedTime; + public ScreenProjectQuantityGridMonthlyDTO() { + this.projectIncr = NumConstant.ZERO; + this.projectTotal = NumConstant.ZERO; + this.unClosedTotal = NumConstant.ZERO; + this.closedTotal = NumConstant.ZERO; + this.closedIncr = NumConstant.ZERO; + this.delFlag = NumConstant.ZERO_STR; + this.revision = NumConstant.ZERO; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 9b700fb365..3dc014ae20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -36,6 +36,8 @@ import com.epmet.service.evaluationindex.extract.dataToIndex.*; import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.indexcal.*; +import com.epmet.service.evaluationindex.screen.ScreenProjectGridDailyService; +import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimCustomerPartymemberService; import lombok.extern.slf4j.Slf4j; @@ -743,4 +745,22 @@ public class DemoController { log.info("影响行数="+updateNum); return new Result(); } + + @Autowired + private ScreenProjectGridDailyService screenProjectGridDailyService; + + @Autowired + private ScreenProjectQuantityGridMonthlyService screenProjectQuantityGridMonthlyService; + + @PostMapping("screenProjectGridDaily") + public Result screenProjectGridDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId){ + screenProjectGridDailyService.extractionProjectGridDaily(customerId,dateId); + return new Result(); + } + + @PostMapping("screenProjectQuantityGrid") + public Result screenProjectQuantityGrid(@RequestParam("customerId")String customerId,@RequestParam("monthId")String monthId){ + screenProjectQuantityGridMonthlyService.extractionProjectGridMonthly(customerId,monthId); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java index ebbbe5e84b..12b747d206 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java @@ -23,6 +23,7 @@ import com.epmet.dto.extract.result.GridProjectClosedTotalResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.extract.result.TransferRightRatioResultDTO; import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; +import com.epmet.dto.pingyin.result.*; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; @@ -217,4 +218,59 @@ public interface FactOriginProjectMainDailyDao extends BaseDao getOrgProjectCount(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("level") String level); + + /** + * @Description 查询项目总数 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/1/28 下午4:01 + */ + List selectProjectTotal(@Param("customerId")String customerId, @Param("dateId")String dateId, @Param("monthId")String monthId); + + /** + * @Description 查询已解决项目数 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/1/28 下午4:15 + */ + List selectResolvedNum(@Param("customerId")String customerId, @Param("dateId")String dateId); + + /** + * @Description 查询 满意度评价次数 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/1/29 上午9:10 + */ + List selectEvaluateCount(@Param("customerId")String customerId, @Param("dateId")String dateId, @Param("activeCodes") List activeCodes); + + /** + * @Description 查询本月新增项目数 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/1/29 下午2:31 + */ + List selectProjectIncr(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 根据状态查询项目数 + * @Param customerId + * @Param monthId + * @Param status + * @author zxc + * @date 2021/1/29 下午3:25 + */ + List selectProjectCount(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("status") String status); + + /** + * @Description 本月新增结案项目数 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/2/1 上午9:25 + */ + List selectClosedIncr(@Param("customerId")String customerId, @Param("monthId")String monthId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index f6d064a62b..c06e189d7c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -23,6 +23,7 @@ import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.dto.extract.result.OrgNameResultDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; +import com.epmet.dto.screen.ScreenProjectGridDailyDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; @@ -185,4 +186,12 @@ public interface ScreenCustomerGridDao extends BaseDao * @date 2020/9/18 10:47 上午 */ List selectAllGridInfo(@Param("customerId") String customerId); + + /** + * @Description 查询客户下的网格信息 + * @Param customerId + * @author zxc + * @date 2021/1/28 下午3:18 + */ + List selectGridInfoByCustomerId(@Param("customerId") String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java index 12c7c1a527..f9cbac7ffe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java @@ -39,5 +39,11 @@ public interface ScreenProjectGridDailyDao extends BaseDao list); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java index 8b7e1ae06c..3cb5f6e0e7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java @@ -24,6 +24,7 @@ import com.epmet.dto.extract.result.GridProjectClosedTotalResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.extract.result.TransferRightRatioResultDTO; import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; +import com.epmet.dto.pingyin.result.*; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; @@ -263,4 +264,59 @@ public interface FactOriginProjectMainDailyService extends BaseService getNewProject(String customerId, List list); + + /** + * @Description 查询项目总数 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/1/28 下午3:59 + */ + List selectProjectTotal(String customerId,String dateId,String monthId); + + /** + * @Description 查询已解决项目数 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/1/28 下午4:15 + */ + List selectResolvedNum(String customerId, String dateId); + + /** + * @Description 查询 满意度评价次数 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/1/29 上午9:10 + */ + List selectEvaluateCount(String customerId, String dateId,List activeCodes); + + /** + * @Description 查询本月新增项目数 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/1/29 下午2:29 + */ + List selectProjectIncr(String customerId, String monthId); + + /** + * @Description 根据状态查询项目数 + * @Param customerId + * @Param monthId + * @Param status + * @author zxc + * @date 2021/1/29 下午3:25 + */ + List selectProjectCount(String customerId, String monthId, String status); + + /** + * @Description 本月新增结案项目数 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/2/1 上午9:24 + */ + List selectClosedIncr(String customerId, String monthId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index bdc82b519d..a5dcc11955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -32,6 +32,7 @@ import com.epmet.dto.extract.result.GridProjectClosedTotalResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.extract.result.TransferRightRatioResultDTO; import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; +import com.epmet.dto.pingyin.result.*; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; @@ -41,6 +42,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -259,4 +261,101 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl getNewProject(String customerId, List list) { return baseDao.selectNewProject(customerId,list); } + + /** + * @Description 查询项目总数 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/1/28 下午3:59 + */ + @Override + public List selectProjectTotal(String customerId, String dateId,String monthId) { + if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)){ + List projectTotalResultDTOS = baseDao.selectProjectTotal(customerId, dateId, monthId); + return projectTotalResultDTOS; + } + return new ArrayList<>(); + } + + /** + * @Description 查询已解决项目数 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/1/28 下午4:15 + */ + @Override + public List selectResolvedNum(String customerId, String dateId) { + if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)){ + List resolvedNumResultDTOS = baseDao.selectResolvedNum(customerId, dateId); + return resolvedNumResultDTOS; + } + return new ArrayList<>(); + } + + /** + * @Description 查询 满意度评价次数 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/1/29 上午9:10 + */ + @Override + public List selectEvaluateCount(String customerId, String dateId, List activeCodes) { + if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId) && !CollectionUtils.isEmpty(activeCodes)){ + List evaluateTotalResultDTOS = baseDao.selectEvaluateCount(customerId, dateId, activeCodes); + return evaluateTotalResultDTOS; + } + return new ArrayList<>(); + } + + /** + * @Description 查询本月新增项目数 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/1/29 下午2:29 + */ + @Override + public List selectProjectIncr(String customerId, String monthId) { + if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(monthId)){ + List projectIncrResultDTOS = baseDao.selectProjectIncr(customerId, monthId); + return projectIncrResultDTOS; + } + return new ArrayList<>(); + } + + /** + * @Description 根据状态查询项目数 + * @Param customerId + * @Param monthId + * @Param status + * @author zxc + * @date 2021/1/29 下午3:25 + */ + @Override + public List selectProjectCount(String customerId, String monthId, String status) { + if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(monthId)){ + List resultDTOS = baseDao.selectProjectCount(customerId, monthId, status); + return resultDTOS; + } + return new ArrayList<>(); + } + + /** + * @Description 本月新增结案项目数 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/2/1 上午9:24 + */ + @Override + public List selectClosedIncr(String customerId, String monthId) { + if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(monthId)){ + List result = baseDao.selectClosedIncr(customerId, monthId); + return result; + } + return new ArrayList<>(); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java index e58e45fb56..2b710cefb3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java @@ -103,4 +103,12 @@ public interface ScreenProjectGridDailyService extends BaseService data); + + /** + * @Description 数据抽取【网格-日】 + * @Param + * @author zxc + * @date 2021/1/28 下午3:05 + */ + void extractionProjectGridDaily(String customerId,String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java index 95b6679707..6d5e5b909d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java @@ -102,4 +102,13 @@ public interface ScreenProjectQuantityGridMonthlyService extends BaseService data); + + /** + * @Description 数据抽取 【网格-月】 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/1/29 下午1:57 + */ + void extractionProjectGridMonthly(String customerId,String monthId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java index 7fc206dc3e..64c3c2ef8a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java @@ -22,18 +22,31 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.PingYinConstants; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dao.evaluationindex.screen.ScreenProjectGridDailyDao; +import com.epmet.dto.pingyin.result.EvaluateTotalResultDTO; +import com.epmet.dto.pingyin.result.ProjectTotalResultDTO; +import com.epmet.dto.pingyin.result.ResolvedNumResultDTO; import com.epmet.dto.screen.ScreenProjectGridDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectGridDailyEntity; +import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import com.epmet.service.evaluationindex.screen.ScreenProjectGridDailyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -45,8 +58,15 @@ import java.util.Map; * @since v1.0.0 2021-01-27 */ @Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl implements ScreenProjectGridDailyService { + @Autowired + private ScreenCustomerGridDao gridDao; + + @Autowired + private FactOriginProjectMainDailyService projectMainDailyService; @Override public PageData page(Map params) { @@ -121,4 +141,132 @@ public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl gridInfos = gridDao.selectGridInfoByCustomerId(customerId); + if (CollectionUtils.isEmpty(gridInfos)){ + throw new RenException(String.format(PingYinConstants.GRID_INFO_IS_ZERO,customerId)); + } + // 查询 项目总数 + List projectTotal = projectMainDailyService.selectProjectTotal(customerId, dateId, null); + // 查询 项目解决数 + List resolvedNum = projectMainDailyService.selectResolvedNum(customerId, dateId); + //查询 参与满意度评价的总次数 + String[] activeCodesAll = {PingYinConstants.EVALUATE_BAD,PingYinConstants.EVALUATE_GOOD,PingYinConstants.EVALUATE_PERFECT}; + List evaluateTotal = projectMainDailyService.selectEvaluateCount(customerId, dateId, getActiveCode(activeCodesAll)); + //查询 满意+非常满意的总次数 + String[] activeCodesGood = {PingYinConstants.EVALUATE_GOOD,PingYinConstants.EVALUATE_PERFECT}; + List evaluateGood = projectMainDailyService.selectEvaluateCount(customerId, dateId, getActiveCode(activeCodesGood)); + + gridInfos.forEach(g -> { + g.setDateId(dateId); + // 项目总数赋值 + if (!CollectionUtils.isEmpty(projectTotal)){ + projectTotal.forEach(pt -> { + if (g.getGridId().equals(pt.getGridId())){ + g.setProjectTotal(pt.getProjectTotal()); + } + }); + } + // 项目解决数赋值 + if (!CollectionUtils.isEmpty(resolvedNum)){ + resolvedNum.forEach(rn -> { + if (g.getGridId().equals(rn.getGridId())){ + g.setResolvedNum(rn.getResolvedNum()); + } + }); + } + // 解决率 + g.setResolvedRatio(getRatio(g.getResolvedNum(),g.getProjectTotal())); + // 参与满意度评价的总次数 赋值 + if (!CollectionUtils.isEmpty(evaluateTotal)){ + evaluateTotal.forEach(et -> { + if (g.getGridId().equals(et.getOrgId())){ + g.setEvaluateTotal(et.getEvaluateCount()); + } + }); + } + // 满意+非常满意的总次数 赋值 + if (!CollectionUtils.isEmpty(evaluateGood)){ + evaluateGood.forEach(eg -> { + if (g.getGridId().equals(eg.getOrgId())){ + g.setGoodTotal(eg.getEvaluateCount()); + } + }); + } + // 不满意总次数 + g.setBadTotal(g.getEvaluateTotal()==NumConstant.ZERO ? NumConstant.ZERO : g.getEvaluateTotal() - g.getGoodTotal()); + // 满意率 + g.setGoodRatio(getRatio(g.getGoodTotal(),g.getEvaluateTotal())); + // 不满意率 + g.setBadRatio(getRatio(g.getBadTotal(),g.getEvaluateTotal())); + }); + log.info(gridInfos.toString()); + delScreenProjectGridDaily(customerId, dateId); + insertScreenProjectGridDaily(gridInfos); + } + + /** + * @Description activeCode处理 + * @Param actCode + * @author zxc + * @date 2021/1/29 上午9:33 + */ + public List getActiveCode(String[] actCode){ + List activeCodes = Arrays.asList(actCode); + return activeCodes; + } + + /** + * @Description + * @Param a + * @Param b 分母 + * @author zxc + * @date 2021/1/29 上午10:10 + */ + public BigDecimal getRatio(Integer a , Integer b){ + if (b==NumConstant.ZERO){ + return new BigDecimal(NumConstant.ZERO); + } + BigDecimal bigDecimalA = new BigDecimal(a); + BigDecimal bigDecimalB = new BigDecimal(b); + BigDecimal divide = bigDecimalA.divide(bigDecimalB, NumConstant.FOUR, BigDecimal.ROUND_HALF_UP); + return divide; + } + + /** + * @Description 新增 + * @Param list + * @author zxc + * @date 2021/2/1 上午10:24 + */ + @Transactional(rollbackFor = Exception.class) + public void insertScreenProjectGridDaily(List list){ + List> partition = ListUtils.partition(list, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseDao.insertScreenProjectGridDaily(p); + }); + } + + /** + * @Description 删除 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/2/1 上午10:24 + */ + @Transactional(rollbackFor = Exception.class) + public void delScreenProjectGridDaily(String customerId,String dateId){ + Integer flag; + do { + flag = baseDao.deleteByDateIdAndCustomerId(customerId,dateId); + }while (flag > NumConstant.ZERO && flag == NumConstant.ONE_THOUSAND); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java index 0977e2d627..43114fc18f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java @@ -22,17 +22,31 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.PingYinConstants; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dao.evaluationindex.screen.ScreenProjectQuantityGridMonthlyDao; +import com.epmet.dto.pingyin.result.ClosedIncrResultDTO; +import com.epmet.dto.pingyin.result.ProjectIncrResultDTO; +import com.epmet.dto.pingyin.result.ProjectTotalResultDTO; +import com.epmet.dto.pingyin.result.UnClosedTotalResultDTO; +import com.epmet.dto.screen.ScreenProjectGridDailyDTO; import com.epmet.dto.screen.ScreenProjectQuantityGridMonthlyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityGridMonthlyEntity; +import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.util.Arrays; import java.util.List; @@ -45,8 +59,15 @@ import java.util.Map; * @since v1.0.0 2021-01-27 */ @Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl implements ScreenProjectQuantityGridMonthlyService { + @Autowired + private ScreenCustomerGridDao gridDao; + + @Autowired + private FactOriginProjectMainDailyService projectMainDailyService; @Override public PageData page(Map params) { @@ -121,4 +142,107 @@ public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getMonthId()); } + /** + * @Description 数据抽取 【网格-月】 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/1/29 下午1:57 + */ + @Override + public void extractionProjectGridMonthly(String customerId, String monthId) { + // 查询客户下所有网格 + List screenProjectGridDailyDTOS = gridDao.selectGridInfoByCustomerId(customerId); + if (CollectionUtils.isEmpty(screenProjectGridDailyDTOS)){ + throw new RenException(String.format(PingYinConstants.GRID_INFO_IS_ZERO,customerId)); + } + List gridInfos = ConvertUtils.sourceToTarget(screenProjectGridDailyDTOS, ScreenProjectQuantityGridMonthlyDTO.class); + + // 本月新增的项目数量 转项目日期在当前月份内 + List projectIncr = projectMainDailyService.selectProjectIncr(customerId, monthId); + // 截止到当前月份:累计项目总数 + List projectTotal = projectMainDailyService.selectProjectTotal(customerId, null, monthId); + // 截止到当前月份:累计未结项目总数 + List projectUnClosed = projectMainDailyService.selectProjectCount(customerId, monthId, PingYinConstants.UN_CLOSED); + // 截止到当前月份:累计已结项目 + List projectClosed = projectMainDailyService.selectProjectCount(customerId, monthId, PingYinConstants.CLOSED); + // 本月新增结案项目数 + List closedIncr = projectMainDailyService.selectClosedIncr(customerId, monthId); + gridInfos.forEach(g -> { + g.setMonthId(monthId); + // 本月新增的项目数量 转项目日期在当前月份内 + if (!CollectionUtils.isEmpty(projectIncr)){ + projectIncr.forEach(p -> { + if (g.getGridId().equals(p.getGridId())){ + g.setProjectIncr(p.getProjectIncr()); + } + }); + } + // 截止到当前月份:累计项目总数 + if (!CollectionUtils.isEmpty(projectTotal)){ + projectTotal.forEach(p -> { + if (g.getGridId().equals(p.getGridId())){ + g.setProjectTotal(p.getProjectTotal()); + } + }); + } + // 截止到当前月份:累计未结项目总数 + if (!CollectionUtils.isEmpty(projectUnClosed)){ + projectUnClosed.forEach(p -> { + if (g.getGridId().equals(p.getGridId())){ + g.setUnClosedTotal(p.getProjectCount()); + } + }); + } + // 截止到当前月份:累计已结项目 + if (!CollectionUtils.isEmpty(projectClosed)){ + projectClosed.forEach(p -> { + if (g.getGridId().equals(p.getGridId())){ + g.setClosedTotal(p.getProjectCount()); + } + }); + } + // 本月新增结案项目数 + if (!CollectionUtils.isEmpty(closedIncr)){ + closedIncr.forEach(p -> { + if (g.getGridId().equals(p.getGridId())){ + g.setClosedIncr(p.getClosedIncr()); + } + }); + } + }); + log.info(gridInfos.toString()); + del(customerId, monthId); + insert(gridInfos,customerId,monthId); + } + + /** + * @Description 删除 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/2/1 上午10:13 + */ + @Transactional(rollbackFor = Exception.class) + public void del(String customerId,String monthId){ + Integer flag; + do { + flag = baseDao.deleteByMonthIdAndCustomerId(customerId, monthId); + }while (flag > NumConstant.ZERO && flag == NumConstant.ONE_THOUSAND); + } + + /** + * @Description 新增 + * @Param list + * @author zxc + * @date 2021/2/1 上午10:16 + */ + @Transactional(rollbackFor = Exception.class) + public void insert(List list,String customerId,String monthId){ + List> partition = ListUtils.partition(list, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseDao.insertBatch(p,customerId,"APP_USER",monthId); + }); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index 1ea4b350fd..3d21f70ce7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -440,4 +440,98 @@ CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml index 7506b05335..c6ad68ca8b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml @@ -343,4 +343,20 @@ del_flag = '0' AND CUSTOMER_ID = #{customerId} + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectGridDailyDao.xml index 09b2b2f470..9b10fe1d04 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectGridDailyDao.xml @@ -94,6 +94,55 @@ ) + + INSERT INTO screen_project_grid_daily + ( + id, + customer_id, + date_id, + grid_id, + pid, + pids, + project_total, + resolved_num, + resolved_ratio, + evaluate_total, + good_total, + bad_total, + good_ratio, + bad_ratio, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + REPLACE(UUID(), '-', ''), + #{item.customerId}, + #{item.dateId}, + #{item.gridId}, + #{item.pid}, + #{item.pids}, + #{item.projectTotal}, + #{item.resolvedNum}, + #{item.resolvedRatio}, + #{item.evaluateTotal}, + #{item.goodTotal}, + #{item.badTotal}, + #{item.goodRatio}, + #{item.badRatio}, + #{item.delFlag}, + #{item.revision}, + #{item.createdBy}, + now(), + #{item.createdBy}, + now() + ) + + From e0e674c5c8544c5a2fb10e8d84e7b3c47e7eddac Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 1 Feb 2021 22:42:11 +0800 Subject: [PATCH 036/101] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E6=9E=90?= =?UTF-8?q?=EF=BC=9A=E6=95=B0=E9=87=8F=E7=BB=9F=E8=AE=A1=E3=80=81=E6=9C=88?= =?UTF-8?q?=E5=BA=A6=E6=95=B0=E9=87=8F=E5=88=86=E6=9E=90=E3=80=81=E6=95=88?= =?UTF-8?q?=E7=8E=87=E5=88=86=E6=9E=90=E6=9F=A5=E8=AF=A2api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/utils/DateUtils.java | 34 ++++++ .../ScreenProjectQuantityOrgMonthlyDTO.java | 59 ++++++++++ .../screen/EfficiencyAnalysisFormDTO.java | 20 ++++ .../screen/QueryQuantityMonthlyFormDTO.java | 28 +++++ .../dto/form/screen/ScreenCommonFormDTO.java | 24 +++++ .../dto/result/ScreenCustomerAgencyDTO.java | 45 ++++++++ .../screen/EfficiencyAnalysisResultDTO.java | 40 +++++++ .../screen/ProjectQuantityResultDTO.java | 40 +++++++ .../screen/QueryQuantityMonthlyResultDTO.java | 27 +++++ .../screen/constant/ScreenConstant.java | 17 +++ .../controller/project/ProjectController.java | 60 ++++++++++- .../screen/ScreenCustomerAgencyDao.java | 8 ++ .../ScreenProjectCategoryGridDailyDao.java | 31 ++++++ .../ScreenProjectCategoryOrgDailyDao.java | 32 ++++++ .../screen/ScreenProjectGridDailyDao.java | 43 ++++++++ .../screen/ScreenProjectOrgDailyDao.java | 48 +++++++++ .../ScreenProjectQuantityGridMonthlyDao.java | 32 ++++++ .../ScreenProjectQuantityOrgMonthlyDao.java | 44 ++++++++ ...ScreenProjectCategoryGridDailyService.java | 29 +++++ .../ScreenProjectCategoryOrgDailyService.java | 29 +++++ .../screen/ScreenProjectGridDailyService.java | 38 +++++++ .../screen/ScreenProjectOrgDailyService.java | 47 ++++++++ ...reenProjectQuantityGridMonthlyService.java | 28 +++++ ...creenProjectQuantityOrgMonthlyService.java | 37 +++++++ ...enProjectCategoryGridDailyServiceImpl.java | 37 +++++++ ...eenProjectCategoryOrgDailyServiceImpl.java | 35 ++++++ .../ScreenProjectGridDailyServiceImpl.java | 53 +++++++++ .../ScreenProjectOrgDailyServiceImpl.java | 101 ++++++++++++++++++ ...ProjectQuantityGridMonthlyServiceImpl.java | 36 +++++++ ...nProjectQuantityOrgMonthlyServiceImpl.java | 97 +++++++++++++++++ .../mapper/screen/ScreenCustomerAgencyDao.xml | 9 ++ .../ScreenProjectCategoryGridDailyDao.xml | 6 ++ .../ScreenProjectCategoryOrgDailyDao.xml | 8 ++ .../screen/ScreenProjectGridDailyDao.xml | 32 ++++++ .../screen/ScreenProjectOrgDailyDao.xml | 55 ++++++++++ .../ScreenProjectQuantityGridMonthlyDao.xml | 8 ++ .../ScreenProjectQuantityOrgMonthlyDao.xml | 25 +++++ .../migration/V0.0.9__add_event_analysis.sql | 4 +- 38 files changed, 1339 insertions(+), 7 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java index e4a6cf94cb..8c6432aadd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java @@ -729,4 +729,38 @@ public class DateUtils { LocalDate ldn = new LocalDate(date); return ldn.dayOfMonth().withMaximumValue().toDate(); } + + /** + * @return ["202002","202003","202004","202005","202006","202007","202008","202009","202010","202011","202012","202101"] + * @param monthId 202101 + * @param num 11 + * @description 截止到当前monthId,近12个月的坐标 + * @Date 2021/2/1 17:20 + **/ + public static List getMonthIdList(String monthId,int num) { + List monthIdList = new ArrayList<>(); + for (int i = num; i >= NumConstant.ZERO; i--) { + Calendar c = Calendar.getInstance(); + c.setTime(com.epmet.commons.tools.utils.DateUtils.stringToDate(monthId.concat("01"), com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN_YYYYMMDD)); + c.add(Calendar.MONTH, -i); + Date date = c.getTime(); + String month = com.epmet.commons.tools.utils.DateUtils.format(date, com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN_YYYYMM); + // monthIdList.add(month.substring(4, 6).concat("月")); + monthIdList.add(month); + } + return monthIdList; + } + + /** + * @author yinzuomei + * @description 获取当前时间的山个月monthId + * @Date 2021/2/1 17:41 + **/ + public static String getCurrentTimeBeforeMonthId(){ + Calendar c = Calendar.getInstance(); + c.setTime(new Date()); + c.add(Calendar.MONTH, -1); + Date nowDate = c.getTime(); + return com.epmet.commons.tools.utils.DateUtils.format(nowDate, com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN_YYYYMM); + } } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java new file mode 100644 index 0000000000..0019aed057 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java @@ -0,0 +1,59 @@ +/** + * 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 lombok.Data; + +import java.io.Serializable; + + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +public class ScreenProjectQuantityOrgMonthlyDTO implements Serializable { + private static final long serialVersionUID = 6821188282305837207L; + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String monthId; + + /** + * 组织id + */ + private String orgId; + + /** + * 当前组织内,本月新增的项目数量:转项目日期在当前月份内 + */ + private Integer projectIncr; + + /** + * 截止到当前月份:累计项目总数 + */ + private Integer projectTotal; + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java new file mode 100644 index 0000000000..0bf1c1556f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form.screen; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 【事件分析】效率分析 入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/1 18:27 + */ +@Data +public class EfficiencyAnalysisFormDTO extends ScreenCommonFormDTO{ + /** + * 网格:grid; 街道:street + */ + @NotBlank(message = "type不能为空:网格:grid; 街道:street") + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java new file mode 100644 index 0000000000..7ee3cade33 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form.screen; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 近12个月【事件分析】月度数量分析 入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/1 16:34 + */ +@Data +public class QueryQuantityMonthlyFormDTO extends ScreenCommonFormDTO{ + private static final long serialVersionUID = 8848067533647648347L; + + /** + * 每月项目增量:incr;累计项目数量:sum + */ + @NotBlank(message = "type不能为空:每月项目增量:incr;累计项目数量:sum") + private String type ; + + /** + * 截止到某月格式:yyyyMM;可为空 + */ + private String endMonthId; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java new file mode 100644 index 0000000000..f2e4e45533 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form.screen; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 大屏通用入参 + * + * @author yinzuomei@elink-cn.com + */ +@Data +public class ScreenCommonFormDTO implements Serializable { + private static final long serialVersionUID = -5959152175751211940L; + /** + * 来源于请求头中的customerId + */ + private String customerId; + /** + * 当前要查询的组织id + */ + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java new file mode 100644 index 0000000000..c78858001d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java @@ -0,0 +1,45 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 组织机构信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +public class ScreenCustomerAgencyDTO implements Serializable { + private static final long serialVersionUID = 6328123559936824470L; + /** + * 客户id + */ + private String customerId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织名称 + */ + private String agencyName; + + /** + * 机关级别(社区级:community, + 乡(镇、街道)级:street, + 区县级: district, + 市级: city + 省级:province) + */ + private String level; + + /** + * 行政地区编码 + */ + private String areaCode; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java new file mode 100644 index 0000000000..9924e7f041 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.result.screen; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 【事件分析】效率分析 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/1 18:23 + */ +@Data +public class EfficiencyAnalysisResultDTO implements Serializable { + private static final long serialVersionUID = 7291513498972998552L; + + /** + * 可能是网格名,也可能是组织名 + */ + private String name; + + /** + * 解决率: 带%:90.74% + */ + private String resolvedRatioStr; + + /** + * 解决率数值 90.74 + */ + private BigDecimal resolvedRatio; + + /** + * 方便查找日志 + */ + private String customerId; + private String agencyId; + private String gridId; + private String dateId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java new file mode 100644 index 0000000000..89f55620cc --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.result.screen; + +import lombok.Data; + +/** + * 【事件分析】数量统计查询 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/29 16:39 + */ +@Data +public class ProjectQuantityResultDTO { + /** + * 事件总数 + */ + private Integer projectTotal; + + /** + * 已解决数 + */ + private Integer resolvedNum; + + /** + * 解决率,带%号的字符串 + */ + private String resolvedRatio; + + /** + * 事件总数,带%号的字符串 + */ + private String satisfactionRatio; + + /** + * 方便查找日志 + */ + private String customerId; + private String agencyId; + private String dateId; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java new file mode 100644 index 0000000000..283c24a977 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result.screen; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 近12个月【事件分析】月度数量分析 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/1 16:57 + */ +@Data +public class QueryQuantityMonthlyResultDTO implements Serializable { + private static final long serialVersionUID = -9214182002720799008L; + + /** + * 横坐标集合 + */ + private List xAxis; + + /** + * 每个月的项目增量或者累计数量,根据入参type决定 + */ + private List yAxis; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java index e9729e7a23..2da4370f64 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java @@ -24,4 +24,21 @@ public interface ScreenConstant { String GET_AREA_TREE_FAILURE = "查询行政地区编码树失败......"; + String STREET = "street"; + + String DISTRICT = "district"; + + String CITY = "city"; + + String PROVINCE = "province"; + + String LEVEL = "level"; + + String STR_NULL = ""; + + String ENGLISH_COMMA = ","; + + String GRID = "grid"; + + String AGENCY = "agency"; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index 94186e7336..1e75eab9f7 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java @@ -5,17 +5,21 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.service.evaluationindex.screen.*; import com.epmet.datareport.service.project.ProjectService; import com.epmet.dto.form.ProcessListFormDTO; +import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO; +import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO; +import com.epmet.dto.form.screen.ScreenCommonFormDTO; +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import com.epmet.dto.result.screen.ProjectQuantityResultDTO; +import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO; import com.epmet.project.constant.ProjectConstant; import com.epmet.project.dto.form.DifficultyRankFormDTO; import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; import com.epmet.project.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -29,7 +33,18 @@ public class ProjectController { @Autowired private ProjectService projectService; - + @Autowired + private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; + @Autowired + private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService; + @Autowired + private ScreenProjectGridDailyService projectGridDailyService; + @Autowired + private ScreenProjectOrgDailyService projectOrgDailyService; + @Autowired + private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService; + @Autowired + private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService; /** * @Author sun @@ -119,6 +134,41 @@ public class ProjectController { return new Result>().ok(projectService.getMyNextAgency(tokenDto)); } + /** + * @param customerId + * @param formDTO + * @description 【事件分析】数量统计查询 + **/ + @PostMapping("queryquantity") + public Result queryQuantity(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCommonFormDTO formDTO){ + formDTO.setCustomerId(customerId); + return new Result().ok(projectOrgDailyService.queryQuantity(formDTO)); + } + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 近12个月【事件分析】月度数量分析 + **/ + @PostMapping("queryquantity-monthly") + public Result queryQuantityMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody QueryQuantityMonthlyFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(projectQuantityOrgMonthlyService.queryQuantityMonthly(formDTO)); + } + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 【事件分析】效率分析 + **/ + @PostMapping("efficiency-analysis") + public Result> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO)); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 52ddea4bd0..60c3f1b3cd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; +import com.epmet.dto.result.ScreenCustomerAgencyDTO; import com.epmet.evaluationindex.screen.dto.result.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -112,4 +113,11 @@ public interface ScreenCustomerAgencyDao { * @date 2020/10/28 10:33 上午 */ List selectSubAgencyId(@Param("agencyId") String agencyId); + + /** + * @param agencyId + * @author yinzuomei + * @description 查询组织基本信息 + **/ + ScreenCustomerAgencyDTO selectByAgencyId(@Param("agencyId") String agencyId); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java new file mode 100644 index 0000000000..e5d92af056 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java @@ -0,0 +1,31 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectCategoryGridDailyDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java new file mode 100644 index 0000000000..c9403d83ad --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java @@ -0,0 +1,32 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectCategoryOrgDailyDao { + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java new file mode 100644 index 0000000000..1eada75ab4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java @@ -0,0 +1,43 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectGridDailyDao{ + + /** + * @param customerId + * @param areaCode + * @author yinzuomei + * @description 下级网格的效率(解决率)列表 + **/ + List queryGridEfficiencyAnalysis(@Param("customerId") String customerId, @Param("areaCode") String areaCode); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java new file mode 100644 index 0000000000..2a26119d9c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java @@ -0,0 +1,48 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import com.epmet.dto.result.screen.ProjectQuantityResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectOrgDailyDao { + + /** + * @author yinzuomei + * @description 【事件分析】数量统计查询 + **/ + ProjectQuantityResultDTO queryQuantity(@Param("customerId") String customerId, @Param("agencyId")String agencyId); + + /** + * @param areaCode + * @author yinzuomei + * @description 下级组织的效率(解决率)列表 + **/ + List queryEfficiencyAnalysis(@Param("customerId")String customerId,@Param("areaCode") String areaCode); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java new file mode 100644 index 0000000000..02c9545001 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java @@ -0,0 +1,32 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectQuantityGridMonthlyDao { + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java new file mode 100644 index 0000000000..205c648f36 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java @@ -0,0 +1,44 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import com.epmet.dto.ScreenProjectQuantityOrgMonthlyDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectQuantityOrgMonthlyDao { + + /** + * @return java.util.List + * @param customerId 当前客户id + * @param agencyId 当前要查询的组织 + * @param endMonthId 截止月份yyyyMM + * @author yinzuomei + * @description 近12个月【事件分析】月度数量分析 + **/ + List selectList(@Param("customerId") String customerId, @Param("agencyId")String agencyId, @Param("endMonthId")String endMonthId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java new file mode 100644 index 0000000000..6fa3939479 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java @@ -0,0 +1,29 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectCategoryGridDailyService{ + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java new file mode 100644 index 0000000000..ea6bbd3bbc --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java @@ -0,0 +1,29 @@ +/** + * 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.datareport.service.evaluationindex.screen; + + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectCategoryOrgDailyService{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java new file mode 100644 index 0000000000..d9eb13c55f --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java @@ -0,0 +1,38 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; + +import java.util.List; + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectGridDailyService { + /** + * @param customerId + * @param areaCode + * @author yinzuomei + * @description 【事件分析】效率分析 网格的解决率 + **/ + List efficiencyAnalysis(String customerId, String areaCode); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java new file mode 100644 index 0000000000..ee1c9e85fb --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java @@ -0,0 +1,47 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO; +import com.epmet.dto.form.screen.ScreenCommonFormDTO; +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import com.epmet.dto.result.screen.ProjectQuantityResultDTO; + +import java.util.List; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectOrgDailyService { + /** + * @param formDTO + * @author yinzuomei + * @description 【事件分析】数量统计查询 + **/ + ProjectQuantityResultDTO queryQuantity(ScreenCommonFormDTO formDTO); + + /** + * @param formDTO + * @author yinzuomei + * @description 【事件分析】效率分析 + **/ + List efficiencyAnalysis(EfficiencyAnalysisFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java new file mode 100644 index 0000000000..2e965971f5 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java @@ -0,0 +1,28 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectQuantityGridMonthlyService { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java new file mode 100644 index 0000000000..182feb83bd --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java @@ -0,0 +1,37 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO; +import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectQuantityOrgMonthlyService { + + /** + * @param formDTO + * @author yinzuomei + * @description 近12个月【事件分析】月度数量分析 + **/ + QueryQuantityMonthlyResultDTO queryQuantityMonthly(QueryQuantityMonthlyFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java new file mode 100644 index 0000000000..0aa3731bc9 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -0,0 +1,37 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectCategoryGridDailyService; +import org.springframework.stereotype.Service; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectCategoryGridDailyServiceImpl implements ScreenProjectCategoryGridDailyService { + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java new file mode 100644 index 0000000000..91ff2640b6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -0,0 +1,35 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectCategoryOrgDailyService; +import org.springframework.stereotype.Service; + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectCategoryOrgDailyServiceImpl implements ScreenProjectCategoryOrgDailyService { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java new file mode 100644 index 0000000000..a1f8a0c9fd --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java @@ -0,0 +1,53 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectGridDailyDao; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectGridDailyService; +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectGridDailyServiceImpl implements ScreenProjectGridDailyService { + @Autowired + private ScreenProjectGridDailyDao screenProjectGridDailyDao; + + /** + * @param customerId + * @param areaCode + * @author yinzuomei + * @description 【事件分析】效率分析 网格的解决率 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + public List efficiencyAnalysis(String customerId, String areaCode) { + return screenProjectGridDailyDao.queryGridEfficiencyAnalysis(customerId,areaCode); + } +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java new file mode 100644 index 0000000000..b4518096dc --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java @@ -0,0 +1,101 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectOrgDailyDao; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectGridDailyService; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectOrgDailyService; +import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO; +import com.epmet.dto.form.screen.ScreenCommonFormDTO; +import com.epmet.dto.result.ScreenCustomerAgencyDTO; +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import com.epmet.dto.result.screen.ProjectQuantityResultDTO; +import com.epmet.evaluationindex.screen.constant.ScreenConstant; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Slf4j +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class ScreenProjectOrgDailyServiceImpl implements ScreenProjectOrgDailyService { + @Autowired + private ScreenProjectOrgDailyDao baseDao; + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; + @Autowired + private ScreenProjectGridDailyService screenProjectGridDailyService; + /** + * @param formDTO + * @author yinzuomei + * @description 【事件分析】数量统计查询 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + public ProjectQuantityResultDTO queryQuantity(ScreenCommonFormDTO formDTO) { + //客户id、agencyId都不能为空 + ProjectQuantityResultDTO resultDTO = baseDao.queryQuantity(formDTO.getCustomerId(), formDTO.getAgencyId()); + if (null != resultDTO) { + return resultDTO; + } + log.warn("【事件分析】数量统计查询 结果为空"); + ProjectQuantityResultDTO defaultDto = new ProjectQuantityResultDTO(); + defaultDto.setCustomerId(formDTO.getCustomerId()); + defaultDto.setAgencyId(formDTO.getAgencyId()); + defaultDto.setProjectTotal(NumConstant.ZERO); + defaultDto.setResolvedNum(NumConstant.ZERO); + defaultDto.setResolvedRatio("0%"); + defaultDto.setSatisfactionRatio("0%"); + return defaultDto; + } + + /** + * @param formDTO + * @author yinzuomei + * @description 【事件分析】效率分析 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + public List efficiencyAnalysis(EfficiencyAnalysisFormDTO formDTO) { + ScreenCustomerAgencyDTO agencyDTO = screenCustomerAgencyDao.selectByAgencyId(formDTO.getAgencyId()); + if (null != agencyDTO) { + if (ScreenConstant.STREET.equals(formDTO.getType())) { + // 查询当前入参的下一级 + // type=street查询screen_project_org_daily + return baseDao.queryEfficiencyAnalysis(formDTO.getCustomerId(), agencyDTO.getAreaCode()); + } else if (ScreenConstant.GRID.equals(formDTO.getType())) { + // type=grid查询组织下的网格 + return screenProjectGridDailyService.efficiencyAnalysis(formDTO.getCustomerId(), agencyDTO.getAreaCode()); + } + } + return new ArrayList<>(); + } +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java new file mode 100644 index 0000000000..49f991a29a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; +import org.springframework.stereotype.Service; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectQuantityGridMonthlyServiceImpl implements ScreenProjectQuantityGridMonthlyService { + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java new file mode 100644 index 0000000000..1e4855604d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -0,0 +1,97 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyDao; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService; +import com.epmet.dto.ScreenProjectQuantityOrgMonthlyDTO; +import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO; +import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO; +import com.epmet.evaluationindex.screen.constant.ScreenConstant; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectQuantityOrgMonthlyServiceImpl implements ScreenProjectQuantityOrgMonthlyService { + @Autowired + private ScreenProjectQuantityOrgMonthlyDao baseDao; + + /** + * @param formDTO + * @author yinzuomei + * @description 近12个月【事件分析】月度数量分析 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + public QueryQuantityMonthlyResultDTO queryQuantityMonthly(QueryQuantityMonthlyFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getEndMonthId())) { + formDTO.setEndMonthId(DateUtils.getCurrentTimeBeforeMonthId()); + } + QueryQuantityMonthlyResultDTO resultDTO = new QueryQuantityMonthlyResultDTO(); + //近12个月的monthId集合,["202002","202003","202004","202005","202006","202007","202008","202009","202010","202011","202012","202101"] + List monthIdList = DateUtils.getMonthIdList(formDTO.getEndMonthId(), NumConstant.ELEVEN); + //要返回的横坐标:["02月","03月","04月","05月","06月","07月","08月","09月","10月","11月","12月","01月"] + List xAxis = new ArrayList<>(); + List yAxis = new ArrayList<>(); + //查询近12个月的数据 + List dtoList = baseDao.selectList(formDTO.getCustomerId(), formDTO.getAgencyId(), formDTO.getEndMonthId()); + + Map dtoMap = new HashMap<>(); + if (!CollectionUtils.isEmpty(dtoList)) { + dtoMap = dtoList.stream().collect(Collectors.toMap(ScreenProjectQuantityOrgMonthlyDTO::getMonthId, Function.identity(), (key1, key2) -> key2)); + } + for (String monthId : monthIdList) { + //202101=>01月 + xAxis.add(monthId.substring(NumConstant.FOUR, NumConstant.SIX).concat(ScreenConstant.MONTH)); + if (!CollectionUtils.isEmpty(dtoList)) { + if ("incr".equals(formDTO.getType())) { + yAxis.add(dtoMap.get(monthId).getProjectIncr()); + } else if ("sum".equals(formDTO.getType())) { + yAxis.add(dtoMap.get(monthId).getProjectTotal()); + } + continue; + } + //没有数据默认赋值0 + yAxis.add(0); + } + resultDTO.setXAxis(xAxis); + resultDTO.setYAxis(yAxis); + return resultDTO; + } + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index c63fc774a1..678d8fc875 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -216,4 +216,13 @@ AND IS_DISPLAY = 1 AND pid = #{agencyId} + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml new file mode 100644 index 0000000000..8a78a2ce57 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml new file mode 100644 index 0000000000..10b3a02431 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml new file mode 100644 index 0000000000..2011413015 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml @@ -0,0 +1,32 @@ + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml new file mode 100644 index 0000000000..f050e5dd1b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml @@ -0,0 +1,55 @@ + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml new file mode 100644 index 0000000000..98b140e175 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml new file mode 100644 index 0000000000..6e836f4df4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql index be29f0a879..b2c2e623f2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql @@ -105,7 +105,7 @@ CREATE TABLE `screen_project_category_grid_daily` ( `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', `PID` varchar(64) NOT NULL COMMENT '网格所属的组织id', `PIDS` varchar(255) NOT NULL COMMENT '网格所有的父级id,以英文:或者英文,隔开', - `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', + `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT 'e世通中的项目类别编码', `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数', @@ -129,7 +129,7 @@ CREATE TABLE `screen_project_category_org_daily` ( `ORG_TYPE` varchar(64) NOT NULL COMMENT '社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province', `PID` varchar(64) NOT NULL COMMENT '当前orgId所属的上级id', `PIDS` varchar(255) NOT NULL COMMENT 'orgId所有的父级id,以英文:或者英文,隔开', - `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', + `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT 'e世通中的项目类别编码', `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数', From cca5e752ab9deea4599f01cab039d5afa5df4a9c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 2 Feb 2021 10:36:07 +0800 Subject: [PATCH 037/101] screenProjectOrgDaily --- .../com/epmet/constant/PingYinConstants.java | 4 + .../result/ProjectOrgDailyResultDTO.java | 54 +++++++++++ .../dto/screen/ScreenProjectOrgDailyDTO.java | 5 + .../com/epmet/controller/DemoController.java | 10 ++ .../screen/ScreenCustomerAgencyDao.java | 9 ++ .../screen/ScreenProjectOrgDailyDao.java | 9 +- .../screen/ScreenProjectOrgDailyService.java | 9 ++ .../ScreenProjectGridDailyServiceImpl.java | 10 +- .../ScreenProjectOrgDailyServiceImpl.java | 94 +++++++++++++++++++ ...ProjectQuantityGridMonthlyServiceImpl.java | 10 +- .../screen/ScreenCustomerAgencyDao.xml | 14 +++ .../screen/ScreenProjectOrgDailyDao.xml | 18 ++++ 12 files changed, 237 insertions(+), 9 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgDailyResultDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java index 95b61d3af8..836e68c786 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java @@ -7,6 +7,8 @@ package com.epmet.constant; public interface PingYinConstants { String GRID_INFO_IS_ZERO = "客户【%s】下的网格信息为空......"; + String AGENCY_INFO_IS_ZERO = "客户【%s】下的组织信息为空......"; + String SELECT_GRID_INFO_BY_ORG_IS_NULL = "客户【%s】根据orgId查询网格项目信息为空......"; String EVALUATE_BAD = "bad"; String EVALUATE_GOOD = "good"; @@ -15,4 +17,6 @@ public interface PingYinConstants { String UN_CLOSED = "unClosed"; String CLOSED = "closed"; + String CREATED_BY = "APP_USER"; + } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgDailyResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgDailyResultDTO.java new file mode 100644 index 0000000000..a19749c5e0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgDailyResultDTO.java @@ -0,0 +1,54 @@ +package com.epmet.dto.pingyin.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/2/1 下午3:34 + */ +@Data +public class ProjectOrgDailyResultDTO implements Serializable { + + private static final long serialVersionUID = -6838351691873050562L; + + /** + * 行政区域编码 + */ + private String areaCode; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 已解决的项目总数 + */ + private Integer resolvedNum; + + /** + * 参与满意度评价的总次数 + */ + private Integer evaluateTotal; + + /** + * 满意+非常满意的总次数 + */ + private Integer goodTotal; + + /** + * 不满意总次数 + */ + private Integer badTotal; + + public ProjectOrgDailyResultDTO() { + this.projectTotal = NumConstant.ZERO; + this.resolvedNum = NumConstant.ZERO; + this.evaluateTotal = NumConstant.ZERO; + this.goodTotal = NumConstant.ZERO; + this.badTotal = NumConstant.ZERO; + } +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectOrgDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectOrgDailyDTO.java index c7b3b6f426..7b449b50fe 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectOrgDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectOrgDailyDTO.java @@ -139,4 +139,9 @@ public class ScreenProjectOrgDailyDTO implements Serializable { */ private Date updatedTime; + /** + * 行政区域编码 + */ + private String areaCode; + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 3dc014ae20..9fe12afc58 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -37,6 +37,7 @@ import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDaily import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.evaluationindex.screen.ScreenProjectGridDailyService; +import com.epmet.service.evaluationindex.screen.ScreenProjectOrgDailyService; import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimCustomerPartymemberService; @@ -752,6 +753,9 @@ public class DemoController { @Autowired private ScreenProjectQuantityGridMonthlyService screenProjectQuantityGridMonthlyService; + @Autowired + private ScreenProjectOrgDailyService screenProjectOrgDailyService; + @PostMapping("screenProjectGridDaily") public Result screenProjectGridDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId){ screenProjectGridDailyService.extractionProjectGridDaily(customerId,dateId); @@ -763,4 +767,10 @@ public class DemoController { screenProjectQuantityGridMonthlyService.extractionProjectGridMonthly(customerId,monthId); return new Result(); } + + @PostMapping("screenProjectOrgDaily") + public Result screenProjectOrgDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId){ + screenProjectOrgDailyService.extractionProjectOrgDaily(customerId, dateId); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index c37d2abace..de96e0abd3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -24,6 +24,7 @@ import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO; import com.epmet.dto.extract.result.OrgNameResultDTO; import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; +import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; import com.epmet.dto.screen.result.TreeResultDTO; import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; @@ -183,4 +184,12 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectOrgNameAgency(@Param("agencyIds") List agencyIds); Boolean initBizOrg(CustomerBizOrgFormDTO formDTO); + + /** + * @Description 根据客户ID查询组织信息 + * @Param customerId + * @author zxc + * @date 2021/2/1 下午2:03 + */ + List selectAgencyByCustomer(@Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java index 595c9d56c6..731347f2a6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.pingyin.result.ProjectOrgDailyResultDTO; import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectOrgDailyEntity; import org.apache.ibatis.annotations.Mapper; @@ -39,5 +40,11 @@ public interface ScreenProjectOrgDailyDao extends BaseDao selectOrgProject(@Param("agencyInfos") List agencyInfos, @Param("dateId") String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java index 7deb14919f..587a6eef72 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java @@ -103,4 +103,13 @@ public interface ScreenProjectOrgDailyService extends BaseService data); + + /** + * @Description 数据抽取【机关-日】 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/2/1 下午1:32 + */ + void extractionProjectOrgDaily(String customerId, String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java index 64c3c2ef8a..68a566f849 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java @@ -249,10 +249,12 @@ public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl list){ - List> partition = ListUtils.partition(list, NumConstant.ONE_HUNDRED); - partition.forEach(p -> { - baseDao.insertScreenProjectGridDaily(p); - }); + if (!CollectionUtils.isEmpty(list)){ + List> partition = ListUtils.partition(list, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseDao.insertScreenProjectGridDaily(p); + }); + } } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java index 5795e7a74d..e59d6feef7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java @@ -22,18 +22,28 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.PingYinConstants; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.dao.evaluationindex.screen.ScreenProjectOrgDailyDao; +import com.epmet.dto.pingyin.result.ProjectOrgDailyResultDTO; import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectOrgDailyEntity; import com.epmet.service.evaluationindex.screen.ScreenProjectOrgDailyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -45,8 +55,12 @@ import java.util.Map; * @since v1.0.0 2021-01-27 */ @Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl implements ScreenProjectOrgDailyService { + @Autowired + private ScreenCustomerAgencyDao agencyDao; @Override public PageData page(Map params) { @@ -122,4 +136,84 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl agencyInfos = agencyDao.selectAgencyByCustomer(customerId); + if (CollectionUtils.isEmpty(agencyInfos)){ + throw new RenException(String.format(PingYinConstants.AGENCY_INFO_IS_ZERO,customerId)); + } + List projectOrgDaily = baseDao.selectOrgProject(agencyInfos, dateId); + if (CollectionUtils.isEmpty(projectOrgDaily)){ + log.info(String.format(PingYinConstants.SELECT_GRID_INFO_BY_ORG_IS_NULL,customerId)); + return; + } + projectOrgDaily.forEach(p -> { + p.setBadTotal(null == p.getBadTotal() ? NumConstant.ZERO : p.getBadTotal()); + p.setEvaluateTotal(null == p.getEvaluateTotal() ? NumConstant.ZERO : p.getEvaluateTotal()); + p.setGoodTotal(null == p.getGoodTotal() ? NumConstant.ZERO : p.getGoodTotal()); + p.setProjectTotal(null == p.getProjectTotal() ? NumConstant.ZERO : p.getProjectTotal()); + p.setResolvedNum(null == p.getResolvedNum() ? NumConstant.ZERO : p.getResolvedNum()); + }); + log.info(projectOrgDaily.toString()); + agencyInfos.forEach(a -> { + a.setDateId(dateId); + projectOrgDaily.forEach(p -> { + if (a.getAreaCode().equals(p.getAreaCode())){ + a.setResolvedRatio(getRatio(p.getResolvedNum(),p.getProjectTotal())); + a.setBadRatio(getRatio(p.getBadTotal(),p.getEvaluateTotal())); + a.setGoodRatio(getRatio(p.getGoodTotal(),p.getEvaluateTotal())); + a.setBadTotal(p.getBadTotal()); + a.setEvaluateTotal(p.getEvaluateTotal()); + a.setGoodTotal(p.getGoodTotal()); + a.setProjectTotal(p.getProjectTotal()); + a.setResolvedNum(p.getResolvedNum()); + } + }); + }); + log.info(agencyInfos.toString()); + del(customerId, dateId); + insert(agencyInfos,customerId,dateId); + } + + /** + * @Description + * @Param a + * @Param b 分母 + * @author zxc + * @date 2021/1/29 上午10:10 + */ + public BigDecimal getRatio(Integer a , Integer b){ + if (b == NumConstant.ZERO){ + return new BigDecimal(NumConstant.ZERO); + } + BigDecimal bigDecimalA = new BigDecimal(a); + BigDecimal bigDecimalB = new BigDecimal(b); + BigDecimal divide = bigDecimalA.divide(bigDecimalB, NumConstant.FOUR, BigDecimal.ROUND_HALF_UP); + return divide; + } + + @Transactional(rollbackFor = Exception.class) + public void insert(List agencyInfos,String customerId,String dateId){ + if (!CollectionUtils.isEmpty(agencyInfos)){ + List> partition = ListUtils.partition(agencyInfos, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseDao.insertBatch(p,customerId,PingYinConstants.CREATED_BY,dateId); + }); + } + } + + @Transactional(rollbackFor = Exception.class) + public void del(String customerId,String dateId){ + Integer flag; + do { + flag = baseDao.deleteByDateIdAndCustomerId(customerId, dateId); + }while (flag > NumConstant.ZERO && flag == NumConstant.ONE_THOUSAND); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java index 43114fc18f..a99419db97 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java @@ -239,10 +239,12 @@ public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl */ @Transactional(rollbackFor = Exception.class) public void insert(List list,String customerId,String monthId){ - List> partition = ListUtils.partition(list, NumConstant.ONE_HUNDRED); - partition.forEach(p -> { - baseDao.insertBatch(p,customerId,"APP_USER",monthId); - }); + if (!CollectionUtils.isEmpty(list)){ + List> partition = ListUtils.partition(list, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseDao.insertBatch(p,customerId,PingYinConstants.CREATED_BY,monthId); + }); + } } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index cbb54e049f..a7ae4c1113 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -361,4 +361,18 @@ del_flag = '0' AND CUSTOMER_ID = #{customerId} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectOrgDailyDao.xml index 1bf92d587b..6bf6208ce0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectOrgDailyDao.xml @@ -107,5 +107,23 @@ limit 1000 + + + \ No newline at end of file From 60f45dc3d9a21698d0ec50306f9a29e71ab0da46 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 2 Feb 2021 15:39:42 +0800 Subject: [PATCH 038/101] =?UTF-8?q?customer=5Frelation=E6=94=BE=E5=88=B0op?= =?UTF-8?q?er=5Fcrm=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/{stats => crm}/CustomerRelationDao.java | 4 ++-- .../entity/{stats => crm}/CustomerRelationEntity.java | 2 +- .../service/{stats => crm}/CustomerRelationService.java | 4 ++-- .../{stats => crm}/impl/CustomerRelationServiceImpl.java | 8 ++++---- .../indexcal/impl/IndexCalculateServiceImpl.java | 2 +- ..._indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql | 1 + .../mapper/{stats => crm}/CustomerRelationDao.xml | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/{stats => crm}/CustomerRelationDao.java (94%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/{stats => crm}/CustomerRelationEntity.java (98%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/{stats => crm}/CustomerRelationService.java (94%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/{stats => crm}/impl/CustomerRelationServiceImpl.java (91%) rename epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/{stats => crm}/CustomerRelationDao.xml (95%) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerRelationDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerRelationDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java index c5c3e3c927..8876498774 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerRelationDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.stats; +package com.epmet.dao.crm; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CustomerSubInfoDTO; -import com.epmet.entity.stats.CustomerRelationEntity; +import com.epmet.entity.crm.CustomerRelationEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/CustomerRelationEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/CustomerRelationEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java index 4c3d7098c9..c19184612a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/CustomerRelationEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.stats; +package com.epmet.entity.crm; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerRelationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerRelationService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java index cc94faa6c2..6b7cec2291 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerRelationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.service.stats; +package com.epmet.service.crm; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.indexcal.CustomerSubInfoDTO; -import com.epmet.entity.stats.CustomerRelationEntity; +import com.epmet.entity.crm.CustomerRelationEntity; import java.util.List; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerRelationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerRelationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java index 7a39515309..7b6b5ea570 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerRelationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java @@ -15,15 +15,15 @@ * along with this program. If not, see . */ -package com.epmet.service.stats.impl; +package com.epmet.service.crm.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.stats.CustomerRelationDao; +import com.epmet.dao.crm.CustomerRelationDao; import com.epmet.dto.indexcal.CustomerSubInfoDTO; -import com.epmet.entity.stats.CustomerRelationEntity; -import com.epmet.service.stats.CustomerRelationService; +import com.epmet.entity.crm.CustomerRelationEntity; +import com.epmet.service.crm.CustomerRelationService; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index 078ef8f5c2..761cc75ff4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -11,9 +11,9 @@ import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CustomerSubInfoDTO; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.redis.IndexCalRedis; +import com.epmet.service.crm.CustomerRelationService; import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; -import com.epmet.service.stats.CustomerRelationService; import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql index 00281958a6..3c99c84508 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql @@ -1,6 +1,7 @@ -- 一、epmet_data_statistical 库sql脚本: -- 1、客户维度表新增 area_code列 alter table dim_customer add COLUMN AREA_CODE varchar(12) default '' comment '客户所属行政地区编码,取值来自客户根组织的area_code(01.14 add)'after CUSTOMER_NAME; +-- 二、epmet_oper_crm库sql脚本: oper_crm库新增客户关系表 -- 2、新增客户关系表 CREATE TABLE `customer_relation` ( `ID` varchar(64) NOT NULL COMMENT '主键', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerRelationDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerRelationDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml index 11d7c9f637..a942ca5995 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerRelationDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml @@ -1,7 +1,7 @@ - + From a4a8034c54af6d15574e4210da60f33e0756b7d6 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 2 Feb 2021 15:58:33 +0800 Subject: [PATCH 039/101] =?UTF-8?q?sso=E9=99=8C=E7=94=9F=E4=BA=BA=E5=AF=BC?= =?UTF-8?q?=E8=A7=88=E7=BD=91=E6=A0=BC=E5=88=97=E8=A1=A8=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0customerId=E6=A0=A1=E9=AA=8C=20=E4=BB=8Etoken=E4=B8=AD?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AE=A2=E6=88=B7Id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/ListCustomerGridFormDTO.java | 2 + .../main/resources/mapper/CustomerGridDao.xml | 99 +++++++++++++------ .../StrangerResiGuideController.java | 7 +- .../service/StrangerAccessRecordService.java | 2 +- .../impl/StrangerAccessRecordServiceImpl.java | 4 +- 5 files changed, 79 insertions(+), 35 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListCustomerGridFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListCustomerGridFormDTO.java index 21a790fe39..3724abbf02 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListCustomerGridFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListCustomerGridFormDTO.java @@ -35,4 +35,6 @@ public class ListCustomerGridFormDTO implements Serializable{ * 每页显示数量 * */ private Integer pageSize = 20; + + private String customerId; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index df3a9fc938..ec5c6143ac 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -59,6 +59,9 @@ grid.del_flag = 0 AND grid.area_code LIKE CONCAT(#{areaCode},'%') + + AND grid.customer_id = #{customerId} + ORDER BY grid.customer_id, CONVERT ( gridName USING gbk ) ASC @@ -74,36 +77,72 @@ ( - SELECT - a.id AS grid_id, - a.customer_id, - concat( agency.fullname, '-', a.grid_name ) AS gridName - FROM - CUSTOMER_GRID a - - LEFT JOIN ( - SELECT - a1.id, - CASE - - WHEN a2.ORGANIZATION_NAME IS NULL THEN - a1.ORGANIZATION_NAME ELSE concat( a2.ORGANIZATION_NAME, '-', a1.ORGANIZATION_NAME ) - END AS fullname - FROM - customer_agency a1 - LEFT JOIN customer_agency a2 ON a1.PID = a2.ID - AND a1.del_flag = '0' - WHERE - a1.del_flag = '0' - ) agency ON a.PID = agency.ID - - - WHERE - a.del_flag = 0 - AND - a.area_code = #{areaCode} - ORDER BY - CONVERT ( gridName USING gbk ) ASC + ( + SELECT + a.id AS grid_id, + a.customer_id, + concat( agency.fullname, '-', a.grid_name ) AS gridName + FROM + CUSTOMER_GRID a + LEFT JOIN ( + SELECT + a1.id, + CASE + WHEN a2.ORGANIZATION_NAME IS NULL THEN + a1.ORGANIZATION_NAME ELSE concat( a2.ORGANIZATION_NAME, '-', a1.ORGANIZATION_NAME ) + END AS fullname + FROM + customer_agency a1 + LEFT JOIN customer_agency a2 ON a1.PID = a2.ID + AND a1.del_flag = '0' + WHERE + a1.del_flag = '0' + AND a1.customer_id = #{customerId} + ) agency ON a.PID = agency.ID + WHERE + a.del_flag = 0 + AND a.area_code = #{areaCode} + + AND a.customer_id = #{customerId} + + ORDER BY + CONVERT ( gridName USING gbk ) ASC + LIMIT 0,999999999999 + ) + UNION + ( + SELECT + b.id AS grid_id, + b.customer_id, + concat(agency.fullname , '-' ,b.grid_name) as gridName + FROM + CUSTOMER_GRID b + LEFT JOIN ( + SELECT + a1.id, + CASE + WHEN a2.ORGANIZATION_NAME IS NULL THEN + a1.ORGANIZATION_NAME ELSE concat( a2.ORGANIZATION_NAME, '-', a1.ORGANIZATION_NAME ) + END AS fullname + FROM + customer_agency a1 + LEFT JOIN customer_agency a2 ON a1.PID = a2.ID + AND a1.del_flag = '0' + WHERE + a1.del_flag = '0' + AND a1.customer_id = #{customerId} + ) agency ON b.PID = agency.ID + WHERE + b.del_flag = 0 + + AND b.customer_id = #{customerId} + + AND b.area_code LIKE CONCAT(#{cityCode},'%') + AND #{areaCode}]]> + ORDER BY + b.area_code DESC ,CONVERT ( gridName USING gbk ) ASC + LIMIT 0,999999999999 + ) ) c diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java index 47660b3ea2..c50414fdb6 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -30,6 +31,7 @@ import com.epmet.dto.result.MarketContactInfoResultDTO; import com.epmet.dto.result.PublicCustomerGridForStrangerResultDTO; import com.epmet.service.StrangerAccessRecordService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -87,9 +89,10 @@ public class StrangerResiGuideController { * @date 2021.01.18 16:39 */ @PostMapping("sso/publiclocationgridlist") - Result> locationGridList(@RequestBody CustomerGridListFormDTO customerGridListFormDTO){ + Result> locationGridList(@LoginUser TokenDto dto,@RequestBody CustomerGridListFormDTO customerGridListFormDTO){ ValidatorUtils.validateEntity(customerGridListFormDTO); - return strangerAccessRecordService.listCustomerGridH5(customerGridListFormDTO); + if(null == dto || StringUtils.isEmpty(dto.getCustomerId())) throw new ValidateException("无法获取客户Id"); + return strangerAccessRecordService.listCustomerGridH5(customerGridListFormDTO,dto.getCustomerId()); } /** diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java index ffbd90e0e1..f357cb3440 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java @@ -128,6 +128,6 @@ public interface StrangerAccessRecordService extends BaseService> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO); + Result> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId); } diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java index e7e5c6cca9..a8aa3569c0 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java @@ -312,7 +312,7 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO) { + public Result> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId) { ListCustomerGridFormDTO listCustomerGridFormDTO = new ListCustomerGridFormDTO(); listCustomerGridFormDTO.setAreaCode(StringUtils.isBlank(customerGridListFormDTO.getSelectedAreaCode()) ? @@ -320,7 +320,7 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl> queryResult = govOrgFeignClient From 1e4b5840183763a424df31ab671fed0ad8232bad Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 2 Feb 2021 16:06:48 +0800 Subject: [PATCH 040/101] =?UTF-8?q?customer=5Frelation=E5=A2=9E=E5=8A=A0ar?= =?UTF-8?q?ea=5Fcode=E3=80=81LEVEL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/entity/crm/CustomerRelationEntity.java | 13 +++++++++++++ ...cal_addCustomerAreaCodeAndCustomerRelationTb.sql | 2 ++ 2 files changed, 15 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java index c19184612a..786cbe96f5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java @@ -60,4 +60,17 @@ public class CustomerRelationEntity extends BaseEpmetEntity { */ private String status; + /** + * 当前客户级别(社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province) + */ + private String level; + + /** + * 当前客户的地区编码,实际就是根组织的area_code + */ + private String areaCode; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql index 3c99c84508..0903827cd5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql @@ -10,6 +10,8 @@ CREATE TABLE `customer_relation` ( `CUSTOMER_TYPE` varchar(20) NOT NULL COMMENT '当前客户类型取值: external:外部客户,internal:内部客户', `PARENT_CUSTOMER_TYPE` varchar(20) NOT NULL COMMENT '父级客户类型取值: external:外部客户,internal:内部客户;如果是顶级客户,此列=0', `STATUS` varchar(10) NOT NULL DEFAULT 'open' COMMENT 'open,closed是否启用', + `LEVEL` varchar(32) NOT NULL COMMENT '当前客户级别(社区级:community,\r\n乡(镇、街道)级:street,\r\n区县级: district,\r\n市级: city\r\n省级:province)', + `AREA_CODE` varchar(32) NOT NULL COMMENT '当前客户的地区编码,实际就是根组织的area_code', `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识0未删除1已删除', `REVISION` int(11) NOT NULL COMMENT '乐观锁', `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', From 182bfe798d7f9d485d94368d9005daee64cdd1fa Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 2 Feb 2021 16:22:19 +0800 Subject: [PATCH 041/101] =?UTF-8?q?sso=E9=99=8C=E7=94=9F=E4=BA=BA=E5=AF=BC?= =?UTF-8?q?=E8=A7=88=E7=BD=91=E6=A0=BC=E5=88=97=E8=A1=A8=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0customerId=E6=A0=A1=E9=AA=8C=20=E4=BB=8Etoken=E4=B8=AD?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AE=A2=E6=88=B7Id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StrangerResiGuideController.java | 2 +- .../service/StrangerAccessRecordService.java | 2 +- .../impl/StrangerAccessRecordServiceImpl.java | 26 +++++++++---------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java index c50414fdb6..a19e255130 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java @@ -89,7 +89,7 @@ public class StrangerResiGuideController { * @date 2021.01.18 16:39 */ @PostMapping("sso/publiclocationgridlist") - Result> locationGridList(@LoginUser TokenDto dto,@RequestBody CustomerGridListFormDTO customerGridListFormDTO){ + Result> locationGridList(@LoginUser TokenDto dto,@RequestBody CustomerGridListFormDTO customerGridListFormDTO){ ValidatorUtils.validateEntity(customerGridListFormDTO); if(null == dto || StringUtils.isEmpty(dto.getCustomerId())) throw new ValidateException("无法获取客户Id"); return strangerAccessRecordService.listCustomerGridH5(customerGridListFormDTO,dto.getCustomerId()); diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java index f357cb3440..de23a80d7d 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java @@ -128,6 +128,6 @@ public interface StrangerAccessRecordService extends BaseService> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId); + Result> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId); } diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java index a8aa3569c0..271e59d954 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java @@ -312,26 +312,24 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId) { - - ListCustomerGridFormDTO listCustomerGridFormDTO = new ListCustomerGridFormDTO(); - listCustomerGridFormDTO.setAreaCode(StringUtils.isBlank(customerGridListFormDTO.getSelectedAreaCode()) ? - customerGridListFormDTO.getAreaCode() : customerGridListFormDTO.getSelectedAreaCode()); - - listCustomerGridFormDTO.setPageNo(null == customerGridListFormDTO.getPageNo() ? ModuleConstant.MIN_CURRENT_PAGE_NO : customerGridListFormDTO.getPageNo()); - listCustomerGridFormDTO.setPageSize(customerGridListFormDTO.getPageSize()); - listCustomerGridFormDTO.setCustomerId(customerId); - - Result> queryResult = + public Result> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId) { + ThirdCustomerGridListFormDTO gridParam = new ThirdCustomerGridListFormDTO(); + gridParam.setAreaCode(StringUtils.isBlank(customerGridListFormDTO.getSelectedAreaCode()) ? + customerGridListFormDTO.getAreaCode() : customerGridListFormDTO.getSelectedAreaCode()); + + gridParam.setPageNo(null == customerGridListFormDTO.getPageNo() ? ModuleConstant.MIN_CURRENT_PAGE_NO : customerGridListFormDTO.getPageNo()); + gridParam.setPageSize(customerGridListFormDTO.getPageSize()); + gridParam.setCustomerId(customerId); + Result> queryResult = govOrgFeignClient - .queryGridListByAreaCode(listCustomerGridFormDTO); + .queryCustomerGridList(gridParam); //Feign调用成功 if (queryResult.success()) { - List queryList = queryResult.getData(); + List queryList = queryResult.getData(); if (null != queryResult && queryList.size() > 0) { StrangerAccessRecordEntity strangerTrance = new StrangerAccessRecordEntity(); - strangerTrance.setLocationAreaCode(listCustomerGridFormDTO.getAreaCode()); + strangerTrance.setLocationAreaCode(gridParam.getAreaCode()); strangerTrance.setIsAuthorized(customerGridListFormDTO.getIsAuthorized()); strangerTrance.setGridNumber(queryList.size()); strangerTrance.setVisitTime(new Date()); From 0ca8c6190909a532f5dc2044e3f9a618624fa104 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 2 Feb 2021 16:29:51 +0800 Subject: [PATCH 042/101] screenProjectQuantityOrgMonth --- .../result/ProjectOrgMonthlyResultDTO.java | 46 ++++++++++ .../ScreenProjectQuantityOrgMonthlyDTO.java | 14 +++ .../com/epmet/controller/DemoController.java | 10 +++ .../ScreenProjectQuantityOrgMonthlyDao.java | 20 +++++ ...creenProjectQuantityOrgMonthlyService.java | 9 ++ ...nProjectQuantityOrgMonthlyServiceImpl.java | 88 +++++++++++++++++++ .../ScreenProjectQuantityOrgMonthlyDao.xml | 31 +++++++ 7 files changed, 218 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgMonthlyResultDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgMonthlyResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgMonthlyResultDTO.java new file mode 100644 index 0000000000..8829d379c4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgMonthlyResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.dto.pingyin.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/2/2 上午11:01 + */ +@Data +public class ProjectOrgMonthlyResultDTO implements Serializable { + + private static final long serialVersionUID = 4917301916897636586L; + + /** + * 行政区域编码 + */ + private String areaCode; + + /** + * 本月新增的项目数量:转项目日期在当前月份内 + */ + private Integer projectIncr; + + /** + * 累计项目总数 + */ + private Integer projectTotal; + + /** + * 累计未结项目总数 + */ + private Integer unClosedTotal; + + /** + * 累计已结项目 + */ + private Integer closedTotal; + + /** + * 本月新增结案项目数 + */ + private Integer closedIncr; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityOrgMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityOrgMonthlyDTO.java index a389215556..0355ec4a8a 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityOrgMonthlyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityOrgMonthlyDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.screen; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -124,4 +125,17 @@ public class ScreenProjectQuantityOrgMonthlyDTO implements Serializable { */ private Date updatedTime; + private String areaCode; + + public ScreenProjectQuantityOrgMonthlyDTO() { + this.projectIncr = NumConstant.ZERO; + this.projectTotal = NumConstant.ZERO; + this.unClosedTotal = NumConstant.ZERO; + this.closedTotal = NumConstant.ZERO; + this.closedIncr = NumConstant.ZERO; + this.delFlag = NumConstant.ZERO_STR; + this.revision = NumConstant.ZERO; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 9fe12afc58..5d340fa7f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -39,6 +39,7 @@ import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.evaluationindex.screen.ScreenProjectGridDailyService; import com.epmet.service.evaluationindex.screen.ScreenProjectOrgDailyService; import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; +import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimCustomerPartymemberService; import lombok.extern.slf4j.Slf4j; @@ -756,6 +757,9 @@ public class DemoController { @Autowired private ScreenProjectOrgDailyService screenProjectOrgDailyService; + @Autowired + private ScreenProjectQuantityOrgMonthlyService screenProjectQuantityOrgMonthlyService; + @PostMapping("screenProjectGridDaily") public Result screenProjectGridDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId){ screenProjectGridDailyService.extractionProjectGridDaily(customerId,dateId); @@ -773,4 +777,10 @@ public class DemoController { screenProjectOrgDailyService.extractionProjectOrgDaily(customerId, dateId); return new Result(); } + + @PostMapping("screenProjectQuantityOrgMonthly") + public Result screenProjectQuantityOrgMonthly(@RequestParam("customerId")String customerId,@RequestParam("monthId")String monthId){ + screenProjectQuantityOrgMonthlyService.extractionProjectOrgMonthly(customerId,monthId); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java index 218782d6d9..a11d394821 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.pingyin.result.ProjectOrgMonthlyResultDTO; import com.epmet.dto.screen.ScreenProjectQuantityOrgMonthlyDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; @@ -39,5 +40,24 @@ public interface ScreenProjectQuantityOrgMonthlyDao extends BaseDao selectQuantityOrgMonthly(@Param("agencyInfos") List agencyInfos, @Param("monthId") String monthId); + + /** + * @Description 项目(事件)数量查询【本月之前的累计】 + * @Param agencyInfos + * @Param monthId + * @author zxc + * @date 2021/2/2 下午3:03 + */ + List selectQuantityGrandOrgMonthly(@Param("agencyInfos") List agencyInfos, @Param("monthId") String monthId); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java index a964f77411..88c451bcfc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java @@ -103,4 +103,13 @@ public interface ScreenProjectQuantityOrgMonthlyService extends BaseService data); + + /** + * @Description 数据抽取【组织-月】 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/2/2 上午10:43 + */ + void extractionProjectOrgMonthly(String customerId,String monthId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java index 0629ada2b1..20f6b8bd01 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -22,17 +22,28 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.PingYinConstants; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.dao.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyDao; +import com.epmet.dto.pingyin.result.ProjectOrgMonthlyResultDTO; +import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; import com.epmet.dto.screen.ScreenProjectQuantityOrgMonthlyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyEntity; +import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService; import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.util.Arrays; import java.util.List; @@ -45,8 +56,13 @@ import java.util.Map; * @since v1.0.0 2021-01-27 */ @Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl implements ScreenProjectQuantityOrgMonthlyService { + @Autowired + private ScreenCustomerAgencyDao agencyDao; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -120,4 +136,76 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl< baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getMonthId()); } + /** + * @Description 数据抽取【组织-月】 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/2/2 上午10:43 + */ + @Override + public void extractionProjectOrgMonthly(String customerId, String monthId) { + List screenProjectOrgDailyDTOS = agencyDao.selectAgencyByCustomer(customerId); + if (CollectionUtils.isEmpty(screenProjectOrgDailyDTOS)){ + throw new RenException(String.format(PingYinConstants.AGENCY_INFO_IS_ZERO,customerId)); + } + List agencyInfos = ConvertUtils.sourceToTarget(screenProjectOrgDailyDTOS, ScreenProjectQuantityOrgMonthlyDTO.class); + List projectOrg = baseDao.selectQuantityOrgMonthly(agencyInfos, monthId); + if (!CollectionUtils.isEmpty(projectOrg)){ + projectOrg.forEach(p -> { + p.setClosedIncr(null == p.getClosedIncr() ? NumConstant.ZERO : p.getClosedIncr()); + p.setProjectIncr(null == p.getProjectIncr() ? NumConstant.ZERO : p.getProjectIncr()); + }); + } + List projectGrandOrg = baseDao.selectQuantityGrandOrgMonthly(agencyInfos, monthId); + if (!CollectionUtils.isEmpty(projectGrandOrg)){ + projectGrandOrg.forEach(p -> { + p.setClosedTotal(null == p.getClosedTotal() ? NumConstant.ZERO : p.getClosedTotal()); + p.setProjectTotal(null == p.getProjectTotal() ? NumConstant.ZERO : p.getProjectTotal()); + p.setUnClosedTotal(null == p.getUnClosedTotal() ? NumConstant.ZERO : p.getUnClosedTotal()); + }); + } + agencyInfos.forEach(a -> { + a.setMonthId(monthId); + if (!CollectionUtils.isEmpty(projectOrg)){ + projectOrg.forEach(p -> { + if (a.getAreaCode().equals(p.getAreaCode())){ + a.setClosedIncr(p.getClosedIncr()); + a.setProjectIncr(p.getProjectIncr()); + } + }); + } + if (!CollectionUtils.isEmpty(projectGrandOrg)){ + projectGrandOrg.forEach(p -> { + if (a.getAreaCode().equals(p.getAreaCode())){ + a.setClosedTotal(p.getClosedTotal()); + a.setProjectTotal(p.getProjectTotal()); + a.setUnClosedTotal(p.getUnClosedTotal()); + } + }); + } + }); + log.info(agencyInfos.toString()); + del(customerId, monthId); + insert(agencyInfos,customerId,monthId); + } + + @Transactional(rollbackFor = Exception.class) + public void del(String customerId,String monthId){ + Integer flag; + do { + flag = baseDao.deleteByMonthIdAndCustomerId(customerId, monthId); + }while (flag > NumConstant.ZERO && flag == NumConstant.ONE_THOUSAND); + } + + @Transactional(rollbackFor = Exception.class) + public void insert(List agencyInfos,String customerId,String monthId){ + if (!CollectionUtils.isEmpty(agencyInfos)){ + List> partition = ListUtils.partition(agencyInfos, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseDao.insertBatch(p,customerId,PingYinConstants.CREATED_BY,monthId); + }); + } + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml index 1048cacf7b..a1a946f7ab 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.xml @@ -96,5 +96,36 @@ limit 1000 + + + + + + \ No newline at end of file From ce68c5d97f541f8b48f4ce431c5509d7c931197c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 2 Feb 2021 18:01:01 +0800 Subject: [PATCH 043/101] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../todata/impl/FactOriginProjectMainDailyServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index a5dcc11955..c5aaa76daa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -271,7 +271,7 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl selectProjectTotal(String customerId, String dateId,String monthId) { - if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)){ + if (StringUtils.isNotBlank(customerId)){ List projectTotalResultDTOS = baseDao.selectProjectTotal(customerId, dateId, monthId); return projectTotalResultDTOS; } From 5131ec0cfad2d8ed49fdb089e91a854f3212da5c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 2 Feb 2021 18:11:59 +0800 Subject: [PATCH 044/101] =?UTF-8?q?tokenDto=E5=A2=9E=E5=8A=A0customerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/security/dto/BaseTokenDto.java | 2 ++ .../java/com/epmet/auth/InternalAuthProcessor.java | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/BaseTokenDto.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/BaseTokenDto.java index c3065c7200..f50f2f1d2d 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/BaseTokenDto.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/BaseTokenDto.java @@ -24,6 +24,8 @@ public class BaseTokenDto { */ private String token; + private String customerId; + public BaseTokenDto() { } diff --git a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java b/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java index 2ee22426f6..30e8d2b457 100644 --- a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java +++ b/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java @@ -105,11 +105,15 @@ public class InternalAuthProcessor extends AuthProcessor { if (baseTokenDto != null) { String redisKey = baseTokenDto.getApp() + "-" + baseTokenDto.getClient() + "-" + baseTokenDto.getUserId(); logger.info("redisKey=" + redisKey); - exchange.getRequest().mutate() - .header(Constant.APP_USER_KEY, redisKey) - .header(AppClientConstant.APP,baseTokenDto.getApp()) - .header(AppClientConstant.CLIENT,baseTokenDto.getClient()) - .header(AppClientConstant.USER_ID,baseTokenDto.getUserId()); + + ServerHttpRequest.Builder builder = exchange.getRequest().mutate(); + builder.header(Constant.APP_USER_KEY, redisKey); + builder.header(AppClientConstant.APP,baseTokenDto.getApp()); + builder.header(AppClientConstant.CLIENT,baseTokenDto.getClient()); + builder.header(AppClientConstant.USER_ID,baseTokenDto.getUserId()); + if (StringUtils.isNotBlank(baseTokenDto.getCustomerId())) { + builder.header(AppClientConstant.CUSTOMER_ID,baseTokenDto.getCustomerId()); + } if (StringUtils.equals(baseTokenDto.getApp(), "gov")) {//工作端 if(StringUtils.isNotBlank(customerId)){ From 18fe79310d90ca4d335ce83e20e2060c7157bed3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 3 Feb 2021 14:28:08 +0800 Subject: [PATCH 045/101] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=AE=A2=E6=88=B7id?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=A0=B9=E5=AE=A2=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CustomerInfoQueryFormDTO.java | 21 +++ .../result/CustomerInfoQueryResultDTO.java | 22 +++ .../epmet-ext/epmet-ext-server/pom.xml | 6 + .../epmet/controller/OpenUpController.java | 11 ++ .../java/com/epmet/service/OpenUpService.java | 8 + .../epmet/service/impl/OpenUpServiceImpl.java | 20 +++ .../com/epmet/dto/CustomerRelationDTO.java | 110 ++++++++++++++ .../result/CustomerRelationInfoResultDTO.java | 23 +++ .../epmet/feign/OperCrmOpenFeignClient.java | 14 +- .../OperCrmOpenFeignClientFallback.java | 12 ++ .../epmet/controller/CustomerController.java | 20 ++- .../com/epmet/dao/CustomerRelationDao.java | 35 +++++ .../epmet/entity/CustomerRelationEntity.java | 77 ++++++++++ .../service/CustomerRelationService.java | 116 +++++++++++++++ .../com/epmet/service/CustomerService.java | 12 +- .../impl/CustomerRelationServiceImpl.java | 140 ++++++++++++++++++ .../service/impl/CustomerServiceImpl.java | 23 +++ .../src/main/resources/logback-spring.xml | 2 +- .../resources/mapper/CustomerRelationDao.xml | 16 ++ 19 files changed, 678 insertions(+), 10 deletions(-) create mode 100644 epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/form/CustomerInfoQueryFormDTO.java create mode 100644 epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/CustomerInfoQueryResultDTO.java create mode 100644 epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/CustomerRelationDTO.java create mode 100644 epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerRelationInfoResultDTO.java create mode 100644 epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerRelationDao.java create mode 100644 epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/entity/CustomerRelationEntity.java create mode 100644 epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerRelationService.java create mode 100644 epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerRelationServiceImpl.java create mode 100644 epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerRelationDao.xml diff --git a/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/form/CustomerInfoQueryFormDTO.java b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/form/CustomerInfoQueryFormDTO.java new file mode 100644 index 0000000000..f637cfd191 --- /dev/null +++ b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/form/CustomerInfoQueryFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 009、根据客户id查询根客户信息入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/2 22:25 + */ +@Data +public class CustomerInfoQueryFormDTO { + + /** + * 客户id + */ + @NotBlank(message = "客户id不能为空") + private String customerId; +} diff --git a/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/CustomerInfoQueryResultDTO.java b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/CustomerInfoQueryResultDTO.java new file mode 100644 index 0000000000..b091020000 --- /dev/null +++ b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/CustomerInfoQueryResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.result; + +import lombok.Data; + +/** + * 009、根据客户id查询根客户信息 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/2 22:26 + */ +@Data +public class CustomerInfoQueryResultDTO { + + /** + * 当前客户id的根级客户id,返回值0代表当前客户是根客户没有上级客户 + */ + private String rootCustomerId; + /** + * 客户id + */ + private String customerId; +} diff --git a/epmet-module/epmet-ext/epmet-ext-server/pom.xml b/epmet-module/epmet-ext/epmet-ext-server/pom.xml index 911e651f55..685a0e6a33 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/pom.xml +++ b/epmet-module/epmet-ext/epmet-ext-server/pom.xml @@ -144,6 +144,12 @@ 5.1.12.RELEASE compile + + com.epmet + oper-crm-client + 2.0.0 + compile + diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/controller/OpenUpController.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/controller/OpenUpController.java index 162b493bd3..53bbed14b9 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/controller/OpenUpController.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/controller/OpenUpController.java @@ -125,5 +125,16 @@ public class OpenUpController { return new Result().ok(openUpService.organizeTree(formDTO)); } + /** + * @param formDTO + * @author yinzuomei + * @description 009、根据客户id查询根客户信息 + * @Date 2021/2/2 22:29 + **/ + @PostMapping("querycustomerinfo") + public Result queryCustomerInfo(@RequestBody CustomerInfoQueryFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(openUpService.queryCustomerInfo(formDTO)); + } } diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/OpenUpService.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/OpenUpService.java index ceecebc6c5..5239b821b1 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/OpenUpService.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/OpenUpService.java @@ -46,4 +46,12 @@ public interface OpenUpService { * @author sun **/ OrganizeTreeResultDTO organizeTree(OrganizeTreeFormDTO formDTO); + + /** + * @param formDTO + * @author yinzuomei + * @description 009、根据客户id查询根客户信息 + * @Date 2021/2/2 22:30 + **/ + CustomerInfoQueryResultDTO queryCustomerInfo(CustomerInfoQueryFormDTO formDTO); } diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java index 170c3e32c4..86d58131f0 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java @@ -3,12 +3,14 @@ package com.epmet.service.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.ModuleConstant; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.feign.OperCrmOpenFeignClient; import com.epmet.service.OpenUpService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -29,6 +31,8 @@ public class OpenUpServiceImpl implements OpenUpService { private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Autowired private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private OperCrmOpenFeignClient operCrmOpenFeignClient; /** * @Description 网格工作人员 被禁用的、未激活的不显示 @@ -147,4 +151,20 @@ public class OpenUpServiceImpl implements OpenUpService { return result.getData(); } + /** + * @param formDTO + * @author yinzuomei + * @description 009、根据客户id查询根客户信息 + * @Date 2021/2/2 22:30 + **/ + @Override + public CustomerInfoQueryResultDTO queryCustomerInfo(CustomerInfoQueryFormDTO formDTO) { + //调用oper_crm查询根级客户,如果根级客户是外部客户,则需要调用commonservice获取名称 + Result crmResult = operCrmOpenFeignClient.queryCustomerInfoByCustomerId(formDTO.getCustomerId()); + if (!crmResult.success() && null == crmResult.getData()) { + throw new RenException("调用oper_crm查询客户信息异常"+crmResult.getInternalMsg()); + } + return ConvertUtils.sourceToTarget(crmResult.getData(), CustomerInfoQueryResultDTO.class); + } + } diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/CustomerRelationDTO.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/CustomerRelationDTO.java new file mode 100644 index 0000000000..beef2169df --- /dev/null +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/CustomerRelationDTO.java @@ -0,0 +1,110 @@ +/** + * 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; + + +/** + * 客户关系表(01.14 add) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-03 + */ +@Data +public class CustomerRelationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 父级客户id;如果是顶级客户,此列=0 + */ + private String parentCustomerId; + + /** + * 当前客户类型取值: external:外部客户,internal:内部客户 + */ + private String customerType; + + /** + * 父级客户类型取值: external:外部客户,internal:内部客户;如果是顶级客户,此列=0 + */ + private String parentCustomerType; + + /** + * open,closed是否启用 + */ + private String status; + + /** + * 当前客户级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) + */ + private String level; + + /** + * 当前客户的地区编码,实际就是根组织的area_code + */ + private String areaCode; + + /** + * 删除标识0未删除1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerRelationInfoResultDTO.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerRelationInfoResultDTO.java new file mode 100644 index 0000000000..99fb265f8a --- /dev/null +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerRelationInfoResultDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.result; + +import lombok.Data; + +/** + * 009、根据客户id查询根客户信息 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/3 11:15 + */ +@Data +public class CustomerRelationInfoResultDTO { + /** + * 客户id + */ + private String customerId; + + /** + * 当前客户id的根级客户id,返回值0代表当前客户是根客户没有上级客户 + */ + private String rootCustomerId; + +} diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java index 496dcd636a..6725a257a1 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java @@ -9,9 +9,12 @@ import com.epmet.dto.form.CustomerAppSecretFormDTO; import com.epmet.dto.form.CustomerManagerFormDTO; import com.epmet.dto.form.GridCountFormDTO; import com.epmet.dto.result.CrmParameterResultDTO; +import com.epmet.dto.result.CustomerRelationInfoResultDTO; import com.epmet.dto.result.GridCountResultDTO; import com.epmet.feign.fallback.OperCrmOpenFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -24,7 +27,7 @@ import java.util.List; * @date 2020/6/4 13:25 */ @FeignClient(name = ServiceConstant.OPER_CRM_SERVER, fallback = OperCrmOpenFeignClientFallback.class) -//@FeignClient(name = ServiceConstant.OPER_CRM_SERVER, fallback = OperCrmOpenFeignClientFallback.class, url = "localhost:8090") +// @FeignClient(name = ServiceConstant.OPER_CRM_SERVER, fallback = OperCrmOpenFeignClientFallback.class, url = "localhost:8090") public interface OperCrmOpenFeignClient { /** * 获取客户信息 @@ -94,4 +97,13 @@ public interface OperCrmOpenFeignClient { */ @PostMapping("/oper/crm/parameter/parameterupdate") Result updateParamInfo(@RequestBody List formDTOS); + + /** + * @param customerId + * @author yinzuomei + * @description 009、根据客户id查询根客户信息 + * @Date 2021/2/3 12:44 + **/ + @GetMapping("/oper/crm/customer/querycustomerinfobycustomerid/{customerId}") + Result queryCustomerInfoByCustomerId(@PathVariable("customerId") String customerId); } diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java index d18f98065a..fc0fd76fb8 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java @@ -10,6 +10,7 @@ import com.epmet.dto.form.CustomerAppSecretFormDTO; import com.epmet.dto.form.CustomerManagerFormDTO; import com.epmet.dto.form.GridCountFormDTO; import com.epmet.dto.result.CrmParameterResultDTO; +import com.epmet.dto.result.CustomerRelationInfoResultDTO; import com.epmet.dto.result.GridCountResultDTO; import com.epmet.feign.OperCrmOpenFeignClient; import org.springframework.stereotype.Component; @@ -69,4 +70,15 @@ public class OperCrmOpenFeignClientFallback implements OperCrmOpenFeignClient { public Result updateParamInfo(List formDTOS) { return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "updateParamInfo", formDTOS); } + + /** + * @param customerId + * @author yinzuomei + * @description 009、根据客户id查询根客户信息 + * @Date 2021/2/3 12:44 + **/ + @Override + public Result queryCustomerInfoByCustomerId(String customerId) { + return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "queryCustomerInfoByCustomerId", customerId); + } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index e4ae80fc6e..0ae86f3ada 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -31,13 +31,11 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.CustomerDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.CustomerDetailResultDTO; -import com.epmet.dto.result.CustomerInfoResultDTO; -import com.epmet.dto.result.GridCountResultDTO; -import com.epmet.dto.result.ValidCustomerResultDTO; +import com.epmet.dto.result.*; import com.epmet.excel.CustomerExcel; import com.epmet.feign.GovOrgFeignClient; import com.epmet.service.CustomerService; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -330,4 +328,18 @@ public class CustomerController { return new Result(); } + /** + * @param customerId + * @author yinzuomei + * @description 009、根据客户id查询根客户信息 + * @Date 2021/2/3 12:52 + **/ + @GetMapping("querycustomerinfobycustomerid/{customerId}") + public Result queryCustomerInfoByCustomerId(@PathVariable("customerId") String customerId){ + if(StringUtils.isNotBlank(customerId)){ + CustomerRelationInfoResultDTO resultDTO=customerService.queryCustomerInfoByCustomerId(customerId); + return new Result().ok(resultDTO); + } + return new Result<>(); + } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerRelationDao.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerRelationDao.java new file mode 100644 index 0000000000..3b30a4cbb3 --- /dev/null +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerRelationDao.java @@ -0,0 +1,35 @@ +/** + * 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.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.CustomerRelationDTO; +import com.epmet.entity.CustomerRelationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户关系表(01.14 add) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-03 + */ +@Mapper +public interface CustomerRelationDao extends BaseDao { + + CustomerRelationDTO selectByCustomerId(String customerId); +} \ No newline at end of file diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/entity/CustomerRelationEntity.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/entity/CustomerRelationEntity.java new file mode 100644 index 0000000000..4843ba4506 --- /dev/null +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/entity/CustomerRelationEntity.java @@ -0,0 +1,77 @@ +/** + * 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.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 客户关系表(01.14 add) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-03 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("customer_relation") +public class CustomerRelationEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 父级客户id;如果是顶级客户,此列=0 + */ + private String parentCustomerId; + + /** + * 当前客户类型取值: external:外部客户,internal:内部客户 + */ + private String customerType; + + /** + * 父级客户类型取值: external:外部客户,internal:内部客户;如果是顶级客户,此列=0 + */ + private String parentCustomerType; + + /** + * open,closed是否启用 + */ + private String status; + + /** + * 当前客户级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) + */ + private String level; + + /** + * 当前客户的地区编码,实际就是根组织的area_code + */ + private String areaCode; + +} diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerRelationService.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerRelationService.java new file mode 100644 index 0000000000..29f9118b51 --- /dev/null +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerRelationService.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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.CustomerRelationDTO; +import com.epmet.entity.CustomerRelationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户关系表(01.14 add) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-03 + */ +public interface CustomerRelationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-03 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-03 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CustomerRelationDTO + * @author generator + * @date 2021-02-03 + */ + CustomerRelationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-03 + */ + void save(CustomerRelationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-03 + */ + void update(CustomerRelationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-03 + */ + void delete(String[] ids); + + /** + * 根据客户id,查询客户关系表 + * + * @param customerId + * @return void + * @author generator + * @date 2021-02-03 + */ + CustomerRelationDTO getByCustomerId(String customerId); + + /** + * 获取某个客户的根客户id + * + * @param customerId + * @return void + * @author generator + * @date 2021-02-03 + */ + String getRootCustomerId(String customerId); + +} \ No newline at end of file diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java index c9745552ed..82e872e511 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java @@ -22,10 +22,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.CustomerDetailResultDTO; -import com.epmet.dto.result.CustomerInfoResultDTO; -import com.epmet.dto.result.GridCountResultDTO; -import com.epmet.dto.result.ValidCustomerResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.CustomerEntity; import java.text.ParseException; @@ -222,4 +219,11 @@ public interface CustomerService extends BaseService { */ void updateCustomerParameter(UpdateCustomerParameterFormDTO formDTO) throws ParseException; + /** + * @param customerId + * @author yinzuomei + * @description 009、根据客户id查询根客户信息 返参DTO + * @Date 2021/2/3 12:52 + **/ + CustomerRelationInfoResultDTO queryCustomerInfoByCustomerId(String customerId); } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerRelationServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerRelationServiceImpl.java new file mode 100644 index 0000000000..79bf41cff9 --- /dev/null +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerRelationServiceImpl.java @@ -0,0 +1,140 @@ +/** + * 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.service.impl; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.CustomerRelationDao; +import com.epmet.dto.CustomerRelationDTO; +import com.epmet.entity.CustomerRelationEntity; +import com.epmet.service.CustomerRelationService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 客户关系表(01.14 add) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-03 + */ +@Slf4j +@Service +public class CustomerRelationServiceImpl extends BaseServiceImpl implements CustomerRelationService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CustomerRelationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CustomerRelationDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public CustomerRelationDTO get(String id) { + CustomerRelationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CustomerRelationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CustomerRelationDTO dto) { + CustomerRelationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerRelationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CustomerRelationDTO dto) { + CustomerRelationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerRelationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 根据客户id,查询客户关系表 + * + * @param customerId + * @return void + * @author generator + * @date 2021-02-03 + */ + @Override + public CustomerRelationDTO getByCustomerId(String customerId) { + return baseDao.selectByCustomerId(customerId); + } + + /** + * 获取某个客户的根客户id + * + * @param customerId + * @return void + * @author generator + * @date 2021-02-03 + */ + @Override + public String getRootCustomerId(String customerId) { + CustomerRelationDTO customerRelationDTO=this.getByCustomerId(customerId); + if (null == customerRelationDTO) { + log.info(String.format("根据客户id:%s查找customer_relation为空",customerId)); + return StrConstant.EPMETY_STR; + } + log.info(JSON.toJSONString(customerRelationDTO,true)); + if (!NumConstant.ZERO_STR.equals(customerRelationDTO.getParentCustomerId())) { + log.info("parentCustomerId is not equals 0 so continue"); + return getRootCustomerId(customerRelationDTO.getParentCustomerId()); + } + return customerRelationDTO.getCustomerId(); + } + +} \ No newline at end of file diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index 9080d1573f..9d4bc93994 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -42,6 +42,7 @@ import com.epmet.dto.result.*; import com.epmet.entity.CustomerEntity; import com.epmet.feign.*; import com.epmet.redis.CustomerRedis; +import com.epmet.service.CustomerRelationService; import com.epmet.service.CustomerService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -84,6 +85,8 @@ public class CustomerServiceImpl extends BaseServiceImpl page(Map params) { @@ -738,4 +741,24 @@ public class CustomerServiceImpl extends BaseServiceImpl - + diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerRelationDao.xml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerRelationDao.xml new file mode 100644 index 0000000000..e3af5415b1 --- /dev/null +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerRelationDao.xml @@ -0,0 +1,16 @@ + + + + + + + + \ No newline at end of file From 4ac78d99dcf95a06e8471a36d983003e6d643e47 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 3 Feb 2021 14:46:04 +0800 Subject: [PATCH 046/101] =?UTF-8?q?customer=5Frelation=20=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E6=94=BE=E5=88=B0crm=E6=9C=8D=E5=8A=A1=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9Epids?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java | 2 +- .../main/java/com/epmet/dao/crm/CustomerRelationDao.java | 2 +- .../java/com/epmet/entity/crm/CustomerRelationEntity.java | 5 +++++ .../com/epmet/service/crm/CustomerRelationService.java | 2 +- .../service/crm/impl/CustomerRelationServiceImpl.java | 2 +- .../indexcal/impl/IndexCalculateServiceImpl.java | 4 ++-- .../V0.0.6__alter_dimcustomer_add_areaCode_col.sql | 3 +++ .../src/main/resources/mapper/crm/CustomerRelationDao.xml | 2 +- .../src/main/java/com/epmet/dto/CustomerRelationDTO.java | 8 +++++++- .../java/com/epmet/entity/CustomerRelationEntity.java | 5 +++++ .../db/migration/V0.0.7__create_customer_relation.sql} | 6 +----- 11 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__alter_dimcustomer_add_areaCode_col.sql rename epmet-module/{data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__indexcal_addCustomerAreaCodeAndCustomerRelationTb.sql => oper-crm/oper-crm-server/src/main/resources/db/migration/V0.0.7__create_customer_relation.sql} (77%) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java index 95d7189f6d..0e9f0c961e 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java @@ -6,7 +6,7 @@ import java.io.Serializable; import java.util.List; /** - * 描述一下 + * 查询当前客户的area_code信息、以及下一级客户列表 * * @author yinzuomei@elink-cn.com * @date 2021/1/14 16:17 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java index 8876498774..d79e843076 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java @@ -37,7 +37,7 @@ public interface CustomerRelationDao extends BaseDao { /** * @param customerIds * @author yinzuomei - * @description 查询当前客户的area_code信息、以及子客户列表 + * @description 查询当前客户的area_code信息、以及下一级客户列表 * @Date 2021/1/21 11:27 **/ List selectCustomerSubInfo(@Param("list") List customerIds); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java index 786cbe96f5..9de6f223d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerRelationEntity.java @@ -45,6 +45,11 @@ public class CustomerRelationEntity extends BaseEpmetEntity { */ private String parentCustomerId; + /** + * 当前客户的所有父级客户id,以英文冒号隔开,如果是顶级客户,此列=0 + */ + private String pids; + /** * 当前客户类型取值: external:外部客户,internal:内部客户 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java index 6b7cec2291..25e3272436 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java @@ -37,7 +37,7 @@ public interface CustomerRelationService extends BaseService * @param customerIds * @author yinzuomei - * @description 查询每个客户的area_code以及子客户列表 + * @description 查询每个客户的area_code、以及下一级客户列表 * @Date 2021/1/14 16:22 **/ Map getCustomerInfoMap(List customerIds); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java index 7b6b5ea570..9b6c4ab7f1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java @@ -47,7 +47,7 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl * @author yinzuomei - * @description 查询每个客户的area_code以及子客户列表 + * @description 查询每个客户的area_code、以及下一级客户列表 * @Date 2021/1/14 16:22 **/ @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index 761cc75ff4..82142afec4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -76,7 +76,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { customerIds.add(formDTO.getCustomerId()); } - //查询客户编码、子客户信息 add01.14 + //查询客户编码、以及下一级客户列表 add01.14 Map customerInfoMap=this.getCustomerInfoMap(customerIds); Boolean flag = false; @@ -196,7 +196,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { /** * @param customerIds * @author yinzuomei - * @description 查询当前客户的area_code信息、以及子客户列表 + * @description 查询当前客户的area_code信息、以及下一级客户列表 * @Date 2021/1/21 11:28 **/ private Map getCustomerInfoMap(List customerIds) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__alter_dimcustomer_add_areaCode_col.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__alter_dimcustomer_add_areaCode_col.sql new file mode 100644 index 0000000000..e4ab88b03d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.6__alter_dimcustomer_add_areaCode_col.sql @@ -0,0 +1,3 @@ +-- 一、epmet_data_statistical 库sql脚本: +-- 1、客户维度表新增 area_code列 +alter table dim_customer add COLUMN AREA_CODE varchar(12) default '' comment '客户所属行政地区编码,取值来自客户根组织的area_code(01.14 add)'after CUSTOMER_NAME; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml index a942ca5995..b6d60ae9a4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml @@ -10,7 +10,7 @@ - + SELECT cr.* @@ -13,4 +13,14 @@ AND cr.CUSTOMER_ID =#{customerId} + + \ No newline at end of file From 6fe6508addb4a841fdbef1bbade7c98098b9a768 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 4 Feb 2021 10:03:48 +0800 Subject: [PATCH 052/101] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86=E6=96=B0=E5=A2=9Escreen=5F?= =?UTF-8?q?customer=5Fwork=5Frecord=5Fdict?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V0.0.8__add_plugins_table.sql | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql index 7c143e0e8b..e8d9f98af2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql @@ -72,11 +72,8 @@ CREATE TABLE `screen_work_record_grid_monthly` ( `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id:yyyyMM', `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的组织id', - `DATA_TYPE` varchar(32) DEFAULT 'party' COMMENT '数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice', - `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码', - `MEETING_NAME` varchar(255) DEFAULT NULL COMMENT '会议名称;举例:三会一课、党员志愿服务', - `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码', - `TYPE_NAME` varchar(255) NOT NULL COMMENT '随手记类型名称;举例:联建共建、支部建设、为民服务', + `MEETING_CODE` varchar(255) NOT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', + `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '总的参与次数', @@ -97,11 +94,8 @@ CREATE TABLE `screen_work_record_org_monthly` ( `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id:yyyyMM', `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id', `PARENT_ID` varchar(64) NOT NULL COMMENT '当前组织所属上级组织,如果是跟组织,此列为0', - `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码', - `MEETING_NAME` varchar(255) DEFAULT NULL COMMENT '会议名称;举例:三会一课、党员志愿服务', - `DATA_TYPE` varchar(32) NOT NULL DEFAULT 'party' COMMENT '数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice', - `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码', - `TYPE_NAME` varchar(255) NOT NULL COMMENT '随手记类型名称;举例:联建共建、支部建设、为民服务', + `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', + `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '总的参与次数', @@ -113,4 +107,27 @@ CREATE TABLE `screen_work_record_org_monthly` ( `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-组织按月统计'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-组织按月统计'; + +drop table if EXISTS screen_customer_work_record_dict; +CREATE TABLE `screen_customer_work_record_dict` ( + `ID` varchar(32) NOT NULL COMMENT '主键(客户每次上传,直接根据customerId全删全增)', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至日期eg:20200101', + `DICT_ID` varchar(32) NOT NULL COMMENT '资源id', + `PID` varchar(32) NOT NULL COMMENT '父资源ID;如果是一级分类pid=0', + `RESOURCE_TYPE` varchar(32) DEFAULT NULL COMMENT '资源类型', + `RESOURCE_CODE` varchar(32) NOT NULL COMMENT '资源编码', + `RESOURCE_LABEL` varchar(128) NOT NULL COMMENT '资源标签名', + `SHOW_FLAG` varchar(1) NOT NULL COMMENT '显示标识:0否,1是', + `SORT` int(10) NOT NULL DEFAULT '0' COMMENT '排序', + `DATA_TYPE` varchar(32) DEFAULT 'party' COMMENT '数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中', + `LEVEL` int(11) NOT NULL COMMENT '当前资源属于几级,例如:1、2、3、4....', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '逻辑删除标识', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志资源字典表'; \ No newline at end of file From bbcc918b3582177d99cb42c607bfe6f708abc779 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 4 Feb 2021 10:13:26 +0800 Subject: [PATCH 053/101] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ScreenProjectCategoryGridDailyServiceImpl.java | 6 +++++- .../impl/ScreenProjectCategoryOrgDailyServiceImpl.java | 6 +++++- .../screen/impl/ScreenProjectGridDailyServiceImpl.java | 5 ++++- .../screen/impl/ScreenProjectOrgDailyServiceImpl.java | 5 ++++- .../impl/ScreenProjectQuantityGridMonthlyServiceImpl.java | 5 ++++- .../impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java | 6 ++++-- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java index 7d709e2229..3b67c5f73d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; @@ -30,6 +31,7 @@ import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryGridDailyService; +import com.google.common.collect.Lists; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -117,7 +119,9 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl { + baseDao.insertBatch(list,customerId,"APP_USER",data.getDateId()); + }); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index e2c4081477..a2d79822aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; @@ -30,6 +31,7 @@ import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryOrgDailyService; +import com.google.common.collect.Lists; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -117,7 +119,9 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl { + baseDao.insertBatch(list,customerId,"APP_USER",data.getDateId()); + }); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java index 68a566f849..c4ef3eb7d9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java @@ -38,6 +38,7 @@ import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectGridDailyEntity; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import com.epmet.service.evaluationindex.screen.ScreenProjectGridDailyService; +import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; @@ -138,7 +139,9 @@ public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl { + baseDao.insertBatch(list,customerId,"APP_USER",data.getDateId()); + }); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java index e59d6feef7..3f69596cd3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java @@ -35,6 +35,7 @@ import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectOrgDailyEntity; import com.epmet.service.evaluationindex.screen.ScreenProjectOrgDailyService; +import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; @@ -133,7 +134,9 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl { + baseDao.insertBatch(list,customerId,"APP_USER",data.getDateId()); + }); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java index a99419db97..405c5fc3a3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java @@ -40,6 +40,7 @@ import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityGridMonthlyEntity; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; +import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; @@ -139,7 +140,9 @@ public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); } } - baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getMonthId()); + Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + baseDao.insertBatch(list,customerId,"APP_USER",data.getMonthId()); + }); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java index 20f6b8bd01..15b8a46201 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -35,8 +35,8 @@ import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; import com.epmet.dto.screen.ScreenProjectQuantityOrgMonthlyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyEntity; -import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService; import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService; +import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; @@ -133,7 +133,9 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl< affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); } } - baseDao.insertBatch(data.getDataList(),customerId,"APP_USER",data.getMonthId()); + Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + baseDao.insertBatch(list,customerId,"APP_USER",data.getMonthId()); + }); } /** From b8271c2638ec7a7ff75f8c3a1d6b6bfa572b6238 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 4 Feb 2021 16:18:07 +0800 Subject: [PATCH 054/101] =?UTF-8?q?workrecord=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenCustomerWorkRecordDictDTO.java | 126 ++++++++++++++++++ .../ScreenWorkRecordGridMonthlyDTO.java | 121 +++++++++++++++++ .../ScreenWorkRecordOrgMonthlyDTO.java | 121 +++++++++++++++++ .../plugins/WorkRecordColController.java | 87 +++++++++++- .../ScreenCustomerWorkRecordDictDao.java | 41 ++++++ .../ScreenWorkRecordGridMonthlyDao.java | 41 ++++++ .../ScreenWorkRecordOrgMonthlyDao.java | 42 ++++++ .../ScreenCustomerWorkRecordDictEntity.java | 96 +++++++++++++ .../ScreenWorkRecordGridMonthlyEntity.java | 91 +++++++++++++ .../ScreenWorkRecordOrgMonthlyEntity.java | 91 +++++++++++++ .../ScreenCustomerWorkRecordDictService.java | 106 +++++++++++++++ .../ScreenWorkRecordGridMonthlyService.java | 106 +++++++++++++++ .../ScreenWorkRecordOrgMonthlyService.java | 106 +++++++++++++++ ...reenCustomerWorkRecordDictServiceImpl.java | 122 +++++++++++++++++ ...creenWorkRecordGridMonthlyServiceImpl.java | 126 ++++++++++++++++++ ...ScreenWorkRecordOrgMonthlyServiceImpl.java | 126 ++++++++++++++++++ .../ScreenCustomerWorkRecordDictDao.xml | 98 ++++++++++++++ .../ScreenWorkRecordGridMonthlyDao.xml | 94 +++++++++++++ .../plugins/ScreenWorkRecordOrgMonthlyDao.xml | 96 +++++++++++++ 19 files changed, 1834 insertions(+), 3 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenCustomerWorkRecordDictDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenCustomerWorkRecordDictDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenCustomerWorkRecordDictEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenCustomerWorkRecordDictDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenCustomerWorkRecordDictDTO.java new file mode 100644 index 0000000000..9718304450 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenCustomerWorkRecordDictDTO.java @@ -0,0 +1,126 @@ +/** + * 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.plugins; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Data +public class ScreenCustomerWorkRecordDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键(客户每次上传,直接根据customerId全删全增) + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至日期eg:20200101 + */ + private String dateId; + + /** + * 资源id + */ + private String dictId; + + /** + * 父资源ID;如果是一级分类pid=0 + */ + private String pid; + + /** + * 资源类型 + */ + private String resourceType; + + /** + * 资源编码 + */ + private String resourceCode; + + /** + * 资源标签名 + */ + private String resourceLabel; + + /** + * 显示标识:0否,1是 + */ + private String showFlag; + + /** + * 排序 + */ + private Integer sort; + + /** + * 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中 + */ + private String dataType; + + /** + * 当前资源属于几级,例如:1、2、3、4.... + */ + private Integer level; + + /** + * 逻辑删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java new file mode 100644 index 0000000000..77e3d81cf6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java @@ -0,0 +1,121 @@ +/** + * 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.plugins; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 工作日志-网格按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Data +public class ScreenWorkRecordGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月份Id:yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String agencyId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 当前组织参与的总次数 + */ + private Integer participateTotal; + + /** + * 总的参与次数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人次 + */ + private Integer avgParticipateUserTotal; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java new file mode 100644 index 0000000000..140fdf97a3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java @@ -0,0 +1,121 @@ +/** + * 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.plugins; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 工作日志-组织按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Data +public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月份Id:yyyyMM + */ + private String monthId; + + /** + * 组织Id + */ + private String orgId; + + /** + * 当前组织所属上级组织,如果是跟组织,此列为0 + */ + private String parentId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 当前组织参与的总次数 + */ + private Integer participateTotal; + + /** + * 总的参与次数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人次 + */ + private Integer avgParticipateUserTotal; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java index 12c26d4210..a8d08bd080 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java @@ -1,7 +1,20 @@ package com.epmet.controller.plugins; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.exception.ValidateException; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO; +import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO; +import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.service.plugins.ScreenCustomerWorkRecordDictService; +import com.epmet.service.plugins.ScreenWorkRecordGridMonthlyService; +import com.epmet.service.plugins.impl.ScreenWorkRecordOrgMonthlyServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; /** * 工作日志数据采集 @@ -11,6 +24,74 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @RequestMapping("plugins/workrecord") +@Slf4j public class WorkRecordColController { - //todo + + @Autowired + ScreenCustomerWorkRecordDictService dictService; + @Autowired + ScreenWorkRecordGridMonthlyService gridMonthlyService; + @Autowired + ScreenWorkRecordOrgMonthlyServiceImpl orgMonthlyService; + + /** + * @Description 【工作日志】客户资源字典信息上传 + * + * 按月上传工作日志统计数据时,同步调用此接口上传字典信息 + * @param customerId + * @param data + * @return com.epmet.commons.tools.utils.Result + * @author wangc + * @date 2021.02.04 16:16 + */ + @PostMapping("resource-dict") + public Result resourceDict(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ + if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || + StringUtils.isBlank(data.getDateId())) { + log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data)); + throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); + } + dictService.collect(customerId,data); + return new Result(); + } + + /** + * @Description 【工作日志】网格按月统计 + * @param customerId + * @param data + * @return com.epmet.commons.tools.utils.Result + * @author wangc + * @date 2021.02.04 16:16 + */ + @PostMapping("grid-monthly") + public Result collectGrid(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ + if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || + StringUtils.isBlank(data.getMonthId())) { + log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data)); + throw new ValidateException("客户Id、上传数据列表、月份Id不可为空"); + } + gridMonthlyService.collect(customerId,data); + return new Result(); + } + + /** + * @Description 【工作日志】组织按月统计 + * @param customerId + * @param data + * @return com.epmet.commons.tools.utils.Result + * @author wangc + * @date 2021.02.04 16:16 + */ + @PostMapping("org-monthly") + public Result collectOrg(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ + if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || + StringUtils.isBlank(data.getMonthId())) { + log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data)); + throw new ValidateException("客户Id、上传数据列表、月份Id不可为空"); + } + orgMonthlyService.collect(customerId,data); + return new Result(); + } + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenCustomerWorkRecordDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenCustomerWorkRecordDictDao.java new file mode 100644 index 0000000000..9a1cd92056 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenCustomerWorkRecordDictDao.java @@ -0,0 +1,41 @@ +/** + * 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.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO; +import com.epmet.entity.plugins.ScreenCustomerWorkRecordDictEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Mapper +public interface ScreenCustomerWorkRecordDictDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId); + + void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("dateId") String dateId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java new file mode 100644 index 0000000000..febf60d61a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java @@ -0,0 +1,41 @@ +/** + * 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.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO; +import com.epmet.entity.plugins.ScreenWorkRecordGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 工作日志-网格按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Mapper +public interface ScreenWorkRecordGridMonthlyDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId,@Param("monthId") String monthId); + + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("monthId") String monthId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java new file mode 100644 index 0000000000..ccf7baed54 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java @@ -0,0 +1,42 @@ +/** + * 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.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO; +import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 工作日志-组织按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Mapper +public interface ScreenWorkRecordOrgMonthlyDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId, @Param("monthId") String monthId); + + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("monthId") String monthId); + + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenCustomerWorkRecordDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenCustomerWorkRecordDictEntity.java new file mode 100644 index 0000000000..067a349205 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenCustomerWorkRecordDictEntity.java @@ -0,0 +1,96 @@ +/** + * 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.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_customer_work_record_dict") +public class ScreenCustomerWorkRecordDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至日期eg:20200101 + */ + private String dateId; + + /** + * 资源id + */ + private String dictId; + + /** + * 父资源ID;如果是一级分类pid=0 + */ + private String pid; + + /** + * 资源类型 + */ + private String resourceType; + + /** + * 资源编码 + */ + private String resourceCode; + + /** + * 资源标签名 + */ + private String resourceLabel; + + /** + * 显示标识:0否,1是 + */ + private String showFlag; + + /** + * 排序 + */ + private Integer sort; + + /** + * 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中 + */ + private String dataType; + + /** + * 当前资源属于几级,例如:1、2、3、4.... + */ + private Integer level; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java new file mode 100644 index 0000000000..47e993fbe8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java @@ -0,0 +1,91 @@ +/** + * 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.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 工作日志-网格按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_work_record_grid_monthly") +public class ScreenWorkRecordGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月份Id:yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String agencyId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 当前组织参与的总次数 + */ + private Integer participateTotal; + + /** + * 总的参与次数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人次 + */ + private Integer avgParticipateUserTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java new file mode 100644 index 0000000000..b87839daed --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java @@ -0,0 +1,91 @@ +/** + * 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.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 工作日志-组织按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_work_record_org_monthly") +public class ScreenWorkRecordOrgMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月份Id:yyyyMM + */ + private String monthId; + + /** + * 组织Id + */ + private String orgId; + + /** + * 当前组织所属上级组织,如果是跟组织,此列为0 + */ + private String parentId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 当前组织参与的总次数 + */ + private Integer participateTotal; + + /** + * 总的参与次数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人次 + */ + private Integer avgParticipateUserTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java new file mode 100644 index 0000000000..6f5ac2573e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java @@ -0,0 +1,106 @@ +/** + * 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.service.plugins; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.plugins.ScreenCustomerWorkRecordDictEntity; + +import java.util.List; +import java.util.Map; + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +public interface ScreenCustomerWorkRecordDictService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-04 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-04 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenCustomerWorkRecordDictDTO + * @author generator + * @date 2021-02-04 + */ + ScreenCustomerWorkRecordDictDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-04 + */ + void save(ScreenCustomerWorkRecordDictDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-04 + */ + void update(ScreenCustomerWorkRecordDictDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-04 + */ + void delete(String[] ids); + + /** + * @Description 数据录入 + * @param customerId + * @param data + * @return void + * @author wangc + * @date 2021.02.04 15:27 + */ + void collect(String customerId, ScreenCollFormDTO data); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java new file mode 100644 index 0000000000..45622e29fd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java @@ -0,0 +1,106 @@ +/** + * 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.service.plugins; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.plugins.ScreenWorkRecordGridMonthlyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 工作日志-网格按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +public interface ScreenWorkRecordGridMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-04 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-04 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenWorkRecordGridMonthlyDTO + * @author generator + * @date 2021-02-04 + */ + ScreenWorkRecordGridMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-04 + */ + void save(ScreenWorkRecordGridMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-04 + */ + void update(ScreenWorkRecordGridMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-04 + */ + void delete(String[] ids); + + /** + * @Description 数据录入 + * @param customerId + * @param data + * @return void + * @author wangc + * @date 2021.02.04 15:27 + */ + void collect(String customerId, ScreenCollFormDTO data); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java new file mode 100644 index 0000000000..a9368a66bc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java @@ -0,0 +1,106 @@ +/** + * 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.service.plugins; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 工作日志-组织按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +public interface ScreenWorkRecordOrgMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-04 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-04 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenWorkRecordOrgMonthlyDTO + * @author generator + * @date 2021-02-04 + */ + ScreenWorkRecordOrgMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-04 + */ + void save(ScreenWorkRecordOrgMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-04 + */ + void update(ScreenWorkRecordOrgMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-04 + */ + void delete(String[] ids); + + /** + * @Description 数据录入 + * @param customerId + * @param data + * @return void + * @author wangc + * @date 2021.02.04 15:27 + */ + void collect(String customerId, ScreenCollFormDTO data); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java new file mode 100644 index 0000000000..31a0cd49ee --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java @@ -0,0 +1,122 @@ +/** + * 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.service.plugins.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.plugins.ScreenCustomerWorkRecordDictDao; +import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.plugins.ScreenCustomerWorkRecordDictEntity; +import com.epmet.service.plugins.ScreenCustomerWorkRecordDictService; +import com.google.common.collect.Lists; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Service +public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl implements ScreenCustomerWorkRecordDictService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenCustomerWorkRecordDictDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenCustomerWorkRecordDictDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenCustomerWorkRecordDictDTO get(String id) { + ScreenCustomerWorkRecordDictEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenCustomerWorkRecordDictDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenCustomerWorkRecordDictDTO dto) { + ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenCustomerWorkRecordDictDTO dto) { + ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Transactional(rollbackFor = Exception.class) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) + @Override + public void collect(String customerId, ScreenCollFormDTO data) { + if(data.getIsFirst()){ + int affectedRows = baseDao.deleteBatch(customerId); + while(affectedRows > 0){ + affectedRows = baseDao.deleteBatch(customerId); + } + } + Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + baseDao.insertBatch(list,customerId,data.getDateId()); + }); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java new file mode 100644 index 0000000000..424cdd9a2b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java @@ -0,0 +1,126 @@ +/** + * 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.service.plugins.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.plugins.ScreenWorkRecordGridMonthlyDao; +import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.plugins.ScreenWorkRecordGridMonthlyEntity; +import com.epmet.service.plugins.ScreenWorkRecordGridMonthlyService; +import com.google.common.collect.Lists; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工作日志-网格按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Service +public class ScreenWorkRecordGridMonthlyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordGridMonthlyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenWorkRecordGridMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordGridMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenWorkRecordGridMonthlyDTO get(String id) { + ScreenWorkRecordGridMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordGridMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenWorkRecordGridMonthlyDTO dto) { + ScreenWorkRecordGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordGridMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenWorkRecordGridMonthlyDTO dto) { + ScreenWorkRecordGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordGridMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @Description 数据录入 + * @param customerId + * @param data + * @return void + * @author wangc + * @date 2021.02.04 15:27 + */ + @Override + public void collect(String customerId, ScreenCollFormDTO data) { + if(data.getIsFirst()){ + int affectedRows = baseDao.deleteBatch(customerId,data.getMonthId()); + while(affectedRows > 0){ + affectedRows = baseDao.deleteBatch(customerId,data.getMonthId()); + } + } + Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + baseDao.insertBatch(list,customerId,data.getMonthId()); + }); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java new file mode 100644 index 0000000000..b28da6d953 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java @@ -0,0 +1,126 @@ +/** + * 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.service.plugins.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.plugins.ScreenWorkRecordOrgMonthlyDao; +import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; +import com.epmet.service.plugins.ScreenWorkRecordOrgMonthlyService; +import com.google.common.collect.Lists; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工作日志-组织按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-04 + */ +@Service +public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordOrgMonthlyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenWorkRecordOrgMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordOrgMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenWorkRecordOrgMonthlyDTO get(String id) { + ScreenWorkRecordOrgMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordOrgMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenWorkRecordOrgMonthlyDTO dto) { + ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenWorkRecordOrgMonthlyDTO dto) { + ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @Description 数据录入 + * @param customerId + * @param data + * @return void + * @author wangc + * @date 2021.02.04 15:27 + */ + @Override + public void collect(String customerId, ScreenCollFormDTO data) { + if(data.getIsFirst()){ + int affectedRows = baseDao.deleteBatch(customerId,data.getMonthId()); + while(affectedRows > 0){ + affectedRows = baseDao.deleteBatch(customerId,data.getMonthId()); + } + } + Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + baseDao.insertBatch(list,customerId,data.getMonthId()); + }); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml new file mode 100644 index 0000000000..732a6c9c13 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO screen_customer_work_record_dict + ( + id, + customer_id, + date_id, + dict_id, + pid, + resource_type, + resource_code, + resource_label, + show_flag, + sort, + data_type, + `level`, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + + #{customerId}, + + #{dateId}, + + #{item.dictId}, + + #{item.pid}, + + #{item.resourceType}, + + #{item.resourceCode}, + + #{item.resourceLabel}, + + #{item.showFlag}, + + #{item.closedTotal}, + + #{item.sort}, + + #{item.dataType}, + + #{item.level}, + + '0', + + 0, + + 'APP_USER', + + now(), + + 'APP_USER', + + now() + ) + + + + + delete from screen_customer_work_record_dict + where customer_id = #{customerId} + limit 1000 + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml new file mode 100644 index 0000000000..02ecd54811 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO screen_work_record_grid_monthly + ( + id, + customer_id, + month_id, + grid_id, + agency_id, + meeting_code, + type_code, + organize_total, + participate_total, + participate_user_total, + avg_participate_user_total, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + + #{customerId}, + + #{monthId}, + + #{item.gridId}, + + #{item.agencyId}, + + #{item.meetingCode}, + + #{item.typeCode}, + + #{item.organizeTotal}, + + #{item.participateTotal}, + + #{item.participateUserTotal}, + + #{item.avgParticipateUserTotal}, + + '0', + + 0, + + 'APP_USER', + + now(), + + 'APP_USER', + + now() + ) + + + + + delete from screen_work_record_grid_monthly + where customer_id = #{customerId} + and month_id = #{monthId} + limit 1000 + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml new file mode 100644 index 0000000000..12a966d066 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO screen_work_record_org_monthly + ( + id, + customer_id, + month_id, + org_id, + parent_id, + meeting_code, + type_code, + organize_total, + participate_total, + participate_user_total, + avg_participate_user_total, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + + #{customerId}, + + #{monthId}, + + #{item.orgId}, + + #{item.parentId}, + + #{item.meetingCode}, + + #{item.typeCode}, + + #{item.organizeTotal}, + + #{item.participateTotal}, + + #{item.participateUserTotal}, + + #{item.avgParticipateUserTotal}, + + '0', + + 0, + + 'APP_USER', + + now(), + + 'APP_USER', + + now() + ) + + + + + delete from screen_work_record_org_monthly + where customer_id = #{customerId} + and month_id = #{monthId} + limit 1000 + + + + + \ No newline at end of file From c105e98d55b51059e7c208dff48aa0e527e1b2eb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 4 Feb 2021 22:00:27 +0800 Subject: [PATCH 055/101] /epmet/ext/staff/permissionv2 zancun --- .../tools/constant/ServiceConstant.java | 5 ++ .../epmet/commons/tools/utils/AgencyNode.java | 26 +++++++ .../commons/tools/utils/AgencyTreeUtils.java | 73 +++++++++++++++++++ .../dto/result/plugins/AgencyNodeDTO.java | 50 +++++++++++++ .../epmet/dto/result/plugins/DeptNodeDTO.java | 36 +++++++++ .../epmet/dto/result/plugins/GridNodeDTO.java | 36 +++++++++ .../feign/DataReportOpenFeignClient.java | 27 +++++++ .../DataReportOpenFeignClientFallBack.java | 21 ++++++ .../controller/screen/AgencyController.java | 16 ++++ .../screen/ScreenCustomerAgencyDao.java | 30 ++++++++ .../evaluationindex/screen/AgencyService.java | 8 ++ .../screen/impl/AgencyServiceImpl.java | 29 ++++++++ .../mapper/screen/ScreenCustomerAgencyDao.xml | 46 ++++++++++++ .../migration/V0.0.8__add_plugins_table.sql | 2 +- .../com/epmet/dto/result/AgencyNodeDTO.java | 7 ++ .../com/epmet/dto/result/DeptNodeDTO.java | 7 ++ .../com/epmet/dto/result/GridNodeDTO.java | 7 ++ .../epmet-ext/epmet-ext-server/pom.xml | 6 ++ .../epmet/service/impl/OpenUpServiceImpl.java | 15 +++- .../java/com/epmet/dao/CustomerAgencyDao.java | 8 ++ .../resources/mapper/CustomerAgencyDao.xml | 26 ++++--- 21 files changed, 466 insertions(+), 15 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyNode.java create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyTreeUtils.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/AgencyNodeDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/DeptNodeDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/GridNodeDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java index b66c3c33d2..e104c83e54 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java @@ -119,6 +119,11 @@ public interface ServiceConstant { */ String DATA_STATISTICAL_SERVER = "data-statistical-server"; + /** + * 数据统计结果查询 + */ + String DATA_REPORT_SERVER="data-report-server"; + /** * 微信第三方平台 */ diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyNode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyNode.java new file mode 100644 index 0000000000..e6346d7e50 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyNode.java @@ -0,0 +1,26 @@ +package com.epmet.commons.tools.utils; + +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/4 20:49 + */ +@Data +public class AgencyNode implements Serializable { + + private String areaCode; + + private String parentAreaCode; + + /** + * 子节点列表 + */ + private List subAgencyList = new ArrayList<>(); +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyTreeUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyTreeUtils.java new file mode 100644 index 0000000000..80ad231f47 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyTreeUtils.java @@ -0,0 +1,73 @@ +package com.epmet.commons.tools.utils; + + +import com.epmet.commons.tools.validator.AssertUtils; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/4 20:49 + */ +public class AgencyTreeUtils { + + /** + * 根据pid,构建树节点 + */ + public static List build(List agencyNodes, String parentAreaCode) { + //pid不能为空 + AssertUtils.isNull(parentAreaCode, "parentAreaCode"); + + List treeList = new ArrayList<>(); + for (T agencyNode : agencyNodes) { + if (parentAreaCode.equals(agencyNode.getParentAreaCode())) { + treeList.add(findChildren(agencyNodes, agencyNode)); + } + } + + return treeList; + } + + /** + * 查找子节点 + */ + private static T findChildren(List agencyNodes, T rootNode) { + for (T agencyNode : agencyNodes) { + if (rootNode.getAreaCode().equals(agencyNode.getParentAreaCode())) { + rootNode.getSubAgencyList().add(findChildren(agencyNodes, agencyNode)); + } + } + return rootNode; + } + + /** + * 构建树节点 + */ + public static List build(List agencyNodes) { + List result = new ArrayList<>(); + + //list转map + Map nodeMap = new LinkedHashMap<>(agencyNodes.size()); + for (T agencyNode : agencyNodes) { + nodeMap.put(agencyNode.getAreaCode(), agencyNode); + } + + for (T node : nodeMap.values()) { + T parent = nodeMap.get(node.getParentAreaCode()); + if (parent != null && !(node.getAreaCode().equals(parent.getAreaCode()))) { + parent.getSubAgencyList().add(node); + continue; + } + + result.add(node); + } + + return result; + } + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/AgencyNodeDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/AgencyNodeDTO.java new file mode 100644 index 0000000000..2890092b80 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/AgencyNodeDTO.java @@ -0,0 +1,50 @@ +package com.epmet.dto.result.plugins; + +import com.epmet.commons.tools.utils.AgencyNode; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * 008、当前用户的数据权限(多客户版本) 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/3 20:33 + */ +@Data +public class AgencyNodeDTO extends AgencyNode implements Serializable { + + private static final long serialVersionUID = -3745920378557792529L; + /** + * 直属机关Id + * */ + private String agencyId; + + /** + * 直属机关名称 + * */ + private String agencyName; + + /** + * 机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) + * */ + private String level; + + /** + * 当前agencyId所属的客户id add02.03 + * */ + private String customerId; + + /** + * 直属机关直属网格列表 + * */ + private List gridList = new ArrayList<>(); + + /** + * 直属机关直属部门列表 + * */ + private List departmentList = new ArrayList<>(); + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/DeptNodeDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/DeptNodeDTO.java new file mode 100644 index 0000000000..ed105f71c9 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/DeptNodeDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.result.plugins; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 部门信息 + * @ClassName ExtDeptResultDTO + * @Auth wangc + * @Date 2020-08-17 17:16 + */ +@Data +public class DeptNodeDTO implements Serializable { + private static final long serialVersionUID = 1792371558965832432L; + + /** + * 部门Id + * */ + private String deptId; + + /** + * 部门名称 + * */ + private String deptName; + + /** + * 当前deptId所属的customerId add02.03 + * */ + private String customerId; + + /** + * 当前deptId对应的地区编码 add02.03 + * */ + private String areaCode; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/GridNodeDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/GridNodeDTO.java new file mode 100644 index 0000000000..9199f6fb91 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/GridNodeDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.result.plugins; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 008、当前用户的数据权限(多客户版本) 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/3 20:33 + */ +@Data +public class GridNodeDTO implements Serializable { + private static final long serialVersionUID = -4531574240525562587L; + + /** + * 网格Id + * */ + private String gridId; + + /** + * 网格名称 + * */ + private String gridName; + + /** + * 当前gridId所属的客户id add02.03 + * */ + private String customerId; + + /** + * 当前gridId对应的地区编码 add02.03 + * */ + private String areaCode; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java new file mode 100644 index 0000000000..d3466126a4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java @@ -0,0 +1,27 @@ +package com.epmet.feign; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.plugins.AgencyNodeDTO; +import com.epmet.feign.impl.DataReportOpenFeignClientFallBack; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; + +/** + * 本服务对外开放的API,其他服务通过引用此client调用该服务 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/3 22:05 + */ +// @FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallback = DataReportOpenFeignClientFallBack.class,url = "localhost:8109") +@FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallback = DataReportOpenFeignClientFallBack.class) +public interface DataReportOpenFeignClient { + /** + * @param agencyId + * @description 查询当前组织及下级组织树 + * @Date 2021/2/3 22:05 + **/ + @GetMapping("/data/report/screen/agency/querystaffagencytree/{agencyId}") + Result queryStaffAgencyTree(@PathVariable("agencyId") String agencyId); +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java new file mode 100644 index 0000000000..64a9f66d0f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java @@ -0,0 +1,21 @@ +package com.epmet.feign.impl; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.plugins.AgencyNodeDTO; +import com.epmet.feign.DataReportOpenFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class DataReportOpenFeignClientFallBack implements DataReportOpenFeignClient { + /** + * @param agencyId + * @description 查询当前组织及下级组织树 + * @Date 2021/2/3 22:05 + **/ + @Override + public Result queryStaffAgencyTree(String agencyId) { + return ModuleUtils.feignConError(ServiceConstant.DATA_REPORT_SERVER, "queryStaffAgencyTree",agencyId); + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index 53646ee6dc..9f36b5c21b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -5,11 +5,13 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.dto.form.AreaCodeDictFormDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.plugins.AgencyNodeDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -81,4 +83,18 @@ public class AgencyController { return new Result>().ok(agencyService.areaCodeDictTree(formDTO)); } + /** + * @param agencyId + * @author yinzuomei + * @description 查询当前组织及下级组织树 + * @Date 2021/2/3 22:19 + **/ + @GetMapping("querystaffagencytree/{agencyId}") + public Result queryStaffAgencyTree(@PathVariable("agencyId") String agencyId) { + //todo 单独校验下此方法 + if (StringUtils.isNotBlank(agencyId)) { + return new Result().ok(agencyService.queryStaffAgencyTree(agencyId)); + } + return new Result<>(); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 60c3f1b3cd..af4b0b7af2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -18,6 +18,9 @@ package com.epmet.datareport.dao.evaluationindex.screen; import com.epmet.dto.result.ScreenCustomerAgencyDTO; +import com.epmet.dto.result.plugins.AgencyNodeDTO; +import com.epmet.dto.result.plugins.DeptNodeDTO; +import com.epmet.dto.result.plugins.GridNodeDTO; import com.epmet.evaluationindex.screen.dto.result.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -120,4 +123,31 @@ public interface ScreenCustomerAgencyDao { * @description 查询组织基本信息 **/ ScreenCustomerAgencyDTO selectByAgencyId(@Param("agencyId") String agencyId); + + /** + * @param areaCode + * @author yinzuomei + * @description 根据areaCode查询组织机构 + * @Date 2021/2/4 21:51 + **/ + List queryStaffAgencyTree(@Param("areaCode")String areaCode); + + /** + * @param areaCode + * @param agencyId + * @author yinzuomei + * @description 查找组织下的部门 + * @Date 2021/2/4 21:51 + **/ + List selectDeptList(@Param("areaCode") String areaCode,@Param("agencyId") String agencyId); + + /** + * @param areaCode + * @param agencyId + * @author yinzuomei + * @description 查找组织下的网格 + * @Date 2021/2/4 21:52 + **/ + List selectGridList(@Param("areaCode") String areaCode,@Param("agencyId") String agencyId); + } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index 144e12fe1a..cd71a317f2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -2,6 +2,7 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.dto.form.AreaCodeDictFormDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.plugins.AgencyNodeDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; @@ -47,4 +48,11 @@ public interface AgencyService { */ List areaCodeDictTree(AreaCodeDictFormDTO formDTO); + /** + * @param agencyId + * @author yinzuomei + * @description 查询当前组织及下级组织树 + * @Date 2021/2/3 22:19 + **/ + AgencyNodeDTO queryStaffAgencyTree(String agencyId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 5c720eee42..73090dd8c9 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -1,8 +1,10 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.AgencyTreeUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao; @@ -10,6 +12,8 @@ import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.dto.form.AreaCodeDictFormDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.ScreenCustomerAgencyDTO; +import com.epmet.dto.result.plugins.AgencyNodeDTO; import com.epmet.evaluationindex.screen.constant.ScreenConstant; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; @@ -18,6 +22,8 @@ import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.apache.ibatis.exceptions.TooManyResultsException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -32,6 +38,7 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:18 */ +@Slf4j @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class AgencyServiceImpl implements AgencyService { @@ -248,4 +255,26 @@ public class AgencyServiceImpl implements AgencyService { } return new ArrayList<>(); } + + /** + * @param agencyId + * @author yinzuomei + * @description 查询当前组织及下级组织树 + * @Date 2021/2/3 22:19 + **/ + @Override + public AgencyNodeDTO queryStaffAgencyTree(String agencyId) { + ScreenCustomerAgencyDTO agencyDTO = screenCustomerAgencyDao.selectByAgencyId(agencyId); + if (null == agencyDTO || StringUtils.isBlank(agencyDTO.getAreaCode())) { + throw new RenException(String.format("当前agencyId%s所属的area_code为空", agencyId)); + } + List list = screenCustomerAgencyDao.queryStaffAgencyTree(agencyDTO.getAreaCode()); + for (AgencyNodeDTO agencyNodeDTO : list) { + agencyNodeDTO.setGridList(screenCustomerAgencyDao.selectGridList(agencyNodeDTO.getAreaCode(), agencyNodeDTO.getAgencyId())); + agencyNodeDTO.setDepartmentList(screenCustomerAgencyDao.selectDeptList(agencyNodeDTO.getAreaCode(), agencyNodeDTO.getAgencyId())); + } + List treeList = AgencyTreeUtils.build(list); + log.info(JSON.toJSONString(treeList)); + return treeList.get(NumConstant.ZERO); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 678d8fc875..f1ac298f46 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -225,4 +225,50 @@ del_flag = 0 AND agency_id = #{agencyId} + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql index e8d9f98af2..87b3239315 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql @@ -64,7 +64,7 @@ CREATE TABLE `screen_list_info` ( PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='146:一张清单列表'; --- 2、工作日志新增两张表 +-- 2、工作日志新增3张表 drop table if EXISTS screen_work_record_grid_monthly; CREATE TABLE `screen_work_record_grid_monthly` ( `ID` varchar(64) NOT NULL COMMENT 'ID 主键', diff --git a/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/AgencyNodeDTO.java b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/AgencyNodeDTO.java index b8dd4b6dce..54ad61602e 100644 --- a/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/AgencyNodeDTO.java +++ b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/AgencyNodeDTO.java @@ -50,4 +50,11 @@ public class AgencyNodeDTO implements Serializable { * 当前agencyId所属的客户id add02.03 * */ private String customerId; + + /** + * 当前agencyId对应的地区编码 add02.03 + * */ + private String areaCode; + + private String parentCode; } diff --git a/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/DeptNodeDTO.java b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/DeptNodeDTO.java index 4b882d3637..348a24a80f 100644 --- a/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/DeptNodeDTO.java +++ b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/DeptNodeDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -28,4 +29,10 @@ public class DeptNodeDTO implements Serializable { * 当前deptId所属的customerId add02.03 * */ private String customerId; + + /** + * 当前deptId对应的地区编码 add02.03 + * */ + @JsonIgnore + private String areaCode; } diff --git a/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/GridNodeDTO.java b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/GridNodeDTO.java index 7eddb509bf..adcc4628e0 100644 --- a/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/GridNodeDTO.java +++ b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/GridNodeDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -28,4 +29,10 @@ public class GridNodeDTO implements Serializable { * 当前gridId所属的客户id add02.03 * */ private String customerId; + + /** + * 当前gridId对应的地区编码 add02.03 + * */ + @JsonIgnore + private String areaCode; } diff --git a/epmet-module/epmet-ext/epmet-ext-server/pom.xml b/epmet-module/epmet-ext/epmet-ext-server/pom.xml index 685a0e6a33..f33a428e27 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/pom.xml +++ b/epmet-module/epmet-ext/epmet-ext-server/pom.xml @@ -150,6 +150,12 @@ 2.0.0 compile + + com.epmet + data-report-client + 2.0.0 + compile + diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java index 29ace2808a..60b5654937 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.constant.ModuleConstant; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.feign.DataReportOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCrmOpenFeignClient; @@ -37,7 +38,8 @@ public class OpenUpServiceImpl implements OpenUpService { private GovOrgOpenFeignClient govOrgOpenFeignClient; @Autowired private OperCrmOpenFeignClient operCrmOpenFeignClient; - + @Autowired + private DataReportOpenFeignClient dataReportOpenFeignClient; /** * @Description 网格工作人员 被禁用的、未激活的不显示 * @param formDTO @@ -186,12 +188,19 @@ public class OpenUpServiceImpl implements OpenUpService { } //如果有子客户,根据area_code构造权限树 if (!CollectionUtils.isEmpty(crmResult.getData())) { - //todo + Result dataStatResult=dataReportOpenFeignClient.queryStaffAgencyTree(formDTO.getAgencyId()); + if (!dataStatResult.success() && null == dataStatResult) { + throw new RenException("调用data-stats服务的XXX接口异常"+dataStatResult.getInternalMsg()); + } + StaffPermissionResultDTO resultDTO = new StaffPermissionResultDTO(); + resultDTO.setCustomerIds(Arrays.asList()); + resultDTO.setAgencyTree(ConvertUtils.sourceToTarget(dataStatResult.getData(), AgencyNodeDTO.class)); + return resultDTO; } //不包含子客户走原来的接口 Result permissionRes = govOrgOpenFeignClient.staffPermissionExt(formDTO.getStaffId()); if (!permissionRes.success() && null == permissionRes) { - throw new RenException("/epmet/ext/staff/permission接口调用失败"); + throw new RenException("调用/epmet/ext/staff/permission接口异常"+permissionRes.getInternalMsg()); } StaffPermissionResultDTO resultDTO = new StaffPermissionResultDTO(); resultDTO.setCustomerIds(Arrays.asList()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index c1478df01d..c304943b30 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -168,6 +168,14 @@ public interface CustomerAgencyDao extends BaseDao { **/ List selectDeptList(@Param("agencyId") String agencyId); + /** + * @param agencyId + * @author yinzuomei + * @description 根据组织查询网格列表 + * @Date 2021/2/4 21:54 + **/ + List selectGridList(@Param("agencyId") String agencyId); + /** * @param staffId * @return diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 5286846214..e7f2621649 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -209,7 +209,7 @@ - + @@ -243,14 +243,9 @@ agency.ID AS agencyId, agency.ORGANIZATION_NAME AS agencyName, agency.LEVEL AS level, - agency.CUSTOMER_ID as customerId, - grid.ID AS gridId, - grid.GRID_NAME AS gridName, - grid.CUSTOMER_ID as customerId + agency.CUSTOMER_ID as customerId FROM CUSTOMER_AGENCY agency - LEFT JOIN CUSTOMER_GRID grid ON agency.ID = grid.PID - AND grid.DEL_FLAG = '0' WHERE agency.DEL_FLAG = '0' AND agency.ID = #{agencyId} @@ -268,17 +263,26 @@ AND AGENCY_ID = #{agencyId} + + - SELECT * - FROM customer_department + SELECT + ca.AREA_CODE, + dept.* + FROM + customer_department dept + LEFT JOIN customer_agency ca ON ( + dept.AGENCY_ID = ca.id and ca.DEL_FLAG='0') - DEL_FLAG = 0 + dept.DEL_FLAG = 0 - AND CREATED_TIME >= #{createdTimeFrom} + AND dept.CREATED_TIME >= #{createdTimeFrom} - AND CREATED_TIME < #{createdTimeTo} + AND dept.CREATED_TIME < #{createdTimeTo} @@ -20,20 +25,23 @@ \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml index 9eb57907ea..945b47260e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml @@ -94,7 +94,8 @@ total_user, province, city, - district + district, + PARENT_AREA_CODE as parentAreaCode from customer_agency where UPDATED_TIME >= #{startTime} and UPDATED_TIME #{endTime} From cb1ef62f8fe8982920ded8aee2ef022f4ca2a096 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 5 Feb 2021 10:47:19 +0800 Subject: [PATCH 060/101] parentCode --- .../main/java/com/epmet/service/impl/AreaCodeServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index b511cab2c0..029d835475 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -342,6 +342,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl threeSort = threeResult.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList()); @@ -393,6 +394,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl fiveSort = fiveResult.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList()); From 9c4ef8a75670287660ec6fb357f41f5d1003661a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 Feb 2021 12:17:49 +0800 Subject: [PATCH 061/101] =?UTF-8?q?queryStaffAgencyTree=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenCustomerAgencyDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index f1ac298f46..cf3b1a7631 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -233,7 +233,8 @@ agency.AGENCY_NAME AS agencyName, agency.LEVEL AS LEVEL, agency.CUSTOMER_ID AS customerId, - agency.AREA_CODE AS areaCode + agency.AREA_CODE AS areaCode, + agency.PARENT_AREA_CODE AS parentAreaCode FROM screen_customer_agency agency WHERE From 88e4b342982ca395261eb5c83b0bb62f15b99cd1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 Feb 2021 13:19:38 +0800 Subject: [PATCH 062/101] =?UTF-8?q?=E8=A1=8C=E6=94=BF=E5=9C=B0=E5=8C=BA?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E8=BF=94=E5=9B=9EparentCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/AreaCodeServiceImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index 029d835475..9b67de52a2 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -21,11 +21,11 @@ import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.constant.AreaCodeConstant; import com.epmet.dao.AreaCodeChildDao; import com.epmet.dao.AreaCodeDao; @@ -43,7 +43,6 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.*; -import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; /** @@ -342,7 +341,8 @@ public class AreaCodeServiceImpl extends BaseServiceImpl threeSort = threeResult.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList()); @@ -361,6 +361,8 @@ public class AreaCodeServiceImpl extends BaseServiceImpl citySort = cityOnceResult.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList()); dto.setChildren(citySort); + //一级行政地区parent_code设置为0 + dto.setParentCode("0"); result.add(dto); }); List collect = result.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList()); @@ -379,8 +381,10 @@ public class AreaCodeServiceImpl extends BaseServiceImpl fourResult = new ArrayList<>(); // 街道-社区 Map> groupByLevel = areaCodeChildDTOS.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getLevel)); + //社区 List levelFive = groupByLevel.get(NumConstant.FIVE); Map> groupByPCode = levelFive.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode)); + //街道 List levelFour = groupByLevel.get(NumConstant.FOUR); levelFour.forEach(four -> { AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO(); From f23d31a9dbb2e03521adf19547ff173c6570ba5b Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 5 Feb 2021 16:53:07 +0800 Subject: [PATCH 063/101] =?UTF-8?q?workrecord=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ScreenWorkRecordGridMonthlyServiceImpl.java | 4 ++++ .../plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java | 4 ++++ .../mapper/plugins/ScreenCustomerWorkRecordDictDao.xml | 2 -- .../com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java | 6 +++--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java index 424cdd9a2b..fa69352aa3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.plugins.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.plugins.ScreenWorkRecordGridMonthlyDao; import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; @@ -110,6 +112,8 @@ public class ScreenWorkRecordGridMonthlyServiceImpl extends BaseServiceImpl data) { if(data.getIsFirst()){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java index b28da6d953..a1264c91ae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.plugins.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.plugins.ScreenWorkRecordOrgMonthlyDao; import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; @@ -110,6 +112,8 @@ public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl data) { if(data.getIsFirst()){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml index 732a6c9c13..d86ef25c96 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml @@ -67,8 +67,6 @@ #{item.showFlag}, - #{item.closedTotal}, - #{item.sort}, #{item.dataType}, diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index 1714ed728a..8b1709a162 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -71,9 +71,9 @@ public class ExtAppJwtTokenUtils { // String customrId = "2fe0065f70ca0e23ce4c26fca5f1d933"; //测试-模拟客户 - String secret = "c4096eb0497943c78327c5192621b209c38f20592f6a49cc8c79e8b77f3bd5c8"; - String appId = "f358d63a89f3670c197c62ca4c3a0366"; - String customrId = "45687aa479955f9d06204d415238f7cc"; + String secret = "0e04d0344891462cb2c6cab297cd3953c4175804b9204b129cb2ecd6a3f86aa0"; + String appId = "c04e26dd472b845a5dbc1c5394706253"; + String customrId = "613cc61a6b8ce4c70d21bd413dac72cc"; long ts = System.currentTimeMillis() + 1000 * 60 * 1; System.out.println("时间戳:" + ts); From 0ecae3f05f49fbc84f584e26b76b7b79ce354c90 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 20 Feb 2021 13:08:57 +0800 Subject: [PATCH 064/101] add /data/report/screen/agency/addstreetcomm api --- .../controller/screen/AgencyController.java | 18 ++++++- .../dto/form/AddAreaCodeDictFormDTO.java | 28 +++++++++++ .../dto/result/AddAreaCodeDictResultDTO.java | 18 +++++++ .../EpmetCommonServiceOpenFeignClient.java | 9 ++++ ...tCommonServiceOpenFeignClientFallback.java | 5 ++ .../epmet/controller/AreaCodeController.java | 15 +++++- .../java/com/epmet/dao/AreaCodeChildDao.java | 6 +++ .../com/epmet/service/AreaCodeService.java | 11 ++++- .../service/impl/AreaCodeServiceImpl.java | 48 ++++++++++++++++++- .../resources/mapper/AreaCodeChildDao.xml | 36 ++++++++++++++ 10 files changed, 190 insertions(+), 4 deletions(-) create mode 100644 epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AddAreaCodeDictFormDTO.java create mode 100644 epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AddAreaCodeDictResultDTO.java diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index 53646ee6dc..a3ca90532c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -3,13 +3,16 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; +import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -27,7 +30,8 @@ public class AgencyController { @Autowired private AgencyService agencyService; - + @Autowired + private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; /** * @param * @Description 1、组织机构树 只返回 is_display = '1'的 @@ -81,4 +85,16 @@ public class AgencyController { return new Result>().ok(agencyService.areaCodeDictTree(formDTO)); } + /** + * @return com.epmet.commons.tools.utils.Result + * @param + * @author yinzuomei + * @description 003、新增街道或者社区地区编码 + * @Date 2021/2/5 17:39 + **/ + @PostMapping("addstreetcomm") + public Result addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + return commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO); + } } diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AddAreaCodeDictFormDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AddAreaCodeDictFormDTO.java new file mode 100644 index 0000000000..6730c0a920 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AddAreaCodeDictFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 003、新增街道或者社区地区编码 入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/5 17:39 + */ +@Data +public class AddAreaCodeDictFormDTO implements Serializable { + /** + * 街道或者社区所属的上一级areaCode + */ + @NotBlank(message = "parentAreaCode不能为空") + private String parentAreaCode; + + /** + * 新增的街道或者社区名称 + */ + @NotBlank(message = "name不能为空") + private String name; + +} diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AddAreaCodeDictResultDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AddAreaCodeDictResultDTO.java new file mode 100644 index 0000000000..4d67762875 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AddAreaCodeDictResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result; + +import lombok.Data; + +/** + * 003、新增街道或者社区地区编码 入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/5 17:39 + */ +@Data +public class AddAreaCodeDictResultDTO { + private String code; + + public AddAreaCodeDictResultDTO(String code) { + this.code = code; + } +} diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java index 03bae0640b..a061a13f3a 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java @@ -103,4 +103,13 @@ public interface EpmetCommonServiceOpenFeignClient { */ @PostMapping("commonservice/areacode/areacodedicttree") Result> areaCodeDictTree(@RequestBody AreaCodeDictFormDTO formDTO); + + /** + * @param formDTO + * @author yinzuomei + * @description 003、新增街道或者社区地区编码 + * @Date 2021/2/5 17:39 + **/ + @PostMapping("commonservice/areacode/addstreetcommareacode") + Result addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO); } diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java index e7a9500143..f7e20536ca 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java @@ -84,4 +84,9 @@ public class EpmetCommonServiceOpenFeignClientFallback implements EpmetCommonSer public Result> areaCodeDictTree(AreaCodeDictFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_COMMON_SERVICE, "areaCodeDictTree", formDTO); } + + @Override + public Result addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_COMMON_SERVICE, "addStreetCommAreaCode", formDTO); + } } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java index 5dc1747438..ef2c8fc69a 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java @@ -22,10 +22,12 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.AreaCodeDTO; +import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.service.AreaCodeService; import org.springframework.beans.factory.annotation.Autowired; @@ -95,4 +97,15 @@ public class AreaCodeController { return new Result>().ok(areaCodeService.areaCodeDictTreePlus(formDTO)); } + /** + * @param formDTO + * @author yinzuomei + * @description 003、新增街道或者社区地区编码 + * @Date 2021/2/5 17:39 + **/ + @PostMapping("addstreetcommareacode") + Result addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(areaCodeService.addStreetCommAreaCode(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeChildDao.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeChildDao.java index a0b28216b9..24339f6397 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeChildDao.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeChildDao.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.AreaCodeChildDTO; import com.epmet.entity.AreaCodeChildEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -35,4 +36,9 @@ public interface AreaCodeChildDao extends BaseDao { List selectAllChild(); + AreaCodeChildDTO selectByCode(@Param("code") String code); + + List selectByPCodeAndName(@Param("parentAreaCode") String parentAreaCode, @Param("name") String name); + + AreaCodeChildDTO selectMaxChild(@Param("parentAreaCode") String parentAreaCode); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java index 45222bbb53..15d51fedd2 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java @@ -20,10 +20,11 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.AreaCodeDTO; +import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.entity.AreaCodeEntity; -import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Map; @@ -105,4 +106,12 @@ public interface AreaCodeService extends BaseService { List areaCodeDictTree(AreaCodeDictFormDTO formDTO); List areaCodeDictTreePlus(AreaCodeDictFormDTO formDTO); + + /** + * @param formDTO + * @author yinzuomei + * @description 003、新增街道或者社区地区编码 + * @Date 2021/2/5 17:39 + **/ + AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index 9b67de52a2..29c3d27b30 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -17,12 +17,14 @@ package com.epmet.service.impl; +import cn.hutool.core.collection.CollUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; @@ -31,10 +33,13 @@ import com.epmet.dao.AreaCodeChildDao; import com.epmet.dao.AreaCodeDao; import com.epmet.dto.AreaCodeChildDTO; import com.epmet.dto.AreaCodeDTO; +import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.entity.AreaCodeEntity; import com.epmet.redis.AreaCodeRedis; +import com.epmet.service.AreaCodeChildService; import com.epmet.service.AreaCodeService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -58,7 +63,8 @@ public class AreaCodeServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -554,4 +560,44 @@ public class AreaCodeServiceImpl extends BaseServiceImpl list = childDao.selectByPCodeAndName(formDTO.getParentAreaCode().trim(), formDTO.getName().trim()); + if (CollUtil.isNotEmpty(list)) { + throw new RenException("name已存在"); + } + AreaCodeChildDTO areaCodeChildDTO = new AreaCodeChildDTO(); + areaCodeChildDTO.setName(formDTO.getName().trim()); + areaCodeChildDTO.setPCode(formDTO.getParentAreaCode().trim()); + //4:街道;5:社区或村委会 + areaCodeChildDTO.setLevel(formDTO.getParentAreaCode().length() == NumConstant.SIX ? NumConstant.FOUR : NumConstant.FIVE); + //获取子级中最大的编码 + AreaCodeChildDTO maxChildDto = childDao.selectMaxChild(formDTO.getParentAreaCode().trim()); + if (null == maxChildDto) { + //默认添加001 + areaCodeChildDTO.setCode(formDTO.getParentAreaCode().concat("001_UD")); + } else { + //去掉_UD +1赋值;370124001225_UD 锦源社区 + String[] codeArr = maxChildDto.getCode().split(StrConstant.UNDER_LINE); + long code = Long.parseLong(codeArr[NumConstant.ZERO]) + NumConstant.ONE; + areaCodeChildDTO.setCode(String.valueOf(code)); + } + //保存到area_code_child表 + areaCodeChildService.save(areaCodeChildDTO); + return new AddAreaCodeDictResultDTO(areaCodeChildDTO.getCode()); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml index 0dfe0d02f1..422565051c 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml @@ -7,4 +7,40 @@ + + + + + + + + \ No newline at end of file From 4444fcd6252468431d187e06793fbb4e97061f7b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 20 Feb 2021 13:29:55 +0800 Subject: [PATCH 065/101] add /data/report/screen/agency/addstreetcomm api v1 --- .../java/com/epmet/dto/form/AddAreaCodeDictFormDTO.java | 4 ++++ .../java/com/epmet/service/impl/AreaCodeServiceImpl.java | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AddAreaCodeDictFormDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AddAreaCodeDictFormDTO.java index 6730c0a920..d97379ec72 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AddAreaCodeDictFormDTO.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AddAreaCodeDictFormDTO.java @@ -25,4 +25,8 @@ public class AddAreaCodeDictFormDTO implements Serializable { @NotBlank(message = "name不能为空") private String name; + /** + * 传入此列时,代表修改名称 + */ + private String code; } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index 29c3d27b30..ce6bbb266f 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -569,6 +569,15 @@ public class AreaCodeServiceImpl extends BaseServiceImpl Date: Sun, 21 Feb 2021 19:02:05 +0800 Subject: [PATCH 066/101] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8C=89=E6=97=A5=E7=BB=9F=E8=AE=A1=E9=87=87?= =?UTF-8?q?=E9=9B=86=E6=8E=A5=E5=8F=A3v1=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/project/ProjectController.java | 7 +- .../ScreenWorkRecordGridDailyFormDTO.java | 57 +++++++++++ .../ScreenWorkRecordGridMonthlyDTO.java | 7 +- .../ScreenWorkRecordOrgDailyFormDTO.java | 57 +++++++++++ .../ScreenWorkRecordOrgMonthlyDTO.java | 7 +- .../plugins/WorkRecordColController.java | 47 +++++++++- .../ScreenWorkRecordGridMonthlyEntity.java | 7 +- .../ScreenWorkRecordOrgMonthlyEntity.java | 7 +- .../migration/V0.0.8__add_plugins_table.sql | 94 ++++++++++++++----- 9 files changed, 241 insertions(+), 49 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index 1e75eab9f7..49793ef6fe 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java @@ -137,7 +137,7 @@ public class ProjectController { /** * @param customerId * @param formDTO - * @description 【事件分析】数量统计查询 + * @description 【事件分析】数量统计查询 平阴大屏 **/ @PostMapping("queryquantity") public Result queryQuantity(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCommonFormDTO formDTO){ @@ -149,7 +149,7 @@ public class ProjectController { * @param customerId * @param formDTO * @author yinzuomei - * @description 近12个月【事件分析】月度数量分析 + * @description 近12个月【事件分析】月度数量分析 平阴大屏 **/ @PostMapping("queryquantity-monthly") public Result queryQuantityMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody QueryQuantityMonthlyFormDTO formDTO) { @@ -162,7 +162,7 @@ public class ProjectController { * @param customerId * @param formDTO * @author yinzuomei - * @description 【事件分析】效率分析 + * @description 【事件分析】效率分析 平阴大屏 **/ @PostMapping("efficiency-analysis") public Result> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){ @@ -171,4 +171,5 @@ public class ProjectController { return new Result>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO)); } + //todo 【事件类型分析】 } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java new file mode 100644 index 0000000000..5d75e69216 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java @@ -0,0 +1,57 @@ +package com.epmet.dto.plugins; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 工作日志-网格按日统计(累计值) + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/21 18:48 + */ +@Data +public class ScreenWorkRecordGridDailyFormDTO implements Serializable { + private static final long serialVersionUID = 5993623581944585517L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String agencyId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 当前组织参与的总次数 + */ + private Integer participateTotal; + + /** + * 参与人数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人数 + */ + private Integer avgParticipateUserTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java index 77e3d81cf6..9fb30a14d7 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto.plugins; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -79,12 +80,12 @@ public class ScreenWorkRecordGridMonthlyDTO implements Serializable { private Integer participateTotal; /** - * 总的参与次数 + * 参与人数 */ private Integer participateUserTotal; /** - * 平均参与人次 + * 平均参与人数 */ private Integer avgParticipateUserTotal; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java new file mode 100644 index 0000000000..dda7253932 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java @@ -0,0 +1,57 @@ +package com.epmet.dto.plugins; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 工作日志-组织按日统计(累计值) + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/21 18:49 + */ +@Data +public class ScreenWorkRecordOrgDailyFormDTO implements Serializable { + private static final long serialVersionUID = 819322082786098071L; + + /** + * 组织Id + */ + private String orgId; + + /** + * 当前组织所属上级组织,如果是跟组织,此列为0 + */ + private String parentId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 当前组织参与的总次数 + */ + private Integer participateTotal; + + /** + * 参与人数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人数 + */ + private Integer avgParticipateUserTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java index 140fdf97a3..5b710a6586 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto.plugins; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -79,12 +80,12 @@ public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { private Integer participateTotal; /** - * 总的参与次数 + * 参与人数 */ private Integer participateUserTotal; /** - * 平均参与人次 + * 平均参与人数 */ private Integer avgParticipateUserTotal; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java index a8d08bd080..0abd5cbb42 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java @@ -3,9 +3,7 @@ package com.epmet.controller.plugins; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO; -import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO; -import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO; +import com.epmet.dto.plugins.*; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.service.plugins.ScreenCustomerWorkRecordDictService; import com.epmet.service.plugins.ScreenWorkRecordGridMonthlyService; @@ -67,7 +65,7 @@ public class WorkRecordColController { public Result collectGrid(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || StringUtils.isBlank(data.getMonthId())) { - log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data)); + log.error("com.epmet.controller.plugins.WorkRecordColController.collectGrid,param:{}", JSON.toJSONString(data)); throw new ValidateException("客户Id、上传数据列表、月份Id不可为空"); } gridMonthlyService.collect(customerId,data); @@ -86,7 +84,7 @@ public class WorkRecordColController { public Result collectOrg(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || StringUtils.isBlank(data.getMonthId())) { - log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data)); + log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrg,param:{}", JSON.toJSONString(data)); throw new ValidateException("客户Id、上传数据列表、月份Id不可为空"); } orgMonthlyService.collect(customerId,data); @@ -94,4 +92,43 @@ public class WorkRecordColController { } + /** + * @Description 【工作日志】网格按日统计 累计值 + * @param customerId + * @param data + * @return com.epmet.commons.tools.utils.Result + * @author wangc + * @date 2021.02.04 16:16 + */ + @PostMapping("grid-daily") + public Result collectGridDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ + if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || + StringUtils.isBlank(data.getDateId())) { + log.error("com.epmet.controller.plugins.WorkRecordColController.collectGridDaily,param:{}", JSON.toJSONString(data)); + throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); + } + //todo + // gridMonthlyService.collectGridDaily(customerId,data); + return new Result(); + } + + /** + * @Description 【工作日志】组织按日统计 累计值 + * @param customerId + * @param data + * @return com.epmet.commons.tools.utils.Result + * @author wangc + * @date 2021.02.04 16:16 + */ + @PostMapping("org-daily") + public Result collectOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ + if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || + StringUtils.isBlank(data.getDateId())) { + log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrgDaily,param:{}", JSON.toJSONString(data)); + throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); + } + //todo + // orgMonthlyService.collectOrgDaily(customerId,data); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java index 47e993fbe8..664880ba11 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java @@ -18,13 +18,10 @@ package com.epmet.entity.plugins; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 工作日志-网格按月统计 * @@ -79,12 +76,12 @@ public class ScreenWorkRecordGridMonthlyEntity extends BaseEpmetEntity { private Integer participateTotal; /** - * 总的参与次数 + * 参与人数 */ private Integer participateUserTotal; /** - * 平均参与人次 + * 平均参与人数 */ private Integer avgParticipateUserTotal; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java index b87839daed..f1cb99dad7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java @@ -18,13 +18,10 @@ package com.epmet.entity.plugins; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 工作日志-组织按月统计 * @@ -79,12 +76,12 @@ public class ScreenWorkRecordOrgMonthlyEntity extends BaseEpmetEntity { private Integer participateTotal; /** - * 总的参与次数 + * 参与人数 */ private Integer participateUserTotal; /** - * 平均参与人次 + * 平均参与人数 */ private Integer avgParticipateUserTotal; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql index 87b3239315..7ca05ec922 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql @@ -64,7 +64,30 @@ CREATE TABLE `screen_list_info` ( PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='146:一张清单列表'; --- 2、工作日志新增3张表 +-- 2、工作日志新增 +drop table if EXISTS screen_customer_work_record_dict; +CREATE TABLE `screen_customer_work_record_dict` ( + `ID` varchar(32) NOT NULL COMMENT '主键(客户每次上传,直接根据customerId全删全增)', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至日期eg:20200101', + `DICT_ID` varchar(32) NOT NULL COMMENT '资源id', + `PID` varchar(32) NOT NULL COMMENT '父资源ID;如果是一级分类pid=0', + `RESOURCE_TYPE` varchar(32) DEFAULT NULL COMMENT '资源类型', + `RESOURCE_CODE` varchar(32) NOT NULL COMMENT '资源编码', + `RESOURCE_LABEL` varchar(128) NOT NULL COMMENT '资源标签名', + `SHOW_FLAG` varchar(1) NOT NULL COMMENT '显示标识:0否,1是', + `SORT` int(10) NOT NULL DEFAULT '0' COMMENT '排序', + `DATA_TYPE` varchar(32) DEFAULT 'party' COMMENT '数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中', + `LEVEL` int(11) NOT NULL COMMENT '当前资源属于几级,例如:1、2、3、4....', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '逻辑删除标识', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志资源字典表'; + drop table if EXISTS screen_work_record_grid_monthly; CREATE TABLE `screen_work_record_grid_monthly` ( `ID` varchar(64) NOT NULL COMMENT 'ID 主键', @@ -76,8 +99,8 @@ CREATE TABLE `screen_work_record_grid_monthly` ( `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', - `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '总的参与次数', - `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人次', + `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '参与人数', + `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人数', `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', @@ -85,7 +108,7 @@ CREATE TABLE `screen_work_record_grid_monthly` ( `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-网格按月统计'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-网格按月统计(增量)'; drop table if EXISTS screen_work_record_org_monthly; CREATE TABLE `screen_work_record_org_monthly` ( @@ -98,8 +121,8 @@ CREATE TABLE `screen_work_record_org_monthly` ( `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', - `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '总的参与次数', - `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人次', + `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '参与人数', + `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人数', `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', @@ -107,27 +130,48 @@ CREATE TABLE `screen_work_record_org_monthly` ( `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-组织按月统计'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-组织按月统计(增量)'; -drop table if EXISTS screen_customer_work_record_dict; -CREATE TABLE `screen_customer_work_record_dict` ( - `ID` varchar(32) NOT NULL COMMENT '主键(客户每次上传,直接根据customerId全删全增)', +drop table if EXISTS screen_work_record_grid_daily; +CREATE TABLE `screen_work_record_grid_daily` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至日期eg:20200101', - `DICT_ID` varchar(32) NOT NULL COMMENT '资源id', - `PID` varchar(32) NOT NULL COMMENT '父资源ID;如果是一级分类pid=0', - `RESOURCE_TYPE` varchar(32) DEFAULT NULL COMMENT '资源类型', - `RESOURCE_CODE` varchar(32) NOT NULL COMMENT '资源编码', - `RESOURCE_LABEL` varchar(128) NOT NULL COMMENT '资源标签名', - `SHOW_FLAG` varchar(1) NOT NULL COMMENT '显示标识:0否,1是', - `SORT` int(10) NOT NULL DEFAULT '0' COMMENT '排序', - `DATA_TYPE` varchar(32) DEFAULT 'party' COMMENT '数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中', - `LEVEL` int(11) NOT NULL COMMENT '当前资源属于几级,例如:1、2、3、4....', - `DEL_FLAG` varchar(1) NOT NULL COMMENT '逻辑删除标识', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `DATE_ID` varchar(8) NOT NULL COMMENT '日期Id:yyyyMMdd', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的组织id', + `MEETING_CODE` varchar(255) NOT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', + `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', + `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', + `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', + `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '参与人数', + `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人数', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-网格按日统计(累计值)'; + +drop table if EXISTS screen_work_record_org_daily; +CREATE TABLE `screen_work_record_org_daily` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `DATE_ID` varchar(8) NOT NULL COMMENT '日期Id:yyyyMMdd', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '当前组织所属上级组织,如果是跟组织,此列为0', + `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', + `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', + `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', + `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', + `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '参与人数', + `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人数', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志资源字典表'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-组织按日统计(累计值)'; \ No newline at end of file From f28a86dd82d459d006e364722a1c7d6581fb6556 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 21 Feb 2021 19:43:53 +0800 Subject: [PATCH 067/101] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8C=89=E6=97=A5=E7=BB=9F=E8=AE=A1=E9=87=87?= =?UTF-8?q?=E9=9B=86=E6=8E=A5=E5=8F=A3v2:screen=5Fwork=5Frecord=5Forg=5Fmo?= =?UTF-8?q?nthly=E3=80=81screen=5Fwork=5Frecord=5Forg=5Fdaily=E5=8E=BB?= =?UTF-8?q?=E6=8E=89parentId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenWorkRecordOrgDailyFormDTO.java | 5 ----- .../ScreenWorkRecordOrgMonthlyDTO.java | 5 ----- .../plugins/WorkRecordColController.java | 21 ------------------- .../ScreenWorkRecordOrgMonthlyEntity.java | 5 ----- .../migration/V0.0.8__add_plugins_table.sql | 2 -- .../plugins/ScreenWorkRecordOrgMonthlyDao.xml | 4 ---- 6 files changed, 42 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java index dda7253932..c80f1431a4 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java @@ -19,11 +19,6 @@ public class ScreenWorkRecordOrgDailyFormDTO implements Serializable { */ private String orgId; - /** - * 当前组织所属上级组织,如果是跟组织,此列为0 - */ - private String parentId; - /** * 会议类型编码;对应screen_customer_work_record_dict的资源编码 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java index 5b710a6586..202ce07a3c 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java @@ -54,11 +54,6 @@ public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { */ private String orgId; - /** - * 当前组织所属上级组织,如果是跟组织,此列为0 - */ - private String parentId; - /** * 会议类型编码;对应screen_customer_work_record_dict的资源编码 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java index 0abd5cbb42..cf6a10d8a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java @@ -91,27 +91,6 @@ public class WorkRecordColController { return new Result(); } - - /** - * @Description 【工作日志】网格按日统计 累计值 - * @param customerId - * @param data - * @return com.epmet.commons.tools.utils.Result - * @author wangc - * @date 2021.02.04 16:16 - */ - @PostMapping("grid-daily") - public Result collectGridDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ - if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || - StringUtils.isBlank(data.getDateId())) { - log.error("com.epmet.controller.plugins.WorkRecordColController.collectGridDaily,param:{}", JSON.toJSONString(data)); - throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); - } - //todo - // gridMonthlyService.collectGridDaily(customerId,data); - return new Result(); - } - /** * @Description 【工作日志】组织按日统计 累计值 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java index f1cb99dad7..637ca82807 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java @@ -50,11 +50,6 @@ public class ScreenWorkRecordOrgMonthlyEntity extends BaseEpmetEntity { */ private String orgId; - /** - * 当前组织所属上级组织,如果是跟组织,此列为0 - */ - private String parentId; - /** * 会议类型编码;对应screen_customer_work_record_dict的资源编码 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql index 7ca05ec922..5be4de5dea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql @@ -116,7 +116,6 @@ CREATE TABLE `screen_work_record_org_monthly` ( `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id:yyyyMM', `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id', - `PARENT_ID` varchar(64) NOT NULL COMMENT '当前组织所属上级组织,如果是跟组织,此列为0', `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', @@ -160,7 +159,6 @@ CREATE TABLE `screen_work_record_org_daily` ( `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', `DATE_ID` varchar(8) NOT NULL COMMENT '日期Id:yyyyMMdd', `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id', - `PARENT_ID` varchar(64) NOT NULL COMMENT '当前组织所属上级组织,如果是跟组织,此列为0', `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml index 12a966d066..e930cb3b7c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml @@ -8,7 +8,6 @@ - @@ -31,7 +30,6 @@ customer_id, month_id, org_id, - parent_id, meeting_code, type_code, organize_total, @@ -55,8 +53,6 @@ #{item.orgId}, - #{item.parentId}, - #{item.meetingCode}, #{item.typeCode}, From b51412b6f08e83464a8d7837b22744eb6c20d1c0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Feb 2021 13:02:32 +0800 Subject: [PATCH 068/101] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=9B=B8=E5=85=B3=E8=BE=93=E5=87=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20todo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/WorkRecordController.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java new file mode 100644 index 0000000000..f606c32458 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java @@ -0,0 +1,28 @@ +package com.epmet.datareport.controller.plugins; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 大屏工作日志相关输出接口 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/21 19:51 + */ +@RestController +@RequestMapping("plugins/workrecord") +public class WorkRecordController { + //todo + //5、【工作日志】本机及下级排名 + //NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348966 + //返参中的当前组织的参与人数、组织次数 直接sum所有下级的值; + //下级根据当前组织的areaCode查询下级列表,再去查询screen_work_record_org_daily + //legend来源于screen_customer_work_record_dict表 level=2,dataType=party + + + + + + //6、【工作日志】近12月趋势图 + //NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348967 +} From 1f8905fd243541ec826d971ec97ebf8f9e79731d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Feb 2021 14:23:50 +0800 Subject: [PATCH 069/101] add /data/report/screen/agency/addstreetcomm api v2 --- .../controller/screen/AgencyController.java | 5 +---- .../service/evaluationindex/screen/AgencyService.java | 3 +++ .../screen/impl/AgencyServiceImpl.java | 11 +++++++++++ .../src/main/java/com/epmet/dto/AreaCodeChildDTO.java | 5 +++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index a3ca90532c..59518d956f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -12,7 +12,6 @@ import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; -import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -30,8 +29,6 @@ public class AgencyController { @Autowired private AgencyService agencyService; - @Autowired - private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; /** * @param * @Description 1、组织机构树 只返回 is_display = '1'的 @@ -95,6 +92,6 @@ public class AgencyController { @PostMapping("addstreetcomm") public Result addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO); - return commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO); + return new Result().ok(agencyService.addStreetCommAreaCode(formDTO)); } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index 144e12fe1a..27f43f1a83 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -1,6 +1,8 @@ package com.epmet.datareport.service.evaluationindex.screen; +import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; @@ -47,4 +49,5 @@ public interface AgencyService { */ List areaCodeDictTree(AreaCodeDictFormDTO formDTO); + AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 5c720eee42..b62ba1be13 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -8,7 +8,9 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; +import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.evaluationindex.screen.constant.ScreenConstant; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; @@ -248,4 +250,13 @@ public class AgencyServiceImpl implements AgencyService { } return new ArrayList<>(); } + + @Override + public AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO) { + Result res=commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO); + if(res.success()&&null!=res.getData()){ + return new AddAreaCodeDictResultDTO(res.getData().getCode()); + } + throw new RenException(res.getMsg()+res.getInternalMsg()); + } } diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/AreaCodeChildDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/AreaCodeChildDTO.java index d3da19fa21..31f68bc86f 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/AreaCodeChildDTO.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/AreaCodeChildDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -36,7 +37,7 @@ public class AreaCodeChildDTO implements Serializable { /** * 主键 */ - private Integer id; + private String id; /** * 省份code From 3d95f062e06366f83df308a9254c28d60ca11f17 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Feb 2021 15:31:08 +0800 Subject: [PATCH 070/101] add /data/report/screen/agency/addstreetcomm api v3 --- .../AddAreaCodeDictResultDTO.java | 18 ++++++++++++++++++ .../controller/screen/AgencyController.java | 2 +- .../evaluationindex/screen/AgencyService.java | 2 +- .../screen/impl/AgencyServiceImpl.java | 12 +++++++----- .../dto/result/AddAreaCodeDictResultDTO.java | 18 ------------------ .../EpmetCommonServiceOpenFeignClient.java | 7 ++++--- ...etCommonServiceOpenFeignClientFallback.java | 2 +- .../epmet/controller/AreaCodeController.java | 5 ++--- .../com/epmet/service/AreaCodeService.java | 3 +-- .../service/impl/AreaCodeServiceImpl.java | 9 ++++----- 10 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/commonservice/AddAreaCodeDictResultDTO.java delete mode 100644 epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AddAreaCodeDictResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/commonservice/AddAreaCodeDictResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/commonservice/AddAreaCodeDictResultDTO.java new file mode 100644 index 0000000000..d3d0e59442 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/commonservice/AddAreaCodeDictResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result.commonservice; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 003、新增街道或者社区地区编码 入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/5 17:39 + */ +@Data +public class AddAreaCodeDictResultDTO implements Serializable { + private static final long serialVersionUID = 7505566589581480619L; + private String code; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index 59518d956f..91672af42b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -5,8 +5,8 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; -import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index 27f43f1a83..3812695176 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -2,8 +2,8 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; -import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index b62ba1be13..8252b44077 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -10,8 +10,8 @@ import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; -import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO; import com.epmet.evaluationindex.screen.constant.ScreenConstant; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; @@ -253,10 +253,12 @@ public class AgencyServiceImpl implements AgencyService { @Override public AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO) { - Result res=commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO); - if(res.success()&&null!=res.getData()){ - return new AddAreaCodeDictResultDTO(res.getData().getCode()); + Result res = commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO); + if (res.success() && null != res.getData()) { + AddAreaCodeDictResultDTO resultDTO = new AddAreaCodeDictResultDTO(); + resultDTO.setCode(res.getData()); + return resultDTO; } - throw new RenException(res.getMsg()+res.getInternalMsg()); + throw new RenException(res.getMsg() + res.getInternalMsg()); } } diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AddAreaCodeDictResultDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AddAreaCodeDictResultDTO.java deleted file mode 100644 index 4d67762875..0000000000 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AddAreaCodeDictResultDTO.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.epmet.dto.result; - -import lombok.Data; - -/** - * 003、新增街道或者社区地区编码 入参 - * - * @author yinzuomei@elink-cn.com - * @date 2021/2/5 17:39 - */ -@Data -public class AddAreaCodeDictResultDTO { - private String code; - - public AddAreaCodeDictResultDTO(String code) { - this.code = code; - } -} diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java index a061a13f3a..66a1f46ee7 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java @@ -6,6 +6,7 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.fallback.EpmetCommonServiceOpenFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -19,7 +20,7 @@ import java.util.Map; * @date 2020/6/4 10:28 */ @FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class) -//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "http://localhost:8103") +// @FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "http://localhost:8103") public interface EpmetCommonServiceOpenFeignClient { /** * @param formDTO @@ -110,6 +111,6 @@ public interface EpmetCommonServiceOpenFeignClient { * @description 003、新增街道或者社区地区编码 * @Date 2021/2/5 17:39 **/ - @PostMapping("commonservice/areacode/addstreetcommareacode") - Result addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO); + @PostMapping(value = "commonservice/areacode/addstreetcommareacode", consumes = MediaType.APPLICATION_JSON_VALUE) + Result addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO); } diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java index f7e20536ca..d9731558cd 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java @@ -86,7 +86,7 @@ public class EpmetCommonServiceOpenFeignClientFallback implements EpmetCommonSer } @Override - public Result addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO) { + public Result addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_COMMON_SERVICE, "addStreetCommAreaCode", formDTO); } } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java index ef2c8fc69a..af8ecf093f 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java @@ -27,7 +27,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.AreaCodeDTO; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; -import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.service.AreaCodeService; import org.springframework.beans.factory.annotation.Autowired; @@ -104,8 +103,8 @@ public class AreaCodeController { * @Date 2021/2/5 17:39 **/ @PostMapping("addstreetcommareacode") - Result addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO) { + Result addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); - return new Result().ok(areaCodeService.addStreetCommAreaCode(formDTO)); + return new Result().ok(areaCodeService.addStreetCommAreaCode(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java index 15d51fedd2..415712de43 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java @@ -22,7 +22,6 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.AreaCodeDTO; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; -import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.entity.AreaCodeEntity; @@ -113,5 +112,5 @@ public interface AreaCodeService extends BaseService { * @description 003、新增街道或者社区地区编码 * @Date 2021/2/5 17:39 **/ - AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO); + String addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index ce6bbb266f..051a431ddd 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -35,7 +35,6 @@ import com.epmet.dto.AreaCodeChildDTO; import com.epmet.dto.AreaCodeDTO; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; -import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.entity.AreaCodeEntity; import com.epmet.redis.AreaCodeRedis; @@ -568,7 +567,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl Date: Tue, 23 Feb 2021 10:37:40 +0800 Subject: [PATCH 071/101] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=88=A0=E9=99=A4/data/stats/plugins/workrecord/grid-monthly?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/WorkRecordColController.java | 22 --- .../ScreenWorkRecordGridMonthlyDao.java | 41 ------ .../ScreenWorkRecordGridMonthlyEntity.java | 88 ------------ .../ScreenWorkRecordGridMonthlyService.java | 106 -------------- ...creenWorkRecordGridMonthlyServiceImpl.java | 130 ------------------ .../migration/V0.0.8__add_plugins_table.sql | 43 ------ .../ScreenWorkRecordGridMonthlyDao.xml | 94 ------------- 7 files changed, 524 deletions(-) delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java index cf6a10d8a9..d6631f2b51 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java @@ -6,7 +6,6 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.plugins.*; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.service.plugins.ScreenCustomerWorkRecordDictService; -import com.epmet.service.plugins.ScreenWorkRecordGridMonthlyService; import com.epmet.service.plugins.impl.ScreenWorkRecordOrgMonthlyServiceImpl; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -28,8 +27,6 @@ public class WorkRecordColController { @Autowired ScreenCustomerWorkRecordDictService dictService; @Autowired - ScreenWorkRecordGridMonthlyService gridMonthlyService; - @Autowired ScreenWorkRecordOrgMonthlyServiceImpl orgMonthlyService; /** @@ -53,25 +50,6 @@ public class WorkRecordColController { return new Result(); } - /** - * @Description 【工作日志】网格按月统计 - * @param customerId - * @param data - * @return com.epmet.commons.tools.utils.Result - * @author wangc - * @date 2021.02.04 16:16 - */ - @PostMapping("grid-monthly") - public Result collectGrid(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ - if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || - StringUtils.isBlank(data.getMonthId())) { - log.error("com.epmet.controller.plugins.WorkRecordColController.collectGrid,param:{}", JSON.toJSONString(data)); - throw new ValidateException("客户Id、上传数据列表、月份Id不可为空"); - } - gridMonthlyService.collect(customerId,data); - return new Result(); - } - /** * @Description 【工作日志】组织按月统计 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java deleted file mode 100644 index febf60d61a..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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.dao.plugins; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO; -import com.epmet.entity.plugins.ScreenWorkRecordGridMonthlyEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 工作日志-网格按月统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-02-04 - */ -@Mapper -public interface ScreenWorkRecordGridMonthlyDao extends BaseDao { - - int deleteBatch(@Param("customerId") String customerId,@Param("monthId") String monthId); - - void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("monthId") String monthId); - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java deleted file mode 100644 index 664880ba11..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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.entity.plugins; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 工作日志-网格按月统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-02-04 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("screen_work_record_grid_monthly") -public class ScreenWorkRecordGridMonthlyEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 客户Id - */ - private String customerId; - - /** - * 月份Id:yyyyMM - */ - private String monthId; - - /** - * 网格id - */ - private String gridId; - - /** - * 网格所属的组织id - */ - private String agencyId; - - /** - * 会议类型编码;对应screen_customer_work_record_dict的资源编码 - */ - private String meetingCode; - - /** - * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 - */ - private String typeCode; - - /** - * 组织次数 - */ - private Integer organizeTotal; - - /** - * 当前组织参与的总次数 - */ - private Integer participateTotal; - - /** - * 参与人数 - */ - private Integer participateUserTotal; - - /** - * 平均参与人数 - */ - private Integer avgParticipateUserTotal; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java deleted file mode 100644 index 45622e29fd..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * 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.service.plugins; - -import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO; -import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.plugins.ScreenWorkRecordGridMonthlyEntity; - -import java.util.List; -import java.util.Map; - -/** - * 工作日志-网格按月统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-02-04 - */ -public interface ScreenWorkRecordGridMonthlyService extends BaseService { - - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-02-04 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-02-04 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return ScreenWorkRecordGridMonthlyDTO - * @author generator - * @date 2021-02-04 - */ - ScreenWorkRecordGridMonthlyDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-02-04 - */ - void save(ScreenWorkRecordGridMonthlyDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-02-04 - */ - void update(ScreenWorkRecordGridMonthlyDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-02-04 - */ - void delete(String[] ids); - - /** - * @Description 数据录入 - * @param customerId - * @param data - * @return void - * @author wangc - * @date 2021.02.04 15:27 - */ - void collect(String customerId, ScreenCollFormDTO data); -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java deleted file mode 100644 index fa69352aa3..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * 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.service.plugins.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.plugins.ScreenWorkRecordGridMonthlyDao; -import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO; -import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.plugins.ScreenWorkRecordGridMonthlyEntity; -import com.epmet.service.plugins.ScreenWorkRecordGridMonthlyService; -import com.google.common.collect.Lists; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -/** - * 工作日志-网格按月统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-02-04 - */ -@Service -public class ScreenWorkRecordGridMonthlyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordGridMonthlyService { - - - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ScreenWorkRecordGridMonthlyDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordGridMonthlyDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - - return wrapper; - } - - @Override - public ScreenWorkRecordGridMonthlyDTO get(String id) { - ScreenWorkRecordGridMonthlyEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordGridMonthlyDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(ScreenWorkRecordGridMonthlyDTO dto) { - ScreenWorkRecordGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordGridMonthlyEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(ScreenWorkRecordGridMonthlyDTO dto) { - ScreenWorkRecordGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordGridMonthlyEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - - /** - * @Description 数据录入 - * @param customerId - * @param data - * @return void - * @author wangc - * @date 2021.02.04 15:27 - */ - @Transactional(rollbackFor = Exception.class) - @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) - @Override - public void collect(String customerId, ScreenCollFormDTO data) { - if(data.getIsFirst()){ - int affectedRows = baseDao.deleteBatch(customerId,data.getMonthId()); - while(affectedRows > 0){ - affectedRows = baseDao.deleteBatch(customerId,data.getMonthId()); - } - } - Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,data.getMonthId()); - }); - } - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql index 5be4de5dea..87365d4ab7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql @@ -88,28 +88,6 @@ CREATE TABLE `screen_customer_work_record_dict` ( PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志资源字典表'; -drop table if EXISTS screen_work_record_grid_monthly; -CREATE TABLE `screen_work_record_grid_monthly` ( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id:yyyyMM', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的组织id', - `MEETING_CODE` varchar(255) NOT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', - `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', - `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', - `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', - `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '参与人数', - `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人数', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-网格按月统计(增量)'; - drop table if EXISTS screen_work_record_org_monthly; CREATE TABLE `screen_work_record_org_monthly` ( `ID` varchar(64) NOT NULL COMMENT 'ID 主键', @@ -131,27 +109,6 @@ CREATE TABLE `screen_work_record_org_monthly` ( PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-组织按月统计(增量)'; -drop table if EXISTS screen_work_record_grid_daily; -CREATE TABLE `screen_work_record_grid_daily` ( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `DATE_ID` varchar(8) NOT NULL COMMENT '日期Id:yyyyMMdd', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的组织id', - `MEETING_CODE` varchar(255) NOT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', - `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', - `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', - `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', - `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '参与人数', - `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人数', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作日志-网格按日统计(累计值)'; drop table if EXISTS screen_work_record_org_daily; CREATE TABLE `screen_work_record_org_daily` ( diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml deleted file mode 100644 index 02ecd54811..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERT INTO screen_work_record_grid_monthly - ( - id, - customer_id, - month_id, - grid_id, - agency_id, - meeting_code, - type_code, - organize_total, - participate_total, - participate_user_total, - avg_participate_user_total, - del_flag, - revision, - created_by, - created_time, - updated_by, - updated_time - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - - #{customerId}, - - #{monthId}, - - #{item.gridId}, - - #{item.agencyId}, - - #{item.meetingCode}, - - #{item.typeCode}, - - #{item.organizeTotal}, - - #{item.participateTotal}, - - #{item.participateUserTotal}, - - #{item.avgParticipateUserTotal}, - - '0', - - 0, - - 'APP_USER', - - now(), - - 'APP_USER', - - now() - ) - - - - - delete from screen_work_record_grid_monthly - where customer_id = #{customerId} - and month_id = #{monthId} - limit 1000 - - - \ No newline at end of file From fee2c4547c823bf15359680ac9f770f591703eee Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Feb 2021 10:59:46 +0800 Subject: [PATCH 072/101] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=88=86=E6=9E=90-=E4=BA=8B=E4=BB=B6=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=88=86=E6=9E=90=E9=94=99=E8=AF=AF=E4=BB=A3=E7=A0=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenProjectCategoryGridDailyDao.java | 31 ---- .../ScreenProjectCategoryOrgDailyDao.java | 32 ----- ...ScreenProjectCategoryGridDailyService.java | 29 ---- .../ScreenProjectCategoryOrgDailyService.java | 29 ---- ...enProjectCategoryGridDailyServiceImpl.java | 37 ----- ...eenProjectCategoryOrgDailyServiceImpl.java | 35 ----- .../ScreenProjectCategoryGridDailyDao.xml | 6 - .../ScreenProjectCategoryOrgDailyDao.xml | 8 -- .../ScreenProjectCategoryGridDailyDTO.java | 127 ----------------- .../ScreenProjectCategoryOrgDailyDTO.java | 132 ------------------ .../ScreenProjectDataCollController.java | 30 ---- .../ScreenProjectCategoryGridDailyDao.java | 40 ------ .../ScreenProjectCategoryOrgDailyDao.java | 41 ------ .../ScreenProjectCategoryGridDailyEntity.java | 93 ------------ .../ScreenProjectCategoryOrgDailyEntity.java | 98 ------------- ...ScreenProjectCategoryGridDailyService.java | 105 -------------- .../ScreenProjectCategoryOrgDailyService.java | 106 -------------- ...enProjectCategoryGridDailyServiceImpl.java | 127 ----------------- ...eenProjectCategoryOrgDailyServiceImpl.java | 127 ----------------- .../migration/V0.0.9__add_event_analysis.sql | 46 ------ .../ScreenProjectCategoryGridDailyDao.xml | 98 ------------- .../ScreenProjectCategoryOrgDailyDao.xml | 104 -------------- 22 files changed, 1481 deletions(-) delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml delete mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java deleted file mode 100644 index e5d92af056..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 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.datareport.dao.evaluationindex.screen; - -import org.apache.ibatis.annotations.Mapper; - -/** - * 项目(事件)分类按网格_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Mapper -public interface ScreenProjectCategoryGridDailyDao{ - -} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java deleted file mode 100644 index c9403d83ad..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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.datareport.dao.evaluationindex.screen; - -import org.apache.ibatis.annotations.Mapper; - -/** - * 项目(事件)分类按组织_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Mapper -public interface ScreenProjectCategoryOrgDailyDao { - - -} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java deleted file mode 100644 index 6fa3939479..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * 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.datareport.service.evaluationindex.screen; - -/** - * 项目(事件)分类按网格_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -public interface ScreenProjectCategoryGridDailyService{ - - -} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java deleted file mode 100644 index ea6bbd3bbc..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * 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.datareport.service.evaluationindex.screen; - - -/** - * 项目(事件)分类按组织_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -public interface ScreenProjectCategoryOrgDailyService{ - -} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java deleted file mode 100644 index 0aa3731bc9..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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.datareport.service.evaluationindex.screen.impl; - - -import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectCategoryGridDailyService; -import org.springframework.stereotype.Service; - -/** - * 项目(事件)分类按网格_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@DataSource(DataSourceConstant.EVALUATION_INDEX) -@Service -public class ScreenProjectCategoryGridDailyServiceImpl implements ScreenProjectCategoryGridDailyService { - - -} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java deleted file mode 100644 index 91ff2640b6..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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.datareport.service.evaluationindex.screen.impl; - -import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectCategoryOrgDailyService; -import org.springframework.stereotype.Service; - -/** - * 项目(事件)分类按组织_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@DataSource(DataSourceConstant.EVALUATION_INDEX) -@Service -public class ScreenProjectCategoryOrgDailyServiceImpl implements ScreenProjectCategoryOrgDailyService { - -} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml deleted file mode 100644 index 8a78a2ce57..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml deleted file mode 100644 index 10b3a02431..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java deleted file mode 100644 index 3124044699..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * 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.io.Serializable; -import java.util.Date; - - -/** - * 项目(事件)分类按网格_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Data -public class ScreenProjectCategoryGridDailyDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键 - */ - private String id; - - /** - * 客户ID - */ - private String customerId; - - /** - * 日期yyyyMMdd - */ - private String dateId; - - /** - * 网格id - */ - private String gridId; - - /** - * 网格所属的组织id - */ - private String pid; - - /** - * 网格所有的父级id,以英文:或者英文,隔开 - */ - private String pids; - - /** - * 类别编码 - */ - private String epmetCategoryCode; - - /** - * 该分类下所有项目总数 - */ - private Integer projectTotal; - - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - - /** - * 删除标识 - */ - private String delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java deleted file mode 100644 index 1cd31dd6cf..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * 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.io.Serializable; -import java.util.Date; - - -/** - * 项目(事件)分类按组织_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Data -public class ScreenProjectCategoryOrgDailyDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键 - */ - private String id; - - /** - * 客户ID - */ - private String customerId; - - /** - * 日期yyyyMMdd - */ - private String dateId; - - /** - * 组织id - */ - private String orgId; - - /** - * 社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province - */ - private String orgType; - - /** - * 当前orgId所属的上级id - */ - private String pid; - - /** - * orgId所有的父级id,以英文:或者英文,隔开 - */ - private String pids; - - /** - * 类别编码 - */ - private String epmetCategoryCode; - - /** - * 该分类下所有项目总数 - */ - private Integer projectTotal; - - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - - /** - * 删除标识 - */ - private String delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java index 3d0754ac8f..f970bb9f03 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -25,10 +25,6 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("project") public class ScreenProjectDataCollController { - @Autowired - private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; - @Autowired - private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService; @Autowired private ScreenProjectGridDailyService projectGridDailyService; @Autowired @@ -38,32 +34,6 @@ public class ScreenProjectDataCollController { @Autowired private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService; - /** - * @author wangc - * @description 【事件/项目分析】按类别统计-网格 - **/ - @RequestMapping("category-grid-daily") - public Result categoryGridDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { - throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); - } - projectCategoryGridDailyService.collect(customerId, param); - return new Result(); - } - - /** - * @author wangc - * @description 【事件/项目分析】按类别统计-组织 - **/ - @RequestMapping("category-org-daily") - public Result categoryOrgDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { - throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); - } - projectCategoryOrgDailyService.collect(customerId, param); - return new Result(); - } - /** * @author wangc * @description 【事件/项目分析】网格内月度数量统计 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java deleted file mode 100644 index b17de4183e..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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.dao.evaluationindex.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; -import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 项目(事件)分类按网格_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Mapper -public interface ScreenProjectCategoryGridDailyDao extends BaseDao { - - void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("createdBy") String createdBy, @Param("timeId") String timeId); - - int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java deleted file mode 100644 index 64be263089..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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.dao.evaluationindex.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; -import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 项目(事件)分类按组织_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Mapper -public interface ScreenProjectCategoryOrgDailyDao extends BaseDao { - - void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("createdBy") String createdBy, @Param("timeId") String timeId); - - int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java deleted file mode 100644 index e26954c05e..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * 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.entity.evaluationindex.screen; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 项目(事件)分类按网格_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("screen_project_category_grid_daily") -public class ScreenProjectCategoryGridDailyEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 客户ID - */ - private String customerId; - - /** - * 日期yyyyMMdd - */ - private String dateId; - - /** - * 网格id - */ - private String gridId; - - /** - * 网格所属的组织id - */ - private String pid; - - /** - * 网格所有的父级id,以英文:或者英文,隔开 - */ - private String pids; - - /** - * 类别编码 - */ - private String epmetCategoryCode; - - /** - * 该分类下所有项目总数 - */ - private Integer projectTotal; - - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java deleted file mode 100644 index 5137fc648c..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * 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.entity.evaluationindex.screen; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 项目(事件)分类按组织_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("screen_project_category_org_daily") -public class ScreenProjectCategoryOrgDailyEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 客户ID - */ - private String customerId; - - /** - * 日期yyyyMMdd - */ - private String dateId; - - /** - * 组织id - */ - private String orgId; - - /** - * 社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province - */ - private String orgType; - - /** - * 当前orgId所属的上级id - */ - private String pid; - - /** - * orgId所有的父级id,以英文:或者英文,隔开 - */ - private String pids; - - /** - * 类别编码 - */ - private String epmetCategoryCode; - - /** - * 该分类下所有项目总数 - */ - private Integer projectTotal; - - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java deleted file mode 100644 index 973386dac7..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * 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.service.evaluationindex.screen; - -import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; -import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; - -import java.util.List; -import java.util.Map; - -/** - * 项目(事件)分类按网格_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -public interface ScreenProjectCategoryGridDailyService extends BaseService { - - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-01-27 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-01-27 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return ScreenProjectCategoryGridDailyDTO - * @author generator - * @date 2021-01-27 - */ - ScreenProjectCategoryGridDailyDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-01-27 - */ - void save(ScreenProjectCategoryGridDailyDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-01-27 - */ - void update(ScreenProjectCategoryGridDailyDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-01-27 - */ - void delete(String[] ids); - - /** - * @Description 数据录入 - * @param - * @return void - * @author wangc - * @date 2021.01.28 09:09 - */ - void collect(String customerId, ScreenCollFormDTO data); -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java deleted file mode 100644 index 2852987904..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * 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.service.evaluationindex.screen; - -import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; -import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; - -import java.util.List; -import java.util.Map; - -/** - * 项目(事件)分类按组织_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -public interface ScreenProjectCategoryOrgDailyService extends BaseService { - - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-01-27 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-01-27 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return ScreenProjectCategoryOrgDailyDTO - * @author generator - * @date 2021-01-27 - */ - ScreenProjectCategoryOrgDailyDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-01-27 - */ - void save(ScreenProjectCategoryOrgDailyDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-01-27 - */ - void update(ScreenProjectCategoryOrgDailyDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-01-27 - */ - void delete(String[] ids); - - /** - * @Description 数据采集 - * @param customerId - * @param data - * @return void - * @author wangc - * @date 2021.01.28 09:33 - */ - void collect(String customerId, ScreenCollFormDTO data); -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java deleted file mode 100644 index 3b67c5f73d..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * 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.service.evaluationindex.screen.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryGridDailyDao; -import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; -import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; -import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryGridDailyService; -import com.google.common.collect.Lists; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -/** - * 项目(事件)分类按网格_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Service -public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl implements ScreenProjectCategoryGridDailyService { - - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ScreenProjectCategoryGridDailyDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, ScreenProjectCategoryGridDailyDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - - return wrapper; - } - - @Override - public ScreenProjectCategoryGridDailyDTO get(String id) { - ScreenProjectCategoryGridDailyEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, ScreenProjectCategoryGridDailyDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(ScreenProjectCategoryGridDailyDTO dto) { - ScreenProjectCategoryGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectCategoryGridDailyEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(ScreenProjectCategoryGridDailyDTO dto) { - ScreenProjectCategoryGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectCategoryGridDailyEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - - /** - * @Description 数据录入 - * @param - * @return void - * @author wangc - * @date 2021.01.28 09:09 - */ - @Transactional(rollbackFor = Exception.class) - @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) - @Override - public void collect(String customerId, ScreenCollFormDTO data) { - if(data.getIsFirst()){ - int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); - while(affectedRows > 0){ - affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); - } - } - Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,"APP_USER",data.getDateId()); - }); - } - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java deleted file mode 100644 index a2d79822aa..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * 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.service.evaluationindex.screen.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryOrgDailyDao; -import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; -import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; -import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryOrgDailyService; -import com.google.common.collect.Lists; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -/** - * 项目(事件)分类按组织_按天统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-01-27 - */ -@Service -public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl implements ScreenProjectCategoryOrgDailyService { - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ScreenProjectCategoryOrgDailyDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, ScreenProjectCategoryOrgDailyDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - - return wrapper; - } - - @Override - public ScreenProjectCategoryOrgDailyDTO get(String id) { - ScreenProjectCategoryOrgDailyEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, ScreenProjectCategoryOrgDailyDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(ScreenProjectCategoryOrgDailyDTO dto) { - ScreenProjectCategoryOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectCategoryOrgDailyEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(ScreenProjectCategoryOrgDailyDTO dto) { - ScreenProjectCategoryOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectCategoryOrgDailyEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - - /** - * @Description 数据采集 - * @param customerId - * @param data - * @return void - * @author wangc - * @date 2021.01.28 09:33 - */ - @Transactional(rollbackFor = Exception.class) - @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) - @Override - public void collect(String customerId, ScreenCollFormDTO data) { - if(data.getIsFirst()){ - int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); - while(affectedRows > 0){ - affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); - } - } - Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,"APP_USER",data.getDateId()); - }); - } - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql index b2c2e623f2..2ee65f59c2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql @@ -97,49 +97,3 @@ CREATE TABLE `screen_project_quantity_org_monthly` ( PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)数量分析按组织_按月统计'; -drop table if EXISTS screen_project_category_grid_daily; -CREATE TABLE `screen_project_category_grid_daily` ( - `ID` varchar(64) NOT NULL COMMENT '主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', - `DATE_ID` varchar(8) NOT NULL COMMENT '日期yyyyMMdd', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', - `PID` varchar(64) NOT NULL COMMENT '网格所属的组织id', - `PIDS` varchar(255) NOT NULL COMMENT '网格所有的父级id,以英文:或者英文,隔开', - `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT 'e世通中的项目类别编码', - `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', - `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', - `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数', - `UN_RESOLVED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案无需解决的项目总数', - `RESOLVED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案已解决的项目总数', - `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', - `REVISION` int(10) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)分类按网格_按天统计'; - -drop table if EXISTS screen_project_category_org_daily; -CREATE TABLE `screen_project_category_org_daily` ( - `ID` varchar(64) NOT NULL COMMENT '主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', - `DATE_ID` varchar(8) NOT NULL COMMENT '日期yyyyMMdd', - `ORG_ID` varchar(64) NOT NULL COMMENT '组织id', - `ORG_TYPE` varchar(64) NOT NULL COMMENT '社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province', - `PID` varchar(64) NOT NULL COMMENT '当前orgId所属的上级id', - `PIDS` varchar(255) NOT NULL COMMENT 'orgId所有的父级id,以英文:或者英文,隔开', - `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT 'e世通中的项目类别编码', - `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', - `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', - `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数', - `UN_RESOLVED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案无需解决的项目总数', - `RESOLVED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案已解决的项目总数', - `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', - `REVISION` int(10) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目(事件)分类按组织_按天统计'; \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml deleted file mode 100644 index 307d11d50d..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERT INTO screen_project_category_grid_daily - ( - id, - customer_id, - date_id, - grid_id, - pid, - pids, - epmet_category_code, - project_total, - pending_total, - closed_total, - un_resolved_total, - resolved_total, - del_flag, - revision, - created_by, - created_time, - updated_by, - updated_time - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - - #{customerId}, - - #{timeId}, - - #{item.gridId}, - - #{item.pid}, - - #{item.pids}, - - #{item.epmetCategoryCode}, - - #{item.projectTotal}, - - #{item.pendingTotal}, - - #{item.closedTotal}, - - #{item.unResolvedTotal}, - - #{item.resolvedTotal}, - - '0', - - 0, - - #{createdBy}, - - now(), - - #{createdBy}, - - now() - ) - - - - - - delete from screen_project_category_grid_daily - where customer_id = #{customerId} - and date_id = #{dateId} - limit 1000 - - - \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml deleted file mode 100644 index 512e0c6e66..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERT INTO screen_project_category_org_daily - ( - id, - customer_id, - date_id, - org_id, - org_type, - pid, - pids, - epmet_category_code, - project_total, - pending_total, - closed_total, - un_resolved_total, - resolved_total, - del_flag, - revision, - created_by, - created_time, - updated_by, - updated_time - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - - #{customerId}, - - #{timeId}, - - #{item.orgId}, - - #{item.orgType}, - - #{item.pid}, - - #{item.pids}, - - #{item.epmetCategoryCode}, - - #{item.projectTotal}, - - #{item.pendingTotal}, - - #{item.closedTotal}, - - #{item.unResolvedTotal}, - - #{item.resolvedTotal}, - - '0', - - 0, - - #{createdBy}, - - now(), - - #{createdBy}, - - now() - ) - - - - - - delete from screen_project_category_org_daily - where customer_id = #{customerId} - and date_id = #{dateId} - limit 1000 - - - - - \ No newline at end of file From 94e7c4c0550109a4987e19baba07397f141626d2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Feb 2021 11:06:29 +0800 Subject: [PATCH 073/101] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=88=86=E6=9E=90-=E4=BA=8B=E4=BB=B6=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=88=86=E6=9E=90=E9=94=99=E8=AF=AF=E4=BB=A3=E7=A0=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E3=80=822?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/controller/project/ProjectController.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index 49793ef6fe..022b840d37 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java @@ -34,10 +34,6 @@ public class ProjectController { @Autowired private ProjectService projectService; @Autowired - private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; - @Autowired - private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService; - @Autowired private ScreenProjectGridDailyService projectGridDailyService; @Autowired private ScreenProjectOrgDailyService projectOrgDailyService; From f1c13d24712f4ad12486894bc773f81920447534 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Feb 2021 11:19:39 +0800 Subject: [PATCH 074/101] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=88=86=E6=9E=90-=E4=BA=8B=E4=BB=B6=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=88=86=E6=9E=90=E9=94=99=E8=AF=AF=E4=BB=A3=E7=A0=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E3=80=823?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/datareport/controller/project/ProjectController.java | 2 +- .../com/epmet/controller/ScreenProjectDataCollController.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index 022b840d37..88fa5c31b8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java @@ -167,5 +167,5 @@ public class ProjectController { return new Result>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO)); } - //todo 【事件类型分析】 + //todo 【事件类型分析】NEI接口地址: https://nei.netease.com/interface/detail/?pid=57068&id=346721 } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java index f970bb9f03..2efc866c87 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -86,4 +86,7 @@ public class ScreenProjectDataCollController { return new Result(); } + //todo 【事件/项目分析】按类别统计-网格 + //todo 【事件/项目分析】按类别统计-组织 + //上述两个接口可以有采集接口方便灌假数。后面项目分类统计两个方案A:从项目信息中分析计算到大屏表; B:下面三个子客户(榆山街道、孔村街道、锦水街道)单独上报;子客户根据area_code计算 } From 3c64fcc6668fcd2215dc641c69a7e12b6b1f09b6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Feb 2021 14:15:16 +0800 Subject: [PATCH 075/101] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=88=A0=E9=99=A4participateTotal=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java | 5 ----- .../epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java | 5 ----- .../entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java | 5 ----- .../resources/db/migration/V0.0.8__add_plugins_table.sql | 6 ++---- .../mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml | 4 ---- 5 files changed, 2 insertions(+), 23 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java index c80f1431a4..92a13b72ed 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java @@ -34,11 +34,6 @@ public class ScreenWorkRecordOrgDailyFormDTO implements Serializable { */ private Integer organizeTotal; - /** - * 当前组织参与的总次数 - */ - private Integer participateTotal; - /** * 参与人数 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java index 202ce07a3c..4848454792 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java @@ -69,11 +69,6 @@ public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { */ private Integer organizeTotal; - /** - * 当前组织参与的总次数 - */ - private Integer participateTotal; - /** * 参与人数 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java index 637ca82807..a7bf893b08 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java @@ -65,11 +65,6 @@ public class ScreenWorkRecordOrgMonthlyEntity extends BaseEpmetEntity { */ private Integer organizeTotal; - /** - * 当前组织参与的总次数 - */ - private Integer participateTotal; - /** * 参与人数 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql index 87365d4ab7..513549004f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql @@ -93,11 +93,10 @@ CREATE TABLE `screen_work_record_org_monthly` ( `ID` varchar(64) NOT NULL COMMENT 'ID 主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id:yyyyMM', - `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Idor网格id', `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', - `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '参与人数', `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人数', `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', @@ -115,11 +114,10 @@ CREATE TABLE `screen_work_record_org_daily` ( `ID` varchar(64) NOT NULL COMMENT 'ID 主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', `DATE_ID` varchar(8) NOT NULL COMMENT '日期Id:yyyyMMdd', - `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Idor网格id', `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', - `PARTICIPATE_TOTAL` int(11) NOT NULL COMMENT '当前组织参与的总次数', `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '参与人数', `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '平均参与人数', `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml index e930cb3b7c..8c9c216b5e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml @@ -11,7 +11,6 @@ - @@ -33,7 +32,6 @@ meeting_code, type_code, organize_total, - participate_total, participate_user_total, avg_participate_user_total, del_flag, @@ -59,8 +57,6 @@ #{item.organizeTotal}, - #{item.participateTotal}, - #{item.participateUserTotal}, #{item.avgParticipateUserTotal}, From f4ad94db7b80749af39e17e1f1c5c89909e153e9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Feb 2021 15:04:03 +0800 Subject: [PATCH 076/101] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V0.0.5__screen_org_add_source_col.sql | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql index cfd75caa08..decea637ee 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.5__screen_org_add_source_col.sql @@ -1,41 +1,41 @@ -- 一、epmet_evaluation_index执行以下sql, -- 1、五级指标表,采集增加分子分母列 -# alter table fact_index_party_ablity_grid_monthly add column SHIFTED_PROJECT_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:issueToProjectRatio的分子:评价周期内转为项目的数量'; -# alter table fact_index_party_ablity_grid_monthly add column ISSUE_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:issueToProjectRatio的分母:评价周期内网格内居民提出的议题数目'; +alter table fact_index_party_ablity_grid_monthly add column SHIFTED_PROJECT_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:issueToProjectRatio的分子:评价周期内转为项目的数量'; +alter table fact_index_party_ablity_grid_monthly add column ISSUE_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:issueToProjectRatio的分母:评价周期内网格内居民提出的议题数目'; -# alter table fact_index_service_ablity_grid_monthly add column PARTY_VOLUNTEER_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:partyVolunteerRatio的分子:网格党员志愿者数'; -# alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:partyVolunteerRatio的分母:志愿者总数'; -# alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_USER_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:volunteerRatio的分子:居民且注册志愿者的总人数'; -# alter table fact_index_service_ablity_grid_monthly add column REG_USER_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:volunteerRatio的分母:网格内注册居民数'; +alter table fact_index_service_ablity_grid_monthly add column PARTY_VOLUNTEER_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:partyVolunteerRatio的分子:网格党员志愿者数'; +alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:partyVolunteerRatio的分母:志愿者总数'; +alter table fact_index_service_ablity_grid_monthly add column VOLUNTEER_USER_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:volunteerRatio的分子:居民且注册志愿者的总人数'; +alter table fact_index_service_ablity_grid_monthly add column REG_USER_TOTAL int(11) DEFAULT 0 COMMENT 'V2升级字段:volunteerRatio的分母:网格内注册居民数'; -# alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_grid_monthly add column TRANSFER_RIGHT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_grid_monthly add column SATISFACTION_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_grid_monthly add column ISSUE_TO_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_dept_monthly add column RESP_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_dept_monthly add column HANDLE_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_dept_monthly add column CLOSED_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_dept_monthly add column SATISFACTION_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -# alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column RESP_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column CLOSED_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column SATISFACTION_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column OVERDUE_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FZ decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; +alter table fact_index_govrn_ablity_org_monthly add column HANDLE_PROJECT_RATIO_FM decimal(14,6) DEFAULT 0 COMMENT 'V2升级新增字段, 详见说明文档'; -- 2、epmet_evaluation_index、epmet_data_statistical_display 都要执行,网格和部门增加area_code -# alter table screen_customer_grid add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0'; -# alter table screen_customer_dept add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前部门所属行政地区编码,去除末尾0'; -# alter table screen_customer_agency add column `PARENT_AREA_CODE` varchar(30) DEFAULT NULL COMMENT '当前组织的上级行政地区编码add0204;举例平阴县370124对应的是济南市3701'; +alter table screen_customer_grid add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前网格所属行政地区编码,去除末尾0'; +alter table screen_customer_dept add column AREA_CODE varchar(30) DEFAULT NULL COMMENT 'V2升级必传参数:当前部门所属行政地区编码,去除末尾0'; +alter table screen_customer_agency add column `PARENT_AREA_CODE` varchar(30) DEFAULT NULL COMMENT '当前组织的上级行政地区编码add0204;举例平阴县370124对应的是济南市3701'; From 2aff053d0e39413add1138956bf3efc4dc0f8e91 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Feb 2021 15:16:12 +0800 Subject: [PATCH 077/101] =?UTF-8?q?=E9=85=92=E5=9F=8EH5=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=AB=AF=E7=99=BB=E9=99=86=E4=B8=A4=E4=B8=AA=E8=8E=B7=E5=8F=96?= =?UTF-8?q?token=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/SsoController.java | 25 ++ .../com/epmet/dto/form/SsoEnteOrgFormDTO.java | 53 ++++ .../com/epmet/dto/form/SsoLoginFormDTO.java | 5 +- .../java/com/epmet/service/SsoService.java | 15 + .../epmet/service/impl/SsoServiceImpl.java | 298 +++++++++++++++++- .../common/token/constant/LoginConstant.java | 5 + 6 files changed, 393 insertions(+), 8 deletions(-) create mode 100644 epmet-auth/src/main/java/com/epmet/dto/form/SsoEnteOrgFormDTO.java diff --git a/epmet-auth/src/main/java/com/epmet/controller/SsoController.java b/epmet-auth/src/main/java/com/epmet/controller/SsoController.java index 6d17e1a9a0..86fc44aa18 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/SsoController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/SsoController.java @@ -4,8 +4,10 @@ import com.epmet.commons.thirdplat.apiservice.jcet.JcetApiService; import com.epmet.commons.thirdplat.bean.ThirdPlatUserInfo; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.SsoEnteOrgFormDTO; import com.epmet.dto.form.SsoLoginFormDTO; import com.epmet.dto.result.SsoLoginResultDTO; +import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.service.SsoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -50,4 +52,27 @@ public class SsoController { return new Result().ok(userInfoByTicket); } + /** + * @param formDTO + * @Author sun + * @Description 1、ticket自动登录获取内部token + **/ + @PostMapping("work/login") + public Result ssoWorkLogin(@RequestBody SsoLoginFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, SsoLoginFormDTO.SsoLoginForm.class); + return new Result().ok(ssoService.ssoWorkLogin(formDTO)); + } + + /** + * @param formDTO + * @Author sun + * @Description 4、自动进入组织-返回token + **/ + @PostMapping(value = "work/enterorg") + public Result enterOrg(@RequestBody SsoEnteOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, SsoEnteOrgFormDTO.AddUserShowGroup.class, SsoEnteOrgFormDTO.AddUserInternalGroup.class); + UserTokenResultDTO userTokenResultDTO = ssoService.enterOrg(formDTO); + return new Result().ok(userTokenResultDTO); + } + } diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/SsoEnteOrgFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/SsoEnteOrgFormDTO.java new file mode 100644 index 0000000000..4706061267 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/dto/form/SsoEnteOrgFormDTO.java @@ -0,0 +1,53 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 4、自动进入组织-返回token + * @Author sun + */ +@Data +public class SsoEnteOrgFormDTO implements Serializable { + public interface AddUserInternalGroup {} + public interface AddUserShowGroup extends CustomerClientShowGroup {} + /** + * wxCode + */ + @NotBlank(message = "ticket不能为空",groups = {AddUserInternalGroup.class}) + private String ticket; + + /** + * 手机号 + */ + @NotBlank(message = "手机号不能为空",groups = {AddUserShowGroup.class}) + private String mobile; + + /** + * 选择的组织所属的id + */ + @NotBlank(message = "客户id不能为空",groups = {AddUserInternalGroup.class}) + private String customerId; + + /** + * 选择的要进入的组织(根组织id) + */ + @NotBlank(message = "组织id不能为空",groups = {AddUserInternalGroup.class}) + private String rootAgencyId; + + /** + * resi;居民段,gov:工作端 + */ + @NotBlank(message = "app不能为空",groups = SsoLoginFormDTO.SsoLoginForm.class) + private String app; + + /** + * app;居民段,app:工作端 + */ + @NotBlank(message = "client不能为空",groups = SsoLoginFormDTO.SsoLoginForm.class) + private String client; +} + diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/SsoLoginFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/SsoLoginFormDTO.java index b50818d3cc..eea5394ed5 100644 --- a/epmet-auth/src/main/java/com/epmet/dto/form/SsoLoginFormDTO.java +++ b/epmet-auth/src/main/java/com/epmet/dto/form/SsoLoginFormDTO.java @@ -29,11 +29,14 @@ public class SsoLoginFormDTO implements Serializable { private String appId; /** - * app类型 resi;居民段,work:工作端 + * app类型 resi;居民段,gov:工作端 */ @NotBlank(message = "app不能为空",groups = SsoLoginForm.class) private String app; + /** + * app;居民段,app:工作端 + */ @NotBlank(message = "client不能为空",groups = SsoLoginForm.class) private String client; } diff --git a/epmet-auth/src/main/java/com/epmet/service/SsoService.java b/epmet-auth/src/main/java/com/epmet/service/SsoService.java index 3cbd2b9af2..a2986482ab 100644 --- a/epmet-auth/src/main/java/com/epmet/service/SsoService.java +++ b/epmet-auth/src/main/java/com/epmet/service/SsoService.java @@ -1,7 +1,9 @@ package com.epmet.service; +import com.epmet.dto.form.SsoEnteOrgFormDTO; import com.epmet.dto.form.SsoLoginFormDTO; import com.epmet.dto.result.SsoLoginResultDTO; +import com.epmet.dto.result.UserTokenResultDTO; /** * @Author zxc @@ -17,4 +19,17 @@ public interface SsoService { */ SsoLoginResultDTO ssoLogin(SsoLoginFormDTO formDTO); + /** + * @param formDTO + * @Author sun + * @Description 1、ticket自动登录获取内部token + **/ + UserTokenResultDTO ssoWorkLogin(SsoLoginFormDTO formDTO); + + /** + * @param formDTO + * @Author sun + * @Description 4、自动进入组织-返回token + **/ + UserTokenResultDTO enterOrg(SsoEnteOrgFormDTO formDTO); } diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java index ede5acd988..67d00ea4e6 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java @@ -2,20 +2,20 @@ package com.epmet.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.epmet.common.token.constant.LoginConstant; import com.epmet.commons.thirdplat.apiservice.AbstractApiService; import com.epmet.commons.thirdplat.bean.ThirdPlatUserInfo; import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.security.dto.GovTokenDto; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.*; -import com.epmet.dto.PaCustomerDTO; -import com.epmet.dto.UserDTO; -import com.epmet.dto.form.ApiServiceFormDTO; -import com.epmet.dto.form.SsoLoginFormDTO; -import com.epmet.dto.form.UserInfoFormDTO; -import com.epmet.dto.result.SsoLoginResultDTO; -import com.epmet.dto.result.ThirdplatApiserviceResultDTO; +import com.epmet.dto.*; +import com.epmet.dto.form.*; +import com.epmet.dto.result.*; import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCrmOpenFeignClient; import com.epmet.jwt.JwtTokenProperties; import com.epmet.jwt.JwtTokenUtils; @@ -27,9 +27,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; /** * @Author zxc @@ -56,6 +60,12 @@ public class SsoServiceImpl implements SsoService { @Autowired private OperCrmOpenFeignClient operCrmOpenFeignClient; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + + @Autowired + private CpUserDetailRedis cpUserDetailRedis; + /** * @Description 0、入口:得到token * @Param formDTO @@ -182,4 +192,278 @@ public class SsoServiceImpl implements SsoService { log.info("小程序登陆third服务获取客户用户信息PaCustomerDTO->" + customer); return customer.getId(); } + + /** + * @param formDTO + * @Author sun + * @Description 1、ticket自动登录获取内部token + **/ + @Override + public UserTokenResultDTO ssoWorkLogin(SsoLoginFormDTO formDTO) { + + //1.根据appId查询客户id + String customerId = getCustomerId(formDTO.getAppId()); + + //2.客户Id换取第三方apiService,根据ticket换取华为Id + Result apiServiceResult = operCrmOpenFeignClient.getApiServiceByCustomerId(new ApiServiceFormDTO(customerId)); + if (!apiServiceResult.success()) { + throw new RenException("【SSO登录】调用OperCrm获取ApiService接口失败:", apiServiceResult.getInternalMsg()); + } + if (apiServiceResult.getData() == null || StringUtils.isBlank(apiServiceResult.getData().getApiServiceName())) { + throw new RenException("【SSO登录】调用OperCrm获取ApiService,查询到的结果为空:", apiServiceResult.toString()); + } + ThirdPlatUserInfo userInfo; + try { + AbstractApiService apiService = (AbstractApiService) SpringContextUtils.getBean(apiServiceResult.getData().getApiServiceName()); + userInfo = apiService.getUserInfoByTicket(formDTO.getTicket()); + } catch (Exception e) { + throw new RenException(e.getMessage()); + } + if (null == userInfo){ + throw new RenException(EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getCode(), + "【SSO登录】调用第三方平台查询用户信息失败,用户信息为空"); + } + + //3.根据华为openId查询用户是否存在历史登陆信息 + Result latestStaffWechat = epmetUserOpenFeignClient.getLatestStaffWechatLoginRecord(userInfo.getOpenId()); + if (!latestStaffWechat.success() || null == latestStaffWechat.getData()) { + logger.error(String.format("没有获取到用户最近一次登录账户信息,code[%s],msg[%s]", EpmetErrorCode.PLEASE_LOGIN.getCode(), EpmetErrorCode.PLEASE_LOGIN.getMsg())); + throw new RenException(EpmetErrorCode.PLEASE_LOGIN.getCode()); + } + StaffLatestAgencyResultDTO staffLatestAgencyResultDTO = latestStaffWechat.getData(); + + //4.记录staff_wechat + this.savestaffwechat(staffLatestAgencyResultDTO.getStaffId(), userInfo.getOpenId()); + + //5.记录登录日志 + this.saveStaffLoginRecord(staffLatestAgencyResultDTO); + + //6.获取用户token + String token = this.generateGovWxmpToken(staffLatestAgencyResultDTO.getStaffId(), formDTO.getApp(), formDTO.getClient()); + + //7.保存到redis + this.saveLatestGovTokenDto(staffLatestAgencyResultDTO, userInfo, token); + UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); + userTokenResultDTO.setToken(token); + + return userTokenResultDTO; + + } + + /** + * @param userId openid + * @Author sun + * @Description 保存微信和当前登录用户关系 + **/ + private Result savestaffwechat(String userId, String openid) { + StaffWechatFormDTO staffWechatFormDTO = new StaffWechatFormDTO(); + staffWechatFormDTO.setUserId(userId); + staffWechatFormDTO.setWxOpenId(openid); + return epmetUserOpenFeignClient.saveStaffWechat(staffWechatFormDTO); + } + /** + * @param latestStaffWechatLoginDTO + * @Author sun + * @Description 保存登录日志 + **/ + private Result saveStaffLoginRecord(StaffLatestAgencyResultDTO latestStaffWechatLoginDTO) { + StaffLoginAgencyRecordFormDTO staffLoginAgencyRecordFormDTO = new StaffLoginAgencyRecordFormDTO(); + staffLoginAgencyRecordFormDTO.setCustomerId(latestStaffWechatLoginDTO.getCustomerId()); + staffLoginAgencyRecordFormDTO.setStaffId(latestStaffWechatLoginDTO.getStaffId()); + staffLoginAgencyRecordFormDTO.setWxOpenId(latestStaffWechatLoginDTO.getWxOpenId()); + staffLoginAgencyRecordFormDTO.setMobile(latestStaffWechatLoginDTO.getMobile()); + staffLoginAgencyRecordFormDTO.setAgencyId(latestStaffWechatLoginDTO.getAgencyId()); + Result staffLoginRecordResult = epmetUserOpenFeignClient.saveStaffLoginRecord(staffLoginAgencyRecordFormDTO); + return staffLoginRecordResult; + } + /** + * @Description 生成政府端小程序业务token Key + * @Author sun + **/ + private String generateGovWxmpToken(String staffId, String app, String client) { + Map map = new HashMap<>(); + map.put("app", app); + map.put("client", client); + map.put("userId", staffId); + String token = jwtTokenUtils.createToken(map); + logger.info("app:" + app + ";client:" + client + ";userId:" + staffId + ";生成token[" + token + "]"); + return token; + } + /** + * @Description 保存tokenDto到redis + * @Author sun + **/ + private void saveLatestGovTokenDto(StaffLatestAgencyResultDTO staffLatestAgency, ThirdPlatUserInfo userInfo, String token) { + int expire = jwtTokenProperties.getExpire(); + GovTokenDto govTokenDto = new GovTokenDto(); + govTokenDto.setApp(LoginConstant.APP_GOV); + govTokenDto.setClient(LoginConstant.CLIENT_WXMP); + govTokenDto.setUserId(staffLatestAgency.getStaffId()); + govTokenDto.setOpenId(userInfo.getOpenId()); + govTokenDto.setSessionKey(""); + govTokenDto.setUnionId(""); + govTokenDto.setToken(token); + govTokenDto.setUpdateTime(System.currentTimeMillis()); + govTokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime()); + govTokenDto.setRootAgencyId(staffLatestAgency.getAgencyId()); + govTokenDto.setCustomerId(staffLatestAgency.getCustomerId()); + + //设置部门,网格,角色列表 + govTokenDto.setDeptIdList(getDeptartmentIdList(staffLatestAgency.getStaffId())); + govTokenDto.setGridIdList(getGridIdList(staffLatestAgency.getStaffId())); + CustomerAgencyDTO agency = getAgencyByStaffId(staffLatestAgency.getStaffId()); + if (agency != null) { + govTokenDto.setAgencyId(agency.getId()); + govTokenDto.setRoleList(queryGovStaffRoles(staffLatestAgency.getStaffId(), agency.getId())); + } + govTokenDto.setOrgIdPath(getOrgIdPath(staffLatestAgency.getStaffId())); + + cpUserDetailRedis.set(govTokenDto, expire); + logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss")); + } + public Set getDeptartmentIdList(String staffId) { + try { + Result> deptListResult = govOrgOpenFeignClient.getDepartmentListByStaffId(staffId); + if (deptListResult.success()) { + if (!CollectionUtils.isEmpty(deptListResult.getData())) { + Set deptIdLists = deptListResult.getData().stream().map(dept -> dept.getDepartmentId()).collect(Collectors.toSet()); + return deptIdLists; + } + } else { + logger.error("登录:查询部门列表,远程调用返回错误:{}", deptListResult.getMsg()); + } + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error("登录:查询部门列表异常:{}", errorStackTrace); + } + return null; + } + /** + * 根据工作人员ID查询网格ID列表 + * @param staffId + */ + public Set getGridIdList(String staffId) { + Result> result = govOrgOpenFeignClient.listGridsbystaffid(staffId); + if (!result.success()) { + logger.error("登录:查询网格列表,远程调用返回错误:{}", result.getMsg()); + return null; + } else { + List grids = result.getData(); + return grids.stream().map(grid -> grid.getGridId()).collect(Collectors.toSet()); + } + } + /** + * 根据staffId查询所属的组织机构 + * + * @param staffId + */ + public CustomerAgencyDTO getAgencyByStaffId(String staffId) { + Result result = govOrgOpenFeignClient.getAgencyByStaff(staffId); + if (!result.success()) { + logger.error("登录:查询登录人所属的机关OrgIdPath失败:{}", result.getMsg()); + return null; + } + return result.getData(); + } + /** + * 查询人员在某机关单位下的角色列表 + * @param staffId orgId + */ + public List queryGovStaffRoles(String staffId, String orgId) { + StaffRoleFormDTO formDTO = new StaffRoleFormDTO(); + formDTO.setStaffId(staffId); + formDTO.setOrgId(orgId); + Result> gridResult = epmetUserOpenFeignClient.getRolesOfStaff(formDTO); + if (!CollectionUtils.isEmpty(gridResult.getData())) { + //return gridResult.getData().stream().map(role -> role.getId()).collect(Collectors.toSet()); + return ConvertUtils.sourceToTarget(gridResult.getData(), GovTokenDto.Role.class); + } + return null; + } + /** + * 查询工作人员的OrgIdPath + * @param staffId + */ + public String getOrgIdPath(String staffId) { + Result result = govOrgOpenFeignClient.getAgencyByStaff(staffId); + if (!result.success()) { + logger.error("登录:查询登录人所属的机关OrgIdPath失败:{}", result.getMsg()); + return null; + } + CustomerAgencyDTO agency = result.getData(); + if (agency != null) { + if ("0".equals(agency.getPid())) { + // 顶级 + return agency.getId(); + } else { + return agency.getPids().concat(":").concat(agency.getId()); + } + } + return null; + } + + /** + * @param formDTO + * @Author sun + * @Description 4、自动进入组织-返回token + **/ + @Override + public UserTokenResultDTO enterOrg(SsoEnteOrgFormDTO formDTO) { + //1、需要校验要登录的客户,是否被禁用 + CustomerStaffFormDTO customerStaffFormDTO = new CustomerStaffFormDTO(); + customerStaffFormDTO.setCustomerId(formDTO.getCustomerId()); + customerStaffFormDTO.setMobile(formDTO.getMobile()); + Result customerStaffDTOResult = epmetUserOpenFeignClient.getCustomerStaffInfo(customerStaffFormDTO); + if (!customerStaffDTOResult.success() || null == customerStaffDTOResult.getData()) { + logger.error(String.format("获取工作人员信息失败,手机号[%s],客户id:[%s],code[%s],msg[%s]", formDTO.getMobile(), formDTO.getCustomerId(), customerStaffDTOResult.getCode(), customerStaffDTOResult.getMsg())); + throw new RenException(customerStaffDTOResult.getCode()); + } + CustomerStaffDTO customerStaff = customerStaffDTOResult.getData(); + + //2.客户Id换取第三方apiService,根据ticket换取华为Id + Result apiServiceResult = operCrmOpenFeignClient.getApiServiceByCustomerId(new ApiServiceFormDTO(formDTO.getCustomerId())); + if (!apiServiceResult.success()) { + throw new RenException("【SSO登录】调用OperCrm获取ApiService接口失败:", apiServiceResult.getInternalMsg()); + } + if (apiServiceResult.getData() == null || StringUtils.isBlank(apiServiceResult.getData().getApiServiceName())) { + throw new RenException("【SSO登录】调用OperCrm获取ApiService,查询到的结果为空:", apiServiceResult.toString()); + } + ThirdPlatUserInfo userInfo; + try { + AbstractApiService apiService = (AbstractApiService) SpringContextUtils.getBean(apiServiceResult.getData().getApiServiceName()); + userInfo = apiService.getUserInfoByTicket(formDTO.getTicket()); + } catch (Exception e) { + throw new RenException(e.getMessage()); + } + if (null == userInfo){ + throw new RenException(EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getCode(), + "【SSO登录】调用第三方平台查询用户信息失败,用户信息为空"); + } + + //3、记录staff_wechat,并记录用户激活状态,激活时间 + this.savestaffwechat(customerStaff.getUserId(), userInfo.getOpenId()); + + //4、记录登录日志 + StaffLatestAgencyResultDTO staffLatestAgencyResultDTO = new StaffLatestAgencyResultDTO(); + staffLatestAgencyResultDTO.setCustomerId(formDTO.getCustomerId()); + staffLatestAgencyResultDTO.setStaffId(customerStaff.getUserId()); + staffLatestAgencyResultDTO.setWxOpenId(userInfo.getOpenId()); + staffLatestAgencyResultDTO.setMobile(formDTO.getMobile()); + staffLatestAgencyResultDTO.setAgencyId(formDTO.getRootAgencyId()); + this.saveStaffLoginRecord(staffLatestAgencyResultDTO); + + //5.1、获取用户token + String token = this.generateGovWxmpToken(customerStaff.getUserId(), formDTO.getApp(), formDTO.getClient()); + //5.2、保存到redis + StaffLatestAgencyResultDTO staffLatestAgency = new StaffLatestAgencyResultDTO(); + staffLatestAgency.setAgencyId(formDTO.getRootAgencyId()); + staffLatestAgency.setCustomerId(formDTO.getCustomerId()); + staffLatestAgency.setStaffId(customerStaff.getUserId()); + this.saveLatestGovTokenDto(staffLatestAgency, userInfo, token); + + UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); + userTokenResultDTO.setToken(token); + return userTokenResultDTO; + } + } diff --git a/epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/constant/LoginConstant.java b/epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/constant/LoginConstant.java index 17cb456a1a..c10e346e9c 100644 --- a/epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/constant/LoginConstant.java +++ b/epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/constant/LoginConstant.java @@ -40,4 +40,9 @@ public interface LoginConstant { * E事通服务号 */ String CLIENT_MP = "mp"; + + /** + * 手机App + */ + String CLIENT_APP = "app"; } From 932aa11b381ee3c19df2a3b2ab3013f78a020c86 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Feb 2021 21:00:44 +0800 Subject: [PATCH 078/101] =?UTF-8?q?=E6=96=B0=E5=A2=9Earea=5Fcode=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dao/AreaCodeDao.java | 1 + .../service/impl/AreaCodeServiceImpl.java | 40 ++++++++++++++++--- .../src/main/resources/mapper/AreaCodeDao.xml | 6 ++- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java index 037af23936..a5496cecc4 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java @@ -35,4 +35,5 @@ public interface AreaCodeDao extends BaseDao { List selectAllArea(); + AreaCodeDTO selectByCountyCode(String countyCode); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index 051a431ddd..1360f92778 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -40,6 +40,7 @@ import com.epmet.entity.AreaCodeEntity; import com.epmet.redis.AreaCodeRedis; import com.epmet.service.AreaCodeChildService; import com.epmet.service.AreaCodeService; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -55,6 +56,7 @@ import java.util.stream.Collectors; * @author generator generator@elink-cn.com * @since v1.0.0 2021-01-07 */ +@Slf4j @Service public class AreaCodeServiceImpl extends BaseServiceImpl implements AreaCodeService { @@ -568,6 +570,10 @@ public class AreaCodeServiceImpl extends BaseServiceImpl - select * from area_code; + select * from area_code + + + \ No newline at end of file From da96b58174f61b96b9aca9e884d08a46067c2994 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Feb 2021 22:56:56 +0800 Subject: [PATCH 079/101] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E9=87=87=E9=9B=86API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ava => ScreenWorkRecordCommonFormDTO.java} | 4 +- .../ScreenWorkRecordGridDailyFormDTO.java | 57 -------- .../ScreenWorkRecordGridMonthlyDTO.java | 122 ------------------ .../plugins/WorkRecordColController.java | 20 +-- .../plugins/ScreenWorkRecordOrgDailyDao.java | 42 ++++++ .../ScreenWorkRecordOrgMonthlyDao.java | 4 +- .../ScreenWorkRecordOrgDailyEntity.java} | 62 ++------- .../ScreenWorkRecordOrgDailyService.java | 34 +++++ .../ScreenWorkRecordOrgMonthlyService.java | 68 +--------- .../ScreenWorkRecordOrgDailyServiceImpl.java | 51 ++++++++ ...ScreenWorkRecordOrgMonthlyServiceImpl.java | 69 +--------- .../plugins/ScreenWorkRecordOrgDailyDao.xml | 52 ++++++++ 12 files changed, 212 insertions(+), 373 deletions(-) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/{ScreenWorkRecordOrgDailyFormDTO.java => ScreenWorkRecordCommonFormDTO.java} (87%) delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgDailyDao.java rename epmet-module/data-statistical/{data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java => data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgDailyEntity.java} (64%) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java index 92a13b72ed..2223143cc7 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java @@ -5,13 +5,13 @@ import lombok.Data; import java.io.Serializable; /** - * 工作日志-组织按日统计(累计值) + * 工作日志-数据采集通用DTO * * @author yinzuomei@elink-cn.com * @date 2021/2/21 18:49 */ @Data -public class ScreenWorkRecordOrgDailyFormDTO implements Serializable { +public class ScreenWorkRecordCommonFormDTO implements Serializable { private static final long serialVersionUID = 819322082786098071L; /** diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java deleted file mode 100644 index 5d75e69216..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.epmet.dto.plugins; - -import lombok.Data; - -import java.io.Serializable; - -/** - * 工作日志-网格按日统计(累计值) - * - * @author yinzuomei@elink-cn.com - * @date 2021/2/21 18:48 - */ -@Data -public class ScreenWorkRecordGridDailyFormDTO implements Serializable { - private static final long serialVersionUID = 5993623581944585517L; - - /** - * 网格id - */ - private String gridId; - - /** - * 网格所属的组织id - */ - private String agencyId; - - /** - * 会议类型编码;对应screen_customer_work_record_dict的资源编码 - */ - private String meetingCode; - - /** - * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 - */ - private String typeCode; - - /** - * 组织次数 - */ - private Integer organizeTotal; - - /** - * 当前组织参与的总次数 - */ - private Integer participateTotal; - - /** - * 参与人数 - */ - private Integer participateUserTotal; - - /** - * 平均参与人数 - */ - private Integer avgParticipateUserTotal; - -} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java deleted file mode 100644 index 9fb30a14d7..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * 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.plugins; - -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - - -/** - * 工作日志-网格按月统计 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-02-04 - */ -@Data -public class ScreenWorkRecordGridMonthlyDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * ID 主键 - */ - private String id; - - /** - * 客户Id - */ - private String customerId; - - /** - * 月份Id:yyyyMM - */ - private String monthId; - - /** - * 网格id - */ - private String gridId; - - /** - * 网格所属的组织id - */ - private String agencyId; - - /** - * 会议类型编码;对应screen_customer_work_record_dict的资源编码 - */ - private String meetingCode; - - /** - * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 - */ - private String typeCode; - - /** - * 组织次数 - */ - private Integer organizeTotal; - - /** - * 当前组织参与的总次数 - */ - private Integer participateTotal; - - /** - * 参与人数 - */ - private Integer participateUserTotal; - - /** - * 平均参与人数 - */ - private Integer avgParticipateUserTotal; - - /** - * 删除标识 0未删除;1已删除 - */ - private String delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java index d6631f2b51..314a814ade 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java @@ -3,10 +3,12 @@ package com.epmet.controller.plugins; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.plugins.*; +import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO; +import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.service.plugins.ScreenCustomerWorkRecordDictService; -import com.epmet.service.plugins.impl.ScreenWorkRecordOrgMonthlyServiceImpl; +import com.epmet.service.plugins.ScreenWorkRecordOrgDailyService; +import com.epmet.service.plugins.ScreenWorkRecordOrgMonthlyService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -27,8 +29,9 @@ public class WorkRecordColController { @Autowired ScreenCustomerWorkRecordDictService dictService; @Autowired - ScreenWorkRecordOrgMonthlyServiceImpl orgMonthlyService; - + private ScreenWorkRecordOrgMonthlyService screenWorkRecordOrgMonthlyService; + @Autowired + private ScreenWorkRecordOrgDailyService screenWorkRecordOrgDailyService; /** * @Description 【工作日志】客户资源字典信息上传 * @@ -59,13 +62,13 @@ public class WorkRecordColController { * @date 2021.02.04 16:16 */ @PostMapping("org-monthly") - public Result collectOrg(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ + public Result collectOrg(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || StringUtils.isBlank(data.getMonthId())) { log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrg,param:{}", JSON.toJSONString(data)); throw new ValidateException("客户Id、上传数据列表、月份Id不可为空"); } - orgMonthlyService.collect(customerId,data); + screenWorkRecordOrgMonthlyService.collect(customerId,data); return new Result(); } @@ -78,14 +81,13 @@ public class WorkRecordColController { * @date 2021.02.04 16:16 */ @PostMapping("org-daily") - public Result collectOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ + public Result collectOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || StringUtils.isBlank(data.getDateId())) { log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrgDaily,param:{}", JSON.toJSONString(data)); throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); } - //todo - // orgMonthlyService.collectOrgDaily(customerId,data); + screenWorkRecordOrgDailyService.collectOrgDaily(customerId,data); return new Result(); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgDailyDao.java new file mode 100644 index 0000000000..2bf23d6a6b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgDailyDao.java @@ -0,0 +1,42 @@ +/** + * 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.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO; +import com.epmet.entity.plugins.ScreenWorkRecordOrgDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 工作日志-组织按日统计(累计值) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Mapper +public interface ScreenWorkRecordOrgDailyDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId, @Param("dateId") String dateId); + + void insertBatch(@Param("list") List list, + @Param("customerId") String customerId, + @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java index ccf7baed54..16f4a763e7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java @@ -18,7 +18,7 @@ package com.epmet.dao.plugins; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO; +import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO; import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -36,7 +36,7 @@ public interface ScreenWorkRecordOrgMonthlyDao extends BaseDao list, @Param("customerId") String customerId, @Param("monthId") String monthId); + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("monthId") String monthId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgDailyEntity.java similarity index 64% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgDailyEntity.java index 4848454792..148c742f91 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgDailyEntity.java @@ -15,29 +15,25 @@ * along with this program. If not, see . */ -package com.epmet.dto.plugins; +package com.epmet.entity.plugins; +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - +import lombok.EqualsAndHashCode; /** - * 工作日志-组织按月统计 + * 工作日志-组织按日统计(累计值) * * @author generator generator@elink-cn.com - * @since v1.0.0 2021-02-04 + * @since v1.0.0 2021-02-23 */ @Data -public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { - - private static final long serialVersionUID = 1L; +@EqualsAndHashCode(callSuper=false) +@TableName("screen_work_record_org_daily") +public class ScreenWorkRecordOrgDailyEntity extends BaseEpmetEntity { - /** - * ID 主键 - */ - private String id; + private static final long serialVersionUID = 1L; /** * 客户Id @@ -45,12 +41,12 @@ public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { private String customerId; /** - * 月份Id:yyyyMM + * 日期Id:yyyyMMdd */ - private String monthId; + private String dateId; /** - * 组织Id + * 组织Idor网格id */ private String orgId; @@ -79,34 +75,4 @@ public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { */ private Integer avgParticipateUserTotal; - /** - * 删除标识 0未删除;1已删除 - */ - private String delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - -} \ No newline at end of file +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java new file mode 100644 index 0000000000..6edbb9ba92 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java @@ -0,0 +1,34 @@ +/** + * 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.service.plugins; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.plugins.ScreenWorkRecordOrgDailyEntity; + +/** + * 工作日志-组织按日统计(累计值) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +public interface ScreenWorkRecordOrgDailyService extends BaseService { + + void collectOrgDaily(String customerId, ScreenCollFormDTO data); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java index a9368a66bc..0e16b4b1fe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java @@ -18,14 +18,10 @@ package com.epmet.service.plugins; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO; +import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; -import java.util.List; -import java.util.Map; - /** * 工作日志-组织按月统计 * @@ -34,66 +30,6 @@ import java.util.Map; */ public interface ScreenWorkRecordOrgMonthlyService extends BaseService { - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-02-04 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-02-04 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return ScreenWorkRecordOrgMonthlyDTO - * @author generator - * @date 2021-02-04 - */ - ScreenWorkRecordOrgMonthlyDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-02-04 - */ - void save(ScreenWorkRecordOrgMonthlyDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-02-04 - */ - void update(ScreenWorkRecordOrgMonthlyDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-02-04 - */ - void delete(String[] ids); - /** * @Description 数据录入 * @param customerId @@ -102,5 +38,5 @@ public interface ScreenWorkRecordOrgMonthlyService extends BaseService data); + void collect(String customerId, ScreenCollFormDTO data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java new file mode 100644 index 0000000000..2185b5306d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -0,0 +1,51 @@ +/** + * 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.service.plugins.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.dao.plugins.ScreenWorkRecordOrgDailyDao; +import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.plugins.ScreenWorkRecordOrgDailyEntity; +import com.epmet.service.plugins.ScreenWorkRecordOrgDailyService; +import com.google.common.collect.Lists; +import org.springframework.stereotype.Service; + +/** + * 工作日志-组织按日统计(累计值) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Service +public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordOrgDailyService { + + @Override + public void collectOrgDaily(String customerId, ScreenCollFormDTO data) { + if(data.getIsFirst()){ + int affectedRows = baseDao.deleteBatch(customerId,data.getDateId()); + while(affectedRows > 0){ + affectedRows = baseDao.deleteBatch(customerId,data.getDateId()); + } + } + Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + baseDao.insertBatch(list,customerId,data.getDateId()); + }); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java index a1264c91ae..20a5417105 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java @@ -17,30 +17,19 @@ package com.epmet.service.plugins.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.plugins.ScreenWorkRecordOrgMonthlyDao; -import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO; +import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; import com.epmet.service.plugins.ScreenWorkRecordOrgMonthlyService; import com.google.common.collect.Lists; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - /** * 工作日志-组织按月统计 * @@ -50,60 +39,6 @@ import java.util.Map; @Service public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordOrgMonthlyService { - - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ScreenWorkRecordOrgMonthlyDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordOrgMonthlyDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - - return wrapper; - } - - @Override - public ScreenWorkRecordOrgMonthlyDTO get(String id) { - ScreenWorkRecordOrgMonthlyEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordOrgMonthlyDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(ScreenWorkRecordOrgMonthlyDTO dto) { - ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(ScreenWorkRecordOrgMonthlyDTO dto) { - ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - /** * @Description 数据录入 * @param customerId @@ -115,7 +50,7 @@ public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl data) { + public void collect(String customerId, ScreenCollFormDTO data) { if(data.getIsFirst()){ int affectedRows = baseDao.deleteBatch(customerId,data.getMonthId()); while(affectedRows > 0){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml new file mode 100644 index 0000000000..0fd68eddf4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml @@ -0,0 +1,52 @@ + + + + + + + delete from screen_work_record_org_daily + where customer_id = #{customerId} + and DATE_ID = #{dateId} + limit 1000 + + + + INSERT INTO screen_work_record_org_daily + ( + id, + customer_id, + DATE_ID, + org_id, + meeting_code, + type_code, + organize_total, + participate_user_total, + avg_participate_user_total, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.orgId}, + #{item.meetingCode}, + #{item.typeCode}, + #{item.organizeTotal}, + #{item.participateUserTotal}, + #{item.avgParticipateUserTotal}, + '0', + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + \ No newline at end of file From 7911880c629914ae90c14c18b2e7e0f67b0c08e7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 00:52:25 +0800 Subject: [PATCH 080/101] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=A4=A7=E5=B1=8FAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ScreenCustomerAgencyDTO.java | 4 + .../ScreenCustomerWorkRecordDictDTO.java | 127 ++++++++++++++++++ .../plugins/ScreenWorkRecordOrgDailyDTO.java | 112 +++++++++++++++ .../ScreenWorkRecordOrgMonthlyDTO.java | 112 +++++++++++++++ .../plugins/form/WorkRecordRankFormDTO.java | 38 ++++++ .../result/WorkRecordRankResultDTO.java | 30 +++++ .../plugins/result/WorkRecordSubRank.java | 34 +++++ .../plugins/WorkRecordController.java | 19 ++- .../ScreenCustomerWorkRecordDictDao.java | 33 +++++ .../plugins/ScreenWorkRecordOrgDailyDao.java | 51 +++++++ .../ScreenWorkRecordOrgMonthlyDao.java | 33 +++++ .../ScreenCustomerWorkRecordDictEntity.java | 93 +++++++++++++ .../ScreenWorkRecordOrgDailyEntity.java | 78 +++++++++++ .../ScreenWorkRecordOrgMonthlyEntity.java | 78 +++++++++++ .../evaluationindex/screen/AgencyService.java | 3 + .../screen/impl/AgencyServiceImpl.java | 7 + .../ScreenCustomerWorkRecordDictService.java | 95 +++++++++++++ .../ScreenWorkRecordOrgDailyService.java | 99 ++++++++++++++ .../ScreenWorkRecordOrgMonthlyService.java | 94 +++++++++++++ ...reenCustomerWorkRecordDictServiceImpl.java | 101 ++++++++++++++ .../ScreenWorkRecordOrgDailyServiceImpl.java | 122 +++++++++++++++++ ...ScreenWorkRecordOrgMonthlyServiceImpl.java | 101 ++++++++++++++ .../ScreenCustomerWorkRecordDictDao.xml | 28 ++++ .../plugins/ScreenWorkRecordOrgDailyDao.xml | 32 +++++ .../plugins/ScreenWorkRecordOrgMonthlyDao.xml | 8 ++ 25 files changed, 1528 insertions(+), 4 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenCustomerWorkRecordDictDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenCustomerWorkRecordDictDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenCustomerWorkRecordDictEntity.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenCustomerWorkRecordDictService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgMonthlyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java index c78858001d..5ceeca49a7 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java @@ -42,4 +42,8 @@ public class ScreenCustomerAgencyDTO implements Serializable { */ private String areaCode; + /** + * 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701 + */ + private String parentAreaCode; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenCustomerWorkRecordDictDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenCustomerWorkRecordDictDTO.java new file mode 100644 index 0000000000..9b524337d9 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenCustomerWorkRecordDictDTO.java @@ -0,0 +1,127 @@ +/** + * 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.plugins; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +public class ScreenCustomerWorkRecordDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键(客户每次上传,直接根据customerId全删全增) + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至日期eg:20200101 + */ + private String dateId; + + /** + * 资源id + */ + private String dictId; + + /** + * 父资源ID;如果是一级分类pid=0 + */ + private String pid; + + /** + * 资源类型 + */ + private String resourceType; + + /** + * 资源编码 + */ + private String resourceCode; + + /** + * 资源标签名 + */ + private String resourceLabel; + + /** + * 显示标识:0否,1是 + */ + private String showFlag; + + /** + * 排序 + */ + private Integer sort; + + /** + * 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中 + */ + private String dataType; + + /** + * 当前资源属于几级,例如:1、2、3、4.... + */ + private Integer level; + + /** + * 逻辑删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java new file mode 100644 index 0000000000..948cd23b37 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java @@ -0,0 +1,112 @@ +/** + * 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.plugins; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 工作日志-组织按日统计(累计值) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +public class ScreenWorkRecordOrgDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 日期Id:yyyyMMdd + */ + private String dateId; + + /** + * 组织Idor网格id + */ + private String orgId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 参与人数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人数 + */ + private Integer avgParticipateUserTotal; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java new file mode 100644 index 0000000000..7da8fec074 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java @@ -0,0 +1,112 @@ +/** + * 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.plugins; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 工作日志-组织按月统计(增量) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月份Id:yyyyMM + */ + private String monthId; + + /** + * 组织Idor网格id + */ + private String orgId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 参与人数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人数 + */ + private Integer avgParticipateUserTotal; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java new file mode 100644 index 0000000000..3bbcb2973b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java @@ -0,0 +1,38 @@ +package com.epmet.plugins.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * 5、【工作日志】本机及下级排名 通用入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/23 23:08 + */ +@Data +public class WorkRecordRankFormDTO implements Serializable { + private static final long serialVersionUID = -2934835714413031036L; + /** + * party:支部建设; union:联建共建;党员志愿服务:voluntaryservice + */ + @NotBlank(message = "dataType不能为空;可选值:party:支部建设; union:联建共建;党员志愿服务:voluntaryservice") + private String dataType; + + /** + * 当前组织id + */ + @NotBlank(message = "agencyId不能为空") + private String agencyId; + + /** + * 默认显示前3 + */ + @NotNull(message = "topRow不能为空") + private Integer topRow; + + @NotBlank(message = "customerId不能为空") + private String customerId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java new file mode 100644 index 0000000000..42a721c513 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.plugins.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 5、【工作日志】本机及下级排名 返参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/23 23:11 + */ +@Data +public class WorkRecordRankResultDTO implements Serializable { + /** + * 总参与人数 + */ + private Integer participateUserTotal; + + /** + *组织次数 + */ + private Integer participateTotal; + + /** + *下级排行列表 + */ + private List subRankList; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java new file mode 100644 index 0000000000..91f3d027e9 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java @@ -0,0 +1,34 @@ +package com.epmet.plugins.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 下级排行列表 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/23 23:21 + */ +@Data +public class WorkRecordSubRank implements Serializable { + + private static final long serialVersionUID = -2450978606865910110L; + + private String orgId; + + /** + * 组织名称或者是网格名称 + */ + private String name; + + /** + * 总参与人数 + */ + private Integer participateUserTotal; + + /** + * 组织次数 + */ + private Integer participateTotal; +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java index f606c32458..e7f6744cb2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java @@ -1,7 +1,12 @@ package com.epmet.datareport.controller.plugins; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgDailyService; +import com.epmet.plugins.form.WorkRecordRankFormDTO; +import com.epmet.plugins.result.WorkRecordRankResultDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; /** * 大屏工作日志相关输出接口 @@ -12,6 +17,8 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("plugins/workrecord") public class WorkRecordController { + @Autowired + private ScreenWorkRecordOrgDailyService screenWorkRecordOrgDailyService; //todo //5、【工作日志】本机及下级排名 //NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348966 @@ -19,8 +26,12 @@ public class WorkRecordController { //下级根据当前组织的areaCode查询下级列表,再去查询screen_work_record_org_daily //legend来源于screen_customer_work_record_dict表 level=2,dataType=party - - + @PostMapping("ranklist") + public Result rankList(@RequestHeader("CustomerId")String customerId, @RequestBody WorkRecordRankFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(screenWorkRecordOrgDailyService.rankList(formDTO)); + } //6、【工作日志】近12月趋势图 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenCustomerWorkRecordDictDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenCustomerWorkRecordDictDao.java new file mode 100644 index 0000000000..5ee450d32c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenCustomerWorkRecordDictDao.java @@ -0,0 +1,33 @@ +/** + * 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.datareport.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Mapper +public interface ScreenCustomerWorkRecordDictDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java new file mode 100644 index 0000000000..8a0daa8f53 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java @@ -0,0 +1,51 @@ +/** + * 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.datareport.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity; +import com.epmet.plugins.result.WorkRecordSubRank; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 工作日志-组织按日统计(累计值) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Mapper +public interface ScreenWorkRecordOrgDailyDao extends BaseDao { + /** + * @param areaCode 当前组织对应的areaCode; + * @param dataType + * @param topRow + * @return com.epmet.plugins.result.WorkRecordRankResultDTO + * @author yinzuomei + * @description 5、【工作日志】本机及下级排名 + * @Date 2021/2/23 23:37 + **/ + List selectSubList(@Param("areaCode") String areaCode, + @Param("dataType") String dataType, + @Param("topRow") Integer topRow, + @Param("dateId")String dateId); + + String selectLatestDateId(String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java new file mode 100644 index 0000000000..5146beb59e --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.datareport.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作日志-组织按月统计(增量) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Mapper +public interface ScreenWorkRecordOrgMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenCustomerWorkRecordDictEntity.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenCustomerWorkRecordDictEntity.java new file mode 100644 index 0000000000..a4f5fa180a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenCustomerWorkRecordDictEntity.java @@ -0,0 +1,93 @@ +/** + * 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.datareport.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_customer_work_record_dict") +public class ScreenCustomerWorkRecordDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至日期eg:20200101 + */ + private String dateId; + + /** + * 资源id + */ + private String dictId; + + /** + * 父资源ID;如果是一级分类pid=0 + */ + private String pid; + + /** + * 资源类型 + */ + private String resourceType; + + /** + * 资源编码 + */ + private String resourceCode; + + /** + * 资源标签名 + */ + private String resourceLabel; + + /** + * 显示标识:0否,1是 + */ + private String showFlag; + + /** + * 排序 + */ + private Integer sort; + + /** + * 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中 + */ + private String dataType; + + /** + * 当前资源属于几级,例如:1、2、3、4.... + */ + private Integer level; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java new file mode 100644 index 0000000000..b72aa830fb --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java @@ -0,0 +1,78 @@ +/** + * 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.datareport.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 工作日志-组织按日统计(累计值) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_work_record_org_daily") +public class ScreenWorkRecordOrgDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 日期Id:yyyyMMdd + */ + private String dateId; + + /** + * 组织Idor网格id + */ + private String orgId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 参与人数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人数 + */ + private Integer avgParticipateUserTotal; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java new file mode 100644 index 0000000000..c4f2bbb938 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java @@ -0,0 +1,78 @@ +/** + * 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.datareport.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 工作日志-组织按月统计(增量) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_work_record_org_monthly") +public class ScreenWorkRecordOrgMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月份Id:yyyyMM + */ + private String monthId; + + /** + * 组织Idor网格id + */ + private String orgId; + + /** + * 会议类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String meetingCode; + + /** + * 随手记类型编码;对应screen_customer_work_record_dict的资源编码 + */ + private String typeCode; + + /** + * 组织次数 + */ + private Integer organizeTotal; + + /** + * 参与人数 + */ + private Integer participateUserTotal; + + /** + * 平均参与人数 + */ + private Integer avgParticipateUserTotal; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index cd71a317f2..a03a5383d6 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -2,6 +2,7 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.dto.form.AreaCodeDictFormDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.ScreenCustomerAgencyDTO; import com.epmet.dto.result.plugins.AgencyNodeDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; @@ -55,4 +56,6 @@ public interface AgencyService { * @Date 2021/2/3 22:19 **/ AgencyNodeDTO queryStaffAgencyTree(String agencyId); + + ScreenCustomerAgencyDTO queryAgencyInfo(String agencyId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 73090dd8c9..ca86077e03 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -262,6 +262,7 @@ public class AgencyServiceImpl implements AgencyService { * @description 查询当前组织及下级组织树 * @Date 2021/2/3 22:19 **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public AgencyNodeDTO queryStaffAgencyTree(String agencyId) { ScreenCustomerAgencyDTO agencyDTO = screenCustomerAgencyDao.selectByAgencyId(agencyId); @@ -277,4 +278,10 @@ public class AgencyServiceImpl implements AgencyService { log.info(JSON.toJSONString(treeList)); return treeList.get(NumConstant.ZERO); } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) + @Override + public ScreenCustomerAgencyDTO queryAgencyInfo(String agencyId) { + return screenCustomerAgencyDao.selectByAgencyId(agencyId); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenCustomerWorkRecordDictService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenCustomerWorkRecordDictService.java new file mode 100644 index 0000000000..d6d91ad5d0 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenCustomerWorkRecordDictService.java @@ -0,0 +1,95 @@ +/** + * 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.datareport.service.plugins; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity; +import com.epmet.plugins.ScreenCustomerWorkRecordDictDTO; + +import java.util.List; +import java.util.Map; + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +public interface ScreenCustomerWorkRecordDictService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-23 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-23 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenCustomerWorkRecordDictDTO + * @author generator + * @date 2021-02-23 + */ + ScreenCustomerWorkRecordDictDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void save(ScreenCustomerWorkRecordDictDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void update(ScreenCustomerWorkRecordDictDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-23 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java new file mode 100644 index 0000000000..cd528a5f50 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java @@ -0,0 +1,99 @@ +/** + * 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.datareport.service.plugins; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity; +import com.epmet.plugins.ScreenWorkRecordOrgDailyDTO; +import com.epmet.plugins.form.WorkRecordRankFormDTO; +import com.epmet.plugins.result.WorkRecordRankResultDTO; + +import java.util.List; +import java.util.Map; + +/** + * 工作日志-组织按日统计(累计值) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +public interface ScreenWorkRecordOrgDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-23 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-23 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenWorkRecordOrgDailyDTO + * @author generator + * @date 2021-02-23 + */ + ScreenWorkRecordOrgDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void save(ScreenWorkRecordOrgDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void update(ScreenWorkRecordOrgDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-23 + */ + void delete(String[] ids); + + WorkRecordRankResultDTO rankList(WorkRecordRankFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgMonthlyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgMonthlyService.java new file mode 100644 index 0000000000..1b302b1ee6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgMonthlyService.java @@ -0,0 +1,94 @@ +/** + * 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.datareport.service.plugins; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; +import com.epmet.plugins.ScreenWorkRecordOrgMonthlyDTO; + +import java.util.List; +import java.util.Map; + +/** + * 工作日志-组织按月统计(增量) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +public interface ScreenWorkRecordOrgMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-02-23 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-02-23 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenWorkRecordOrgMonthlyDTO + * @author generator + * @date 2021-02-23 + */ + ScreenWorkRecordOrgMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void save(ScreenWorkRecordOrgMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-02-23 + */ + void update(ScreenWorkRecordOrgMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-02-23 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java new file mode 100644 index 0000000000..47e4b8bb3e --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java @@ -0,0 +1,101 @@ +/** + * 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.datareport.service.plugins.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.datareport.dao.plugins.ScreenCustomerWorkRecordDictDao; +import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity; +import com.epmet.datareport.service.plugins.ScreenCustomerWorkRecordDictService; +import com.epmet.plugins.ScreenCustomerWorkRecordDictDTO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工作日志资源字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Slf4j +@Service +public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl implements ScreenCustomerWorkRecordDictService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenCustomerWorkRecordDictDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenCustomerWorkRecordDictDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenCustomerWorkRecordDictDTO get(String id) { + ScreenCustomerWorkRecordDictEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenCustomerWorkRecordDictDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenCustomerWorkRecordDictDTO dto) { + ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenCustomerWorkRecordDictDTO dto) { + ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java new file mode 100644 index 0000000000..b6939226b7 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -0,0 +1,122 @@ +/** + * 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.datareport.service.plugins.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgDailyDao; +import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity; +import com.epmet.datareport.service.evaluationindex.screen.AgencyService; +import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgDailyService; +import com.epmet.dto.result.ScreenCustomerAgencyDTO; +import com.epmet.plugins.ScreenWorkRecordOrgDailyDTO; +import com.epmet.plugins.form.WorkRecordRankFormDTO; +import com.epmet.plugins.result.WorkRecordRankResultDTO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工作日志-组织按日统计(累计值) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Slf4j +@Service +public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordOrgDailyService { + @Autowired + private AgencyService agencyService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenWorkRecordOrgDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordOrgDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenWorkRecordOrgDailyDTO get(String id) { + ScreenWorkRecordOrgDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordOrgDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenWorkRecordOrgDailyDTO dto) { + ScreenWorkRecordOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenWorkRecordOrgDailyDTO dto) { + ScreenWorkRecordOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public WorkRecordRankResultDTO rankList(WorkRecordRankFormDTO formDTO) { + ScreenCustomerAgencyDTO agencyDTO=agencyService.queryAgencyInfo(formDTO.getAgencyId()); + if(null==agencyDTO){ + throw new RenException(String.format("获取组织信息异常,agencyId:%s",formDTO.getAgencyId())); + } + WorkRecordRankResultDTO resultDTO=new WorkRecordRankResultDTO(); + String dateId=baseDao.selectLatestDateId(formDTO.getCustomerId()); + resultDTO.setSubRankList(baseDao.selectSubList(agencyDTO.getAreaCode(),formDTO.getDataType(),formDTO.getTopRow(),dateId)); + //todo 待完善 + return resultDTO; + } + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java new file mode 100644 index 0000000000..66f8eab095 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java @@ -0,0 +1,101 @@ +/** + * 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.datareport.service.plugins.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgMonthlyDao; +import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; +import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgMonthlyService; +import com.epmet.plugins.ScreenWorkRecordOrgMonthlyDTO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工作日志-组织按月统计(增量) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-02-23 + */ +@Slf4j +@Service +public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordOrgMonthlyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenWorkRecordOrgMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordOrgMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenWorkRecordOrgMonthlyDTO get(String id) { + ScreenWorkRecordOrgMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordOrgMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenWorkRecordOrgMonthlyDTO dto) { + ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenWorkRecordOrgMonthlyDTO dto) { + ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml new file mode 100644 index 0000000000..10159b1a1b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml new file mode 100644 index 0000000000..74476254db --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml @@ -0,0 +1,32 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml new file mode 100644 index 0000000000..4e37ffe47e --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From a42ec8cb643756fdc20c582a5da0adc3136a6999 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 00:53:03 +0800 Subject: [PATCH 081/101] =?UTF-8?q?queryStaffPermissionV2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/OpenUpServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java index 60b5654937..43f50a34c9 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; @@ -188,12 +189,13 @@ public class OpenUpServiceImpl implements OpenUpService { } //如果有子客户,根据area_code构造权限树 if (!CollectionUtils.isEmpty(crmResult.getData())) { + log.warn(String.format("当前客户id%s,子客户列表%s", formDTO.getCustomerId(), JSON.toJSONString(crmResult))); Result dataStatResult=dataReportOpenFeignClient.queryStaffAgencyTree(formDTO.getAgencyId()); if (!dataStatResult.success() && null == dataStatResult) { throw new RenException("调用data-stats服务的XXX接口异常"+dataStatResult.getInternalMsg()); } StaffPermissionResultDTO resultDTO = new StaffPermissionResultDTO(); - resultDTO.setCustomerIds(Arrays.asList()); + resultDTO.setCustomerIds(crmResult.getData()); resultDTO.setAgencyTree(ConvertUtils.sourceToTarget(dataStatResult.getData(), AgencyNodeDTO.class)); return resultDTO; } From b8c24cd20fdf701f5ac69dc0c0e654f2f0d0cd82 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 02:06:44 +0800 Subject: [PATCH 082/101] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E9=87=87=E9=9B=86=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java | 4 ++-- .../plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java | 4 ++++ .../plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java | 1 + .../java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java index 31a0cd49ee..05b1172eb7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java @@ -21,10 +21,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.plugins.ScreenCustomerWorkRecordDictDao; import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO; @@ -33,7 +33,6 @@ import com.epmet.entity.plugins.ScreenCustomerWorkRecordDictEntity; import com.epmet.service.plugins.ScreenCustomerWorkRecordDictService; import com.google.common.collect.Lists; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -47,6 +46,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2021-02-04 */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) @Service public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl implements ScreenCustomerWorkRecordDictService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index 2185b5306d..c517555fbc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -17,8 +17,10 @@ package com.epmet.service.plugins.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.plugins.ScreenWorkRecordOrgDailyDao; import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; @@ -33,9 +35,11 @@ import org.springframework.stereotype.Service; * @author generator generator@elink-cn.com * @since v1.0.0 2021-02-23 */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) @Service public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordOrgDailyService { + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public void collectOrgDaily(String customerId, ScreenCollFormDTO data) { if(data.getIsFirst()){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java index 20a5417105..a27cb040aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java @@ -36,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional; * @author generator generator@elink-cn.com * @since v1.0.0 2021-02-04 */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) @Service public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordOrgMonthlyService { diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index 8b1709a162..83e9e2902a 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -71,8 +71,8 @@ public class ExtAppJwtTokenUtils { // String customrId = "2fe0065f70ca0e23ce4c26fca5f1d933"; //测试-模拟客户 - String secret = "0e04d0344891462cb2c6cab297cd3953c4175804b9204b129cb2ecd6a3f86aa0"; - String appId = "c04e26dd472b845a5dbc1c5394706253"; + String secret = "723b8e61b55345e0a5a51798c7c1ad4aad388eed4fc8429eb8efeed1cd8564cb"; + String appId = "d536736d93b4262970a7bbac29cae4fa"; String customrId = "613cc61a6b8ce4c70d21bd413dac72cc"; long ts = System.currentTimeMillis() + 1000 * 60 * 1; From 7e695cdbded9bde249366ae4589981864a7525f9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 03:24:32 +0800 Subject: [PATCH 083/101] =?UTF-8?q?=E4=BF=AE=E6=94=B9api/commonservice/ext?= =?UTF-8?q?ernalapp/get-jwt-accesstoken=E6=8E=A5=E5=8F=A3=E6=96=B9?= =?UTF-8?q?=E4=BE=BF=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/GetJwtAccessTokenResultDTO.java | 2 +- .../java/com/epmet/service/impl/ExternalAppServiceImpl.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/GetJwtAccessTokenResultDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/GetJwtAccessTokenResultDTO.java index 58cf9ecc6f..19a64acfa3 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/GetJwtAccessTokenResultDTO.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/GetJwtAccessTokenResultDTO.java @@ -12,5 +12,5 @@ public class GetJwtAccessTokenResultDTO { private String customerId; private String token; private Long ts; - + private String appId; } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java index 7b4229b3a1..9d7fee1483 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java @@ -44,7 +44,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.HashMap; import java.util.List; import java.util.UUID; @@ -212,7 +211,7 @@ public class ExternalAppServiceImpl implements ExternalAppService { long ts = System.currentTimeMillis(); String token = tokenUtils.genToken(secret, appId, customerId, ts); - return new GetJwtAccessTokenResultDTO(customerId, token, ts); + return new GetJwtAccessTokenResultDTO(customerId, token, ts,appId); } @Override public AppIdInfoResultDTO appIdInfo(String appId) { From c799f07949c1602c227bd145938110748c8809f7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 08:37:49 +0800 Subject: [PATCH 084/101] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E9=87=87=E9=9B=86=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0orgName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/ScreenWorkRecordOrgDailyDTO.java | 5 +++ .../ScreenWorkRecordOrgMonthlyDTO.java | 5 +++ .../result/WorkRecordRankResultDTO.java | 2 + .../plugins/WorkRecordController.java | 3 +- .../plugins/ScreenWorkRecordOrgDailyDao.java | 6 +++ .../ScreenWorkRecordOrgDailyEntity.java | 5 +++ .../ScreenWorkRecordOrgMonthlyEntity.java | 5 +++ .../ScreenWorkRecordOrgDailyServiceImpl.java | 25 +++++++---- .../plugins/ScreenWorkRecordOrgDailyDao.xml | 41 ++++++++++++++----- .../ScreenWorkRecordCommonFormDTO.java | 7 +++- .../impl/IndexCalculateServiceImpl.java | 1 + .../migration/V0.0.8__add_plugins_table.sql | 2 + .../plugins/ScreenWorkRecordOrgDailyDao.xml | 2 + .../plugins/ScreenWorkRecordOrgMonthlyDao.xml | 3 +- 14 files changed, 91 insertions(+), 21 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java index 948cd23b37..55e9c883d0 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java @@ -54,6 +54,11 @@ public class ScreenWorkRecordOrgDailyDTO implements Serializable { */ private String orgId; + /** + * 组织名称或者网格名 + */ + private String orgName; + /** * 会议类型编码;对应screen_customer_work_record_dict的资源编码 */ diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java index 7da8fec074..168e0296d4 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java @@ -54,6 +54,11 @@ public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { */ private String orgId; + /** + * 组织名称或者网格名 + */ + private String orgName; + /** * 会议类型编码;对应screen_customer_work_record_dict的资源编码 */ diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java index 42a721c513..08c8df3ff2 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.plugins.result; +import lombok.AllArgsConstructor; import lombok.Data; import java.io.Serializable; @@ -11,6 +12,7 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2021/2/23 23:11 */ +@AllArgsConstructor @Data public class WorkRecordRankResultDTO implements Serializable { /** diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java index e7f6744cb2..77c11404d5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java @@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*; public class WorkRecordController { @Autowired private ScreenWorkRecordOrgDailyService screenWorkRecordOrgDailyService; - //todo + //todo 工作日志是否要添加area_code、parent_area_code、orgType;插件是否可以提供;也可以采集的时候赋值 //5、【工作日志】本机及下级排名 //NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348966 //返参中的当前组织的参与人数、组织次数 直接sum所有下级的值; @@ -36,4 +36,5 @@ public class WorkRecordController { //6、【工作日志】近12月趋势图 //NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348967 + //可以下级组织+下级网格 orgId 直接 in } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java index 8a0daa8f53..ca0bc02fda 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java @@ -19,6 +19,7 @@ package com.epmet.datareport.dao.plugins; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity; +import com.epmet.plugins.result.WorkRecordRankResultDTO; import com.epmet.plugins.result.WorkRecordSubRank; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -43,9 +44,14 @@ public interface ScreenWorkRecordOrgDailyDao extends BaseDao selectSubList(@Param("areaCode") String areaCode, + @Param("agencyId") String agencyId, @Param("dataType") String dataType, @Param("topRow") Integer topRow, @Param("dateId")String dateId); String selectLatestDateId(String customerId); + + WorkRecordRankResultDTO selectCurrentAgency(@Param("areaCode") String areaCode, + @Param("dataType") String dataType, + @Param("dateId")String dateId); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java index b72aa830fb..f5dab21989 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java @@ -50,6 +50,11 @@ public class ScreenWorkRecordOrgDailyEntity extends BaseEpmetEntity { */ private String orgId; + /** + * 组织名称或者网格名 + */ + private String orgName; + /** * 会议类型编码;对应screen_customer_work_record_dict的资源编码 */ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java index c4f2bbb938..47f9f6ddfe 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java @@ -50,6 +50,11 @@ public class ScreenWorkRecordOrgMonthlyEntity extends BaseEpmetEntity { */ private String orgId; + /** + * 组织名称或者网格名 + */ + private String orgName; + /** * 会议类型编码;对应screen_customer_work_record_dict的资源编码 */ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index b6939226b7..692989e278 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -108,15 +109,23 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl()); + } else { + //非社区的 + WorkRecordRankResultDTO resultDTO = baseDao.selectCurrentAgency(agencyDTO.getAreaCode(), formDTO.getDataType(), dateId); + resultDTO.setSubRankList(baseDao.selectSubList(agencyDTO.getAreaCode(), agencyDTO.getAgencyId(), formDTO.getDataType(), formDTO.getTopRow(), dateId)); + return resultDTO; } - WorkRecordRankResultDTO resultDTO=new WorkRecordRankResultDTO(); - String dateId=baseDao.selectLatestDateId(formDTO.getCustomerId()); - resultDTO.setSubRankList(baseDao.selectSubList(agencyDTO.getAreaCode(),formDTO.getDataType(),formDTO.getTopRow(),dateId)); - //todo 待完善 - return resultDTO; } } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml index 74476254db..f09b5f3f51 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml @@ -12,21 +12,42 @@ m.DEL_FLAG = '0' AND m.CUSTOMER_ID = #{customerId} + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java index 2223143cc7..f72d2f3667 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordCommonFormDTO.java @@ -15,10 +15,15 @@ public class ScreenWorkRecordCommonFormDTO implements Serializable { private static final long serialVersionUID = 819322082786098071L; /** - * 组织Id + * 组织Id或者网格id */ private String orgId; + /** + * 组织名称或者网格名 + */ + private String orgName; + /** * 会议类型编码;对应screen_customer_work_record_dict的资源编码 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index 82142afec4..db48bb1214 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -94,6 +94,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { return flag; } catch (Exception e) { e.printStackTrace(); + log.warn("indexCalculate exception:{}",e); log.error("indexCalculate exception,param:{}", JSON.toJSONString(formDTO)); } finally { //清除缓存 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql index 513549004f..74480896cb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.8__add_plugins_table.sql @@ -94,6 +94,7 @@ CREATE TABLE `screen_work_record_org_monthly` ( `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id:yyyyMM', `ORG_ID` varchar(64) NOT NULL COMMENT '组织Idor网格id', + `ORG_NAME` varchar(255) DEFAULT NULL COMMENT '组织名或网格名', `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', @@ -115,6 +116,7 @@ CREATE TABLE `screen_work_record_org_daily` ( `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', `DATE_ID` varchar(8) NOT NULL COMMENT '日期Id:yyyyMMdd', `ORG_ID` varchar(64) NOT NULL COMMENT '组织Idor网格id', + `ORG_NAME` varchar(255) DEFAULT NULL COMMENT '组织名或网格名', `MEETING_CODE` varchar(255) DEFAULT NULL COMMENT '会议类型编码;对应screen_customer_work_record_dict的资源编码', `TYPE_CODE` varchar(255) NOT NULL COMMENT '随手记类型编码;对应screen_customer_work_record_dict的资源编码', `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '组织次数', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml index 0fd68eddf4..9bf253e4a5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml @@ -17,6 +17,7 @@ customer_id, DATE_ID, org_id, + org_name, meeting_code, type_code, organize_total, @@ -35,6 +36,7 @@ #{customerId}, #{dateId}, #{item.orgId}, + #{item.orgName}, #{item.meetingCode}, #{item.typeCode}, #{item.organizeTotal}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml index 8c9c216b5e..4036d053b4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml @@ -29,6 +29,7 @@ customer_id, month_id, org_id, + org_name, meeting_code, type_code, organize_total, @@ -50,7 +51,7 @@ #{monthId}, #{item.orgId}, - + #{item.orgName}, #{item.meetingCode}, #{item.typeCode}, From 0be9eb0fa465fb1f47ea7a39bc37adb1b1fd842f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 13:30:37 +0800 Subject: [PATCH 085/101] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=86=E5=B8=83=E6=8E=A5=E5=8F=A3=E4=BE=9B=E9=BE=99=E6=B9=BE?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.yml | 2 +- .../dto/govissue/result/IssueInfoDTO.java | 16 ++++++++ .../form/ProjectDistributionFormDTO.java | 19 +++++++++ .../result/ProjectDistributionResultDTO.java | 25 ++++++++++++ .../dataaggre/dto/resigroup/ResiTopicDTO.java | 7 +++- .../controller/GovProjectController.java | 25 ++++++++++-- .../dataaggre/dao/govissue/IssueDao.java | 7 ++-- .../dataaggre/dao/govproject/ProjectDao.java | 8 ++-- .../dataaggre/dao/resigroup/ResiTopicDao.java | 7 +++- .../service/govissue/GovIssueService.java | 7 ++-- .../govissue/impl/GovIssueServiceImpl.java | 5 +++ .../service/govproject/GovProjectService.java | 8 ++-- .../impl/GovProjectServiceImpl.java | 39 ++++++++++++++++++- .../service/resigroup/ResiGroupService.java | 6 +++ .../resigroup/impl/ResiGroupServiceImpl.java | 12 ++++++ .../resources/mapper/govissue/IssueDao.xml | 17 ++++++++ .../mapper/govproject/ProjectDao.xml | 18 +++++++++ .../mapper/resigroup/ResiTopicDao.xml | 21 +++++++++- 18 files changed, 223 insertions(+), 26 deletions(-) create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueInfoDTO.java create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectDistributionResultDTO.java diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 28f31cd59b..a0c1c35811 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -468,7 +468,7 @@ epmet: - /epmet/ext/** - /epmetuser/customerstaff/customerlist - /message/template/** - + - /data/aggregator/project/projectdistribution swaggerUrls: jwt: diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueInfoDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueInfoDTO.java new file mode 100644 index 0000000000..4fc0e2e224 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueInfoDTO.java @@ -0,0 +1,16 @@ +package com.epmet.dataaggre.dto.govissue.result; + +import lombok.Data; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/24 12:12 + */ +@Data +public class IssueInfoDTO { + private String issueId; + private String gridId; + private String topicId; +} diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java new file mode 100644 index 0000000000..f1f25aeb05 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dataaggre.dto.govproject.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 项目分布(实时只适用于e事通客户)入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/24 11:04 + */ +@Data +public class ProjectDistributionFormDTO implements Serializable { + private String gridId; + @NotBlank(message = "customerId不能为空") + private String customerId; +} diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectDistributionResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectDistributionResultDTO.java new file mode 100644 index 0000000000..ba0340c66e --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectDistributionResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dataaggre.dto.govproject.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 项目分布(实时只适用于e事通客户)返参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/24 11:05 + */ +@Data +public class ProjectDistributionResultDTO implements Serializable { + private String projectId; + private String projectTitle; + private String statusDesc; + private String longitude; + private String latitude; + // @JsonIgnore + private String issueId; + // @JsonIgnore + private String statusCode; + private String gridId; +} diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicDTO.java index 87692d1263..19c44136fb 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicDTO.java @@ -17,9 +17,10 @@ package com.epmet.dataaggre.dto.resigroup; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -128,4 +129,8 @@ public class ResiTopicDTO implements Serializable { */ private String issueId; + /** + * 话题所属网格id + */ + private String gridId; } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java index 8ba7cadc7d..18aa5a924c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java @@ -5,14 +5,16 @@ import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO; +import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO; import com.epmet.dataaggre.dto.govproject.result.AllProjectResultDTO; +import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO; import com.epmet.dataaggre.service.govproject.GovProjectService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; + +import java.util.List; /** * @Author zxc @@ -39,4 +41,19 @@ public class GovProjectController { AllProjectResultDTO result = govProjectService.allProjectList(tokenDto, formDTO); return new Result().ok(result); } + + /** + * @param customerId + * @param formDTO + * @author yinzuomei 项目分布(实时只适用于e事通客户)返参 + * @description 目前在用:龙湾大屏调用此接口;接口内写死了 按照立项时间降序,取前100个项目 + * @Date 2021/2/24 13:17 + **/ + @PostMapping("projectdistribution") + public Result> queryProjectDistribution(@RequestHeader("CustomerId") String customerId, + @RequestBody ProjectDistributionFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(govProjectService.queryProjectDistribution(formDTO)); + } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java index 2bb40f4c8d..1e85e06366 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java @@ -21,10 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO; import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO; import com.epmet.dataaggre.dto.govissue.form.VotingIssueListFormDTO; -import com.epmet.dataaggre.dto.govissue.result.ClosedIssueListResultDTO; -import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; -import com.epmet.dataaggre.dto.govissue.result.IssueShiftProjectResultDTO; -import com.epmet.dataaggre.dto.govissue.result.VotingIssueListResultDTO; +import com.epmet.dataaggre.dto.govissue.result.*; import com.epmet.dataaggre.entity.govissue.IssueEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -75,4 +72,6 @@ public interface IssueDao extends BaseDao { List selectClosedListGov(ClosedIssueListFormDTO fromDTO); Integer selectIssueCount(@Param("gridIds") List gridIds,@Param("issueType")String issueType); + + List selectShiftProjectIssueList(@Param("customerId") String customerId, @Param("gridId") String gridId); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java index 7b0ae9a6fe..cc3f3d9e7e 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java @@ -18,18 +18,17 @@ package com.epmet.dataaggre.dao.govproject; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO; -import com.epmet.dataaggre.dto.govproject.result.ProjectInfoDTO; import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; import com.epmet.dataaggre.dto.govproject.ProjectDTO; +import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO; +import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO; +import com.epmet.dataaggre.dto.govproject.result.ProjectInfoDTO; import com.epmet.dataaggre.entity.govproject.ProjectEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; -import java.util.List; - /** * 项目表 * @@ -68,4 +67,5 @@ public interface ProjectDao extends BaseDao { **/ List selectDepartmentNameList(ProjectDTO project); + List selectList(@Param("customerId") String customerId,@Param("list")List issueIds); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiTopicDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiTopicDao.java index 5ba256bde6..cd57936e2f 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiTopicDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiTopicDao.java @@ -18,8 +18,12 @@ package com.epmet.dataaggre.dao.resigroup; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; import com.epmet.dataaggre.entity.resigroup.ResiTopicEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 话题信息表 @@ -29,5 +33,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ResiTopicDao extends BaseDao { - + + List selectTopicInfoByIds(@Param("list") List topicIds); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java index 2c80898675..b3a96f917c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java @@ -5,10 +5,7 @@ import com.epmet.dataaggre.dto.govissue.form.AllIssueFormDTO; import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO; import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO; import com.epmet.dataaggre.dto.govissue.form.VotingIssueListFormDTO; -import com.epmet.dataaggre.dto.govissue.result.AllIssueResultDTO; -import com.epmet.dataaggre.dto.govissue.result.ClosedIssueListResultDTO; -import com.epmet.dataaggre.dto.govissue.result.ShiftProjectIssueListResultDTO; -import com.epmet.dataaggre.dto.govissue.result.VotingIssueListResultDTO; +import com.epmet.dataaggre.dto.govissue.result.*; import java.util.List; @@ -46,4 +43,6 @@ public interface GovIssueService { * @author sun **/ List closedIssueList(ClosedIssueListFormDTO fromDTO); + + List selectShiftProjectIssueList(String customerId,String gridId); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java index 87ff2a6dd9..e379b75a38 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java @@ -313,4 +313,9 @@ public class GovIssueServiceImpl implements GovIssueService { return resultList; } + @Override + public List selectShiftProjectIssueList(String customerId,String gridId) { + return issueDao.selectShiftProjectIssueList(customerId,gridId); + } + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java index ecfdfed1cb..38192cd035 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java @@ -1,12 +1,11 @@ package com.epmet.dataaggre.service.govproject; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO; +import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO; import com.epmet.dataaggre.dto.govproject.result.AllProjectResultDTO; - -import java.util.List; - -import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; +import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO; import com.epmet.dataaggre.dto.govproject.result.ShiftProjectResultDTO; import java.util.List; @@ -41,4 +40,5 @@ public interface GovProjectService { List getProjectByIssue(List issueIdList); + List queryProjectDistribution(ProjectDistributionFormDTO formDTO); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java index 8c9f6bc8e8..cc664bf225 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java @@ -8,17 +8,21 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dataaggre.constant.DataSourceConstant; import com.epmet.dataaggre.constant.ProjectConstant; -import com.epmet.dataaggre.dao.govorg.CustomerStaffAgencyDao; import com.epmet.dataaggre.dao.govproject.ProjectDao; +import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO; import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; -import com.epmet.dataaggre.dto.govorg.CustomerStaffAgencyDTO; import com.epmet.dataaggre.dto.govproject.ProjectDTO; import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO; +import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO; import com.epmet.dataaggre.dto.govproject.result.AllProjectResultDTO; +import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO; import com.epmet.dataaggre.dto.govproject.result.ProjectInfoDTO; import com.epmet.dataaggre.dto.govproject.result.ShiftProjectResultDTO; +import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; +import com.epmet.dataaggre.service.govissue.GovIssueService; import com.epmet.dataaggre.service.govorg.GovOrgService; import com.epmet.dataaggre.service.govproject.GovProjectService; +import com.epmet.dataaggre.service.resigroup.ResiGroupService; import com.epmet.dto.form.TimestampIntervalFormDTO; import com.epmet.dto.form.WorkMinuteFormDTO; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; @@ -46,6 +50,10 @@ public class GovProjectServiceImpl implements GovProjectService { private GovOrgService govOrgService; @Autowired private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; + @Autowired + private GovIssueService govIssueService; + @Autowired + private ResiGroupService resiGroupService; /** * @Description 查询项目信息 @@ -103,6 +111,33 @@ public class GovProjectServiceImpl implements GovProjectService { return resultList; } + @Override + public List queryProjectDistribution(ProjectDistributionFormDTO formDTO) { + List resultDTOList = new ArrayList<>(); + List issueInfoDTOList = govIssueService.selectShiftProjectIssueList(formDTO.getCustomerId(), formDTO.getGridId()); + if (CollectionUtils.isNotEmpty(issueInfoDTOList)) { + List topicIds = issueInfoDTOList.stream().map(data -> data.getTopicId()).collect(Collectors.toList()); + // log.info("话题id集合:" + JSON.toJSONString(topicIds, true)); + List topicInfoDTOList = resiGroupService.selectTopicInfoByIds(topicIds); + List issueIds = issueInfoDTOList.stream().map(data -> data.getIssueId()).collect(Collectors.toList()); + // log.info("议题id集合:" + JSON.toJSONString(issueIds, true)); + resultDTOList = projectDao.selectList(formDTO.getCustomerId(),issueIds); + for (ProjectDistributionResultDTO project : resultDTOList) { + for (ResiTopicDTO topicInfoDTO : topicInfoDTOList) { + if (project.getIssueId().equals(topicInfoDTO.getIssueId())) { + //维度 + project.setLatitude(topicInfoDTO.getDimension()); + //经度 + project.setLongitude(topicInfoDTO.getLongitude()); + project.setGridId(topicInfoDTO.getGridId()); + break; + } + } + } + } + return resultDTOList; + } + /** * 全部项目 diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java index 872188f23c..1e15dce4fa 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java @@ -1,8 +1,14 @@ package com.epmet.dataaggre.service.resigroup; +import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + /** * @Author zxc * @DateTime 2020/12/25 上午9:21 */ public interface ResiGroupService { + List selectTopicInfoByIds(@Param("topicIds") List topicIds); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java index d22d43dbf5..931c13ffbb 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java @@ -2,10 +2,15 @@ package com.epmet.dataaggre.service.resigroup.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.dataaggre.constant.DataSourceConstant; +import com.epmet.dataaggre.dao.resigroup.ResiTopicDao; +import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; import com.epmet.dataaggre.service.resigroup.ResiGroupService; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * @Author zxc * @DateTime 2020/12/25 上午9:21 @@ -14,4 +19,11 @@ import org.springframework.stereotype.Service; @DataSource(DataSourceConstant.RESI_GROUP) @Slf4j public class ResiGroupServiceImpl implements ResiGroupService { + @Autowired + private ResiTopicDao resiTopicDao; + + @Override + public List selectTopicInfoByIds(List topicIds) { + return resiTopicDao.selectTopicInfoByIds(topicIds); + } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml index 96475ca863..44c2924ba8 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml @@ -107,4 +107,21 @@ ) + \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml index a85b784273..f171a790e3 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml @@ -124,4 +124,22 @@ AND p.id = #{id} + \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiTopicDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiTopicDao.xml index 17415f1321..bd46639c94 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiTopicDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiTopicDao.xml @@ -2,5 +2,24 @@ - + \ No newline at end of file From 69a74644bff4e4769b34844c7781a15e0efb5d80 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 16:50:58 +0800 Subject: [PATCH 086/101] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/ProjectInfoDTO.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java new file mode 100644 index 0000000000..9978336a86 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.util.List; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/24 16:11 + */ +@Data +public class ProjectInfoDTO { + // 【事件 = 项目】 + + /** + * 事件图片集合 + */ + private List imgUrlList; + + private String fromGridName; + + /** + * 项目标题 + */ + private String eventTitle; + + /** + * 项目内容 + */ + private String eventContent; +} From ae0ef253a738cee3a34a6ce22c0a324bbc6e3e9f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 16:51:30 +0800 Subject: [PATCH 087/101] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=9A=82=E5=AD=981?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/impl/ProjectServiceImpl.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 9c2336d992..3daf34aa23 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -27,6 +27,7 @@ import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; import com.epmet.project.dto.result.ProjectDetailResultDTO; import com.epmet.project.dto.result.*; import com.github.pagehelper.PageHelper; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -42,6 +43,7 @@ import java.util.List; * @Author sun * @Description 数据-项目 **/ +@Slf4j @Service public class ProjectServiceImpl implements ProjectService { @@ -197,10 +199,22 @@ public class ProjectServiceImpl implements ProjectService { */ @Override public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) { - ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO); + /*ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO); if (null == projectDetailResultDTO) { return new ProjectDetailResultDTO(); - } + }*/ + ProjectDetailResultDTO projectDetailResultDTO=new ProjectDetailResultDTO(); + //todo + /*Result result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId()); + if(result.success()&&null!=result.getData()){ + ProjectInfoDTO projectInfoDTO=result.getData(); + projectDetailResultDTO.setImgUrlList(projectInfoDTO.getImgUrlList()); + projectDetailResultDTO.setEventSource(projectInfoDTO.getFromGridName()); + projectDetailResultDTO.setEventTitle(projectInfoDTO.getEventTitle()); + projectDetailResultDTO.setEventContent(projectInfoDTO.getEventContent()); + }else{ + log.warn(String.format("项目信息查询失败,projectId:%s",processListFormDTO.getProjectId())); + }*/ Result processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); if (!processList.success()) { throw new RenException(ProjectConstant.PROCESS_FAILURE); From f47aca28de7a1848170c8b7912120a92b33373a5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 24 Feb 2021 17:27:34 +0800 Subject: [PATCH 088/101] =?UTF-8?q?=E6=A0=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AreaCodeServiceImpl.java | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index 1360f92778..5e865cfc44 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -386,6 +386,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl areaCodeChildDTOS = childDao.selectAllChild(); List fourResult = new ArrayList<>(); + List fiveResult = new ArrayList<>(); // 街道-社区 Map> groupByLevel = areaCodeChildDTOS.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getLevel)); //社区 @@ -393,23 +394,40 @@ public class AreaCodeServiceImpl extends BaseServiceImpl> groupByPCode = levelFive.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode)); //街道 List levelFour = groupByLevel.get(NumConstant.FOUR); + // 6级 + List levelSix = groupByLevel.get(NumConstant.SIX); + Map> groupBySixPCode = levelSix.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode)); + + levelFive.forEach(f -> { + AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO(); + dto.setCode(f.getCode()); + dto.setName(f.getName()); + dto.setParentCode(f.getPCode()); + groupBySixPCode.forEach((k,v) -> { + if (dto.getCode().equals(k)){ + List six = new ArrayList<>(); + v.forEach(s -> { + AreaCodeDictResultDTO sixDto = new AreaCodeDictResultDTO(); + sixDto.setCode(s.getCode()); + sixDto.setName(s.getName()); + sixDto.setParentCode(k); + six.add(sixDto); + }); + List collect = six.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList()); + dto.setChildren(collect); + } + }); + fiveResult.add(dto); + }); + Map> groupByFivePCode = fiveResult.stream().collect(Collectors.groupingBy(AreaCodeDictResultDTO::getParentCode)); levelFour.forEach(four -> { AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO(); dto.setCode(four.getCode()); dto.setName(four.getName()); dto.setParentCode(four.getPCode()); - groupByPCode.forEach((pCode,v) -> { + groupByFivePCode.forEach((pCode,v) -> { if (dto.getCode().equals(pCode)){ - List fiveResult = new ArrayList<>(); - v.forEach(five -> { - AreaCodeDictResultDTO fiveDto = new AreaCodeDictResultDTO(); - fiveDto.setCode(five.getCode()); - fiveDto.setName(five.getName()); - fiveDto.setParentCode(pCode); - fiveResult.add(fiveDto); - }); - List fiveSort = fiveResult.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList()); - dto.setChildren(fiveSort); + dto.setChildren(v); } }); fourResult.add(dto); From 8176c3542f40ec1cfb440683090f657b26a2c322 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 18:21:51 +0800 Subject: [PATCH 089/101] =?UTF-8?q?=E9=BE=99=E6=B9=BE=EF=BC=9A=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E8=AF=A6=E6=83=85=EF=BC=9B=E9=9A=BE=E7=82=B9=E8=B5=8C?= =?UTF-8?q?=E7=82=B9=E4=B8=BB=E5=9B=BE=E4=B8=A4=E4=B8=AA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GrassRootsGovernServiceImpl.java | 6 +++++ .../project/impl/ProjectServiceImpl.java | 6 ++--- .../com/epmet/dto/result/IssueResultDTO.java | 4 +++ .../epmet/feign/GovIssueOpenFeignClient.java | 3 +++ .../GovIssueOpenFeignClientFallBack.java | 6 ++++- .../com/epmet/controller/IssueController.java | 2 +- .../epmet/service/impl/IssueServiceImpl.java | 9 +++++++ .../com/epmet/dto/result/ProjectInfoDTO.java | 17 +++++++------ .../feign/GovProjectOpenFeignClient.java | 10 +++++--- .../GovProjectOpenFeignClientFallback.java | 10 +++++--- .../epmet/controller/ProjectController.java | 17 +++++++++++-- .../main/java/com/epmet/dao/ProjectDao.java | 7 +++--- .../com/epmet/service/ProjectService.java | 8 ++++++ .../service/impl/ProjectServiceImpl.java | 25 +++++++++++++++++++ .../src/main/resources/mapper/ProjectDao.xml | 22 ++++++++++++++++ 15 files changed, 126 insertions(+), 26 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java index e33e7c9334..fca810d21f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.*; @@ -87,6 +88,11 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { } PageHelper.startPage(NumConstant.ONE,param.getTopNum()); List result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); + for(DifficultProjectResultDTO resultDTO:result){ + if(!resultDTO.getImgUrl().contains("http")){ + resultDTO.setImgUrl(StrConstant.EPMETY_STR); + } + } if(null == result) return new ArrayList<>(); return result; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 3daf34aa23..e0742c8a0c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -205,16 +205,16 @@ public class ProjectServiceImpl implements ProjectService { }*/ ProjectDetailResultDTO projectDetailResultDTO=new ProjectDetailResultDTO(); //todo - /*Result result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId()); + Result result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId()); if(result.success()&&null!=result.getData()){ ProjectInfoDTO projectInfoDTO=result.getData(); projectDetailResultDTO.setImgUrlList(projectInfoDTO.getImgUrlList()); - projectDetailResultDTO.setEventSource(projectInfoDTO.getFromGridName()); + projectDetailResultDTO.setEventSource(projectInfoDTO.getGridName()); projectDetailResultDTO.setEventTitle(projectInfoDTO.getEventTitle()); projectDetailResultDTO.setEventContent(projectInfoDTO.getEventContent()); }else{ log.warn(String.format("项目信息查询失败,projectId:%s",processListFormDTO.getProjectId())); - }*/ + } Result processList = govProjectOpenFeignClient.getProcessList(processListFormDTO); if (!processList.success()) { throw new RenException(ProjectConstant.PROCESS_FAILURE); diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java index b278b9f585..c2dbdb85eb 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java @@ -44,5 +44,9 @@ public class IssueResultDTO implements Serializable { */ private String topicId; + /** + * 上级-网格名 20210224add + */ + private String gridName; } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index 8f04ff87b0..f5d2786c93 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -241,4 +241,7 @@ public interface GovIssueOpenFeignClient { */ @PostMapping("/gov/issue/issuesharelink/sharelinkinfo") Result shareLinkInfo(@RequestParam String shareLinkId); + + @PostMapping("/gov/issue/issue/detail") + Result queryIssueDetail(@RequestBody IssueDetailFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index 50e37286e5..84b1220993 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -18,7 +18,6 @@ import com.epmet.resi.group.dto.group.result.*; import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.RequestParam; import java.util.List; import java.util.Map; @@ -207,4 +206,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result shareLinkInfo(String shareLinkId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "shareLinkInfo", shareLinkId); } + + @Override + public Result queryIssueDetail(IssueDetailFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index 8ccb30aa15..c64573730a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -34,7 +34,7 @@ public class IssueController { /** * @Description 议题详情 * @param issueDetail - * @author zxc + * @author zxc 这个接口内部feign也调用,不要加权限注解 * @date 2020/5/11 9:42 */ @PostMapping(value = "detail") diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 3b724521a5..40fb145f77 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -181,6 +181,15 @@ public class IssueServiceImpl extends BaseServiceImpl imp public IssueResultDTO detail(IssueDetailFormDTO issueDetail) { //议题信息 IssueResultDTO issueResult = issueDao.issueDetail(issueDetail); + if (null != issueResult && StringUtils.isNotBlank(issueResult.getGridId())) { + BelongGridNameFormDTO formDTO = new BelongGridNameFormDTO(); + formDTO.setGridId(issueResult.getGridId()); + Result result = govOrgOpenFeignClient.getGridNameByGridId(formDTO); + logger.info("根据网格id查询网格名称接口返参:" + JSON.toJSONString(result)); + if (result.success() && null != result.getData()) { + issueResult.setGridName(result.getData().getBelongsGridName()); + } + } return issueResult; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java index 9978336a86..b427707f58 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java @@ -13,13 +13,7 @@ import java.util.List; @Data public class ProjectInfoDTO { // 【事件 = 项目】 - - /** - * 事件图片集合 - */ - private List imgUrlList; - - private String fromGridName; + private String projectId; /** * 项目标题 @@ -30,4 +24,13 @@ public class ProjectInfoDTO { * 项目内容 */ private String eventContent; + + private String issueId; + private String gridName; + private String gridId; + + /** + * 项目附件图片集合 + */ + private List imgUrlList; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java index 2cd5f5f5fb..49b573f0be 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java @@ -6,13 +6,12 @@ import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectListFromDTO; -import com.epmet.dto.result.MyPartProjectsResultDTO; -import com.epmet.dto.result.PendProjectListResultDTO; -import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; -import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; +import com.epmet.dto.result.*; import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -75,4 +74,7 @@ public interface GovProjectOpenFeignClient { */ @PostMapping("gov/project/project/list-by-createtopic-userid") Result> listProjectsByCreateTopicUserId(@RequestBody ProjectByCreateTopicUserFormDTO form); + + @GetMapping("gov/project/project/queryprojectinfobyprojectid/{projectId}") + Result queryProjectInfoByProjectId(@PathVariable("projectId")String projectId); } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java index fd478f1245..ca4488be17 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java @@ -7,10 +7,7 @@ import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectListFromDTO; -import com.epmet.dto.result.MyPartProjectsResultDTO; -import com.epmet.dto.result.PendProjectListResultDTO; -import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; -import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; +import com.epmet.dto.result.*; import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.springframework.stereotype.Component; @@ -69,4 +66,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli public Result> listProjectsByCreateTopicUserId(ProjectByCreateTopicUserFormDTO form) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "listProjectsByCreateTopicUserId", form); } + + @Override + public Result queryProjectInfoByProjectId(String projectId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryProjectInfoByProjectId", projectId); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 3c3641dac5..05fe6c04b4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -17,9 +17,7 @@ package com.epmet.controller; -import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -33,6 +31,7 @@ import com.epmet.dto.result.*; import com.epmet.excel.ProjectExcel; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.service.ProjectService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -204,4 +203,18 @@ public class ProjectController { List projects = projectService.listProjectsByCreateTopicUserId(form.getUserId(), form.getCustomerId(), form.getPageNo(), form.getPageSize()); return new Result().ok(projects); } + + /** + * @param projectId + * @author yinzuomei + * @description 查询项目信息(龙湾临时调用) + * @Date 2021/2/24 17:04 + **/ + @GetMapping("queryprojectinfobyprojectid/{projectId}") + public Result queryProjectInfoByProjectId(@PathVariable("projectId")String projectId){ + if(StringUtils.isNotBlank(projectId)){ + return new Result().ok(projectService.queryProjectInfoByProjectId(projectId)); + } + return new Result<>(); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java index e4dfd04800..5eccc08f67 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java @@ -23,10 +23,7 @@ import com.epmet.dto.ProjectStaffDTO; import com.epmet.dto.form.LatestListFormDTO; import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ShiftProjectsFromDTO; -import com.epmet.dto.result.LatestListResultDTO; -import com.epmet.dto.result.MyPartProjectsResultDTO; -import com.epmet.dto.result.ProjectDetailResultDTO; -import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -148,4 +145,6 @@ public interface ProjectDao extends BaseDao { */ List listProjectsByCreateTopicUserId(@Param("userId") String userId, @Param("customerId") String customerId); + + ProjectInfoDTO queryProjectInfoByProjectId(String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index e60657fa26..3216f2d576 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -268,4 +268,12 @@ public interface ProjectService extends BaseService { * @author sun */ void responseV2(ProjectResponseFormDTO formDTO); + + /** + * @param projectId + * @author yinzuomei + * @description 查询项目信息(龙湾临时调用) + * @Date 2021/2/24 17:07 + **/ + ProjectInfoDTO queryProjectInfoByProjectId(String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index a72ad4c6f2..2fb4b5f45c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -105,6 +105,8 @@ public class ProjectServiceImpl extends BaseServiceImpl issueDTOResult=govIssueOpenFeignClient.queryIssueDetail(formDTO); + if(issueDTOResult.success()&&null!=issueDTOResult.getData()){ + projectInfoDTO.setGridId(issueDTOResult.getData().getGridId()); + projectInfoDTO.setGridName(issueDTOResult.getData().getGridName()); + }else{ + log.warn("查询议题详情失败issueId="+formDTO.getIssueId()); + } + } + return projectInfoDTO; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index a3747fe72e..c47def3cc0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -246,4 +246,26 @@ order by p.CREATED_TIME desc + + + + + + + + + + + + + \ No newline at end of file From 0e2b56c435ff2894100aca308db4d64492e1e082 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 24 Feb 2021 18:26:14 +0800 Subject: [PATCH 090/101] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/UserBadgeServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index 5b8638ab15..02e3c8c875 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -175,6 +175,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { return; } List userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(reUserIds); + log.info("user基本信息:"+userBaseInfoResultDTOS.toString()); if (CollectionUtils.isEmpty(userBaseInfoResultDTOS)) { log.error("未查询到党员基本信息......"); throw new RenException("未查询到党员基本信息......"); From ceda07db1cf3dd1bcc022ccc09317eb0caf867a1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 19:00:01 +0800 Subject: [PATCH 091/101] datastat+1 --- .../com/epmet/service/crm/impl/CustomerRelationServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java index 9b6c4ab7f1..018e215af1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java @@ -38,7 +38,7 @@ import java.util.stream.Collectors; * @author generator generator@elink-cn.com * @since v1.0.0 2021-01-14 */ -@DataSource(DataSourceConstant.STATS) +@DataSource(DataSourceConstant.OPER_CRM) @Service public class CustomerRelationServiceImpl extends BaseServiceImpl implements CustomerRelationService { From abef0b95d3299a400b2c8bd096fc42847cb3e792 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Feb 2021 19:51:44 +0800 Subject: [PATCH 092/101] =?UTF-8?q?data-stat=E7=BB=9F=E8=AE=A1=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E4=BF=AE=E6=94=B9:=E6=8C=87=E6=A0=87=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E8=8E=B7=E5=8F=96=E5=AD=90=E5=AE=A2=E6=88=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dao/crm/CustomerRelationDao.java | 6 ++---- .../crm/impl/CustomerRelationServiceImpl.java | 19 +++++++++++++++++-- .../mapper/crm/CustomerRelationDao.xml | 16 +++------------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java index d79e843076..87a8db63bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java @@ -23,8 +23,6 @@ import com.epmet.entity.crm.CustomerRelationEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import java.util.List; - /** * 客户关系表(01.14 add) * @@ -35,10 +33,10 @@ import java.util.List; public interface CustomerRelationDao extends BaseDao { /** - * @param customerIds + * @param customerId * @author yinzuomei * @description 查询当前客户的area_code信息、以及下一级客户列表 * @Date 2021/1/21 11:27 **/ - List selectCustomerSubInfo(@Param("list") List customerIds); + CustomerSubInfoDTO selectCustomerSubInfo(@Param("customerId")String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java index 018e215af1..440491f8a5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java @@ -22,11 +22,15 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.crm.CustomerRelationDao; import com.epmet.dto.indexcal.CustomerSubInfoDTO; +import com.epmet.dto.stats.DimCustomerDTO; import com.epmet.entity.crm.CustomerRelationEntity; import com.epmet.service.crm.CustomerRelationService; +import com.epmet.service.stats.DimCustomerService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -42,7 +46,8 @@ import java.util.stream.Collectors; @Service public class CustomerRelationServiceImpl extends BaseServiceImpl implements CustomerRelationService { - + @Autowired + private DimCustomerService dimCustomerService; /** * @param customerIds * @return java.util.Map @@ -52,7 +57,17 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl getCustomerInfoMap(List customerIds) { - List list = baseDao.selectCustomerSubInfo(customerIds); + List list=new ArrayList<>(); + for(String customerId:customerIds){ + CustomerSubInfoDTO customerSubInfoDTO = baseDao.selectCustomerSubInfo(customerId); + if(null!=customerSubInfoDTO){ + DimCustomerDTO dimCustomerDTO=dimCustomerService.get(customerId); + if(null!=dimCustomerDTO){ + customerSubInfoDTO.setCustomerName(dimCustomerDTO.getCustomerName()); + } + list.add(customerSubInfoDTO); + } + } if(CollectionUtils.isEmpty(list)){ return new HashMap<>(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml index b6d60ae9a4..a92c55e9f9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml @@ -4,7 +4,6 @@ - @@ -14,22 +13,13 @@ \ No newline at end of file From 87c944462551c988cd3fcae95d4ac0fe218520e3 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 24 Feb 2021 20:02:00 +0800 Subject: [PATCH 093/101] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenGrassrootsGovernDataAbsorptionServiceImpl.java | 7 ++++--- .../src/main/resources/mapper/topic/TopicDao.xml | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index 5a560cd05c..05ab26289b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java @@ -163,10 +163,11 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr Map contentMap = topicService.getTopicContent(projectSourceMap); difficulties.forEach( diff -> { - if(!CollectionUtils.isEmpty(imgMap)) { - List figureList = imgMap.get(diff.getEventId()); + + List figureList = CollectionUtils.isEmpty(imgMap) ? null : imgMap.get(diff.getEventId()); diff.setEventImgUrl(CollectionUtils.isEmpty(figureList) ? "" : figureList.get(NumConstant.ZERO).getEventImgUrl()); - } + + if(!CollectionUtils.isEmpty(contentMap)) { diff.setEventContent(contentMap.get(diff.getEventId())); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml index 700c7fde61..ab24c331f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml @@ -225,6 +225,7 @@ resi_topic_attachment WHERE DEL_FLAG = '0' + AND ATTACHMENT_TYPE = 'image' TOPIC_ID = #{item.sourceId} From 0ee93cfde9814ebc2e834799d8b848c3dffa2c88 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Feb 2021 00:49:27 +0800 Subject: [PATCH 094/101] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/GrassRootsGovernServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java index fca810d21f..afdbf95f82 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java @@ -14,6 +14,7 @@ import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO; import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.github.pagehelper.PageHelper; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -89,7 +90,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { PageHelper.startPage(NumConstant.ONE,param.getTopNum()); List result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); for(DifficultProjectResultDTO resultDTO:result){ - if(!resultDTO.getImgUrl().contains("http")){ + if (StringUtils.isNotBlank(resultDTO.getImgUrl()) && !resultDTO.getImgUrl().contains("http")) { resultDTO.setImgUrl(StrConstant.EPMETY_STR); } } From 8954b31f190a8b9e799decca8386bfa989155345 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Feb 2021 10:16:40 +0800 Subject: [PATCH 095/101] =?UTF-8?q?=E6=B7=BB=E5=8A=A0del=5Fflag=3D'0'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/AreaCodeChildDao.xml | 2 +- .../src/main/resources/mapper/AreaCodeDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml index 422565051c..c918bb7702 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml @@ -5,7 +5,7 @@ - select * from area_code + select * from area_code m where m.DEL_FLAG = '0' + select * from resi_topic rt + where rt.DEL_FLAG='0' + and rt.ISSUE_ID=#{issueId} + From 9aa2d0dfb32f0b723cd4befbd1646b02eed2c0d8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 1 Mar 2021 12:59:40 +0800 Subject: [PATCH 098/101] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3data/report/project/projectdetail=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=BF=94=E5=8F=82topicContent2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/project/impl/ProjectServiceImpl.java | 2 ++ .../epmet/resi/group/feign/ResiGroupOpenFeignClient.java | 7 ++++--- .../modules/topic/controller/ResiTopicController.java | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 238ab69f4b..6eadda5d8f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.datareport.service.project.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; @@ -232,6 +233,7 @@ public class ProjectServiceImpl implements ProjectService { //返回话题内容 if(result.success()&&null!=result.getData()){ Result topicResult = resiGroupOpenFeignClient.queryTopicInfoByIssueId(result.getData().getIssueId()); + log.info(String.format("根据issueId:%s查询话题详情返参:%s", result.getData().getIssueId(), JSON.toJSONString(topicResult))); if (topicResult.success() && null != topicResult.getData() && StringUtils.isNotBlank(topicResult.getData().getTopicContent())) { projectDetailResultDTO.setTopicContent(topicResult.getData().getTopicContent()); } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java index 2a5e2c2780..677f25e896 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java @@ -17,6 +17,7 @@ import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallback; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -30,8 +31,8 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:16 */ -@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class) -//@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class,url = "localhost:8095") +// @FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class) +@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class,url = "localhost:8095") public interface ResiGroupOpenFeignClient { @PostMapping("/resi/group/group/gov-edit-auditing-list") @@ -195,6 +196,6 @@ public interface ResiGroupOpenFeignClient { @PostMapping("resi/group/topic/sendevent") Result sendEvent(@RequestBody TopicEventFormDTO param); - @PostMapping("resi/group/topic/querytopicinfobyissue/{issueId}") + @GetMapping("resi/group/topic/querytopicinfobyissueid/{issueId}") Result queryTopicInfoByIssueId(@PathVariable("issueId")String issueId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java index bf0eb0f3f0..60b593d88f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java @@ -429,7 +429,7 @@ public class ResiTopicController { return new Result(); } - @PostMapping("querytopicinfobyissueid/{issueId}") + @GetMapping("querytopicinfobyissueid/{issueId}") public Result queryTopicInfoByIssueId(@PathVariable("issueId") String issueId) { if (StringUtils.isNotBlank(issueId)) { return new Result().ok(topicService.queryTopicInfoByIssueId(issueId)); From c53ee76abfada07244af1f0f1a54e7f6ff791da2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 1 Mar 2021 13:00:08 +0800 Subject: [PATCH 099/101] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3data/report/project/projectdetail=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=BF=94=E5=8F=82topicContent3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java index 677f25e896..3c8a358f1c 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java @@ -31,8 +31,8 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:16 */ -// @FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class) -@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class,url = "localhost:8095") +@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class) +// @FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class,url = "localhost:8095") public interface ResiGroupOpenFeignClient { @PostMapping("/resi/group/group/gov-edit-auditing-list") From 3a409fdf5d6d009f8c1eecf495bf793bb290a03a Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 1 Mar 2021 22:01:01 +0800 Subject: [PATCH 100/101] =?UTF-8?q?=E4=BF=AE=E6=94=B9rocketmq=EF=BC=8C?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=9D=E5=A7=8B=E5=8C=96=E7=9A=84topic?= =?UTF-8?q?=E5=92=8C=E6=B6=88=E8=B4=B9=E8=80=85=E7=BB=84=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-commons/epmet-commons-rocketmq/pom.xml | 2 +- .../commons/rocketmq/constants/ConsomerGroupConstants.java | 4 ++-- .../com/epmet/commons/rocketmq/constants/TopicConstants.java | 2 +- .../java/com/epmet/mq/listener/InitCustomerOrgListener.java | 2 +- .../com/epmet/mq/listener/InitCustomerCustomizeListener.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-commons/epmet-commons-rocketmq/pom.xml b/epmet-commons/epmet-commons-rocketmq/pom.xml index 41ee2e97e1..a3761c000f 100644 --- a/epmet-commons/epmet-commons-rocketmq/pom.xml +++ b/epmet-commons/epmet-commons-rocketmq/pom.xml @@ -15,7 +15,7 @@ org.apache.rocketmq rocketmq-spring-boot-starter - 2.1.1 + 2.0.1 \ No newline at end of file diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java index 0bcf7d4aa6..9c332a6626 100644 --- a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java +++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java @@ -12,10 +12,10 @@ public interface ConsomerGroupConstants { /** * 初始化客户自定义消费者组 */ - String INIT_CUSTOMER_CUSTOMIZE_GROUP = "init_customer_customize_group"; + String INIT_CUSTOMER_COMPONENTS_GROUP = "init_customer_components_group"; /** * 初始化客户组织机构信息分组 */ - String INIT_CUSTOMER_ORG_GROUP = "init_customer_org_group"; + String INIT_CUSTOMER_ORG_ROLES_GROUP = "init_customer_org_roles_group"; } diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java index d95a829b8f..7687136498 100644 --- a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java +++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java @@ -1,5 +1,5 @@ package com.epmet.commons.rocketmq.constants; public interface TopicConstants { - String INIT_CUSTOMER = "init_customer_topic"; + String INIT_CUSTOMER = "init_customer"; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/mq/listener/InitCustomerOrgListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/mq/listener/InitCustomerOrgListener.java index 1308d09a36..e5eb8dabd6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/mq/listener/InitCustomerOrgListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/mq/listener/InitCustomerOrgListener.java @@ -24,7 +24,7 @@ import org.springframework.stereotype.Component; * 监听初始化客户动作,为客户初始化角色列表 */ @RocketMQMessageListener(topic = TopicConstants.INIT_CUSTOMER, - consumerGroup = ConsomerGroupConstants.INIT_CUSTOMER_ORG_GROUP, + consumerGroup = ConsomerGroupConstants.INIT_CUSTOMER_ORG_ROLES_GROUP, messageModel = MessageModel.CLUSTERING, selectorExpression = "*") @Component diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/mq/listener/InitCustomerCustomizeListener.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/mq/listener/InitCustomerCustomizeListener.java index df2fea0902..882db74489 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/mq/listener/InitCustomerCustomizeListener.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/mq/listener/InitCustomerCustomizeListener.java @@ -21,7 +21,7 @@ import org.springframework.stereotype.Component; * 监听初始化客户动作,为客户初始化角色列表 */ @RocketMQMessageListener(topic = TopicConstants.INIT_CUSTOMER, - consumerGroup = ConsomerGroupConstants.INIT_CUSTOMER_CUSTOMIZE_GROUP, + consumerGroup = ConsomerGroupConstants.INIT_CUSTOMER_COMPONENTS_GROUP, messageModel = MessageModel.CLUSTERING, selectorExpression = "*") @Component From 38ca4218d007388ac035275160f0797e917ba3c9 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 2 Mar 2021 10:27:25 +0800 Subject: [PATCH 101/101] =?UTF-8?q?ext=E6=9F=A5=E8=AF=A2staff=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=97=B6=EF=BC=8CagencyPath=E5=8C=85=E6=8B=AC?= =?UTF-8?q?=E6=9C=AC=E7=BA=A7=E5=88=AB=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CustomerAgencyDao.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index e7f2621649..87f00d6652 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -175,8 +175,8 @@ SELECT agency.ID AS agencyId, agency.ORGANIZATION_NAME AS agencyName, - agency.PIDS AS agencyIdPath, - agency.ALL_PARENT_NAME AS agencyNamePath, + IF((agency.PIDS IS NULL) || (TRIM(agency.PIDS) = '') ,agency.ID,CONCAT(agency.PIDS,':',agency.ID)) AS agencyIdPath, + IF(TRIM(IFNULL(agency.ALL_PARENT_NAME,'')) = '' ,agency.ORGANIZATION_NAME,CONCAT(agency.ALL_PARENT_NAME,':',agency.ORGANIZATION_NAME)) AS agencyNamePath, agency.CUSTOMER_ID AS customerId FROM CUSTOMER_STAFF_AGENCY staff @@ -188,12 +188,12 @@