This commit is contained in:
杜建超 2020-11-11 09:39:34 +08:00
parent bf8715b920
commit 144ea5fdde
3 changed files with 17 additions and 9 deletions

View File

@ -116,11 +116,11 @@ public class AssessManagerServiceImpl implements AssessManagerService {
res.setCycleTime(name.substring(0,name.lastIndexOf("绩效考核")));
}
//过滤非自己管理的人员
ResultRecord resultRecord = resultRecordMapper.selectOneByStartId(flowStart.getId());
//没有管理的部门
if(mandepartmentIds!=null && mandepartmentIds.size()==0){
res.setJoinNum("0人");
}else {
ResultRecord resultRecord = resultRecordMapper.selectOneByStartId(flowStart.getId(),mandepartmentIds);
int i = resultRecordMapper.countStartAndGroupNum(flowStart.getId(),mandepartmentIds);
res.setJoinNum(resultRecord == null? StringUtil.EMPTY : resultRecord.getStaffName() + i + "等人");
}

View File

@ -85,7 +85,7 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
int countStartAndGroupNum(@Param("startId")Long startId,@Param("departmentIds")List<String> departmentIds);
ResultRecord selectOneByStartId(@Param("startId")Long startId);
ResultRecord selectOneByStartId(@Param("startId")Long startId,@Param("departmentIds")List<String> departmentIds);
List<AssessManagerDetailRes> selectAssessListByStartId(@Param("page") IPage page, @Param("req")AssessDetailReq req);

View File

@ -436,7 +436,15 @@
</select>
<select id="selectOneByStartId" resultType="com.lz.modules.sys.entity.app.ResultRecord">
select * from lz_result_record where is_delete = 0 and start_id = #{startId} limit 1
select * from lz_result_record where is_delete = 0 and start_id = #{startId}
<if test="departmentIds !=null and departmentIds.size()!=0">
and department_id in (
<foreach collection="departmentIds" item="department_id" separator=",">
#{department_id}
</foreach>
)
</if>
limit 1
</select>
<select id="selectAssessListByStartId" resultType="com.lz.modules.performance.res.AssessManagerDetailRes">
@ -447,7 +455,7 @@
and r.start_id = #{req.startId}
<if test="req.copyEvaluationIds !=null and req.copyEvaluationIds !=''">
and r.evaluation_id in(
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" separator="">
#{evaluation_id}
</foreach>
)
@ -460,7 +468,7 @@
</if>
<if test="req.staffIds !=null and req.staffIds !=''">
and r.staff_id in(
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
<foreach collection="req.staffIds.split(',')" item="staff_id" separator="">
#{staff_id}
</foreach>
)
@ -483,7 +491,7 @@
and r.start_id =#{req.startId}
<if test="req.copyEvaluationIds !=null and req.copyEvaluationIds !=''">
and r.evaluation_id in(
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" separator=",">
#{evaluation_id}
</foreach>
)
@ -496,7 +504,7 @@
</if>
<if test="req.staffIds !=null and req.staffIds !=''">
and r.staff_id in(
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
<foreach collection="req.staffIds.split(',')" item="staff_id" separator=",">
#{staff_id}
</foreach>
)
@ -520,7 +528,7 @@
and r.start_id =#{req.startId}
<if test="req.copyEvaluationIds !=null and req.copyEvaluationIds !=''">
and r.evaluation_id in(
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" separator=",">
#{evaluation_id}
</foreach>
)
@ -533,7 +541,7 @@
</if>
<if test="req.staffIds !=null and req.staffIds !=''">
and r.staff_id in(
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
<foreach collection="req.staffIds.split(',')" item="staff_id" separator="," >
#{staff_id}
</foreach>
)