From 0a191c99957ae5e9cded84a2e5e117c692e9350d Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期三, 07 五月 2025 11:26:10 +0800
Subject: [PATCH] 标准工艺路线Mapper

---
 aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteLineMapper.xml   |  118 +++++++++++++++++++++++++++++
 aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteHeaderMapper.xml |   98 ++++++++++++++++++++++++
 2 files changed, 216 insertions(+), 0 deletions(-)

diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteHeaderMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteHeaderMapper.xml
new file mode 100644
index 0000000..bed11cf
--- /dev/null
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteHeaderMapper.xml
@@ -0,0 +1,98 @@
+<?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.ApsStandardProcessRouteHeaderMapper">
+    
+    <resultMap type="ApsStandardProcessRouteHeader" id="ApsStandardProcessRouteHeaderResult">
+        <result property="id"    column="id"    />
+        <result property="routeId"    column="route_id"    />
+        <result property="version"    column="version"    />
+        <result property="startDate"    column="start_date"    />
+        <result property="endDate"    column="end_date"    />
+        <result property="orgCode"    column="org_code"    />
+        <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"    />
+    </resultMap>
+
+    <sql id="selectApsStandardProcessRouteHeaderVo">
+        select id, route_id, version, start_date, end_date, org_code, del_flag, create_by, create_time, update_by, update_time from aps_standard_process_route_header
+    </sql>
+
+    <select id="selectApsStandardProcessRouteHeaderList" parameterType="ApsStandardProcessRouteHeader" resultMap="ApsStandardProcessRouteHeaderResult">
+        <include refid="selectApsStandardProcessRouteHeaderVo"/>
+        <where>  
+            <if test="routeId != null  and routeId != ''"> and route_id = #{routeId}</if>
+            <if test="version != null  and version != ''"> and version = #{version}</if>
+            <if test="startDate != null  and startDate != ''"> and start_date = #{startDate}</if>
+            <if test="endDate != null  and endDate != ''"> and end_date = #{endDate}</if>
+            <if test="orgCode != null  and orgCode != ''"> and org_code = #{orgCode}</if>
+        </where>
+    </select>
+    
+    <select id="selectApsStandardProcessRouteHeaderById" parameterType="Long" resultMap="ApsStandardProcessRouteHeaderResult">
+        <include refid="selectApsStandardProcessRouteHeaderVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertApsStandardProcessRouteHeader" parameterType="ApsStandardProcessRouteHeader">
+        insert into aps_standard_process_route_header
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="routeId != null">route_id,</if>
+            <if test="version != null">version,</if>
+            <if test="startDate != null">start_date,</if>
+            <if test="endDate != null">end_date,</if>
+            <if test="orgCode != null">org_code,</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>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="routeId != null">#{routeId},</if>
+            <if test="version != null">#{version},</if>
+            <if test="startDate != null">#{startDate},</if>
+            <if test="endDate != null">#{endDate},</if>
+            <if test="orgCode != null">#{orgCode},</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>
+         </trim>
+    </insert>
+
+    <update id="updateApsStandardProcessRouteHeader" parameterType="ApsStandardProcessRouteHeader">
+        update aps_standard_process_route_header
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="routeId != null">route_id = #{routeId},</if>
+            <if test="version != null">version = #{version},</if>
+            <if test="startDate != null">start_date = #{startDate},</if>
+            <if test="endDate != null">end_date = #{endDate},</if>
+            <if test="orgCode != null">org_code = #{orgCode},</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>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteApsStandardProcessRouteHeaderById" parameterType="Long">
+        delete from aps_standard_process_route_header where id = #{id}
+    </delete>
+
+    <delete id="deleteApsStandardProcessRouteHeaderByIds" parameterType="String">
+        delete from aps_standard_process_route_header where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>
\ No newline at end of file
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteLineMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteLineMapper.xml
new file mode 100644
index 0000000..3b6e3b8
--- /dev/null
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsStandardProcessRouteLineMapper.xml
@@ -0,0 +1,118 @@
+<?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.ApsStandardProcessRouteLineMapper">
+    
+    <resultMap type="ApsStandardProcessRouteLine" id="ApsStandardProcessRouteLineResult">
+        <result property="id"    column="id"    />
+        <result property="routeId"    column="route_id"    />
+        <result property="routeNum"    column="route_num"    />
+        <result property="routeName"    column="route_name"    />
+        <result property="startDate"    column="start_date"    />
+        <result property="endDate"    column="end_date"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="orgCode"    column="org_code"    />
+        <result property="shopCode"    column="shop_code"    />
+        <result property="productivityModel"    column="productivity_model"    />
+        <result property="designCapacity"    column="design_capacity"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectApsStandardProcessRouteLineVo">
+        select id, route_id, route_num, route_name, start_date, end_date, create_time, org_code, shop_code, productivity_model, design_capacity, del_flag, create_by, update_by, update_time from aps_standard_process_route_line
+    </sql>
+
+    <select id="selectApsStandardProcessRouteLineList" parameterType="ApsStandardProcessRouteLine" resultMap="ApsStandardProcessRouteLineResult">
+        <include refid="selectApsStandardProcessRouteLineVo"/>
+        <where>  
+            <if test="routeId != null  and routeId != ''"> and route_id = #{routeId}</if>
+            <if test="routeNum != null  and routeNum != ''"> and route_num = #{routeNum}</if>
+            <if test="routeName != null  and routeName != ''"> and route_name = #{routeName}</if>
+            <if test="startDate != null  and startDate != ''"> and start_date = #{startDate}</if>
+            <if test="endDate != null  and endDate != ''"> and end_date = #{endDate}</if>
+            <if test="orgCode != null  and orgCode != ''"> and org_code = #{orgCode}</if>
+            <if test="shopCode != null  and shopCode != ''"> and shop_code = #{shopCode}</if>
+            <if test="productivityModel != null  and productivityModel != ''"> and productivity_model = #{productivityModel}</if>
+            <if test="designCapacity != null  and designCapacity != ''"> and design_capacity = #{designCapacity}</if>
+        </where>
+    </select>
+    
+    <select id="selectApsStandardProcessRouteLineById" parameterType="Long" resultMap="ApsStandardProcessRouteLineResult">
+        <include refid="selectApsStandardProcessRouteLineVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertApsStandardProcessRouteLine" parameterType="ApsStandardProcessRouteLine">
+        insert into aps_standard_process_route_line
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="routeId != null">route_id,</if>
+            <if test="routeNum != null">route_num,</if>
+            <if test="routeName != null">route_name,</if>
+            <if test="startDate != null">start_date,</if>
+            <if test="endDate != null">end_date,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="orgCode != null">org_code,</if>
+            <if test="shopCode != null">shop_code,</if>
+            <if test="productivityModel != null">productivity_model,</if>
+            <if test="designCapacity != null">design_capacity,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="routeId != null">#{routeId},</if>
+            <if test="routeNum != null">#{routeNum},</if>
+            <if test="routeName != null">#{routeName},</if>
+            <if test="startDate != null">#{startDate},</if>
+            <if test="endDate != null">#{endDate},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="orgCode != null">#{orgCode},</if>
+            <if test="shopCode != null">#{shopCode},</if>
+            <if test="productivityModel != null">#{productivityModel},</if>
+            <if test="designCapacity != null">#{designCapacity},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateApsStandardProcessRouteLine" parameterType="ApsStandardProcessRouteLine">
+        update aps_standard_process_route_line
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="routeId != null">route_id = #{routeId},</if>
+            <if test="routeNum != null">route_num = #{routeNum},</if>
+            <if test="routeName != null">route_name = #{routeName},</if>
+            <if test="startDate != null">start_date = #{startDate},</if>
+            <if test="endDate != null">end_date = #{endDate},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="orgCode != null">org_code = #{orgCode},</if>
+            <if test="shopCode != null">shop_code = #{shopCode},</if>
+            <if test="productivityModel != null">productivity_model = #{productivityModel},</if>
+            <if test="designCapacity != null">design_capacity = #{designCapacity},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteApsStandardProcessRouteLineById" parameterType="Long">
+        delete from aps_standard_process_route_line where id = #{id}
+    </delete>
+
+    <delete id="deleteApsStandardProcessRouteLineByIds" parameterType="String">
+        delete from aps_standard_process_route_line 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