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
984167cee0
@ -7,6 +7,7 @@ import com.lz.modules.equipment.entity.model.BasePage;
|
||||
import com.lz.modules.flow.dao.FlowStartMapper;
|
||||
import com.lz.modules.flow.entity.FlowStart;
|
||||
import com.lz.modules.flow.service.FlowStartService;
|
||||
import com.lz.modules.performance.req.ChartResultReq;
|
||||
import com.lz.modules.performance.req.ChartStartsReq;
|
||||
import com.lz.modules.performance.res.ChartStartsRes;
|
||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||
@ -62,13 +63,13 @@ public class ChartController extends AbstractController{
|
||||
}
|
||||
|
||||
|
||||
/*@PostMapping("chart/rank")
|
||||
@ApiOperation("获取绩排名列表")
|
||||
@PostMapping("chart/detail")
|
||||
@ApiOperation("获取报表等级详情")
|
||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultRankListRes.class)})
|
||||
public R rankList(@RequestBody @ApiParam(name = "body",value = "body请求体",required = true) ChartResultReq req){
|
||||
PageUtils pageUtils = chartResultService.resultRankList(req);
|
||||
public R chartDetailList(@RequestBody @ApiParam(name = "body",value = "body请求体",required = true) ChartResultReq req){
|
||||
PageUtils pageUtils = chartResultService.selectChartDetailList(req);
|
||||
return R.ok().put("data",pageUtils);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.lz.modules.performance.req;
|
||||
|
||||
import com.lz.modules.equipment.entity.model.BasePage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
* @Desc:
|
||||
* @Date: 2020/10/27 16:05
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("获取报表等级详情实体")
|
||||
public class ChartResultReq extends BasePage{
|
||||
|
||||
@ApiModelProperty(value = "部门id",name = "departmentId")
|
||||
private String departmentId;
|
||||
|
||||
@ApiModelProperty(value = "考核id",name = "startId")
|
||||
private Long startId;
|
||||
|
||||
@ApiModelProperty(value = "状态",name = "flowProcess")
|
||||
private Long flowProcess;
|
||||
}
|
||||
@ -14,4 +14,7 @@ public class ChartStatistical {
|
||||
|
||||
@ApiModelProperty(value = "人数",name = "num")
|
||||
private int num = 0;
|
||||
|
||||
@ApiModelProperty(value = "状态",name = "flowProcess")
|
||||
private Long flowProcess;
|
||||
}
|
||||
@ -26,10 +26,7 @@ public class ResultRankListRes {
|
||||
private String scoreLevel;
|
||||
//绩效结果
|
||||
@ApiModelProperty(value = "绩效结果",name = "result")
|
||||
private String result;
|
||||
//绩效排名
|
||||
@ApiModelProperty(value = "绩效排名",name = "rank")
|
||||
private String rank;
|
||||
private String allScore;
|
||||
@ApiModelProperty(value = "id",name = "recordId")
|
||||
private Long recordId;
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.lz.modules.performance.service;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.modules.equipment.entity.model.BasePage;
|
||||
import com.lz.modules.performance.req.AssessDetailReq;
|
||||
import com.lz.modules.performance.req.ChartResultReq;
|
||||
import com.lz.modules.performance.req.ChartStartsReq;
|
||||
import com.lz.modules.performance.res.ChartStartsRes;
|
||||
import com.lz.modules.performance.res.ChartStatistical;
|
||||
@ -21,7 +22,7 @@ public interface ChartResultService {
|
||||
|
||||
List<ChartStatistical> countDepartmentAndStaffNum(List<String>staffIds);
|
||||
|
||||
//PageUtils resultRankList(ChartResultReq req);
|
||||
PageUtils selectChartDetailList(ChartResultReq req);
|
||||
|
||||
PageUtils chartStarts(ChartStartsReq req);
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ import com.lz.modules.flow.service.EvaluationGroupService;
|
||||
import com.lz.modules.flow.service.FlowStartService;
|
||||
import com.lz.modules.performance.enums.ResultFlowProcessEnum;
|
||||
import com.lz.modules.performance.req.AssessDetailReq;
|
||||
import com.lz.modules.performance.req.ChartResultReq;
|
||||
import com.lz.modules.performance.req.ChartStartsReq;
|
||||
import com.lz.modules.performance.res.ChartStartsRes;
|
||||
import com.lz.modules.performance.res.ChartStatistical;
|
||||
@ -28,7 +29,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
@ -133,13 +133,15 @@ public class ChartResultServiceImpl implements ChartResultService {
|
||||
return data;
|
||||
}
|
||||
|
||||
/* @Override
|
||||
public PageUtils resultRankList(ChartResultReq req) {
|
||||
@Override
|
||||
public PageUtils selectChartDetailList(ChartResultReq req) {
|
||||
List<String> allDeparmentIds = staffService.selectAllDeparmentIdsByDepartmentParentId(req.getDepartmentId());
|
||||
List<String> ids = staffService.staffsByAllDeparmentIds(allDeparmentIds);
|
||||
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect(
|
||||
page -> resultRecordMapper.selectResultRankList(page,req)
|
||||
page -> resultRecordMapper.selectChartDetailList(page,ids,req.getStartId(),req.getFlowProcess())
|
||||
);
|
||||
return pageUtils;
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils chartStarts(ChartStartsReq req) {
|
||||
@ -194,6 +196,7 @@ public class ChartResultServiceImpl implements ChartResultService {
|
||||
ChartStatistical statistical = new ChartStatistical();
|
||||
statistical.setDesc(flowProcessEnum.getDesc());
|
||||
statistical.setNum(0);
|
||||
statistical.setFlowProcess(Long.valueOf(flowProcessEnum.getStatus()));
|
||||
Object o = map.get(flowProcessEnum.getDesc());
|
||||
if(o!=null){
|
||||
statistical.setNum(Integer.valueOf(o.toString()));
|
||||
@ -203,6 +206,9 @@ public class ChartResultServiceImpl implements ChartResultService {
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private List<ChartStatistical> buildDepStaffs(List<ChartStatistical> depStaffs){
|
||||
depStaffs.stream().forEach(chartStatistical -> {
|
||||
String desc = chartStatistical.getDesc();
|
||||
|
||||
@ -77,7 +77,7 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
|
||||
|
||||
List<ChartStatistical> countNumByScoreLevel(@Param("startId") Long startId);
|
||||
|
||||
//List<ResultRecord> selectResultRankList(@Param("page") IPage page, @Param("req") ChartResultReq req);
|
||||
List<ResultRecord> selectChartDetailList(@Param("page") IPage page, @Param("staffIds") List<String> staffIds, @Param("startId")Long startId,@Param("flowProcess")Long flowProcess);
|
||||
|
||||
void batchDeleteByStartId(@Param("startId")Long startId);
|
||||
|
||||
|
||||
@ -360,11 +360,23 @@
|
||||
SELECT count(score_level) num,case score_level WHEN 0 THEN '无等级' ELSE score_level END as 'desc' from lz_result_record where is_delete=0 and start_id =#{startId} GROUP BY score_level
|
||||
</select>
|
||||
|
||||
<select id="selectResultRankList" resultType="com.lz.modules.performance.res.ResultRankListRes">
|
||||
SELECT r.id,all_score,department_name,staff_name,score_level,job_number from lz_result_record r
|
||||
<select id="selectChartDetailList" resultType="com.lz.modules.performance.res.ResultRankListRes">
|
||||
SELECT r.id recordId,all_score,department_name,staff_name,score_level,job_number staffNo from lz_result_record r
|
||||
LEFT JOIN lz_staff s
|
||||
on r.staff_id = s.id
|
||||
where r.is_delete =0 and s.is_delete=0 ORDER BY all_score desc
|
||||
where r.is_delete =0 and s.is_delete=0
|
||||
and r.start_id = #{startId}
|
||||
<if test="staffIds!=null and staffIds.size()!=0">
|
||||
and r.staff_id in (
|
||||
<foreach collection="staffIds" item="staff_id" separator=",">
|
||||
#{staff_id}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="flowProcess !=null">
|
||||
and r.flow_process = #{flowProcess}
|
||||
</if>
|
||||
ORDER BY all_score desc
|
||||
</select>
|
||||
|
||||
|
||||
@ -388,7 +400,7 @@
|
||||
ON r.start_id = s.start_id and r.staff_id = s.staff_id
|
||||
where r.is_delete = 0 and s.is_delete = 0
|
||||
and r.start_id = #{req.startId}
|
||||
<if test="req.evaluationIds !=null and req.evaluationIds.size()!=''">
|
||||
<if test="req.evaluationIds !=null and req.evaluationIds !=''">
|
||||
and r.evaluation_id in(
|
||||
<foreach collection="req.evaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
|
||||
#{evaluation_id}
|
||||
@ -401,7 +413,7 @@
|
||||
<if test="req.staffName !=null and req.staffName!=''">
|
||||
and r.staff_name LIKE CONCAT('%',#{req.staffName},'%')
|
||||
</if>
|
||||
<if test="req.staffIds !=null and req.staffIds.size() !=''">
|
||||
<if test="req.staffIds !=null and req.staffIds !=''">
|
||||
and r.staff_id in(
|
||||
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
|
||||
#{staff_id}
|
||||
@ -414,21 +426,21 @@
|
||||
SELECT count(flow_process) num,flow_process as 'desc' from lz_result_record
|
||||
where is_delete=0
|
||||
and start_id =#{req.startId}
|
||||
<if test="req.evaluationIds !=null and req.evaluationIds.size()!=''">
|
||||
and r.evaluation_id in(
|
||||
<if test="req.evaluationIds !=null and req.evaluationIds !=''">
|
||||
and evaluation_id in(
|
||||
<foreach collection="req.evaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
|
||||
#{evaluation_id}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="req.flowProcess !=null">
|
||||
and r.flow_process = #{req.flowProcess}
|
||||
and flow_process = #{req.flowProcess}
|
||||
</if>
|
||||
<if test="req.staffName !=null and req.staffName!=''">
|
||||
and r.staff_name LIKE CONCAT('%',#{req.staffName},'%')
|
||||
and staff_name LIKE CONCAT('%',#{req.staffName},'%')
|
||||
</if>
|
||||
<if test="req.staffIds !=null and req.staffIds.size() !=''">
|
||||
and r.staff_id in(
|
||||
<if test="req.staffIds !=null and req.staffIds !=''">
|
||||
and staff_id in(
|
||||
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
|
||||
#{staff_id}
|
||||
</foreach>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user