123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.platform.dao.mapper.hidden.HiddenDangerMapper">
- <sql id="Base_Column_List">
- hidden.id,
- hidden.sb_id,
- hidden.position_no,
- hidden.position_id,
- hidden.exists_question,
- hidden.hidden_risk,
- hidden.opition,
- hidden.duty_user,
- hidden.area_user,
- hidden.remark,
- hidden.created_user_id,
- hidden.created_user_name,
- hidden.update_user_id,
- hidden.update_user_name,
- hidden.status,
- hidden.professor_type,
- hidden.check_level,
- hidden.require_time,
- hidden.update_time,
- hidden.created_time
- </sql>
- <sql id="Ref_Column_List">
- hidden.sb_id,
- hidden.position_no,
- hidden.position_id,
- hidden.exists_question,
- hidden.hidden_risk,
- hidden.opition,
- hidden.duty_user,
- hidden.area_user,
- hidden.remark,
- hidden.status,
- hidden.professor_type,
- hidden.check_level,
- hidden.require_time,
- </sql>
- <sql id="List_Condition">
- <if test="id != null and id != ''">
- and hidden.id = #{id}
- </if>
- <if test="sbId != null and sbId != ''">
- and hidden.sb_id = #{sbId}
- </if>
- <if test="positionNo != null and positionNo != ''">
- and hidden.position_no = #{positionNo}
- </if>
- <if test="positionId != null and positionId != ''">
- and hidden.position_id = #{positionId}
- </if>
- <if test="existsQuestion != null">
- and hidden.exists_question = #{existsQuestion}
- </if>
- <if test="hiddenRisk != null">
- and hidden.hidden_risk = #{hiddenRisk}
- </if>
- <if test="opition != null">
- and hidden.opition = #{opition}
- </if>
- <if test="dutyUser != null and dutyUser != ''">
- and hidden.duty_user = #{dutyUser}
- </if>
- <if test="areaUser != null and areaUser != ''">
- and hidden.area_user = #{areaUser}
- </if>
- <if test="remark != null and remark != ''">
- and hidden.remark = #{remark}
- </if>
- <if test="createdUserId != null and createdUserId != ''">
- and hidden.created_user_id = #{createdUserId}
- </if>
- <if test="createdUserName != null and createdUserName != ''">
- and hidden.created_user_name = #{createdUserName}
- </if>
- <if test="updateUserId != null and updateUserId != ''">
- and hidden.update_user_id = #{updateUserId}
- </if>
- <if test="updateUserName != null and updateUserName != ''">
- and hidden.update_user_name = #{updateUserName}
- </if>
- <if test="status != null">
- and hidden.status = #{status}
- </if>
- <if test="professorType != null">
- and hidden.professor_type = #{professorType}
- </if>
- <if test="checkLevel != null">
- and hidden.check_level = #{checkLevel}
- </if>
- <if test="requireTimeStart != null">
- and hidden.require_time <![CDATA[>=]]>; #{requireTimeStart}
- </if>
- <if test="requireTimeEnd != null">
- and hidden.require_time <![CDATA[<=]]> #{requireTimeEnd}
- </if>
- <if test="requireTime != null">
- and hidden.require_time = #{requireTime}
- </if>
- <if test="updateTimeStart != null">
- and hidden.update_time <![CDATA[>=]]>; #{updateTimeStart}
- </if>
- <if test="updateTimeEnd != null">
- and hidden.update_time <![CDATA[<=]]> #{updateTimeEnd}
- </if>
- <if test="updateTime != null">
- and hidden.update_time = #{updateTime}
- </if>
- <if test="createdTimeStart != null">
- and hidden.created_time <![CDATA[>=]]>; #{createdTimeStart}
- </if>
- <if test="createdTimeEnd != null">
- and hidden.created_time <![CDATA[<=]]> #{createdTimeEnd}
- </if>
- <if test="createdTime != null">
- and hidden.created_time = #{createdTime}
- </if>
- <if test="keyword != null and keyword != ''">
- and hidden.id like concat(concat('%',#{keyword}),'%')
- </if>
- <if test="statusList != null and statusList.size > 0">
- AND hidden.status in
- <foreach item="item" index="index" collection="statusList" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- </sql>
- <select id="selectList" parameterType="com.platform.dao.dto.hidden.HiddenDangerDTO"
- resultType="com.platform.dao.vo.query.hidden.HiddenDangerVO">
- select hidden.*,sb.name as sbName,sp.name as positionName,area.real_name as areaUserName,duty.real_name as dutyUserName
- from t_hidden_danger as hidden join t_sb_info sb on hidden.sb_id = sb.id
- join t_sb_position sp on hidden.position_id = sp.id join t_sys_user duty on hidden.duty_user = duty.user_id
- join t_sys_user area on hidden.area_user = area.user_id
- <where>
- <include refid="List_Condition"/>
- </where>
- </select>
- </mapper>
|