skyouc
昨天 d51f64c1f0105d4b18aa8344c11e47827730a40c
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
@@ -388,23 +388,20 @@
        InTaskMsgDto inTaskMsgDto = new InTaskMsgDto();
        int sRow = deviceBind.getStartRow();
        int eRow = deviceBind.getEndRow();
        int deviceQty = deviceBind.getDeviceQty();
        // ===============>>>> 开始执行
        curRow = deviceBind.getCurrentRow();
        //此程序用于优化堆垛机异常时的运行时间
        for (int i = times; i <= deviceQty * 2; i++) {
            int[] locNecessaryParameters = LocUtils.LocNecessaryParameters(deviceBind, curRow, deviceQty);
            curRow = locNecessaryParameters[1];
            channel = locNecessaryParameters[2];
            rowCount = locNecessaryParameters[0];
            nearRow = locNecessaryParameters[3];
            break;
        }
        //获取排
        int[] locNecessaryParameters = LocUtils.LocNecessaryParameters(deviceBind, curRow, deviceQty);
        curRow = locNecessaryParameters[1];
        channel = locNecessaryParameters[2];
        rowCount = locNecessaryParameters[0];
        nearRow = locNecessaryParameters[3];
        if (nearRow == 0) {
            throw new CoolException("无可用堆垛机");
        }
@@ -500,12 +497,13 @@
                            .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
                            .eq(Loc::getAreaId, area)
                    );
                    if (null != orgMoveLoc){
                        if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
                            break;
                        }
                    }
                    if (!Cools.isEmpty(locMast2)) {
                        if (null != orgMoveLoc){
                            if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
                                break;
                            }
                        }
                        loc = locMast2;
                        break;
                    }
@@ -556,12 +554,13 @@
                                .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
                                .eq(Loc::getAreaId, area)
                        );
                        if (null != orgMoveLoc){
                            if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
                                break;
                            }
                        }
                        if (!Cools.isEmpty(locMast2)) {
                            if (null != orgMoveLoc){
                                if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
                                    break;
                                }
                            }
                            loc = locMast2;
                            break;
                        } else {
@@ -570,12 +569,13 @@
                                    .in(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_D.type, LocStsType.LOC_STS_TYPE_D.type)
                                    .eq(Loc::getAreaId, area)
                            );
                            if (null != orgMoveLoc){
                                if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
                                    break;
                                }
                            }
                            if (!Cools.isEmpty(locMast2)) {
                                if (null != orgMoveLoc){
                                    if (!locMast2.getChannel().equals(orgMoveLoc.getChannel())) {
                                        break;
                                    }
                                }
                                loc = locMast1;
                                break;
                            }