|
|
|
@ -522,6 +522,19 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
String waybillNo = openOrderDTO.getWaybillNo();//运单号
|
|
|
|
|
Long warehouseId = openOrderDTO.getWarehouseId(); |
|
|
|
|
List<Long> advanceIds = openOrderDTO.getAdvanceIds(); |
|
|
|
|
advanceIds.forEach(advanceId -> { |
|
|
|
|
|
|
|
|
|
String key = openAdvanceIds+advanceId; |
|
|
|
|
Boolean exists = bladeRedis.exists(key); |
|
|
|
|
if(exists){ |
|
|
|
|
log.warn("#############openWaybill: 暂存单正在开单 advanceId={}", advanceId); |
|
|
|
|
throw new CustomerException(405,"暂存单["+advanceId+"]正在开单"); |
|
|
|
|
}else{ |
|
|
|
|
bladeRedis.setEx(key, 1,30L); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询开单订单缓存是否存在
|
|
|
|
|
List<TrunklineAdvanceEntity> advanceEntities = advanceService.findListByIds(advanceIds); |
|
|
|
@ -534,16 +547,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
log.warn("#############openWaybill: 暂存单已开单 orderCode={}", orderCode); |
|
|
|
|
throw new CustomerException(405,"暂存单["+orderCode+"]已开单"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String key = openAdvanceIds+advanceId; |
|
|
|
|
Boolean exists = bladeRedis.exists(key); |
|
|
|
|
if(exists){ |
|
|
|
|
log.warn("#############openWaybill: 暂存单正在开单 orderCode={}", orderCode); |
|
|
|
|
throw new CustomerException(405,"暂存单["+orderCode+"]正在开单"); |
|
|
|
|
}else{ |
|
|
|
|
bladeRedis.setEx(key, 1,30L); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|