fix
This commit is contained in:
parent
8dd1c6591a
commit
5ab95765bc
@ -38,6 +38,4 @@ public interface EvaluationStartStaffService extends IService<EvaluationStartSta
|
|||||||
|
|
||||||
EvaluationStartStaff selectManagerEvaluationStartStaff(Long evaluationId, Long userId);
|
EvaluationStartStaff selectManagerEvaluationStartStaff(Long evaluationId, Long userId);
|
||||||
|
|
||||||
int existByStartIdAndEvaluationId(Long startId,Long evaluationId);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -99,8 +99,4 @@ public class EvaluationStartStaffServiceImpl extends ServiceImpl<EvaluationStart
|
|||||||
return evaluationStartStaffMapper.selectManagerEvaluationStartStaff(evaluationId,userId);
|
return evaluationStartStaffMapper.selectManagerEvaluationStartStaff(evaluationId,userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int existByStartIdAndEvaluationId(Long startId, Long evaluationId) {
|
|
||||||
return evaluationStartStaffMapper.existByStartIdAndEvaluationId(startId, evaluationId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,18 +38,7 @@ public class ChartController extends AbstractController{
|
|||||||
@ApiOperation("获取绩效报表统计")
|
@ApiOperation("获取绩效报表统计")
|
||||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatisticalRes.class)})
|
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatisticalRes.class)})
|
||||||
public R chartResult(@RequestParam(required = false) @ApiParam(name = "startId",value = "考核周期标识id") Long startId){
|
public R chartResult(@RequestParam(required = false) @ApiParam(name = "startId",value = "考核周期标识id") Long startId){
|
||||||
String defaultTime = StringUtil.EMPTY;
|
List<ChartStatisticalRes> chartStatisticalRes = chartResultService.chartReport(startId);
|
||||||
if(startId==null){
|
|
||||||
//取最近一条记录
|
|
||||||
FlowStart flowStart = flowStartMapper.selectRecentlyLimt();
|
|
||||||
if(flowStart!=null){
|
|
||||||
startId = flowStart.getId();
|
|
||||||
defaultTime = flowStart.getName();
|
|
||||||
}else {
|
|
||||||
return R.ok("暂无记录");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
List<ChartStatisticalRes> chartStatisticalRes = chartResultService.chartReport(startId,defaultTime);
|
|
||||||
return R.ok().put("data",chartStatisticalRes);
|
return R.ok().put("data",chartStatisticalRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,9 @@ public class ChartStatisticalRes {
|
|||||||
@ApiModelProperty(value = "默认时间 ",name = "defaultTime")
|
@ApiModelProperty(value = "默认时间 ",name = "defaultTime")
|
||||||
private String defaultTime;
|
private String defaultTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "0 月度 1:自定义 ",name = "defaultCycleType")
|
||||||
|
private Integer defaultCycleType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "默认考核id ",name = "defaultId")
|
@ApiModelProperty(value = "默认考核id ",name = "defaultId")
|
||||||
private Long defaultId;
|
private Long defaultId;
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface ChartResultService {
|
public interface ChartResultService {
|
||||||
|
|
||||||
List<ChartStatisticalRes> chartReport(Long startId,String defaultTime);
|
List<ChartStatisticalRes> chartReport(Long startId);
|
||||||
|
|
||||||
List<ChartStatistical> countDepartmentAndStaffNum(List<String>staffIds);
|
List<ChartStatistical> countDepartmentAndStaffNum(List<String>staffIds);
|
||||||
|
|
||||||
|
|||||||
@ -158,24 +158,26 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
@Override
|
@Override
|
||||||
public void toScore(AssessToScoreReq req) {
|
public void toScore(AssessToScoreReq req) {
|
||||||
String[] split = req.getEvaluationIds().split(",");
|
String[] split = req.getEvaluationIds().split(",");
|
||||||
for(String s:split){
|
Arrays.asList(split);
|
||||||
int i = evaluationStartStaffService.existByStartIdAndEvaluationId(req.getStartId(), Long.valueOf(s));
|
|
||||||
if(i<1){
|
|
||||||
//发起评分
|
|
||||||
List<String> strings = evaluationGroupService.selectAllStaffIdsByGroupId(Long.valueOf(s));
|
|
||||||
|
|
||||||
evaluationStartStaffService.insertEvaluationStartStaffs();
|
/* evaluationStartStaffService.updateBatchById()
|
||||||
|
evaluationStartStaffService.saveBatch()*/
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<EvaluationStartStaff> buildList(List<String> staffIds){
|
private List<EvaluationStartStaff> buildStartStaffList(List<String> staffIds){
|
||||||
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
||||||
|
staffIds.forEach(new Consumer<String>() {
|
||||||
|
@Override
|
||||||
|
public void accept(String s) {
|
||||||
|
EvaluationStartStaff startStaff = new EvaluationStartStaff();
|
||||||
|
startStaff.setStaffId(Long.valueOf(s));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
return evaluationStartStaffs;
|
return evaluationStartStaffs;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.lz.modules.performance.service.impl;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
|
import com.lz.common.utils.R;
|
||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
@ -62,7 +63,20 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ChartStatisticalRes> chartReport(Long startId,String defaultTime) {
|
public List<ChartStatisticalRes> chartReport(Long startId) {
|
||||||
|
String defaultTime = StringUtil.EMPTY;
|
||||||
|
Integer defaultCycleType = null;
|
||||||
|
if(startId==null){
|
||||||
|
//取最近一条记录
|
||||||
|
FlowStart flowStart = flowStartMapper.selectRecentlyLimt();
|
||||||
|
if(flowStart!=null){
|
||||||
|
startId = flowStart.getId();
|
||||||
|
defaultTime = flowStart.getName();
|
||||||
|
defaultCycleType = flowStart.getCycleType();
|
||||||
|
}else {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
List<ChartStatisticalRes> data = new ArrayList<>();
|
List<ChartStatisticalRes> data = new ArrayList<>();
|
||||||
ChartStatisticalRes res;
|
ChartStatisticalRes res;
|
||||||
|
|
||||||
@ -74,6 +88,7 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
res.setDefaultTime(defaultTime);
|
res.setDefaultTime(defaultTime);
|
||||||
if(StringUtil.isNotBlank(defaultTime)){
|
if(StringUtil.isNotBlank(defaultTime)){
|
||||||
res.setDefaultId(startId);
|
res.setDefaultId(startId);
|
||||||
|
res.setDefaultCycleType(defaultCycleType);
|
||||||
}
|
}
|
||||||
data.add(res);
|
data.add(res);
|
||||||
|
|
||||||
@ -84,6 +99,7 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
res.setDefaultTime(defaultTime);
|
res.setDefaultTime(defaultTime);
|
||||||
if(StringUtil.isNotBlank(defaultTime)){
|
if(StringUtil.isNotBlank(defaultTime)){
|
||||||
res.setDefaultId(startId);
|
res.setDefaultId(startId);
|
||||||
|
res.setDefaultCycleType(defaultCycleType);
|
||||||
}
|
}
|
||||||
data.add(res);
|
data.add(res);
|
||||||
|
|
||||||
@ -102,6 +118,7 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
res.setDefaultTime(defaultTime);
|
res.setDefaultTime(defaultTime);
|
||||||
if(StringUtil.isNotBlank(defaultTime)){
|
if(StringUtil.isNotBlank(defaultTime)){
|
||||||
res.setDefaultId(startId);
|
res.setDefaultId(startId);
|
||||||
|
res.setDefaultCycleType(defaultCycleType);
|
||||||
}
|
}
|
||||||
data.add(res);
|
data.add(res);
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user