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