|
@@ -53,7 +53,7 @@
|
53
|
53
|
where id = #{id,jdbcType=VARCHAR}
|
54
|
54
|
</select>
|
55
|
55
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
56
|
|
- delete from t_ware_in_record
|
|
56
|
+ update t_ware_in_record set cancel_flag = '1'
|
57
|
57
|
where id = #{id,jdbcType=VARCHAR}
|
58
|
58
|
</delete>
|
59
|
59
|
<insert id="insert" parameterType="com.th.demo.model.ware.InRecord" >
|
|
@@ -70,7 +70,7 @@
|
70
|
70
|
modify_id, modify_time, cancel_id,
|
71
|
71
|
cancel_time, cancel_flag, belong_id,
|
72
|
72
|
plate_no,record_type,receive_address
|
73
|
|
- ,wgt_dcn_mtc_cd,edge_ty,production_place,car_no,ord_no,tally_people,fk_compony_name,reamrk1)
|
|
73
|
+ ,wgt_dcn_mtc_cd,edge_ty,production_place,car_no,ord_no,tally_people,fk_compony_name,remark1)
|
74
|
74
|
values (#{id,jdbcType=VARCHAR}, #{wareName,jdbcType=VARCHAR}, #{stackName,jdbcType=VARCHAR},
|
75
|
75
|
#{layer,jdbcType=INTEGER}, #{materialName,jdbcType=VARCHAR}, #{materialNo,jdbcType=VARCHAR},
|
76
|
76
|
#{standard,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR},
|
|
@@ -80,7 +80,7 @@
|
80
|
80
|
#{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR}, #{belongId,jdbcType=VARCHAR},
|
81
|
81
|
#{plateNo,jdbcType=VARCHAR},#{recordType,jdbcType=VARCHAR}, #{receiveAddress,jdbcType=VARCHAR}
|
82
|
82
|
,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},#{carNo,jdbcType=VARCHAR}
|
83
|
|
- ,#{ordNo,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{fkComponyName,jdbcType=VARCHAR},#{remark1,jdbcType=VARCHAR}
|
|
83
|
+ ,#{ordNo,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{fkComponyName,jdbcType=VARCHAR},#{remark1,jdbcType=VARCHAR})
|
84
|
84
|
</insert>
|
85
|
85
|
<insert id="insertSelective" parameterType="com.th.demo.model.ware.InRecord" >
|
86
|
86
|
insert into t_ware_in_record
|
|
@@ -334,10 +334,19 @@
|
334
|
334
|
and t.customer_name = #{param6,jdbcType=VARCHAR}
|
335
|
335
|
</if>
|
336
|
336
|
|
337
|
|
- and t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
|
|
337
|
+ and (t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
|
|
338
|
+ <if test="param16 != null and param16.size() !=0" >
|
|
339
|
+ OR t.plate_no IN <foreach item="item" collection="param16" index="index" open="(" separator="," close=")">
|
|
340
|
+ #{item,jdbcType=VARCHAR} </foreach>
|
|
341
|
+ </if>
|
|
342
|
+ )
|
338
|
343
|
and t.add_time between #{param8,jdbcType=TIMESTAMP} and #{param9,jdbcType=TIMESTAMP}
|
339
|
344
|
and t.cancel_flag = '0'
|
340
|
|
- and ifnull(t.ord_no,'*') like concat('%',#{param12,jdbcType=VARCHAR},'%')
|
|
345
|
+ and (ifnull(t.ord_no,'*') like concat('%',#{param12,jdbcType=VARCHAR},'%')
|
|
346
|
+ <if test="param17 != null and param17.size() !=0" >
|
|
347
|
+ OR ifnull(t.ord_no,'*') IN <foreach item="item" collection="param17" index="index" open="(" separator="," close=")">
|
|
348
|
+ #{item,jdbcType=VARCHAR} </foreach>
|
|
349
|
+ </if>)
|
341
|
350
|
and ifnull(t.car_no,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
|
342
|
351
|
and ((t.belong_id=#{param11,jdbcType=VARCHAR} and t.ware_name in (
|
343
|
352
|
select b.name from t_maint_userware a ,t_maint_ware b where a.ware_id = b.id
|
|
@@ -345,6 +354,7 @@
|
345
|
354
|
) or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
|
346
|
355
|
and ifnull(t.tally_people,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
|
347
|
356
|
and ifnull(a.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
|
|
357
|
+ AND ifnull(t.remark1,'*') like concat('%',#{param18,jdbcType=VARCHAR},'%')
|
348
|
358
|
order by t.add_time desc
|
349
|
359
|
</select>
|
350
|
360
|
|
|
@@ -362,10 +372,19 @@
|
362
|
372
|
<if test="param6 != null and param6 != ''" >
|
363
|
373
|
and t.customer_name = #{param6,jdbcType=VARCHAR}
|
364
|
374
|
</if>
|
365
|
|
- and t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
|
|
375
|
+ and (t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
|
|
376
|
+ <if test="param16 != null and param16.size() !=0" >
|
|
377
|
+ OR t.plate_no IN <foreach item="item" collection="param16" index="index" open="(" separator="," close=")">
|
|
378
|
+ #{item,jdbcType=VARCHAR} </foreach>
|
|
379
|
+ </if>
|
|
380
|
+ )
|
366
|
381
|
and t.add_time between #{param8,jdbcType=TIMESTAMP} and #{param9,jdbcType=TIMESTAMP}
|
367
|
382
|
and t.cancel_flag = '0'
|
368
|
|
- and ifnull(t.ord_no,'*') like concat('%',#{param12,jdbcType=VARCHAR},'%')
|
|
383
|
+ and (ifnull(t.ord_no,'*') like concat('%',#{param12,jdbcType=VARCHAR},'%')
|
|
384
|
+ <if test="param17 != null and param17.size() !=0" >
|
|
385
|
+ OR ifnull(t.ord_no,'*') IN <foreach item="item" collection="param17" index="index" open="(" separator="," close=")">
|
|
386
|
+ #{item,jdbcType=VARCHAR} </foreach>
|
|
387
|
+ </if>)
|
369
|
388
|
and ifnull(t.car_no,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
|
370
|
389
|
and ((t.belong_id=#{param11,jdbcType=VARCHAR} and t.ware_name in (
|
371
|
390
|
select b.name from t_maint_userware a ,t_maint_ware b where a.ware_id = b.id
|
|
@@ -373,6 +392,7 @@
|
373
|
392
|
) or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
|
374
|
393
|
and ifnull(t.tally_people,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
|
375
|
394
|
and ifnull(a.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
|
|
395
|
+ AND ifnull(t.remark1,'*') like concat('%',#{param18,jdbcType=VARCHAR},'%')
|
376
|
396
|
order by t.add_time desc
|
377
|
397
|
</select>
|
378
|
398
|
|