9 次代碼提交 827310abc5 ... 0c0b38721c

作者 SHA1 備註 提交日期
  hasan3hasan3 0c0b38721c Merge remote-tracking branch 'origin/master' 2 年之前
  hasan3hasan3 6ceae613f2 zlq 2 年之前
  hasan3hasan3 e4895fa019 zlq 2 年之前
  hasan3hasan3 9e9bc6455e zlq 2 年之前
  hasan3hasan3 41cd09a64c wzj 2 年之前
  hasan3hasan3 f3ff1784f9 Merge remote-tracking branch 'origin/master' 2 年之前
  hasan3hasan3 096f83f5f8 cc 2 年之前
  hasan3hasan3 da0fb0155a Merge remote-tracking branch 'origin/master' 2 年之前
  hasan3hasan3 4ec689a157 cc 2 年之前

+ 20 - 0
src/main/java/com/unis/vis/controller/VisController.java

@@ -47,6 +47,26 @@ public class VisController {
47 47
         return list;
48 48
     }
49 49
 
50
+    /**
51
+     * 物资入库情况
52
+     * @return
53
+     */
54
+    @GetMapping("/getInventoryReceiptStatus")
55
+    public List<InboundMaterialInfo> getInventoryReceiptStatus() {
56
+        List<InboundMaterialInfo> list = inboundMaterialInfoService.getInventoryReceiptStatus();
57
+        return list;
58
+    }
59
+
60
+    /**
61
+     * 物资出库情况
62
+     * @return
63
+     */
64
+    @GetMapping("/getInventoryDispatchStatus")
65
+    public List<OutboundMaterialInfo> getInventoryDispatchStatus() {
66
+        List<OutboundMaterialInfo> list = outboundMaterialInfoService.getInventoryDispatchStatus();
67
+        return list;
68
+    }
69
+
50 70
     /*物资情况*/
51 71
     @GetMapping("/getMaterialSituation")
52 72
     public List<InboundMaterialInfo> getMaterialSituation() {

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

@@ -16,11 +16,15 @@ public interface InboundMaterialInfoMapper extends BaseMapper<InboundMaterialInf
16 16
 
17 17
      List<InboundMaterialInfo> getMaterialSituation();
18 18
 
19
+     List<InboundMaterialInfo> getInventoryReceiptStatus();
20
+
19 21
      List<InboundMaterialInfo> getWzsyqkpm();
20 22
 
21
-    /**
22
-     * 出入库记录
23
-     * @return
24
-     */
25
-    List<OutAndInboundRecord> getEnterExitRecords(@Param("type") Integer type);
23
+     /**
24
+      * 出入库记录
25
+      * @return
26
+      */
27
+     List<OutAndInboundRecord> getEnterExitRecords(@Param("type") Integer type);
28
+
29
+
26 30
 }

+ 1 - 0
src/main/java/com/unis/vis/mapper/OutboundMaterialInfoMapper.java

@@ -12,6 +12,7 @@ public interface OutboundMaterialInfoMapper extends BaseMapper<OutboundMaterialI
12 12
 
13 13
     List<OutboundMaterialInfo> getMaterialCallSituation(String type,String action);
14 14
 
15
+    List<OutboundMaterialInfo> getInventoryDispatchStatus();
15 16
 
16 17
     List<OutboundMaterialInfo> getLossRecord();
17 18
 }

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

@@ -14,11 +14,10 @@ public interface InboundMaterialInfoService extends IService<InboundMaterialInfo
14 14
 
15 15
     List<InboundMaterialInfo> getMaterialSituation();
16 16
 
17
+    List<InboundMaterialInfo> getInventoryReceiptStatus();
18
+
17 19
     HashMap<String, List<InboundMaterialInfo>> getWzsyqkpm();
18 20
 
19
-    /**
20
-     * 出入库记录
21
-     * @return
22
-     */
23 21
     List<OutAndInboundRecord> getEnterExitRecords(Integer type);
22
+
24 23
 }

+ 6 - 0
src/main/java/com/unis/vis/service/OutboundMaterialInfoService.java

@@ -12,4 +12,10 @@ public interface OutboundMaterialInfoService extends IService<OutboundMaterialIn
12 12
     List<OutboundMaterialInfo>  getMaterialCallSituation(String type,String action);
13 13
 
14 14
     List<OutboundMaterialInfo> getLossRecord();
15
+
16
+    /**
17
+     * 物资出库
18
+     * @return
19
+     */
20
+    List<OutboundMaterialInfo> getInventoryDispatchStatus();
15 21
 }

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

