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
<?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.job.mapper.ApsWeldSeamStandardJobMapper">
    
    <resultMap type="com.aps.job.domain.ApsWeldSeamStandardJob" id="ApsWeldSeamStandardJobResult">
        <result property="id"    column="id"    />
        <result property="itemCode"    column="item_code"    />
        <result property="itemFigure"    column="item_figure"    />
        <result property="itemFigureVersion"    column="item_figure_version"    />
        <result property="hupQty"    column="hup_qty"    />
        <result property="lodQty"    column="lod_qty"    />
        <result property="type"    column="type"    />
        <result property="delFlag"    column="del_flag"    />
    </resultMap>
 
    <sql id="selectApsWeldSeamStandardJobVo">
        select id, item_code, item_figure, item_figure_version, hup_qty, lod_qty, type, del_flag from aps_weld_seam_standard_job
    </sql>
 
    <select id="selectApsWeldSeamStandardJobList" parameterType="com.aps.job.domain.ApsWeldSeamStandardJob" resultMap="ApsWeldSeamStandardJobResult">
        <include refid="selectApsWeldSeamStandardJobVo"/>
        <where>  
            <if test="itemCode != null  and itemCode != ''"> and item_code LIKE '%' || #{itemCode} || '%'</if>
            <if test="itemFigure != null  and itemFigure != ''"> and item_figure = #{itemFigure}</if>
            <if test="itemFigureVersion != null  and itemFigureVersion != ''"> and item_figure_version = #{itemFigureVersion}</if>
            <if test="hupQty != null "> and hup_qty = #{hupQty}</if>
            <if test="lodQty != null "> and lod_qty = #{lodQty}</if>
            <if test="type != null  and type != ''"> and type = #{type}</if>
            and del_flag = 0
        </where>
    </select>
    
    <delete id="deleteAllApsWeldSeamStandardJob">
        delete from aps_weld_seam_standard_job
    </delete>
    
    <insert id="batchInsertApsWeldSeamStandardJob" parameterType="java.util.List">
        insert into aps_weld_seam_standard_job(
        id,
        item_code, 
        item_figure,
        item_figure_version, 
        hup_qty, 
        lod_qty, 
        type, 
        del_flag)
        values
        <foreach collection="list" item="item" index="index" separator=",">
        (
            #{item.id},
            #{item.itemCode},
            #{item.itemFigure},
            #{item.itemFigureVersion},
            #{item.hupQty},
            #{item.lodQty},
            #{item.type},
            0
        )
        </foreach>
    </insert>
    
</mapper>