zhaoyun 5 tháng trước cách đây
mục cha
commit
f08c96e2a2

+ 18 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmMaintenanceProcess.java

@@ -87,6 +87,24 @@ public class PdmMaintenanceProcess extends BaseEntity
     private String maintenanceFileName;
 
     private String approveFileName;
+    @Excel(name = "审批方案地址")
+    private String hourNum;
+    @Excel(name = "党政一把手考核金额")
+    private String manageAmt;
+    @Excel(name = "分管副经理")
+    private String manageAssistantAmt;
+    @Excel(name = "部室主任考核金额")
+    private String deptDirectorAmt;
+    @Excel(name = "部室分管主任考核金额")
+    private String deptDirectorAssistantAmt;
+    @Excel(name = "部室责任专责考核金额")
+    private String deptManageAmt;
+    @Excel(name = "总负责人考核金额")
+    private String principAmt;
+    @Excel(name = "工作负责人考核金额")
+    private String workPrincipAmt;
+    @Excel(name = "设备主人考核金额")
+    private String ownerAmt;
 
     @Override
     public String toString() {

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

@@ -28,14 +28,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="hourNum"    column="hour_num"    />
+        <result property="manageAmt"    column="manage_amt"    />
+        <result property="manageAssistantAmt"    column="manage_assistant_amt"    />
+        <result property="deptDirectorAmt"    column="dept_director_amt"    />
+        <result property="deptDirectorAssistantAmt"    column="dept_director_assistant_amt"    />
+        <result property="deptManageAmt"    column="dept_manage_amt"    />
+        <result property="principAmt"    column="princip_amt"    />
+        <result property="workPrincipAmt"    column="work_princip_amt"    />
+        <result property="ownerAmt"    column="owner_amt"    />
     </resultMap>
 
     <sql id="selectPdmMaintenanceProcessVo">
-        select id, plan_code,plan_code_w, power_outage_devices, per_hour_households_m, per_hour_households_w, city, county, station, line_code, line_name, per_hour_households_artif,declar_agency, is_maintenance, is_approve, maintenance_file_path,maintenance_file_name, approve_file_path,approve_file_name, create_by, create_time, update_by, update_time from pdm_maintenance_process
+        select id, plan_code,plan_code_w, power_outage_devices, per_hour_households_m, per_hour_households_w, SUBSTRING_INDEX(city, '国网湖南省电力有限公司', -1)city, SUBSTRING_INDEX(SUBSTRING_INDEX(county, '国网湖南省电力有限公司', -1),'国网衡阳供电公司',-1)county, SUBSTRING_INDEX(station, '国网湖南省电力有限公司', -1)station, line_code, line_name, per_hour_households_artif,SUBSTRING_INDEX(declar_agency, '国网衡阳供电公司', -1) declar_agency, is_maintenance, is_approve, maintenance_file_path,maintenance_file_name, approve_file_path,approve_file_name, create_by, create_time, update_by, update_time,getHourNumFun(std_org_no,week_start_dt,week_end_dt)hour_num from pdm_maintenance_process
     </sql>
 
     <select id="selectPdmMaintenanceProcessList" parameterType="PdmMaintenanceProcess" resultMap="PdmMaintenanceProcessResult">
-        <include refid="selectPdmMaintenanceProcessVo"/>
+        select a.*,d.manage_amt,d.manage_assistant_amt,d.dept_director_amt,d.dept_director_assistant_amt,d.dept_manage_amt,d.princip_amt,d.work_princip_amt,d.owner_amt from ( <include refid="selectPdmMaintenanceProcessVo"/>
+
         <where>
             <if test="planCode != null  and planCode != ''"> and plan_code like concat('%', #{planCode}, '%')</if>
             <if test="planCodeW != null  and planCodeW != ''"> and plan_code_w like concat('%', #{planCodeW}, '%')</if>
@@ -54,6 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="maintenanceFilePath != null  and maintenanceFilePath != ''"> and maintenance_file_path = #{maintenanceFilePath}</if>
             <if test="approveFilePath != null  and approveFilePath != ''"> and approve_file_path = #{approveFilePath}</if>
         </where>
+        GROUP BY line_code,std_city_org_no,std_county_org_no,std_org_no)a LEFT JOIN pdm_examine_role_target t
+        on ifnull(a.hour_num,0) &gt;= t.min_num and ifnull(a.hour_num,0) &lt;= t.max_num
+        LEFT JOIN pdm_examine_role_detail  d on t.id=d.target_id and  ifnull(a.hour_num,0)&gt;= d.min_num and ifnull(a.hour_num,0) &lt;= d.max_num
     </select>
 
     <select id="selectPdmMaintenanceProcessById" parameterType="Long" resultMap="PdmMaintenanceProcessResult">