公共处理
This commit is contained in:
@@ -30,38 +30,32 @@ import javax.annotation.Resource;
|
||||
public class LineAuditController {
|
||||
|
||||
private LineFlowService lineFlowService;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
@ApiOperation("审核通过")
|
||||
@PostMapping("/pass")
|
||||
public ResponseResult<Boolean> auditPass(@RequestBody AuditPassRequest request){
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||
initLineFlowService(lineInfo);
|
||||
return ResponseResult.success(lineFlowService.auditPass(lineInfo, request));
|
||||
initLineFlowService(request.getWorkflowSubStage());
|
||||
return ResponseResult.success(lineFlowService.auditPass(request));
|
||||
}
|
||||
|
||||
@ApiOperation("审核拒绝")
|
||||
@PostMapping("/reject")
|
||||
public ResponseResult<Boolean> auditReject(@RequestBody AuditRejectRequest request){
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||
initLineFlowService(lineInfo);
|
||||
return ResponseResult.success(lineFlowService.auditReject(lineInfo, request));
|
||||
initLineFlowService(request.getWorkflowSubStage());
|
||||
return ResponseResult.success(lineFlowService.auditReject(request));
|
||||
}
|
||||
|
||||
@ApiOperation("结束跟进")
|
||||
@PostMapping("/close")
|
||||
public ResponseResult<Boolean> auditClose(@RequestBody AuditRejectRequest request){
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||
initLineFlowService(lineInfo);
|
||||
return ResponseResult.success(lineFlowService.auditClose(lineInfo, request));
|
||||
initLineFlowService(request.getWorkflowSubStage());
|
||||
return ResponseResult.success(lineFlowService.auditClose(request));
|
||||
}
|
||||
|
||||
|
||||
private void initLineFlowService(LineInfoDO lineInfo){
|
||||
Integer workflowSubStage = lineInfo.getWorkflowSubStage();
|
||||
private void initLineFlowService(Integer workflowSubStage){
|
||||
if(workflowSubStage == 1){
|
||||
this.lineFlowService = (LineFlowService)applicationContext.getBean(LineInterviewServiceImpl.class);
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user