Browse Source

周报,日报查询修改 调整为从业务表统计

zx 5 tháng trước cách đây
mục cha
commit
a1fb27be41
26 tập tin đã thay đổi với 402 bổ sung52 xóa
  1. 35 30
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/controller/ReportController.java
  2. 31 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportAppointmentDay.java
  3. 1 1
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportIllegalDay.java
  4. 1 1
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportIllegalWeek.java
  5. 10 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportPlanDay.java
  6. 10 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportPlanNextDay.java
  7. 1 1
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportPlanWeek.java
  8. 4 4
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmStopRecords.java
  9. 12 12
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/vo/ReportDayWeek.java
  10. 7 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmReportAppointmentDayMapper.java
  11. 7 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmReportIllegalDayMapper.java
  12. 7 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmReportPlanDayMapper.java
  13. 7 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmReportPlanNextDayMapper.java
  14. 7 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmReportAppointmentDayService.java
  15. 7 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmReportIllegalDayService.java
  16. 7 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmReportPlanDayService.java
  17. 7 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmReportPlanNextDayService.java
  18. 5 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmReportAppointmentDayServiceImpl.java
  19. 5 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmReportIllegalDayServiceImpl.java
  20. 5 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmReportPlanDayServiceImpl.java
  21. 5 0
      ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmReportPlanNextDayServiceImpl.java
  22. 101 0
      ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportAppointmentDayMapper.xml
  23. 11 1
      ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportIllegalDayMapper.xml
  24. 41 0
      ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportPlanDayMapper.xml
  25. 66 0
      ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportPlanNextDayMapper.xml
  26. 2 2
      ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmWorkPlanMapper.xml

+ 35 - 30
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/controller/ReportController.java

