自动化立体仓库 - WMS系统
lty
18 小时以前 178d30a9b69598e82489d24b1da18b3b3ab0766b
src/main/java/com/zy/asrs/task/handler/WCSReportHandler.java
@@ -40,6 +40,7 @@
    private String outDevp;
    @Value("${wcs-slave.warehouse}")
    private String warehouse;
    static String namespace = null;
    @Autowired
    private ApiLogService apiLogService;
    @Autowired
@@ -71,6 +72,11 @@
            LocNo = Utils.getLocNoToWcs(Utils.getRow(wrkMast.getLocNo()),Utils.getBay(wrkMast.getLocNo()),Utils.getLev(wrkMast.getLocNo()));
            task.setEndNode(LocNo);//目标库位
            task.setCargoSize(null);
            switch (wrkMast.getIoType()){
                case 1: namespace= "全板入库下发";break;
                case 53: namespace= "拣料再入库下发";break;
                case 57: namespace= "盘点再入库下发";break;
            }
        }else if(wrkMast.getIoType() == 10 ){//空板入库
            workIssuedResult.setPriorityCode(12);//优先级
@@ -79,6 +85,7 @@
            LocNo = Utils.getLocNoToWcs(Utils.getRow(wrkMast.getLocNo()),Utils.getBay(wrkMast.getLocNo()),Utils.getLev(wrkMast.getLocNo()));
            task.setEndNode(LocNo);//目标库位
            task.setCargoSize(null);
            namespace = "空板入库";
        }else if(wrkMast.getIoType() == 101 || wrkMast.getIoType() == 103 || wrkMast.getIoType() == 107){//出库
            workIssuedResult.setPriorityCode(15);//优先级
@@ -87,6 +94,11 @@
            task.setStartNode(sourceLocNo);//源库位
            task.setEndNode(outDevp);
            task.setCargoSize(null);
            switch (wrkMast.getIoType()){
                case 101: namespace= "全板出库下发";break;
                case 103: namespace= "拣料出库下发";break;
                case 107: namespace= "盘点出库下发";break;
            }
        }else if(wrkMast.getIoType() == 11){//移库
            workIssuedResult.setPriorityCode(11);//优先级
@@ -96,7 +108,7 @@
            task.setStartNode(sourceLocNo);//源库位
            task.setEndNode(LocNo);//目标库位
            task.setCargoSize(null);
            namespace = "移库下发";
        } else {//空板出库
            workIssuedResult.setPriorityCode(13);//优先级
            task.setTaskType(1);//出库
@@ -104,6 +116,7 @@
            task.setStartNode(sourceLocNo);//源库位
            task.setEndNode(outDevp);
            task.setCargoSize(null);
            namespace = "空板出库下发";
        }
        tasks.add(task);
        workIssuedResult.setTasks(tasks);
@@ -122,7 +135,7 @@
                wrkMast.setWrkSts(1L);
                wrkMastService.updateById(wrkMast);
            } else {
                log.error("wms下发任务给wcs失败!!!url:{};request:{};response:{}", url+"/"+workIssued, JSON.toJSONString(workIssuedResult), response);
                log.error("{}}下发任务给wcs失败!!!url:{};request:{};response:{}",namespace, url+"/"+workIssued, JSON.toJSONString(workIssuedResult), response);
                throw new CoolException("wms下发任务给wcs失败");
            }
        } catch (Exception e) {
@@ -133,7 +146,7 @@
            try {
                // 保存接口日志
                apiLogService.save(
                        "wms下发任务给wcs",
                        namespace,
                        url+"/"+workIssued,
                        null,
                        "127.0.0.1",