Browse Source

1.修数据进入系统的对订单进行合并的的操作

newStockUp
pref_mail@163.com 1 year ago
parent
commit
b296faec0d
  1. 8
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java

8
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java

@ -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");

Loading…
Cancel
Save