Browse Source

Merge branch 'master' of http://101.36.160.140:21044/emergency-report/vsualization-report

ZeroLiYi 2 years ago
parent
commit
a35997f27e

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

@@ -98,8 +98,8 @@ public class VisController {
98 98
      * 物资储备情况
99 99
      */
100 100
     @GetMapping("/get-material-situation")
101
-    public Map<String,List<MaterialReserveSituationVO>> selectWarehouseForMaterialType() {
102
-        return inboundMaterialInfoService.selectWarehouseForMaterialType();
101
+    public Map<String,List<MaterialReserveSituationVO>> selectWarehouseForMaterialType(@RequestParam String warehouse) {
102
+        return inboundMaterialInfoService.selectWarehouseForMaterialType(warehouse);
103 103
     }
104 104
     /**
105 105
      * 出入库记录

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

@@ -18,7 +18,7 @@ public interface InboundMaterialInfoMapper extends BaseMapper<InboundMaterialInf
18 18
      List<InboundMaterialInfo> getMaterialSituation();
19 19
 
20 20
 
21
-    List<MaterialReserveSituationVO> selectWarehouseForMaterialType();
21
+    List<MaterialReserveSituationVO> selectWarehouseForMaterialType(@Param("warehouse") String warehouse);
22 22
 
23 23
      List<InboundMaterialInfo> getInventoryReceiptStatus();
24 24
 

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

@@ -21,5 +21,5 @@ public interface InboundMaterialInfoService extends IService<InboundMaterialInfo
21 21
     HashMap<String, List<InboundMaterialInfo>> getWzsyqkpm();
22 22
 
23 23
     List<OutAndInboundRecord> getEnterExitRecords(Integer type);
24
-    Map<String,List<MaterialReserveSituationVO>> selectWarehouseForMaterialType();
24
+    Map<String,List<MaterialReserveSituationVO>> selectWarehouseForMaterialType(String warehouse);
25 25
 }

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

@@ -35,8 +35,8 @@ public class InboundMaterialInfoServiceImpl extends ServiceImpl<InboundMaterialI
35 35
     }
36 36
 
37 37
     @Override
38
-    public Map<String, List<MaterialReserveSituationVO>> selectWarehouseForMaterialType() {
39
-        List<MaterialReserveSituationVO> situationVOS = inboundMaterialInfoMapper.selectWarehouseForMaterialType();
38
+    public Map<String, List<MaterialReserveSituationVO>> selectWarehouseForMaterialType(String warehouse) {
39
+        List<MaterialReserveSituationVO> situationVOS = inboundMaterialInfoMapper.selectWarehouseForMaterialType(warehouse);
40 40
         Map<String, List<MaterialReserveSituationVO>> collect =new HashMap<>();
41 41
         if (situationVOS!=null&&!situationVOS.isEmpty()){
42 42
              collect = situationVOS.stream().collect(Collectors.groupingBy(MaterialReserveSituationVO::getMaterialTypeZn));

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

@@ -114,7 +114,10 @@
114 114
                  left JOIN SYS_TREE_DICT d on a.material_name=d.ID
115 115
                  left JOIN SYS_TREE_DICT e on a.unit=e.ID
116 116
         where b.status=5  AND  b.is_available=0 AND  a.is_available=0
117
-        group  by  b.warehouse,a.material_type,a.material_name
117
+        <if test="warehouse!=null and warehouse!=''">
118
+            AND b.warehouse =#{warehouse}
119
+        </if>
120
+        group  by  a.material_type,a.material_name,a.specs
118 121
     </select>
119 122
 
120 123
 </mapper>