123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?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.robot.remote.smartrobotremote.mapper.ZQualityValueMapper">
-
- <resultMap type="ZQualityValue" id="ZQualityValueResult">
- <result property="valueId" column="value_id" />
- <result property="deviceWorks" column="device_works" />
- <result property="assayItem" column="assay_item" />
- <result property="resultValue" column="result_value" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="endTime" column="end_time" />
- <result property="lowValue" column="low_value" />
- <result property="highValue" column="high_value" />
- <result property="beginTime" column="begin_time" />
- </resultMap>
- <sql id="selectZQualityValueVo">
- select value_id, device_works, assay_item, result_value, create_time, update_time, end_time, low_value, high_value, begin_time from z_quality_value
- </sql>
- <select id="selectZQualityValueList" parameterType="ZQualityValue" resultMap="ZQualityValueResult">
- <include refid="selectZQualityValueVo"/>
- <where>
- <if test="deviceWorks != null "> and device_works = #{deviceWorks}</if>
- <if test="assayItem != null and assayItem != ''"> and assay_item = #{assayItem}</if>
- <if test="resultValue != null "> and result_value = #{resultValue}</if>
- <if test="endTime != null "> and end_time = #{endTime}</if>
- <if test="lowValue != null "> and low_value = #{lowValue}</if>
- <if test="highValue != null "> and high_value = #{highValue}</if>
- <if test="beginTime != null "> and begin_time = #{beginTime}</if>
- </where>
- </select>
-
- <select id="selectZQualityValueByValueId" parameterType="Long" resultMap="ZQualityValueResult">
- <include refid="selectZQualityValueVo"/>
- where value_id = #{valueId}
- </select>
- <insert id="insertZQualityValue" parameterType="ZQualityValue">
- insert into z_quality_value
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="valueId != null">value_id,</if>
- <if test="deviceWorks != null">device_works,</if>
- <if test="assayItem != null">assay_item,</if>
- <if test="resultValue != null">result_value,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="endTime != null">end_time,</if>
- <if test="lowValue != null">low_value,</if>
- <if test="highValue != null">high_value,</if>
- <if test="beginTime != null">begin_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="valueId != null">#{valueId},</if>
- <if test="deviceWorks != null">#{deviceWorks},</if>
- <if test="assayItem != null">#{assayItem},</if>
- <if test="resultValue != null">#{resultValue},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="endTime != null">#{endTime},</if>
- <if test="lowValue != null">#{lowValue},</if>
- <if test="highValue != null">#{highValue},</if>
- <if test="beginTime != null">#{beginTime},</if>
- </trim>
- </insert>
- <update id="updateZQualityValue" parameterType="ZQualityValue">
- update z_quality_value
- <trim prefix="SET" suffixOverrides=",">
- <if test="deviceWorks != null">device_works = #{deviceWorks},</if>
- <if test="assayItem != null">assay_item = #{assayItem},</if>
- <if test="resultValue != null">result_value = #{resultValue},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="endTime != null">end_time = #{endTime},</if>
- <if test="lowValue != null">low_value = #{lowValue},</if>
- <if test="highValue != null">high_value = #{highValue},</if>
- <if test="beginTime != null">begin_time = #{beginTime},</if>
- </trim>
- where value_id = #{valueId}
- </update>
- <delete id="deleteZQualityValueByValueId" parameterType="Long">
- delete from z_quality_value where value_id = #{valueId}
- </delete>
- <delete id="deleteZQualityValueByValueIds" parameterType="String">
- delete from z_quality_value where value_id in
- <foreach item="valueId" collection="array" open="(" separator="," close=")">
- #{valueId}
- </foreach>
- </delete>
- </mapper>
|