fix:委外公司间调拨

This commit is contained in:
zhaoyf
2026-11-07 17:33:21 +08:00
parent e1fe977677
commit bbdc7ebf7e
3 changed files with 8 additions and 24 deletions

View File

@@ -2,7 +2,6 @@ package org.nl.wms.pm_manage.sap.materialDocument.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -19,6 +18,7 @@ import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
import org.nl.wms.ext_manage.api.ZDWmsApi;
import org.nl.wms.ext_manage.sap.service.SapSupplierQueryService;
import org.nl.wms.pm_manage.SourceBillTypeEnum;
import org.nl.wms.pm_manage.sap.materialDocument.enums.MaterialDocumentBillType;
import org.nl.wms.pm_manage.sap.materialDocument.enums.MaterialDocumentIo;
import org.nl.wms.pm_manage.sap.materialDocument.enums.MaterialDocumentStatus;
@@ -28,12 +28,7 @@ import org.nl.wms.pm_manage.sap.materialDocument.service.dao.MaterialDocument;
import org.nl.wms.pm_manage.sap.materialDocument.service.dao.MaterialDocumentItem;
import org.nl.wms.pm_manage.sap.materialDocument.service.dao.mapper.MaterialDocumentItemMapper;
import org.nl.wms.pm_manage.sap.materialDocument.service.dao.mapper.MaterialDocumentMapper;
import org.nl.wms.pm_manage.sap.materialDocument.service.dto.MaterialDocumentBody;
import org.nl.wms.pm_manage.sap.materialDocument.service.dto.MaterialDocumentDTO;
import org.nl.wms.pm_manage.sap.materialDocument.service.dto.MaterialDocumentFormDto;
import org.nl.wms.pm_manage.sap.materialDocument.service.dto.MaterialDocumentItemBody;
import org.nl.wms.pm_manage.sap.materialDocument.service.dto.MaterialDocumentListVo;
import org.nl.wms.pm_manage.SourceBillTypeEnum;
import org.nl.wms.pm_manage.sap.materialDocument.service.dto.*;
import org.nl.wms.pm_manage.sap.sapDelivery.service.dao.SapDeliveryOrder;
import org.nl.wms.pm_manage.sap.sapDelivery.service.dao.mapper.SapDeliveryOrderMapper;
import org.nl.wms.warehouse_manage.enums.IOSEnum;
@@ -43,14 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@@ -133,12 +121,8 @@ public class MaterialDocumentServiceImpl implements MaterialDocumentService {
MaterialDocument document = new MaterialDocument();
document.setMblnr(mblnr);
document.setMjahr(mjahr);
if (billType != null) {
document.setBilltype(billType.getCode());
document.setIo(billType.getIo().getCode());
} else {
throw new BadRequestException("物料凭证"+mblnr+"未识别到单据类型,billtype/io未写入");
}
document.setBilltype(billType.getCode());
document.setIo(billType.getIo().getCode());
document.setBldat(body.getBldat());
document.setBudat(body.getBudat());

View File

@@ -8,7 +8,7 @@ import cn.hutool.core.util.StrUtil;
public enum OutboundDeliveryBillType {
SUBCONTRACT_OUT("SUBCONTRACT_OUT", "委外交货出库", "LB", "其他出库", false),
TRANSFER_IN("TRANSFER_IN", "公司间调拨收货", "NLCC", null, true),
TRANSFER_IN("TRANSFER_IN", "公司间调拨收货", "NLCC", null, false),
SALES_OUT("SALES_OUT", "原材料销售出库", "ZLF4", "销售出库", false),
SALES_RETURN_IN("SALES_RETURN_IN", "原材料销售退货", "ZLR1", null, true),
TRANSFER_OUT("TRANSFER_OUT", "SAP公司间调拨出货", "NL", null, false);