|
|
@@ -13,7 +13,7 @@
|
|
13
|
13
|
GROUP BY dic.NAME_
|
|
14
|
14
|
</select>-->
|
|
15
|
15
|
<!-- 物资调用情况 -->
|
|
16
|
|
- <select id="getMaterialCallSituation" resultType="com.unis.vis.model.OutboundMaterialInfo">
|
|
|
16
|
+ <select id="getMaterialCallSituationDY" resultType="com.unis.vis.model.OutboundMaterialInfo">
|
|
17
|
17
|
SELECT dic.NAME_ as material_type,
|
|
18
|
18
|
SUM(CASE WHEN iif.is_available = 0 THEN iif.quantity ELSE 0 END) AS yes_quantity,
|
|
19
|
19
|
SUM(CASE WHEN iif.is_available = 1 THEN iif.quantity ELSE 0 END) AS no_quantity
|
|
|
@@ -48,10 +48,54 @@
|
|
48
|
48
|
<if test="type == 12">
|
|
49
|
49
|
AND iif.material_type = 12
|
|
50
|
50
|
</if>
|
|
|
51
|
+ GROUP BY dic.NAME_
|
|
51
|
52
|
|
|
|
53
|
+ </select>
|
|
|
54
|
+ <!-- 物资调用情况 -->
|
|
|
55
|
+ <select id="getMaterialCallSituationDC" resultType="com.unis.vis.model.OutboundMaterialInfo">
|
|
|
56
|
+ SELECT --dic.NAME_ as material_type,
|
|
|
57
|
+ iif.province,b.warehouse,sum(total_price)as total_price,
|
|
|
58
|
+ SUM(CASE WHEN iif.is_available = 0 THEN iif.quantity ELSE 0 END) AS quantity
|
|
|
59
|
+ -- SUM(CASE WHEN iif.is_available = 1 THEN iif.quantity ELSE 0 END) AS no_quantity
|
|
|
60
|
+ from outbound_material_info iif
|
|
|
61
|
+ left JOIN SYS_TREE_DICT dic on iif.material_type=DIC.ID
|
|
|
62
|
+ left join outbound_info b ON iif."outbound_id"=B."outbound_id"
|
|
|
63
|
+ left JOIN SYS_DICT_ITEM c on iif."province"=c.ITEM_VALUE
|
|
|
64
|
+ where b."status"=5 and C.dict_type='province_ch'
|
|
|
65
|
+ GROUP BY b.warehouse
|
|
|
66
|
+ <if test="type == 4">
|
|
|
67
|
+ AND iif.material_type = 4
|
|
|
68
|
+ </if>
|
|
|
69
|
+ <if test="type == 5">
|
|
|
70
|
+ AND iif.material_type = 5
|
|
|
71
|
+ </if>
|
|
|
72
|
+ <if test="type == 6">
|
|
|
73
|
+ AND iif.material_type = 6
|
|
|
74
|
+ </if>
|
|
|
75
|
+ <if test="type == 7">
|
|
|
76
|
+ AND iif.material_type = 7
|
|
|
77
|
+ </if>
|
|
|
78
|
+ <if test="type == 8">
|
|
|
79
|
+ AND iif.material_type = 8
|
|
|
80
|
+ </if>
|
|
|
81
|
+ <if test="type == 9">
|
|
|
82
|
+ AND iif.material_type = 9
|
|
|
83
|
+ </if>
|
|
|
84
|
+ <if test="type == 10">
|
|
|
85
|
+ AND iif.material_type = 10
|
|
|
86
|
+ </if>
|
|
|
87
|
+ <if test="type == 11">
|
|
|
88
|
+ AND iif.material_type = 11
|
|
|
89
|
+ </if>
|
|
|
90
|
+ <if test="type == 12">
|
|
|
91
|
+ AND iif.material_type = 12
|
|
|
92
|
+ </if>
|
|
52
|
93
|
GROUP BY dic.NAME_
|
|
53
|
94
|
|
|
54
|
95
|
</select>
|
|
|
96
|
+
|
|
|
97
|
+
|
|
|
98
|
+
|
|
55
|
99
|
<!-- 物资出库情况 -->
|
|
56
|
100
|
<select id="getInventoryDispatchStatus" resultType="com.unis.vis.model.OutboundMaterialInfo">
|
|
57
|
101
|
SELECT std.NAME_ as material_type,
|