Commit 5f04e5fa authored by luzhuang's avatar luzhuang

培训积分筛选

parent 1861d417
......@@ -117,8 +117,8 @@ public interface BReleaseValueRepository extends BaseMapper<BReleaseValue> {
"<if test=\"dto.valueGainEnd!=null and dto.valueGainEnd != ''\"> and CAST(bl.value_gain AS UNSIGNED) &lt;= #{dto.valueGainEnd} </if> " +
"<if test=\"dto.lessonName!=null and dto.lessonName != ''\"> and bl.lesson_name like concat('%',#{dto.lessonName},'%') </if> " +
"<if test=\"dto.lecturerName!=null and dto.lecturerName != ''\"> and su.`name` like concat('%',#{dto.lecturerName},'%') </if> " +
"<if test=\"dto.status!=null and dto.status != ''\"> and bl.release_state in(${dto.status}) </if> " +
"<if test=\"dto.trainStatus!=null and dto.trainStatus != ''\"> and ( ${dto.trainStatus} )</if> " +
// "<if test=\"dto.status!=null and dto.status != ''\"> and bl.release_state in(${dto.status}) </if> " +
"<if test=\"dto.trainStatus!=null and dto.trainStatus != ''\"> ${dto.trainStatus} </if> " +
"and bl.corp_id = #{curUser.corpId} " +
"and bl.lesson_type = #{dto.type} " +
"ORDER BY bl.corp_id " +
......
......@@ -166,6 +166,16 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
dto.setTrainStatus(null);
}
if(StringUtils.isEmpty(dto.getStatus())&&StringUtils.isEmpty(dto.getTrainStatus())){
dto.setTrainStatus(null);
}else if(StringUtils.isEmpty(dto.getStatus())&&StringUtils.isNotEmpty(dto.getTrainStatus())){
dto.setTrainStatus("and ("+dto.getTrainStatus()+")");
}else if(StringUtils.isNotEmpty(dto.getStatus())&&StringUtils.isEmpty(dto.getTrainStatus())){
dto.setTrainStatus("and bl.release_state in("+dto.getStatus()+")");
}else if(StringUtils.isNotEmpty(dto.getStatus())&&StringUtils.isNotEmpty(dto.getTrainStatus())){
dto.setTrainStatus("and (bl.release_state in("+dto.getStatus()+") or ("+dto.getTrainStatus()+ "))");
}
List<LessonValueDto> list = bReleaseValueRepository.getLessonValue(curUser,dto);
for(LessonValueDto valueDto :list){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment