自动化立体仓库 - WMS系统
#
zjj
7 小时以前 e61d7a861cbb67d038cda649272952f40de99930
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -46,10 +46,11 @@
    private static final Map<Integer,Integer> sourceSite = new HashMap<>();
    static {
        sourceSite.put(1041,1040);sourceSite.put(1042,1040);
        sourceSite.put(2011,2010);sourceSite.put(2012,2010);
        sourceSite.put(2001,2000);sourceSite.put(2002,2000);
        sourceSite.put(3011,3010);sourceSite.put(3010,1040);
        sourceSite.put(1041,1040);sourceSite.put(1042,1040);sourceSite.put(1040,1040);
        sourceSite.put(2011,2010);sourceSite.put(2012,2010);sourceSite.put(2010,2010);
        sourceSite.put(2001,2000);sourceSite.put(2002,2000);sourceSite.put(2000,2000);
        sourceSite.put(3011,3010);sourceSite.put(3010,1040);sourceSite.put(3012,3010);
    }
    public ReturnT<String> start(WrkMast wrkMast) {
@@ -374,7 +375,7 @@
                        ManLocDetl manLocDetl = manLocDetlService.selectItem(node.getName(), wrkDetl.getMatnr(), wrkDetl.getBatch());
                        if (null != manLocDetl) {
                            Double anfme = manLocDetl.getAnfme()+wrkDetl.getAnfme();
                            if (!manLocDetlService.updateAnfme(anfme, locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch())) {
                            if (!manLocDetlService.updateAnfme(anfme, manLocDetl.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch())) {
//                                exceptionHandle("并板入库 ===>> 修改库存明细数量失败;[workNo={0}],[matnr={1}]", wrkMast.getWrkNo(), wrkDetl.getMatnr());
                                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                                return FAIL.setMsg("平库入库 ===>> 修改库存明细数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]");
@@ -424,8 +425,10 @@
            if (sourceSite.get(sourceStaNo) != null) {
                BasDevpMapper basDevpMapper = SpringUtils.getBean(BasDevpMapper.class);
                BasDevp basDevp = basDevpMapper.selectById(sourceSite.get(sourceStaNo));
                basDevp.setInQty(basDevp.getInQty() -1);
                basDevp.setInQty(Math.max(basDevp.getInQty() - 1, 0));
                basDevpMapper.updateById(basDevp);
                log.info("入库任务完成,"+basDevp.getDevNo()+"-1");
            }
            // 修改工作主档状态
@@ -459,7 +462,7 @@
                }
                assert node != null;
            }else {
                locMast = locMastService.selectById(wrkMast.getLocNo());
                locMast = locMastService.selectById(wrkMast.getSourceLocNo());
                if (null == locMast) {
//                exceptionHandle("工作档[workNo={0}]库位号错误[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo());
                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -467,12 +470,7 @@
                }
                assert locMast != null;
            }
            if (null == locMast) {
//                exceptionHandle("工作档[workNo={0}]库位号错误[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo());
                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                return FAIL.setMsg("工作档库位号错误; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]");
            }
            assert locMast != null;
            switch (wrkMast.getIoType()) {
                // 全板出库
                case 101: