Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0
This commit is contained in:
commit
52db4335fb
@ -38,4 +38,7 @@ public interface EvaluationStartStaffMapper extends BaseMapper<EvaluationStartSt
|
||||
EvaluationStartStaff selectOneByStartIdAndStaffId(@Param("startId")Long startId,@Param("staffId")Long staffId);
|
||||
|
||||
EvaluationStartStaff selectManagerEvaluationStartStaff(@Param("evaluationId") Long evaluationId, @Param("staffId") Long userId);
|
||||
|
||||
int existByStartIdAndEvaluationId(@Param("startId") Long startId,@Param("evaluationId")Long evaluationId);
|
||||
|
||||
}
|
||||
@ -56,6 +56,10 @@ public class EvaluationGroup implements java.io.Serializable {
|
||||
@ApiModelProperty(value = "参与考核人数", name = "counts")
|
||||
private int counts;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "是否评分 0 :未通知 1:已通知", name = "score")
|
||||
private int score;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
||||
@ -37,4 +37,6 @@ public interface EvaluationStartStaffService extends IService<EvaluationStartSta
|
||||
EvaluationStartStaff selectOneByStartIdAndStaffId(Long startId,Long staffId);
|
||||
|
||||
EvaluationStartStaff selectManagerEvaluationStartStaff(Long evaluationId, Long userId);
|
||||
|
||||
int existByStartIdAndEvaluationId(Long startId,Long evaluationId);
|
||||
}
|
||||
@ -12,6 +12,7 @@ import com.lz.modules.app.service.DepartmentsService;
|
||||
import com.lz.modules.app.service.StaffOccupationService;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.flow.dao.EvaluationGroupMapper;
|
||||
import com.lz.modules.flow.dao.EvaluationStartStaffMapper;
|
||||
import com.lz.modules.flow.entity.EvaluationGroup;
|
||||
import com.lz.modules.flow.entity.FlowStart;
|
||||
import com.lz.modules.flow.req.EvaluationGroupReq;
|
||||
@ -55,6 +56,9 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
||||
@Autowired
|
||||
private FlowStartService flowStartService;
|
||||
|
||||
@Autowired
|
||||
private EvaluationStartStaffMapper evaluationStartStaffMapper;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@ -117,6 +121,13 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
||||
) {
|
||||
List<String> ids = evaluationGroupService.selectAllStaffIdsByGroupId(group.getId());
|
||||
group.setCounts(ids.size());
|
||||
//是否通知评分
|
||||
if(req.getStartId()!=null){
|
||||
int i = evaluationStartStaffMapper.existByStartIdAndEvaluationId(req.getStartId(),group.getId());
|
||||
if(i>0){
|
||||
group.setScore(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return pageUtils;
|
||||
}
|
||||
|
||||
@ -98,4 +98,9 @@ public class EvaluationStartStaffServiceImpl extends ServiceImpl<EvaluationStart
|
||||
public EvaluationStartStaff selectManagerEvaluationStartStaff(Long evaluationId, Long userId){
|
||||
return evaluationStartStaffMapper.selectManagerEvaluationStartStaff(evaluationId,userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int existByStartIdAndEvaluationId(Long startId, Long evaluationId) {
|
||||
return evaluationStartStaffMapper.existByStartIdAndEvaluationId(startId, evaluationId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.lz.modules.performance.req;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
* @Desc:
|
||||
* @Date: 2020/10/28 17:22
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("开始评分")
|
||||
public class AssessToScoreReq {
|
||||
|
||||
@ApiModelProperty(value = "考核组ids",name = "evaluationIds")
|
||||
private String evaluationIds;
|
||||
|
||||
@ApiModelProperty(value = "考核id",name = "startId")
|
||||
private Long startId;
|
||||
}
|
||||
@ -5,6 +5,7 @@ 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.AssessListReq;
|
||||
import com.lz.modules.performance.req.AssessToScoreReq;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
@ -20,4 +21,6 @@ public interface AssessManagerService {
|
||||
void accessDelete(FlowStart flowStart);
|
||||
|
||||
String assessChange(AssessChangeReq req);
|
||||
|
||||
void toScore(AssessToScoreReq req);
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ 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.AssessListReq;
|
||||
import com.lz.modules.performance.req.AssessToScoreReq;
|
||||
import com.lz.modules.performance.res.AssessManagerDetailRes;
|
||||
import com.lz.modules.performance.res.AssessManagerListRes;
|
||||
import com.lz.modules.performance.service.AssessManagerService;
|
||||
@ -111,17 +112,19 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
||||
if(flowStart == null){
|
||||
return "暂无此考核组信息";
|
||||
}
|
||||
//获取本次考的所有考评组信息
|
||||
String[] split = flowStart.getGroupIds().split(",");
|
||||
String[] changeStaffIds = req.getStaffIds().split(",");
|
||||
List<String> strings = Arrays.asList(split);
|
||||
List<Long> ids = strings.stream().map(s -> Long.valueOf(s)).collect(toList());
|
||||
List<EvaluationGroup> evaluationGroups = evaluationGroupService.selectEvaluationGroupByIds(ids);
|
||||
Set<String> staffIds = new HashSet<>();
|
||||
//获取所有考核人员
|
||||
for(EvaluationGroup group:evaluationGroups){
|
||||
List<String> staff = evaluationGroupService.selectAllStaffIdsByGroupId(group.getId());
|
||||
staffIds.addAll(staff);
|
||||
}
|
||||
List<String> all = new ArrayList<>(staffIds);
|
||||
String[] changeStaffIds = req.getStaffIds().split(",");
|
||||
List<String> change = Arrays.asList(changeStaffIds);
|
||||
if(req.getChangeType() == 0){
|
||||
//获取不在考评组的人员
|
||||
@ -142,10 +145,26 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
||||
|
||||
}
|
||||
if(req.getChangeType() == 1){
|
||||
//删除本次考核任务
|
||||
resultRecordMapper.batchDeleteByStartIdAndStaffId(req.getStartId(),change);
|
||||
return ok;
|
||||
}
|
||||
return ok;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@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){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,5 +126,9 @@
|
||||
AND staff_id =#{staffId} and type = 1 is_delete = 0 and limit 1
|
||||
</select>
|
||||
|
||||
<select id="existByStartIdAndEvaluationId" resultType="Integer">
|
||||
select count(1) from lz_evaluation_start_staff where is_delete = 0 and evaluation_id=#{evaluationId}
|
||||
AND start_id =#{startId} and score = 1 limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user