admin
2024-10-15 6d313a4a6f9f9d7ea65ec50ab0d4491e595edb97
提交 | 用户 | 时间
e57a89 1 <?xml version="1.0" encoding="UTF-8" ?>
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.passingStationCollection.mapper.DaPassingStationCollectionMapper">
6     
7     <resultMap type="DaPassingStationCollection" id="DaPassingStationCollectionResult">
8         <result property="id"    column="id"    />
9         <result property="workOrderNo"    column="work_order_no"    />
10         <result property="sfcCode"    column="sfc_code"    />
11         <result property="productCode"    column="product_code"    />
12         <result property="productionLine"    column="production_line"    />
13         <result property="locationCode"    column="location_code"    />
14         <result property="equipmentNo"    column="equipment_no"    />
15         <result property="inboundTime"    column="inbound_time"    />
16         <result property="outboundTime"    column="outbound_time"    />
17         <result property="inRsSign"    column="in_rs_sign"    />
18         <result property="inMsgSign"    column="in_msg_sign"    />
19         <result property="outRsSign"    column="out_rs_sign"    />
20         <result property="outMsgSign"    column="out_msg_sign"    />
21         <result property="collectionTime"    column="collection_time"    />
68f0c8 22         <result property="spareField1"    column="spare_field1"    />
A 23         <result property="spareField2"    column="spare_field2"    />
e57a89 24         <result property="createUser"    column="create_user"    />
25         <result property="createTime"    column="create_time"    />
26         <result property="updateUser"    column="update_user"    />
27         <result property="updateTime"    column="update_time"    />
28         <result property="beatTime"    column="beat_time"    />
29     </resultMap>
30
31     <sql id="selectDaPassingStationCollectionVo">
68f0c8 32         select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, inbound_time, outbound_time, in_rs_sign, in_msg_sign, out_rs_sign, out_msg_sign, collection_time, spare_field1, spare_field2, create_user, create_time, update_user, update_time, beat_time from da_passing_station_collection
e57a89 33     </sql>
34
35     <select id="selectDaPassingStationCollectionList" parameterType="DaPassingStationCollection" resultMap="DaPassingStationCollectionResult">
36         <include refid="selectDaPassingStationCollectionVo"/>
37         <where>  
38             <if test="workOrderNo != null  and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if>
39             <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
40             <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
41             <if test="productionLine != null  and productionLine != ''"> and production_line = #{productionLine}</if>
42             <if test="locationCode != null  and locationCode != ''"> and location_code = #{locationCode}</if>
43             <if test="equipmentNo != null  and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if>
44             <if test="inboundTime != null "> and inbound_time = #{inboundTime}</if>
45             <if test="outboundTime != null "> and outbound_time = #{outboundTime}</if>
46             <if test="outRsSign != null "> and out_rs_sign = #{outRsSign}</if>
47             <if test="outRsSign != null "> and out_rs_sign = #{outRsSign}</if>
48
49         </where>
50     </select>
51     
52     <select id="selectDaPassingStationCollectionById" parameterType="Long" resultMap="DaPassingStationCollectionResult">
53         <include refid="selectDaPassingStationCollectionVo"/>
54         where id = #{id}
55     </select>
56         
57     <insert id="insertDaPassingStationCollection" parameterType="DaPassingStationCollection">
58         insert into da_passing_station_collection
59         <trim prefix="(" suffix=")" suffixOverrides=",">
60             <if test="id != null">id,</if>
61             <if test="workOrderNo != null">work_order_no,</if>
62             <if test="sfcCode != null">sfc_code,</if>
63             <if test="productCode != null">product_code,</if>
64             <if test="productionLine != null">production_line,</if>
65             <if test="locationCode != null">location_code,</if>
66             <if test="equipmentNo != null">equipment_no,</if>
67             <if test="inboundTime != null">inbound_time,</if>
68             <if test="outboundTime != null">outbound_time,</if>
69             <if test="inRsSign != null">in_rs_sign,</if>
70             <if test="inMsgSign != null">in_msg_sign,</if>
71             <if test="outRsSign != null">out_rs_sign,</if>
72             <if test="outMsgSign != null">out_msg_sign,</if>
73             <if test="collectionTime != null">collection_time,</if>
68f0c8 74             <if test="spareField1 != null">spare_field1,</if>
A 75             <if test="spareField2 != null">spare_field2,</if>
e57a89 76             <if test="createUser != null">create_user,</if>
77             <if test="createTime != null">create_time,</if>
78             <if test="updateUser != null">update_user,</if>
79             <if test="updateTime != null">update_time,</if>
80             <if test="beatTime != null">beat_time,</if>
81          </trim>
82         <trim prefix="values (" suffix=")" suffixOverrides=",">
83             <if test="id != null">#{id},</if>
84             <if test="workOrderNo != null">#{workOrderNo},</if>
85             <if test="sfcCode != null">#{sfcCode},</if>
86             <if test="productCode != null">#{productCode},</if>
87             <if test="productionLine != null">#{productionLine},</if>
88             <if test="locationCode != null">#{locationCode},</if>
89             <if test="equipmentNo != null">#{equipmentNo},</if>
90             <if test="inboundTime != null">#{inboundTime},</if>
91             <if test="outboundTime != null">#{outboundTime},</if>
92             <if test="inRsSign != null">#{inRsSign},</if>
93             <if test="inMsgSign != null">#{inMsgSign},</if>
94             <if test="outRsSign != null">#{outRsSign},</if>
95             <if test="outMsgSign != null">#{outMsgSign},</if>
96             <if test="collectionTime != null">#{collectionTime},</if>
97             <if test="spareField1 != null">#{spareField1},</if>
98             <if test="spareField2 != null">#{spareField2},</if>
99             <if test="createUser != null">#{createUser},</if>
100             <if test="createTime != null">#{createTime},</if>
101             <if test="updateUser != null">#{updateUser},</if>
102             <if test="updateTime != null">#{updateTime},</if>
103             <if test="beatTime != null">#{beatTime},</if>
104          </trim>
105     </insert>
106
2fbce7 107     <update id="updateDaPassingStationCollectionBySfcCodeAndLocationCode" parameterType="DaPassingStationCollection">
A 108         UPDATE da_passing_station_collection
109         <trim prefix="SET" suffixOverrides=",">
110             <if test="outboundTime != null">outbound_time = #{outboundTime},</if>
111             <if test="outRsSign != null">out_rs_sign = #{outRsSign},</if>
112         </trim>
113         WHERE
114             sfc_code = #{sfcCode}
115           AND location_code = #{locationCode}
116     </update>
117
e57a89 118     <update id="updateDaPassingStationCollection" parameterType="DaPassingStationCollection">
119         update da_passing_station_collection
120         <trim prefix="SET" suffixOverrides=",">
121             <if test="workOrderNo != null">work_order_no = #{workOrderNo},</if>
122             <if test="sfcCode != null">sfc_code = #{sfcCode},</if>
123             <if test="productCode != null">product_code = #{productCode},</if>
124             <if test="productionLine != null">production_line = #{productionLine},</if>
125             <if test="locationCode != null">location_code = #{locationCode},</if>
126             <if test="equipmentNo != null">equipment_no = #{equipmentNo},</if>
127             <if test="inboundTime != null">inbound_time = #{inboundTime},</if>
128             <if test="outboundTime != null">outbound_time = #{outboundTime},</if>
129             <if test="inRsSign != null">in_rs_sign = #{inRsSign},</if>
130             <if test="inMsgSign != null">in_msg_sign = #{inMsgSign},</if>
131             <if test="outRsSign != null">out_rs_sign = #{outRsSign},</if>
132             <if test="outMsgSign != null">out_msg_sign = #{outMsgSign},</if>
133             <if test="collectionTime != null">collection_time = #{collectionTime},</if>
134             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
135             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
136             <if test="createUser != null">create_user = #{createUser},</if>
137             <if test="createTime != null">create_time = #{createTime},</if>
138             <if test="updateUser != null">update_user = #{updateUser},</if>
139             <if test="updateTime != null">update_time = #{updateTime},</if>
140             <if test="beatTime != null">beat_time = #{beatTime},</if>
141         </trim>
142         where id = #{id}
143     </update>
144
145     <delete id="deleteDaPassingStationCollectionById" parameterType="Long">
146         delete from da_passing_station_collection where id = #{id}
147     </delete>
148
149     <delete id="deleteDaPassingStationCollectionByIds" parameterType="String">
150         delete from da_passing_station_collection where id in 
151         <foreach item="id" collection="array" open="(" separator="," close=")">
152             #{id}
153         </foreach>
154     </delete>
155 </mapper>