|
|
@@ -424,5 +424,139 @@
|
|
424
|
424
|
order by t.add_time desc
|
|
425
|
425
|
</select>
|
|
426
|
426
|
|
|
|
427
|
+ <!-- 导出转移记录查询,返回Map列表 -->
|
|
|
428
|
+ <select id="selectForExport" resultType="java.util.Map">
|
|
|
429
|
+ select
|
|
|
430
|
+ t.ware_name as wareName,
|
|
|
431
|
+ t.stack_name as stackName,
|
|
|
432
|
+ t.layer as layer,
|
|
|
433
|
+ t.material_name as materialName,
|
|
|
434
|
+ t.model as model,
|
|
|
435
|
+ t.standard as standard,
|
|
|
436
|
+ t.count as count,
|
|
|
437
|
+ t.weight as weight,
|
|
|
438
|
+ t.plate_no as plateNo,
|
|
|
439
|
+ (case t.record_type when '0' then '入库取消' when '1' then '入库' else t.record_type end) as recordType,
|
|
|
440
|
+ t.customer_name_old as customerNameOld,
|
|
|
441
|
+ t.receive_address_old as receiveAddressOld,
|
|
|
442
|
+ t.customer_name_new as customerNameNew,
|
|
|
443
|
+ t.receive_address_new as receiveAddressNew,
|
|
|
444
|
+ t.wgt_dcn_mtc_cd as wgtDcnMtcCd,
|
|
|
445
|
+ t.edge_ty as edgeTy,
|
|
|
446
|
+ t.production_place as productionPlace,
|
|
|
447
|
+ t.remark as remark,
|
|
|
448
|
+ u.user_desc as addUserUserDesc,
|
|
|
449
|
+ t.add_time as addTime
|
|
|
450
|
+ from t_ware_change_record t
|
|
|
451
|
+ left join sys_user u on t.add_id = u.id
|
|
|
452
|
+ where 1=1
|
|
|
453
|
+ <if test="param1 != null and param1 != ''">
|
|
|
454
|
+ and t.ware_name like concat('%', #{param1,jdbcType=VARCHAR}, '%')
|
|
|
455
|
+ </if>
|
|
|
456
|
+ <if test="param2 != null and param2 != ''">
|
|
|
457
|
+ and t.stack_name like concat('%', #{param2,jdbcType=VARCHAR}, '%')
|
|
|
458
|
+ </if>
|
|
|
459
|
+ <if test="param3 != null and param3 != ''">
|
|
|
460
|
+ and t.model like concat('%', #{param3,jdbcType=VARCHAR}, '%')
|
|
|
461
|
+ </if>
|
|
|
462
|
+ <if test="param4 != null and param4 != ''">
|
|
|
463
|
+ and t.material_name like concat('%', #{param4,jdbcType=VARCHAR}, '%')
|
|
|
464
|
+ </if>
|
|
|
465
|
+ <if test="param5 != null and param5 != ''">
|
|
|
466
|
+ and t.standard like concat('%', #{param5,jdbcType=VARCHAR}, '%')
|
|
|
467
|
+ </if>
|
|
|
468
|
+ <if test="param6 != null and param6 != ''">
|
|
|
469
|
+ and (t.customer_name_old like concat('%', #{param6,jdbcType=VARCHAR}, '%')
|
|
|
470
|
+ or t.customer_name_new like concat('%', #{param6,jdbcType=VARCHAR}, '%'))
|
|
|
471
|
+ </if>
|
|
|
472
|
+ <if test="param7 != null and param7 != ''">
|
|
|
473
|
+ and t.plate_no like concat('%', #{param7,jdbcType=VARCHAR}, '%')
|
|
|
474
|
+ </if>
|
|
|
475
|
+ <if test="param8 != null">
|
|
|
476
|
+ and t.add_time >= #{param8,jdbcType=TIMESTAMP}
|
|
|
477
|
+ </if>
|
|
|
478
|
+ <if test="param9 != null">
|
|
|
479
|
+ and t.add_time <= #{param9,jdbcType=TIMESTAMP}
|
|
|
480
|
+ </if>
|
|
|
481
|
+ <if test="param10 != null and param10 != ''">
|
|
|
482
|
+ and t.ware_name in (
|
|
|
483
|
+ select b.name from t_maint_userware a, t_maint_ware b
|
|
|
484
|
+ where a.ware_id = b.id and a.user_id = #{param10,jdbcType=VARCHAR}
|
|
|
485
|
+ )
|
|
|
486
|
+ </if>
|
|
|
487
|
+ <if test="param11 != null and param11 != ''">
|
|
|
488
|
+ and t.belong_id = #{param11,jdbcType=VARCHAR}
|
|
|
489
|
+ </if>
|
|
|
490
|
+ and t.cancel_flag = '0'
|
|
|
491
|
+ order by t.add_time desc
|
|
|
492
|
+ </select>
|
|
|
493
|
+
|
|
|
494
|
+ <!-- 分批导出转移记录查询,支持分页 -->
|
|
|
495
|
+ <select id="selectForExportBatch" resultType="java.util.Map">
|
|
|
496
|
+ select
|
|
|
497
|
+ t.ware_name as wareName,
|
|
|
498
|
+ t.stack_name as stackName,
|
|
|
499
|
+ t.layer as layer,
|
|
|
500
|
+ t.material_name as materialName,
|
|
|
501
|
+ t.model as model,
|
|
|
502
|
+ t.standard as standard,
|
|
|
503
|
+ t.count as count,
|
|
|
504
|
+ t.weight as weight,
|
|
|
505
|
+ t.plate_no as plateNo,
|
|
|
506
|
+ (case t.record_type when '0' then '入库取消' when '1' then '入库' else t.record_type end) as recordType,
|
|
|
507
|
+ t.customer_name_old as customerNameOld,
|
|
|
508
|
+ t.receive_address_old as receiveAddressOld,
|
|
|
509
|
+ t.customer_name_new as customerNameNew,
|
|
|
510
|
+ t.receive_address_new as receiveAddressNew,
|
|
|
511
|
+ t.wgt_dcn_mtc_cd as wgtDcnMtcCd,
|
|
|
512
|
+ t.edge_ty as edgeTy,
|
|
|
513
|
+ t.production_place as productionPlace,
|
|
|
514
|
+ t.remark as remark,
|
|
|
515
|
+ u.user_desc as addUserUserDesc,
|
|
|
516
|
+ t.add_time as addTime
|
|
|
517
|
+ from t_ware_change_record t
|
|
|
518
|
+ left join sys_user u on t.add_id = u.id
|
|
|
519
|
+ where 1=1
|
|
|
520
|
+ <if test="param1 != null and param1 != ''">
|
|
|
521
|
+ and t.ware_name like concat('%', #{param1,jdbcType=VARCHAR}, '%')
|
|
|
522
|
+ </if>
|
|
|
523
|
+ <if test="param2 != null and param2 != ''">
|
|
|
524
|
+ and t.stack_name like concat('%', #{param2,jdbcType=VARCHAR}, '%')
|
|
|
525
|
+ </if>
|
|
|
526
|
+ <if test="param3 != null and param3 != ''">
|
|
|
527
|
+ and t.model like concat('%', #{param3,jdbcType=INTEGER}, '%')
|
|
|
528
|
+ </if>
|
|
|
529
|
+ <if test="param4 != null and param4 != ''">
|
|
|
530
|
+ and t.material_name like concat('%', #{param4,jdbcType=VARCHAR}, '%')
|
|
|
531
|
+ </if>
|
|
|
532
|
+ <if test="param5 != null and param5 != ''">
|
|
|
533
|
+ and t.standard like concat('%', #{param5,jdbcType=VARCHAR}, '%')
|
|
|
534
|
+ </if>
|
|
|
535
|
+ <if test="param6 != null and param6 != ''">
|
|
|
536
|
+ and (t.customer_name_old like concat('%', #{param6,jdbcType=VARCHAR}, '%')
|
|
|
537
|
+ or t.customer_name_new like concat('%', #{param6,jdbcType=VARCHAR}, '%'))
|
|
|
538
|
+ </if>
|
|
|
539
|
+ <if test="param7 != null and param7 != ''">
|
|
|
540
|
+ and t.plate_no like concat('%', #{param7,jdbcType=VARCHAR}, '%')
|
|
|
541
|
+ </if>
|
|
|
542
|
+ <if test="param8 != null and param9 != null">
|
|
|
543
|
+ and t.add_time between #{param8,jdbcType=TIMESTAMP} and #{param9,jdbcType=TIMESTAMP}
|
|
|
544
|
+ </if>
|
|
|
545
|
+ <if test="param10 != null and param10 != ''">
|
|
|
546
|
+ and t.ware_name in (
|
|
|
547
|
+ select b.name from t_maint_userware a, t_maint_ware b
|
|
|
548
|
+ where a.ware_id = b.id and a.user_id = #{param10,jdbcType=VARCHAR}
|
|
|
549
|
+ )
|
|
|
550
|
+ </if>
|
|
|
551
|
+ <if test="param11 != null and param11 != ''">
|
|
|
552
|
+ and t.belong_id = #{param11,jdbcType=VARCHAR}
|
|
|
553
|
+ </if>
|
|
|
554
|
+ and t.cancel_flag = '0'
|
|
|
555
|
+ order by t.add_time desc
|
|
|
556
|
+ <if test="param12 != null and param12 >= 0">
|
|
|
557
|
+ LIMIT #{param13,jdbcType=INTEGER} OFFSET #{param12,jdbcType=INTEGER}
|
|
|
558
|
+ </if>
|
|
|
559
|
+ </select>
|
|
|
560
|
+
|
|
427
|
561
|
|
|
428
|
562
|
</mapper>
|