修复两个bug
This commit is contained in:
parent
4d52ed7432
commit
541238c9cf
@ -390,6 +390,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
//evaluationGroup.setStaffIds(evaluationGroup.getStaffIds() + ",");
|
||||
|
||||
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
||||
List<ResultDetail> resultDetails = new ArrayList();
|
||||
//下面初始化参与人员
|
||||
for (StaffSimpleInfo staffInfo:staffIds
|
||||
) {
|
||||
@ -424,6 +425,35 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
|
||||
resultRecordService.insertResultRecord(resultRecord);
|
||||
staffInfo.setRecordId(resultRecord.getId());
|
||||
|
||||
for (ResultModelDto modelDto:resultModelDtos
|
||||
) {
|
||||
|
||||
|
||||
if(modelDto.getTagetLibs() != null && modelDto.getTagetLibs().size() > 0){//模板里面有添加指标
|
||||
for (ResultTagetLibDto libDto:
|
||||
modelDto.getTagetLibs()) {
|
||||
|
||||
ResultDetail resultDetail = new ResultDetail();
|
||||
resultDetail.setRecordId(resultRecord.getId());
|
||||
resultDetail.setTarget(libDto.getName());
|
||||
resultDetail.setType(modelDto.getType());
|
||||
resultDetail.setKeyResult(libDto.getKeyResult());
|
||||
resultDetail.setCheckWeight(libDto.getWeight());
|
||||
resultDetail.setStaffId(staffInfo.getId());
|
||||
resultDetail.setPriority(libDto.getOrderBy());
|
||||
resultDetails.add(resultDetail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//如果有数据插入lz_result_detail表
|
||||
if(resultDetails.size() > 0){
|
||||
//
|
||||
resultDetailService.insertResultDetails(resultDetails);
|
||||
|
||||
}
|
||||
|
||||
//下面生成实际的考核流程
|
||||
resultRecordService.initFlowRecord(resultRecord.getId());
|
||||
}
|
||||
|
||||
@ -171,15 +171,17 @@ public class EvaluationGroupController extends AbstractController {
|
||||
return Long.parseLong(s);
|
||||
}
|
||||
}).collect(Collectors.toMap(Long::longValue, Function.identity(), (e, replace) -> e));
|
||||
if(staffRoles != null && staffRoles.size() > 0){
|
||||
for (StaffRole staffRole:staffRoles
|
||||
) {//去掉已经在管理本组的管理员
|
||||
if(mapIds.containsKey(staffRole.getStaffId())){
|
||||
mapIds.remove(staffRole.getStaffId());
|
||||
}else{//删除管理的组信息
|
||||
staffRoleEvaluationGroupService.deleteStaffRoleEvaluationGroupByRoleId(staffRole.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (StaffRole staffRole:staffRoles
|
||||
) {//去掉已经在管理本组的管理员
|
||||
if(mapIds.containsKey(staffRole.getStaffId())){
|
||||
mapIds.remove(staffRole.getStaffId());
|
||||
}else{//删除管理的组信息
|
||||
staffRoleEvaluationGroupService.deleteStaffRoleEvaluationGroupByRoleId(staffRole.getId());
|
||||
}
|
||||
}
|
||||
|
||||
//去掉管理全考评组
|
||||
staffRoles = staffRoleService.selectAllGroupManageRoles();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user