自动化立体仓库 - WMS系统
#
zyx
2024-04-19 a1e67a0b1bb0b60f87d2db7db17ec1b093e3b73e
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -106,6 +106,7 @@
    @Override
    @Transactional
    public void comb(CombParam param, Long userId) {
@@ -1247,7 +1248,7 @@
        if(isReplace){
            replacePla(pla,manPakOut,plaQty);
        }else {
            if((!Cools.eq(pla.getStatus(),GlobleParameter.PLA_STATUS_2) && !Cools.eq(pla.getStatus(),GlobleParameter.PLA_STATUS_3)) ||
            if((!Cools.eq(pla.getStatus(),GlobleParameter.PLA_STATUS_2) && !Cools.eq(pla.getStatus(),GlobleParameter.PLA_STATUS_3) && !Cools.eq(pla.getStatus(),GlobleParameter.PLA_STATUS_1)) ||
                    !Cools.eq(pla.getBatch(),manPakOut.getBatch()) ||
                    !Cools.eq(pla.getPackageNo()+"",manPakOut.getBarcode()) ||
                    !Cools.eq(pla.getBrand(),manPakOut.getMaktx()) ){
@@ -1332,8 +1333,13 @@
        //还原旧物料状态
        Pla plaOld = plaService.selectByBatchAndPackageNo(manPakOut.getBatch(), Integer.parseInt(manPakOut.getBarcode()), manPakOut.getMaktx());
        //更新新物料信息
        plaNew.setQtyAnfme(plaOld.getQtyAnfme());
        plaNew.setStatus(plaOld.getStatus());
        plaService.updateById(plaNew);
        plaOld.setStatus(GlobleParameter.PLA_STATUS_1);
        plaOld.setQtyAnfme(0.0);
        plaOld.setQtyAnfme(plaOld.getQtyAnfme() - manPakOut.getCount());
        plaService.updateById(plaOld);
@@ -1352,4 +1358,32 @@
        manPakOutService.updateById(manPakOut);
    }
    @Override
    public List<Pla> pdaSelectInfmt(String barcode) {
        EntityWrapper<Pla> plaEntityWrapper = new EntityWrapper<>();
        String[] split = barcode.split(";");
        if (split.length == 4){
            plaEntityWrapper.eq("brand",split[0]);
            plaEntityWrapper.eq("batch",split[1]);
            plaEntityWrapper.eq("package_no",split[2]);
            plaEntityWrapper.eq("line",split[3]);
        }else if (split.length == 1){
            Node node = nodeService.selectOne(new EntityWrapper<Node>().eq("name", barcode));
            if (Cools.isEmpty(node)){
                throw new CoolException("请检查输入的库位码");
            }
            plaEntityWrapper.eq("loc_no",barcode);
        }else {
            throw new CoolException("条码信息有误!");
        }
        List<Pla> plaList = plaService.selectList(plaEntityWrapper);
        if (Cools.isEmpty(plaList)){
            throw new CoolException("未查询到库存物料信息");
        }
        return plaList;
    }
}