|
@@ -2,7 +2,7 @@
|
|
|
<!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.id,
|
|
|
tool.name,
|
|
|
tool.ggxh,
|
|
|
tool.no,
|
|
@@ -24,9 +24,9 @@
|
|
|
tool.next_check_date,
|
|
|
tool.period,
|
|
|
tool.warn_day
|
|
|
- </sql>
|
|
|
+ </sql>
|
|
|
<sql id="Ref_Column_List">
|
|
|
- tool.name,
|
|
|
+ tool.name,
|
|
|
tool.ggxh,
|
|
|
tool.no,
|
|
|
tool.num,
|
|
@@ -41,113 +41,111 @@
|
|
|
tool.next_check_date,
|
|
|
tool.period,
|
|
|
tool.warn_day
|
|
|
- </sql>
|
|
|
+ </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="noStart != null">
|
|
|
- and tool.no <![CDATA[>=]]>; #{noStart}
|
|
|
- </if>
|
|
|
- <if test="noEnd != null">
|
|
|
- and tool.no <![CDATA[<=]]> #{noEnd}
|
|
|
- </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="contentStart != null">
|
|
|
- and tool.content <![CDATA[>=]]>; #{contentStart}
|
|
|
- </if>
|
|
|
- <if test="contentEnd != null">
|
|
|
- and tool.content <![CDATA[<=]]> #{contentEnd}
|
|
|
- </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="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="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.id like concat(concat('%',#{keyword}),'%')
|
|
|
+ <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 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" />
|
|
|
+ from t_tool as tool
|
|
|
+ <where>
|
|
|
+ <include refid="List_Condition"/>
|
|
|
</where>
|
|
|
</select>
|
|
|
</mapper>
|