@@ -167,11 +182,14 @@
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/dto/EnforcementInspectionProgramDto.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/dto/EnforcementInspectionProgramDto.java
index b49723a3..0811bed6 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/dto/EnforcementInspectionProgramDto.java
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/dto/EnforcementInspectionProgramDto.java
@@ -63,6 +63,29 @@ public class EnforcementInspectionProgramDto extends BaseDomain {
*/
private String month;
+ /**
+ * 季度总数
+ */
+ private Integer quarterTotal1 = 0;
+ private Integer quarterTotal2 = 0;
+ private Integer quarterTotal3 = 0;
+ private Integer quarterTotal4 = 0;
+
+ /**
+ * 月度总数
+ */
+ private Integer monthTotal1 = 0;
+ private Integer monthTotal2 = 0;
+ private Integer monthTotal3 = 0;
+ private Integer monthTotal4 = 0;
+ private Integer monthTotal5 = 0;
+ private Integer monthTotal6 = 0;
+ private Integer monthTotal7 = 0;
+ private Integer monthTotal8 = 0;
+ private Integer monthTotal9 = 0;
+ private Integer monthTotal10 = 0;
+ private Integer monthTotal11 = 0;
+ private Integer monthTotal12 = 0;
public String getBeginTime() {
return beginTime;
}
@@ -158,4 +181,133 @@ public class EnforcementInspectionProgramDto extends BaseDomain {
public void setMonth(String month) {
this.month = month;
}
+
+
+ public Integer getQuarterTotal1() {
+ return quarterTotal1;
+ }
+
+ public void setQuarterTotal1(Integer quarterTotal1) {
+ this.quarterTotal1 = quarterTotal1;
+ }
+
+ public Integer getQuarterTotal2() {
+ return quarterTotal2;
+ }
+
+ public void setQuarterTotal2(Integer quarterTotal2) {
+ this.quarterTotal2 = quarterTotal2;
+ }
+
+ public Integer getQuarterTotal3() {
+ return quarterTotal3;
+ }
+
+ public void setQuarterTotal3(Integer quarterTotal3) {
+ this.quarterTotal3 = quarterTotal3;
+ }
+
+ public Integer getQuarterTotal4() {
+ return quarterTotal4;
+ }
+
+ public void setQuarterTotal4(Integer quarterTotal4) {
+ this.quarterTotal4 = quarterTotal4;
+ }
+
+ public Integer getMonthTotal1() {
+ return monthTotal1;
+ }
+
+ public void setMonthTotal1(Integer monthTotal1) {
+ this.monthTotal1 = monthTotal1;
+ }
+
+ public Integer getMonthTotal2() {
+ return monthTotal2;
+ }
+
+ public void setMonthTotal12(Integer monthTotal12) {
+ this.monthTotal12 = monthTotal12;
+ }
+
+ public Integer getMonthTotal3() {
+ return monthTotal3;
+ }
+
+ public void setMonthTotal3(Integer monthTotal3) {
+ this.monthTotal3 = monthTotal3;
+ }
+
+ public Integer getMonthTotal4() {
+ return monthTotal4;
+ }
+
+ public void setMonthTotal4(Integer monthTotal4) {
+ this.monthTotal4 = monthTotal4;
+ }
+
+ public Integer getMonthTotal5() {
+ return monthTotal5;
+ }
+
+ public void setMonthTotal5(Integer monthTotal5) {
+ this.monthTotal5 = monthTotal5;
+ }
+
+ public Integer getMonthTotal6() {
+ return monthTotal6;
+ }
+
+ public void setMonthTotal6(Integer monthTotal6) {
+ this.monthTotal6 = monthTotal6;
+ }
+
+ public Integer getMonthTotal7() {
+ return monthTotal7;
+ }
+
+ public void setMonthTotal7(Integer monthTotal7) {
+ this.monthTotal7 = monthTotal7;
+ }
+
+ public Integer getMonthTotal8() {
+ return monthTotal8;
+ }
+
+ public void setMonthTotal8(Integer monthTotal8) {
+ this.monthTotal8 = monthTotal8;
+ }
+
+ public Integer getMonthTotal9() {
+ return monthTotal9;
+ }
+
+ public void setMonthTotal9(Integer monthTotal9) {
+ this.monthTotal9 = monthTotal9;
+ }
+
+ public Integer getMonthTotal10() {
+ return monthTotal10;
+ }
+
+ public void setMonthTotal10(Integer monthTotal10) {
+ this.monthTotal10 = monthTotal10;
+ }
+
+ public Integer getMonthTotal11() {
+ return monthTotal11;
+ }
+
+ public void setMonthTotal11(Integer monthTotal11) {
+ this.monthTotal11 = monthTotal11;
+ }
+
+ public Integer getMonthTotal12() {
+ return monthTotal12;
+ }
+
+ public void setMonthTotal2(Integer monthTotal2) {
+ this.monthTotal2 = monthTotal2;
+ }
}
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
index 0c250f18..af13b64d 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
@@ -180,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
count(*) as total,
SUM(CASE WHEN time_type = 'year' THEN 1 ELSE 0 END ) as yearTotal,
SUM(CASE WHEN time_type = 'quarter' THEN 1 ELSE 0 END ) as quarterTotal,
- SUM(CASE WHEN time_type = 'month' THEN 1 ELSE 0 END ) as mouthTotal
+ SUM(CASE WHEN time_type = 'month' THEN 1 ELSE 0 END ) as monthTotal
FROM enforcement_inspection_program
@@ -202,6 +202,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and DATE_FORMAT(create_time, '%Y-%m') = #{month}
AND bureau_dept_id is not null
+ and time_type is not null
+ and(plan_year is not null or quarter is not null or mouth is not null)
GROUP BY bureau_dept_id
order by total desc
@@ -211,7 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT
SUM(CASE WHEN time_type = 'year' THEN 1 ELSE 0 END ) as yearTotal,
SUM(CASE WHEN time_type = 'quarter' THEN 1 ELSE 0 END ) as quarterTotal,
- SUM(CASE WHEN time_type = 'month' THEN 1 ELSE 0 END ) as mouthTotal
+ SUM(CASE WHEN time_type = 'month' THEN 1 ELSE 0 END ) as monthTotal
FROM enforcement_inspection_program
@@ -233,6 +235,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and DATE_FORMAT(create_time, '%m') = #{month}
AND bureau_dept_id is not null
+ and time_type is not null
+ and(plan_year is not null or quarter is not null or mouth is not null)
@@ -262,6 +266,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND bureau_dept_id is not null
AND time_type is not null
+ and(plan_year is not null or quarter is not null or mouth is not null)
GROUP BY bureau_dept_id
order by total desc
@@ -292,12 +297,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and DATE_FORMAT(create_time, '%Y-%m') = #{month}
AND bureau_dept_id is not null
+ and time_type ='year'
+ and plan_year is not null
GROUP BY bureau_dept_id
order by total desc
-
-
+
+
+ SELECT
+ bureau_dept_name,
+ SUM(CASE WHEN time_type = 'month' THEN 1 ELSE 0 END ) as total,
+ SUM(CASE WHEN mouth = 1 THEN 1 ELSE 0 END ) as monthTotal1,
+ SUM(CASE WHEN mouth = 2 THEN 1 ELSE 0 END ) as monthTotal2,
+ SUM(CASE WHEN mouth = 3 THEN 1 ELSE 0 END ) as monthTotal3,
+ SUM(CASE WHEN mouth = 4 THEN 1 ELSE 0 END ) as monthTotal4,
+ SUM(CASE WHEN mouth = 5 THEN 1 ELSE 0 END ) as monthTotal5,
+ SUM(CASE WHEN mouth = 6 THEN 1 ELSE 0 END ) as monthTotal6,
+ SUM(CASE WHEN mouth = 7 THEN 1 ELSE 0 END ) as monthTotal7,
+ SUM(CASE WHEN mouth = 8 THEN 1 ELSE 0 END ) as monthTotal8,
+ SUM(CASE WHEN mouth = 9 THEN 1 ELSE 0 END ) as monthTotal9,
+ SUM(CASE WHEN mouth = 10 THEN 1 ELSE 0 END ) as monthTotal10,
+ SUM(CASE WHEN mouth = 11 THEN 1 ELSE 0 END ) as monthTotal11,
+ SUM(CASE WHEN mouth = 12 THEN 1 ELSE 0 END ) as monthTotal12
+ FROM enforcement_inspection_program
+
+
+ AND YEAR(create_time) = #{year}
+
+ AND bureau_dept_id is not null
+ and time_type ='month'
+ and mouth is not null
GROUP BY bureau_dept_id
order by total desc
-
+
\ No newline at end of file
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml
index 6966f4cc..3ce89559 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml
@@ -41,7 +41,9 @@
- AND time_type is not null
+ AND bureau_dept_id is not null
+ and time_type is not null
+ and(plan_year is not null or quarter is not null or mouth is not null)
@@ -70,7 +72,9 @@
- AND time_type is not null
+ AND bureau_dept_id is not null
+ and time_type is not null
+ and(plan_year is not null or quarter is not null or mouth is not null)
@@ -82,7 +86,9 @@
- AND time_type is not null
+ AND bureau_dept_id is not null
+ and time_type is not null
+ and(plan_year is not null or quarter is not null or mouth is not null)
group by bureau_dept_id) s