@@ -32,6 +32,11 @@ public class InboundMaterialInfoServiceImpl extends ServiceImpl<InboundMaterialI
32 32
     }
33 33
 
34 34
     @Override
35
+    public List<InboundMaterialInfo> getInventoryReceiptStatus() {
36
+        return inboundMaterialInfoMapper.getInventoryReceiptStatus();
37
+    }
38
+
39
+    @Override
35 40
     public HashMap<String, List<InboundMaterialInfo>> getWzsyqkpm() {
36 41
         HashMap<String, List<InboundMaterialInfo>> wzsyqkpmMap = new HashMap<>();
37 42
         List<InboundMaterialInfo> wzsyqkpm = inboundMaterialInfoMapper.getWzsyqkpm();
@@ -51,6 +56,7 @@ public class InboundMaterialInfoServiceImpl extends ServiceImpl<InboundMaterialI
51 56
 
52 57
         return wzsyqkpmMap;
53 58
     }
59
+
54 60
     /**
55 61
      * 出入库记录
56 62
      * @return
@@ -60,5 +66,4 @@ public class InboundMaterialInfoServiceImpl extends ServiceImpl<InboundMaterialI
60 66
         return inboundMaterialInfoMapper.getEnterExitRecords(type);
61 67
     }
62 68
 
63
-
64 69
 }

+ 10 - 0
src/main/java/com/unis/vis/service/impl/OutboundMaterialInfoServiceImpl.java

@@ -26,4 +26,14 @@ public class OutboundMaterialInfoServiceImpl extends ServiceImpl<OutboundMateria
26 26
     public List<OutboundMaterialInfo> getLossRecord() {
27 27
         return outboundMaterialInfoMapper.getLossRecord();
28 28
     }
29
+    /**
30
+     * 物资出库
31
+     * @return
32
+     */
33
+    @Override
34
+    public List<OutboundMaterialInfo> getInventoryDispatchStatus() {
35
+        return outboundMaterialInfoMapper.getInventoryDispatchStatus();
36
+    }
37
+
38
+
29 39
 }

+ 54 - 41
src/main/resources/mapper/vis/InboundMaterialInfoMapper.xml

@@ -23,59 +23,72 @@
23 23
         where b."status"=5
24 24
         GROUP BY dic.NAME_
25 25
     </select>
26
+    <!-- 应用物资大类 -->
26 27
     <select id="getWzsyqkpm" resultType="com.unis.vis.model.InboundMaterialInfo">
27 28
         select dic.NAME_ as material_type,SUM(iif.quantity)as quantity,SUM(iif.total_price)as total_price
28 29
         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"
30
+                 left JOIN SYS_TREE_DICT dic on iif.material_type=dic.ID
31
+                 left join outbound_info b ON iif."outbound_id"=B."outbound_id"
31 32
         where b."status"=5 and dic.DIFFERENCE_=2
32 33
         GROUP BY dic.NAME_
33 34
     </select>
34
-
35
+    <!-- 物资入库情况 -->
36
+    <select id="getInventoryReceiptStatus" resultType="com.unis.vis.model.InboundMaterialInfo">
37
+        SELECT std.NAME_            as material_type,
38
+               SUM(imi.quantity)    as quantity,
39
+               SUM(imi.total_price) as total_price
40
+        FROM "inbound_material_info" imi
41
+                 LEFT JOIN "inbound_info" ii ON imi."inbound_id" = ii."inbound_id"
42
+                 LEFT JOIN "SYS_TREE_DICT" std ON std."id" = ii."material_type"
43
+        WHERE ii."status" = 5
44
+          AND ii."is_available" = 0
45
+          AND ii."material_type" in (SELECT id FROM SYS_TREE_DICT std WHERE std.DIFFERENCE_ = 2)
46
+        GROUP BY std.NAME_
47
+    </select>
35 48
     <!-- 出入库记录 -->
36 49
     <select id="getEnterExitRecords" parameterType="integer" resultType="com.unis.vis.model.OutAndInboundRecord">
37 50
         SELECT record.type,
