123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <?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.tool.ToolMapper">
- <sql id="Base_Column_List">
- tool.id,
- tool.name,
- tool.ggxh,
- tool.no,
- tool.num,
- tool.check_user_id,
- tool.producer,
- tool.hg_flag,
- tool.check_flag,
- tool.content,
- tool.remark,
- tool.created_time,
- tool.update_time,
- tool.created_user_id,
- tool.created_user_name,
- tool.update_user_id,
- tool.update_user_name,
- tool.position,
- tool.check_date,
- tool.next_check_date,
- tool.period,
- tool.warn_day
- </sql>
- <sql id="Ref_Column_List">
- tool.name,
- tool.ggxh,
- tool.no,
- tool.num,
- tool.check_user_id,
- tool.producer,
- tool.hg_flag,
- tool.check_flag,
- tool.content,
- tool.remark,
- tool.position,
- tool.check_date,
- tool.next_check_date,
- tool.period,
- tool.warn_day
- </sql>
- <sql id="List_Condition">
- <if test="id != null and id != ''">
- and tool.id = #{id}
- </if>
- <if test="name != null and name != ''">
- and tool.name = #{name}
- </if>
- <if test="ggxh != null and ggxh != ''">
- and tool.ggxh = #{ggxh}
- </if>
- <if test="no != null">
- and tool.no = #{no}
- </if>
- <if test="num != null">
- and tool.num = #{num}
- </if>
- <if test="checkUserId != null and checkUserId != ''">
- and tool.check_user_id = #{checkUserId}
- </if>
- <if test="producer != null and producer != ''">
- and tool.producer = #{producer}
- </if>
- <if test="hgFlag != null and hgFlag != ''">
- and tool.hg_flag = #{hgFlag}
- </if>
- <if test="checkFlag != null">
- and tool.check_flag = #{checkFlag}
- </if>
- <if test="content != null">
- and tool.content = #{content}
- </if>
- <if test="remark != null and remark != ''">
- and tool.remark = #{remark}
- </if>
- <if test="createdTimeStart != null">
- and tool.created_time <![CDATA[>=]]>; #{createdTimeStart}
- </if>
- <if test="createdTimeEnd != null">
- and tool.created_time <![CDATA[<=]]> #{createdTimeEnd}
- </if>
- <if test="createdTime != null">
- and tool.created_time = #{createdTime}
- </if>
- <if test="updateTimeStart != null">
- and tool.update_time <![CDATA[>=]]>; #{updateTimeStart}
- </if>
- <if test="updateTimeEnd != null">
- and tool.update_time <![CDATA[<=]]> #{updateTimeEnd}
- </if>
- <if test="updateTime != null">
- and tool.update_time = #{updateTime}
- </if>
- <if test="createdUserId != null and createdUserId != ''">
- and tool.created_user_id = #{createdUserId}
- </if>
- <if test="createdUserName != null and createdUserName != ''">
- and tool.created_user_name = #{createdUserName}
- </if>
- <if test="updateUserId != null and updateUserId != ''">
- and tool.update_user_id = #{updateUserId}
- </if>
- <if test="updateUserName != null and updateUserName != ''">
- and tool.update_user_name = #{updateUserName}
- </if>
- <if test="position != null and position != ''">
- and tool.position = #{position}
- </if>
- <if test="checkDateStart != null">
- and tool.check_date <![CDATA[>=]]>; #{checkDateStart}
- </if>
- <if test="checkDateEnd != null">
- and tool.check_date <![CDATA[<=]]> #{checkDateEnd}
- </if>
- <if test="checkDate != null and checkDate != ''">
- and tool.check_date = #{checkDate}
- </if>
- <if test="nextCheckDateStart != null">
- and tool.next_check_date <![CDATA[>=]]>; #{nextCheckDateStart}
- </if>
- <if test="nextCheckDateEnd != null">
- and tool.next_check_date <![CDATA[<=]]> #{nextCheckDateEnd}
- </if>
- <if test="status != null">
- and TIMESTAMPDIFF( DAY, CURDATE( ), tool.next_check_date ) <![CDATA[ <= ]]> tool.warn_day
- </if>
- <if test="nextCheckDate != null">
- and tool.next_check_date = #{nextCheckDate}
- </if>
- <if test="period != null">
- and tool.period = #{period}
- </if>
- <if test="warnDay != null">
- and tool.warn_day = #{warnDay}
- </if>
- <if test="keyword != null and keyword != ''">
- and tool.name like concat(concat('%',#{keyword}),'%')
- </if>
- </sql>
- <select id="selectList" parameterType="com.platform.dao.dto.tool.ToolDTO"
- resultType="com.platform.dao.vo.query.tool.ToolVO">
- select tool.*
- from t_tool as tool
- <where>
- <include refid="List_Condition"/>
- </where>
- </select>
- </mapper>
|