From b885f63a2990ece741fc6db5c55aeeae673062b3 Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期二, 24 十月 2023 17:22:31 +0800 Subject: [PATCH] 输送线到AGV流程 --- src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java b/src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java index db9685d..2cf9450 100644 --- a/src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java +++ b/src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import com.core.common.Cools; import com.core.exception.CoolException; import com.zy.asrs.entity.AgvWrkMast; import com.zy.asrs.entity.param.AgvTaskCreateParam; @@ -43,6 +44,9 @@ @Value("${agv.containerMoveOutPath}") private String containerMoveOutPath; + @Value("${agv.containerArrivedPath}") + private String containerArrivedPath; + @Autowired AgvWrkMastMapper agvWrkMastMapper; @Autowired @@ -73,11 +77,6 @@ AgvTaskCreateParam agvTaskCreateParam = new AgvTaskCreateParam(); agvTaskCreateParam.setTaskType(taskType); -// //璋冪敤瀹瑰櫒鍏ュ満鏃舵墍闇�瑕佸弬鏁� -// Map<String,List<Map<String,String>>> containerMoveParam = new HashMap<>(); -// List<Map<String,String>> positionCodeMapList = new ArrayList<>(); -// containerMoveParam.put("containerMoveIns",positionCodeMapList); - getRequestParam(agvTaskCreateParam,agvWrkMastList); return doHttpRequest(agvTaskCreateParam,"鎼繍浠诲姟涓嬪彂",url, taskCreatePath,null,"127.0.0.1"); @@ -86,13 +85,17 @@ } //瀹瑰櫒鍏ュ満 - public int containerMove(List<AgvWrkMast> agvWrkMastList) throws IOException { + public int containerMoveIn(List<AgvWrkMast> agvWrkMastList) throws IOException { //璋冪敤瀹瑰櫒鍏ュ満鏃舵墍闇�瑕佸弬鏁� Map<String,List<Map<String,String>>> containerMoveParam = new HashMap<>(); List<Map<String,String>> positionCodeMapList = new ArrayList<>(); containerMoveParam.put("containerMoveIns",positionCodeMapList); getContainerMoveParam(agvWrkMastList,positionCodeMapList); + + if(Cools.isEmpty(positionCodeMapList)){ + return 0; + } return doHttpRequest(containerMoveParam,"瀹瑰櫒鍏ュ満浠诲姟涓嬪彂",url, containerMoveInPath,null,"127.0.0.1"); } @@ -121,9 +124,23 @@ return this.delete(new EntityWrapper<AgvWrkMast>().eq("wrk_no", wrkNo)); } + //瀹瑰櫒鍒拌揪閫氱煡 + public int containerArrived(AgvWrkMast agvWrkMast) { + + Map<String,String> containerArrivedParam = new HashMap<>(); + containerArrivedParam.put("slotCode",agvWrkMast.getSourceLocNo()); + containerArrivedParam.put("containerCode",agvWrkMast.getBarcode()); + + return doHttpRequest(containerArrivedParam,"瀹瑰櫒杈惧埌閫氱煡",url, containerArrivedPath,null,"127.0.0.1"); + } + private void getContainerMoveParam(List<AgvWrkMast> agvWrkMastList,List<Map<String,String>> positionCodeMapList){ //寰�瀹瑰櫒鍏ュ満鍙傛暟涓斁鍏ユ簮绔欑偣浣嶇疆 for(AgvWrkMast agvWrkMast : agvWrkMastList){ + //鍒ゆ柇鏄惁涓鸿緭閫佺嚎鍏ュ簱锛屾槸鍒欎笉闇�瑕佸鍣ㄨ繘鍦鸿姹� + if("Y".equals(agvWrkMast.getMk())){ + continue; + } Map<String,String> positionCodeMap = new HashMap<>(); positionCodeMap.put("positionCode",agvWrkMast.getSourceLocNo()); positionCodeMapList.add(positionCodeMap); -- Gitblit v1.9.1