Browse Source

执法端-综合分析修改

v6
zouyx 2 years ago
parent
commit
af16849913
  1. 7
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComprehensiveAnalysisMapper.java
  2. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComprehensiveAnalysisServiceImpl.java
  3. 100
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComprehensiveAnalysisMapper.xml

7
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComprehensiveAnalysisMapper.java

@ -42,6 +42,13 @@ public interface ComprehensiveAnalysisMapper {
*/
Integer plantCount(ComprehensiveAnalysis comprehensiveAnalysis);
/**
* 执法预告数量
* @param comprehensiveAnalysis
* @return
*/
Integer noticeCount(ComprehensiveAnalysis comprehensiveAnalysis);
/**
* 投诉数量
* @param comprehensiveAnalysis

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComprehensiveAnalysisServiceImpl.java

@ -45,8 +45,10 @@ public class ComprehensiveAnalysisServiceImpl implements ComprehensiveAnalysisSe
comprehensiveAnalysis.setHuanPercentage((double) (primaryRegistrationList.size() - huanRegistrationList.size()) / huanRegistrationList.size());
//评价数量
comprehensiveAnalysis.setEvaluateTotal(comprehensiveAnalysisMapper.evaluateCount(c));
//检查计划数量
comprehensiveAnalysis.setPlantTotal((comprehensiveAnalysisMapper.plantCount(c)));
/* //检查计划数量
comprehensiveAnalysis.setPlantTotal((comprehensiveAnalysisMapper.plantCount(c)));*/
//检查预告数量
comprehensiveAnalysis.setNoticeTotal(comprehensiveAnalysisMapper.noticeCount(c));
List<ComprehensiveAnalysis> complaintList = comprehensiveAnalysisMapper.complaintTypeList(c);
System.out.println(complaintList.toString());
//投诉总数

100
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComprehensiveAnalysisMapper.xml

@ -46,8 +46,8 @@
and MONTH(r.create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -83,8 +83,8 @@
and MONTH(DATE_SUB(r.create_time,INTERVAL -1 month))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and r.create_time>=DATE_SUB(beginTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)
and DATE_SUB(endTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)>=r.create_time
and DATE_FORMAT(r.create_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)>=DATE_FORMAT(r.create_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -120,8 +120,8 @@
and MONTH(DATE_SUB(r.create_time,INTERVAL -1 year))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(DATE_SUB(r.create_time,INTERVAL -1 year),'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(DATE_SUB(r.create_time,INTERVAL -1 year),'%Y-%m-%d')
and DATE_FORMAT(DATE_SUB(r.create_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(r.create_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
</where>
</select>
@ -149,8 +149,8 @@
and MONTH(e.create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(e.create_time,'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(e.create_time,'%Y-%m-%d')
and DATE_FORMAT(e.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(e.create_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -172,8 +172,32 @@
and MONTH(create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(create_time,'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(create_time,'%Y-%m-%d')
and DATE_FORMAT(create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(create_time,'%Y-%m-%d')
</if>
</where>
</select>
<select id="noticeCount" parameterType="ComprehensiveAnalysis" resultType = "java.lang.Integer">
select count(*) from enterprise_law_enforcement
<where>
and enterprise_number is not null
<if test="userId != null and userId != '' ">and user_id=#{userId}
</if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and bureau_dept_id=#{bureauDeptId}</if>
<if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(create_time)=#{year}
</if>
<if test="dateType != null and dateType != '' and dateType == 'quarter' ">
and YEAR(create_time)=#{year}
and QUARTER(create_time)=#{quarter}
</if>
<if test="dateType != null and dateType != '' and dateType == 'month' ">
and YEAR(create_time)=#{year}
and MONTH(create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(create_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -203,8 +227,8 @@
and MONTH(c.complaint_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -234,8 +258,8 @@
and MONTH(n.create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(n.create_time,'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(n.create_time,'%Y-%m-%d')
and DATE_FORMAT(n.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(n.create_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -265,8 +289,8 @@
and MONTH(DATE_SUB(n.create_time,INTERVAL -1 month))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and n.create_time>=DATE_SUB(beginTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)
and DATE_SUB(endTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)>=n.create_time
and DATE_FORMAT(n.create_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime}),"%Y-%m-%d")+1 day)>=DATE_FORMAT(n.create_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -296,8 +320,8 @@
and MONTH(DATE_SUB(n.create_time,INTERVAL -1 year))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(DATE_SUB(n.create_time,INTERVAL -1 year),'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(DATE_SUB(n.create_time,INTERVAL -1 year),'%Y-%m-%d')
and DATE_FORMAT(DATE_SUB(n.create_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(n.create_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
</where>
</select>
@ -329,8 +353,8 @@
and MONTH(c.complaint_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime} ,'%Y-%m-%d')>= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -362,8 +386,8 @@
and MONTH(DATE_SUB(c.complaint_time,INTERVAL -1 month))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and c.complaint_time>=DATE_SUB(beginTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)
and DATE_SUB(endTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)>=c.complaint_time
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)>=DATE_FORMAT(c.complaint_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -395,8 +419,8 @@
and MONTH(DATE_SUB(c.complaint_time,INTERVAL -1 year))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d')
and DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
</where>
</select>
@ -427,8 +451,8 @@
and MONTH(w.create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(w.create_time,'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(w.create_time,'%Y-%m-%d')
and DATE_FORMAT(w.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(w.create_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -459,8 +483,8 @@
and MONTH(DATE_SUB(w.create_time,INTERVAL -1 month))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and w.create_time>=DATE_SUB(beginTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)
and DATE_SUB(endTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)>=w.create_time
and DATE_FORMAT(w.create_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)>=DATE_FORMAT(w.create_time,'%Y-%m-%d')
</if>
</where>
</select>
@ -491,8 +515,8 @@
and MONTH(DATE_SUB(w.create_time,INTERVAL -1 year))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(DATE_SUB(w.create_time,INTERVAL -1 year),'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(DATE_SUB(w.create_time,INTERVAL -1 year),'%Y-%m-%d')
and DATE_FORMAT(DATE_SUB(w.create_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(w.create_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
</where>
</select>
@ -522,8 +546,8 @@
and MONTH(create_time)=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(create_time,'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(create_time,'%Y-%m-%d')
and DATE_FORMAT(create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(create_time,'%Y-%m-%d')
</if>
</where>
group by enterprise_number
@ -554,8 +578,8 @@
and MONTH(DATE_SUB(create_time,INTERVAL -1 month))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and create_time>=DATE_SUB(beginTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)
and DATE_SUB(endTime,INTERVAL TO_DAY(endTime)-TO_DAY(beginTime)+1 day)>=create_time
and DATE_FORMAT(create_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
and DATE_SUB(STR_TO_DATE(#{endTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime}),"%Y-%m-%d")+1 day)>=DATE_FORMAT(create_time,'%Y-%m-%d')
</if>
</where>
group by enterprise_number
@ -586,8 +610,8 @@
and MONTH(DATE_SUB(create_time,INTERVAL -1 year))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(DATE_SUB(create_time,INTERVAL -1 year),'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(DATE_SUB(create_time,INTERVAL -1 year),'%Y-%m-%d')
and DATE_FORMAT(DATE_SUB(create_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(create_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
</where>
group by enterprise_number
@ -626,8 +650,8 @@
and MONTH(DATE_SUB(c.complaint_time,INTERVAL -1 year))=#{month}
</if>
<if test="dateType != null and dateType != '' and dateType == 'day' ">
and DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d') >= #{beginTime}
and #{endTime} >= DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d')
and DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(c.complaint_time,INTERVAL -1 year),'%Y-%m-%d')
</if>
</where>
)x

Loading…
Cancel
Save