自动化立体仓库 - WCS系统
1
zhangc
2025-04-14 7662f4db87c6e5510d4f2429900012f871497ed6
1
1个文件已修改
53 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -29,7 +29,10 @@
import com.zy.core.model.command.ShuttleCommand;
import com.zy.core.model.protocol.*;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.thread.*;
import com.zy.core.thread.DevpThread;
import com.zy.core.thread.ForkLiftThread;
import com.zy.core.thread.LiftThread;
import com.zy.core.thread.ShuttleThread;
import com.zy.core.thread.impl.FyDevpThread;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
@@ -173,46 +176,12 @@
                        staProtocol = staProtocol.clone();
                    }
                    Short workNo = staProtocol.getWorkNo();
                    // 尺寸检测异常
                    boolean back = false;
                    String errMsg = "异常:";
                    if (staProtocol.isFrontErr()) {
                        errMsg = errMsg + "前超限;";
                        back = true;
                    }
                    if (staProtocol.isBackErr()) {
                        errMsg = errMsg + "后超限";
                        back = true;
                    }
                    if (staProtocol.isHighErr()) {
                        errMsg = errMsg + "高超限";
                        back = true;
                    }
                    if (staProtocol.isLeftErr()) {
                        errMsg = errMsg + "左超限";
                        back = true;
                    }
                    if (staProtocol.isRightErr()) {
                        errMsg = errMsg + "右超限";
                        back = true;
                    }
                    if (staProtocol.isWeightErr()) {
                        errMsg = errMsg + "超重";
                        back = true;
                    }
                    if (staProtocol.isBarcodeErr()) {
                        errMsg = errMsg + "扫码失败";
                        back = true;
                    }
                    // 退回
                    if (back) {
                        // led 异常显示
                        LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed());
                        if (ledThread != null) {
                            ledThread.error(errMsg);
                        }
                        continue;
                    }
//                        // led 异常显示
//                        LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed());
//                        if (ledThread != null) {
//                            ledThread.error(errMsg);
//                        }
                    // 判断是否满足入库条件
                    if (staProtocol.isAutoing() && staProtocol.isLoading() && isInEnable(devpThread, inSta.getStaNo()) && !staProtocol.isEmptyMk() && (workNo == 0 || (workNo >= 9990 && workNo <= 9999)) && staProtocol.isPakMk()) {
                        String barcode = staProtocol.getBarcode();
@@ -324,7 +293,7 @@
                if (wrkMast.getStaNo() == 1025) {
                    locNo = "1200305";
                }
                boolean dispatchShuttle = shuttleDispatchUtils.searchDispatchShuttleIn(wrkMast.getWrkNo(), locNo, wrkMast.getLocNo(), "TRANSPORT_DEVP",true);
                boolean dispatchShuttle = shuttleDispatchUtils.searchDispatchShuttleIn(wrkMast.getWrkNo(), locNo, wrkMast.getLocNo(), "TRANSPORT_DEVP", true);
                if (!dispatchShuttle) {
                    News.info("{}任务,调度小车失败", wrkMast.getWrkNo());
                    return;