This commit is contained in:
杜建超 2020-10-22 17:24:07 +08:00
parent 378b3a062f
commit 36e06f47ac
3 changed files with 11 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package com.lz.modules.performance.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.flow.dao.FlowStartMapper;
import com.lz.modules.flow.entity.EvaluationGroup;
import com.lz.modules.flow.entity.FlowStart;
@ -63,8 +64,9 @@ public class AssessManagerController {
if(name.contains("绩效考核")){
res.setCycleTime(name.substring(0,name.lastIndexOf("绩效考核")));
}
res.setJoinNum("");
int i = resultRecordMapper.countStartAndGroupNum(flowStart.getId());
ResultRecord resultRecord = resultRecordMapper.selectOneByStartId(flowStart.getId());
res.setJoinNum(resultRecord == null? StringUtil.EMPTY : resultRecord.getStaffName() + i + "");
data.add(res);
});
PageUtils pages = new PageUtils();

View File

@ -82,4 +82,6 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
void batchDeleteByStaffIdsAndMonth(@Param("staffIds")List<String> staffIds,@Param("startTime")String startTime,@Param("endTime")String endTime);
int countStartAndGroupNum(@Param("startId")Long startId);
ResultRecord selectOneByStartId(@Param("startId")Long startId);
}

View File

@ -368,5 +368,10 @@
<select id="countStartAndGroupNum" resultType="int">
select COUNT(1) from lz_result_record where is_delete = 0 and start_id = #{startId}
</select>
<select id="selectOneByStartId" resultType="int">
select * from lz_result_record where is_delete = 0 and start_id = #{startId} limit 1
</select>
</mapper>