feat:BPM提交审核修改(缺少插入数据库的部分)

This commit is contained in:
yangxinyu
2025-12-16 09:29:44 +08:00
parent 0981eaaf52
commit 3de308fee1

View File

@@ -698,7 +698,7 @@ public class CourseManageApi extends ApiBaseController{
*/
@PostMapping("/bpm-submit")
@AutoLog(module = "课程",action = "提交审核到BPM",info = "")
public JsonResponse<BPMResponseDto> submitBPMCourseFull(@RequestBody CourseFullDto dto){
public JsonResponse<String> submitBPMCourseFull(@RequestBody CourseFullDto dto){
try {
BPMResponseDto response = null;
//首先判断是否为停用审核
@@ -706,39 +706,19 @@ public class CourseManageApi extends ApiBaseController{
{
// 准备停用审核的JSON请求体,暂时先按照京东方大学堂后端调用BPM系统需要的接口文档的入参示例完成等到有外部接口时再修改
String jsonRequestBody = courseManageService.prepareDisableAuditRequest(dto);
// TODO: 调用BPM接口
//BPMResponseDto bpmResponsedto= courseManageService.callBPMInterface(jsonRequestBody);
// 构造返回结果
//实际使用中返回的值从BPM接口返回的JSON中获取
BPMResponseDto bpmResponsedto = new BPMResponseDto();
bpmResponsedto.setStatus("success");
bpmResponsedto.setAuditId("audit123456");
bpmResponsedto.setAuditApprover("管理员hrbp");
return success(bpmResponsedto);
}
//再判断是否为启用审核
else if(dto.getAuditType() != null && dto.getAuditType()==3)
{
// 准备启用审核的JSON请求体,暂时先按照京东方大学堂后端调用BPM系统需要的接口文档的入参示例完成等到有外部接口时再修改
String jsonRequestBody = courseManageService.prepareDisableAuditRequest(dto);
// TODO: 调用BPM接口
// BPMResponseDto bpmResponsedto= courseManageService.callBPMInterface(jsonRequestBody);
// 构造返回结果
//实际使用中返回的值从BPM接口返回的JSON中获取
BPMResponseDto bpmResponsedto = new BPMResponseDto();
bpmResponsedto.setStatus("success");
bpmResponsedto.setAuditId("audit123456");
bpmResponsedto.setAuditApprover("管理员hrbp");
return success(bpmResponsedto);
}
else{
//通过查看在boe_course_hrbp_audit表当中有没有旧的审核记录数据判断为创建审核还是编辑审核
//注:此处需要查一下查看表的时候需要限定审核记录的状态嘛,先查再问项目经理
String courseId=dto.getCourse().getId();
CourseHRBPAudit previousAudit = hrbpAuditService.hadAuditing(courseId);
if (previousAudit != null) {
@@ -752,19 +732,15 @@ public class CourseManageApi extends ApiBaseController{
String jsonRequestBody = courseManageService.prepareCreateAuditRequest(dto);
// TODO: 调用BPM接口
// BPMResponseDto bpmResponsedto= courseManageService.callBPMInterface(jsonRequestBody);
// 构造返回结果
//实际使用中返回的值从BPM接口返回的JSON中获取
BPMResponseDto bpmResponsedto = new BPMResponseDto();
bpmResponsedto.setStatus("success");
bpmResponsedto.setAuditId("audit123456");
bpmResponsedto.setAuditApprover("管理员hrbp");
return success(bpmResponsedto);
}
}
return success(response);
// 构造DTO
//实际使用中返回的值从BPM接口返回的JSON中获取
BPMResponseDto bpmResponsedto = new BPMResponseDto();
bpmResponsedto.setStatus("success");
bpmResponsedto.setAuditId("audit123456");
bpmResponsedto.setAuditApprover("管理员hrbp");
return success("success");
} catch (Exception e) {
log.error("提交保存课程信息错误",e);
return error("error");