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
1206daa643
@ -8,6 +8,7 @@ import com.lz.modules.app.dto.RecordDetailDto;
|
||||
import com.lz.modules.app.dto.StaffDepartmentDto;
|
||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.entity.StaffSimpleInfo;
|
||||
import com.lz.modules.app.req.ResultRecordReq;
|
||||
import com.lz.modules.app.resp.ResultDetailResp;
|
||||
import com.lz.modules.app.resp.Step;
|
||||
@ -16,7 +17,9 @@ import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.flow.entity.*;
|
||||
import com.lz.modules.flow.model.Auth;
|
||||
import com.lz.modules.flow.model.ResultDetailDto;
|
||||
import com.lz.modules.flow.model.ResultRecordDetailDto;
|
||||
import com.lz.modules.flow.model.ResultRecortModelDto;
|
||||
import com.lz.modules.flow.req.ResultDetailReq;
|
||||
import com.lz.modules.flow.service.*;
|
||||
import com.lz.modules.sys.controller.AbstractController;
|
||||
@ -51,7 +54,7 @@ import java.util.stream.Collectors;
|
||||
@RestController
|
||||
@RequestMapping("user/lzresultrecord")
|
||||
@Slf4j
|
||||
@Api("绩效相关-吴林")
|
||||
@Api(tags = "绩效相关")
|
||||
public class ResultRecordController extends AbstractController {
|
||||
@Autowired
|
||||
private ResultRecordService lzResultRecordService;
|
||||
@ -319,12 +322,15 @@ public class ResultRecordController extends AbstractController {
|
||||
* 信息
|
||||
*/
|
||||
@GetMapping("/getDetail")
|
||||
@ApiOperation("获取绩效详情")
|
||||
@ApiOperation("获取绩效详情-吴林")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = ResultRecordDetailDto.class)})
|
||||
public R getDetail(@RequestParam @ApiParam("绩效id") Long id) {
|
||||
|
||||
ResultRecord resultRecord = lzResultRecordService.selectResultRecordById(id);
|
||||
SysUserEntity user = getUser();
|
||||
if(resultRecord == null){
|
||||
return R.error("绩效不存在");
|
||||
}
|
||||
/*SysUserEntity user = getUser();
|
||||
if(resultRecord.getStaffId().longValue() != user.getUserId().longValue()){
|
||||
//下面判断权限,是否可读
|
||||
EvaluationStartStaff evaluationStartStaff =
|
||||
@ -332,10 +338,41 @@ public class ResultRecordController extends AbstractController {
|
||||
if(evaluationStartStaff == null){//非考核组设置的绩效管理人员,下面应在查询其他权限
|
||||
return R.error("未被授权访问");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
//获取考核维度等信息
|
||||
ResultRecordDetailDto resultRecordDetailDto = new ResultRecordDetailDto();
|
||||
BeanUtils.copyProperties(resultRecord, resultRecordDetailDto);
|
||||
List<ResultModel> resultModels = resultModelService.selectResultModelByGroupId(resultRecord.getEvaluationId());
|
||||
return R.ok().put("data", resultRecord);
|
||||
StaffEntity staffEntity = staffService.selectStaffById(resultRecord.getStaffId());
|
||||
resultRecordDetailDto.setAvatar(staffEntity.getAvatar());
|
||||
resultRecordDetailDto.setJobNumber(staffEntity.getJobNumber());
|
||||
List<ResultRecortModelDto> resultRecortModelDtos = new ArrayList<>();
|
||||
for (ResultModel model:resultModels
|
||||
) {
|
||||
resultRecordDetailDto.setCalculateId(model.getCalculateId());
|
||||
resultRecordDetailDto.setGradeGroupId(model.getGradeGroupId());
|
||||
ResultRecortModelDto resultRecortModelDto = new ResultRecortModelDto();
|
||||
BeanUtils.copyProperties(model, resultRecortModelDto);
|
||||
List<ResultDetailDto> detailDtos = resultDetailService.selectDtosByRecordId(resultRecord.getId(), model.getType());
|
||||
resultRecortModelDto.setDetailDtos(detailDtos);
|
||||
resultRecortModelDtos.add(resultRecortModelDto);
|
||||
}
|
||||
resultRecordDetailDto.setRecortModelDtos(resultRecortModelDtos);
|
||||
|
||||
return R.ok().put("data", resultRecordDetailDto);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/saveDetail")
|
||||
@ApiOperation("保存绩效详情-吴林")
|
||||
public R saveDetail(@RequestParam @ApiParam("绩效id") ResultRecordDetailDto dto) {
|
||||
|
||||
|
||||
|
||||
return R.ok();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -92,4 +92,6 @@ public interface StaffDao extends BaseMapper<StaffEntity> {
|
||||
List<StaffSimpleInfo> selectStaffSimpleInfos(@Param("sIds") List<Long> sIds);
|
||||
|
||||
List<StaffEntity> selectOnJobByIds(@Param("mIds") List<Long> mIds);
|
||||
|
||||
StaffSimpleInfo selectStaffSimpleInfo(@Param("staffId") Long staffId);
|
||||
}
|
||||
|
||||
@ -44,6 +44,8 @@ public class StaffSimpleInfo implements Serializable {
|
||||
private String departmentId;
|
||||
//钉钉,飞书等第三方人员id
|
||||
private String employeeId;
|
||||
//头像
|
||||
private String avatar;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -97,5 +97,7 @@ public interface StaffService extends IService<StaffEntity> {
|
||||
DepartManagers findLeader(Long id, Integer type);
|
||||
//查找在职的
|
||||
List<StaffEntity> selectOnJobByIds(List<Long> mIds);
|
||||
|
||||
StaffSimpleInfo selectStaffSimpleInfo(Long staffId);
|
||||
}
|
||||
|
||||
|
||||
@ -514,5 +514,10 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
||||
return staffDao.selectOnJobByIds(mIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffSimpleInfo selectStaffSimpleInfo(Long staffId){
|
||||
return staffDao.selectStaffSimpleInfo(staffId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -37,18 +37,30 @@ public class ResultRecordDetailDto {
|
||||
@ApiModelProperty(value = "员工id", name = "staffId")
|
||||
private Long staffId;
|
||||
|
||||
@ApiModelProperty(value = "lz_result_calculate 的id,计算法方法id", name = "calculateId")
|
||||
private Long calculateId;
|
||||
|
||||
//使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||
@ApiModelProperty(value = "使用的哪个等级。等级组id,lz_result_grade的group_id", name = "gradeGroupId")
|
||||
private Long gradeGroupId;
|
||||
//当前审批流转所在员工 id
|
||||
@ApiModelProperty(value = "当前审批流转所在员工 id", name = "flowStaffIdRole")
|
||||
private Long flowStaffIdRole;
|
||||
//员工所在部门 id
|
||||
@ApiModelProperty(value = "员工所在部门 id", name = "departmentId")
|
||||
private Long departmentId;
|
||||
private String departmentId;
|
||||
//员工所在部门名称
|
||||
@ApiModelProperty(value = "员工所在部门名称", name = "departmentName")
|
||||
private String departmentName;
|
||||
//员工姓名
|
||||
@ApiModelProperty(value = "员工姓名", name = "staffName")
|
||||
private String staffName;
|
||||
//员工姓名
|
||||
@ApiModelProperty(value = "员工头像", name = "avatar")
|
||||
private String avatar;
|
||||
//员工姓名
|
||||
@ApiModelProperty(value = "员工工号", name = "jobNumber")
|
||||
private String jobNumber;
|
||||
//当前审批的员工 id
|
||||
@ApiModelProperty(value = "当前审批的员工 id", name = "currentApprovalStaffId")
|
||||
private Long currentApprovalStaffId;
|
||||
@ -175,14 +187,14 @@ public class ResultRecordDetailDto {
|
||||
* 员工所在部门 id
|
||||
* @return
|
||||
*/
|
||||
public Long getDepartmentId() {
|
||||
public String getDepartmentId() {
|
||||
return departmentId;
|
||||
}
|
||||
/**
|
||||
* 员工所在部门 id
|
||||
* @param departmentId
|
||||
*/
|
||||
public void setDepartmentId(Long departmentId) {
|
||||
public void setDepartmentId(String departmentId) {
|
||||
this.departmentId = departmentId;
|
||||
}
|
||||
|
||||
|
||||
@ -33,12 +33,7 @@ public class ResultRecortModelDto {
|
||||
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
|
||||
private Integer maxCount;
|
||||
//lz_result_calculate 的id,计算法方法id
|
||||
@ApiModelProperty(value = "lz_result_calculate 的id,计算法方法id", name = "calculateId")
|
||||
private Long calculateId;
|
||||
|
||||
//使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||
@ApiModelProperty(value = "使用的哪个等级。等级组id,lz_result_grade的group_id", name = "gradeGroupId")
|
||||
private Long gradeGroupId;
|
||||
//排序
|
||||
@ApiModelProperty(value = "排序", name = "orderBy")
|
||||
private Integer orderBy;
|
||||
@ -120,38 +115,8 @@ public class ResultRecortModelDto {
|
||||
this.maxCount = maxCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* lz_result_calculate 的id,计算法方法id
|
||||
* @return
|
||||
*/
|
||||
public Long getCalculateId() {
|
||||
return calculateId;
|
||||
}
|
||||
/**
|
||||
* lz_result_calculate 的id,计算法方法id
|
||||
* @param calculateId
|
||||
*/
|
||||
public void setCalculateId(Long calculateId) {
|
||||
this.calculateId = calculateId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||
* @return
|
||||
*/
|
||||
public Long getGradeGroupId() {
|
||||
return gradeGroupId;
|
||||
}
|
||||
/**
|
||||
* 使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||
* @param gradeGroupId
|
||||
*/
|
||||
public void setGradeGroupId(Long gradeGroupId) {
|
||||
this.gradeGroupId = gradeGroupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序
|
||||
* @return
|
||||
@ -175,8 +140,6 @@ public class ResultRecortModelDto {
|
||||
",type=" + type +
|
||||
",weight=" + weight +
|
||||
",maxCount=" + maxCount +
|
||||
",calculateId=" + calculateId +
|
||||
",gradeGroupId=" + gradeGroupId +
|
||||
",orderBy=" + orderBy +
|
||||
"}";
|
||||
}
|
||||
|
||||
@ -121,6 +121,7 @@ public class EvaluationGroupController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/update")
|
||||
public R update(@RequestBody @ApiParam EvaluationGroup evaluationGroup) {
|
||||
evaluationGroupService.updateEvaluationGroupById(evaluationGroup);
|
||||
|
||||
@ -9,6 +9,7 @@ package com.lz.modules.sys.dao.app;
|
||||
*/
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.common.utils.BigDecimalUtil;
|
||||
import com.lz.modules.flow.model.ResultDetailDto;
|
||||
import com.lz.modules.sys.entity.app.ResultDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -43,4 +44,6 @@ public interface ResultDetailMapper extends BaseMapper<ResultDetail> {
|
||||
BigDecimal calculateScore(@Param("recordId") Long recordId, @Param("staffId") Long staffId,@Param("type") Integer type);
|
||||
|
||||
Long insertResultDetails(@Param("list") List<ResultDetail> resultDetails);
|
||||
|
||||
List<ResultDetailDto> selectDtosByRecordId(@Param("recordResultId") Long id, @Param("type") int type);
|
||||
}
|
||||
@ -5,6 +5,7 @@ import com.lz.common.utils.BigDecimalUtil;
|
||||
import com.lz.modules.app.resp.ResultDetailResp;
|
||||
import com.lz.modules.app.resp.Step;
|
||||
import com.lz.modules.flow.model.Auth;
|
||||
import com.lz.modules.flow.model.ResultDetailDto;
|
||||
import com.lz.modules.sys.entity.app.ResultDetail;
|
||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||
|
||||
@ -67,4 +68,6 @@ public interface ResultDetailService extends IService<ResultDetail> {
|
||||
List<ResultDetail> selectByRecordIdAndType(Long id, int i);
|
||||
|
||||
Long insertResultDetails(List<ResultDetail> resultDetails);
|
||||
|
||||
List<ResultDetailDto> selectDtosByRecordId(Long id, int type);
|
||||
}
|
||||
@ -12,6 +12,7 @@ import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.app.utils.t.TwoTuple;
|
||||
import com.lz.modules.flow.entity.*;
|
||||
import com.lz.modules.flow.model.Auth;
|
||||
import com.lz.modules.flow.model.ResultDetailDto;
|
||||
import com.lz.modules.flow.model.StaffRoleDto;
|
||||
import com.lz.modules.flow.service.*;
|
||||
import com.lz.modules.sys.dao.app.ResultDetailMapper;
|
||||
@ -334,4 +335,9 @@ public class ResultDetailServiceImpl extends ServiceImpl<ResultDetailMapper, Res
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResultDetailDto> selectDtosByRecordId(Long id, int type){
|
||||
return resultDetailMapper.selectDtosByRecordId(id, type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -178,5 +178,9 @@
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectDtosByRecordId" resultType="com.lz.modules.flow.model.ResultDetailDto">
|
||||
select * from lz_result_detail where record_id=#{recordResultId} and type = #{type} and is_delete = 0 order by priority asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -510,4 +510,16 @@
|
||||
</foreach>
|
||||
) and occupation.staff_status=0 and staff.is_delete=0 and occupation.is_delete=0
|
||||
</select>
|
||||
|
||||
<select id="selectStaffSimpleInfo" resultType="com.lz.modules.app.entity.StaffSimpleInfo">
|
||||
select info.id as id, info.job_number as job_number, info.name as name, info.position,
|
||||
info.department_id as department_id, info.employee_id as employee_id, dep.department_name as department_name from (
|
||||
select staffinfo.id as id, staffinfo.job_number as job_number, staffinfo.name as name,
|
||||
staffinfo.position, staffinfo.employee_id as employee_id, relate.department_id as department_id from (
|
||||
select staff.id as id, staff.job_number as job_number, staff.name as name,staff.employee_id as employee_id, occupation.position as position
|
||||
from lz_staff staff join lz_staff_occupation occupation on staff.id=occupation.staff_id where staff.id = #{staffId}
|
||||
and occupation.staff_status=0 and occupation.is_delete=0 and staff.is_delete=0
|
||||
) as staffinfo left join lz_departments_staff_relate relate on staffinfo.id = relate.staff_id
|
||||
) as info left join lz_departments dep on info.department_id = dep.department_id GROUP BY info.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user