YL2767 2 days ago
parent
commit
dd5694b232

+ 7
- 7
src/main/resource/localhost/db.properties View File

@@ -3,12 +3,12 @@
3 3
 #jdbc.user=root
4 4
 #jdbc.password=root
5 5
 
6
-#jdbc.driverClass=com.mysql.jdbc.Driver
7
-#jdbc.jdbcUrl=jdbc:mysql://localhost:3306/ware_zg?characterEncoding=utf8
8
-#jdbc.user=root
9
-#jdbc.password=root
10
-
11 6
 jdbc.driverClass=com.mysql.jdbc.Driver
12
-jdbc.jdbcUrl=jdbc:mysql://60.205.9.174:3309/ware_zg?useUnicode=true&characterEncoding=utf8
7
+jdbc.jdbcUrl=jdbc:mysql://localhost:3306/ware_zg?characterEncoding=utf8
13 8
 jdbc.user=root
14
-jdbc.password=122403
9
+jdbc.password=root
10
+
11
+#jdbc.driverClass=com.mysql.jdbc.Driver
12
+#jdbc.jdbcUrl=jdbc:mysql://60.205.9.174:3309/ware_zg?useUnicode=true&characterEncoding=utf8
13
+#jdbc.user=root
14
+#jdbc.password=122403

+ 7
- 2
src/main/resource/mapper/ware/InRecordMapper.xml View File

@@ -354,7 +354,10 @@
354 354
             and  a.user_id = #{param10,jdbcType=VARCHAR}  )
355 355
             )  or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
356 356
     and ifnull(t.tally_people,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
357
-    and ifnull(a.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
357
+    <if test="param15 != null and param15 != ''">
358
+      and ifnull(a.name,'*') = #{param15,jdbcType=VARCHAR}
359
+    </if>
360
+
358 361
 
359 362
     and  (t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
360 363
     <if test="param18 != null and param18.size() !=0" >
@@ -405,7 +408,9 @@
405 408
             and  a.user_id = #{param10,jdbcType=VARCHAR}  )
406 409
             )  or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
407 410
     and ifnull(t.tally_people,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
408
-    and ifnull(a.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
411
+    <if test="param15 != null and param15 != ''">
412
+      and ifnull(a.name,'*') = #{param15,jdbcType=VARCHAR}
413
+    </if>
409 414
     and  (t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
410 415
     <if test="param18 != null and param18.size() !=0" >
411 416
       or t.plate_no IN <foreach  item="item" collection="param18" index="index"  open="(" separator="," close=")">

+ 6
- 2
src/main/resource/mapper/ware/OutRecordMapper.xml View File

@@ -425,7 +425,9 @@
425 425
             )  or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
426 426
    and ifnull(p.tally_people,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
427 427
    and ifnull(c.ord_no,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
428
-   and ifnull(e.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
428
+    <if test="param15 != null and param15 != ''">
429
+      and ifnull(e.name,'*') = #{param15,jdbcType=VARCHAR}
430
+    </if>
429 431
     and ifnull(t.back_flag,0) &lt;> '1'
430 432
     order by t.add_time desc
431 433
   </select>
@@ -452,7 +454,9 @@
452 454
             and  a.user_id = #{param10,jdbcType=VARCHAR}  )
453 455
             )  or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
454 456
     and ifnull(p.tally_people,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
455
-    and ifnull(e.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
457
+    <if test="param15 != null and param15 != ''">
458
+      and ifnull(e.name,'*') = #{param15,jdbcType=VARCHAR}
459
+    </if>
456 460
     and ifnull(t.back_flag,0) &lt;> '1'
457 461
     and  (t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
458 462
     <if test="param18 != null and param18.size() !=0" >

+ 18
- 5
src/main/resource/mapper/ware/StoreMapper.xml View File

@@ -495,8 +495,12 @@ update t_ware_store t set t.layer =   #{param7,jdbcType=INTEGER}
495 495
     and  t.model like concat('%',#{param3,jdbcType=VARCHAR},'%')
496 496
     and  c.name like concat('%',#{param4,jdbcType=VARCHAR},'%')
497 497
     and  c.standard like concat('%',#{param5,jdbcType=VARCHAR},'%')
498
-    and  d.name like concat('%',#{param6,jdbcType=VARCHAR},'%')
499
-    and  e.name like concat('%',#{param9,jdbcType=VARCHAR},'%')
498
+    <if test="param6 != null and param6 != ''">
499
+      and ifnull(d.name,'*') = #{param6,jdbcType=VARCHAR}
500
+    </if>
501
+    <if test="param9 != null and param9 != ''">
502
+      and ifnull(e.name,'*') = #{param9,jdbcType=VARCHAR}
503
+    </if>
500 504
 
501 505
       and  (t.plate_no like concat('%',#{param10,jdbcType=VARCHAR},'%')
502 506
     <if test="param13 != null and param13.size() !=0" >
@@ -556,8 +560,12 @@ update t_ware_store t set t.layer =   #{param7,jdbcType=INTEGER}
556 560
     and  t.model like concat('%',#{param3,jdbcType=VARCHAR},'%')
557 561
     and  c.name like concat('%',#{param4,jdbcType=VARCHAR},'%')
558 562
     and  c.standard like concat('%',#{param5,jdbcType=VARCHAR},'%')
559
-    and  d.name like concat('%',#{param6,jdbcType=VARCHAR},'%')
560
-    and  e.name like concat('%',#{param9,jdbcType=VARCHAR},'%')
563
+    <if test="param6 != null and param6 != ''">
564
+      and ifnull(d.name,'*') = #{param6,jdbcType=VARCHAR}
565
+    </if>
566
+    <if test="param9 != null and param9 != ''">
567
+      and ifnull(e.name,'*') = #{param9,jdbcType=VARCHAR}
568
+    </if>
561 569
 
562 570
     and  (t.plate_no like concat('%',#{param10,jdbcType=VARCHAR},'%')
563 571
     <if test="param13 != null and param13.size() !=0" >
@@ -673,7 +681,12 @@ update t_ware_store t set t.layer =   #{param7,jdbcType=INTEGER}
673 681
     and  t.model like concat('%',#{param3,jdbcType=VARCHAR},'%')
674 682
     and  c.name like concat('%',#{param4,jdbcType=VARCHAR},'%')
675 683
     and  c.standard like concat('%',#{param5,jdbcType=VARCHAR},'%')
676
-    and  d.name like concat('%',#{param6,jdbcType=VARCHAR},'%')
684
+    <if test="param6 != null and param6 != ''">
685
+      and ifnull(d.name,'*') = #{param6,jdbcType=VARCHAR}
686
+    </if>
687
+    <if test="param9 != null and param9 != ''">
688
+      and ifnull(e.name,'*') = #{param9,jdbcType=VARCHAR}
689
+    </if>
677 690
     and  t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
678 691
     and t.cancel_flag = '0'
679 692
     and t.out_flag = '0'

Loading…
Cancel
Save