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