This commit is contained in:
大米 2024-01-04 19:09:41 +08:00
parent 7b338c3879
commit 07db8a3e1d
3 changed files with 19 additions and 3 deletions

View File

@ -341,9 +341,9 @@ public class EbomApi extends BaseApi {
@PostMapping("intiException")
@ApiOperation("初始化错误类型")
public ResultVO<Boolean> intiException(@RequestParam("bomRowId") Long bomRowId) throws ExecutionException, InterruptedException {
public ResultVO<Boolean> intiException(@RequestBody List<Long> bomRowIds) throws ExecutionException, InterruptedException {
bomNewEbomParentService.checkAndSaveEBomException(bomRowId );
bomNewEbomParentService.batchCheckAndSaveEBomException(bomRowIds );
return ResultVO.success(true);
}

View File

@ -497,6 +497,22 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
saveException(checkEBomException);
}
/**
* 检查 并保存异常信息
*/
public void batchCheckAndSaveEBomException(List<Long> bomRowIds) throws ExecutionException, InterruptedException {
for (Long bomRowId : bomRowIds) {
CheckEBomException checkEBomException = new CheckEBomException(bomRowId);
checkEBomException.initException();
//保存异常
saveException(checkEBomException);
}
}