fix
This commit is contained in:
parent
53ab4efa73
commit
d96c2d2cdb
@ -42,4 +42,6 @@ public interface EvaluationStartStaffMapper extends BaseMapper<EvaluationStartSt
|
|||||||
int existByStartIdAndEvaluationId(@Param("startId") Long startId,@Param("evaluationId")Long evaluationId);
|
int existByStartIdAndEvaluationId(@Param("startId") Long startId,@Param("evaluationId")Long evaluationId);
|
||||||
|
|
||||||
int updateBatchToScore(@Param("startId") Long startId,@Param("evaluationId")Long evaluationId);
|
int updateBatchToScore(@Param("startId") Long startId,@Param("evaluationId")Long evaluationId);
|
||||||
|
|
||||||
|
int deleteEvaluationStartStaffChangeAssess(@Param("startId") Long startId,@Param("staffIds") List<String> staffIds);
|
||||||
}
|
}
|
||||||
@ -6,6 +6,7 @@ import com.lz.common.utils.R;
|
|||||||
import com.lz.modules.app.entity.StaffSimpleInfo;
|
import com.lz.modules.app.entity.StaffSimpleInfo;
|
||||||
import com.lz.modules.flow.entity.EvaluationGroup;
|
import com.lz.modules.flow.entity.EvaluationGroup;
|
||||||
import com.lz.modules.flow.req.EvaluationGroupReq;
|
import com.lz.modules.flow.req.EvaluationGroupReq;
|
||||||
|
import com.lz.modules.performance.dto.CheckStaffDto;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -48,4 +49,6 @@ public interface EvaluationGroupService extends IService<EvaluationGroup> {
|
|||||||
List<StaffSimpleInfo> selectAllStaffSimpleInfoByGroupId(EvaluationGroup evaluationGroup);
|
List<StaffSimpleInfo> selectAllStaffSimpleInfoByGroupId(EvaluationGroup evaluationGroup);
|
||||||
|
|
||||||
void deleteByIds(List<Long> ids);
|
void deleteByIds(List<Long> ids);
|
||||||
|
|
||||||
|
List<CheckStaffDto> checkStaff(EvaluationGroup evaluationGroup);
|
||||||
}
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
package com.lz.modules.flow.service.impl;
|
package com.lz.modules.flow.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.lz.common.utils.ISelect;
|
import com.lz.common.utils.ISelect;
|
||||||
@ -18,6 +19,8 @@ import com.lz.modules.flow.entity.FlowStart;
|
|||||||
import com.lz.modules.flow.req.EvaluationGroupReq;
|
import com.lz.modules.flow.req.EvaluationGroupReq;
|
||||||
import com.lz.modules.flow.service.EvaluationGroupService;
|
import com.lz.modules.flow.service.EvaluationGroupService;
|
||||||
import com.lz.modules.flow.service.FlowStartService;
|
import com.lz.modules.flow.service.FlowStartService;
|
||||||
|
import com.lz.modules.performance.dto.CheckStaffDto;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -139,6 +142,11 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
if(evaluationGroup ==null ){
|
if(evaluationGroup ==null ){
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.EMPTY_LIST;
|
||||||
}
|
}
|
||||||
|
return getStaffIdsByGroup(evaluationGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<String> getStaffIdsByGroup(EvaluationGroup evaluationGroup){
|
||||||
String depIds = evaluationGroup.getDepIds();
|
String depIds = evaluationGroup.getDepIds();
|
||||||
Set<String> allDeparmentIds = new HashSet<>();
|
Set<String> allDeparmentIds = new HashSet<>();
|
||||||
if(StringUtils.isNotBlank(depIds)){
|
if(StringUtils.isNotBlank(depIds)){
|
||||||
@ -165,7 +173,6 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
List<String> data = staffOccupationService.removeDimissionStaffByStaffIds(distDepStaffIds);
|
List<String> data = staffOccupationService.removeDimissionStaffByStaffIds(distDepStaffIds);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<EvaluationGroup> selectEvaluationGroupByIds(List<Long> ids){
|
public List<EvaluationGroup> selectEvaluationGroupByIds(List<Long> ids){
|
||||||
return evaluationGroupMapper.selectEvaluationGroupByIds(ids);
|
return evaluationGroupMapper.selectEvaluationGroupByIds(ids);
|
||||||
@ -251,4 +258,28 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
public void deleteByIds(List<Long> ids) {
|
public void deleteByIds(List<Long> ids) {
|
||||||
evaluationGroupMapper.deleteByIds(ids);
|
evaluationGroupMapper.deleteByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CheckStaffDto> checkStaff(EvaluationGroup evaluationGroup) {
|
||||||
|
List<CheckStaffDto> staffs= new ArrayList<>();
|
||||||
|
//本次参加人员
|
||||||
|
List<String> staffIdsByGroup = getStaffIdsByGroup(evaluationGroup);
|
||||||
|
|
||||||
|
//获取之前
|
||||||
|
List<EvaluationGroup> evaluationGroups = evaluationGroupMapper.selectList(new QueryWrapper<EvaluationGroup>()
|
||||||
|
.eq("is_delete", 0).eq("copy_id", 0));
|
||||||
|
|
||||||
|
if(CollectionUtils.isEmpty(evaluationGroups)){
|
||||||
|
return staffs;
|
||||||
|
}
|
||||||
|
evaluationGroups.stream().map(new Function<EvaluationGroup, CheckStaffDto>() {
|
||||||
|
@Override
|
||||||
|
public CheckStaffDto apply(EvaluationGroup evaluationGroup) {
|
||||||
|
evaluationGroupService.
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -160,4 +160,15 @@ public class EvaluationGroupController {
|
|||||||
return evaluationGroupService.deleteEvaluationGroupById(id);
|
return evaluationGroupService.deleteEvaluationGroupById(id);
|
||||||
//return R.ok();
|
//return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/checkStaff")
|
||||||
|
@ApiOperation("校验是否有跨组人员")
|
||||||
|
public R checkStaff(@RequestParam @RequestBody @ApiParam EvaluationGroup evaluationGroup) {
|
||||||
|
|
||||||
|
evaluationGroupService.checkStaff(evaluationGroup);
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.lz.modules.performance.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/10/30 10:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CheckStaffDto {
|
||||||
|
|
||||||
|
private String staffName;
|
||||||
|
|
||||||
|
private Long evaluationId;
|
||||||
|
|
||||||
|
private Long staffId;
|
||||||
|
}
|
||||||
@ -7,6 +7,7 @@ import com.lz.common.utils.StringUtil;
|
|||||||
import com.lz.modules.app.dto.ApprovalDto;
|
import com.lz.modules.app.dto.ApprovalDto;
|
||||||
import com.lz.modules.app.dto.StaffSimpleDto;
|
import com.lz.modules.app.dto.StaffSimpleDto;
|
||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
|
import com.lz.modules.flow.dao.EvaluationStartStaffMapper;
|
||||||
import com.lz.modules.flow.dao.FlowStartMapper;
|
import com.lz.modules.flow.dao.FlowStartMapper;
|
||||||
import com.lz.modules.flow.entity.EvaluationGroup;
|
import com.lz.modules.flow.entity.EvaluationGroup;
|
||||||
import com.lz.modules.flow.entity.EvaluationStartStaff;
|
import com.lz.modules.flow.entity.EvaluationStartStaff;
|
||||||
@ -55,6 +56,8 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
private StaffService staffService;
|
private StaffService staffService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResultRecordService resultRecordService;
|
private ResultRecordService resultRecordService;
|
||||||
|
@Autowired
|
||||||
|
private EvaluationStartStaffMapper evaluationStartStaffMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils assessList(AssessListReq req) {
|
public PageUtils assessList(AssessListReq req) {
|
||||||
@ -154,6 +157,7 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
if(req.getChangeType() == 1){
|
if(req.getChangeType() == 1){
|
||||||
//删除本次考核任务
|
//删除本次考核任务
|
||||||
resultRecordMapper.batchDeleteByStartIdAndStaffId(req.getStartId(),change);
|
resultRecordMapper.batchDeleteByStartIdAndStaffId(req.getStartId(),change);
|
||||||
|
evaluationStartStaffMapper.deleteEvaluationStartStaffChangeAssess(req.getStartId(),change);
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
|
|||||||
@ -147,5 +147,21 @@
|
|||||||
where is_delete = 0 and score = 0 and type = 0
|
where is_delete = 0 and score = 0 and type = 0
|
||||||
and evaluation_id = #{evaluationId} and start_id = #{startId}
|
and evaluation_id = #{evaluationId} and start_id = #{startId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="deleteEvaluationStartStaffChangeAssess">
|
||||||
|
update
|
||||||
|
lz_evaluation_start_staff
|
||||||
|
set
|
||||||
|
is_delete = 1,
|
||||||
|
,gmt_modified = now()
|
||||||
|
where is_delete = 0 and type = 0
|
||||||
|
and start_id = #{startId}
|
||||||
|
and staff_id in (
|
||||||
|
<foreach collection="staffIds" item="staff_id" separator=",">
|
||||||
|
#{staff_id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user