|
|
|
@ -713,7 +713,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
|
|
|
|
|
//先查询是否存在订单自编码
|
|
|
|
|
FactoryOrderEntity factoryOrderEntity = factoryOrderService.selectEntityBySelfCode(selfCode); |
|
|
|
|
|
|
|
|
|
if (Objects.isNull(factoryOrderEntity)) { |
|
|
|
|
|
|
|
|
|
factoryOrderEntity = new FactoryOrderEntity(); |
|
|
|
|
factoryOrderEntity.setCode(orderEntity.getString("Code")); |
|
|
|
|
factoryOrderEntity.setSelfCode(selfCode); |
|
|
|
@ -815,7 +815,6 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
|
|
|
|
|
log.warn("############handleData: 保存订单失败 selfCode={}", selfCode); |
|
|
|
|
throw new CustomerException(403, "保存订单失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//保存订单成功,继续保存包件
|
|
|
|
|
Long orderId = factoryOrderEntity.getId(); |
|
|
|
|
String packageCode = packageEntity.getString("Code"); |
|
|
|
@ -835,6 +834,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); |
|
|
|
@ -899,8 +899,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"); |
|
|
|
|