自动化立体仓库 - WMS系统
zyx
2023-12-25 6f7a815b2d6e4f30e7ccf901b24d5103aaa72078
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -77,9 +77,9 @@
    @Override
    @Transactional
    public void comb(CombParam param, Long userId) {
        if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
            throw new CoolException(BaseRes.PARAM);
        }
//        if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
//            throw new CoolException(BaseRes.PARAM);
//        }
        // 判断是否有相同条码的数据
        if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
                eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) {
@@ -492,21 +492,19 @@
        waitPakinList.forEach(waitPakin -> {
            //料想码
            String containerCode = waitPakin.getSuppCode();
            //如果当前料想码已存在,则修改该料想的物料数量
            ManLocDetl manLocDetl = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>().eq("container_code", containerCode));
            //如果当前库位已存在货物
            Wrapper<ManLocDetl> wrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", locNo).eq("matnr",waitPakin.getMatnr());
            Utils.wapperSetCondition(wrapper,"container_code",containerCode);
            Utils.wapperSetCondition(wrapper,"batch",waitPakin.getBatch());
            Utils.wapperSetCondition(wrapper,"csocode",waitPakin.getThreeCode());
            Utils.wapperSetCondition(wrapper,"isoseq",waitPakin.getDeadTime());
            ManLocDetl manLocDetl = manLocDetlService.selectOne(wrapper);
            if(Cools.isEmpty(manLocDetl)){
                saveManlocDetl(waitPakin,now,locNo);
            }else{
                if(Cools.eq(manLocDetl.getMatnr(),waitPakin.getMatnr())
                        && Cools.eq(manLocDetl.getCsocode(),waitPakin.getThreeCode())
                        && Cools.eq(manLocDetl.getIsoseq(),waitPakin.getDeadTime())){
                    manLocDetl.setAnfme(manLocDetl.getAnfme() + waitPakin.getAnfme());
                    manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>()
                            .eq("loc_no",manLocDetl.getLocNo())
                            .eq("container_code",manLocDetl.getContainerCode()));
                }else{
                    saveManlocDetl(waitPakin,now,locNo);
                }
                manLocDetl.setAnfme(manLocDetl.getAnfme() + waitPakin.getAnfme());
                manLocDetlService.update(manLocDetl,wrapper);
            }
            //生成平库入出库日志
            SaasUtils.insertLog(0,locNo,waitPakin.getMatnr(), waitPakin.getAnfme(),user.getUsername());