@@ -45,8 +45,6 @@ public class ReportController extends BaseController {
     @Autowired
     private IPdmReportAppointmentWeekService pdmReportAppointmentWeekService;
     @Autowired
-    private IPdmReportIllegalWeekService pdmReportIllegalWeekService;
-    @Autowired
     private IPdmReportPlanWeekService pdmReportPlanWeekService;
     @Autowired
     private IPdmReportPlanNextWeekService pdmReportPlanNextWeekService;
@@ -58,20 +56,24 @@ public class ReportController extends BaseController {
      */
     @ApiOperation(value = "日报查询", notes = "日报查询")
     @GetMapping("/day")
-    public ReportDayVO day(String reportDate)
+    public ReportDayVO day(String startDate,String endDate)
     {
         PdmReportIllegalDay pdmReportIllegalDay = new PdmReportIllegalDay();
-        pdmReportIllegalDay.setReportDate(reportDate);
-        List<PdmReportIllegalDay> illegalList = pdmReportIllegalDayService.selectPdmReportIllegalDayList(pdmReportIllegalDay);
+        pdmReportIllegalDay.setStartDate(startDate);
+        pdmReportIllegalDay.setEndDate(endDate);
+        List<PdmReportIllegalDay> illegalList = pdmReportIllegalDayService.selectIllegalReport(pdmReportIllegalDay);
         PdmReportAppointmentDay pdmReportAppointmentDay = new PdmReportAppointmentDay();
-        pdmReportAppointmentDay.setReportDate(reportDate);
-        List<PdmReportAppointmentDay> appointmentlist = pdmReportAppointmentDayService.selectPdmReportAppointmentDayList(pdmReportAppointmentDay);
+        pdmReportAppointmentDay.setStartDate(startDate);
+        pdmReportAppointmentDay.setEndDate(endDate);
+        List<PdmReportAppointmentDay> appointmentlist = pdmReportAppointmentDayService.selectAppointmentReport(pdmReportAppointmentDay);
         PdmReportPlanDay pdmReportPlanDay = new PdmReportPlanDay();
-        pdmReportPlanDay.setReportDate(reportDate);
-        List<PdmReportPlanDay> planlist = pdmReportPlanDayService.selectPdmReportPlanDayList(pdmReportPlanDay);
+        pdmReportPlanDay.setStartDate(startDate);
+        pdmReportPlanDay.setEndDate(endDate);
+        List<PdmReportPlanDay> planlist = pdmReportPlanDayService.selectPlanReport(pdmReportPlanDay);
         PdmReportPlanNextDay nextDay = new PdmReportPlanNextDay();
-        nextDay.setReportDate(DateUtils.getNextDateStr(reportDate,DateUtils.YYYYMMDD,1));
-        List<PdmReportPlanNextDay> nextDayList = pdmReportPlanNextDayService.selectPdmReportPlanNextDayList(nextDay);
+        nextDay.setStartDate(DateUtils.getNextDateStr(endDate,DateUtils.YYYYMMDD,1));
+        nextDay.setEndDate(DateUtils.getNextDateStr(endDate,DateUtils.YYYYMMDD,1));
+        List<PdmReportPlanNextDay> nextDayList = pdmReportPlanNextDayService.selectReportPlanNext(nextDay);
 
         ReportDayVO vo = new ReportDayVO();
         vo.setAppointmentList(appointmentlist);
@@ -132,21 +134,24 @@ public class ReportController extends BaseController {
     @GetMapping("/week")
     public ReportDayWeek week(String startDate,String endDate)
     {
-        PdmReportIllegalWeek pdmReportIllegal = new PdmReportIllegalWeek();
-        pdmReportIllegal.setReportDate(startDate);
-        pdmReportIllegal.setReportEndDate(endDate);
-        List<PdmReportIllegalWeek> illegalList = pdmReportIllegalWeekService.selectPdmReportIllegalWeekList(pdmReportIllegal);
-        PdmReportAppointmentWeek pdmReportAppointment = new PdmReportAppointmentWeek();
-        pdmReportAppointment.setReportDate(startDate);
-        pdmReportAppointment.setReportEndDate(endDate);
-        List<PdmReportAppointmentWeek> appointmentlist = pdmReportAppointmentWeekService.selectPdmReportAppointmentWeekList(pdmReportAppointment);
-        PdmReportPlanWeek pdmReportPlan = new PdmReportPlanWeek();
-        pdmReportPlan.setReportDate(startDate);
-        pdmReportPlan.setReportEndDate(endDate);
-        List<PdmReportPlanWeek> planlist = pdmReportPlanWeekService.selectPdmReportPlanWeekList(pdmReportPlan);
-        PdmReportPlanNextWeek next = new PdmReportPlanNextWeek();
-        next.setReportDate(DateUtils.getNextMonday(startDate,DateUtils.YYYYMMDD));
-        List<PdmReportPlanNextWeek> nextList = pdmReportPlanNextWeekService.selectPdmReportPlanNextWeekList(next);
+        PdmReportIllegalDay pdmReportIllegal = new PdmReportIllegalDay();
+        pdmReportIllegal.setStartDate(startDate);
+        pdmReportIllegal.setEndDate(endDate);
+        List<PdmReportIllegalDay> illegalList = pdmReportIllegalDayService.selectIllegalReport(pdmReportIllegal);
+        PdmReportAppointmentDay pdmReportAppointmentDay = new PdmReportAppointmentDay();
+        pdmReportAppointmentDay.setStartDate(startDate);
+        pdmReportAppointmentDay.setEndDate(endDate);
+        List<PdmReportAppointmentDay> appointmentlist = pdmReportAppointmentDayService.selectAppointmentReport(pdmReportAppointmentDay);
+        PdmReportPlanDay pdmReportPlanDay = new PdmReportPlanDay();
+        pdmReportPlanDay.setStartDate(startDate);
+        pdmReportPlanDay.setEndDate(endDate);
+        List<PdmReportPlanDay> planlist = pdmReportPlanDayService.selectPlanReport(pdmReportPlanDay);
+
+        PdmReportPlanNextDay nextDay = new PdmReportPlanNextDay();
+        nextDay.setStartDate(DateUtils.getNextMonday(startDate,DateUtils.YYYYMMDD));
+        nextDay.setEndDate(DateUtils.getNextSunday(startDate,DateUtils.YYYYMMDD));
+        List<PdmReportPlanNextDay> nextList = pdmReportPlanNextDayService.selectReportPlanNext(nextDay);
+
         PdmWorkPlanDTO workPlan = new PdmWorkPlanDTO();
         workPlan.setStartDate(DateUtils.getNextMonday(startDate,DateUtils.YYYYMMDD));
         workPlan.setEndDate(DateUtils.getNextSunday(endDate,DateUtils.YYYYMMDD));
@@ -172,10 +177,10 @@ public class ReportController extends BaseController {
     @PostMapping("/weekExport")
     @ApiOperation(value = "周报导出")
     public void weekExport(HttpServletResponse response,String startDate,String endDate) throws IOException {
-        PdmReportIllegalWeek pdmReportIllegal = new PdmReportIllegalWeek();
-        pdmReportIllegal.setReportDate(startDate);
-        pdmReportIllegal.setReportEndDate(endDate);
-        List<PdmReportIllegalWeek> illegalList = pdmReportIllegalWeekService.selectPdmReportIllegalWeekList(pdmReportIllegal);
+        PdmReportIllegalDay pdmReportIllegal = new PdmReportIllegalDay();
+        pdmReportIllegal.setStartDate(startDate);
+        pdmReportIllegal.setEndDate(endDate);
+        List<PdmReportIllegalDay> illegalList = pdmReportIllegalDayService.selectIllegalReport(pdmReportIllegal);
         PdmReportAppointmentWeek pdmReportAppointment = new PdmReportAppointmentWeek();
         pdmReportAppointment.setReportDate(startDate);
         pdmReportAppointment.setReportEndDate(endDate);

+ 31 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportAppointmentDay.java

@@ -54,6 +54,37 @@ public class PdmReportAppointmentDay extends BaseEntity
 
     private Long no;
 
+    /** 督察现场数量 三级 */
+    @Excel(name = "督察现场数量 三级")
+    private Integer checkNum3;
+
+    /** 督察现场数量 四级 */
+    @Excel(name = "督察现场数量 四级")
+    private Integer checkNum4;
+
+    /** 督察现场数量 五级 */
+    @Excel(name = "督察现场数量 五级")
+    private Integer checkNum5;
+
+    /** 问题数量 */
+    @Excel(name = "问题数量")
+    private Integer problemSum;
+
+    /** 市公司查处问题数 */
+    @Excel(name = "市公司查处问题数")
+    private Integer cityCheckSum;
+
+    /**
+     * 查询-开始时间
+     */
+    private String startDate;
+
+    /**
+     * 查询-结束时间
+     */
+    private String endDate;
+
+
     public void setId(Long id)
     {
         this.id = id;

+ 1 - 1
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportIllegalDay.java

@@ -9,7 +9,7 @@ import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
- * 违章日统计对象 pdm_report_illegal_day
+ * 违章日(周) 统计对象 pdm_report_illegal_day
  *
  * @author ruoyi
  * @date 2024-11-28

+ 1 - 1
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportIllegalWeek.java

@@ -6,7 +6,7 @@ import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
- * 违章周统计对象 pdm_report_illegal_week
+ * 违章周统计对象 pdm_report_illegal_week  作废
  *
  * @author ruoyi
  * @date 2024-11-29

+ 10 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportPlanDay.java

@@ -62,6 +62,16 @@ public class PdmReportPlanDay extends BaseEntity
 
     private Long no;
 
+    /**
+     * 查询-开始时间
+     */
+    private String startDate;
+
+    /**
+     * 查询-结束时间
+     */
+    private String endDate;
+
     public void setId(Long id)
     {
         this.id = id;

+ 10 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportPlanNextDay.java

@@ -78,6 +78,16 @@ public class PdmReportPlanNextDay extends BaseEntity
 
     private Long no;
 
+    /**
+     * 查询-开始时间
+     */
+    private String startDate;
+
+    /**
+     * 查询-结束时间
+     */
+    private String endDate;
+
     public void setId(Long id)
     {
         this.id = id;

+ 1 - 1
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmReportPlanWeek.java

@@ -6,7 +6,7 @@ import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
- * 工作计划完成情况周统计对象 pdm_report_plan_week
+ * 工作计划完成情况周统计对象 pdm_report_plan_week 作废
  *
  * @author ruoyi
  * @date 2024-11-29

+ 4 - 4
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmStopRecords.java

@@ -42,13 +42,13 @@ public class PdmStopRecords extends BaseEntity
     private BigDecimal dutyDeptRespRatio;
 
     /** 停电起始时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "停电起始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "停电起始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date poweroffStartTm;
 
     /** 停电终止时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "停电终止时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "停电终止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date poweroffTermTm;
 
     /** 停电持续时间(单位:h) */

+ 12 - 12
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/vo/ReportDayWeek.java

@@ -12,57 +12,57 @@ public class ReportDayWeek {
     /**
      * 履职统计
      */
-    private List<PdmReportAppointmentWeek> appointmentList;
+    private List<PdmReportAppointmentDay> appointmentList;
 
     /**
      * 违章统计
      */
-    private List<PdmReportIllegalWeek> illegalList;
+    private List<PdmReportIllegalDay> illegalList;
 
     /**
      * 工作计划统计
      */
-    private List<PdmReportPlanWeek> planList;
+    private List<PdmReportPlanDay> planList;
 
     /**
      * 下周工作计划统计
      */
-    private List<PdmReportPlanNextWeek> nextList;
+    private List<PdmReportPlanNextDay> nextList;
 
     /**
      * 三级作业计划列表
      */
     private List<PdmWorkPlan> workList;
 
-    public List<PdmReportAppointmentWeek> getAppointmentList() {
+    public List<PdmReportAppointmentDay> getAppointmentList() {
         return appointmentList;
     }
 
-    public void setAppointmentList(List<PdmReportAppointmentWeek> appointmentList) {
+    public void setAppointmentList(List<PdmReportAppointmentDay> appointmentList) {
         this.appointmentList = appointmentList;
     }
 
-    public List<PdmReportIllegalWeek> getIllegalList() {
+    public List<PdmReportIllegalDay> getIllegalList() {
         return illegalList;
     }
 
-    public void setIllegalList(List<PdmReportIllegalWeek> illegalList) {
+    public void setIllegalList(List<PdmReportIllegalDay> illegalList) {
         this.illegalList = illegalList;
     }
 
-    public List<PdmReportPlanWeek> getPlanList() {
+    public List<PdmReportPlanDay> getPlanList() {
         return planList;
     }
 
-    public void setPlanList(List<PdmReportPlanWeek> planList) {
+    public void setPlanList(List<PdmReportPlanDay> planList) {
         this.planList = planList;
     }
 
-    public List<PdmReportPlanNextWeek> getNextList() {
+    public List<PdmReportPlanNextDay> getNextList() {
         return nextList;
     }
 
-    public void setNextList(List<PdmReportPlanNextWeek> nextList) {
+    public void setNextList(List<PdmReportPlanNextDay> nextList) {
         this.nextList = nextList;
     }
 

+ 7 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmReportAppointmentDayMapper.java

@@ -58,4 +58,11 @@ public interface PdmReportAppointmentDayMapper
      * @return 结果
      */
     public int deletePdmReportAppointmentDayByIds(Long[] ids);
+
+    /**
+     * 统计履职情况
+     * @param pdmReportAppointmentDay
+     * @return
+     */
+    List<PdmReportAppointmentDay> selectAppointmentReport(PdmReportAppointmentDay pdmReportAppointmentDay);
 }

+ 7 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmReportIllegalDayMapper.java

@@ -58,4 +58,11 @@ public interface PdmReportIllegalDayMapper
      * @return 结果
      */
     public int deletePdmReportIllegalDayByIds(Long[] ids);
+
+    /**
+     * 查询违章统计
+     * @param pdmReportIllegalDay
+     * @return
+     */
+    List<PdmReportIllegalDay> selectIllegalReport(PdmReportIllegalDay pdmReportIllegalDay);
 }

+ 7 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmReportPlanDayMapper.java

@@ -58,4 +58,11 @@ public interface PdmReportPlanDayMapper
      * @return 结果
      */
     public int deletePdmReportPlanDayByIds(Long[] ids);
+
+    /**
+     * 作业数据统计
+     * @param pdmReportPlanDay
+     * @return
+     */
+    List<PdmReportPlanDay> selectPlanReport(PdmReportPlanDay pdmReportPlanDay);
 }

+ 7 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmReportPlanNextDayMapper.java

@@ -58,4 +58,11 @@ public interface PdmReportPlanNextDayMapper
      * @return 结果
      */
     public int deletePdmReportPlanNextDayByIds(Long[] ids);
+
+    /**
+     * 下个周期作业计划统计
+     * @param pdmReportPlanNextDay
+     * @return
+     */
+    List<PdmReportPlanNextDay> selectReportPlanNext(PdmReportPlanNextDay pdmReportPlanNextDay);
 }

+ 7 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmReportAppointmentDayService.java

@@ -58,4 +58,11 @@ public interface IPdmReportAppointmentDayService
      * @return 结果
      */
     public int deletePdmReportAppointmentDayById(Long id);
+
+    /**
+     * 统计履职情况
+     * @param pdmReportAppointmentDay
+     * @return
+     */
+    List<PdmReportAppointmentDay> selectAppointmentReport(PdmReportAppointmentDay pdmReportAppointmentDay);
 }

+ 7 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmReportIllegalDayService.java

@@ -58,4 +58,11 @@ public interface IPdmReportIllegalDayService
      * @return 结果
      */
     public int deletePdmReportIllegalDayById(Long id);
+
+    /**
+     * 查询违章统计
+     * @param pdmReportIllegalDay
+     * @return
+     */
+    List<PdmReportIllegalDay> selectIllegalReport(PdmReportIllegalDay pdmReportIllegalDay);
 }

+ 7 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmReportPlanDayService.java

@@ -58,4 +58,11 @@ public interface IPdmReportPlanDayService
      * @return 结果
      */
     public int deletePdmReportPlanDayById(Long id);
+
+    /**
+     * 作业数据统计
+     * @param pdmReportPlanDay
+     * @return
+     */
+    List<PdmReportPlanDay> selectPlanReport(PdmReportPlanDay pdmReportPlanDay);
 }

+ 7 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmReportPlanNextDayService.java

@@ -58,4 +58,11 @@ public interface IPdmReportPlanNextDayService
      * @return 结果
      */
     public int deletePdmReportPlanNextDayById(Long id);
+
+    /**
+     * 下个周期作业计划统计
+     * @param pdmReportPlanNextDay
+     * @return
+     */
+    List<PdmReportPlanNextDay> selectReportPlanNext(PdmReportPlanNextDay pdmReportPlanNextDay);
 }

+ 5 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmReportAppointmentDayServiceImpl.java

@@ -93,4 +93,9 @@ public class PdmReportAppointmentDayServiceImpl implements IPdmReportAppointment
     {
         return pdmReportAppointmentDayMapper.deletePdmReportAppointmentDayById(id);
     }
+
+    @Override
+    public List<PdmReportAppointmentDay> selectAppointmentReport(PdmReportAppointmentDay pdmReportAppointmentDay) {
+        return pdmReportAppointmentDayMapper.selectAppointmentReport(pdmReportAppointmentDay);
+    }
 }

+ 5 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmReportIllegalDayServiceImpl.java

@@ -93,4 +93,9 @@ public class PdmReportIllegalDayServiceImpl implements IPdmReportIllegalDayServi
     {
         return pdmReportIllegalDayMapper.deletePdmReportIllegalDayById(id);
     }
+
+    @Override
+    public List<PdmReportIllegalDay> selectIllegalReport(PdmReportIllegalDay pdmReportIllegalDay) {
+        return pdmReportIllegalDayMapper.selectIllegalReport(pdmReportIllegalDay);
+    }
 }

+ 5 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmReportPlanDayServiceImpl.java

@@ -93,4 +93,9 @@ public class PdmReportPlanDayServiceImpl implements IPdmReportPlanDayService
     {
         return pdmReportPlanDayMapper.deletePdmReportPlanDayById(id);
     }
+
+    @Override
+    public List<PdmReportPlanDay> selectPlanReport(PdmReportPlanDay pdmReportPlanDay) {
+        return pdmReportPlanDayMapper.selectPlanReport(pdmReportPlanDay);
+    }
 }

+ 5 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmReportPlanNextDayServiceImpl.java

@@ -93,4 +93,9 @@ public class PdmReportPlanNextDayServiceImpl implements IPdmReportPlanNextDaySer
     {
         return pdmReportPlanNextDayMapper.deletePdmReportPlanNextDayById(id);
     }
+
+    @Override
+    public List<PdmReportPlanNextDay> selectReportPlanNext(PdmReportPlanNextDay pdmReportPlanNextDay) {
+        return pdmReportPlanNextDayMapper.selectReportPlanNext(pdmReportPlanNextDay);
+    }
 }

+ 101 - 0
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportAppointmentDayMapper.xml

@@ -132,4 +132,105 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="selectAppointmentReport" parameterType="PdmReportAppointmentDay" resultMap="PdmReportAppointmentDayResult">
+
+        select t1.organ_abbr company,
+        IFNULL(tt1.boss_sum,0) boss_sum,
+        IFNULL(tt1.manage_sum,0) manage_sum,
+        IFNULL(tt1.absent_sum,0) absent_sum,
+        IFNULL(tt2.absent_detail,'') absent_detail,
+        IFNULL(tt3.absent_bad_sum,0) absent_bad_sum,
+        IFNULL(tt3.absent_bad_detail,'') absent_bad_detail,
+        IFNULL(tt4.check_num3,'') check_num3,
+        IFNULL(tt4.check_num4,'') check_num4,
+        IFNULL(tt4.check_num5,'') check_num5,
+        IFNULL(tt4.problem_sum,'') problem_sum,
+        IFNULL(tt4.city_check_sum,'') city_check_sum
+        from pdm_work_organ t1
+        LEFT JOIN (
+        select
+        sum(if((to_post_in_place_person_typ_cd in ('2035002','2035004') and is_in_place = '1'),1,0)) boss_sum,
+        sum(if((to_post_in_place_person_typ_cd in ('2035003','2035003') and is_in_place = '1'),1,0)) manage_sum,
+        sum(if(is_in_place = '0',1,0)) absent_sum,
+        op_org_nm
+        from pdm_work_plan_in_place
+        where data_dt &gt;= #{startDate} and data_dt &lt;= #{endDate}
+        GROUP BY op_org_nm
+        ) tt1 on t1.organ_name = tt1.op_org_nm
+
+        LEFT JOIN(
+        select op_org_nm,
+        GROUP_CONCAT(to_post_in_place_person_nm,';') AS absent_detail FROM
+        pdm_work_plan_in_place where is_in_place = '0'
+        and data_dt &gt;= #{startDate} and data_dt &lt;= #{endDate}
+        GROUP BY op_org_nm
+        ) tt2 on t1.organ_name = tt2.op_org_nm
+
+        LEFT JOIN(
+        select sum(1) absent_bad_sum,
+        GROUP_CONCAT(t1.to_post_in_place_person_nm,';') AS absent_bad_detail,
+        submit_org_nm
+        from  pdm_work_plan_in_place t1,pdm_work_plan t2 where
+        t2.uuid = t1.relation_id and t1.is_safe_resumption = '0'
+        and EXISTS(select 1 from pdm_inspection_records t3 where t3.day_op_info_id = t2.uuid and t3.scene_rating_cd!='2018002')
+        and t2.data_dt >= #{startDate} and t2.data_dt &lt;= #{endDate}
+        GROUP BY submit_org_nm
+        )tt3 on t1.organ_name = tt3.submit_org_nm
+        LEFT JOIN(
+        select
+        sum(if(op_risk_cd ='2007003' ,1,0)) check_num3,
+        sum(if(op_risk_cd ='2007004' ,1,0)) check_num4,
+        sum(if(op_risk_cd ='2007005' ,1,0)) check_num5,
+        sum(if(scene_rating_cd !='2018002',1,0)) problem_sum,
+        sum(if(scene_rating_cd !='2018002' and audit_lvl_cd = '2025002',1,0)) city_check_sum,
+        op_org
+        from pdm_inspection_records
+        where
+        data_dt &gt;= #{startDate} and data_dt &lt;= #{endDate}
+        GROUP BY op_org
+        )tt4 on t1.organ_name = tt4.op_org
+
+        UNION ALL
+        select '总计' company,
+        IFNULL(ttt1.boss_sum,0) boss_sum,
+        IFNULL(ttt1.manage_sum,0) manage_sum,
+        IFNULL(ttt1.absent_sum,0) absent_sum,
+        '' absent_detail,
+        IFNULL(ttt2.absent_bad_sum,0) absent_bad_sum,
+        '' absent_bad_detail,
+        IFNULL(ttt3.check_num3,0) check_num3,
+        IFNULL(ttt3.check_num4,0) check_num4,
+        IFNULL(ttt3.check_num5,0) check_num5,
+        IFNULL(ttt3.problem_sum,0) problem_sum,
+        IFNULL(ttt3.city_check_sum,0) city_check_sum
+        from (
+        (select
+        sum(if((to_post_in_place_person_typ_cd in ('2035002','2035004') and is_in_place = '1'),1,0)) boss_sum,
+        sum(if((to_post_in_place_person_typ_cd in ('2035003','2035003') and is_in_place = '1'),1,0)) manage_sum,
+        sum(if(is_in_place = '0',1,0)) absent_sum,
+        op_org_nm
+        from pdm_work_plan_in_place
+        where data_dt &gt;= #{startDate} and data_dt &lt;= #{endDate}
+        ) ttt1,
+        (select sum(1) absent_bad_sum,
+        GROUP_CONCAT(to1.to_post_in_place_person_nm,';') AS absent_bad_detail
+        from  pdm_work_plan_in_place to1,pdm_work_plan to2 where
+        to2.uuid = to1.relation_id and to1.is_safe_resumption = '0'
+        and EXISTS(select 1 from pdm_inspection_records to3 where to3.day_op_info_id = to2.uuid and to3.scene_rating_cd!='2018002')
+        and to2.data_dt &gt;= #{startDate} and to2.data_dt &lt;= #{endDate}
+        )ttt2,
+        (select
+        sum(if(op_risk_cd ='2007003' ,1,0)) check_num3,
+        sum(if(op_risk_cd ='2007004' ,1,0)) check_num4,
+        sum(if(op_risk_cd ='2007005' ,1,0)) check_num5,
+        sum(if(scene_rating_cd !='2018002',1,0)) problem_sum,
+        sum(if(scene_rating_cd !='2018002' and audit_lvl_cd = '2025002',1,0)) city_check_sum
+        from pdm_inspection_records
+        where data_dt &gt;= #{startDate} and data_dt &lt;= #{endDate}
+        ) ttt3
+        )
+
+    </select>
+
 </mapper>

+ 11 - 1
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportIllegalDayMapper.xml

@@ -163,7 +163,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         and t2.data_dt  &gt;= #{startDate} and t2.data_dt &lt;= #{endDate}
         GROUP BY t3.op_org
         ) t on t1.organ_name = t.op_org
-
+        UNION ALL
+        select '总计' company,
+        IFNULL(sum(if((t3.audit_lvl_cd='2025001' and t2.break_rules_nature_cd = '2020002'),1,0)),0) province_num1,
+        IFNULL(sum(if((t3.audit_lvl_cd='2025001' and t2.break_rules_nature_cd = '2020001'),1,0)),0) province_num2,
+        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
+        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}
     </select>
 
 </mapper>

+ 41 - 0
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportPlanDayMapper.xml

@@ -146,4 +146,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="selectPlanReport" parameterType="PdmReportPlanDay" resultMap="PdmReportPlanDayResult">
+        select t1.organ_abbr company,
+        IFNULL(t.total,0) total,
+        IFNULL(t.week_sum,0) week_sum,
+        IFNULL(t.week_cancel_sum,0) week_cancel_sum,
+        IFNULL(CONCAT(round((IFNULL(t.week_sum,0)-IFNULL(t.week_cancel_sum,0))/IFNULL(t.week_sum,0)*100,2),'%'),'100%') week_ratio,
+        IFNULL(t.temporary_sum,0) temporary_sum,
+        IFNULL(t.temporary_cancel_sum,0) temporary_cancel_sum,
+        IFNULL(CONCAT(round((IFNULL(t.temporary_sum,0)-IFNULL(t.temporary_cancel_sum,0))/IFNULL(t.temporary_sum,0)*100,2),'%'),'100%') temporary_ratio,
+        IFNULL(CONCAT(round(IFNULL(t.temporary_sum,0)/IFNULL(t.total,0)*100,2),'%'),'100%') temporary_plan_ratio
+        from pdm_work_organ t1
+        LEFT JOIN
+        (
+        SELECT
+        sum(1) total,
+        sum(if(plan_typ_cd = '2028001',1,0)) week_sum,
+        sum(if((plan_typ_cd = '2028001' and plan_exec_st_cd = '2029005'),1,0)) week_cancel_sum,
+        sum(if(plan_typ_cd = '2028002',1,0)) temporary_sum,
+        sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd = '2029005'),1,0)) temporary_cancel_sum,
+        submit_org_nm
+        from
+        pdm_work_plan
+        where data_dt  &gt;= #{startDate} and data_dt &lt;= #{endDate}
+        GROUP BY submit_org_nm
+        ) t on t1.organ_name = t.submit_org_nm
+        UNION ALL
+        SELECT '总计' company,
+        sum(1) total,
+        sum(if(plan_typ_cd = '2028001',1,0)) week_sum,
+        sum(if((plan_typ_cd = '2028001' and plan_exec_st_cd = '2029005'),1,0)) week_cancel_sum,
+        IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028001' and plan_exec_st_cd != '2029005'),1,0))/sum(if(plan_typ_cd = '2028001',1,0))*100,2),'%'),'100%')  week_ratio,
+        sum(if(plan_typ_cd = '2028002',1,0)) temporary_sum,
+        sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd = '2029005'),1,0)) temporary_cancel_sum,
+        IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd != '2029005'),1,0))/sum(if(plan_typ_cd = '2028002',1,0))*100,2),'%'),'100%')  temporary_ratio,
+        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}
+
+    </select>
 </mapper>

