自动化立体仓库 - WMS系统
zhangc
2025-03-05 029b996ab6f5d8bf9c4ef5f97db635984fc59858
src/main/java/com/zy/asrs/service/impl/AgvLocDetlServiceImpl.java
@@ -7,6 +7,7 @@
import com.core.common.Cools;
import com.core.common.SnowflakeIdWorker;
import com.core.exception.CoolException;
import com.zy.asrs.constant.AsrsConstants;
import com.zy.asrs.entity.AgvLocDetl;
import com.zy.asrs.entity.AgvLocMast;
import com.zy.asrs.entity.AgvWrkDetl;
@@ -95,20 +96,28 @@
    }
    public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq, String type2) {
    public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq, String type) {
        //根据物料号和批次找到对应的库存,并且按照修改时间排序
        Wrapper<AgvLocDetl> wrapper = new EntityWrapper<AgvLocDetl>().eq("matnr", matnr).orderBy("modi_time");
//        if (type != null) {
//            wrapper.notLike("loc_no", "F1");
//        }
        wapperSetCondition(wrapper, "batch", batch);
        if (type != null) {
            if (type.equals(AsrsConstants.ERCHANG)) {
                wrapper.notLike("loc_no", "F3");
            } else {
                if (matnr.startsWith("401") || matnr.startsWith("402")) {
                    //wrapper.notLike("loc_no", "F3");
                    wrapper.notLike("loc_no", "F1");
                } else {
                    wrapper.notLike("loc_no", "F1");
                }
            }
        }
        //一直有PE带批次字段导致,无法出库,就注释掉
        //wapperSetCondition(wrapper, "batch", batch);
        wapperSetCondition(wrapper, "three_code", csocode);
        //wapperSetCondition(wrapper, "dead_time", isoseq);
        if ("JG".equals(orderNo.substring(0, 2))) {
            wapperSetCondition(wrapper, "process_sts", "1");
        } else {
            wrapper.ne("process_sts", "1");
        }
        List<AgvLocDetl> agvLocDetls = this.selectList(wrapper);
@@ -181,6 +190,7 @@
    }
    /*
    更新库存明细
     */
@@ -200,8 +210,19 @@
    }
    @Override
    public Double getSumAnfme2(String matnr, String threeCode) {
        return this.baseMapper.selectSumAnfmeByMatnr2(matnr, threeCode);
    }
    @Override
    public AgvLocDetl selectItem(String locNo, String matnr, String batch, String csocode, String isoCode) {
        return this.baseMapper.selectItemByOrderNo(locNo, matnr, batch, csocode, isoCode);
    }
    @Override
    public List<AgvLocDetl> selectItem2(String locNo, String matnr, String batch, String csocode, String isoCode) {
        return this.baseMapper.selectItemByOrderNo2(locNo, matnr, batch, csocode, isoCode);
    }
    @Override
@@ -215,8 +236,18 @@
    }
    @Override
    public Double getSumAnfmeProcessed2(String matnr, String threeCode) {
        return this.baseMapper.selectSumAnfmeByMatnrProcessed2(matnr, threeCode);
    }
    @Override
    public Double getSumAnfmeDb(String matnr, String threeCode, Integer floor) {
        return this.baseMapper.selectSumAnfmeByMatnr2(matnr, threeCode, floor);
        return this.baseMapper.selectSumAnfmeByMatnr22(matnr, threeCode, floor);
    }
    @Override
    public Double getSumAnfmeDb2(String matnr, String threeCode, Integer floor) {
        return this.baseMapper.selectSumAnfmeByMatnr3(matnr, threeCode, floor);
    }
    @Override