fix
This commit is contained in:
parent
45ec4229bf
commit
4f3a52596f
@ -40,4 +40,7 @@ public interface EvaluationGroupMapper extends BaseMapper<EvaluationGroup> {
|
|||||||
List<EvaluationGroup> selectEvaluationGroupByIds(@Param("ids") List<Long> ids);
|
List<EvaluationGroup> selectEvaluationGroupByIds(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
EvaluationGroup selectEvaluationGroupByName(@Param("name") String name);
|
EvaluationGroup selectEvaluationGroupByName(@Param("name") String name);
|
||||||
|
|
||||||
|
void deleteByIds(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -46,4 +46,6 @@ public interface EvaluationGroupService extends IService<EvaluationGroup> {
|
|||||||
EvaluationGroup selectEvaluationGroupByName(String name);
|
EvaluationGroup selectEvaluationGroupByName(String name);
|
||||||
//获取考核组里面所有参与的人员信息,去除重复,去除离职
|
//获取考核组里面所有参与的人员信息,去除重复,去除离职
|
||||||
List<StaffSimpleInfo> selectAllStaffSimpleInfoByGroupId(EvaluationGroup evaluationGroup);
|
List<StaffSimpleInfo> selectAllStaffSimpleInfoByGroupId(EvaluationGroup evaluationGroup);
|
||||||
|
|
||||||
|
void deleteByIds(List<Long> ids);
|
||||||
}
|
}
|
||||||
@ -213,4 +213,10 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
|
|
||||||
return staffSimpleInfos;
|
return staffSimpleInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<Long> ids) {
|
||||||
|
evaluationGroupMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.lz.common.utils.PageUtils;
|
|||||||
import com.lz.common.utils.R;
|
import com.lz.common.utils.R;
|
||||||
import com.lz.modules.flow.dao.FlowStartMapper;
|
import com.lz.modules.flow.dao.FlowStartMapper;
|
||||||
import com.lz.modules.flow.entity.FlowStart;
|
import com.lz.modules.flow.entity.FlowStart;
|
||||||
|
import com.lz.modules.performance.req.AssessChangeReq;
|
||||||
import com.lz.modules.performance.req.AssessListReq;
|
import com.lz.modules.performance.req.AssessListReq;
|
||||||
import com.lz.modules.performance.req.AssessDetailReq;
|
import com.lz.modules.performance.req.AssessDetailReq;
|
||||||
import com.lz.modules.performance.res.AssessManagerDetailRes;
|
import com.lz.modules.performance.res.AssessManagerDetailRes;
|
||||||
@ -75,6 +76,29 @@ public class AssessManagerController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("assess/manager/change")
|
||||||
|
@ApiOperation("考核管理组管理变更")
|
||||||
|
@ApiResponses({@ApiResponse(code = 200,message = "成功")})
|
||||||
|
public R assessChange(@RequestBody AssessChangeReq req){
|
||||||
|
if(req.getStartId()==null){
|
||||||
|
return R.error("考核id不能为空");
|
||||||
|
}
|
||||||
|
if(req.getChangeType()==null){
|
||||||
|
return R.error("变动类型无效");
|
||||||
|
}
|
||||||
|
FlowStart flowStart = flowStartMapper.selectFlowStartById(req.getStartId());
|
||||||
|
if(flowStart == null){
|
||||||
|
return R.error("暂无此考核组信息");
|
||||||
|
}
|
||||||
|
flowStart.getGroupIds();
|
||||||
|
assessManagerService.assessChange(req);
|
||||||
|
return R.ok();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("assess/manager/delete")
|
@GetMapping("assess/manager/delete")
|
||||||
@ApiOperation("删除考核任务")
|
@ApiOperation("删除考核任务")
|
||||||
|
|||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.lz.modules.performance.req;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/10/27 14:49
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("考核管理变动实体")
|
||||||
|
public class AssessChangeReq {
|
||||||
|
@ApiModelProperty(value = "考核id",name = "startId")
|
||||||
|
private Long startId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "变更类型 0 :添加 1:删除",name = "changeType")
|
||||||
|
private Integer changeType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "变动人员ids",name = "staffIds")
|
||||||
|
private List<String> staffIds;
|
||||||
|
|
||||||
|
}
|
||||||
@ -17,8 +17,8 @@ import java.util.List;
|
|||||||
@ApiModel("获取考核详情实体")
|
@ApiModel("获取考核详情实体")
|
||||||
public class AssessDetailReq extends BasePage{
|
public class AssessDetailReq extends BasePage{
|
||||||
//考勤组id
|
//考勤组id
|
||||||
@ApiModelProperty(value = "考勤组ids",name = "evaluationIds")
|
@ApiModelProperty(value = "考勤组ids ,逗号隔开",name = "evaluationIds")
|
||||||
private List<Long> evaluationIds;
|
private String evaluationIds;
|
||||||
//发起考核的id
|
//发起考核的id
|
||||||
@ApiModelProperty(value = "发起考核的id",name = "startId")
|
@ApiModelProperty(value = "发起考核的id",name = "startId")
|
||||||
private Long startId;
|
private Long startId;
|
||||||
@ -26,8 +26,8 @@ public class AssessDetailReq extends BasePage{
|
|||||||
@ApiModelProperty(value = "员工名称",name = "staffName")
|
@ApiModelProperty(value = "员工名称",name = "staffName")
|
||||||
private String staffName;
|
private String staffName;
|
||||||
//人员id数组
|
//人员id数组
|
||||||
@ApiModelProperty(value = "人员id数组",name = "staffIds")
|
@ApiModelProperty(value = "人员ids,逗号隔开",name = "staffIds")
|
||||||
private List<Long> staffIds;
|
private String staffIds;
|
||||||
//状态 确认 执行 结果录入。。。
|
//状态 确认 执行 结果录入。。。
|
||||||
@ApiModelProperty(value = "状态 确认 执行 结果录入。。。",name = "flowProcess")
|
@ApiModelProperty(value = "状态 确认 执行 结果录入。。。",name = "flowProcess")
|
||||||
private Integer flowProcess;
|
private Integer flowProcess;
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.lz.modules.performance.service;
|
|||||||
|
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.modules.flow.entity.FlowStart;
|
import com.lz.modules.flow.entity.FlowStart;
|
||||||
|
import com.lz.modules.performance.req.AssessChangeReq;
|
||||||
import com.lz.modules.performance.req.AssessDetailReq;
|
import com.lz.modules.performance.req.AssessDetailReq;
|
||||||
import com.lz.modules.performance.req.AssessListReq;
|
import com.lz.modules.performance.req.AssessListReq;
|
||||||
|
|
||||||
@ -18,4 +19,6 @@ public interface AssessManagerService {
|
|||||||
PageUtils assessDetail(AssessDetailReq req);
|
PageUtils assessDetail(AssessDetailReq req);
|
||||||
|
|
||||||
void accessDelete(FlowStart flowStart);
|
void accessDelete(FlowStart flowStart);
|
||||||
|
|
||||||
|
void assessChange(AssessChangeReq req);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.lz.modules.flow.entity.EvaluationGroup;
|
|||||||
import com.lz.modules.flow.entity.FlowStart;
|
import com.lz.modules.flow.entity.FlowStart;
|
||||||
import com.lz.modules.flow.service.EvaluationGroupService;
|
import com.lz.modules.flow.service.EvaluationGroupService;
|
||||||
import com.lz.modules.flow.service.EvaluationStartStaffService;
|
import com.lz.modules.flow.service.EvaluationStartStaffService;
|
||||||
|
import com.lz.modules.performance.req.AssessChangeReq;
|
||||||
import com.lz.modules.performance.req.AssessDetailReq;
|
import com.lz.modules.performance.req.AssessDetailReq;
|
||||||
import com.lz.modules.performance.req.AssessListReq;
|
import com.lz.modules.performance.req.AssessListReq;
|
||||||
import com.lz.modules.performance.res.AssessManagerDetailRes;
|
import com.lz.modules.performance.res.AssessManagerDetailRes;
|
||||||
@ -21,6 +22,7 @@ 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.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -83,7 +85,28 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
public void accessDelete(FlowStart flowStart) {
|
public void accessDelete(FlowStart flowStart) {
|
||||||
flowStart.setIsDelete(1);
|
flowStart.setIsDelete(1);
|
||||||
flowStartMapper.updateFlowStartById(flowStart);
|
flowStartMapper.updateFlowStartById(flowStart);
|
||||||
|
String groupIds = flowStart.getGroupIds();
|
||||||
|
if(StringUtil.isNotBlank(groupIds)){
|
||||||
|
String[] split = groupIds.split(",");
|
||||||
|
List<String> ids = Arrays.asList(split);
|
||||||
|
List<Long> collect = ids.stream().map(s -> Long.valueOf(s)).collect(Collectors.toList());
|
||||||
|
evaluationGroupService.deleteByIds(collect);
|
||||||
|
}
|
||||||
resultRecordMapper.batchDeleteByStartId(flowStart.getId());
|
resultRecordMapper.batchDeleteByStartId(flowStart.getId());
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void assessChange(AssessChangeReq req) {
|
||||||
|
|
||||||
|
if(req.getChangeType() == 0){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(req.getChangeType() == 1){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,9 @@ 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.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
|
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
|
import com.lz.modules.app.service.DepartmentsService;
|
||||||
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
import com.lz.modules.flow.dao.FlowStartMapper;
|
import com.lz.modules.flow.dao.FlowStartMapper;
|
||||||
@ -50,6 +52,8 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
private FlowStartService flowStartService;
|
private FlowStartService flowStartService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private FlowStartMapper flowStartMapper;
|
private FlowStartMapper flowStartMapper;
|
||||||
|
@Autowired
|
||||||
|
private DepartmentsService departmentsService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -78,11 +82,18 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
}
|
}
|
||||||
data.add(res);
|
data.add(res);
|
||||||
|
|
||||||
List<String> strings = evaluationGroupService.selectAllStaffIdsByGroupId(3L);
|
FlowStart flowStart = flowStartMapper.selectFlowStartById(startId);
|
||||||
List<ChartStatistical> depstaff = this.countDepartmentAndStaffNum(strings);
|
String[] split = flowStart.getGroupIds().split(",");
|
||||||
|
Set<String> staffIds = new HashSet<>();
|
||||||
|
for(String s:split){
|
||||||
|
List<String> strings = evaluationGroupService.selectAllStaffIdsByGroupId(Long.valueOf(s));
|
||||||
|
staffIds.addAll(strings);
|
||||||
|
}
|
||||||
|
List<String> all = new ArrayList<>(staffIds);
|
||||||
|
List<ChartStatistical> depstaff = this.countDepartmentAndStaffNum(all);
|
||||||
res = new ChartStatisticalRes();
|
res = new ChartStatisticalRes();
|
||||||
res.setType(2);
|
res.setType(2);
|
||||||
res.setStatisticals(depstaff);
|
res.setStatisticals(buildDepStaffs(depstaff));
|
||||||
res.setDefaultTime(defaultTime);
|
res.setDefaultTime(defaultTime);
|
||||||
if(StringUtil.isNotBlank(defaultTime)){
|
if(StringUtil.isNotBlank(defaultTime)){
|
||||||
res.setDefaultId(startId);
|
res.setDefaultId(startId);
|
||||||
@ -191,4 +202,15 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<ChartStatistical> buildDepStaffs(List<ChartStatistical> depStaffs){
|
||||||
|
depStaffs.stream().forEach(chartStatistical -> {
|
||||||
|
String desc = chartStatistical.getDesc();
|
||||||
|
DepartmentsEntity departmentsEntity = departmentsService.selectByDepartmentId(desc);
|
||||||
|
if(departmentsEntity!=null && StringUtil.isNotBlank(departmentsEntity.getDepartmentName())){
|
||||||
|
chartStatistical.setDesc(departmentsEntity.getDepartmentName());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return depStaffs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -388,9 +388,9 @@
|
|||||||
ON r.start_id = s.start_id and r.staff_id = s.staff_id
|
ON r.start_id = s.start_id and r.staff_id = s.staff_id
|
||||||
where r.is_delete = 0 and s.is_delete = 0
|
where r.is_delete = 0 and s.is_delete = 0
|
||||||
and r.start_id = #{req.startId}
|
and r.start_id = #{req.startId}
|
||||||
<if test="req.evaluationIds !=null and req.evaluationIds.size()!=0">
|
<if test="req.evaluationIds !=null and req.evaluationIds.size()!=''">
|
||||||
and r.evaluation_id in(
|
and r.evaluation_id in(
|
||||||
<foreach collection="req.evaluationIds" item="evaluation_id" separator=",">
|
<foreach collection="req.evaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
|
||||||
#{evaluation_id}
|
#{evaluation_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
@ -399,11 +399,11 @@
|
|||||||
and r.flow_process = #{req.flowProcess}
|
and r.flow_process = #{req.flowProcess}
|
||||||
</if>
|
</if>
|
||||||
<if test="req.staffName !=null and req.staffName!=''">
|
<if test="req.staffName !=null and req.staffName!=''">
|
||||||
and r.staff_name = #{req.staffName}
|
and r.staff_name LIKE CONCAT('%',#{req.staffName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="req.staffIds !=null and req.staffIds.size() !=0">
|
<if test="req.staffIds !=null and req.staffIds.size() !=''">
|
||||||
and r.staff_id in(
|
and r.staff_id in(
|
||||||
<foreach collection="req.staffIds" item="staff_id" separator=",">
|
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
|
||||||
#{staff_id}
|
#{staff_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
@ -414,22 +414,22 @@
|
|||||||
SELECT count(flow_process) num,flow_process as 'desc' from lz_result_record
|
SELECT count(flow_process) num,flow_process as 'desc' from lz_result_record
|
||||||
where is_delete=0
|
where is_delete=0
|
||||||
and start_id =#{req.startId}
|
and start_id =#{req.startId}
|
||||||
<if test="req.evaluationIds !=null and req.evaluationIds.size()!=0">
|
<if test="req.evaluationIds !=null and req.evaluationIds.size()!=''">
|
||||||
and evaluation_id in(
|
and r.evaluation_id in(
|
||||||
<foreach collection="req.evaluationIds" item="evaluation_id" separator=",">
|
<foreach collection="req.evaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
|
||||||
#{evaluation_id}
|
#{evaluation_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="req.flowProcess !=null">
|
<if test="req.flowProcess !=null">
|
||||||
and flow_process = #{req.flowProcess}
|
and r.flow_process = #{req.flowProcess}
|
||||||
</if>
|
</if>
|
||||||
<if test="req.staffName !=null and req.staffName!=''">
|
<if test="req.staffName !=null and req.staffName!=''">
|
||||||
and staff_name = #{req.staffName}
|
and r.staff_name LIKE CONCAT('%',#{req.staffName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="req.staffIds !=null and req.staffIds.size() !=0">
|
<if test="req.staffIds !=null and req.staffIds.size() !=''">
|
||||||
and staff_id in(
|
and r.staff_id in(
|
||||||
<foreach collection="req.staffIds" item="staff_id" separator=",">
|
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
|
||||||
#{staff_id}
|
#{staff_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -113,5 +113,13 @@
|
|||||||
select * from lz_evaluation_group where name=#{name} and is_delete = 0 limit 1
|
select * from lz_evaluation_group where name=#{name} and is_delete = 0 limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="deleteByIds">
|
||||||
|
update lz_evaluation_group set is_delete = 1 where is_delete=0
|
||||||
|
and id in (
|
||||||
|
<foreach collection="ids" item="id" separator=",">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user