Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0
This commit is contained in:
commit
dfbd14a568
@ -387,9 +387,10 @@ public class ResultRecordController extends AbstractController {
|
|||||||
staffs.addAll(departManagers.getManagers());
|
staffs.addAll(departManagers.getManagers());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*if(staffs.size() == 0){
|
if(staffs.size() == 0){
|
||||||
return R.error("找不到有效的评分人,设置的评分人不存在");
|
log.info("无法找到评分人员,开始找绩效管理人员");
|
||||||
}*/
|
staffs = staffService.findManger(resultRecord.getId(), 4);
|
||||||
|
}
|
||||||
|
|
||||||
for (StaffEntity staff:staffs
|
for (StaffEntity staff:staffs
|
||||||
) {
|
) {
|
||||||
|
|||||||
@ -98,4 +98,6 @@ public interface StaffDao extends BaseMapper<StaffEntity> {
|
|||||||
List<StaffEntity> selectNamesByIds(@Param("list") List<Long> sIds);
|
List<StaffEntity> selectNamesByIds(@Param("list") List<Long> sIds);
|
||||||
|
|
||||||
List<StaffEntity> selectStaffsByGroupId(@Param("copyId") Long copyId);
|
List<StaffEntity> selectStaffsByGroupId(@Param("copyId") Long copyId);
|
||||||
|
|
||||||
|
List<StaffEntity> findManger(@Param("recordId") Long recordId, @Param("flowProcess") int flowProcess);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,5 +103,7 @@ public interface StaffService extends IService<StaffEntity> {
|
|||||||
List<StaffEntity> selectNamesByIds(List<Long> sIds);
|
List<StaffEntity> selectNamesByIds(List<Long> sIds);
|
||||||
//获取绩效考核管理员
|
//获取绩效考核管理员
|
||||||
List<StaffEntity> selectStaffsByGroupId(Long copyId);
|
List<StaffEntity> selectStaffsByGroupId(Long copyId);
|
||||||
|
|
||||||
|
List<StaffEntity> findManger(Long recordId, int flowProcess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -529,5 +529,10 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
|||||||
return staffDao.selectStaffsByGroupId(copyId);
|
return staffDao.selectStaffsByGroupId(copyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffEntity> findManger(Long recordId, int flowProcess){
|
||||||
|
return staffDao.findManger(recordId, flowProcess);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,4 +58,5 @@ public interface EvaluationGroupService extends IService<EvaluationGroup> {
|
|||||||
|
|
||||||
String getEvaluationCopyIdsByEvaluationIds(String evaluationIds,Long startId);
|
String getEvaluationCopyIdsByEvaluationIds(String evaluationIds,Long startId);
|
||||||
|
|
||||||
|
EvaluationGroup selectEvaluationGroupByCopyId(Long copyId, Long startId);
|
||||||
}
|
}
|
||||||
@ -414,4 +414,8 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
return StringUtils.join(ids,",");
|
return StringUtils.join(ids,",");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EvaluationGroup selectEvaluationGroupByCopyId(Long copyId, Long startId){
|
||||||
|
return evaluationGroupMapper.selectEvaluationGroupByCopyId(copyId, startId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,7 +149,8 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
log.info("无有效考核人员");
|
log.info("无有效考核人员");
|
||||||
R.error(groupStaffs.getEvaluationGroup().getName() + "——无有效考核人员");
|
R.error(groupStaffs.getEvaluationGroup().getName() + "——无有效考核人员");
|
||||||
}
|
}
|
||||||
switch (start(groupStaffs.getEvaluationGroup(), flowStart, staffManages, staffSimpleInfos, mustRole, selfMustRole)){
|
|
||||||
|
switch (start(groupStaffs.getEvaluationGroup(), flowStart, staffManages, staffSimpleInfos, mustRole, selfMustRole, true)){
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return R.error(groupStaffs.getEvaluationGroup().getName() + "——没有设置考核模板");
|
return R.error(groupStaffs.getEvaluationGroup().getName() + "——没有设置考核模板");
|
||||||
@ -278,7 +279,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch (start(evaluationGroup, flowStart, staffManages, staffIds, mustRole, selfMustRole)){
|
switch (start(evaluationGroup, flowStart, staffManages, staffIds, mustRole, selfMustRole, false)){
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return R.error(evaluationGroup.getName() + "——没有设置考核模板");
|
return R.error(evaluationGroup.getName() + "——没有设置考核模板");
|
||||||
@ -295,10 +296,10 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
}
|
}
|
||||||
return R.ok("发起成功").put("data", flowStart);
|
return R.ok("发起成功").put("data", flowStart);
|
||||||
}
|
}
|
||||||
|
//isInsert表示是否中途加人
|
||||||
private int start(EvaluationGroup evaluationGroup, FlowStart flowStart,
|
private int start(EvaluationGroup evaluationGroup, FlowStart flowStart,
|
||||||
Map<String, List<StaffEntity>> staffManages, List<StaffSimpleInfo> staffIds,
|
Map<String, List<StaffEntity>> staffManages, List<StaffSimpleInfo> staffIds,
|
||||||
Map<Long, List<FlowChartRole>> mustRole, Map<Long, List<FlowChartRole>> selfMustRole){
|
Map<Long, List<FlowChartRole>> mustRole, Map<Long, List<FlowChartRole>> selfMustRole, boolean isInsert){
|
||||||
|
|
||||||
|
|
||||||
List<ResultModelDto> resultModelDtos = resultModelService.selectResultDtoByGroupId(evaluationGroup.getId());
|
List<ResultModelDto> resultModelDtos = resultModelService.selectResultDtoByGroupId(evaluationGroup.getId());
|
||||||
@ -340,7 +341,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
}
|
}
|
||||||
|
|
||||||
//下面拷贝一份考评组信息发起后所使用的考评组id为复制后的id
|
//下面拷贝一份考评组信息发起后所使用的考评组id为复制后的id
|
||||||
if(evaluationGroup.getCopyId() == null || evaluationGroup.getCopyId().longValue() == 0L){
|
if(!isInsert){
|
||||||
evaluationGroup.setCopyId(evaluationGroup.getId());
|
evaluationGroup.setCopyId(evaluationGroup.getId());
|
||||||
evaluationGroup.setId(null);
|
evaluationGroup.setId(null);
|
||||||
evaluationGroup.setGmtCreate(null);
|
evaluationGroup.setGmtCreate(null);
|
||||||
@ -378,6 +379,56 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
//插入备份的考评组指标信息
|
//插入备份的考评组指标信息
|
||||||
resultTagetLibService.insertResultTagetLibs(resultTagetLibs);
|
resultTagetLibService.insertResultTagetLibs(resultTagetLibs);
|
||||||
}
|
}
|
||||||
|
}else{//流程流转中中途加人走的流程
|
||||||
|
evaluationGroup =
|
||||||
|
evaluationGroupService.selectEvaluationGroupByCopyId(evaluationGroup.getId(),flowStart.getId());
|
||||||
|
if(evaluationGroup == null){
|
||||||
|
log.info("无法assess/manager/detail找到拷贝组信息");
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
//以下代码没必要更新,因为这个拷贝分用不到。正确的对应关系清查看lz_evaluation_start_staff
|
||||||
|
//evaluationGroup.setStaffIds(evaluationGroup.getStaffIds() + ",");
|
||||||
|
|
||||||
|
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
||||||
|
//下面初始化参与人员
|
||||||
|
for (StaffSimpleInfo staffInfo:staffIds
|
||||||
|
) {
|
||||||
|
staffInfo.setStartId(flowStart.getId());
|
||||||
|
|
||||||
|
EvaluationStartStaff evaluationStartStaff = new EvaluationStartStaff();
|
||||||
|
evaluationStartStaff.setEvaluationId(evaluationGroup.getId());
|
||||||
|
evaluationStartStaff.setEvaluationName(evaluationGroup.getName());
|
||||||
|
evaluationStartStaff.setStaffId(staffInfo.getId());
|
||||||
|
evaluationStartStaff.setStartId(flowStart.getId());
|
||||||
|
evaluationStartStaff.setDepartmentId(staffInfo.getDepartmentId());
|
||||||
|
evaluationStartStaff.setType(CheckStaffType.STAFF.getCode());
|
||||||
|
evaluationStartStaffs.add(evaluationStartStaff);
|
||||||
|
|
||||||
|
|
||||||
|
//初始化lz_result_records数据
|
||||||
|
ResultRecord resultRecord = new ResultRecord();
|
||||||
|
resultRecord.setDepartmentId(staffInfo.getDepartmentId());
|
||||||
|
resultRecord.setDepartmentName(staffInfo.getDepartmentName());
|
||||||
|
resultRecord.setStaffId(staffInfo.getId());
|
||||||
|
resultRecord.setStaffName(staffInfo.getName());
|
||||||
|
resultRecord.setType(1);//设置为提交目标
|
||||||
|
resultRecord.setStatus(0);//设置为新建
|
||||||
|
resultRecord.setStartId(flowStart.getId());
|
||||||
|
resultRecord.setEvaluationId(evaluationGroup.getId());
|
||||||
|
resultRecord.setFlowProcess(0);//设置为目标制定
|
||||||
|
|
||||||
|
//设置当前审批员工id current_approval_staff_id
|
||||||
|
resultRecord.setCurrentApprovalStaffId(staffInfo.getId());
|
||||||
|
//设置当前审批员工姓名 current_approval_staff_name
|
||||||
|
resultRecord.setCurrentApprovalStaffName(staffInfo.getName());
|
||||||
|
|
||||||
|
resultRecordService.insertResultRecord(resultRecord);
|
||||||
|
staffInfo.setRecordId(resultRecord.getId());
|
||||||
|
//下面生成实际的考核流程
|
||||||
|
resultRecordService.initFlowRecord(resultRecord.getId());
|
||||||
|
}
|
||||||
|
evaluationStartStaffService.insertEvaluationStartStaffs(evaluationStartStaffs);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -545,4 +545,11 @@
|
|||||||
) and is_delete=0) as staff join lz_staff_occupation as occupation on staff.id = occupation.staff_id where occupation.staff_status=0
|
) and is_delete=0) as staff join lz_staff_occupation as occupation on staff.id = occupation.staff_id where occupation.staff_status=0
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findManger" resultType="com.lz.modules.app.entity.StaffEntity">
|
||||||
|
select staff.* from lz_staff as staff join lz_flow_record as record
|
||||||
|
on record.approval_staff_id = staff.id
|
||||||
|
where record.record_id = #{recordId} and record.flow_process=#{flowProcess}
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user