Browse Source

1.干线bug修复

master
zhenghaoyu 4 months ago
parent
commit
7db4d93414
  1. 23
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

23
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

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

Loading…
Cancel
Save