|
|
|
@ -189,16 +189,25 @@ public class FactoryOrderListener {
|
|
|
|
|
// 组装暂存单数据
|
|
|
|
|
List<JSONObject> advances = new ArrayList<>(); |
|
|
|
|
for (OrderInfoVO orderInfoVO : details) { |
|
|
|
|
List<JSONObject> packageList = new ArrayList<>(); |
|
|
|
|
if (CollUtil.isEmpty(advanceMap)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
List<PackageInfoVO> packageInfoVOS = advanceMap.get(orderInfoVO.getOrderNo()); |
|
|
|
|
if (ObjectUtil.isEmpty(packageInfoVOS)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TrunklineAdvanceEntity advanceEntity = new TrunklineAdvanceEntity(); |
|
|
|
|
advanceEntity.setTenantId(tenantId); |
|
|
|
|
advanceEntity.setStatus(0); |
|
|
|
|
advanceEntity.setIsDeleted(0); |
|
|
|
|
advanceEntity.setHasPackage(CollUtil.isNotEmpty(vo.getPackageInfo()) ? 1 : 0); |
|
|
|
|
advanceEntity.setHasPackage(CollUtil.isNotEmpty(packageInfoVOS) ? 1 : 0); |
|
|
|
|
advanceEntity.setOrderType(vo.getOrderType()); |
|
|
|
|
advanceEntity.setBrand(BrandEnums.SFY.getValue()); |
|
|
|
|
advanceEntity.setSiteName(""); |
|
|
|
|
advanceEntity.setArea(""); |
|
|
|
|
advanceEntity.setTotalNum(CollUtil.isNotEmpty(vo.getPackageInfo()) ? vo.getPackageInfo().size() : 0); |
|
|
|
|
advanceEntity.setTotalNum(CollUtil.isNotEmpty(packageInfoVOS) ? packageInfoVOS.size() : 0); |
|
|
|
|
advanceEntity.setPackName(""); |
|
|
|
|
advanceEntity.setPackCode(""); |
|
|
|
|
advanceEntity.setWarehouseId(startWarehouseId); |
|
|
|
@ -220,14 +229,6 @@ public class FactoryOrderListener {
|
|
|
|
|
advanceEntity.setSenderFactory(vo.getSendAddr()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<JSONObject> packageList = new ArrayList<>(); |
|
|
|
|
if (CollUtil.isEmpty(advanceMap)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
List<PackageInfoVO> packageInfoVOS = advanceMap.get(orderInfoVO.getOrderNo()); |
|
|
|
|
if (ObjectUtil.isEmpty(packageInfoVOS)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
for (PackageInfoVO orderPackageDTO : packageInfoVOS) { |
|
|
|
|
advanceEntity.setDealerCode(orderPackageDTO.getDealerNo()); |
|
|
|
|
advanceEntity.setDealerName(orderPackageDTO.getDealerName()); |
|
|
|
|