自动化立体仓库 - WMS系统
#
zhou zhou
1 天以前 25e47300d32d8781d96340e6663596ce270cafd3
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);
@@ -429,8 +478,8 @@
        }
        return success;
    }
    private boolean bindPodAndBerth(String sta) {
    @Override
    public boolean bindPodAndBerth(String sta) {
        String staMap = AgvSiteConstant.SiteMap.get(sta);
        if (staMap == null) {
            log.error("没有找到该站点的入库映射:{}",sta);
@@ -438,7 +487,7 @@
        }
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("reqCode",UUID.randomUUID().toString().replace("-", "")); // 请求唯一值
        jsonObject.put("ctnrTyp","2"); // 容器类型2
        jsonObject.put("ctnrTyp","3"); // 容器类型2
        jsonObject.put("stgBinCode",staMap); // 仓位编号,根据客仓编号转换
        jsonObject.put("indBind","1"); // 1绑定,0解绑