自动化立体仓库 - WMS系统
#
zhou zhou
2025-11-13 35173cda98e2be25cf30a028697e6d363f8c4f77
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -179,6 +179,55 @@
    }
    @Override
    public List<ManLocDetl> pingKuGetList(PKInventoryAdjustment combParam) {
        Node node = nodeService.selectOne(new EntityWrapper<Node>().eq("name", combParam.getLocno()).eq("type", 3));
        if (Cools.isEmpty(node)){
            throw new CoolException("未找到平库库位信息");
        }
        EntityWrapper<ManLocDetl> manLocDetlEntityWrapper = new EntityWrapper<>();
        manLocDetlEntityWrapper.eq("loc_no", node.getName());
        manLocDetlEntityWrapper.eq(!Cools.isEmpty(combParam.getMatnr()),"matnr", combParam.getMatnr());
        List<ManLocDetl> manLocDetls = manLocDetlService.selectList(manLocDetlEntityWrapper);
        if (Cools.isEmpty(manLocDetls)){
            throw new CoolException("未找到库存信息");
        }
        return manLocDetls;
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void pingKuInventoryAdjustment(PKInventoryAdjustment combParam) {
        Node node = nodeService.selectOne(new EntityWrapper<Node>().eq("name", combParam.getLocno()).eq("type", 3));
        if (Cools.isEmpty(node)){
            throw new CoolException("未找到平库库位信息");
        }
        for (ManLocDetl manLocDetl :combParam.getManLocDetls()){
            EntityWrapper<ManLocDetl> manLocDetlEntityWrapper = new EntityWrapper<>();
            manLocDetlEntityWrapper.eq("loc_no", manLocDetl.getLocNo());
            manLocDetlEntityWrapper.eq("matnr", manLocDetl.getMatnr());
            manLocDetlEntityWrapper.eq("batch", manLocDetl.getBatch());
            List<ManLocDetl> manLocDetls = manLocDetlService.selectList(manLocDetlEntityWrapper);
            if (Cools.isEmpty(manLocDetls) || manLocDetls.size() > 1){
                throw new CoolException("数据错误");
            }
            ManLocDetl manLocDetl1 = manLocDetls.get(0);
            BigDecimal adjustBigDecimal = new BigDecimal(manLocDetl.getAnfme().toString());
            BigDecimal orgBigDecimal = new BigDecimal(manLocDetl1.getAnfme().toString());
            if (orgBigDecimal.compareTo(adjustBigDecimal) == 0){
                continue;
            }
            manLocDetl1.setAnfme(adjustBigDecimal.doubleValue());
            if (!manLocDetlService.update(manLocDetl1,manLocDetlEntityWrapper)){
                throw new CoolException("更新数据失败");
            }
        }
    }
    @Override
    public R inLocCallAgv(String sta, String inSta) {
        BasDevp basDevp = basDevpMapper.selectById(inSta);