diff --git a/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java index 949c9dd10..d594a8edf 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java @@ -229,6 +229,11 @@ public class BusinessDocumentOrderApplicationService { body.put("billDate", billDate); // 商品类型取第一个cargo的productType(0料件,1半成品,2成品) Integer goodsType = (cargoList != null && !cargoList.isEmpty()) ? cargoList.get(0).getProductType() : null; + if (goodsType == null && cargoList != null && !cargoList.isEmpty() && cargoList.get(0).getMaterialBaseInfoId() != null) { + // productType为空时,从物料表查goodsType作为兜底 + MaterialBaseInfoPO material = reservationStockInOrderMapper.getinfo(cargoList.get(0).getMaterialBaseInfoId()); + goodsType = material != null ? material.getGoodsType() : null; + } body.put("goodsType", goodsType != null ? goodsType : ""); body.put("ieFlag", order.getIeType() != null ? order.getIeType() : ""); body.put("corpCode", corpCode != null ? corpCode : ""); diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/po/MaterialBaseInfoPO.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/po/MaterialBaseInfoPO.java index b7f40a5e2..5dc4b21e3 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/po/MaterialBaseInfoPO.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/po/MaterialBaseInfoPO.java @@ -209,6 +209,10 @@ public class MaterialBaseInfoPO extends BaseVOEntity { @ApiModelProperty("HS码") private String hsCode; + @ApiModelProperty("货物类型:0-物料 1-半成品 2-成品") + @Excel(name = "货物类型:0-物料 1-半成品 2-成品") + private Integer goodsType; + @ApiModelProperty("申报单位") private String declarationUnit;