Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0

This commit is contained in:
wulin 2020-10-29 19:33:53 +08:00
commit 9942f7a840
9 changed files with 52 additions and 24 deletions

View File

@ -7,4 +7,6 @@ public class FlowDetailResp {
private Long currentStaffId;
private String staffName;
private Long flowRecordId;
private String departName;
}

View File

@ -38,5 +38,4 @@ public interface EvaluationStartStaffService extends IService<EvaluationStartSta
EvaluationStartStaff selectManagerEvaluationStartStaff(Long evaluationId, Long userId);
int existByStartIdAndEvaluationId(Long startId,Long evaluationId);
}

View File

@ -99,8 +99,4 @@ public class EvaluationStartStaffServiceImpl extends ServiceImpl<EvaluationStart
return evaluationStartStaffMapper.selectManagerEvaluationStartStaff(evaluationId,userId);
}
@Override
public int existByStartIdAndEvaluationId(Long startId, Long evaluationId) {
return evaluationStartStaffMapper.existByStartIdAndEvaluationId(startId, evaluationId);
}
}

View File

@ -38,18 +38,7 @@ public class ChartController extends AbstractController{
@ApiOperation("获取绩效报表统计")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatisticalRes.class)})
public R chartResult(@RequestParam(required = false) @ApiParam(name = "startId",value = "考核周期标识id") Long startId){
String defaultTime = StringUtil.EMPTY;
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);
List<ChartStatisticalRes> chartStatisticalRes = chartResultService.chartReport(startId);
return R.ok().put("data",chartStatisticalRes);
}

View File

@ -20,6 +20,9 @@ public class ChartStatisticalRes {
@ApiModelProperty(value = "默认时间 ",name = "defaultTime")
private String defaultTime;
@ApiModelProperty(value = "0 月度 1自定义 ",name = "defaultCycleType")
private Integer defaultCycleType;
@ApiModelProperty(value = "默认考核id ",name = "defaultId")
private Long defaultId;

View File

@ -18,7 +18,7 @@ import java.util.List;
*/
public interface ChartResultService {
List<ChartStatisticalRes> chartReport(Long startId,String defaultTime);
List<ChartStatisticalRes> chartReport(Long startId);
List<ChartStatistical> countDepartmentAndStaffNum(List<String>staffIds);

View File

@ -7,6 +7,7 @@ import com.lz.modules.app.dto.StaffSimpleDto;
import com.lz.modules.app.service.StaffService;
import com.lz.modules.flow.dao.FlowStartMapper;
import com.lz.modules.flow.entity.EvaluationGroup;
import com.lz.modules.flow.entity.EvaluationStartStaff;
import com.lz.modules.flow.entity.FlowStart;
import com.lz.modules.flow.service.EvaluationGroupService;
import com.lz.modules.flow.service.EvaluationStartStaffService;
@ -157,14 +158,29 @@ public class AssessManagerServiceImpl implements AssessManagerService {
@Override
public void toScore(AssessToScoreReq req) {
String[] split = req.getEvaluationIds().split(",");
for(String s:split){
int i = evaluationStartStaffService.existByStartIdAndEvaluationId(req.getStartId(), Long.valueOf(s));
if(i<1){
Arrays.asList(split);
}
}
/* evaluationStartStaffService.updateBatchById()
evaluationStartStaffService.saveBatch()*/
}
private List<EvaluationStartStaff> buildStartStaffList(List<String> staffIds){
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;
}
}

View File

@ -3,6 +3,7 @@ package com.lz.modules.performance.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.collect.Maps;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.app.entity.DepartmentsEntity;
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
@ -62,7 +63,20 @@ public class ChartResultServiceImpl implements ChartResultService {
@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<>();
ChartStatisticalRes res;
@ -74,6 +88,7 @@ public class ChartResultServiceImpl implements ChartResultService {
res.setDefaultTime(defaultTime);
if(StringUtil.isNotBlank(defaultTime)){
res.setDefaultId(startId);
res.setDefaultCycleType(defaultCycleType);
}
data.add(res);
@ -84,6 +99,7 @@ public class ChartResultServiceImpl implements ChartResultService {
res.setDefaultTime(defaultTime);
if(StringUtil.isNotBlank(defaultTime)){
res.setDefaultId(startId);
res.setDefaultCycleType(defaultCycleType);
}
data.add(res);
@ -102,6 +118,7 @@ public class ChartResultServiceImpl implements ChartResultService {
res.setDefaultTime(defaultTime);
if(StringUtil.isNotBlank(defaultTime)){
res.setDefaultId(startId);
res.setDefaultCycleType(defaultCycleType);
}
data.add(res);
return data;

View File

@ -3,6 +3,7 @@ package com.lz.modules.sys.service.app.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dingtalk.api.response.OapiDepartmentListResponse;
import com.lz.common.emun.WorkMsgTypeEnum;
import com.lz.common.exception.RRException;
import com.lz.common.utils.*;
@ -1125,6 +1126,11 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
flowDetailResp.setCurrentStaffId(flowRecord.getApprovalStaffId());
flowDetailResp.setStaffName(flowRecord.getApprovalStaffName());
flowDetailResp.setFlowRecordId(flowRecord.getId());
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.selectLastDepartmentByStaffId(flowRecord.getApprovalStaffId());
if(departmentsStaffRelateEntity !=null){
DepartmentsEntity departmentsEntity = departmentsDao.selectByDepartmentId(departmentsStaffRelateEntity.getDepartmentId());
flowDetailResp.setDepartName(departmentsEntity.getDepartmentName());
}
flowDetailRespList.add(flowDetailResp);
}