luxiaotao1123
2020-08-28 5d2d9dbe286f6e079232e68d30bbd0530ccecaef
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -56,6 +56,8 @@
    private AdjDetlService adjDetlService;
    @Autowired
    private WrkMastLogService wrkMastLogService;
    @Autowired
    private WrkDetlLogService wrkDetlLogService;
    @Override
    @Transactional
@@ -259,12 +261,12 @@
        wrkMast.setIoTime(new Date());
        wrkMast.setWrkSts(1L); // 工作状态:生成入库ID
        wrkMast.setIoType(10); // 入出库状态:10.空板入库
        wrkMast.setIoPri(13D); // 优先级:10
        wrkMast.setIoPri(10D); // 优先级:10
        wrkMast.setCrnNo(dto.getCrnNo());
        wrkMast.setSourceStaNo(dto.getSourceStaNo());
        wrkMast.setStaNo(dto.getStaNo());
        wrkMast.setLocNo(dto.getLocNo());
        wrkMast.setFullPlt("N"); // 满板:Y
        wrkMast.setFullPlt("N"); // 满板
        wrkMast.setPicking("N"); // 拣料
        wrkMast.setExitMk("N"); // 退出
        wrkMast.setEmptyMk("Y"); // 空板
@@ -562,6 +564,15 @@
                }
            }
        }
        List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", param.getLocNo()));
        if (locDetls.isEmpty()) {
            locMast.setLocSts("D");
            locMast.setModiUser(userId);
            locMast.setModiTime(new Date());
            if (!locMastService.updateById(locMast)) {
                throw new CoolException("更新库位状态失败");
            }
        }
    }
    @Override
@@ -652,9 +663,9 @@
            throw new CoolException("当前工作状态无法进行操作");
        }
        // 保存工作明细档历史档
//        if (!wrkDetlLogService.save(wrkMast.getWrkNo())) {
//            throw new CoolException("保存工作明细档历史档失败");
//        }
        if (!wrkDetlLogService.save(wrkMast.getWrkNo())) {
            throw new CoolException("保存工作明细档历史档失败");
        }
        // 保存工作主档历史档
        if (!wrkMastLogService.save(wrkMast.getWrkNo())) {
            throw new CoolException("保存工作主档历史档失败");