123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <?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.remote.RemoteOpcLogMapper">
- <sql id="Base_Column_List">
- opc_log.id,
- opc_log.sb_id,
- opc_log.sb_name,
- opc_log.position_num,
- opc_log.type,
- opc_log.description,
- opc_log.result,
- opc_log.ratio,
- opc_log.unit,
- opc_log.remark,
- opc_log.year,
- opc_log.month,
- opc_log.day,
- opc_log.hour,
- opc_log.minute,
- opc_log.info,
- opc_log.created_user_id,
- opc_log.update_user_id,
- opc_log.created_time,
- opc_log.update_time
- </sql>
- <sql id="Ref_Column_List">
- opc_log.sb_id,
- opc_log.sb_name,
- opc_log.position_num,
- opc_log.type,
- opc_log.description,
- opc_log.result,
- opc_log.year,
- opc_log.month,
- opc_log.day,
- opc_log.hour,
- opc_log.minute,
- opc_log.info,
- opc_log.ratio,
- opc_log.unit,
- opc_log.remark,
- </sql>
- <sql id="List_Condition">
- <if test="id != null and id != ''">
- and opc_log.id = #{id}
- </if>
- <if test="sbId != null and sbId != ''">
- and opc_log.sb_id = #{sbId}
- </if>
- <if test="year != null">
- and opc_log.year = #{year}
- </if>
- <if test="month != null">
- and opc_log.month = #{month}
- </if>
- <if test="day != null">
- and opc_log.day = #{day}
- </if>
- <if test="hour != null">
- and opc_log.hour = #{hour}
- </if>
- <if test="minute != null">
- and opc_log.minute = #{minute}
- </if>
- <if test="positionNum != null">
- and opc_log.position_num = #{positionNum}
- </if>
- <if test="type != null">
- and opc_log.type = #{type}
- </if>
- <if test="description != null and description != ''">
- and opc_log.description = #{description}
- </if>
- <if test="result != null and result != ''">
- and opc_log.result = #{result}
- </if>
- <if test="ratio != null">
- and opc_log.ratio = #{ratio}
- </if>
- <if test="unit != null and unit != ''">
- and opc_log.unit = #{unit}
- </if>
- <if test="remark != null and remark != ''">
- and opc_log.remark = #{remark}
- </if>
- <if test="createdUserId != null and createdUserId != ''">
- and opc_log.created_user_id = #{createdUserId}
- </if>
- <if test="updateUserId != null and updateUserId != ''">
- and opc_log.update_user_id = #{updateUserId}
- </if>
- <if test="createdTimeStart != null">
- and opc_log.created_time <![CDATA[>=]]> #{createdTimeStart}
- </if>
- <if test="createdTimeEnd != null">
- and opc_log.created_time <![CDATA[<=]]> #{createdTimeEnd}
- </if>
- <if test="createdTime != null">
- and opc_log.created_time = #{createdTime}
- </if>
- <if test="updateTimeStart != null">
- and opc_log.update_time <![CDATA[>=]]> #{updateTimeStart}
- </if>
- <if test="updateTimeEnd != null">
- and opc_log.update_time <![CDATA[<=]]> #{updateTimeEnd}
- </if>
- <if test="updateTime != null">
- and opc_log.update_time = #{updateTime}
- </if>
- <if test="keyword != null and keyword != ''">
- and opc_log.position_num like concat(concat('%',#{keyword}),'%')
- </if>
- </sql>
- <select id="selectList" parameterType="com.platform.dao.dto.remote.RemoteOpcLogDTO"
- resultType="com.platform.dao.vo.query.remote.RemoteOpcLogVO">
- select opc_log.*
- from t_remote_opc_log as opc_log
- <where>
- <include refid="List_Condition"/>
- </where>
- </select>
- <update id="updateBatch" parameterType="java.util.List">
- <foreach collection="list" item="item" index="index" open="" close="" separator=";">
- update t_remote_opc_log
- <set>
- remark=concat(remark,#{item.remark})
- </set>
- where position_num = #{item.positionNum}
- and year = #{item.year}
- and month = #{item.month}
- and day = #{item.day}
- </foreach>
- </update>
- </mapper>
|