ZeroLiYi пре 2 година
родитељ
комит
0450ee3ee8
1 измењених фајлова са 8 додато и 1 уклоњено
  1. 8 1
      src/main/resources/mapper/vis/InboundMaterialInfoMapper.xml

+ 8 - 1
src/main/resources/mapper/vis/InboundMaterialInfoMapper.xml

@@ -63,12 +63,15 @@
63
         FROM "inbound_status" flow
63
         FROM "inbound_status" flow
64
         LEFT JOIN "inbound_material_info" ruku ON ruku."inbound_id" = flow."inbound_id"
64
         LEFT JOIN "inbound_material_info" ruku ON ruku."inbound_id" = flow."inbound_id"
65
         LEFT JOIN SYS_TREE_DICT std ON std.id = ruku.material_name
65
         LEFT JOIN SYS_TREE_DICT std ON std.id = ruku.material_name
66
+        LEFT JOIN inbound_info ii ON ii.inbound_id = ruku.inbound_id
66
         WHERE
67
         WHERE
67
         flow.is_invalid = 0
68
         flow.is_invalid = 0
68
         AND ruku.is_available = 0
69
         AND ruku.is_available = 0
69
         <!-- 审核通过的 -->
70
         <!-- 审核通过的 -->
70
         AND flow."status" = 5
71
         AND flow."status" = 5
71
-
72
+        <if test="type != null">
73
+            AND ii.name = #{name}
74
+        </if>
72
         UNION ALL
75
         UNION ALL
73
 
76
 
74
         SELECT
77
         SELECT
@@ -82,12 +85,16 @@
82
         LEFT JOIN "outbound_material_info" chuku ON chuku."outbound_id" = flow."outbound_id"
85
         LEFT JOIN "outbound_material_info" chuku ON chuku."outbound_id" = flow."outbound_id"
83
         LEFT JOIN SYS_DICT_ITEM dict ON dict.ITEM_VALUE  = chuku."province"
86
         LEFT JOIN SYS_DICT_ITEM dict ON dict.ITEM_VALUE  = chuku."province"
84
         LEFT JOIN SYS_TREE_DICT std ON std.id = chuku.material_name
87
         LEFT JOIN SYS_TREE_DICT std ON std.id = chuku.material_name
88
+        LEFT JOIN inbound_info ii ON ii.outbound_id = chuku.outbound_id
85
         WHERE
89
         WHERE
86
         flow.is_invalid = 0
90
         flow.is_invalid = 0
87
         AND chuku.is_available = 0
91
         AND chuku.is_available = 0
88
         <!-- 审核通过的 -->
92
         <!-- 审核通过的 -->
89
         AND flow."status" = 5
93
         AND flow."status" = 5
90
         AND dict.DICT_TYPE = 'province_ch'
94
         AND dict.DICT_TYPE = 'province_ch'
95
+        <if test="name != null">
96
+            AND ii.name = #{name}
97
+        </if>
91
         ) record
98
         ) record
92
         <where>
99
         <where>
93
             <if test="type != null and type > 0">
100
             <if test="type != null and type > 0">