sfd
2025-05-26 2a64b537e8e3bce9ce030585a3da17d48379c0ad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?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.ApsProcessCapacityManagementMapper">
    
    <resultMap type="com.aps.core.domain.ApsProcessCapacityManagement" id="ApsProcessCapacityManagementResult">
        <result property="id"    column="id"    />
        <result property="itemNumber"    column="item_number"    />
        <result property="capacityType"    column="capacity_type"    />
        <result property="processNumber"    column="process_number"    />
        <result property="processName"    column="process_name"    />
        <result property="processRouteId"    column="process_route_id"    />
        <result property="workTime"    column="work_time"    />
        <result property="effectiveDate"    column="effective_date"    />
        <result property="expiringDate"    column="expiring_date"    />
        <result property="integrationDate"    column="integration_date"    />
        <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="selectApsProcessCapacityManagementVo">
        select id, item_number, capacity_type, process_number, process_name, process_route_id, work_time, effective_date, expiring_date, integration_date, create_by, create_time, update_by, update_time from aps_process_capacity_management
    </sql>
 
    <select id="selectApsProcessCapacityManagementList" parameterType="com.aps.core.domain.ApsProcessCapacityManagement" resultMap="ApsProcessCapacityManagementResult">
        <include refid="selectApsProcessCapacityManagementVo"/>
        <where>  
            <if test="itemNumber != null  and itemNumber != ''"> and item_number = #{itemNumber}</if>
        </where>
    </select>
    
    <select id="selectApsProcessCapacityManagementById" parameterType="String" resultMap="ApsProcessCapacityManagementResult">
        <include refid="selectApsProcessCapacityManagementVo"/>
        where id = #{id}
    </select>
 
    <insert id="insertApsProcessCapacityManagement" parameterType="com.aps.core.domain.ApsProcessCapacityManagement">
        insert into aps_process_capacity_management
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="itemNumber != null and itemNumber != ''">item_number,</if>
            <if test="capacityType != null">capacity_type,</if>
            <if test="processNumber != null">process_number,</if>
            <if test="processName != null">process_name,</if>
            <if test="processRouteId != null">process_route_id,</if>
            <if test="workTime != null">work_time,</if>
            <if test="effectiveDate != null">effective_date,</if>
            <if test="expiringDate != null">expiring_date,</if>
            <if test="integrationDate != null">integration_date,</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="itemNumber != null and itemNumber != ''">#{itemNumber},</if>
            <if test="capacityType != null">#{capacityType},</if>
            <if test="processNumber != null">#{processNumber},</if>
            <if test="processName != null">#{processName},</if>
            <if test="processRouteId != null">#{processRouteId},</if>
            <if test="workTime != null">#{workTime},</if>
            <if test="effectiveDate != null">#{effectiveDate},</if>
            <if test="expiringDate != null">#{expiringDate},</if>
            <if test="integrationDate != null">#{integrationDate},</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="updateApsProcessCapacityManagement" parameterType="com.aps.core.domain.ApsProcessCapacityManagement">
        update aps_process_capacity_management
        <trim prefix="SET" suffixOverrides=",">
            <if test="itemNumber != null and itemNumber != ''">item_number = #{itemNumber},</if>
            <if test="capacityType != null">capacity_type = #{capacityType},</if>
            <if test="processNumber != null">process_number = #{processNumber},</if>
            <if test="processName != null">process_name = #{processName},</if>
            <if test="processRouteId != null">process_route_id = #{processRouteId},</if>
            <if test="workTime != null">work_time = #{workTime},</if>
            <if test="effectiveDate != null">effective_date = #{effectiveDate},</if>
            <if test="expiringDate != null">expiring_date = #{expiringDate},</if>
            <if test="integrationDate != null">integration_date = #{integrationDate},</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="deleteApsProcessCapacityManagementById" parameterType="String">
        delete from aps_process_capacity_management where id = #{id}
    </delete>
 
    <delete id="deleteApsProcessCapacityManagementByIds" parameterType="String">
        delete from aps_process_capacity_management where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>