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

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

# Conflicts: # clx-performance-web/pom.xml Former-commit-id: 86074cfc
......@@ -350,6 +350,11 @@
<artifactId>message-sdk</artifactId>
</dependency>
<dependency>
<groupId>com.msl</groupId>
<artifactId>tx-spring-boot-starter</artifactId>
</dependency>
</dependencies>
......
......@@ -43,6 +43,7 @@ import com.msl.common.base.Optional;
import com.msl.common.exception.ServiceSystemException;
import com.msl.common.result.Result;
import com.msl.common.utils.DateUtils;
import com.msl.tx.utils.SpringTxUtil;
import com.msl.user.data.UserSessionData;
import com.msl.user.utils.TokenUtil;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -53,6 +54,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
......@@ -82,6 +84,7 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
private final OrderChildExceptionReportOperationLogStruct orderChildExceptionReportOperationLogStruct;
private final SendSmsService sendSmsService;
@Transactional(rollbackFor = Exception.class)
@Override
public Result<String> smbSyncExceptionReportInfo(SmbSyncExceptionReportInfoAction action) {
OrderChildExceptionReport report = orderChildExceptionReportStruct.convertInfoSmbAction(action);
......@@ -91,20 +94,20 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
report.setExceptionType(action.getTwoLevelName() + action.getThreeLevelName());
return Result.ok(saveExceptionReportInfo(report, SyncPlatformEnum.Source.TRADE_PLATFORM.getCode()));
}
@Transactional(rollbackFor = Exception.class)
@Override
public Result<Object> smbSyncExceptionReportResult(SmbSyncExceptionReportResultAction action) {
updateExceptionReportResult(SyncPlatformEnum.Source.TRADE_PLATFORM.getCode(),
action.getThirdReportNo(),action.getBreakContractParty());
return Result.ok();
}
@Transactional(rollbackFor = Exception.class)
@Override
public Result<Object> smbWithdrawExceptionReport(SmbWithdrawExceptionReportAction action) {
withdrawExceptionReport(SyncPlatformEnum.Source.TRADE_PLATFORM.getCode(), action.getThirdReportNo());
return Result.ok();
}
@Transactional(rollbackFor = Exception.class)
@Override
public Result<String> mslSyncExceptionReportInfo(MslSyncExceptionReportInfoAction action) {
OrderChildExceptionReport report = orderChildExceptionReportStruct.convertInfoMslAction(action);
......@@ -112,14 +115,14 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
report.setVideoUrlJson(JSON.toJSONString(action.getVideoUrl()));
return Result.ok(saveExceptionReportInfo(report, SyncPlatformEnum.Source.NEW_OWNER_CLIENT.getCode()));
}
@Transactional(rollbackFor = Exception.class)
@Override
public Result<Object> mslSyncExceptionReportResult(MslSyncExceptionReportResultAction action) {
updateExceptionReportResult(SyncPlatformEnum.Source.NEW_OWNER_CLIENT.getCode(),
action.getThirdReportNo(),action.getBreakContractParty());
return Result.ok();
}
@Transactional(rollbackFor = Exception.class)
@Override
public Result<Object> mslWithdrawExceptionReport(MslWithdrawExceptionReportAction action) {
withdrawExceptionReport(SyncPlatformEnum.Source.NEW_OWNER_CLIENT.getCode(), action.getThirdReportNo());
......@@ -227,7 +230,7 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
OrderChildExceptionReport report = orderChildExceptionReportDao.getEntityByKey(param.getId()).orElseThrow(
ResultEnum.DATA_NOT_FIND);
OrderChildExceptionReportDealLog dealLog = null;
OrderChildExceptionReportDealLog dealLog;
if(Objects.equals(report.getStatus(), CarrierExceptionReportEnum.Status.PROCESSED.getCode())
|| Objects.equals(report.getStatus(), CarrierExceptionReportEnum.Status.WITHDRAWN.getCode())){
......@@ -252,6 +255,7 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
dealLog.setCreateBy(loginUserInfo.getUserNo());
dealLog.setCreateName(loginUserInfo.getUserName());
}else{
dealLog = null;
report.setStatus(CarrierExceptionReportEnum.Status.PROCESSED.getCode());
report.setDealTime(LocalDateTime.now());
report.setDealResult(ExceptionReportEnum.DealResult.CARRIER_BREAK_CONTRACT.getCode());
......@@ -290,15 +294,19 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
log.info("结束通知:{} 上报异常处理,请求参数:{}",SyncPlatformEnum.Source.NEW_OWNER_CLIENT.getName(),result);
}
CarrierExceptionLogEnum.Type type = CarrierExceptionLogEnum.Type.AGREE;
String result = ExceptionReportEnum.DealResult.CARRIER_BREAK_CONTRACT.getName();
orderChildExceptionReportDao.updateEntityByKey(report);
if(Objects.nonNull(dealLog)){
orderChildExceptionReportDealLogDao.saveEntity(dealLog);
type = CarrierExceptionLogEnum.Type.APPEAL;
result = null;
}
saveOperationLog(report.getReportNo(),type,result,loginUserInfo.getUserNo(),loginUserInfo.getUserName());
SpringTxUtil.run(() -> {
CarrierExceptionLogEnum.Type type = CarrierExceptionLogEnum.Type.AGREE;
String result = ExceptionReportEnum.DealResult.CARRIER_BREAK_CONTRACT.getName();
orderChildExceptionReportDao.updateEntityByKey(report);
if(Objects.nonNull(dealLog)){
orderChildExceptionReportDealLogDao.saveEntity(dealLog);
type = CarrierExceptionLogEnum.Type.APPEAL;
result = null;
}
saveOperationLog(report.getReportNo(),type,result,loginUserInfo.getUserNo(),loginUserInfo.getUserName());
});
}
@Override
......@@ -386,7 +394,7 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
vo.setOperationLogs(logs);
return vo;
}
@Transactional(rollbackFor = Exception.class)
@Override
public void transferDriverBreakContract(TransferDriverBreakContractParam param) {
OrderChildExceptionReport report = orderChildExceptionReportDao.getEntityByKey(param.getId()).orElseThrow(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论