Procházet zdrojové kódy

检修计划流程

zhaoyun před 6 měsíci
rodič
revize
9396c47974

+ 104 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/controller/PdmMaintenanceProcessController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.powerdistribution.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.powerdistribution.domain.PdmMaintenanceProcess;
+import com.ruoyi.powerdistribution.service.IPdmMaintenanceProcessService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 检修计划全流程管理Controller
+ * 
+ * @author ruoyi
+ * @date 2024-12-05
+ */
+@RestController
+@RequestMapping("/powerdistribution/process")
+public class PdmMaintenanceProcessController extends BaseController
+{
+    @Autowired
+    private IPdmMaintenanceProcessService pdmMaintenanceProcessService;
+
+    /**
+     * 查询检修计划全流程管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('powerdistribution:process:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(PdmMaintenanceProcess pdmMaintenanceProcess)
+    {
+        startPage();
+        List<PdmMaintenanceProcess> list = pdmMaintenanceProcessService.selectPdmMaintenanceProcessList(pdmMaintenanceProcess);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出检修计划全流程管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('powerdistribution:process:export')")
+    @Log(title = "检修计划全流程管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, PdmMaintenanceProcess pdmMaintenanceProcess)
+    {
+        List<PdmMaintenanceProcess> list = pdmMaintenanceProcessService.selectPdmMaintenanceProcessList(pdmMaintenanceProcess);
+        ExcelUtil<PdmMaintenanceProcess> util = new ExcelUtil<PdmMaintenanceProcess>(PdmMaintenanceProcess.class);
+        util.exportExcel(response, list, "检修计划全流程管理数据");
+    }
+
+    /**
+     * 获取检修计划全流程管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('powerdistribution:process:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(pdmMaintenanceProcessService.selectPdmMaintenanceProcessById(id));
+    }
+
+    /**
+     * 新增检修计划全流程管理
+     */
+    @PreAuthorize("@ss.hasPermi('powerdistribution:process:add')")
+    @Log(title = "检修计划全流程管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PdmMaintenanceProcess pdmMaintenanceProcess)
+    {
+        return toAjax(pdmMaintenanceProcessService.insertPdmMaintenanceProcess(pdmMaintenanceProcess));
+    }
+
+    /**
+     * 修改检修计划全流程管理
+     */
+    @PreAuthorize("@ss.hasPermi('powerdistribution:process:edit')")
+    @Log(title = "检修计划全流程管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody PdmMaintenanceProcess pdmMaintenanceProcess)
+    {
+        return toAjax(pdmMaintenanceProcessService.updatePdmMaintenanceProcess(pdmMaintenanceProcess));
+    }
+
+    /**
+     * 删除检修计划全流程管理
+     */
+    @PreAuthorize("@ss.hasPermi('powerdistribution:process:remove')")
+    @Log(title = "检修计划全流程管理", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(pdmMaintenanceProcessService.deletePdmMaintenanceProcessByIds(ids));
+    }
+}

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

@@ -0,0 +1,252 @@
+package com.ruoyi.powerdistribution.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 检修计划全流程管理对象 pdm_maintenance_process
+ * 
+ * @author ruoyi
+ * @date 2024-12-05
+ */
+public class PdmMaintenanceProcess extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 月计划编号 */
+    @Excel(name = "月计划编号")
+    private String planCode;
+
+    /** 月计划停电设备数 */
+    @Excel(name = "月计划停电设备数")
+    private Long powerOutageDevices;
+
+    /** 月计划时户数 */
+    @Excel(name = "月计划时户数")
+    private Long perHourHouseholdsM;
+
+    /** 周计划时户数 */
+    @Excel(name = "周计划时户数")
+    private Long perHourHouseholdsW;
+
+    /** 所属市公司 */
+    @Excel(name = "所属市公司")
+    private String city;
+
+    /** 所属县公司 */
+    @Excel(name = "所属县公司")
+    private String county;
+
+    /** 所属供电所 */
+    @Excel(name = "所属供电所")
+    private String station;
+
+    /** 线路编号 */
+    @Excel(name = "线路编号")
+    private String lineCode;
+
+    /** 线路名称 */
+    @Excel(name = "线路名称")
+    private String lineName;
+
+    /** 人工计划时户数 */
+    @Excel(name = "人工计划时户数")
+    private Long perHourHouseholdsArtif;
+
+    /** 申报单位 */
+    @Excel(name = "申报单位")
+    private String declarAgency;
+
+    /** 是否需要上传检修方案0-不需要,1-需要,2-已上传 */
+    @Excel(name = "是否需要上传检修方案0-不需要,1-需要,2-已上传")
+    private String isMaintenance;
+
+    /** 是否需要审批0-不需要,1-需要,2-已上传 */
+    @Excel(name = "是否需要审批0-不需要,1-需要,2-已上传")
+    private String isApprove;
+
+    /** 检修方案地址 */
+    @Excel(name = "检修方案地址")
+    private String maintenanceFilePath;
+
+    /** 审批方案地址 */
+    @Excel(name = "审批方案地址")
+    private String approveFilePath;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setPlanCode(String planCode) 
+    {
+        this.planCode = planCode;
+    }
+
+    public String getPlanCode() 
+    {
+        return planCode;
+    }
+    public void setPowerOutageDevices(Long powerOutageDevices) 
+    {
+        this.powerOutageDevices = powerOutageDevices;
+    }
+
+    public Long getPowerOutageDevices() 
+    {
+        return powerOutageDevices;
+    }
+    public void setPerHourHouseholdsM(Long perHourHouseholdsM) 
+    {
+        this.perHourHouseholdsM = perHourHouseholdsM;
+    }
+
+    public Long getPerHourHouseholdsM() 
+    {
+        return perHourHouseholdsM;
+    }
+    public void setPerHourHouseholdsW(Long perHourHouseholdsW) 
+    {
+        this.perHourHouseholdsW = perHourHouseholdsW;
+    }
+
+    public Long getPerHourHouseholdsW() 
+    {
+        return perHourHouseholdsW;
+    }
+    public void setCity(String city) 
+    {
+        this.city = city;
+    }
+
+    public String getCity() 
+    {
+        return city;
+    }
+    public void setCounty(String county) 
+    {
+        this.county = county;
+    }
+
+    public String getCounty() 
+    {
+        return county;
+    }
+    public void setStation(String station) 
+    {
+        this.station = station;
+    }
+
+    public String getStation() 
+    {
+        return station;
+    }
+    public void setLineCode(String lineCode) 
+    {
+        this.lineCode = lineCode;
+    }
+
+    public String getLineCode() 
+    {
+        return lineCode;
+    }
+    public void setLineName(String lineName) 
+    {
+        this.lineName = lineName;
+    }
+
+    public String getLineName() 
+    {
+        return lineName;
+    }
+    public void setPerHourHouseholdsArtif(Long perHourHouseholdsArtif) 
+    {
+        this.perHourHouseholdsArtif = perHourHouseholdsArtif;
+    }
+
+    public Long getPerHourHouseholdsArtif() 
+    {
+        return perHourHouseholdsArtif;
+    }
+    public void setDeclarAgency(String declarAgency)
+    {
+        this.declarAgency =
+declarAgency;
+    }
+
+    public String getDeclarAgency()
+    {
+        return declarAgency;
+    }
+    public void setIsMaintenance(String isMaintenance) 
+    {
+        this.isMaintenance = isMaintenance;
+    }
+
+    public String getIsMaintenance() 
+    {
+        return isMaintenance;
+    }
+    public void setIsApprove(String isApprove) 
+    {
+        this.isApprove = isApprove;
+    }
+
+    public String getIsApprove() 
+    {
+        return isApprove;
+    }
+    public void setMaintenanceFilePath(String maintenanceFilePath) 
+    {
+        this.maintenanceFilePath = maintenanceFilePath;
+    }
+
+    public String getMaintenanceFilePath() 
+    {
+        return maintenanceFilePath;
+    }
+    public void setApproveFilePath(String approveFilePath) 
+    {
+        this.approveFilePath = approveFilePath;
+    }
+
+    public String getApproveFilePath() 
+    {
+        return approveFilePath;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("planCode", getPlanCode())
+            .append("powerOutageDevices", getPowerOutageDevices())
+            .append("perHourHouseholdsM", getPerHourHouseholdsM())
+            .append("perHourHouseholdsW", getPerHourHouseholdsW())
+            .append("city", getCity())
+            .append("county", getCounty())
+            .append("station", getStation())
+            .append("lineCode", getLineCode())
+            .append("lineName", getLineName())
+            .append("perHourHouseholdsArtif", getPerHourHouseholdsArtif())
+            .append(" declarAgency", getDeclarAgency())
+            .append("isMaintenance", getIsMaintenance())
+            .append("isApprove", getIsApprove())
+            .append("maintenanceFilePath", getMaintenanceFilePath())
+            .append("approveFilePath", getApproveFilePath())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmMaintenanceProcessMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.powerdistribution.mapper;
+
+import java.util.List;
+import com.ruoyi.powerdistribution.domain.PdmMaintenanceProcess;
+
+/**
+ * 检修计划全流程管理Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-12-05
+ */
+public interface PdmMaintenanceProcessMapper 
+{
+    /**
+     * 查询检修计划全流程管理
+     * 
+     * @param id 检修计划全流程管理主键
+     * @return 检修计划全流程管理
+     */
+    public PdmMaintenanceProcess selectPdmMaintenanceProcessById(Long id);
+
+    /**
+     * 查询检修计划全流程管理列表
+     * 
+     * @param pdmMaintenanceProcess 检修计划全流程管理
+     * @return 检修计划全流程管理集合
+     */
+    public List<PdmMaintenanceProcess> selectPdmMaintenanceProcessList(PdmMaintenanceProcess pdmMaintenanceProcess);
+
+    /**
+     * 新增检修计划全流程管理
+     * 
+     * @param pdmMaintenanceProcess 检修计划全流程管理
+     * @return 结果
+     */
+    public int insertPdmMaintenanceProcess(PdmMaintenanceProcess pdmMaintenanceProcess);
+
+    /**
+     * 修改检修计划全流程管理
+     * 
+     * @param pdmMaintenanceProcess 检修计划全流程管理
+     * @return 结果
+     */
+    public int updatePdmMaintenanceProcess(PdmMaintenanceProcess pdmMaintenanceProcess);
+
+    /**
+     * 删除检修计划全流程管理
+     * 
+     * @param id 检修计划全流程管理主键
+     * @return 结果
+     */
+    public int deletePdmMaintenanceProcessById(Long id);
+
+    /**
+     * 批量删除检修计划全流程管理
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletePdmMaintenanceProcessByIds(Long[] ids);
+}

+ 61 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmMaintenanceProcessService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.powerdistribution.service;
+
+import java.util.List;
+import com.ruoyi.powerdistribution.domain.PdmMaintenanceProcess;
+
+/**
+ * 检修计划全流程管理Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-12-05
+ */
+public interface IPdmMaintenanceProcessService 
+{
+    /**
+     * 查询检修计划全流程管理
+     * 
+     * @param id 检修计划全流程管理主键
+     * @return 检修计划全流程管理
+     */
+    public PdmMaintenanceProcess selectPdmMaintenanceProcessById(Long id);
+
+    /**
+     * 查询检修计划全流程管理列表
+     * 
+     * @param pdmMaintenanceProcess 检修计划全流程管理
+     * @return 检修计划全流程管理集合
+     */
+    public List<PdmMaintenanceProcess> selectPdmMaintenanceProcessList(PdmMaintenanceProcess pdmMaintenanceProcess);
+
+    /**
+     * 新增检修计划全流程管理
+     * 
+     * @param pdmMaintenanceProcess 检修计划全流程管理
+     * @return 结果
+     */
+    public int insertPdmMaintenanceProcess(PdmMaintenanceProcess pdmMaintenanceProcess);
+
+    /**
+     * 修改检修计划全流程管理
+     * 
+     * @param pdmMaintenanceProcess 检修计划全流程管理
+     * @return 结果
+     */
+    public int updatePdmMaintenanceProcess(PdmMaintenanceProcess pdmMaintenanceProcess);
+
+    /**
+     * 批量删除检修计划全流程管理
+     * 
+     * @param ids 需要删除的检修计划全流程管理主键集合
+     * @return 结果
+     */
+    public int deletePdmMaintenanceProcessByIds(Long[] ids);
+
+    /**
+     * 删除检修计划全流程管理信息
+     * 
+     * @param id 检修计划全流程管理主键
+     * @return 结果
+     */
+    public int deletePdmMaintenanceProcessById(Long id);
+}

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

@@ -0,0 +1,96 @@
+package com.ruoyi.powerdistribution.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.powerdistribution.mapper.PdmMaintenanceProcessMapper;
+import com.ruoyi.powerdistribution.domain.PdmMaintenanceProcess;
+import com.ruoyi.powerdistribution.service.IPdmMaintenanceProcessService;
+
+/**
+ * 检修计划全流程管理Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-12-05
+ */
+@Service
+public class PdmMaintenanceProcessServiceImpl implements IPdmMaintenanceProcessService 
+{
+    @Autowired
+    private PdmMaintenanceProcessMapper pdmMaintenanceProcessMapper;
+
+    /**
+     * 查询检修计划全流程管理
+     * 
+     * @param id 检修计划全流程管理主键
+     * @return 检修计划全流程管理
+     */
+    @Override
+    public PdmMaintenanceProcess selectPdmMaintenanceProcessById(Long id)
+    {
+        return pdmMaintenanceProcessMapper.selectPdmMaintenanceProcessById(id);
+    }
+
+    /**
+     * 查询检修计划全流程管理列表
+     * 
+     * @param pdmMaintenanceProcess 检修计划全流程管理
+     * @return 检修计划全流程管理
+     */
+    @Override
+    public List<PdmMaintenanceProcess> selectPdmMaintenanceProcessList(PdmMaintenanceProcess pdmMaintenanceProcess)
+    {
+        return pdmMaintenanceProcessMapper.selectPdmMaintenanceProcessList(pdmMaintenanceProcess);
+    }
+
+    /**
+     * 新增检修计划全流程管理
+     * 
+     * @param pdmMaintenanceProcess 检修计划全流程管理
+     * @return 结果
+     */
+    @Override
+    public int insertPdmMaintenanceProcess(PdmMaintenanceProcess pdmMaintenanceProcess)
+    {
+        pdmMaintenanceProcess.setCreateTime(DateUtils.getNowDate());
+        return pdmMaintenanceProcessMapper.insertPdmMaintenanceProcess(pdmMaintenanceProcess);
+    }
+
+    /**
+     * 修改检修计划全流程管理
+     * 
+     * @param pdmMaintenanceProcess 检修计划全流程管理
+     * @return 结果
+     */
+    @Override
+    public int updatePdmMaintenanceProcess(PdmMaintenanceProcess pdmMaintenanceProcess)
+    {
+        pdmMaintenanceProcess.setUpdateTime(DateUtils.getNowDate());
+        return pdmMaintenanceProcessMapper.updatePdmMaintenanceProcess(pdmMaintenanceProcess);
+    }
+
+    /**
+     * 批量删除检修计划全流程管理
+     * 
+     * @param ids 需要删除的检修计划全流程管理主键
+     * @return 结果
+     */
+    @Override
+    public int deletePdmMaintenanceProcessByIds(Long[] ids)
+    {
+        return pdmMaintenanceProcessMapper.deletePdmMaintenanceProcessByIds(ids);
+    }
+
+    /**
+     * 删除检修计划全流程管理信息
+     * 
+     * @param id 检修计划全流程管理主键
+     * @return 结果
+     */
+    @Override
+    public int deletePdmMaintenanceProcessById(Long id)
+    {
+        return pdmMaintenanceProcessMapper.deletePdmMaintenanceProcessById(id);
+    }
+}

+ 142 - 0
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmMaintenanceProcessMapper.xml

@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.powerdistribution.mapper.PdmMaintenanceProcessMapper">
+    
+    <resultMap type="PdmMaintenanceProcess" id="PdmMaintenanceProcessResult">
+        <result property="id"    column="id"    />
+        <result property="planCode"    column="plan_code"    />
+        <result property="powerOutageDevices"    column="power_outage_devices"    />
+        <result property="perHourHouseholdsM"    column="per_hour_households_m"    />
+        <result property="perHourHouseholdsW"    column="per_hour_households_w"    />
+        <result property="city"    column="city"    />
+        <result property="county"    column="county"    />
+        <result property="station"    column="station"    />
+        <result property="lineCode"    column="line_code"    />
+        <result property="lineName"    column="line_name"    />
+        <result property="perHourHouseholdsArtif"    column="per_hour_households_artif"    />
+        <result property="declarAgency"    column="declar_agency"    />
+        <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="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </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
+    </sql>
+
+    <select id="selectPdmMaintenanceProcessList" parameterType="PdmMaintenanceProcess" resultMap="PdmMaintenanceProcessResult">
+        <include refid="selectPdmMaintenanceProcessVo"/>
+        <where>  
+            <if test="planCode != null  and planCode != ''"> and plan_code like concat('%', #{planCode}, '%')</if>
+            <if test="powerOutageDevices != null "> and power_outage_devices = #{powerOutageDevices}</if>
+            <if test="perHourHouseholdsM != null "> and per_hour_households_m = #{perHourHouseholdsM}</if>
+            <if test="perHourHouseholdsW != null "> and per_hour_households_w = #{perHourHouseholdsW}</if>
+            <if test="city != null  and city != ''"> and city = #{city}</if>
+            <if test="county != null  and county != ''"> and county like concat('%', #{county}, '%')</if>
+            <if test="station != null  and station != ''"> and station like concat('%', #{station}, '%')</if>
+            <if test="lineCode != null  and lineCode != ''"> and line_code = #{lineCode}</if>
+            <if test="lineName != null  and lineName != ''"> and line_name like concat('%', #{lineName}, '%')</if>
+            <if test="perHourHouseholdsArtif != null "> and per_hour_households_artif = #{perHourHouseholdsArtif}</if>
+            <if test="declarAgency != null  and declarAgency != ''"> and declar_agency = #{declarAgency}</if>
+            <if test="isMaintenance != null  and isMaintenance != ''"> and is_maintenance = #{isMaintenance}</if>
+            <if test="isApprove != null  and isApprove != ''"> and is_approve = #{isApprove}</if>
+            <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>
+    </select>
+    
+    <select id="selectPdmMaintenanceProcessById" parameterType="Long" resultMap="PdmMaintenanceProcessResult">
+        <include refid="selectPdmMaintenanceProcessVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertPdmMaintenanceProcess" parameterType="PdmMaintenanceProcess" useGeneratedKeys="true" keyProperty="id">
+        insert into pdm_maintenance_process
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="planCode != null">plan_code,</if>
+            <if test="powerOutageDevices != null">power_outage_devices,</if>
+            <if test="perHourHouseholdsM != null">per_hour_households_m,</if>
+            <if test="perHourHouseholdsW != null">per_hour_households_w,</if>
+            <if test="city != null">city,</if>
+            <if test="county != null">county,</if>
+            <if test="station != null">station,</if>
+            <if test="lineCode != null">line_code,</if>
+            <if test="lineName != null">line_name,</if>
+            <if test="perHourHouseholdsArtif != null">per_hour_households_artif,</if>
+            <if test="declarAgency != null">declar_agency,</if>
+            <if test="isMaintenance != null">is_maintenance,</if>
+            <if test="isApprove != null">is_approve,</if>
+            <if test="maintenanceFilePath != null">maintenance_file_path,</if>
+            <if test="approveFilePath != null">approve_file_path,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="planCode != null">#{planCode},</if>
+            <if test="powerOutageDevices != null">#{powerOutageDevices},</if>
+            <if test="perHourHouseholdsM != null">#{perHourHouseholdsM},</if>
+            <if test="perHourHouseholdsW != null">#{perHourHouseholdsW},</if>
+            <if test="city != null">#{city},</if>
+            <if test="county != null">#{county},</if>
+            <if test="station != null">#{station},</if>
+            <if test="lineCode != null">#{lineCode},</if>
+            <if test="lineName != null">#{lineName},</if>
+            <if test="perHourHouseholdsArtif != null">#{perHourHouseholdsArtif},</if>
+            <if test="declarAgency != null">#{declarAgency},</if>
+            <if test="isMaintenance != null">#{isMaintenance},</if>
+            <if test="isApprove != null">#{isApprove},</if>
+            <if test="maintenanceFilePath != null">#{maintenanceFilePath},</if>
+            <if test="approveFilePath != null">#{approveFilePath},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePdmMaintenanceProcess" parameterType="PdmMaintenanceProcess">
+        update pdm_maintenance_process
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="planCode != null">plan_code = #{planCode},</if>
+            <if test="powerOutageDevices != null">power_outage_devices = #{powerOutageDevices},</if>
+            <if test="perHourHouseholdsM != null">per_hour_households_m = #{perHourHouseholdsM},</if>
+            <if test="perHourHouseholdsW != null">per_hour_households_w = #{perHourHouseholdsW},</if>
+            <if test="city != null">city = #{city},</if>
+            <if test="county != null">county = #{county},</if>
+            <if test="station != null">station = #{station},</if>
+            <if test="lineCode != null">line_code = #{lineCode},</if>
+            <if test="lineName != null">line_name = #{lineName},</if>
+            <if test="perHourHouseholdsArtif != null">per_hour_households_artif = #{perHourHouseholdsArtif},</if>
+            <if test="declarAgency != null">declar_agency = #{declarAgency},</if>
+            <if test="isMaintenance != null">is_maintenance = #{isMaintenance},</if>
+            <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="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deletePdmMaintenanceProcessById" parameterType="Long">
+        delete from pdm_maintenance_process where id = #{id}
+    </delete>
+
+    <delete id="deletePdmMaintenanceProcessByIds" parameterType="String">
+        delete from pdm_maintenance_process where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>