+ 66 - 0
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportPlanNextDayMapper.xml

@@ -175,4 +175,70 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="selectReportPlanNext" parameterType="PdmReportPlanNextDay" resultMap="PdmReportPlanNextDayResult">
+        select t1.organ_abbr company,
+               IFNULL(tt1.work_total,0) work_total,
+               IFNULL(tt1.work_type1_sum,0) work_type1_sum,
+               IFNULL(tt1.work_type2_sum,0) work_type2_sum,
+               IFNULL(tt1.work_type3_sum,0) work_type3_sum,
+               IFNULL(tt1.work_type4_sum,0) work_type4_sum,
+               IFNULL(tt1.work_type5_sum,0) work_type5_sum,
+               IFNULL(tt1.temporary_plan_sum,0) temporary_plan_sum,
+               IFNULL(tt1.ele_plan_sum,0) ele_plan_sum,
+               IFNULL(tt1.plan_leve3,0) plan_leve3,
+               IFNULL(tt1.plan_leve4,0) plan_leve4,
+               IFNULL(tt1.plan_leve5,0) plan_leve5,
+               IFNULL(tt2.check_detail,'') check_detail
+        from pdm_work_organ t1
+                 LEFT JOIN(
+            select
+                sum(1) work_total,
+                sum(if(op_typ_cd = '2002012',1,0)) work_type1_sum,
+                sum(if(op_typ_cd = '2002005',1,0)) work_type2_sum,
+                sum(if(op_typ_cd = '2002004',1,0)) work_type3_sum,
+                sum(if(op_typ_cd = '2002001',1,0)) work_type4_sum,
+                sum(if(op_typ_cd not in ('2002001','2002004','2002005','2002012'),1,0)) work_type5_sum,
+                sum(if(plan_typ_cd = '2028002',1,0)) temporary_plan_sum,
+                sum(if(is_energized_op_cd = '2006001',1,0)) ele_plan_sum,
+                sum(if(op_risk_lvl_cd = '2007003',1,0)) plan_leve3,
+                sum(if(op_risk_lvl_cd = '2007004',1,0)) plan_leve4,
+                sum(if(op_risk_lvl_cd = '2007005',1,0)) plan_leve5,
+                submit_org_nm
+            from
+                pdm_work_plan
+            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
+        )  tt1 on t1.organ_name = tt1.submit_org_nm
+                 LEFT JOIN(
+            select CONCAT(subs_or_line_nm,'(',count(1),'个作业面)') check_detail,
+                   submit_org_nm from
+                pdm_work_plan where volt_lvl_cd=  '2001008' and op_typ_cd != '2002001'
+             and 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,subs_or_line_nm
+            HAVING count(1) >1
+        ) tt2 on t1.organ_name = tt2.submit_org_nm
+
+        UNION ALL
+        select '总计' company,
+               IFNULL(sum(1),0) work_total,
+               IFNULL(sum(if(op_typ_cd = '2002012',1,0)),0) work_type1_sum,
+               IFNULL(sum(if(op_typ_cd = '2002005',1,0)),0) work_type2_sum,
+               IFNULL(sum(if(op_typ_cd = '2002004',1,0)),0) work_type3_sum,
+               IFNULL(sum(if(op_typ_cd = '2002001',1,0)),0) work_type4_sum,
+               IFNULL(sum(if(op_typ_cd not in ('2002001','2002004','2002005','2002012'),1,0)),0) work_type5_sum,
+               IFNULL(sum(if(plan_typ_cd = '2028002',1,0)),0) temporary_plan_sum,
+               IFNULL(sum(if(is_energized_op_cd = '2006001',1,0)),0) ele_plan_sum,
+               IFNULL(sum(if(op_risk_lvl_cd = '2007003',1,0)),0) plan_leve3,
+               IFNULL(sum(if(op_risk_lvl_cd = '2007004',1,0)),0) plan_leve4,
+               IFNULL(sum(if(op_risk_lvl_cd = '2007005',1,0)),0) plan_leve5,
+               '' check_detail
+        from
+        pdm_work_plan
+        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>

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

@@ -228,10 +228,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and op_risk_lvl_cd in ('2007001','2007002','2007003')
             </if>
             <if test="dataFlag != null and dataFlag == 1 ">
-               and exception_type != '0'
+               and exception_type not in ('0','1')
             </if>
             <if test="riskFlag != null and riskFlag == 1 ">
-                and risk_type != '0'
+                and risk_type not in ('0','1')
             </if>
         </where>
     </select>