dubin
2 天以前 2dac51421b0a90277a05188234f6ea954a4e204b
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -24,6 +24,7 @@
import com.zy.common.utils.News;
import com.zy.core.CrnThread;
import com.zy.core.DevpThread;
import com.zy.core.ThreadHandler;
import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.*;
@@ -836,6 +837,9 @@
    public synchronized void crnIoExecute(Integer mark) {
        for (CrnSlave crn : slaveProperties.getCrn()) {
            //获取堆垛机出库站的下一站信息
            SiemensDevpThread devpThread =(SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, crn.getId());
            StaProtocol staProtocol = devpThread.getStation().get(1002);
            // 获取堆垛机信息
            CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
            CrnProtocol crnProtocol = crnThread.getCrnProtocol();
@@ -905,7 +909,7 @@
                        if (wrkMast.getIoType() >= 100) {
                            WrkMast wrkMast1 = wrkMastMapper.selectPakOutStep1(crn.getId(), wrkMast.getSourceStaNo());
                            if (wrkMast1 != null) {
                                if (Integer.parseInt(wrkMast1.getSourceLocNo().substring(2,5)) == 1){
                                if (Integer.parseInt(wrkMast1.getSourceLocNo().substring(2,5)) == 1 || (staProtocol.isAutoing()&&staProtocol.isLoading())){
                                    this.outPut(crn, crnProtocol, mark);
                                    continue;
                                }
@@ -934,7 +938,7 @@
                        if (wrkMast.getIoType() >= 100) {
                            WrkMast wrkMast1 = wrkMastMapper.selectPakOutStep1(crn.getId(), wrkMast.getSourceStaNo());
                            if (wrkMast1 != null) {
                                if (Integer.parseInt(wrkMast1.getSourceLocNo().substring(2,5)) == 29){
                                if (Integer.parseInt(wrkMast1.getSourceLocNo().substring(2,5)) == 29 || (staProtocol.isAutoing()&&staProtocol.isLoading())){
                                    this.outPut(crn, crnProtocol, mark);
                                    continue;
                                }
@@ -1200,6 +1204,8 @@
                // 获取堆垛机出库站信息
                SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId());
                StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo());
                //堆垛机出库站点的下一站
                StaProtocol staProtocol1 = devpThread.getStation().get(1002);
                if (staProtocol == null) {
                    News.infoNoLog("" + mark + " - 2" + " - 3" + " - 堆垛机出库站信息(staProtocol!=null继续执行,否则循环终止):staProtocol=" + staProtocol);
                    break;
@@ -1215,7 +1221,7 @@
                    break;
                }
                // 判断堆垛机出库站状态
                if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
                if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()&&staProtocol1.isAutoing()&&!staProtocol1.isLoading()) {
                    // 命令下发区 --------------------------------------------------------------------------
                    // 堆垛机控制过滤