mengy 8 mēneši atpakaļ
vecāks
revīzija
827310abc5

+ 6 - 1
src/main/java/com/unis/vis/controller/VisController.java

@@ -79,5 +79,10 @@ public class VisController {
79 79
         return inboundMaterialInfoService.getEnterExitRecords(type);
80 80
     }
81 81
 
82
-
82
+    /*损耗记录*/
83
+    @GetMapping("/getLossRecord")
84
+    public List<OutboundMaterialInfo> getLossRecord() {
85
+        List<OutboundMaterialInfo> list = outboundMaterialInfoService.getLossRecord();
86
+        return list;
87
+    }
83 88
 }

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

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

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

@@ -11,4 +11,5 @@ public interface OutboundMaterialInfoService extends IService<OutboundMaterialIn
11 11
 
12 12
     List<OutboundMaterialInfo>  getMaterialCallSituation(String type,String action);
13 13
 
14
+    List<OutboundMaterialInfo> getLossRecord();
14 15
 }

+ 4 - 1
src/main/java/com/unis/vis/service/impl/OutboundMaterialInfoServiceImpl.java

@@ -22,5 +22,8 @@ public class OutboundMaterialInfoServiceImpl extends ServiceImpl<OutboundMateria
22 22
         return outboundMaterialInfoMapper.getMaterialCallSituation(type,action);
23 23
     }
24 24
 
25
-
25
+    @Override
26
+    public List<OutboundMaterialInfo> getLossRecord() {
27
+        return outboundMaterialInfoMapper.getLossRecord();
28
+    }
26 29
 }

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

@@ -25,4 +25,15 @@
25 25
 
26 26
     </select>
27 27
 
28
+    <!-- 损耗记录 -->
29
+    <select id="getLossRecord" resultType="com.unis.vis.model.OutboundMaterialInfo">
30
+        SELECT omi."material_name",oi."outbound_type",sdi.LABEL ,SUM(oi."quantity") ,omi."unit" ,SUM(omi."total_price")
31
+        FROM
32
+            "outbound_material_info" omi
33
+                LEFT JOIN "outbound_info" oi ON oi."outbound_id" = omi."outbound_id"
34
+                LEFT JOIN "outbound_status" os ON os."outbound_id" = omi."outbound_id"
35
+                LEFT JOIN SYS_DICT_ITEM sdi ON sdi.ITEM_VALUE = oi."outbound_type"
36
+        WHERE oi."status" =5 AND omi."is_available" = 0 AND sdi.DICT_TYPE = 'outbound_type'
37
+        GROUP BY oi."warehouse"
38
+    </select>
28 39
 </mapper>