|
|
@@ -18,6 +18,7 @@
|
|
18
|
18
|
<result column="check_person" jdbcType="VARCHAR" property="checkPerson" />
|
|
19
|
19
|
<result column="repair_status" jdbcType="VARCHAR" property="repairStatus" />
|
|
20
|
20
|
<result column="org_id" jdbcType="INTEGER" property="orgId" />
|
|
|
21
|
+ <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
|
|
21
|
22
|
</resultMap>
|
|
22
|
23
|
<sql id="Example_Where_Clause">
|
|
23
|
24
|
<where>
|
|
|
@@ -80,7 +81,7 @@
|
|
80
|
81
|
<sql id="Base_Column_List">
|
|
81
|
82
|
id, storehouse_id, storehouse_code, check_date, project, problem_exist, problem,
|
|
82
|
83
|
opinion, repair_focus, remark, bosshead, repair_start_date, repair_end_date, check_person,
|
|
83
|
|
- repair_status, org_id
|
|
|
84
|
+ repair_status, org_id, warehouse_id
|
|
84
|
85
|
</sql>
|
|
85
|
86
|
<select id="selectByExample" parameterType="com.chinaitop.depot.storage.model.StorageHouserepairExample" resultMap="BaseResultMap">
|
|
86
|
87
|
select
|
|
|
@@ -118,13 +119,13 @@
|
|
118
|
119
|
problem, opinion, repair_focus,
|
|
119
|
120
|
remark, bosshead, repair_start_date,
|
|
120
|
121
|
repair_end_date, check_person, repair_status,
|
|
121
|
|
- org_id)
|
|
|
122
|
+ org_id,warehouse_id)
|
|
122
|
123
|
values (#{id,jdbcType=INTEGER}, #{storehouseId,jdbcType=INTEGER}, #{storehouseCode,jdbcType=VARCHAR},
|
|
123
|
124
|
#{checkDate,jdbcType=TIMESTAMP}, #{project,jdbcType=VARCHAR}, #{problemExist,jdbcType=VARCHAR},
|
|
124
|
125
|
#{problem,jdbcType=VARCHAR}, #{opinion,jdbcType=VARCHAR}, #{repairFocus,jdbcType=VARCHAR},
|
|
125
|
126
|
#{remark,jdbcType=VARCHAR}, #{bosshead,jdbcType=VARCHAR}, #{repairStartDate,jdbcType=TIMESTAMP},
|
|
126
|
127
|
#{repairEndDate,jdbcType=TIMESTAMP}, #{checkPerson,jdbcType=VARCHAR}, #{repairStatus,jdbcType=VARCHAR},
|
|
127
|
|
- #{orgId,jdbcType=INTEGER})
|
|
|
128
|
+ #{orgId,jdbcType=INTEGER},#{warehouseId,jdbcType=INTEGER})
|
|
128
|
129
|
</insert>
|
|
129
|
130
|
<insert id="insertSelective" parameterType="com.chinaitop.depot.storage.model.StorageHouserepair">
|
|
130
|
131
|
insert into storage_houserepair
|
|
|
@@ -177,6 +178,9 @@
|
|
177
|
178
|
<if test="orgId != null">
|
|
178
|
179
|
org_id,
|
|
179
|
180
|
</if>
|
|
|
181
|
+ <if test="warehouseId != null">
|
|
|
182
|
+ warehouse_id,
|
|
|
183
|
+ </if>
|
|
180
|
184
|
</trim>
|
|
181
|
185
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
182
|
186
|
<if test="id != null">
|
|
|
@@ -227,6 +231,9 @@
|
|
227
|
231
|
<if test="orgId != null">
|
|
228
|
232
|
#{orgId,jdbcType=INTEGER},
|
|
229
|
233
|
</if>
|
|
|
234
|
+ <if test="warehouseId != null">
|
|
|
235
|
+ #{warehouseId,jdbcType=INTEGER},
|
|
|
236
|
+ </if>
|
|
230
|
237
|
</trim>
|
|
231
|
238
|
</insert>
|
|
232
|
239
|
<select id="countByExample" parameterType="com.chinaitop.depot.storage.model.StorageHouserepairExample" resultType="java.lang.Integer">
|
|
|
@@ -286,6 +293,9 @@
|
|
286
|
293
|
<if test="record.orgId != null">
|
|
287
|
294
|
org_id = #{record.orgId,jdbcType=INTEGER},
|
|
288
|
295
|
</if>
|
|
|
296
|
+ <if test="record.warehouseId != null">
|
|
|
297
|
+ warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
|
|
|
298
|
+ </if>
|
|
289
|
299
|
</set>
|
|
290
|
300
|
<if test="_parameter != null">
|
|
291
|
301
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
@@ -308,7 +318,8 @@
|
|
308
|
318
|
repair_end_date = #{record.repairEndDate,jdbcType=TIMESTAMP},
|
|
309
|
319
|
check_person = #{record.checkPerson,jdbcType=VARCHAR},
|
|
310
|
320
|
repair_status = #{record.repairStatus,jdbcType=VARCHAR},
|
|
311
|
|
- org_id = #{record.orgId,jdbcType=INTEGER}
|
|
|
321
|
+ org_id = #{record.orgId,jdbcType=INTEGER},
|
|
|
322
|
+ warehouse_id = #{record.warehouseId,jdbcType=INTEGER}
|
|
312
|
323
|
<if test="_parameter != null">
|
|
313
|
324
|
<include refid="Update_By_Example_Where_Clause" />
|
|
314
|
325
|
</if>
|
|
|
@@ -361,6 +372,9 @@
|
|
361
|
372
|
<if test="orgId != null">
|
|
362
|
373
|
org_id = #{orgId,jdbcType=INTEGER},
|
|
363
|
374
|
</if>
|
|
|
375
|
+ <if test="warehouseId != null">
|
|
|
376
|
+ warehouse_id = #{warehouseId,jdbcType=INTEGER},
|
|
|
377
|
+ </if>
|
|
364
|
378
|
</set>
|
|
365
|
379
|
where id = #{id,jdbcType=INTEGER}
|
|
366
|
380
|
</update>
|
|
|
@@ -380,23 +394,26 @@
|
|
380
|
394
|
repair_end_date = #{repairEndDate,jdbcType=TIMESTAMP},
|
|
381
|
395
|
check_person = #{checkPerson,jdbcType=VARCHAR},
|
|
382
|
396
|
repair_status = #{repairStatus,jdbcType=VARCHAR},
|
|
383
|
|
- org_id = #{orgId,jdbcType=INTEGER}
|
|
|
397
|
+ org_id = #{orgId,jdbcType=INTEGER},
|
|
|
398
|
+ warehouse_id = #{warehouseId,jdbcType=INTEGER}
|
|
384
|
399
|
where id = #{id,jdbcType=INTEGER}
|
|
385
|
400
|
</update>
|
|
386
|
401
|
|
|
387
|
402
|
<sql id="ExtBase_Column_List">
|
|
388
|
403
|
shr.id, shr.storehouse_id, shr.storehouse_code, shr.check_date, shr.project, shr.problem_exist, shr.problem,
|
|
389
|
404
|
shr.opinion, shr.repair_focus, shr.remark, shr.bosshead, shr.repair_start_date, shr.repair_end_date, shr.check_person,
|
|
390
|
|
- shr.repair_status, shr.org_id
|
|
|
405
|
+ shr.repair_status, shr.org_id, shr.warehouse_id
|
|
391
|
406
|
</sql>
|
|
392
|
407
|
|
|
393
|
408
|
<select id="queryByExample" parameterType="com.chinaitop.depot.storage.model.StorageHouserepair" resultMap="BaseResultMap">
|
|
394
|
409
|
select
|
|
395
|
410
|
distinct
|
|
396
|
411
|
<include refid="ExtBase_Column_List" />,
|
|
397
|
|
- bs.storeHouse_name storehouseName
|
|
|
412
|
+ bs.storeHouse_name storehouseName,
|
|
|
413
|
+ bw.warehouse_name warehouseName
|
|
398
|
414
|
FROM storage_houserepair shr
|
|
399
|
415
|
LEFT JOIN basic_storehouse bs on bs.storehouse_id = shr.storehouse_id
|
|
|
416
|
+ LEFT JOIN basic_warehouse bw on bw.warehouse_id = shr.warehouse_id
|
|
400
|
417
|
<where>
|
|
401
|
418
|
<if test="storehouseId !=null">
|
|
402
|
419
|
and shr.storehouse_id = #{storehouseId}
|