Bladeren bron

云箭大屏生产资源

laoyao 3 jaren geleden
bovenliggende
commit
ce9d08ab5b

+ 2 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/ZZoneService.java

@@ -51,6 +51,8 @@ public interface ZZoneService extends SuperService<ZZone> {
     Map getBigScreenList(Map<String, Object> map);
 
     Map getZlzxResourceList(Map<String, Object> map);
+
+    Map getYunjianResourceList(Map<String, Object> map);
     //示范线所有的生产资源
     Map demoLineAllResource();
 

+ 35 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/ZZoneServiceImpl.java

@@ -409,6 +409,41 @@ public class ZZoneServiceImpl extends SuperServiceImpl<ZZoneMapper, ZZone> imple
     }
 
 
+    @Override
+    public Map getYunjianResourceList(Map<String, Object> map) {
+        String type = map.get("type")==null?"":map.get("type").toString();
+        List <String>list = new ArrayList<String>();
+
+
+        Map returnMap = new HashMap();
+        //查出所有生产资源
+        Map queryMap = new HashMap();
+        queryMap.put("resourceStatus","1");
+        if("1".equals(type)){//保障区
+            queryMap.put("zoneName","保障");
+        }else if("2".equals(type)){//舱体
+            queryMap.put("zoneName","舱体");
+        }else if("3".equals(type)){//矿体
+            queryMap.put("zoneName","矿体");
+        }
+        //生产资源的数据
+        List<Map> resourceList = productionresourceService.getList(queryMap);
+        //转成map
+        Map<String,Object>resourceMap = resourceList.stream(). collect(Collectors.toMap(t->t.get("id").toString(), t->t));
+        //把positon数据存放进去
+        resourceMap = setPositionMap(resourceMap);
+
+        //把线边库拼进去
+        resourceMap = setShelvesMap(resourceMap);
+        ////把任务拼进去
+//        resourceMap = setTaskMap(resourceMap);
+
+        List returnList = new ArrayList<>(resourceMap.values());
+        returnMap.put("list",returnList);
+        return returnMap;
+    }
+
+
     @Override
     public Map demoLineAllResource() {
         List <String>list = new ArrayList<String>();

+ 12 - 0
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionResourceCenter/ZZoneController.java

@@ -140,4 +140,16 @@ public class ZZoneController extends SuperController<ZZoneService, Long, ZZone,
     }
 
 
+    /**
+     * 质量中心示范线库位展示
+     * @return
+     */
+    @ApiOperation(value = "云箭设备展示", notes = "云箭设备展示")
+    @PostMapping("/yunjianResource/v1")
+    public R<Map> yunjianResource(@RequestBody(required = false) Map map) {
+        return success(baseService.getYunjianResourceList(map));
+    }
+
+
+
 }

+ 3 - 0
imcs-admin-boot/imcs-tenant-biz/src/main/resources/mapper_tenant/base/defaults/ProductionresourceviewMapper.xml

@@ -69,6 +69,9 @@
         <if test="zoneId != null">
             and a.zoneId =  #{zoneId}
         </if>
+        <if test="zoneName != null">
+            and a.zoneName like concat('%', #{zoneName}, '%')
+        </if>
         <if test="code != null and code != ''">
             and v.code = #{code}
         </if>