|
|
|
@ -740,7 +740,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
|
|
|
|
|
//先查询是否存在订单自编码
|
|
|
|
|
FactoryOrderEntity factoryOrderEntity = factoryOrderService.selectEntityBySelfCode(selfCode,receivingId); |
|
|
|
|
|
|
|
|
|
if (Objects.isNull(factoryOrderEntity)) { |
|
|
|
|
|
|
|
|
|
factoryOrderEntity = new FactoryOrderEntity(); |
|
|
|
|
factoryOrderEntity.setCode(orderEntity.getString("Code")); |
|
|
|
|
factoryOrderEntity.setSelfCode(selfCode); |
|
|
|
@ -847,7 +847,6 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
|
|
|
|
|
log.error("############handleData: 保存订单失败 selfCode={}", selfCode); |
|
|
|
|
throw new CustomerException(403, "保存订单失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//保存订单成功,继续保存包件
|
|
|
|
|
Long orderId = factoryOrderEntity.getId(); |
|
|
|
|
String packageCode = packageEntity.getString("Code"); |
|
|
|
@ -869,6 +868,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
|
|
|
|
|
factoryPackageEntity.setThirdClassName(packageEntity.getString("ThirdClassName")); |
|
|
|
|
factoryPackageEntity.setPackageDetailNames(packageEntity.getString("PackageDetailNames")); |
|
|
|
|
factoryPackageEntity.setCarNumber(packageEntity.getString("CarNumber")); |
|
|
|
|
factoryPackageEntity.setReserve1(factoryOrderEntity.getCode()); |
|
|
|
|
Boolean buyIn = packageEntity.getBoolean("BuyIn"); |
|
|
|
|
if (buyIn) { |
|
|
|
|
factoryPackageEntity.setBuyin(1); |
|
|
|
@ -933,8 +933,8 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
|
|
|
|
|
factoryPackageEntity.setReceiptStatus(0); |
|
|
|
|
factoryPackageEntity.setPushStatus(0); |
|
|
|
|
factoryPackageEntity.setTurnStatus(0); |
|
|
|
|
boolean save = factoryPackageService.save(factoryPackageEntity); |
|
|
|
|
if (save) { |
|
|
|
|
boolean packageSave = factoryPackageService.save(factoryPackageEntity); |
|
|
|
|
if (packageSave) { |
|
|
|
|
Long packageId = factoryPackageEntity.getId(); |
|
|
|
|
//保存物料信息
|
|
|
|
|
JSONArray packageDetails = packageEntity.getJSONArray("PackageDetails"); |
|
|
|
|