春风项目四线(合箱线、总装线)
wujian
2024-07-10 59e2283a10aee45e6a98e34b432ba345095116db
提交 | 用户 | 时间
2df134 1 <?xml version="1.0" encoding="UTF-8" ?>
J 2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 <mapper namespace="com.jcdm.main.da.tileMatchRules.mapper.DaTileMatchRulesMapper">
6     
7     <resultMap type="DaTileMatchRules" id="DaTileMatchRulesResult">
8         <result property="id"    column="id"    />
9         <result property="productSeries"    column="product_series"    />
10         <result property="scanObject1"    column="scan_object1"    />
11         <result property="scanObject2"    column="scan_object2"    />
12         <result property="axisName"    column="axis_name"    />
13         <result property="neckName"    column="neck_name"    />
14         <result property="tileName"    column="tile_name"    />
15         <result property="axisParameterNoPosition"    column="axis_parameter_no_position"    />
16         <result property="neckParameterPosition"    column="neck_parameter_position"    />
17         <result property="axisValue"    column="axis_value"    />
18         <result property="neckValue"    column="neck_value"    />
19         <result property="tileColor"    column="tile_color"    />
20         <result property="createUser"    column="create_user"    />
21         <result property="createTime"    column="create_time"    />
22         <result property="updateUser"    column="update_user"    />
23         <result property="updateTime"    column="update_time"    />
24         <result property="state"    column="state"    />
25     </resultMap>
26
27     <sql id="selectDaTileMatchRulesVo">
28         select id, product_series, scan_object1, scan_object2, axis_name, neck_name, tile_name, axis_parameter_no_position, neck_parameter_position, axis_value, neck_value, tile_color, create_user, create_time, update_user, update_time, state from da_tile_match_rules
29     </sql>
30
31     <select id="selectDaTileMatchRulesList" parameterType="DaTileMatchRules" resultMap="DaTileMatchRulesResult">
32         <include refid="selectDaTileMatchRulesVo"/>
33         <where>  
34             <if test="productSeries != null  and productSeries != ''"> and product_series = #{productSeries}</if>
35             <if test="scanObject1 != null  and scanObject1 != ''"> and scan_object1 = #{scanObject1}</if>
36             <if test="scanObject2 != null  and scanObject2 != ''"> and scan_object2 = #{scanObject2}</if>
37             <if test="axisName != null  and axisName != ''"> and axis_name like concat('%', #{axisName}, '%')</if>
38             <if test="neckName != null  and neckName != ''"> and neck_name like concat('%', #{neckName}, '%')</if>
39             <if test="tileName != null  and tileName != ''"> and tile_name like concat('%', #{tileName}, '%')</if>
40             <if test="axisParameterNoPosition != null "> and axis_parameter_no_position = #{axisParameterNoPosition}</if>
41             <if test="neckParameterPosition != null "> and neck_parameter_position = #{neckParameterPosition}</if>
59e228 42             <if test="axisValue != null  and axisValue != ''"> and axis_value = SUBSTRING(#{axisValue}, axis_parameter_no_position, 1)</if>
W 43             <if test="neckValue != null  and neckValue != ''"> and neck_value = SUBSTRING(#{neckValue}, neck_parameter_position, 1)</if>
2df134 44             <if test="tileColor != null  and tileColor != ''"> and tile_color = #{tileColor}</if>
J 45             <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
46             <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
47             <if test="state != null  and state != ''"> and state = #{state}</if>
48         </where>
49     </select>
50     
51     <select id="selectDaTileMatchRulesById" parameterType="Long" resultMap="DaTileMatchRulesResult">
52         <include refid="selectDaTileMatchRulesVo"/>
53         where id = #{id}
54     </select>
55         
56     <insert id="insertDaTileMatchRules" parameterType="DaTileMatchRules" useGeneratedKeys="true" keyProperty="id">
57         insert into da_tile_match_rules
58         <trim prefix="(" suffix=")" suffixOverrides=",">
59             <if test="productSeries != null">product_series,</if>
60             <if test="scanObject1 != null">scan_object1,</if>
61             <if test="scanObject2 != null">scan_object2,</if>
62             <if test="axisName != null">axis_name,</if>
63             <if test="neckName != null">neck_name,</if>
64             <if test="tileName != null">tile_name,</if>
65             <if test="axisParameterNoPosition != null">axis_parameter_no_position,</if>
66             <if test="neckParameterPosition != null">neck_parameter_position,</if>
67             <if test="axisValue != null">axis_value,</if>
68             <if test="neckValue != null">neck_value,</if>
69             <if test="tileColor != null">tile_color,</if>
70             <if test="createUser != null">create_user,</if>
71             <if test="createTime != null">create_time,</if>
72             <if test="updateUser != null">update_user,</if>
73             <if test="updateTime != null">update_time,</if>
74             <if test="state != null">state,</if>
75          </trim>
76         <trim prefix="values (" suffix=")" suffixOverrides=",">
77             <if test="productSeries != null">#{productSeries},</if>
78             <if test="scanObject1 != null">#{scanObject1},</if>
79             <if test="scanObject2 != null">#{scanObject2},</if>
80             <if test="axisName != null">#{axisName},</if>
81             <if test="neckName != null">#{neckName},</if>
82             <if test="tileName != null">#{tileName},</if>
83             <if test="axisParameterNoPosition != null">#{axisParameterNoPosition},</if>
84             <if test="neckParameterPosition != null">#{neckParameterPosition},</if>
85             <if test="axisValue != null">#{axisValue},</if>
86             <if test="neckValue != null">#{neckValue},</if>
87             <if test="tileColor != null">#{tileColor},</if>
88             <if test="createUser != null">#{createUser},</if>
89             <if test="createTime != null">#{createTime},</if>
90             <if test="updateUser != null">#{updateUser},</if>
91             <if test="updateTime != null">#{updateTime},</if>
92             <if test="state != null">#{state},</if>
93          </trim>
94     </insert>
95
96     <update id="updateDaTileMatchRules" parameterType="DaTileMatchRules">
97         update da_tile_match_rules
98         <trim prefix="SET" suffixOverrides=",">
99             <if test="productSeries != null">product_series = #{productSeries},</if>
100             <if test="scanObject1 != null">scan_object1 = #{scanObject1},</if>
101             <if test="scanObject2 != null">scan_object2 = #{scanObject2},</if>
102             <if test="axisName != null">axis_name = #{axisName},</if>
103             <if test="neckName != null">neck_name = #{neckName},</if>
104             <if test="tileName != null">tile_name = #{tileName},</if>
105             <if test="axisParameterNoPosition != null">axis_parameter_no_position = #{axisParameterNoPosition},</if>
106             <if test="neckParameterPosition != null">neck_parameter_position = #{neckParameterPosition},</if>
107             <if test="axisValue != null">axis_value = #{axisValue},</if>
108             <if test="neckValue != null">neck_value = #{neckValue},</if>
109             <if test="tileColor != null">tile_color = #{tileColor},</if>
110             <if test="createUser != null">create_user = #{createUser},</if>
111             <if test="createTime != null">create_time = #{createTime},</if>
112             <if test="updateUser != null">update_user = #{updateUser},</if>
113             <if test="updateTime != null">update_time = #{updateTime},</if>
114             <if test="state != null">state = #{state},</if>
115         </trim>
116         where id = #{id}
117     </update>
118
119     <delete id="deleteDaTileMatchRulesById" parameterType="Long">
120         delete from da_tile_match_rules where id = #{id}
121     </delete>
122
123     <delete id="deleteDaTileMatchRulesByIds" parameterType="String">
124         delete from da_tile_match_rules where id in 
125         <foreach item="id" collection="array" open="(" separator="," close=")">
126             #{id}
127         </foreach>
128     </delete>
129 </mapper>