From a7d03c3ea44f7d4b781c56b28550eb7f6e9d90c1 Mon Sep 17 00:00:00 2001
From: huangjiayang <5265313@qq.com>
Date: 星期三, 23 四月 2025 15:10:38 +0800
Subject: [PATCH] 【ADD】增加标准工序相关功能代码

---
 aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsStandardProcessServiceImpl.java        |   97 ++++++++
 aps-modules/aps-core/src/main/java/com/aps/core/service/IApsStandardProcessService.java                |   62 +++++
 aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessMapper.xml                       |  133 +++++++++++
 aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsStandardProcessController.java |   99 ++++++++
 aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsStandardProcess.java                         |  235 +++++++++++++++++++
 aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsStandardProcessMapper.java                   |   62 +++++
 6 files changed, 688 insertions(+), 0 deletions(-)

diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsStandardProcessController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsStandardProcessController.java
new file mode 100644
index 0000000..b9fd515
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsStandardProcessController.java
@@ -0,0 +1,99 @@
+package com.aps.core.controller.basicData;
+
+import com.aps.common.core.utils.poi.ExcelUtil;
+import com.aps.common.core.web.controller.BaseController;
+import com.aps.common.core.web.domain.AjaxResult;
+import com.aps.common.core.web.page.TableDataInfo;
+import com.aps.common.log.annotation.Log;
+import com.aps.common.log.enums.BusinessType;
+import com.aps.common.security.annotation.RequiresPermissions;
+import com.aps.core.domain.ApsStandardProcess;
+import com.aps.core.service.IApsStandardProcessService;
+import jakarta.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 鏍囧噯宸ュ簭Controller
+ * 
+ * @author hjy
+ * @date 2025-04-23
+ */
+
+@RestController
+@RequestMapping("/standardProcess")
+public class ApsStandardProcessController extends BaseController
+{
+    @Autowired
+    private IApsStandardProcessService apsStandardProcessService;
+
+    /**
+     * 鏌ヨ鏍囧噯宸ュ簭鍒楄〃
+     */
+    @RequiresPermissions("core:standardProcess:list")
+    @GetMapping("/list")
+    public TableDataInfo list(ApsStandardProcess apsStandardProcess)
+    {
+        startPage();
+        List<ApsStandardProcess> list = apsStandardProcessService.selectApsStandardProcessList(apsStandardProcess);
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭鏍囧噯宸ュ簭鍒楄〃
+     */
+    @RequiresPermissions("core:standardProcess:export")
+    @Log(title = "鏍囧噯宸ュ簭", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ApsStandardProcess apsStandardProcess)
+    {
+        List<ApsStandardProcess> list = apsStandardProcessService.selectApsStandardProcessList(apsStandardProcess);
+        ExcelUtil<ApsStandardProcess> util = new ExcelUtil<ApsStandardProcess>(ApsStandardProcess.class);
+        util.exportExcel(response, list, "鏍囧噯宸ュ簭鏁版嵁");
+    }
+
+    /**
+     * 鑾峰彇鏍囧噯宸ュ簭璇︾粏淇℃伅
+     */
+    @RequiresPermissions("core:standardProcess:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(apsStandardProcessService.selectApsStandardProcessById(id));
+    }
+
+    /**
+     * 鏂板鏍囧噯宸ュ簭
+     */
+    @RequiresPermissions("core:standardProcess:add")
+    @Log(title = "鏍囧噯宸ュ簭", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ApsStandardProcess apsStandardProcess)
+    {
+        return toAjax(apsStandardProcessService.insertApsStandardProcess(apsStandardProcess));
+    }
+
+    /**
+     * 淇敼鏍囧噯宸ュ簭
+     */
+    @RequiresPermissions("core:standardProcess:edit")
+    @Log(title = "鏍囧噯宸ュ簭", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ApsStandardProcess apsStandardProcess)
+    {
+        return toAjax(apsStandardProcessService.updateApsStandardProcess(apsStandardProcess));
+    }
+
+    /**
+     * 鍒犻櫎鏍囧噯宸ュ簭
+     */
+    @RequiresPermissions("core:standardProcess:remove")
+    @Log(title = "鏍囧噯宸ュ簭", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(apsStandardProcessService.deleteApsStandardProcessByIds(ids));
+    }
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsStandardProcess.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsStandardProcess.java
new file mode 100644
index 0000000..0481ec4
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsStandardProcess.java
@@ -0,0 +1,235 @@
+package com.aps.core.domain;
+
+import com.aps.common.core.annotation.Excel;
+import com.aps.common.core.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 鏍囧噯宸ュ簭瀵硅薄 aps_standard_process
+ * 
+ * @author hjy
+ * @date 2025-04-23
+ */
+public class ApsStandardProcess extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 涓婚敭id */
+    private Long id;
+
+    /** 宸ュ簭缂栫爜 */
+    @Excel(name = "宸ュ簭缂栫爜")
+    private String processNumber;
+
+    /** 宸ュ簭鍚嶇О */
+    @Excel(name = "宸ュ簭鍚嶇О")
+    private String processName;
+
+    /** 璧勬簮缁� */
+    @Excel(name = "璧勬簮缁�")
+    private String resourceGroupName;
+
+    /** 浜ц兘妯″瀷: 鐙崰/鍚堟壒 */
+    @Excel(name = "浜ц兘妯″瀷: 鐙崰/鍚堟壒")
+    private String model;
+
+    /** 璁捐浜ц兘 */
+    @Excel(name = "璁捐浜ц兘")
+    private String designCapacity;
+
+    /** 宸ュ巶Id */
+    @Excel(name = "宸ュ巶Id")
+    private String plantId;
+
+    /** 宸ュ巶 */
+    @Excel(name = "宸ュ巶")
+    private String plant;
+
+    /** 杞﹂棿Id */
+    @Excel(name = "杞﹂棿Id")
+    private String workShopId;
+
+    /** 杞﹂棿 */
+    @Excel(name = "杞﹂棿")
+    private String workShop;
+
+    /** 鏃ュ巻Id */
+    @Excel(name = "鏃ュ巻Id")
+    private Long workCalenderId;
+
+    /** 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� */
+    private String delFlag;
+
+    /** 浜ц兘妯″瀷Id */
+    @Excel(name = "浜ц兘妯″瀷Id")
+    private Long modelId;
+
+    /** 鏃ュ巻鎻忚堪 */
+    @Excel(name = "鏃ュ巻鎻忚堪")
+    private String workCalender;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public void setProcessNumber(String processNumber) 
+    {
+        this.processNumber = processNumber;
+    }
+
+    public String getProcessNumber() 
+    {
+        return processNumber;
+    }
+
+    public void setProcessName(String processName) 
+    {
+        this.processName = processName;
+    }
+
+    public String getProcessName() 
+    {
+        return processName;
+    }
+
+    public void setResourceGroupName(String resourceGroupName) 
+    {
+        this.resourceGroupName = resourceGroupName;
+    }
+
+    public String getResourceGroupName() 
+    {
+        return resourceGroupName;
+    }
+
+    public void setModel(String model) 
+    {
+        this.model = model;
+    }
+
+    public String getModel() 
+    {
+        return model;
+    }
+
+    public void setDesignCapacity(String designCapacity) 
+    {
+        this.designCapacity = designCapacity;
+    }
+
+    public String getDesignCapacity() 
+    {
+        return designCapacity;
+    }
+
+    public void setPlantId(String plantId) 
+    {
+        this.plantId = plantId;
+    }
+
+    public String getPlantId() 
+    {
+        return plantId;
+    }
+
+    public void setPlant(String plant) 
+    {
+        this.plant = plant;
+    }
+
+    public String getPlant() 
+    {
+        return plant;
+    }
+
+    public void setWorkShopId(String workShopId) 
+    {
+        this.workShopId = workShopId;
+    }
+
+    public String getWorkShopId() 
+    {
+        return workShopId;
+    }
+
+    public void setWorkShop(String workShop) 
+    {
+        this.workShop = workShop;
+    }
+
+    public String getWorkShop() 
+    {
+        return workShop;
+    }
+
+    public void setWorkCalenderId(Long workCalenderId) 
+    {
+        this.workCalenderId = workCalenderId;
+    }
+
+    public Long getWorkCalenderId() 
+    {
+        return workCalenderId;
+    }
+
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    public void setModelId(Long modelId) 
+    {
+        this.modelId = modelId;
+    }
+
+    public Long getModelId() 
+    {
+        return modelId;
+    }
+
+    public void setWorkCalender(String workCalender) 
+    {
+        this.workCalender = workCalender;
+    }
+
+    public String getWorkCalender() 
+    {
+        return workCalender;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("processNumber", getProcessNumber())
+            .append("processName", getProcessName())
+            .append("resourceGroupName", getResourceGroupName())
+            .append("model", getModel())
+            .append("designCapacity", getDesignCapacity())
+            .append("plantId", getPlantId())
+            .append("plant", getPlant())
+            .append("workShopId", getWorkShopId())
+            .append("workShop", getWorkShop())
+            .append("workCalenderId", getWorkCalenderId())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("modelId", getModelId())
+            .append("workCalender", getWorkCalender())
+            .toString();
+    }
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsStandardProcessMapper.java b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsStandardProcessMapper.java
new file mode 100644
index 0000000..fdf5d23
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsStandardProcessMapper.java
@@ -0,0 +1,62 @@
+package com.aps.core.mapper;
+
+import com.aps.core.domain.ApsStandardProcess;
+
+import java.util.List;
+
+/**
+ * 鏍囧噯宸ュ簭Mapper鎺ュ彛
+ * 
+ * @author hjy
+ * @date 2025-04-23
+ */
+public interface ApsStandardProcessMapper 
+{
+    /**
+     * 鏌ヨ鏍囧噯宸ュ簭
+     * 
+     * @param id 鏍囧噯宸ュ簭涓婚敭
+     * @return 鏍囧噯宸ュ簭
+     */
+    public ApsStandardProcess selectApsStandardProcessById(Long id);
+
+    /**
+     * 鏌ヨ鏍囧噯宸ュ簭鍒楄〃
+     * 
+     * @param apsStandardProcess 鏍囧噯宸ュ簭
+     * @return 鏍囧噯宸ュ簭闆嗗悎
+     */
+    public List<ApsStandardProcess> selectApsStandardProcessList(ApsStandardProcess apsStandardProcess);
+
+    /**
+     * 鏂板鏍囧噯宸ュ簭
+     * 
+     * @param apsStandardProcess 鏍囧噯宸ュ簭
+     * @return 缁撴灉
+     */
+    public int insertApsStandardProcess(ApsStandardProcess apsStandardProcess);
+
+    /**
+     * 淇敼鏍囧噯宸ュ簭
+     * 
+     * @param apsStandardProcess 鏍囧噯宸ュ簭
+     * @return 缁撴灉
+     */
+    public int updateApsStandardProcess(ApsStandardProcess apsStandardProcess);
+
+    /**
+     * 鍒犻櫎鏍囧噯宸ュ簭
+     * 
+     * @param id 鏍囧噯宸ュ簭涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteApsStandardProcessById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎鏍囧噯宸ュ簭
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteApsStandardProcessByIds(Long[] ids);
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsStandardProcessService.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsStandardProcessService.java
new file mode 100644
index 0000000..1584f7a
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsStandardProcessService.java
@@ -0,0 +1,62 @@
+package com.aps.core.service;
+
+import com.aps.core.domain.ApsStandardProcess;
+
+import java.util.List;
+
+/**
+ * 鏍囧噯宸ュ簭Service鎺ュ彛
+ * 
+ * @author hjy
+ * @date 2025-04-23
+ */
+public interface IApsStandardProcessService 
+{
+    /**
+     * 鏌ヨ鏍囧噯宸ュ簭
+     * 
+     * @param id 鏍囧噯宸ュ簭涓婚敭
+     * @return 鏍囧噯宸ュ簭
+     */
+    public ApsStandardProcess selectApsStandardProcessById(Long id);
+
+    /**
+     * 鏌ヨ鏍囧噯宸ュ簭鍒楄〃
+     * 
+     * @param apsStandardProcess 鏍囧噯宸ュ簭
+     * @return 鏍囧噯宸ュ簭闆嗗悎
+     */
+    public List<ApsStandardProcess> selectApsStandardProcessList(ApsStandardProcess apsStandardProcess);
+
+    /**
+     * 鏂板鏍囧噯宸ュ簭
+     * 
+     * @param apsStandardProcess 鏍囧噯宸ュ簭
+     * @return 缁撴灉
+     */
+    public int insertApsStandardProcess(ApsStandardProcess apsStandardProcess);
+
+    /**
+     * 淇敼鏍囧噯宸ュ簭
+     * 
+     * @param apsStandardProcess 鏍囧噯宸ュ簭
+     * @return 缁撴灉
+     */
+    public int updateApsStandardProcess(ApsStandardProcess apsStandardProcess);
+
+    /**
+     * 鎵归噺鍒犻櫎鏍囧噯宸ュ簭
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑鏍囧噯宸ュ簭涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteApsStandardProcessByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎鏍囧噯宸ュ簭淇℃伅
+     * 
+     * @param id 鏍囧噯宸ュ簭涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteApsStandardProcessById(Long id);
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsStandardProcessServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsStandardProcessServiceImpl.java
new file mode 100644
index 0000000..fcd5916
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsStandardProcessServiceImpl.java
@@ -0,0 +1,97 @@
+package com.aps.core.service.impl;
+
+import com.aps.common.core.utils.DateUtils;
+import com.aps.core.domain.ApsStandardProcess;
+import com.aps.core.mapper.ApsStandardProcessMapper;
+import com.aps.core.service.IApsStandardProcessService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 鏍囧噯宸ュ簭Service涓氬姟灞傚鐞�
+ * 
+ * @author hjy
+ * @date 2025-04-23
+ */
+@Service
+public class ApsStandardProcessServiceImpl implements IApsStandardProcessService 
+{
+    @Autowired
+    private ApsStandardProcessMapper apsStandardProcessMapper;
+
+    /**
+     * 鏌ヨ鏍囧噯宸ュ簭
+     * 
+     * @param id 鏍囧噯宸ュ簭涓婚敭
+     * @return 鏍囧噯宸ュ簭
+     */
+    @Override
+    public ApsStandardProcess selectApsStandardProcessById(Long id)
+    {
+        return apsStandardProcessMapper.selectApsStandardProcessById(id);
+    }
+
+    /**
+     * 鏌ヨ鏍囧噯宸ュ簭鍒楄〃
+     * 
+     * @param apsStandardProcess 鏍囧噯宸ュ簭
+     * @return 鏍囧噯宸ュ簭
+     */
+    @Override
+    public List<ApsStandardProcess> selectApsStandardProcessList(ApsStandardProcess apsStandardProcess)
+    {
+        return apsStandardProcessMapper.selectApsStandardProcessList(apsStandardProcess);
+    }
+
+    /**
+     * 鏂板鏍囧噯宸ュ簭
+     * 
+     * @param apsStandardProcess 鏍囧噯宸ュ簭
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertApsStandardProcess(ApsStandardProcess apsStandardProcess)
+    {
+        apsStandardProcess.setCreateTime(DateUtils.getNowDate());
+        return apsStandardProcessMapper.insertApsStandardProcess(apsStandardProcess);
+    }
+
+    /**
+     * 淇敼鏍囧噯宸ュ簭
+     * 
+     * @param apsStandardProcess 鏍囧噯宸ュ簭
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateApsStandardProcess(ApsStandardProcess apsStandardProcess)
+    {
+        apsStandardProcess.setUpdateTime(DateUtils.getNowDate());
+        return apsStandardProcessMapper.updateApsStandardProcess(apsStandardProcess);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎鏍囧噯宸ュ簭
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑鏍囧噯宸ュ簭涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteApsStandardProcessByIds(Long[] ids)
+    {
+        return apsStandardProcessMapper.deleteApsStandardProcessByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎鏍囧噯宸ュ簭淇℃伅
+     * 
+     * @param id 鏍囧噯宸ュ簭涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteApsStandardProcessById(Long id)
+    {
+        return apsStandardProcessMapper.deleteApsStandardProcessById(id);
+    }
+}
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessMapper.xml
new file mode 100644
index 0000000..144bfb7
--- /dev/null
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessMapper.xml
@@ -0,0 +1,133 @@
+<?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.aps.core.mapper.ApsStandardProcessMapper">
+    
+    <resultMap type="ApsStandardProcess" id="ApsStandardProcessResult">
+        <result property="id"    column="id"    />
+        <result property="processNumber"    column="process_number"    />
+        <result property="processName"    column="process_name"    />
+        <result property="resourceGroupName"    column="resource_group_name"    />
+        <result property="model"    column="model"    />
+        <result property="designCapacity"    column="design_capacity"    />
+        <result property="plantId"    column="plant_id"    />
+        <result property="plant"    column="plant"    />
+        <result property="workShopId"    column="work_shop_id"    />
+        <result property="workShop"    column="work_shop"    />
+        <result property="workCalenderId"    column="work_calender_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="modelId"    column="model_id"    />
+        <result property="workCalender"    column="work_calender"    />
+    </resultMap>
+
+    <sql id="selectApsStandardProcessVo">
+        select id, process_number, process_name, resource_group_name, model, design_capacity, plant_id, plant, work_shop_id, work_shop, work_calender_id, del_flag, create_by, create_time, update_by, update_time, model_id, work_calender from aps_standard_process
+    </sql>
+
+    <select id="selectApsStandardProcessList" parameterType="ApsStandardProcess" resultMap="ApsStandardProcessResult">
+        <include refid="selectApsStandardProcessVo"/>
+        <where>  
+            <if test="processNumber != null  and processNumber != ''"> and process_number = #{processNumber}</if>
+            <if test="processName != null  and processName != ''"> and process_name like '%' || #{processName} ||  '%'</if>
+            <if test="resourceGroupName != null  and resourceGroupName != ''"> and resource_group_name like '%' || #{resourceGroupName} || '%'</if>
+            <if test="model != null  and model != ''"> and model = #{model}</if>
+            <if test="designCapacity != null  and designCapacity != ''"> and design_capacity = #{designCapacity}</if>
+            <if test="plantId != null  and plantId != ''"> and plant_id = #{plantId}</if>
+            <if test="plant != null  and plant != ''"> and plant = #{plant}</if>
+            <if test="workShopId != null  and workShopId != ''"> and work_shop_id = #{workShopId}</if>
+            <if test="workShop != null  and workShop != ''"> and work_shop = #{workShop}</if>
+            <if test="workCalenderId != null "> and work_calender_id = #{workCalenderId}</if>
+            <if test="modelId != null "> and model_id = #{modelId}</if>
+            <if test="workCalender != null  and workCalender != ''"> and work_calender = #{workCalender}</if>
+        </where>
+    </select>
+    
+    <select id="selectApsStandardProcessById" parameterType="Long" resultMap="ApsStandardProcessResult">
+        <include refid="selectApsStandardProcessVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertApsStandardProcess" parameterType="ApsStandardProcess">
+        insert into aps_standard_process
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="processNumber != null">process_number,</if>
+            <if test="processName != null">process_name,</if>
+            <if test="resourceGroupName != null">resource_group_name,</if>
+            <if test="model != null">model,</if>
+            <if test="designCapacity != null">design_capacity,</if>
+            <if test="plantId != null">plant_id,</if>
+            <if test="plant != null">plant,</if>
+            <if test="workShopId != null">work_shop_id,</if>
+            <if test="workShop != null">work_shop,</if>
+            <if test="workCalenderId != null">work_calender_id,</if>
+            <if test="delFlag != null">del_flag,</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>
+            <if test="modelId != null">model_id,</if>
+            <if test="workCalender != null">work_calender,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="processNumber != null">#{processNumber},</if>
+            <if test="processName != null">#{processName},</if>
+            <if test="resourceGroupName != null">#{resourceGroupName},</if>
+            <if test="model != null">#{model},</if>
+            <if test="designCapacity != null">#{designCapacity},</if>
+            <if test="plantId != null">#{plantId},</if>
+            <if test="plant != null">#{plant},</if>
+            <if test="workShopId != null">#{workShopId},</if>
+            <if test="workShop != null">#{workShop},</if>
+            <if test="workCalenderId != null">#{workCalenderId},</if>
+            <if test="delFlag != null">#{delFlag},</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>
+            <if test="modelId != null">#{modelId},</if>
+            <if test="workCalender != null">#{workCalender},</if>
+         </trim>
+    </insert>
+
+    <update id="updateApsStandardProcess" parameterType="ApsStandardProcess">
+        update aps_standard_process
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="processNumber != null">process_number = #{processNumber},</if>
+            <if test="processName != null">process_name = #{processName},</if>
+            <if test="resourceGroupName != null">resource_group_name = #{resourceGroupName},</if>
+            <if test="model != null">model = #{model},</if>
+            <if test="designCapacity != null">design_capacity = #{designCapacity},</if>
+            <if test="plantId != null">plant_id = #{plantId},</if>
+            <if test="plant != null">plant = #{plant},</if>
+            <if test="workShopId != null">work_shop_id = #{workShopId},</if>
+            <if test="workShop != null">work_shop = #{workShop},</if>
+            <if test="workCalenderId != null">work_calender_id = #{workCalenderId},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</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>
+            <if test="modelId != null">model_id = #{modelId},</if>
+            <if test="workCalender != null">work_calender = #{workCalender},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteApsStandardProcessById" parameterType="Long">
+        delete from aps_standard_process where id = #{id}
+    </delete>
+
+    <delete id="deleteApsStandardProcessByIds" parameterType="String">
+        delete from aps_standard_process where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.3