#
luxiaotao1123
2020-09-08 06af884fc847aa87ade207419f6d36136b40fa61
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -155,12 +155,10 @@
                    staProtocol.setWorkNo((short) workNo);
                    staProtocol.setStaNo(startupDto.getStaNo().shortValue());
                    staProtocol.setPakMk(false);
                    staProtocol.setInreq1(false);
                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                    if (!result) {
                        throw new CoolException("更新plc站点信息失败");
                    }
                    staProtocol.setPakMk(false);
                }
@@ -206,11 +204,11 @@
                    // 更新站点信息 且 下发plc命令
                    staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue());
                    staProtocol.setStaNo(wrkMast.getStaNo().shortValue());
                    staProtocol.setPakMk(false);
                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                    if (!result) {
                        throw new CoolException("更新plc站点信息失败");
                    }
                    staProtocol.setPakMk(false);
                }
@@ -232,7 +230,7 @@
                DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
                StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo());
                if (staProtocol == null) { continue; }
                if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInreq1()
                if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable()
                    && staProtocol.getWorkNo() > 0 && staProtocol.isPakMk()){
                    WrkMast wrkMast = wrkMastMapper.selectPickStep(staProtocol.getWorkNo().intValue());
                    if (wrkMast == null) {
@@ -285,7 +283,6 @@
                    staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue());
                    staProtocol.setStaNo(wrkMast.getStaNo().shortValue());
                    staProtocol.setPakMk(false);
                    staProtocol.setInreq1(false);
                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                    if (!result) {
                        throw new CoolException("更新plc站点信息失败");
@@ -720,12 +717,13 @@
                    // 更新站点信息 且 下发plc命令
                    staProtocol.setWorkNo((short) workNo);
                    staProtocol.setStaNo(startupDto.getStaNo().shortValue());
                    staProtocol.setPakMk(false);
                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                    if (!result) {
                        throw new CoolException("更新plc站点信息失败");
                    }
                    staProtocol.setPakMk(false);
                }