#
Junjie
3 天以前 d8c7de6a74121fcb35de8d807b377043e0c89c99
#
1个文件已修改
20 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
@@ -1301,7 +1301,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);
@@ -2429,8 +2429,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 +2437,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 +2463,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")) {