wms采购提单-送货单提单--字段修改

master
mengjiao 6 months ago
parent cbe3d06cdb
commit 0b6a8d98c5

@ -794,23 +794,15 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
mapList= (List<Map<String, String>>) result.get("data"); mapList= (List<Map<String, String>>) result.get("data");
for (Map<String, String> sapPurchaseOrderQuery1 : mapList) { for (Map<String, String> sapPurchaseOrderQuery1 : mapList) {
OdsProcureOrder order = new OdsProcureOrder(); OdsProcureOrder order = new OdsProcureOrder();
// 获取 orderId 和 mainId // 获取 mainId
Object orderIdObj = sapPurchaseOrderQuery1.get("orderId");
Object mainIdObj = sapPurchaseOrderQuery1.get("mainId"); Object mainIdObj = sapPurchaseOrderQuery1.get("mainId");
// 将 Object 转换为 String // 将 Object 转换为 String
String orderId = (orderIdObj != null) ? orderIdObj.toString() : null;
String mainId = (mainIdObj != null) ? mainIdObj.toString() : null; String mainId = (mainIdObj != null) ? mainIdObj.toString() : null;
// 判断并补全 orderId
if (orderId != null && orderId.length() < 8) {
orderId = String.format("%08d", Integer.parseInt(orderId));
}
// 判断并补全 mainId // 判断并补全 mainId
if (mainId != null && mainId.length() < 8) { if (mainId != null && mainId.length() < 8) {
mainId = String.format("%08d", Integer.parseInt(mainId)); mainId = String.format("%08d", Integer.parseInt(mainId));
} }
order.setProcureCode(orderId); order.setProcureCode(sapPurchaseOrderQuery1.get("orderNum"));
order.setSiteCode(sapPurchaseOrderQuery1.get("werks")); order.setSiteCode(sapPurchaseOrderQuery1.get("werks"));
//order.setUserDefined3(sapPurchaseOrderQuery1.get("ebelp"));//批次 //order.setUserDefined3(sapPurchaseOrderQuery1.get("ebelp"));//批次
order.setMaterialCode(sapPurchaseOrderQuery1.get("matnr")); order.setMaterialCode(sapPurchaseOrderQuery1.get("matnr"));
@ -820,7 +812,7 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
if (orderList.size() > 0) { if (orderList.size() > 0) {
continue; continue;
} }
order.setUserDefined5(mainId); order.setUserDefined5(mainId);//送货单
order.setPlanNumber(new BigDecimal(sapPurchaseOrderQuery1.get("thisDeliNum"))); order.setPlanNumber(new BigDecimal(sapPurchaseOrderQuery1.get("thisDeliNum")));
order.setUnit(sapPurchaseOrderQuery1.get("unit")); order.setUnit(sapPurchaseOrderQuery1.get("unit"));
order.setSupplierCode(sapPurchaseOrderQuery1.get("lifnr")); order.setSupplierCode(sapPurchaseOrderQuery1.get("lifnr"));

Loading…
Cancel
Save