| | |
| | | private SiteController siteController; |
| | | |
| | | |
| | | public void generateStoreWrkFile1() throws IOException, InterruptedException { |
| | | public synchronized void generateStoreWrkFile1() throws IOException, InterruptedException { |
| | | String methodName = Thread.currentThread().getStackTrace()[1].getMethodName(); |
| | | try { |
| | | // 根据输送线plc遍历 |
| | |
| | | |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | //判断其库位是否为深库位,如果为深库位找其浅库位是都有货 |
| | | if (locMast.getRow1() == 1 || locMast.getRow1() == 5) { |
| | | if (locMast.getRow1() == 1 || locMast.getRow1() == 5|| locMast.getRow1() == 9|| locMast.getRow1() == 13) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", (locMast.getRow1() + 1)).eq("bay1", locMast.getBay1()).eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | continue; |
| | | } |
| | | } else if (locMast.getRow1() == 4 || locMast.getRow1() == 8) { |
| | | } else if (locMast.getRow1() == 4 || locMast.getRow1() == 8|| locMast.getRow1() == 12|| locMast.getRow1() == 16) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", (locMast.getRow1() - 1)).eq("bay1", locMast.getBay1()).eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | |
| | | taskWrk.setStartPoint("15"); |
| | | if (result.getAlley().equals("1")) { |
| | | taskWrk.setCrnNo(1); |
| | | } else { |
| | | } else if (result.getAlley().equals("2")) { |
| | | taskWrk.setCrnNo(2); |
| | | } |
| | | } else if (result.getAlley().equals("3")) {taskWrk.setCrnNo(3);}else if (result.getAlley().equals("4")) {taskWrk.setCrnNo(4);} |
| | | if (taskWrk.getIoType() == 1) { |
| | | taskWrk.setWrkSts(2); |
| | | if (!Cools.isEmpty(taskWrk.getTargetPoint())) { |
| | |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | TaskWrkLog taskWrkLog = new TaskWrkLog(taskWrk); |
| | | if (!wrkLogService.insert(taskWrkLog)) { |
| | | throw new CoolException("转历史档失败" + taskWrkLog); |
| | | if(jsonObject.getInteger("ReturnStatus")==0){ |
| | | TaskWrkLog taskWrkLog = new TaskWrkLog(taskWrk); |
| | | if (!wrkLogService.insert(taskWrkLog)) { |
| | | throw new CoolException("转历史档失败" + taskWrkLog); |
| | | } |
| | | if (!taskWrkService.deleteById(taskWrk)) { |
| | | throw new CoolException("任务档删除失败" + taskWrkLog); |
| | | } |
| | | bool = true; |
| | | } |
| | | if (!taskWrkService.deleteById(taskWrk)) { |
| | | throw new CoolException("任务档删除失败" + taskWrkLog); |
| | | } |
| | | bool = true; |
| | | |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | log.error("wcs手动完成任务上报wms失败{},返回值={}", taskWrk, response); |
| | |
| | | */ |
| | | public class HttpHandler { |
| | | |
| | | private static final Integer DEFAULT_TIMEOUT_SECONDS = 5; |
| | | private static final Integer DEFAULT_TIMEOUT_SECONDS = 20; |
| | | private static final MediaType MEDIA_TYPE = MediaType.parse("application/json"); |
| | | |
| | | private String uri; |
| | |
| | | # 堆垛机1 |
| | | crn[0]: |
| | | id: 1 |
| | | ip: 10.10.10.1101 |
| | | ip: 10.10.10.110 |
| | | port: 102 |
| | | rack: 0 |
| | | slot: 0 |
| | |
| | | # 堆垛机2 |
| | | crn[1]: |
| | | id: 2 |
| | | ip: 10.10.10.1201 |
| | | ip: 10.10.10.120 |
| | | port: 102 |
| | | rack: 0 |
| | | slot: 0 |
| | |
| | | # 堆垛机3 |
| | | crn[2]: |
| | | id: 3 |
| | | ip: 10.10.10.1301 |
| | | ip: 10.10.10.130 |
| | | port: 102 |
| | | rack: 0 |
| | | slot: 0 |
| | |
| | | # 堆垛机4 |
| | | crn[3]: |
| | | id: 4 |
| | | ip: 10.10.10.1401 |
| | | ip: 10.10.10.140 |
| | | port: 102 |
| | | rack: 0 |
| | | slot: 0 |