提交 10a8ec34 authored 作者: 刘海泉's avatar 刘海泉

Merge remote-tracking branch 'origin/v30.2_break_contract_20241021' into test_jdk17

...@@ -134,16 +134,17 @@ public class LastTruckServiceImpl implements LastTruckService { ...@@ -134,16 +134,17 @@ public class LastTruckServiceImpl implements LastTruckService {
//为每个货主的订单进行加锁,计算最后一车进行排队,防止多个运单dts监听并发导致最后一车重复计算 //为每个货主的订单进行加锁,计算最后一车进行排队,防止多个运单dts监听并发导致最后一车重复计算
RLock lock = redissonClient.getLock(RedissonConstants.CALC_ORDER_LAST_TRUCK_LOCK + orderNo); RLock lock = redissonClient.getLock(RedissonConstants.CALC_ORDER_LAST_TRUCK_LOCK + orderNo);
try{ try{
boolean flag = lock.tryLock(15, 30, TimeUnit.SECONDS);
if (!flag) {
throw new ServiceSystemException(ResultEnum.TRY_LOCK_ERROR,"计算最后一车请求排队超时");
}
String lastTruckCacheKey = getLastTruckCacheKey(orderNo); String lastTruckCacheKey = getLastTruckCacheKey(orderNo);
//已经计算出最后一车,则直接返回运单信息 //已经计算出最后一车,则直接返回运单信息
if(Objects.equals(Boolean.TRUE,redisTemplate.hasKey(lastTruckCacheKey))){ if(Objects.equals(Boolean.TRUE,redisTemplate.hasKey(lastTruckCacheKey))){
String childNo = redisTemplate.opsForValue().get(lastTruckCacheKey); String childNo = redisTemplate.opsForValue().get(lastTruckCacheKey);
return orderChildDao.getByChildNo(childNo).orElseThrow(ResultEnum.DATA_NOT_FIND); return orderChildDao.getByChildNo(childNo).orElseThrow(ResultEnum.DATA_NOT_FIND);
} }
boolean flag = lock.tryLock(15, 30, TimeUnit.SECONDS);
if (!flag) {
throw new ServiceSystemException(ResultEnum.TRY_LOCK_ERROR,"计算最后一车请求排队超时");
}
BigDecimal weight = orderChildDao.listAfterArrayReceiveChild(orderNo); BigDecimal weight = orderChildDao.listAfterArrayReceiveChild(orderNo);
log.info("计算订单最后一车,订单号:{} ,计算是否到达可计算最后一车标准,运单累计拉运吨数:{}, 订单拉运吨数:{}", log.info("计算订单最后一车,订单号:{} ,计算是否到达可计算最后一车标准,运单累计拉运吨数:{}, 订单拉运吨数:{}",
......
...@@ -362,8 +362,8 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio ...@@ -362,8 +362,8 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
OrderChildExceptionReportDealLog::getReportNo, report.getReportNo()); OrderChildExceptionReportDealLog::getReportNo, report.getReportNo());
if(limitOneByField.isPresent()) { if(limitOneByField.isPresent()) {
OrderChildExceptionReportDealLog dealLog = limitOneByField.get(); OrderChildExceptionReportDealLog dealLog = limitOneByField.get();
vo.setAppealPictureUrlList(JSON.parseArray(dealLog.getVideoUrl(),String.class)); vo.setAppealPictureUrlList(JSON.parseArray(dealLog.getPictureUrl(),String.class));
vo.setAppealVideoUrlList(JSON.parseArray(dealLog.getPictureUrl(),String.class)); vo.setAppealVideoUrlList(JSON.parseArray(dealLog.getVideoUrl(),String.class));
} }
List<OrderChildExceptionReportOperationLog> list = orderChildExceptionReportOperationLogDao.listByField( List<OrderChildExceptionReportOperationLog> list = orderChildExceptionReportOperationLogDao.listByField(
OrderChildExceptionReportOperationLog::getReportNo, report.getReportNo()); OrderChildExceptionReportOperationLog::getReportNo, report.getReportNo());
......
...@@ -21,7 +21,7 @@ public class OrderChildExceptionReportOperationLogVO { ...@@ -21,7 +21,7 @@ public class OrderChildExceptionReportOperationLogVO {
private String typeMsg; private String typeMsg;
@Schema(description = "操作事项") @Schema(description = "操作事项")
private String getTypeMsg(){ public String getTypeMsg(){
return CarrierExceptionLogEnum.Type.getMsgByCode(type); return CarrierExceptionLogEnum.Type.getMsgByCode(type);
} }
//操作事项编码 //操作事项编码
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论