From e38b864f1b73b935e797568755c61983c682adc4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 3 Jul 2020 09:59:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=92=8C=E6=9F=A5=E8=AF=A2=E6=B7=BB=E5=8A=A0=E9=9D=9E?= =?UTF-8?q?=E7=A9=BA=E5=88=A4=E6=96=AD=E5=92=8C=E9=BB=98=E8=AE=A40?= =?UTF-8?q?=E7=9A=84=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/project/ProjectDao.xml | 32 +++++++++---------- .../stats/FactAgencyProjectDailyEntity.java | 28 ++++++++-------- .../stats/FactAgencyProjectMonthlyEntity.java | 28 ++++++++-------- .../stats/FactGridProjectDailyEntity.java | 28 ++++++++-------- .../stats/FactGridProjectMonthlyEntity.java | 28 ++++++++-------- 5 files changed, 72 insertions(+), 72 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml index 108f2add31..6a0a73c526 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml @@ -27,8 +27,8 @@ ( SELECT "处理中" AS "name", - pending_total AS "value", - pending_ratio AS "ratioInt" + IFNULL(pending_total,0) AS "value", + IFNULL(pending_ratio,0) AS "ratioInt" FROM fact_agency_project_daily WHERE @@ -42,8 +42,8 @@ ( SELECT "已结案" AS "name", - closed_total AS "value", - closed_ratio AS "ratioInt" + IFNULL(closed_total,0) AS "value", + IFNULL(closed_ratio,0) AS "ratioInt" FROM fact_agency_project_daily WHERE @@ -84,9 +84,9 @@ SELECT da.id AS "agencyId", da.agency_name AS "name", - fapd.pending_total AS "value", + IFNULL(fapd.pending_total,0) AS "value", "处理中" AS "type", - fapd.project_total + IFNULL(fapd.project_total,0) FROM fact_agency_project_daily fapd LEFT JOIN dim_agency da ON fapd.agency_id = da.id @@ -100,9 +100,9 @@ SELECT da.id AS "agencyId", da.agency_name AS "name", - fapd.closed_total AS "value", + IFNULL(fapd.closed_total,0) AS "value", "已结案" AS "type", - fapd.project_total + IFNULL(fapd.project_total,0) FROM fact_agency_project_daily fapd LEFT JOIN dim_agency da ON fapd.agency_id = da.id @@ -124,9 +124,9 @@ SELECT da.id AS "agencyId", dg.grid_name AS "name", - fgpd.pending_total AS "value", + IFNULL(fgpd.pending_total,0) AS "value", "处理中" AS "type", - fgpd.project_total + IFNULL(fgpd.project_total,0) FROM fact_grid_project_daily fgpd LEFT JOIN dim_agency da ON fgpd.agency_id = da.id @@ -143,9 +143,9 @@ SELECT da.id AS "agencyId", dg.grid_name AS "name", - fgpd.closed_total AS "value", + IFNULL(fgpd.closed_total,0) AS "value", "已结案" AS "type", - fgpd.project_total + IFNULL(fgpd.project_total,0) FROM fact_grid_project_daily fgpd LEFT JOIN dim_agency da ON fgpd.agency_id = da.id @@ -167,7 +167,7 @@ ( SELECT DATE_FORMAT(date_id, "%Y/%m/%d") AS "date", - pending_incr AS "value", + IFNULL(pending_incr,0) AS "value", "处理中" AS "type", date_id FROM @@ -183,7 +183,7 @@ ( SELECT DATE_FORMAT(date_id, "%Y/%m/%d") AS "date", - closed_incr AS "value", + IFNULL(closed_incr,0) AS "value", "已结案" AS "type", date_id FROM @@ -203,7 +203,7 @@ ( SELECT DATE_FORMAT(CONCAT(month_id,"00"), "%Y/%m") AS "date", - pending_incr AS "value", + IFNULL(pending_incr,0) AS "value", "处理中" AS "type", month_id FROM @@ -219,7 +219,7 @@ ( SELECT DATE_FORMAT(CONCAT(month_id,"00"), "%Y/%m") AS "date", - closed_incr AS "value", + IFNULL(closed_incr,0) AS "value", "已结案" AS "type", month_id FROM diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectDailyEntity.java index 9f609723f4..baff107cf3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectDailyEntity.java @@ -82,71 +82,71 @@ public class FactAgencyProjectDailyEntity extends BaseEpmetEntity { /** * 截止当日项目总数 【当前组织及下级项目总数】 */ - private Integer projectTotal; + private Integer projectTotal = 0; /** * 截止当日处理中项目数 【当前组织及下级所有未结案项目总数】 */ - private Integer pendingTotal; + private Integer pendingTotal = 0; /** * 截止当日处理中项目占比 【当前组织及下级未结案项目百分比(存百分比数,小数点后两位)】 */ - private BigDecimal pendingRatio; + private BigDecimal pendingRatio = new BigDecimal("0"); /** * 截止当日已结案项目数 【当前组织及下级已结案项目总数】 */ - private Integer closedTotal; + private Integer closedTotal = 0; /** * 截止当日已结案项目占比 【当前组织及下级已结案项目百分比(存百分比数,小数点后两位)】 */ - private BigDecimal closedRatio; + private BigDecimal closedRatio = new BigDecimal("0"); /** * 截止当日已结案中已解决项目数 【当前组织及下级已结案项目中已解决总数】 */ - private Integer resolvedTotal; + private Integer resolvedTotal = 0; /** * 截止当日已结案中已解决项目占比 【当前组织及下级已结案项目中已解决占比】 */ - private BigDecimal resolvedRatio; + private BigDecimal resolvedRatio = new BigDecimal("0"); /** * 截止当日已结案中未解决项目数 【当前组织及下级已结案项目中未解决总数】 */ - private Integer unresolvedTotal; + private Integer unresolvedTotal = 0; /** * 截止当日已结案中未解决项目占比 【当前组织及下级已结案项目中未解决占比】 */ - private BigDecimal unresolvedRatio; + private BigDecimal unresolvedRatio = new BigDecimal("0"); /** * 当日项目总数 【当前组织及下级项目总数】 */ - private Integer projectIncr; + private Integer projectIncr = 0; /** * 当日处理中项目数 【当前组织及下级前一日新增处理中项目数】 */ - private Integer pendingIncr; + private Integer pendingIncr = 0; /** * 当日已结案项目数 【当前组织及下级前一日新增结案项目数】 */ - private Integer closedIncr; + private Integer closedIncr = 0; /** * 当日已结案项目中已解决数 【当前组织及下级前一日新增结案中已解决项目数】 */ - private Integer resolvedIncr; + private Integer resolvedIncr = 0; /** * 当日已结案项目组未解决数 【当前组织及下级前一日新增结案中未解决项目数】 */ - private Integer unresolvedIncr; + private Integer unresolvedIncr = 0; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectMonthlyEntity.java index 8b147a3f18..7a9fc7c50a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectMonthlyEntity.java @@ -72,71 +72,71 @@ public class FactAgencyProjectMonthlyEntity extends BaseEpmetEntity { /** * 截止当月项目总数 【当前组织及下级项目总数】 */ - private Integer projectTotal; + private Integer projectTotal = 0; /** * 截止当月处理中项目数 【当前组织及下级所有未结案项目总数】 */ - private Integer pendingTotal; + private Integer pendingTotal = 0; /** * 截止当月处理中项目占比 【当前组织及下级未结案项目百分比(存百分比数,小数点后两位)】 */ - private BigDecimal pendingRatio; + private BigDecimal pendingRatio = new BigDecimal("0"); /** * 截止当月已结案项目数 【当前组织及下级已结案项目总数】 */ - private Integer closedTotal; + private Integer closedTotal = 0; /** * 截止当月已结案项目占比 【当前组织及下级已结案项目百分比(存百分比数,小数点后两位)】 */ - private BigDecimal closedRatio; + private BigDecimal closedRatio = new BigDecimal("0"); /** * 截止当月已结案中已解决项目数 【当前组织及下级已结案项目中已解决总数】 */ - private Integer resolvedTotal; + private Integer resolvedTotal = 0; /** * 截止当月已结案中已解决项目占比 【当前组织及下级已结案项目中已解决占比】 */ - private BigDecimal resolvedRatio; + private BigDecimal resolvedRatio = new BigDecimal("0"); /** * 截止当月已结案中未解决项目数 【当前组织及下级已结案项目中未解决总数】 */ - private Integer unresolvedTotal; + private Integer unresolvedTotal = 0; /** * 截止当月已结案中未解决项目占比 【当前组织及下级已结案项目中未解决占比】 */ - private BigDecimal unresolvedRatio; + private BigDecimal unresolvedRatio = new BigDecimal("0"); /** * 当月项目总数 【当前组织及下级前一月新增项目数】 */ - private Integer projectIncr; + private Integer projectIncr = 0; /** * 当月处理中项目数 【当前组织及下级前一月新增处理中项目数】 */ - private Integer pendingIncr; + private Integer pendingIncr = 0; /** * 当月已结案项目数 【当前组织及下级前一月新增结案项目数】 */ - private Integer closedIncr; + private Integer closedIncr = 0; /** * 当月已结案项目中已解决数 【当前组织及下级前一日新增结案中已解决项目数】 */ - private Integer resolvedIncr; + private Integer resolvedIncr = 0; /** * 当月已结案项目组未解决数 【当前组织及下级前一日新增结案中未解决项目数】 */ - private Integer unresolvedIncr; + private Integer unresolvedIncr = 0; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectDailyEntity.java index 93c1f71499..e507f74500 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectDailyEntity.java @@ -82,71 +82,71 @@ public class FactGridProjectDailyEntity extends BaseEpmetEntity { /** * 截止当日网格下项目总数 【当前组织及下级项目总数】 */ - private Integer projectTotal; + private Integer projectTotal = 0; /** * 截止当日网格下处理中项目数 【当前组织及下级所有未结案项目总数】 */ - private Integer pendingTotal; + private Integer pendingTotal = 0; /** * 截止当日网格下处理中项目占比 【当前组织及下级未结案项目百分比(存百分比数,小数点后两位)】 */ - private BigDecimal pendingRatio; + private BigDecimal pendingRatio = new BigDecimal("0"); /** * 截止当日网格下已结案项目数 【当前组织及下级已结案项目总数】 */ - private Integer closedTotal; + private Integer closedTotal = 0; /** * 截止当日网格下已结案项目占比 【当前组织及下级已结案项目百分比(存百分比数,小数点后两位)】 */ - private BigDecimal closedRatio; + private BigDecimal closedRatio = new BigDecimal("0"); /** * 截止当日已结案中已解决项目数 【当前组织及下级已结案项目中已解决总数】 */ - private Integer resolvedTotal; + private Integer resolvedTotal = 0; /** * 截止当日已结案中已解决项目占比 【当前组织及下级已结案项目中已解决占比】 */ - private BigDecimal resolvedRatio; + private BigDecimal resolvedRatio = new BigDecimal("0"); /** * 截止当日已结案中未解决项目数 【当前组织及下级已结案项目中未解决总数】 */ - private Integer unresolvedTotal; + private Integer unresolvedTotal = 0; /** * 截止当日已结案中未解决项目占比 【当前组织及下级已结案项目中未解决占比】 */ - private BigDecimal unresolvedRatio; + private BigDecimal unresolvedRatio = new BigDecimal("0"); /** * 当日已结案项目中已解决数 【当前组织及下级前一日新增结案中已解决项目数】 */ - private Integer resolvedIncr; + private Integer resolvedIncr = 0; /** * 当日已结案项目组未解决数 【当前组织及下级前一日新增结案中未解决项目数】 */ - private Integer unresolvedIncr; + private Integer unresolvedIncr = 0; /** * 当日网格下项目总数 【该网格下项目总数】 */ - private Integer projectIncr; + private Integer projectIncr = 0; /** * 当日网格下处理中项目数 【该网格下未结案项目总数】 */ - private Integer pendingIncr; + private Integer pendingIncr = 0; /** * 当日网格下已结案项目数 【该网格下已结案项目总数】 */ - private Integer closedIncr; + private Integer closedIncr = 0; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectMonthlyEntity.java index dd79ecc9fa..1ed377a64f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectMonthlyEntity.java @@ -72,71 +72,71 @@ public class FactGridProjectMonthlyEntity extends BaseEpmetEntity { /** * 截止当月项目总数 【当前组织及下级项目总数】 */ - private Integer projectTotal; + private Integer projectTotal = 0; /** * 截止当月处理中项目数 【当前组织及下级所有未结案项目总数】 */ - private Integer pendingTotal; + private Integer pendingTotal = 0; /** * 截止当月处理中项目占比 【当前组织及下级未结案项目百分比(存百分比数,小数点后两位)】 */ - private BigDecimal pendingRatio; + private BigDecimal pendingRatio = new BigDecimal("0"); /** * 截止当月已结案项目数 【当前组织及下级已结案项目总数】 */ - private Integer closedTotal; + private Integer closedTotal = 0; /** * 截止当月已结案项目占比 【当前组织及下级已结案项目百分比(存百分比数,小数点后两位)】 */ - private BigDecimal closedRatio; + private BigDecimal closedRatio = new BigDecimal("0"); /** * 截止当月已结案中已解决项目数 【当前组织及下级已结案项目中已解决总数】 */ - private Integer resolvedTotal; + private Integer resolvedTotal = 0; /** * 截止当月已结案中已解决项目占比 【当前组织及下级已结案项目中已解决占比】 */ - private BigDecimal resolvedRatio; + private BigDecimal resolvedRatio = new BigDecimal("0"); /** * 截止当月已结案中未解决项目数 【当前组织及下级已结案项目中未解决总数】 */ - private Integer unresolvedTotal; + private Integer unresolvedTotal = 0; /** * 截止当月已结案中未解决项目占比 【当前组织及下级已结案项目中未解决占比】 */ - private BigDecimal unresolvedRatio; + private BigDecimal unresolvedRatio = new BigDecimal("0"); /** * 当月项目总数 【当前组织及下级前一月新增项目数】 */ - private Integer projectIncr; + private Integer projectIncr = 0; /** * 当月处理中项目数 【当前组织及下级前一月新增处理中项目数】 */ - private Integer pendingIncr; + private Integer pendingIncr = 0; /** * 当月已结案项目数 【当前组织及下级前一月新增结案项目数】 */ - private Integer closedIncr; + private Integer closedIncr = 0; /** * 当月已结案项目中已解决数 【当前组织及下级前一日新增结案中已解决项目数】 */ - private Integer resolvedIncr; + private Integer resolvedIncr = 0; /** * 当月已结案项目组未解决数 【当前组织及下级前一日新增结案中未解决项目数】 */ - private Integer unresolvedIncr; + private Integer unresolvedIncr = 0; }