zhaoyun 6 月之前
父节点
当前提交
4ae041fba8

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

@@ -1,5 +1,6 @@
 package com.ruoyi.powerdistribution.domain;
 
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -11,6 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2024-12-05
  */
+@Data
 public class PdmMaintenanceProcess extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -78,6 +80,10 @@ public class PdmMaintenanceProcess extends BaseEntity
     @Excel(name = "审批方案地址")
     private String approveFilePath;
 
+    private String maintenanceFileName;
+
+    private String approveFileName;
+
     public void setId(Long id) 
     {
         this.id = id;

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

@@ -2,6 +2,7 @@ package com.ruoyi.powerdistribution.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.powerdistribution.mapper.PdmMaintenanceProcessMapper;
@@ -67,6 +68,12 @@ public class PdmMaintenanceProcessServiceImpl implements IPdmMaintenanceProcessS
     public int updatePdmMaintenanceProcess(PdmMaintenanceProcess pdmMaintenanceProcess)
     {
         pdmMaintenanceProcess.setUpdateTime(DateUtils.getNowDate());
+        if(StringUtils.isNotEmpty(pdmMaintenanceProcess.getApproveFileName())){
+            pdmMaintenanceProcess.setIsApprove("2");
+        }
+        if(StringUtils.isNotEmpty(pdmMaintenanceProcess.getMaintenanceFileName())){
+            pdmMaintenanceProcess.setIsMaintenance("2");
+        }
         return pdmMaintenanceProcessMapper.updatePdmMaintenanceProcess(pdmMaintenanceProcess);
     }
 

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

@@ -20,7 +20,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isMaintenance"    column="is_maintenance"    />
         <result property="isApprove"    column="is_approve"    />
         <result property="maintenanceFilePath"    column="maintenance_file_path"    />
-        <result property="approveFilePath"    column="approve_file_path"    />
+        <result property="approveFilePath"    column="approve_file_name"    />
+        <result property="maintenanceFileName"    column="maintenance_file_name"    />
+        <result property="approveFileName"    column="approve_file_name"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
@@ -28,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectPdmMaintenanceProcessVo">
-        select id, plan_code, 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, approve_file_path, create_by, create_time, update_by, update_time from pdm_maintenance_process
+        select id, plan_code, 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
     </sql>
 
     <select id="selectPdmMaintenanceProcessList" parameterType="PdmMaintenanceProcess" resultMap="PdmMaintenanceProcessResult">
@@ -121,6 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isApprove != null">is_approve = #{isApprove},</if>
             <if test="maintenanceFilePath != null">maintenance_file_path = #{maintenanceFilePath},</if>
             <if test="approveFilePath != null">approve_file_path = #{approveFilePath},</if>
+            <if test="maintenanceFileName != null">maintenance_file_name = #{maintenanceFileName},</if>
+            <if test="approveFileName != null">approve_file_name = #{approveFileName},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>