38
-               record.shengName,
39
-               record.material_name as materialName,
40
-               record.quantity,
41
-               record.specs,
42
-               record.bound_time as boundTime
51
+        record.shengName,
52
+        record.material_name as materialName,
53
+        record.quantity,
54
+        record.specs,
55
+        record.bound_time as boundTime
43 56
         FROM (
44
-              SELECT
45
-                  1 AS type,
46
-                  null as shengName,
47
-                  std.NAME_ as material_name,
48
-                  ruku.quantity,
49
-                  ruku.specs,
50
-                  ruku.inbound_time AS bound_time
51
-              FROM "inbound_status" flow
52
-              LEFT JOIN "inbound_material_info" ruku ON ruku."inbound_id" = flow."inbound_id"
53
-              LEFT JOIN SYS_TREE_DICT std ON std.id = ruku.material_name
54
-              WHERE
55
-                flow.is_invalid = 0
56
-                AND ruku.is_available = 0
57
-                <!-- 审核通过的 -->
58
-                AND flow."status" = 5
57
+        SELECT
58
+        1 AS type,
59
+        null as shengName,
60
+        std.NAME_ as material_name,
61
+        ruku.quantity,
62
+        ruku.specs,
63
+        ruku.inbound_time AS bound_time
64
+        FROM "inbound_status" flow
65
+        LEFT JOIN "inbound_material_info" ruku ON ruku."inbound_id" = flow."inbound_id"
66
+        LEFT JOIN SYS_TREE_DICT std ON std.id = ruku.material_name
67
+        WHERE
68
+        flow.is_invalid = 0
69
+        AND ruku.is_available = 0
70
+        <!-- 审核通过的 -->
71
+        AND flow."status" = 5
59 72
 
60
-              UNION ALL
73
+        UNION ALL
61 74
 
62
-              SELECT
63
-                  2 AS type,
64
-                  dict.DESCRIPTION as shengName,
65
-                  std.NAME_ as material_name,
66
-                  chuku.quantity,
67
-                  chuku.specs,
68
-                  chuku.outbound_time AS bound_time
69
-              FROM "outbound_status" flow
70
-              LEFT JOIN "outbound_material_info" chuku ON chuku."outbound_id" = flow."outbound_id"
71
-              LEFT JOIN SYS_DICT_ITEM dict ON dict.ITEM_VALUE  = chuku."province"
72
-              LEFT JOIN SYS_TREE_DICT std ON std.id = chuku.material_name
73
-              WHERE
74
-                flow.is_invalid = 0
75
-                AND chuku.is_available = 0
76
-                <!-- 审核通过的 -->
77
-                AND flow."status" = 5
78
-                AND dict.DICT_TYPE = 'province_ch'
75
+        SELECT
76
+        2 AS type,
77
+        dict.DESCRIPTION as shengName,
78
+        std.NAME_ as material_name,
79
+        chuku.quantity,
80
+        chuku.specs,
81
+        chuku.outbound_time AS bound_time
82
+        FROM "outbound_status" flow
83
+        LEFT JOIN "outbound_material_info" chuku ON chuku."outbound_id" = flow."outbound_id"
84
+        LEFT JOIN SYS_DICT_ITEM dict ON dict.ITEM_VALUE  = chuku."province"
85
+        LEFT JOIN SYS_TREE_DICT std ON std.id = chuku.material_name
86
+        WHERE
87
+        flow.is_invalid = 0
88
+        AND chuku.is_available = 0
89
+        <!-- 审核通过的 -->
90
+        AND flow."status" = 5
91
+        AND dict.DICT_TYPE = 'province_ch'
79 92
         ) record
80 93
         <where>
81 94
             <if test="type != null and type > 0">

+ 13 - 0
src/main/resources/mapper/vis/OutboundMaterialInfoMapper.xml

@@ -24,6 +24,19 @@
24 24
         GROUP BY dic.NAME_
25 25
 
26 26
     </select>
27
+    <!-- 物资出库 -->
28
+    <select id="getInventoryDispatchStatus" resultType="com.unis.vis.model.OutboundMaterialInfo">
29
+        SELECT std.NAME_            as material_type,
30
+               SUM(imi.quantity)    as quantity,
31
+               SUM(imi.total_price) as total_price
32
+        FROM "outbound_material_info" imi
33
+                 LEFT JOIN "outbound_info" ii ON imi."outbound_id" = ii."outbound_id"
34
+                 LEFT JOIN "SYS_TREE_DICT" std ON std."id" = ii."material_type"
35
+        WHERE ii."status" = 5
36
+          AND ii."is_available" = 0
37
+          AND ii."material_type" in (SELECT id FROM SYS_TREE_DICT std WHERE std.DIFFERENCE_ = 2)
38
+        GROUP BY std.NAME_
39
+    </select>
27 40
 
28 41
     <!-- 损耗记录 -->
29 42
     <select id="getLossRecord" resultType="com.unis.vis.model.OutboundMaterialInfo">