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