|
|
|
@ -862,19 +862,19 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取订单对象 加入了缓存 |
|
|
|
|
* |
|
|
|
|
* @param orderSelfNum |
|
|
|
|
* 获取订单缓存对象 |
|
|
|
|
* @param receiptId 收货任务ID |
|
|
|
|
* @param orderSelfNum 订单自编号 |
|
|
|
|
* @param departCode 发车单号 |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
private AdvanceEntity findAdvanceEntityUseCacheByOrderSelfNumAndReceiptId(Long receiptId,String orderSelfNum,String departCode) { |
|
|
|
|
String key = AdvanceEntity.class.getName() + ":"+receiptId + orderSelfNum + ":" + departCode; |
|
|
|
|
AdvanceEntity advanceEntity = bladeRedis.get(key); |
|
|
|
|
// if (ObjectUtils.isNull(advanceEntity)) {
|
|
|
|
|
// if (ObjectUtils.isNull(advanceEntity)) {
|
|
|
|
|
//// advanceEntity = iAdvanceClient.getEntityByMctsTruck(orderSelfNum,departCode);
|
|
|
|
|
//// bladeRedis.setEx(key, advanceEntity, 12 * 60 * 60L);
|
|
|
|
|
// }
|
|
|
|
|
return advanceEntity; |
|
|
|
|
return bladeRedis.get(key); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private AdvanceEntity saveAdvanceInfor(ZbOrderPackageEntity serviceNumEntity, List<ZbOrderPackageEntity> zbOrderPackageEntityList) { |
|
|
|
@ -884,7 +884,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
|
|
|
|
|
// 查询订单对应的发货单
|
|
|
|
|
ZbReceiptEntity zbReceiptEntity = findZbReceiptEntityUseCacheById(serviceNumEntity.getReceiptId()); |
|
|
|
|
|
|
|
|
|
AdvanceEntity advanceEntity = findAdvanceEntityUseCacheByOrderSelfNumAndReceiptId(serviceNumEntity.getReceiptId(),serviceNumEntity.getRelationOrderCode(),zbReceiptEntity.getDepartCode()); |
|
|
|
|
AdvanceEntity advanceEntity = findAdvanceEntityUseCacheByOrderSelfNumAndReceiptId(serviceNumEntity.getReceiptId(),serviceNumEntity.getPlatformOrderCode(),zbReceiptEntity.getDepartCode()); |
|
|
|
|
if (ObjectUtils.isNotNull(advanceEntity)) { |
|
|
|
|
return advanceEntity; |
|
|
|
|
} |
|
|
|
@ -893,13 +893,13 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
|
|
|
|
|
//添加订单信息
|
|
|
|
|
advanceEntity = new AdvanceEntity(); |
|
|
|
|
|
|
|
|
|
advanceEntity.setOrderSelfNum(StringUtil.isBlank(serviceNumEntity.getRelationOrderCode()) ? "" : serviceNumEntity.getRelationOrderCode()); //订单自编号
|
|
|
|
|
advanceEntity.setOrderSelfNum(StringUtil.isBlank(serviceNumEntity.getPlatformOrderCode()) ? "" : serviceNumEntity.getPlatformOrderCode()); //订单自编号
|
|
|
|
|
advanceEntity.setSiteName(""); // 基地
|
|
|
|
|
advanceEntity.setArea(""); // 区域
|
|
|
|
|
advanceEntity.setOrderTypeName(zbReceiptEntity.getOrderType()); //订单类型名称 可以为空
|
|
|
|
|
advanceEntity.setOrderClassName("工厂"); //订单类型 可以为空
|
|
|
|
|
advanceEntity.setType(FactoryConstant.ZHIBANG); |
|
|
|
|
int num = mathTotalOrderPackageNum(serviceNumEntity.getRelationOrderCode(), zbOrderPackageEntityList); |
|
|
|
|
int num = mathTotalOrderPackageNum(serviceNumEntity.getPlatformOrderCode(), zbOrderPackageEntityList); |
|
|
|
|
advanceEntity.setTotal(num); //订单总数据
|
|
|
|
|
advanceEntity.setMctsTruck(StringUtil.isBlank(zbReceiptEntity.getDepartCode()) ? "" : zbReceiptEntity.getDepartCode()); //车次
|
|
|
|
|
advanceEntity.setMctsTruckNo(zbReceiptEntity.getCarNumber()); |
|
|
|
@ -919,7 +919,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
|
|
|
|
|
advanceEntity.setStoreNo(StringUtil.isBlank(serviceNumEntity.getCustomerCode()) ? "" : serviceNumEntity.getCustomerCode()); //门店编码
|
|
|
|
|
advanceEntity.setStoreName(serviceNumEntity.getCustomerName()); //门店名称
|
|
|
|
|
advanceEntity.setSerialKey(""); //序列号
|
|
|
|
|
advanceEntity.setServiceNum(StringUtil.isBlank(serviceNumEntity.getPlatformOrderCode()) ? "" : serviceNumEntity.getPlatformOrderCode()); //服务号
|
|
|
|
|
advanceEntity.setServiceNum(StringUtil.isBlank(serviceNumEntity.getRelationOrderCode()) ? "" : serviceNumEntity.getRelationOrderCode()); //服务号
|
|
|
|
|
advanceEntity.setMatingCode("");//齐套模式 可以为空
|
|
|
|
|
advanceEntity.setContractNum("");//合同号 可以为空
|
|
|
|
|
advanceEntity.setLeaveBehind(serviceNumEntity.getLegacyFlag());//遗留:Y=是,N=否
|
|
|
|
@ -962,7 +962,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
|
|
|
|
|
private int mathTotalOrderPackageNum(String orderNum, List<ZbOrderPackageEntity> zbOrderPackageEntityList) { |
|
|
|
|
int totalPackageNum = 0; |
|
|
|
|
for (ZbOrderPackageEntity entity : zbOrderPackageEntityList) { |
|
|
|
|
if (entity.getRelationOrderCode().equals(orderNum)) { |
|
|
|
|
if (entity.getPlatformOrderCode().equals(orderNum)) { |
|
|
|
|
totalPackageNum++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|