自动化立体仓库 - WMS系统
#
Junjie
2025-06-15 bbb98371ad9e677127c48320b3ebf863a4c6e7b6
src/main/java/com/zy/asrs/service/impl/ReportToThirdServiceImpl.java
@@ -210,16 +210,18 @@
    }
    @Override
    public void reportTkrk(String batch, Double anfme) {
        Object process1 = processTKRK(batch, anfme);
    public boolean reportTkrk(String matnr, String batch, String orderNo, Double anfme) {
        Object process1 = processTKRK(matnr, batch, orderNo, anfme);
        //发送请求
        NcResultMessage response = SendUtil.sendDataToNc(SendUtil.token, nyncIp + ":" + port, saveRefDelivery, JSONObject.toJSONString(process1));
        log.info("销售发货response:{}", response);
//        if (!Cools.isEmpty(response) && response.isSuccess()) {
//            log.info("销售发货response:{}", response);
//        } else {
        log.info("退库入库response:{}", response);
        if (!Cools.isEmpty(response) && response.isSuccess()) {
            log.info("退库入库response:{}", response);
            return true;
        } else {
//            remark = response.getMessage() + "--" + response.getErrorStack().substring(0, 100);
//        }
            return false;
        }
    }
    private Object processXSFH(List<OrderDetl> orderDetls, Boolean flag) {
@@ -261,16 +263,18 @@
        return data;
    }
    private Object processTKRK(String batch, Double anfme) {
        EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>();
        wrapper.like("VBATCHCODE", batch);
        NccXsckmxTkWms nccXsckmxTkWms = nccXsckmxTkWmsService.selectOne(wrapper);
        if (null == nccXsckmxTkWms) {
            throw new CoolException("未找到此条码");
        }
    private Object processTKRK(String matnr,String batch, String orderNo, Double anfme) {
//        EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>();
//        wrapper.eq("VBATCHCODE", batch).eq("VSOURCEBILLCODE", orderNo);
//        NccXsckmxTkWms nccXsckmxTkWms = nccXsckmxTkWmsService.selectOne(wrapper);
//        if (null == nccXsckmxTkWms) {
//            throw new CoolException("未找到此条码");
//        }
        NccSaleXsfhmxWms nccSaleXsfhmxWms = nccSaleXsfhmxWmsService.selectOne(new EntityWrapper<NccSaleXsfhmxWms>()
                .eq("VBILLCODE", nccXsckmxTkWms.getVsourcebillcode()));
                .eq("VBILLCODE", orderNo)
                .eq("WLBM", matnr)
        );
        if(null == nccSaleXsfhmxWms) {
            throw new CoolException("未找到销售单据");
        }
@@ -284,12 +288,11 @@
        saleOutBodyVO = new SaleOutBodyVO();
        saleOutBodyVO.setCsourcetype("4331");
        saleOutBodyVO.setCsourcebillbid(nccXsckmxTkWms.getCsourcebillbid());
        saleOutBodyVO.setCsourcebillhid(nccXsckmxTkWms.getCsourcebillhid());
        saleOutBodyVO.setCsourcebillbid(nccSaleXsfhmxWms.getCdeliverybid());
        saleOutBodyVO.setCsourcebillhid(nccSaleXsfhmxWms.getCdeliveryid());
        saleOutHeadVO.setCwarehouseid(nccSaleXsfhmxWms.getFhckbm());
        saleOutBodyVO.setVbatchcode(nccXsckmxTkWms.getVbatchcode());
        saleOutBodyVO.setNshouldnum(anfme * -1);
        saleOutBodyVO.setVbatchcode(batch);
        saleOutBodyVO.setNnum(anfme * -1);
        saleOutBodyVOList.add(saleOutBodyVO);