自动化立体仓库 - WMS系统
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -103,6 +103,7 @@
    @Resource
    private BasAgvWrkDetlService basAgvWrkDetlService;
    private OpenService openService;
    @Override
    @Transactional
@@ -119,7 +120,12 @@
//        List<String> matnrs = param.getList().stream().map(FullStoreParam.MatCodeStore::getMatnr).distinct().collect(Collectors.toList());
//        List<String> batchs = param.getList().stream().map(FullStoreParam.MatCodeStore::getBatch).distinct().collect(Collectors.toList());
        FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(param.getList().get(0));
        StartupDto dto = commonService.getLocNo(1, param.getDevpNo(), findLocNoAttributeVo,locTypeDto);
        StartupDto dto = null;
        try{
            dto = commonService.getLocNo(1, param.getDevpNo(), findLocNoAttributeVo,locTypeDto);
        } catch (Exception e){
            throw new CoolException("查询库位失败!!==》"+e.getMessage());
        }
        if (Cools.isEmpty(dto)){
            throw new CoolException("查询库位失败!!==》startupFullPutStore ==》 commonService.getLocNo");
        }
@@ -658,8 +664,15 @@
        // 检索库位
        LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo);
        FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo();
        StartupDto dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
        StartupDto dto = null;
        try{
            dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
        } catch (Exception e){
            throw new CoolException("查询库位失败!!==》"+e.getMessage());
        }
        if (Cools.isEmpty(dto)){
            throw new CoolException("查询库位失败!!==》startupFullPutStore ==》 commonService.getLocNo");
        }
        int workNo = dto.getWorkNo();
        Date now = new Date();
        // 生成工作档
@@ -979,6 +992,7 @@
    @Transactional
    public void completeWrkMast(String workNo, Long userId) {
        WrkMast wrkMast = wrkMastService.selectById(workNo);
        Integer ioType = 0;
        if (Cools.isEmpty(wrkMast)){
            throw new CoolException(workNo+"工作档不存在");
        }
@@ -988,9 +1002,15 @@
        // 入库 + 库位转移
        if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()==11)) {
            wrkMast.setWrkSts(4L);
            if(wrkMast.getIoType() == 11){
                ioType = 2;
            }else{
                ioType = 3;
            }
        // 出库
        } else if (wrkMast.getWrkSts() > 10) {
            wrkMast.setWrkSts(14L);
            ioType = 1;
        }
        Date now = new Date();
        wrkMast.setCrnStrTime(DateUtils.calculate(now, 1L, TimeUnit.SECONDS, true));