This commit is contained in:
杜建超 2020-10-27 17:04:15 +08:00
parent 82bfc20cd4
commit 3e496962b1
5 changed files with 15 additions and 3 deletions

View File

@ -19,4 +19,7 @@ public class ChartResultReq extends BasePage{
@ApiModelProperty(value = "考核id",name = "startId") @ApiModelProperty(value = "考核id",name = "startId")
private Long startId; private Long startId;
@ApiModelProperty(value = "状态",name = "flowProcess")
private Long flowProcess;
} }

View File

@ -14,4 +14,7 @@ public class ChartStatistical {
@ApiModelProperty(value = "人数",name = "num") @ApiModelProperty(value = "人数",name = "num")
private int num = 0; private int num = 0;
@ApiModelProperty(value = "状态",name = "flowProcess")
private Long flowProcess;
} }

View File

@ -29,7 +29,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import java.util.function.Consumer;
/** /**
* @Author: djc * @Author: djc
@ -139,7 +138,7 @@ public class ChartResultServiceImpl implements ChartResultService {
List<String> allDeparmentIds = staffService.selectAllDeparmentIdsByDepartmentParentId(req.getDepartmentId()); List<String> allDeparmentIds = staffService.selectAllDeparmentIdsByDepartmentParentId(req.getDepartmentId());
List<String> ids = staffService.staffsByAllDeparmentIds(allDeparmentIds); List<String> ids = staffService.staffsByAllDeparmentIds(allDeparmentIds);
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect( PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect(
page -> resultRecordMapper.selectChartDetailList(page,ids,req.getStartId()) page -> resultRecordMapper.selectChartDetailList(page,ids,req.getStartId(),req.getFlowProcess())
); );
return pageUtils; return pageUtils;
} }
@ -197,6 +196,7 @@ public class ChartResultServiceImpl implements ChartResultService {
ChartStatistical statistical = new ChartStatistical(); ChartStatistical statistical = new ChartStatistical();
statistical.setDesc(flowProcessEnum.getDesc()); statistical.setDesc(flowProcessEnum.getDesc());
statistical.setNum(0); statistical.setNum(0);
statistical.setFlowProcess(Long.valueOf(flowProcessEnum.getStatus()));
Object o = map.get(flowProcessEnum.getDesc()); Object o = map.get(flowProcessEnum.getDesc());
if(o!=null){ if(o!=null){
statistical.setNum(Integer.valueOf(o.toString())); statistical.setNum(Integer.valueOf(o.toString()));
@ -206,6 +206,9 @@ public class ChartResultServiceImpl implements ChartResultService {
return data; return data;
} }
private List<ChartStatistical> buildDepStaffs(List<ChartStatistical> depStaffs){ private List<ChartStatistical> buildDepStaffs(List<ChartStatistical> depStaffs){
depStaffs.stream().forEach(chartStatistical -> { depStaffs.stream().forEach(chartStatistical -> {
String desc = chartStatistical.getDesc(); String desc = chartStatistical.getDesc();

View File

@ -77,7 +77,7 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
List<ChartStatistical> countNumByScoreLevel(@Param("startId") Long startId); List<ChartStatistical> countNumByScoreLevel(@Param("startId") Long startId);
List<ResultRecord> selectChartDetailList(@Param("page") IPage page, @Param("staffIds") List<String> staffIds, @Param("startId")Long startId); 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); void batchDeleteByStartId(@Param("startId")Long startId);

View File

@ -373,6 +373,9 @@
</foreach> </foreach>
) )
</if> </if>
<if test="flowProcess !=null">
and r.flow_process = #{flowProcess}
</if>
ORDER BY all_score desc ORDER BY all_score desc
</select> </select>