95 lines
4.0 KiB
Java
95 lines
4.0 KiB
Java
package com.gunshi.project.xyt.mapper;
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.gunshi.project.xyt.entity.so.CommonDataPageSo;
|
|
import com.gunshi.project.xyt.entity.vo.ProjectEventsVo;
|
|
import com.gunshi.project.xyt.model.ProjectEvents;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
import java.util.List;
|
|
|
|
@Mapper
|
|
public interface ProjectEventsMapper extends BaseMapper<ProjectEvents> {
|
|
|
|
@Select("""
|
|
<script>
|
|
|
|
select t.id,t.events_date,t.events_desc,1 as type from public.project_events t
|
|
<where>
|
|
<if test="obj.dateSo != null and obj.dateSo.start != null">
|
|
t.events_date <![CDATA[>=]]> #{obj.dateSo.start}
|
|
</if>
|
|
<if test="obj.dateSo != null and obj.dateSo.end != null">
|
|
and t.events_date <![CDATA[<=]]> #{obj.dateSo.end}
|
|
</if>
|
|
</where>
|
|
</script>
|
|
""")
|
|
List<ProjectEventsVo> eventList(@Param("obj") CommonDataPageSo page);
|
|
|
|
@Select("""
|
|
<script>
|
|
|
|
select t.id,t.report_time as eventsDate,t.maintain_content as eventsDesc,3 as type from public.maintain_service t
|
|
<where>
|
|
<if test="obj.dateSo != null and obj.dateSo.start != null">
|
|
t.report_time <![CDATA[>=]]> #{obj.dateSo.start}
|
|
</if>
|
|
<if test="obj.dateSo != null and obj.dateSo.end != null">
|
|
and t.report_time <![CDATA[<=]]> #{obj.dateSo.end}
|
|
</if>
|
|
</where>
|
|
</script>
|
|
""")
|
|
List<ProjectEventsVo> maintainList(@Param("obj") CommonDataPageSo page);
|
|
|
|
@Select("""
|
|
<script>
|
|
|
|
select t.id,t.identify_date as eventsDate,t.main_problem as eventsDesc,4 as type from public.safety_identify t
|
|
<where>
|
|
<if test="obj.dateSo != null and obj.dateSo.start != null">
|
|
t.identify_date <![CDATA[>=]]> #{obj.dateSo.start}
|
|
</if>
|
|
<if test="obj.dateSo != null and obj.dateSo.end != null">
|
|
and t.identify_date <![CDATA[<=]]> #{obj.dateSo.end}
|
|
</if>
|
|
</where>
|
|
</script>
|
|
""")
|
|
List<ProjectEventsVo> safetyList(@Param("obj") CommonDataPageSo page);
|
|
|
|
@Select("""
|
|
<script>
|
|
|
|
select t.id,t.start_date as eventsDate,t.construct_content as eventsDesc,5 as type from public.safety_reinforcement t
|
|
<where>
|
|
<if test="obj.dateSo != null and obj.dateSo.start != null">
|
|
t.start_date <![CDATA[>=]]> #{obj.dateSo.start}
|
|
</if>
|
|
<if test="obj.dateSo != null and obj.dateSo.end != null">
|
|
and t.start_date <![CDATA[<=]]> #{obj.dateSo.end}
|
|
</if>
|
|
</where>
|
|
</script>
|
|
""")
|
|
List<ProjectEventsVo> reinforceList(@Param("obj") CommonDataPageSo page);
|
|
|
|
@Select("""
|
|
<script>
|
|
|
|
select t.id,t.report_date as eventsDate,6 as type from public.termite_survey t
|
|
<where>
|
|
<if test="obj.dateSo != null and obj.dateSo.start != null">
|
|
and t.report_date <![CDATA[>=]]> #{obj.dateSo.start}
|
|
</if>
|
|
<if test="obj.dateSo != null and obj.dateSo.end != null">
|
|
and t.report_date <![CDATA[<=]]> #{obj.dateSo.end}
|
|
</if>
|
|
</where>
|
|
</script>
|
|
""")
|
|
List<ProjectEventsVo> termiteList(@Param("obj") CommonDataPageSo page);
|
|
} |