ytfl
15 小时以前 96e933cf53bffdfe366b8ed7b86492b57b10a659
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1044,7 +1044,7 @@
                    News.warn("" + mark + " - 1" + " - 12" + " - // F、D  库位={},库位状态={}", shallowLoc.getLocNo(), shallowLoc.getLocSts());
                    // 此标记避免多次执行移库任务
                    if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())) {
                        if (moveLocForDeepLoc(slave, shallowLoc, mark)) {
                        if (moveLocForDeepLoc(slave, crnProtocol, shallowLoc, mark)) {
                            wrkMast.setUpdMk("Y");
                            wrkMast.setIoPri(14D);
                            wrkMastMapper.updateById(wrkMast);
@@ -1130,6 +1130,13 @@
                .eq("code", "devpCheckTaskStackOver"));
        if (config2 != null) {
            devpCheckTaskStackOver = Integer.parseInt(config2.getValue());
        }
        int outNumber = 13;
        Config config3 = configService.selectOne(new EntityWrapper<Config>()
                .eq("code", "FullboardOutbound"));
        if (config3 != null) {
            outNumber = Integer.parseInt(config3.getValue());
        }
@@ -1301,7 +1308,7 @@
//                            if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())
//                                || Cools.isEmpty(waitWrkMast)) {
                            if (Cools.isEmpty(waitWrkMast)) {
                                if (moveLocForDeepLoc(slave, shallowLoc, mark)) {
                                if (moveLocForDeepLoc(slave, crnProtocol, shallowLoc, mark)) {
                                    wrkMast.setUpdMk("Y");
//                                    wrkMast.setIoPri(14D);
                                    wrkMastMapper.updateById(wrkMast);
@@ -2202,7 +2209,7 @@
                        ));
                    }else {
                        List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectTodayByWrkNo(wrkMast.getWrkNo());
                        List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectTodayByWrkNo(wrkNo);
                        if(!wrkDetlLogs.isEmpty()) {
                            WrkDetlLog wrkDetlLog = wrkDetlLogs.get(0);
@@ -2216,7 +2223,7 @@
                            }
                            List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>()
                                    .eq("loc_no", wrkMast.getSourceLocNo()));
                                    .eq("loc_no", sourceLocNo));
                            double totalAnfme = 0D;
                            double totalWeight = 0D;
                            for (LocDetl locDetl : locDetls) {
@@ -2429,8 +2436,7 @@
     * 因双深库位阻塞,对浅库位进行移转(立即执行版)
     * tip:同步
     */
    private synchronized boolean moveLocForDeepLoc(CrnSlave crn, LocMast shallowLoc, Integer mark) {
    private synchronized boolean moveLocForDeepLoc(CrnSlave crn, CrnProtocol crnProtocol, LocMast shallowLoc, Integer mark) {
        try {
            News.warnNoLog("" + mark + "moveLocForDeepLoc" + " - 0" + " - 开始执行:因双深库位阻塞,对浅库位进行移转(立即执行版)");
            List<Integer> rows = locMastService.queryDistinctRow(crn.getId());
@@ -2438,8 +2444,13 @@
            for (Integer row : rows) {
                if (Utils.isDeepLoc(slaveProperties, row)) {
                    loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1());
                    if (loc != null) {
                        if (crn.getId() == 1) {
                            if (Utils.getLaneByLocNo(loc.getLocNo()) != crnProtocol.getCrnLane()) {
                                continue;
                            }
                        }
                        if (Utils.isDeepLoc(slaveProperties, loc.getLocNo())) {
                            String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo());
                            LocMast shallowLoc1 = locMastService.selectById(shallowLocNo);
@@ -2459,6 +2470,12 @@
                        loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1());
                        if (null != loc) {//对应深库位非在库状态,不能移库
                            if (crn.getId() == 1) {
                                if (Utils.getLaneByLocNo(loc.getLocNo()) != crnProtocol.getCrnLane()) {
                                    continue;
                                }
                            }
                            String deepLoc = Utils.getDeepLoc(slaveProperties, loc.getLocNo());
                            LocMast deepLoc1 = locMastService.selectById(deepLoc);
                            if (!deepLoc1.getLocSts().equals("F") && !deepLoc1.getLocSts().equals("D")) {