Sfoglia il codice sorgente

cc

物资出库
物资入库

zlq
getWzsyqkpm
hasan3hasan3 2 anni fa
parent
commit
096f83f5f8

+ 5 - 0
src/main/java/com/unis/vis/mapper/InboundMaterialInfoMapper.java

@@ -13,4 +13,9 @@ public interface InboundMaterialInfoMapper extends BaseMapper<InboundMaterialInf
13
      List<InboundMaterialInfo> getEmergencySuppliesCategory();
13
      List<InboundMaterialInfo> getEmergencySuppliesCategory();
14
 
14
 
15
      List<InboundMaterialInfo> getMaterialSituation();
15
      List<InboundMaterialInfo> getMaterialSituation();
16
+
17
+     List<InboundMaterialInfo> getInventoryReceiptStatus();
18
+
19
+     List<InboundMaterialInfo> getWzsyqkpm();
20
+
16
 }
21
 }

+ 4 - 0
src/main/java/com/unis/vis/service/InboundMaterialInfoService.java

@@ -3,6 +3,7 @@ package com.unis.vis.service;
3
 import com.baomidou.mybatisplus.extension.service.IService;
3
 import com.baomidou.mybatisplus.extension.service.IService;
4
 import com.unis.vis.model.InboundMaterialInfo;
4
 import com.unis.vis.model.InboundMaterialInfo;
5
 
5
 
6
+import java.util.HashMap;
6
 import java.util.List;
7
 import java.util.List;
7
 
8
 
8
 
9
 
@@ -12,5 +13,8 @@ public interface InboundMaterialInfoService extends IService<InboundMaterialInfo
12
 
13
 
13
     List<InboundMaterialInfo> getMaterialSituation();
14
     List<InboundMaterialInfo> getMaterialSituation();
14
 
15
 
16
+    List<InboundMaterialInfo> getInventoryReceiptStatus();
17
+
18
+    HashMap<String, List<InboundMaterialInfo>> getWzsyqkpm();
15
 
19
 
16
 }
20
 }

+ 1 - 2
src/main/java/com/unis/vis/service/impl/InboundMaterialInfoServiceImpl.java

@@ -34,6 +34,7 @@ public class InboundMaterialInfoServiceImpl extends ServiceImpl<InboundMaterialI
34
     public List<InboundMaterialInfo> getInventoryReceiptStatus() {
34
     public List<InboundMaterialInfo> getInventoryReceiptStatus() {
35
         return inboundMaterialInfoMapper.getInventoryReceiptStatus();
35
         return inboundMaterialInfoMapper.getInventoryReceiptStatus();
36
     }
36
     }
37
+
37
     @Override
38
     @Override
38
     public HashMap<String, List<InboundMaterialInfo>> getWzsyqkpm() {
39
     public HashMap<String, List<InboundMaterialInfo>> getWzsyqkpm() {
39
         HashMap<String, List<InboundMaterialInfo>> wzsyqkpmMap = new HashMap<>();
40
         HashMap<String, List<InboundMaterialInfo>> wzsyqkpmMap = new HashMap<>();
@@ -54,6 +55,4 @@ public class InboundMaterialInfoServiceImpl extends ServiceImpl<InboundMaterialI
54
 
55
 
55
         return wzsyqkpmMap;
56
         return wzsyqkpmMap;
56
     }
57
     }
57
-
58
-
59
 }
58
 }

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

@@ -23,5 +23,25 @@
23
         where b."status"=5
23
         where b."status"=5
24
         GROUP BY dic.NAME_
24
         GROUP BY dic.NAME_
25
     </select>
25
     </select>
26
-
26
+    <select id="getWzsyqkpm" resultType="com.unis.vis.model.InboundMaterialInfo">
27
+        select dic.NAME_ as material_type,SUM(iif.quantity)as quantity,SUM(iif.total_price)as total_price
28
+        from outbound_material_info iif
29
+                 left JOIN SYS_TREE_DICT dic on iif.material_type=dic.ID
30
+                 left join outbound_info b ON iif."outbound_id"=B."outbound_id"
31
+        where b."status"=5 and dic.DIFFERENCE_=2
32
+        GROUP BY dic.NAME_
33
+    </select>
34
+    <!-- 物资入库情况 -->
35
+    <select id="getInventoryReceiptStatus" resultType="com.unis.vis.model.InboundMaterialInfo">
36
+        SELECT std.NAME_            as material_type,
37
+               SUM(imi.quantity)    as quantity,
38
+               SUM(imi.total_price) as total_price
39
+        FROM "inbound_material_info" imi
40
+                 LEFT JOIN "inbound_info" ii ON imi."inbound_id" = ii."inbound_id"
41
+                 LEFT JOIN "SYS_TREE_DICT" std ON std."id" = ii."material_type"
42
+        WHERE ii."status" = 5
43
+          AND ii."is_available" = 0
44
+          AND ii."material_type" in (SELECT id FROM SYS_TREE_DICT std WHERE std.DIFFERENCE_ = 2)
45
+        GROUP BY std.NAME_
46
+    </select>
27
 </mapper>
47
 </mapper>