自动化立体仓库 - WMS系统
dubin
昨天 437430655faafbedabd32e00871e7accea02fa42
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -36,6 +36,8 @@
    private WaitPakinService waitPakinService;
    @Autowired
    private OrderDetlService orderDetlService;
    @Autowired
    private InOutService inOutService;
    public ReturnT<String> start(WrkMast wrkMast) {
        // 4.入库完成
@@ -118,6 +120,16 @@
                            locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码
                            locDetl.setModiTime(now);
                            locDetl.setAppeTime(now);
                            InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr());
                            if (inOut != null){
                                inOut.setTemp1("在库");
                                inOut.setModiTime(now.toString());
                            }
                            if (inOutService.updateById(inOut)){
                                return FAIL.setMsg("更新模具属性失败");
                            }
                            if (!locDetlService.insert(locDetl)) {
//                                exceptionHandle("全板入库 ===>> 添加库存明细失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo());
                                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -168,6 +180,17 @@
                        LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl);
                        if (locDetl != null) {
                            InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr());
                            if (inOut != null){
                                inOut.setTemp1("不在库");
//                                inOut.setModiTime(now.toString());
                            }
                            if (inOutService.updateById(inOut)){
                                return FAIL.setMsg("更新模具属性失败");
                            }
                            if (!locDetlService.updateAnfme(locDetl.getAnfme() - wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl)) {
//                                exceptionHandle("拣料入库 ===>> 修改库存明细数量失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo());
                                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -225,6 +248,16 @@
                                return FAIL.setMsg("并板入库 ===>> 修改库存明细数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]");
                            }
                        } else {
                            InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr());
                            if (inOut != null){
                                inOut.setTemp1("在库");
//                                inOut.setModiTime(now.toString());
                            }
                            if (inOutService.updateById(inOut)){
                                return FAIL.setMsg("更新模具属性失败");
                            }
                            locDetl = new LocDetl();
                            locDetl.sync(wrkDetl);
                            locDetl.setLocNo(wrkMast.getLocNo()); // 库位号
@@ -356,6 +389,18 @@
                        TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                        return FAIL.setMsg("全板出库 ===>> 工作明细档为空; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getSourceLocNo() + "]");
                    }
                    for (WrkDetl wrkDetl : wrkDetls101) {
                        InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr());
                        if (inOut != null){
                            inOut.setTemp1("不在库");
//                            inOut.setModiTime(now.toString());
                        }
                        if (inOutService.updateById(inOut)){
                            return FAIL.setMsg("更新模具属性失败");
                        }
                    }
                    for (WrkDetl wrkDetl : wrkDetls101) {
                        // 更新订单完成数量
                        OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl);