Sfoglia il codice sorgente

首页接口提交

zx 5 mesi fa
parent
commit
1005a9f16b

+ 21 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/controller/PdmWorkPlanController.java

@@ -4,6 +4,8 @@ import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.powerdistribution.domain.dto.PdmWorkPlanDTO;
+import com.ruoyi.powerdistribution.domain.vo.WorkNumByCompanyStatistics;
+import com.ruoyi.powerdistribution.domain.vo.WorkRiskStatistics;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -106,4 +108,23 @@ public class PdmWorkPlanController extends BaseController
     {
         return toAjax(pdmWorkPlanService.deletePdmWorkPlanByIds(ids));
     }
+
+    /**
+     * 查询风险汇总-日
+     */
+    @ApiOperation(value = "查询风险汇总-日")
+    @GetMapping("/getWorkRiskStatistics")
+    public List<WorkRiskStatistics> getWorkRiskStatistics(String date)
+    {
+        return pdmWorkPlanService.getWorkRiskStatistics(date);
+    }
+
+    /**
+     * 根据作业单位分类查询作业数量汇总
+     */
+    @ApiOperation(value = "根据作业单位分类查询作业数量汇总")
+    @GetMapping("/getWorkNumStatistics")
+    public List<WorkNumByCompanyStatistics> getWorkRiskStatistics(WorkNumByCompanyStatistics workNumByCompany){
+        return pdmWorkPlanService.getWorkNumByCompanyStatistics(workNumByCompany);
+    }
 }

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

@@ -66,6 +66,16 @@ public class PdmReportIllegalDay extends BaseEntity
 
     private Long no;
 
+    /**
+     * 查询-开始时间
+     */
+    private String startDate;
+
+    /**
+     * 查询-结束时间
+     */
+    private String endDate;
+
     public void setId(Long id)
     {
         this.id = id;
@@ -157,6 +167,30 @@ public class PdmReportIllegalDay extends BaseEntity
         return checkNum;
     }
 
