zzgtfwq
1 天以前 bca069bc5858219548fc5e1bcfc659e4758f3576
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -278,27 +278,8 @@
                        JSONObject jsonObject = JSON.parseObject(response);
                        if (jsonObject != null && jsonObject.getInteger("code") != null && jsonObject.getInteger("code") == 200) {
                            log.info("入库任务申请成功,等待WMS下发任务。条码:{},站点:{}", barcode, inSta.getStaNo());
                            staProtocol.setStaNo((short)0);
                            staProtocol.setWorkNo(0);//设置为9998等待上位机下发任务/9997是空板入库判断,待下发时也写入9998
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            if (!result) {
                                LedErrorThreadUtil.ledErrorThread("更新plc站点信息失败!站点号:"+inSta.getStaNo(),inSta.getLed(), LedErrorAreaType.ONE_OTHER.getDesc());
                                throw new CoolException("更新plc站点信息失败");
                            }
                            Thread.sleep(300);
                            StaProtocol staProtocol2 = devpThread.getStation().get(inSta.getStaNo());
                            if (staProtocol2 == null) {
                                continue;
                            } else {
                                staProtocol2 = staProtocol2.clone();
                            }
                            staProtocol2.setStaNo(inSta.getStaNo().shortValue());
                            staProtocol2.setWorkNo(9998);//设置为9998等待上位机下发任务/9997是空板入库判断,待下发时也写入9998
                            boolean result2 = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol2));
                            if (!result2) {
                                LedErrorThreadUtil.ledErrorThread("更新plc站点信息失败!站点号:"+inSta.getStaNo(),inSta.getLed(), LedErrorAreaType.ONE_OTHER.getDesc());
                                throw new CoolException("更新plc站点信息失败");
                            }
                            devpThread.setPakMk(staProtocol.getSiteId(), false,9998);
                        } else {
                            //                            // 获取工作号
@@ -457,7 +438,7 @@
//                // 入出库模式判断
//                if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
                if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk()) {
                if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk() ) {
//                    WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode);
                    WrkMast wrkMast = wrkMastMapper.selectPakInStep5(staProtocol.getSiteId(),"7");
                    if (wrkMast == null) {