Browse Source

检查计划统计修改

v4
zouyx 2 years ago
parent
commit
6568ffd839
  1. 1027
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
  2. 152
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/dto/EnforcementInspectionProgramDto.java
  3. 71
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
  4. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

1027
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html

File diff suppressed because it is too large

152
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;
}
}

71
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
<where>
<if test="bureauDeptName != null and bureauDeptName != ''">
@ -202,6 +202,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and DATE_FORMAT(create_time, '%Y-%m') = #{month}
</if>
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)
</where>
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
<where>
<if test="bureauDeptName != null and bureauDeptName != ''">
@ -233,6 +235,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and DATE_FORMAT(create_time, '%m') = #{month}
</if>
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)
</where>
</select>
@ -262,6 +266,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
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)
</where>
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}
</if>
AND bureau_dept_id is not null
and time_type ='year'
and plan_year is not null
</where>
GROUP BY bureau_dept_id
order by total desc
</select>
<select id="staticProgramWithQuarter" resultType="com.zdxt.code.domain.dto.EnforcementInspectionProgramDto" >
<!-- <select id="staticProgramWithQuarter" resultType="com.zdxt.code.domain.dto.EnforcementInspectionProgramDto" >
SELECT
bureau_dept_name,
SUM(CASE WHEN time_type = 'quarter' THEN 1 ELSE 0 END ) as total
@ -322,12 +329,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND DATE_FORMAT(create_time, '%Y-%m') = #{month}
</if>
AND bureau_dept_id is not null
and time_type is not null
and quarter is not null
</where>
GROUP BY bureau_dept_id
order by total desc
</select>-->
<select id="staticProgramWithQuarter" resultType="com.zdxt.code.domain.dto.EnforcementInspectionProgramDto" >
SELECT
bureau_dept_name,
SUM(CASE WHEN time_type = 'quarter' THEN 1 ELSE 0 END ) as total,
SUM(CASE WHEN quarter = 1 THEN 1 ELSE 0 END ) as quarterTotal1,
SUM(CASE WHEN quarter = 2 THEN 1 ELSE 0 END ) as quarterTotal2,
SUM(CASE WHEN quarter = 3 THEN 1 ELSE 0 END ) as quarterTotal3,
SUM(CASE WHEN quarter = 4 THEN 1 ELSE 0 END ) as quarterTotal4
FROM enforcement_inspection_program
<where>
<if test="year != null and year != ''">
AND YEAR(create_time) = #{year}
</if>
AND bureau_dept_id is not null
and time_type ='quarter'
and quarter is not null
</where>
GROUP BY bureau_dept_id
order by total desc
</select>
</select>
<select id="staticProgramWithMonth" resultType="com.zdxt.code.domain.dto.EnforcementInspectionProgramDto" >
<!-- <select id="staticProgramWithMonth" resultType="com.zdxt.code.domain.dto.EnforcementInspectionProgramDto" >
SELECT
bureau_dept_name,
SUM(CASE WHEN time_type = 'month' THEN 1 ELSE 0 END ) as total
@ -352,8 +381,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND DATE_FORMAT(create_time, '%Y-%m') = #{month}
</if>
AND bureau_dept_id is not null
and time_type is not null
and mouth is not null
</where>
GROUP BY bureau_dept_id
order by total desc
</select>-->
<select id="staticProgramWithMonth" resultType="com.zdxt.code.domain.dto.EnforcementInspectionProgramDto" >
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
<where>
<if test="year != null and year != ''">
AND YEAR(create_time) = #{year}
</if>
AND bureau_dept_id is not null
and time_type ='month'
and mouth is not null
</where>
GROUP BY bureau_dept_id
order by total desc
</select>
</select>
</mapper>

12
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

@ -41,7 +41,9 @@
<if test="endTime != null and endTime != '' ">
<![CDATA[ AND create_time < #{endTime} ]]>
</if>
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)
</where>
</select>
@ -70,7 +72,9 @@
<if test="endTime != null and endTime != '' ">
<![CDATA[ AND create_time <= #{endTime} ]]>
</if>
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)
</where>
</select>
<select id="statisticalPanelProgramGroupByDept" resultType="integer" parameterType="StatisticsIndicatorPart">
@ -82,7 +86,9 @@
<if test="endTime != null and endTime != '' ">
<![CDATA[ AND create_time <= #{endTime} ]]>
</if>
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)
</where>
group by bureau_dept_id) s
</select>

Loading…
Cancel
Save