自动化立体仓库 - WMS系统
Junjie
8 天以前 57fe41f460cb72684d6a76869ced6ae93577b75a
src/main/java/com/zy/asrs/service/impl/ReportToThirdServiceImpl.java
@@ -5,7 +5,6 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.core.common.R;
import com.core.exception.CoolException;
import com.zy.asrs.entity.DocType;
import com.zy.asrs.entity.Order;
@@ -19,7 +18,6 @@
import com.zy.nc.entity.*;
import com.zy.nc.service.NccSaleXsfhmxWmsService;
import com.zy.nc.service.NccScPcdaWmsService;
import com.zy.nc.service.NccXsckmxTkWmsService;
import com.zy.nc.util.NcResultMessage;
import com.zy.nc.vo.*;
import lombok.extern.slf4j.Slf4j;
@@ -47,9 +45,6 @@
    @Autowired
    private NccScPcdaWmsService nccScPcdaWmsService;
    @Autowired
    private NccXsckmxTkWmsService nccXsckmxTkWmsService;
    @Autowired
    private NccSaleXsfhmxWmsService nccSaleXsfhmxWmsService;
@@ -210,8 +205,8 @@
    }
    @Override
    public boolean reportTkrk(String batch, String orderNo, Double anfme) {
        Object process1 = processTKRK(batch, orderNo, 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);
@@ -263,17 +258,17 @@
        return data;
    }
    private Object processTKRK(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("未找到此条码");
        }
    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("WLBM", nccXsckmxTkWms.getWlbm())
                .eq("VBILLCODE", orderNo)
                .eq("WLBM", matnr)
        );
        if(null == nccSaleXsfhmxWms) {
            throw new CoolException("未找到销售单据");
@@ -288,11 +283,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.setVbatchcode(batch);
        saleOutBodyVO.setNnum(anfme * -1);
        saleOutBodyVOList.add(saleOutBodyVO);