Bläddra i källkod

日报导出修改

zx 5 månader sedan
förälder
incheckning
d73eeaabce

+ 15 - 10
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/controller/DailyReportController.java

@@ -48,9 +48,6 @@ public class DailyReportController extends BaseController {
     @PostMapping("/export")
     @ApiOperation(value = "日报导出")
     public void dayExport(HttpServletResponse response, String beingDate,String endDate) throws IOException, ParseException {
-        PdmReportIllegalDay pdmReportIllegalDay = new PdmReportIllegalDay();
-        pdmReportIllegalDay.setStartDate(beingDate);
-        pdmReportIllegalDay.setEndDate(endDate);
         Map<String,Object> dataMap = new HashMap();
 
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
@@ -69,7 +66,12 @@ public class DailyReportController extends BaseController {
         long countySelfInvestPunishRecNum=0;
         long countySelfInvestSeriousRecNum=0;
         long guaraSelfIssuesRecNum=0;
-        List<PdmReportIllegalDay> illegalList = pdmReportIllegalDayService.selectPdmReportIllegalDayList(pdmReportIllegalDay); File descFile=null;
+
+        PdmReportIllegalDay pdmReportIllegalDay = new PdmReportIllegalDay();
+        pdmReportIllegalDay.setStartDate(beingDate);
+        pdmReportIllegalDay.setEndDate(endDate);
+        List<PdmReportIllegalDay> illegalList = pdmReportIllegalDayService.selectIllegalReport(pdmReportIllegalDay);
+        File descFile=null;
         if(illegalList!=null && illegalList.size()>1){
             pdmReportIllegalDay=illegalList.get(illegalList.size()-1);
             provinceInvestPunishRecNum=pdmReportIllegalDay.getProvinceNum1()+pdmReportIllegalDay.getProvinceNum2();
@@ -100,8 +102,9 @@ public class DailyReportController extends BaseController {
         String tmpPlanRate="0%";
         long temporaryCancelSum=0;
         PdmReportPlanDay pdmReportPlanDay = new PdmReportPlanDay();
-        pdmReportPlanDay.setReportDate(beingDate);
-        List<PdmReportPlanDay> planlist = pdmReportPlanDayService.selectPdmReportPlanDayList(pdmReportPlanDay);
+        pdmReportPlanDay.setStartDate(beingDate);
+        pdmReportPlanDay.setEndDate(endDate);
+        List<PdmReportPlanDay> planlist = pdmReportPlanDayService.selectPlanReport(pdmReportPlanDay);
         if(planlist!=null && planlist.size()>1){
             pdmReportPlanDay=planlist.get(planlist.size()-1);
             jobRecNum=pdmReportPlanDay.getWeekSum();
@@ -130,8 +133,9 @@ public class DailyReportController extends BaseController {
         long nonfulfilmentNum=0;
         long derelictionDutyNum=0;
         PdmReportAppointmentDay pdmReportAppointmentDay = new PdmReportAppointmentDay();
-        pdmReportAppointmentDay.setReportDate(beingDate);
-        List<PdmReportAppointmentDay> appointmentlist = pdmReportAppointmentDayService.selectPdmReportAppointmentDayList(pdmReportAppointmentDay);
+        pdmReportAppointmentDay.setStartDate(beingDate);
+        pdmReportAppointmentDay.setEndDate(endDate);
+        List<PdmReportAppointmentDay> appointmentlist = pdmReportAppointmentDayService.selectAppointmentReport(pdmReportAppointmentDay);
         if(appointmentlist!=null && appointmentlist.size()>1){
             pdmReportAppointmentDay=appointmentlist.get(appointmentlist.size()-1);
             supervTimes=pdmReportAppointmentDay.getBossSum()+pdmReportAppointmentDay.getManageSum();
@@ -160,8 +164,9 @@ public class DailyReportController extends BaseController {
         String fourRiskNum="0";
         String fiveRiskNum="0";
         PdmReportPlanNextDay nextDay = new PdmReportPlanNextDay();
-        nextDay.setReportDate(DateUtils.getNextDateStr(beingDate,DateUtils.YYYYMMDD,1));
-        List<PdmReportPlanNextDay> nextDayList = pdmReportPlanNextDayService.selectPdmReportPlanNextDayList(nextDay);
+        nextDay.setStartDate(DateUtils.getNextDateStr(beingDate,DateUtils.YYYYMMDD,1));
+        nextDay.setEndDate(DateUtils.getNextDateStr(beingDate,DateUtils.YYYYMMDD,1));
+        List<PdmReportPlanNextDay> nextDayList = pdmReportPlanNextDayService.selectReportPlanNext(nextDay);
         if(nextDayList!=null&& nextDayList.size()>1){
             nextDay=nextDayList.get(nextDayList.size()-1);
             distNetworkProfesRecNum=nextDay.getWorkTotal();

+ 4 - 2
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportIllegalDayMapper.xml

@@ -147,7 +147,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select t1.organ_abbr company,
         IFNULL(t.province_num1,0) province_num1,IFNULL(t.province_num2,0) province_num2,
         IFNULL(t.city_num1,0) city_num1,IFNULL(t.city_num2,0) city_num2,
-        IFNULL(t.county_num1,0) county_num1,IFNULL(t.county_num2,0) county_num2
+        IFNULL(t.county_num1,0) county_num1,IFNULL(t.county_num2,0) county_num2,
+        0 check_num
         from pdm_work_organ t1
         LEFT JOIN
         (
@@ -170,7 +171,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         IFNULL(sum(if((t3.audit_lvl_cd='2025002' and t2.break_rules_nature_cd = '2020002'),1,0)),0) city_num1,
         IFNULL(sum(if((t3.audit_lvl_cd='2025002' and t2.break_rules_nature_cd = '2020001'),1,0)),0) city_num2,
         IFNULL(sum(if((t3.audit_lvl_cd='2025003' and t2.break_rules_nature_cd = '2020002'),1,0)),0) county_num1,
-        IFNULL(sum(if((t3.audit_lvl_cd='2025003' and t2.break_rules_nature_cd = '2020001'),1,0)),0) county_num2
+        IFNULL(sum(if((t3.audit_lvl_cd='2025003' and t2.break_rules_nature_cd = '2020001'),1,0)),0) county_num2,
+        0 check_num
         from pdm_violation_records t2,pdm_inspection_records t3
         where t2.audit_rec_id  = t3.audit_rec_id
         and t2.data_dt  &gt;= #{startDate} and t2.data_dt &lt;= #{endDate}

+ 6 - 3
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportPlanDayMapper.xml

@@ -169,7 +169,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         submit_org_nm
         from
         pdm_work_plan
-        where data_dt  &gt;= #{startDate} and data_dt &lt;= #{endDate}
+        where
+            date_format(plan_start_wk_tm,'%Y%m%d') &gt;= #{startDate}
+          and date_format(plan_start_wk_tm,'%Y%m%d') &lt;= #{endDate}
         GROUP BY submit_org_nm
         ) t on t1.organ_name = t.submit_org_nm
         UNION ALL
@@ -184,7 +186,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd = '2029005'),1,0))/sum(1)*100,2),'%'),'100%')  temporary_plan_ratio
         from
         pdm_work_plan
-        where data_dt &gt;= #{startDate} and data_dt &lt;= #{endDate}
-
+        where
+        date_format(plan_start_wk_tm,'%Y%m%d') &gt;= #{startDate}
+        and date_format(plan_start_wk_tm,'%Y%m%d') &lt;= #{endDate}
     </select>
 </mapper>