+    public Long getNo() {
+        return no;
+    }
+
+    public void setNo(Long no) {
+        this.no = no;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 65 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/vo/StopTargetAndRecords.java

@@ -24,6 +24,22 @@ public class StopTargetAndRecords extends PdmStopTarge {
     private BigDecimal errorStopTotalActual;
 
     /**
+     * 实际停电总执行率
+     */
+    private String stopTotalRatio;
+
+    /**
+     * 计划停电总执行率
+     */
+    private String planStopTotalRatio;
+
+    /**
+     * 故障停电总时长执行率
+     */
+    private String errorStopTotalRatio;
+
+
+    /**
      * 实际停电时长-1月
      */
     private BigDecimal stopMonth01Actual;
@@ -39,6 +55,23 @@ public class StopTargetAndRecords extends PdmStopTarge {
     private BigDecimal stopMonth11Actual;
     private BigDecimal stopMonth12Actual;
 
+
+    /**
+     * 实际停电时长执行率-1月
+     */
+    private String stopMonth01Ratio;
+    private String stopMonth02Ratio;
+    private String stopMonth03Ratio;
+    private String stopMonth04Ratio;
+    private String stopMonth05Ratio;
+    private String stopMonth06Ratio;
+    private String stopMonth07Ratio;
+    private String stopMonth08Ratio;
+    private String stopMonth09Ratio;
+    private String stopMonth10Ratio;
+    private String stopMonth11Ratio;
+    private String stopMonth12Ratio;
+
     /**
      * 计划停电-1月
      */
@@ -56,6 +89,22 @@ public class StopTargetAndRecords extends PdmStopTarge {
     private BigDecimal planStopMonth12Actual;
 
     /**
+     * 计划停电执行率-1月
+     */
+    private String planStopMonth01Ratio;
+    private String planStopMonth02Ratio;
+    private String planStopMonth03Ratio;
+    private String planStopMonth04Ratio;
+    private String planStopMonth05Ratio;
+    private String planStopMonth06Ratio;
+    private String planStopMonth07Ratio;
+    private String planStopMonth08Ratio;
+    private String planStopMonth09Ratio;
+    private String planStopMonth10Ratio;
+    private String planStopMonth11Ratio;
+    private String planStopMonth12Ratio;
+
+    /**
      * 故障停电-1月
      */
     private BigDecimal errorStopMonth01Actual;
@@ -71,4 +120,20 @@ public class StopTargetAndRecords extends PdmStopTarge {
     private BigDecimal errorStopMonth11Actual;
     private BigDecimal errorStopMonth12Actual;
 
+    /**
+     * 故障停电执行率-1月
+     */
+    private String errorStopMonth01Ratio;
+    private String errorStopMonth02Ratio;
+    private String errorStopMonth03Ratio;
+    private String errorStopMonth04Ratio;
+    private String errorStopMonth05Ratio;
+    private String errorStopMonth06Ratio;
+    private String errorStopMonth07Ratio;
+    private String errorStopMonth08Ratio;
+    private String errorStopMonth09Ratio;
+    private String errorStopMonth10Ratio;
+    private String errorStopMonth11Ratio;
+    private String errorStopMonth12Ratio;
+
 }

+ 60 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/vo/WorkNumByCompanyStatistics.java

@@ -0,0 +1,60 @@
+package com.ruoyi.powerdistribution.domain.vo;
+
+/**
+ * 作业数量统计
+ */
+public class WorkNumByCompanyStatistics {
+
+    /**
+     * 作业单位
+     */
+    private String submitOrgNm;
+
+    /**
+     * 作业数量
+     */
+    private Long workNum;
+
+
+    /**
+     * 查询开始时间
+     */
+    private String startDate;
+
+    /**
+     * 查询结束时间
+     */
+    private String endDate;
+
+    public String getSubmitOrgNm() {
+        return submitOrgNm;
+    }
+
+    public void setSubmitOrgNm(String submitOrgNm) {
+        this.submitOrgNm = submitOrgNm;
+    }
+
+    public Long getWorkNum() {
+        return workNum;
+    }
+
+    public void setWorkNum(Long workNum) {
+        this.workNum = workNum;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+}

+ 47 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/vo/WorkRiskStatistics.java

@@ -0,0 +1,47 @@
+package com.ruoyi.powerdistribution.domain.vo;
+
+/**
+ * 风险作业统计
+ */
+public class WorkRiskStatistics {
+
+    /**
+     * 作业单位
+     */
+    private String submitOrgNm;
+
+    /**
+     * 风险类型名称
+     */
+    private String riskName;
+
+    /**
+     * 风险数量
+     */
+    private Long riskNum;
+
+
+    public String getSubmitOrgNm() {
+        return submitOrgNm;
+    }
+
+    public void setSubmitOrgNm(String submitOrgNm) {
+        this.submitOrgNm = submitOrgNm;
+    }
+
+    public String getRiskName() {
+        return riskName;
+    }
+
+    public void setRiskName(String riskName) {
+        this.riskName = riskName;
+    }
+
+    public Long getRiskNum() {
+        return riskNum;
+    }
+
+    public void setRiskNum(Long riskNum) {
+        this.riskNum = riskNum;
+    }
+}

+ 18 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmWorkPlanMapper.java

@@ -3,6 +3,8 @@ package com.ruoyi.powerdistribution.mapper;
 import java.util.List;
 import com.ruoyi.powerdistribution.domain.PdmWorkPlan;
 import com.ruoyi.powerdistribution.domain.dto.PdmWorkPlanDTO;
+import com.ruoyi.powerdistribution.domain.vo.WorkNumByCompanyStatistics;
+import com.ruoyi.powerdistribution.domain.vo.WorkRiskStatistics;
 
 /**
  * 作业计划Mapper接口
@@ -59,4 +61,20 @@ public interface PdmWorkPlanMapper
      * @return 结果
      */
     public int deletePdmWorkPlanByIds(Long[] ids);
+
+    /**
+     * 查询风险汇总
+     * @param date
+     * @return
+     */
+    List<WorkRiskStatistics> getWorkRiskStatistics(String date);
+
+    /**
+     * 根据作业单位分类查询作业数量汇总
+     * @param workNumByCompany
+     * @return
+     */
+    List<WorkNumByCompanyStatistics> getWorkNumByCompanyStatistics(WorkNumByCompanyStatistics workNumByCompany);
+
+
 }

+ 17 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmWorkPlanService.java

@@ -3,6 +3,8 @@ package com.ruoyi.powerdistribution.service;
 import java.util.List;
 import com.ruoyi.powerdistribution.domain.PdmWorkPlan;
 import com.ruoyi.powerdistribution.domain.dto.PdmWorkPlanDTO;
+import com.ruoyi.powerdistribution.domain.vo.WorkNumByCompanyStatistics;
+import com.ruoyi.powerdistribution.domain.vo.WorkRiskStatistics;
 
 /**
  * 作业计划Service接口
@@ -59,4 +61,19 @@ public interface IPdmWorkPlanService
      * @return 结果
      */
     public int deletePdmWorkPlanById(Long id);
+
+    /**
+     * 查询风险汇总
+     * @param date
+     * @return
+     */
+    List<WorkRiskStatistics> getWorkRiskStatistics(String date);
+
+    /**
+     * 根据作业单位分类查询作业数量汇总
+     * @param workNumByCompany
+     * @return
+     */
+    List<WorkNumByCompanyStatistics> getWorkNumByCompanyStatistics(WorkNumByCompanyStatistics workNumByCompany);
+
 }

+ 12 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmWorkPlanServiceImpl.java

@@ -3,6 +3,8 @@ package com.ruoyi.powerdistribution.service.impl;
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.powerdistribution.domain.dto.PdmWorkPlanDTO;
+import com.ruoyi.powerdistribution.domain.vo.WorkNumByCompanyStatistics;
+import com.ruoyi.powerdistribution.domain.vo.WorkRiskStatistics;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.powerdistribution.mapper.PdmWorkPlanMapper;
@@ -94,4 +96,14 @@ public class PdmWorkPlanServiceImpl implements IPdmWorkPlanService
     {
         return pdmWorkPlanMapper.deletePdmWorkPlanById(id);
     }
+
+    @Override
+    public List<WorkRiskStatistics> getWorkRiskStatistics(String date) {
+        return pdmWorkPlanMapper.getWorkRiskStatistics(date);
+    }
+
+    @Override
+    public List<WorkNumByCompanyStatistics> getWorkNumByCompanyStatistics(WorkNumByCompanyStatistics workNumByCompany) {
+        return pdmWorkPlanMapper.getWorkNumByCompanyStatistics(workNumByCompany);
+    }
 }

+ 24 - 0
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportIllegalDayMapper.xml

@@ -138,4 +138,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="selectIllegalReport" parameterType="PdmReportIllegalDay" resultMap="PdmReportIllegalDayResult">
+        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
+        from pdm_work_organ t1
+        LEFT JOIN
+        (
+        select
+        sum(if((t3.audit_lvl_cd='2025001' and t2.break_rules_nature_cd = '2020002'),1,0)) province_num1,
+        sum(if((t3.audit_lvl_cd='2025001' and t2.break_rules_nature_cd = '2020001'),1,0)) province_num2,
+        sum(if((t3.audit_lvl_cd='2025002' and t2.break_rules_nature_cd = '2020002'),1,0)) city_num1,
+        sum(if((t3.audit_lvl_cd='2025002' and t2.break_rules_nature_cd = '2020001'),1,0)) city_num2,
+        sum(if((t3.audit_lvl_cd='2025003' and t2.break_rules_nature_cd = '2020002'),1,0)) county_num1,
+        sum(if((t3.audit_lvl_cd='2025003' and t2.break_rules_nature_cd = '2020001'),1,0)) county_num2,
+        t3.op_org 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}
+        GROUP BY t3.op_org
+        ) t on t1.organ_name = t.op_org
+
+    </select>
+
 </mapper>

+ 84 - 1
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmStopTargeMapper.xml

@@ -301,7 +301,90 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <select id="selectTargetAndActual" parameterType="java.lang.String" resultType="com.ruoyi.powerdistribution.domain.vo.StopTargetAndRecords">
-        select * from pdm_stop_targe t1
+        select t1.*,
+               t2.stop_total_actual,
+               CONCAT(round(ifnull(t2.stop_total_actual,0)/t1.stop_time_total*100,2),'%')  stop_total_ratio,
+               t2.plan_stop_total_actual,
+               CONCAT(round(ifnull(t2.plan_stop_total_actual,0)/t1.plan_stop_time_total*100,2),'%') plan_stop_ratio,
+               t2.error_stop_total_actual,
+               CONCAT(round(ifnull(t2.error_stop_total_actual,0)/t1.error_stop_time_total*100,2),'%') error_stop_ratio,
+               ifnull(stop_month_01_actual,0) stop_month_01_actual,
+               ifnull(stop_month_02_actual,0) stop_month_02_actual,
+               ifnull(stop_month_03_actual,0) stop_month_03_actual,
+               ifnull(stop_month_04_actual,0) stop_month_04_actual,
+               ifnull(stop_month_05_actual,0) stop_month_05_actual,
+               ifnull(stop_month_06_actual,0) stop_month_06_actual,
+               ifnull(stop_month_07_actual,0) stop_month_07_actual,
+               ifnull(stop_month_08_actual,0) stop_month_08_actual,
+               ifnull(stop_month_09_actual,0) stop_month_09_actual,
+               ifnull(stop_month_10_actual,0) stop_month_10_actual,
+               ifnull(stop_month_11_actual,0) stop_month_11_actual,
+               ifnull(stop_month_12_actual,0) stop_month_12_actual,
+               CONCAT(round(ifnull(t2.stop_month_01_actual,0)/t1.stop_time_month_01*100,2),'%')  stop_month_01_ratio,
+               CONCAT(round(ifnull(t2.stop_month_02_actual,0)/t1.stop_time_month_02*100,2),'%')  stop_month_02_ratio,
+               CONCAT(round(ifnull(t2.stop_month_03_actual,0)/t1.stop_time_month_03*100,2),'%')  stop_month_03_ratio,
+               CONCAT(round(ifnull(t2.stop_month_04_actual,0)/t1.stop_time_month_04*100,2),'%')  stop_month_04_ratio,
+               CONCAT(round(ifnull(t2.stop_month_05_actual,0)/t1.stop_time_month_05*100,2),'%')  stop_month_05_ratio,
+               CONCAT(round(ifnull(t2.stop_month_06_actual,0)/t1.stop_time_month_06*100,2),'%')  stop_month_06_ratio,
+               CONCAT(round(ifnull(t2.stop_month_07_actual,0)/t1.stop_time_month_07*100,2),'%')  stop_month_07_ratio,
+               CONCAT(round(ifnull(t2.stop_month_08_actual,0)/t1.stop_time_month_08*100,2),'%')  stop_month_08_ratio,
+               CONCAT(round(ifnull(t2.stop_month_09_actual,0)/t1.stop_time_month_09*100,2),'%')  stop_month_09_ratio,
+               CONCAT(round(ifnull(t2.stop_month_10_actual,0)/t1.stop_time_month_10*100,2),'%')  stop_month_10_ratio,
+               CONCAT(round(ifnull(t2.stop_month_11_actual,0)/t1.stop_time_month_11*100,2),'%')  stop_month_11_ratio,
+               CONCAT(round(ifnull(t2.stop_month_12_actual,0)/t1.stop_time_month_12*100,2),'%')  stop_month_12_ratio,
+
+               ifnull(plan_stop_month_01_actual,0) plan_stop_month_01_actual,
+               ifnull(plan_stop_month_02_actual,0) plan_stop_month_02_actual,
+               ifnull(plan_stop_month_03_actual,0) plan_stop_month_03_actual,
+               ifnull(plan_stop_month_04_actual,0) plan_stop_month_04_actual,
+               ifnull(plan_stop_month_05_actual,0) plan_stop_month_05_actual,
+               ifnull(plan_stop_month_06_actual,0) plan_stop_month_06_actual,
+               ifnull(plan_stop_month_07_actual,0) plan_stop_month_07_actual,
+               ifnull(plan_stop_month_08_actual,0) plan_stop_month_08_actual,
+               ifnull(plan_stop_month_09_actual,0) plan_stop_month_09_actual,
+               ifnull(plan_stop_month_10_actual,0) plan_stop_month_10_actual,
+               ifnull(plan_stop_month_11_actual,0) plan_stop_month_11_actual,
+               ifnull(plan_stop_month_12_actual,0) plan_stop_month_12_actual,
+               CONCAT(round(ifnull(t2.plan_stop_month_01_actual,0)/t1.plan_stop_time_month_01*100,2),'%')  plan_stop_month_01_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_02_actual,0)/t1.plan_stop_time_month_02*100,2),'%')  plan_stop_month_02_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_03_actual,0)/t1.plan_stop_time_month_03*100,2),'%')  plan_stop_month_03_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_04_actual,0)/t1.plan_stop_time_month_04*100,2),'%')  plan_stop_month_04_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_05_actual,0)/t1.plan_stop_time_month_05*100,2),'%')  plan_stop_month_05_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_06_actual,0)/t1.plan_stop_time_month_06*100,2),'%')  plan_stop_month_06_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_07_actual,0)/t1.plan_stop_time_month_07*100,2),'%')  plan_stop_month_07_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_08_actual,0)/t1.plan_stop_time_month_08*100,2),'%')  plan_stop_month_08_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_09_actual,0)/t1.plan_stop_time_month_09*100,2),'%')  plan_stop_month_09_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_10_actual,0)/t1.plan_stop_time_month_10*100,2),'%')  plan_stop_month_10_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_11_actual,0)/t1.plan_stop_time_month_11*100,2),'%')  plan_stop_month_11_ratio,
+               CONCAT(round(ifnull(t2.plan_stop_month_12_actual,0)/t1.plan_stop_time_month_12*100,2),'%')  plan_stop_month_12_ratio,
+
+               ifnull(error_stop_month_01_actual,0) error_stop_month_01_actual,
+               ifnull(error_stop_month_02_actual,0) error_stop_month_02_actual,
+               ifnull(error_stop_month_03_actual,0) error_stop_month_03_actual,
+               ifnull(error_stop_month_04_actual,0) error_stop_month_04_actual,
+               ifnull(error_stop_month_05_actual,0) error_stop_month_05_actual,
+               ifnull(error_stop_month_06_actual,0) error_stop_month_06_actual,
+               ifnull(error_stop_month_07_actual,0) error_stop_month_07_actual,
+               ifnull(error_stop_month_08_actual,0) error_stop_month_08_actual,
+               ifnull(error_stop_month_09_actual,0) error_stop_month_09_actual,
+               ifnull(error_stop_month_10_actual,0) error_stop_month_10_actual,
+               ifnull(error_stop_month_11_actual,0) error_stop_month_11_actual,
+               ifnull(error_stop_month_12_actual,0) error_stop_month_12_actual,
+               CONCAT(round(ifnull(t2.error_stop_month_01_actual,0)/t1.error_stop_time_month_01*100,2),'%')  error_stop_month_01_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_02_actual,0)/t1.error_stop_time_month_02*100,2),'%')  error_stop_month_02_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_03_actual,0)/t1.error_stop_time_month_03*100,2),'%')  error_stop_month_03_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_04_actual,0)/t1.error_stop_time_month_04*100,2),'%')  error_stop_month_04_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_05_actual,0)/t1.error_stop_time_month_05*100,2),'%')  error_stop_month_05_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_06_actual,0)/t1.error_stop_time_month_06*100,2),'%')  error_stop_month_06_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_07_actual,0)/t1.error_stop_time_month_07*100,2),'%')  error_stop_month_07_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_08_actual,0)/t1.error_stop_time_month_08*100,2),'%')  error_stop_month_08_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_09_actual,0)/t1.error_stop_time_month_09*100,2),'%')  error_stop_month_09_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_10_actual,0)/t1.error_stop_time_month_10*100,2),'%')  error_stop_month_10_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_11_actual,0)/t1.error_stop_time_month_11*100,2),'%')  error_stop_month_11_ratio,
+               CONCAT(round(ifnull(t2.error_stop_month_12_actual,0)/t1.error_stop_time_month_12*100,2),'%')  error_stop_month_12_ratio
+
+
+        from pdm_stop_targe t1
         LEFT JOIN
         (
         select std_county_org_nm org_name ,

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

@@ -566,4 +566,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="getWorkRiskStatistics" parameterType="java.lang.String" resultType="com.ruoyi.powerdistribution.domain.vo.WorkRiskStatistics">
+        select t1.role_name risk_name,IFNULL(t2.risk_num,0) risk_num from pdm_risk_role t1
+        LEFT JOIN
+        (
+          select count(1) risk_num,risk_type from pdm_work_plan
+          where risk_type !='0'
+          and data_dt  = #{date}
+         ) t2 on t1.role_code = t2.risk_type
+    </select>
+    <select id="getWorkNumByCompanyStatistics" parameterType="com.ruoyi.powerdistribution.domain.vo.WorkNumByCompanyStatistics" resultType="com.ruoyi.powerdistribution.domain.vo.WorkNumByCompanyStatistics">
+        select t1.organ_abbr submit_org_nm,IFNULL(t2.work_num,0) work_num
+        from pdm_work_organ t1
+        LEFT JOIN
+        (
+        SELECT count(1) work_num,submit_org_nm from pdm_work_plan
+        where data_dt  &gt;= #{startDate} and data_dt &lt;= #{endDate}
+        GROUP BY submit_org_nm
+        ) t2 on t1.organ_name = t2.submit_org_nm
+    </select>
 </mapper>