自动化立体仓库 - WCS系统
#
lsh
2022-12-29 4420bfb992da73896ae21107ae45b981df4c726e
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -150,11 +150,31 @@
                    // 判断重复工作档
                    WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode);
                    WrkMast wrkMast1 = wrkMastMapper.selectPakInStepBarcode(barcode);
                    if (wrkMast1 !=null){
                        if (wrkMast1.getIoType()==103 || wrkMast1.getIoType()==107 || wrkMast1.getIoType()==104){
                            continue;
                        }
                    }
                    if (wrkMast != null) {
                        log.error("工作档中已存在该站状态为( 2.设备上走 )的数据,工作号={}", wrkMast.getWrkNo());
                        if (inSta.getStaNo()==100 || inSta.getStaNo()==108 || inSta.getStaNo()==116){
                        if (inSta.getStaNo()==101 || inSta.getStaNo()==109 || inSta.getStaNo()==117){
                            staProtocol.setWorkNo((short)9999);
                            staProtocol.setStaNo((short)100);
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            if (!result) {
                                throw new CoolException("更新plc站点信息失败");
                            }
                        }else if (inSta.getStaNo()==201 || inSta.getStaNo()==207 || inSta.getStaNo()==213){
                            staProtocol.setWorkNo((short)9999);
                            if (inSta.getStaNo()==201){
                                staProtocol.setStaNo((short)200);
                            }else if (inSta.getStaNo()==207){
                                staProtocol.setStaNo((short)206);
                            }else if (inSta.getStaNo()==213){
                                staProtocol.setStaNo((short)212);
                            }
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            if (!result) {
@@ -199,6 +219,29 @@
                            }
                        } else {
                            log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
                            if (inSta.getStaNo()==101 || inSta.getStaNo()==109 || inSta.getStaNo()==117){
                                staProtocol.setWorkNo((short)9999);
                                staProtocol.setStaNo((short)100);
                                devpThread.setPakMk(staProtocol.getSiteId(), false);
                                boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                                if (!result) {
                                    throw new CoolException("更新plc站点信息失败");
                                }
                            }else if (inSta.getStaNo()==201 || inSta.getStaNo()==207 || inSta.getStaNo()==213){
                                staProtocol.setWorkNo((short)9999);
                                if (inSta.getStaNo()==201){
                                    staProtocol.setStaNo((short)200);
                                }else if (inSta.getStaNo()==207){
                                    staProtocol.setStaNo((short)206);
                                }else if (inSta.getStaNo()==213){
                                    staProtocol.setStaNo((short)212);
                                }
                                devpThread.setPakMk(staProtocol.getSiteId(), false);
                                boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                                if (!result) {
                                    throw new CoolException("更新plc站点信息失败");
                                }
                            }
                        }