feat(sip):bug修改
parent
6bb9738dc5
commit
8aa2b92fa6
|
|
@ -613,6 +613,11 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
|
|||
@Override
|
||||
public AddToNexRes addToNex(AddToNexReq addToNexReq) {
|
||||
SysUser sysUser = getSysUser();
|
||||
log.info("通过BOM编码查询产品信息");
|
||||
ProductInfo productInfo = productInfoMapper.selectProductInfoByBomCode(addToNexReq.getProductCode());
|
||||
if (productInfo == null) {
|
||||
throw new ServiceException("未找到BOM编码对应的产品信息: " + addToNexReq.getProductCode());
|
||||
}
|
||||
// 新增采购
|
||||
OmsPurchaseOrder omsPurchaseOrder = new OmsPurchaseOrder();
|
||||
// 设置采购订单基本信息
|
||||
|
|
@ -620,7 +625,7 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
|
|||
omsPurchaseOrder.setBuyerAddress("重庆市两江新区云杉南路6号涉外商务区B6栋7楼");
|
||||
omsPurchaseOrder.setRemark("nex授权申请流程");
|
||||
// 查询制造商id, 制造商编码P008
|
||||
VendorInfo vendorInfo = vendorInfoMapper.selectVendorInfoByVendorCode(nexVendorCode);
|
||||
VendorInfo vendorInfo = vendorInfoMapper.selectVendorInfoByVendorCode(productInfo.getVendorCode()==null?nexVendorCode:productInfo.getVendorCode());
|
||||
omsPurchaseOrder.setVendorId(vendorInfo == null ? null :vendorInfo.getVendorId());
|
||||
omsPurchaseOrder.setCurrency("RMB");
|
||||
// 采购员:userName=徐心钰
|
||||
|
|
@ -648,11 +653,7 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
|
|||
orderItem.setQuantity(new BigDecimal(addToNexReq.getQuantity()));
|
||||
|
||||
// 根据BOM编码查询产品信息,折扣,单价和税率都从产品信息读
|
||||
log.info("通过BOM编码查询产品信息");
|
||||
ProductInfo productInfo = productInfoMapper.selectProductInfoByBomCode(addToNexReq.getProductCode());
|
||||
if (productInfo == null) {
|
||||
throw new ServiceException("未找到BOM编码对应的产品信息: " + addToNexReq.getProductCode());
|
||||
}
|
||||
|
||||
log.info("通过BOM编码查询产品信息");
|
||||
// 将String类型转换为BigDecimal
|
||||
BigDecimal price = new BigDecimal(productInfo.getCataloguePrice() != null ? productInfo.getCataloguePrice() : "0");
|
||||
|
|
|
|||
Loading…
Reference in New Issue