认证清单-批量保存接口开发。

This commit is contained in:
wangzhijiang
2023-03-08 09:46:48 +08:00
parent f26479cce1
commit 06068dc9ec
3 changed files with 23 additions and 0 deletions
@@ -213,4 +213,11 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
public Result<?> submitTask(@RequestBody JSONObject json) {
return this.projectCertificationInventoryEOService.submitTask(json);
}
@AutoLog(value = "项目库-认证清单表-批量保存")
@ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存")
@PostMapping(value = "/saveBatch")
public Result<?> saveBatch(@RequestBody List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList) {
return this.projectCertificationInventoryEOService.saveBatch(projectCertificationInventoryEOList);
}
}
@@ -128,4 +128,11 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
* @return
*/
Result<?> certificationInitiatingTask(JSONObject json);
/**
* 批量保存
* @param projectCertificationInventoryEOList
* @return
*/
Result<?> saveBatch(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
}
@@ -715,4 +715,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return Result.OK("发起任务成功!");
}
@Override
public Result<?> saveBatch(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList) {
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
throw new JeroBootException("无法获取需要保存的数据,请检查!");
}
this.updateBatchById(projectCertificationInventoryEOList);
return Result.OK("保存成功!");
}
}