48 lines
1.8 KiB
Java
48 lines
1.8 KiB
Java
|
|
package com.gunshi.project.xyt.mapper;
|
||
|
|
|
||
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||
|
|
import com.gunshi.project.xyt.entity.so.AssessTaskPageSo;
|
||
|
|
import com.gunshi.project.xyt.model.AssessTask;
|
||
|
|
import org.apache.ibatis.annotations.Mapper;
|
||
|
|
import org.apache.ibatis.annotations.Param;
|
||
|
|
import org.apache.ibatis.annotations.Select;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 描述: 考核任务
|
||
|
|
* author: xusan
|
||
|
|
* date: 2024-09-05 14:19:04
|
||
|
|
*/
|
||
|
|
@Mapper
|
||
|
|
public interface AssessTaskMapper extends BaseMapper<AssessTask> {
|
||
|
|
|
||
|
|
@Select("""
|
||
|
|
<script>
|
||
|
|
select t1.indicator_id from public.assess_template_indicator_rel t1
|
||
|
|
where t1.template_id = #{templateId}
|
||
|
|
</script>
|
||
|
|
""")
|
||
|
|
List<Long> queryIndicators(@Param("templateId") Long templateId);
|
||
|
|
|
||
|
|
@Select("""
|
||
|
|
<script>
|
||
|
|
select t.* from public.assess_task t where t.task_id in
|
||
|
|
(select distinct(task_id) from public.assess_team where team_user_id = #{obj.userId} and status = 1)
|
||
|
|
<if test="obj.taskName != null and obj.taskName != ''">
|
||
|
|
and t.task_name like concat('%', #{obj.taskName}, '%')
|
||
|
|
</if>
|
||
|
|
<if test="obj.dateRangeSo != null and obj.dateRangeSo.start != null">
|
||
|
|
and t.start_date <![CDATA[>=]]> #{obj.dateRangeSo.start}
|
||
|
|
</if>
|
||
|
|
<if test="obj.dateRangeSo != null and obj.dateRangeSo.end != null">
|
||
|
|
and t.end_date <![CDATA[<=]]> #{obj.dateRangeSo.end}
|
||
|
|
</if>
|
||
|
|
<if test="obj.status != null">
|
||
|
|
and t.status = #{obj.status}
|
||
|
|
</if>
|
||
|
|
</script>
|
||
|
|
""")
|
||
|
|
Page<AssessTask> myTodo(Page<AssessTask> page,@Param("obj") AssessTaskPageSo page1);
|
||
|
|
}
|