提交 | 用户 | 时间
|
fd2207
|
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.paramCollection.mapper.DaParamCollectionMapper"> |
|
6 |
|
|
7 |
<resultMap type="DaParamCollection" id="DaParamCollectionResult"> |
|
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="paramCode" column="param_code" /> |
|
16 |
<result property="paramValue" column="param_value" /> |
|
17 |
<result property="paramUpper" column="param_upper" /> |
|
18 |
<result property="paramLower" column="param_lower" /> |
|
19 |
<result property="paramStandard" column="param_standard" /> |
|
20 |
<result property="collectionTime" column="collection_time" /> |
|
21 |
<result property="spareField1" column="spare_field_1" /> |
|
22 |
<result property="spareField2" column="spare_field_2" /> |
|
23 |
<result property="createUser" column="create_user" /> |
|
24 |
<result property="createTime" column="create_time" /> |
|
25 |
<result property="updateUser" column="update_user" /> |
|
26 |
<result property="updateTime" column="update_time" /> |
|
27 |
<result property="state" column="state" /> |
|
28 |
<result property="paramName" column="param_name" /> |
|
29 |
<result property="unit" column="unit" /> |
|
30 |
<result property="type" column="type" /> |
8aafc5
|
31 |
<result property="repairFlag" column="repair_flag" /> |
fd2207
|
32 |
</resultMap> |
懒 |
33 |
|
|
34 |
<sql id="selectDaParamCollectionVo"> |
8aafc5
|
35 |
select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, spare_field_1, spare_field_2, create_user, create_time, update_user, update_time, state, param_name, unit, type, repair_flag from da_param_collection |
fd2207
|
36 |
</sql> |
懒 |
37 |
|
|
38 |
<select id="selectDaParamCollectionList" parameterType="DaParamCollection" resultMap="DaParamCollectionResult"> |
|
39 |
<include refid="selectDaParamCollectionVo"/> |
|
40 |
<where> |
|
41 |
<if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if> |
b51361
|
42 |
<if test="type != null and type != ''"> and type = #{type}</if> |
fd2207
|
43 |
<if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if> |
懒 |
44 |
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
|
45 |
<if test="productionLine != null and productionLine != ''"> and production_line = #{productionLine}</if> |
|
46 |
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if> |
|
47 |
<if test="equipmentNo != null and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if> |
|
48 |
<if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if> |
8ae9df
|
49 |
<if test="dateConditions != null and dateConditions != ''"> and collection_time BETWEEN #{startTime} AND #{endTime}</if> |
fd2207
|
50 |
</where> |
懒 |
51 |
</select> |
|
52 |
|
|
53 |
<select id="selectDaParamCollectionById" parameterType="Long" resultMap="DaParamCollectionResult"> |
|
54 |
<include refid="selectDaParamCollectionVo"/> |
|
55 |
where id = #{id} |
|
56 |
</select> |
c74dcb
|
57 |
<select id="getListBySfcCode" resultMap="DaParamCollectionResult"> |
W |
58 |
<include refid="selectDaParamCollectionVo"/> |
|
59 |
where sfc_code in |
|
60 |
<foreach collection="engineNoList" open="(" close=")" item="code" separator=","> |
|
61 |
#{code} |
|
62 |
</foreach> |
|
63 |
</select> |
|
64 |
|
fd2207
|
65 |
<insert id="insertDaParamCollection" parameterType="DaParamCollection"> |
懒 |
66 |
insert into da_param_collection |
|
67 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
68 |
<if test="id != null">id,</if> |
|
69 |
<if test="workOrderNo != null and workOrderNo != ''">work_order_no,</if> |
|
70 |
<if test="sfcCode != null and sfcCode != ''">sfc_code,</if> |
|
71 |
<if test="productCode != null and productCode != ''">product_code,</if> |
|
72 |
<if test="productionLine != null and productionLine != ''">production_line,</if> |
|
73 |
<if test="locationCode != null and locationCode != ''">location_code,</if> |
|
74 |
<if test="equipmentNo != null">equipment_no,</if> |
|
75 |
<if test="paramCode != null and paramCode != ''">param_code,</if> |
|
76 |
<if test="paramValue != null and paramValue != ''">param_value,</if> |
|
77 |
<if test="paramUpper != null">param_upper,</if> |
|
78 |
<if test="paramLower != null">param_lower,</if> |
|
79 |
<if test="paramStandard != null">param_standard,</if> |
|
80 |
<if test="collectionTime != null">collection_time,</if> |
|
81 |
<if test="spareField1 != null">spare_field_1,</if> |
|
82 |
<if test="spareField2 != null">spare_field_2,</if> |
|
83 |
<if test="createUser != null">create_user,</if> |
|
84 |
<if test="createTime != null">create_time,</if> |
|
85 |
<if test="updateUser != null">update_user,</if> |
|
86 |
<if test="updateTime != null">update_time,</if> |
|
87 |
<if test="state != null">state,</if> |
|
88 |
<if test="paramName != null">param_name,</if> |
|
89 |
<if test="unit != null">unit,</if> |
|
90 |
<if test="type != null">type,</if> |
|
91 |
</trim> |
|
92 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
93 |
<if test="id != null">#{id},</if> |
|
94 |
<if test="workOrderNo != null and workOrderNo != ''">#{workOrderNo},</if> |
|
95 |
<if test="sfcCode != null and sfcCode != ''">#{sfcCode},</if> |
|
96 |
<if test="productCode != null and productCode != ''">#{productCode},</if> |
|
97 |
<if test="productionLine != null and productionLine != ''">#{productionLine},</if> |
|
98 |
<if test="locationCode != null and locationCode != ''">#{locationCode},</if> |
|
99 |
<if test="equipmentNo != null">#{equipmentNo},</if> |
|
100 |
<if test="paramCode != null and paramCode != ''">#{paramCode},</if> |
|
101 |
<if test="paramValue != null and paramValue != ''">#{paramValue},</if> |
|
102 |
<if test="paramUpper != null">#{paramUpper},</if> |
|
103 |
<if test="paramLower != null">#{paramLower},</if> |
|
104 |
<if test="paramStandard != null">#{paramStandard},</if> |
|
105 |
<if test="collectionTime != null">#{collectionTime},</if> |
|
106 |
<if test="spareField1 != null">#{spareField1},</if> |
|
107 |
<if test="spareField2 != null">#{spareField2},</if> |
|
108 |
<if test="createUser != null">#{createUser},</if> |
|
109 |
<if test="createTime != null">#{createTime},</if> |
|
110 |
<if test="updateUser != null">#{updateUser},</if> |
|
111 |
<if test="updateTime != null">#{updateTime},</if> |
|
112 |
<if test="state != null">#{state},</if> |
|
113 |
<if test="paramName != null">#{paramName},</if> |
|
114 |
<if test="unit != null">#{unit},</if> |
|
115 |
<if test="type != null">#{type},</if> |
|
116 |
</trim> |
|
117 |
</insert> |
|
118 |
|
|
119 |
<update id="updateDaParamCollection" parameterType="DaParamCollection"> |
|
120 |
update da_param_collection |
|
121 |
<trim prefix="SET" suffixOverrides=","> |
|
122 |
<if test="workOrderNo != null and workOrderNo != ''">work_order_no = #{workOrderNo},</if> |
|
123 |
<if test="sfcCode != null and sfcCode != ''">sfc_code = #{sfcCode},</if> |
|
124 |
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
|
125 |
<if test="productionLine != null and productionLine != ''">production_line = #{productionLine},</if> |
|
126 |
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if> |
|
127 |
<if test="equipmentNo != null">equipment_no = #{equipmentNo},</if> |
|
128 |
<if test="paramCode != null and paramCode != ''">param_code = #{paramCode},</if> |
|
129 |
<if test="paramValue != null and paramValue != ''">param_value = #{paramValue},</if> |
|
130 |
<if test="paramUpper != null">param_upper = #{paramUpper},</if> |
|
131 |
<if test="paramLower != null">param_lower = #{paramLower},</if> |
|
132 |
<if test="paramStandard != null">param_standard = #{paramStandard},</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="state != null">state = #{state},</if> |
|
141 |
<if test="paramName != null">param_name = #{paramName},</if> |
|
142 |
<if test="unit != null">unit = #{unit},</if> |
|
143 |
<if test="type != null">type = #{type},</if> |
|
144 |
</trim> |
|
145 |
where id = #{id} |
|
146 |
</update> |
|
147 |
|
|
148 |
<delete id="deleteDaParamCollectionById" parameterType="Long"> |
|
149 |
delete from da_param_collection where id = #{id} |
|
150 |
</delete> |
|
151 |
|
|
152 |
<delete id="deleteDaParamCollectionByIds" parameterType="String"> |
|
153 |
delete from da_param_collection where id in |
|
154 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
155 |
#{id} |
|
156 |
</foreach> |
|
157 |
</delete> |
|
158 |
</mapper> |