自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-18 55ae06700679184e017d9868000870ecf4e6c4aa
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -8,6 +8,7 @@
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.EmptyPlateOutParam;
import com.zy.asrs.entity.param.FullStoreParam;
import com.zy.asrs.entity.param.LocDetlAdjustParam;
import com.zy.asrs.entity.param.StockOutParam;
import com.zy.asrs.service.*;
import com.zy.common.model.LocDetlDto;
@@ -395,6 +396,13 @@
            wrkDetl.setIoTime(new Date());
            wrkDetl.setMatnr(locDetl.getMatnr());
            wrkDetl.setAnfme(locDetl.getAnfme());
            wrkDetl.setZmatid(locDetl.getZmatid());
            wrkDetl.setTbpos(locDetl.getTbpos());
            wrkDetl.setTbnum(locDetl.getTbnum());
            wrkDetl.setLgnum(locDetl.getLgnum());
            wrkDetl.setAltme(locDetl.getAltme());
            wrkDetl.setBname(locDetl.getBname());
            wrkDetl.setMaktx(locDetl.getMaktx());
            wrkDetl.setAppeTime(new Date());
            wrkDetl.setAppeUser(userId);
            wrkDetl.setModiTime(new Date());
@@ -423,7 +431,7 @@
                throw new CoolException("更新目标库位状态失败");
            }
        } else {
            throw new CoolException("预约目标库位入库失败,状态:"+loc.getLocType$());
            throw new CoolException("移转失败,目标库位状态:"+loc.getLocType$());
        }
    }
@@ -453,6 +461,25 @@
    @Override
    @Transactional
    public void adjustLocDetl(LocDetlAdjustParam param, Long userId) {
        LocMast locMast = locMastService.selectById(param.getLocNo());
        if (Cools.isEmpty(locMast)) {
            throw new CoolException("库位不存在");
        }
        // 清除旧库存明细
        locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo()));
        // 保存新库存明细
        for (LocDetlAdjustParam.LocDetlAdjust adjust : param.getList()) {
            LocDetl locDetl = new LocDetl();
            if (!locDetlService.insert(locDetl)) {
                throw new CoolException("保存库存明细失败");
            }
        }
    }
    @Override
    @Transactional
    public void cancelWrkMast(String workNo, Long userId) {
        WrkMast wrkMast = wrkMastService.selectById(workNo);
        if (Cools.isEmpty(wrkMast)){