fix
This commit is contained in:
parent
0efa107ef7
commit
32e04d5b1f
@ -138,6 +138,7 @@ public class AssessManagerController extends AbstractController{
|
||||
@ApiResponses({@ApiResponse(code = 200,message = "成功")})
|
||||
public R assessToScore(@RequestBody @ApiParam AssessToScoreReq req){
|
||||
try {
|
||||
log.info("开始评分,当前登陆用户,userId:" + getUserId());
|
||||
assessManagerService.toScore(req);
|
||||
} catch (Exception e) {
|
||||
log.error("开始评分异常" ,e);
|
||||
|
||||
@ -292,33 +292,34 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
||||
log.info("更新evaluationStartStaff 数据 为已评分 " + i);
|
||||
|
||||
List<ToScoreDingTalkDto> dtos = resultRecordMapper.selectToScoreList(req.getStartId(), evaluation);
|
||||
if(CollectionUtils.isEmpty(dtos)){
|
||||
log.info("该考评组无数据 evaluationId:" + evaluation);
|
||||
continue;
|
||||
if(CollectionUtils.isNotEmpty(dtos)){
|
||||
log.info("本次评分更新操作 num: " + dtos.size());
|
||||
dtos.forEach(dto -> {
|
||||
Long recordId = dto.getId();
|
||||
//更新流程绩效
|
||||
ApprovalDto approvalDto = new ApprovalDto();
|
||||
approvalDto.setStatus(1);
|
||||
approvalDto.setResultRecordId(recordId);
|
||||
approvalDto.setMenuName("开始评分");
|
||||
try {
|
||||
R r = resultRecordService.newApproval(approvalDto);
|
||||
log.info("绩效id aLong :" + recordId + " ,res" + JSON.toJSONString(r));
|
||||
} catch (Exception e) {
|
||||
log.error("执行中状态跳过失败 recorId:" + recordId,e);
|
||||
}
|
||||
//钉钉通知评分构建
|
||||
StaffSimpleInfo staffSimpleInfo = new StaffSimpleInfo();
|
||||
staffSimpleInfo.setId(dto.getStaffId());
|
||||
staffSimpleInfo.setRecordId(recordId);
|
||||
staffSimpleInfo.setStartId(req.getStartId());
|
||||
toStaffids.add(staffSimpleInfo);
|
||||
|
||||
});
|
||||
}
|
||||
else {
|
||||
log.info("该考评组无数据 evaluationId:" + evaluation);
|
||||
}
|
||||
log.info("本次评分更新操作 num: " + dtos.size());
|
||||
dtos.forEach(dto -> {
|
||||
Long recordId = dto.getId();
|
||||
//更新流程绩效
|
||||
ApprovalDto approvalDto = new ApprovalDto();
|
||||
approvalDto.setStatus(1);
|
||||
approvalDto.setResultRecordId(recordId);
|
||||
approvalDto.setMenuName("开始评分");
|
||||
try {
|
||||
R r = resultRecordService.newApproval(approvalDto);
|
||||
log.info("绩效id aLong :" + recordId + " ,res" + JSON.toJSONString(r));
|
||||
} catch (Exception e) {
|
||||
log.error("执行中状态跳过失败 recorId:" + recordId,e);
|
||||
}
|
||||
//钉钉通知评分构建
|
||||
StaffSimpleInfo staffSimpleInfo = new StaffSimpleInfo();
|
||||
staffSimpleInfo.setId(dto.getStaffId());
|
||||
staffSimpleInfo.setRecordId(recordId);
|
||||
staffSimpleInfo.setStartId(req.getStartId());
|
||||
toStaffids.add(staffSimpleInfo);
|
||||
|
||||
|
||||
});
|
||||
//更新flowRecord记录
|
||||
List<Object> objects = resultRecordService.listObjs(new QueryWrapper<ResultRecord>()
|
||||
.eq("is_delete", 0)
|
||||
@ -331,15 +332,16 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
||||
log.info("更新flowRecord记录,i:" + updateExecution);
|
||||
|
||||
}
|
||||
|
||||
//通知评分
|
||||
try {
|
||||
String s = dingtalkBusiness.sendWorkMSGWithAsyn(toStaffids, WorkMsgTypeEnum.START_SCORE.getType());
|
||||
log.info("钉钉评分响应返回,res:" + s);
|
||||
} catch (Exception e) {
|
||||
log.error("通知评分异常:ids: " + JSON.toJSONString(toStaffids) + " ,e: " ,e);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(toStaffids)){
|
||||
//通知评分
|
||||
try {
|
||||
String s = dingtalkBusiness.sendWorkMSGWithAsyn(toStaffids, WorkMsgTypeEnum.START_SCORE.getType());
|
||||
log.info("钉钉评分响应返回,res:" + s);
|
||||
} catch (Exception e) {
|
||||
log.error("通知评分异常:ids: " + JSON.toJSONString(toStaffids) + " ,e: " ,e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -102,6 +102,7 @@ public class AssessServiceImpl implements AssessService {
|
||||
log.info("获取 roleDepartment,staffRole: " + JSON.toJSONString(staffRole));
|
||||
// 0 标识全部部门
|
||||
if (staffRole.getDepartmentId() == 0) {
|
||||
log.info("staffRole 为0,管理全部部门");
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user