绩效管理人员增加一键催办功能

This commit is contained in:
wulin 2020-12-16 16:39:04 +08:00
parent 367bd1f366
commit 515b8a61d1
2 changed files with 61 additions and 6 deletions

View File

@ -17,12 +17,8 @@ import com.lz.modules.app.service.DepartmentsService;
import com.lz.modules.app.service.DepartmentsStaffRelateService;
import com.lz.modules.app.service.StaffOccupationService;
import com.lz.modules.app.service.StaffService;
import com.lz.modules.flow.entity.FlowChange;
import com.lz.modules.flow.entity.FlowRecord;
import com.lz.modules.flow.entity.FlowStart;
import com.lz.modules.flow.service.FlowChangeService;
import com.lz.modules.flow.service.FlowRecordService;
import com.lz.modules.flow.service.FlowStartService;
import com.lz.modules.flow.entity.*;
import com.lz.modules.flow.service.*;
import com.lz.modules.job.model.responseBo.DepartmentInfosBo;
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
import com.lz.modules.performance.entity.TaskProcessRecord;
@ -108,6 +104,15 @@ public class DingtalkBusiness {
@Autowired
private TaskProcessRecordService taskProcessRecordService;
@Autowired
private StaffRoleService staffRoleService;
@Autowired
private StaffRoleDepartmentService staffRoleDepartmentService;
@Autowired
private StaffRoleEvaluationGroupService staffRoleEvaluationGroupService;
@Resource
StaffDao staffDao;
@ -654,6 +659,37 @@ public class DingtalkBusiness {
return "error";
}
//一键催办
public String urging(Long startId, Long flowProcess, Long userId) {
StaffRole staffRole = staffRoleService.selectStaffRoleById(userId);
if(staffRole == null){
//不存在那么看是否为部门领导
}else{
//查询管理的部门信息
if(staffRole.getDepartmentId().intValue() != 0){
}
}
/*ResultRecord lzResultRecord = resultRecordService.selectResultRecordById(recordId);
//获取当前节点谁在处理
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordsByRecordIdAndStatus(recordId, 2);
if(flowRecords.size() > 0){
List<Long> ids = flowRecords.stream().map(new Function<FlowRecord, Long>() {
@Override
public Long apply(FlowRecord flowRecord) {
return flowRecord.getApprovalStaffId();
}
}).collect(Collectors.toList());
List<StaffEntity> staffs = staffService.selectNamesByIds(ids);
sendNoticeMsg(lzResultRecord, staffs);
return "OK";
}*/
return "error";
}
public String sendTaskInputMsg(List<StaffEntity> staffs){
int m = 0;
String userIds = "";

View File

@ -9,6 +9,7 @@ import com.lz.modules.flow.entity.FlowStart;
import com.lz.modules.flow.entity.StaffRole;
import com.lz.modules.flow.service.EvaluationStartStaffService;
import com.lz.modules.flow.service.StaffRoleService;
import com.lz.modules.job.business.DingtalkBusiness;
import com.lz.modules.performance.req.AssessChangeReq;
import com.lz.modules.performance.req.AssessListReq;
import com.lz.modules.performance.req.AssessDetailReq;
@ -51,6 +52,9 @@ public class AssessManagerController extends AbstractController{
@Autowired
private StaffRoleService staffRoleService;
@Autowired
private DingtalkBusiness dingtalkBusiness;
@PostMapping("assess/manager/list")
@ -157,4 +161,19 @@ public class AssessManagerController extends AbstractController{
}
return R.ok();
}
@GetMapping("assess/manager/Urging")
@ApiOperation("一键催办")
@ApiResponses({@ApiResponse(code = 200,message = "成功")})
public R assessToScore(@RequestParam @ApiParam Long startId, @RequestParam @ApiParam Long flowProcess){
try {
Long userId = getUserId();
log.info("一键催办" + userId);
dingtalkBusiness.urging(startId, flowProcess, userId);
} catch (Exception e) {
log.error("开始评分异常" ,e);
return R.error(e.getMessage());
}
return R.ok();
}
}