123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?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.zkqy.amichi.mapper.RingScanInformationFirstMapper">
-
- <resultMap type="com.zkqy.amichi.domain.RingScanInformationFirst" id="RingScanInformationFirstResult">
- <result property="id" column="id" />
- <result property="orderNumber" column="order_number" />
- <result property="productionOrderNumber" column="production_order_number" />
- <result property="status" column="status" />
- <result property="startTime" column="start_time" />
- <result property="endTime" column="end_time" />
- <result property="packingQuantity" column="packing_quantity" />
- <result property="inspectionQuantity" column="inspection_quantity" />
- <result property="totalQuantity" column="total_quantity" />
- <result property="packingOrInspection" column="packing_or_inspection" />
- <result property="productionOrderTotalQuantity" column="production_order_total_quantity" />
- </resultMap>
- <sql id="selectRingScanInformationFirstVo">
- select id, order_number, production_order_number, status,start_time,end_time,packing_quantity,inspection_quantity,total_quantity,
- packing_or_inspection,production_order_total_quantity
- from fjqydb.ring_scan_information_first
- </sql>
- <select id="selectRingScanInformationFirstList" parameterType="com.zkqy.amichi.domain.RingScanInformationFirst" resultMap="RingScanInformationFirstResult">
- <include refid="selectRingScanInformationFirstVo"/>
- <where>
- <if test="orderNumber != null and orderNumber != ''"> and (order_number = #{orderNumber} or production_order_number = #{orderNumber})</if>
- <if test="productionOrderNumber != null and productionOrderNumber != ''"> and production_order_number = #{productionOrderNumber}</if>
- <if test="status != null and status != ''"> and status = #{status}</if>
- <if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
- <if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if>
- <if test="packingQuantity != null and packingQuantity != ''"> and packing_quantity = #{packingQuantity}</if>
- <if test="inspectionQuantity != null and inspectionQuantity != ''"> and inspection_quantity = #{inspectionQuantity}</if>
- <if test="totalQuantity != null and totalQuantity != ''"> and total_quantity = #{totalQuantity}</if>
- <if test="packingOrInspection != null and packingOrInspection != ''"> and packing_or_inspection = #{packingOrInspection}</if>
- </where>
- </select>
-
- <select id="selectRingScanInformationFirstById" parameterType="Long" resultMap="RingScanInformationFirstResult">
- <include refid="selectRingScanInformationFirstVo"/>
- where id = #{id}
- </select>
- <insert id="insertRingScanInformationFirst" parameterType="com.zkqy.amichi.domain.RingScanInformationFirst" useGeneratedKeys="true" keyProperty="id">
- insert into fjqydb.ring_scan_information_first
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="orderNumber != null">order_number,</if>
- <if test="productionOrderNumber != null">production_order_number,</if>
- <if test="status != null">status,</if>
- <if test="startTime != null">start_time,</if>
- <if test="endTime != null">end_time,</if>
- <if test="packingQuantity != null and packingQuantity != ''">packing_quantity,</if>
- <if test="inspectionQuantity != null and inspectionQuantity != ''">inspection_quantity,</if>
- <if test="totalQuantity != null and totalQuantity != ''">total_quantity,</if>
- <if test="packingOrInspection != null and packingOrInspection != ''">packing_or_inspection,</if>
- <if test="productionOrderTotalQuantity != null and productionOrderTotalQuantity != ''">production_order_total_quantity,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="orderNumber != null">#{orderNumber},</if>
- <if test="productionOrderNumber != null">#{productionOrderNumber},</if>
- <if test="status != null">#{status},</if>
- <if test="startTime != null">#{startTime},</if>
- <if test="endTime != null">#{endTime},</if>
- <if test="packingQuantity != null and packingQuantity != ''">#{packingQuantity},</if>
- <if test="inspectionQuantity != null and inspectionQuantity != ''">#{inspectionQuantity},</if>
- <if test="totalQuantity != null and totalQuantity != ''">#{totalQuantity},</if>
- <if test="packingOrInspection != null and packingOrInspection != ''">#{packingOrInspection},</if>
- <if test="productionOrderTotalQuantity != null and productionOrderTotalQuantity != ''">#{productionOrderTotalQuantity}</if>
- </trim>
- </insert>
- <update id="updateRingScanInformationFirst" parameterType="com.zkqy.amichi.domain.RingScanInformationFirst">
- update fjqydb.ring_scan_information_first
- <trim prefix="SET" suffixOverrides=",">
- <if test="orderNumber != null">order_number = #{orderNumber},</if>
- <if test="productionOrderNumber != null">production_order_number = #{productionOrderNumber},</if>
- <if test="status != null">status = #{status},</if>
- <if test="startTime != null and startTime != ''">start_time = #{startTime}</if>
- <if test="endTime != null and endTime != ''">end_time = #{endTime}</if>
- <if test="packingQuantity != null and packingQuantity != ''"> packing_quantity = #{packingQuantity}</if>
- <if test="inspectionQuantity != null and inspectionQuantity != ''">inspection_quantity = #{inspectionQuantity}</if>
- <if test="totalQuantity != null and totalQuantity != ''">total_quantity = #{totalQuantity}</if>
- </trim>
- where id = #{id}
- </update>
- <update id="updateRingScanInformationFirstByproductionOrderNumber" parameterType="com.zkqy.amichi.domain.RingScanInformationFirst">
- update fjqydb.ring_scan_information_first
- <trim prefix="SET" suffixOverrides=",">
- <if test="orderNumber != null">order_number = #{orderNumber},</if>
- <if test="productionOrderNumber != null">production_order_number = #{productionOrderNumber},</if>
- <if test="status != null">status = #{status},</if>
- <if test="startTime != null and startTime != ''">start_time = #{startTime}</if>
- <if test="endTime != null and endTime != ''">end_time = #{endTime}</if>
- <if test="packingQuantity != null and packingQuantity != ''"> packing_quantity = #{packingQuantity}</if>
- <if test="inspectionQuantity != null and inspectionQuantity != ''">inspection_quantity = #{inspectionQuantity}</if>
- <if test="totalQuantity != null and totalQuantity != ''">total_quantity = #{totalQuantity}</if>
- </trim>
- where production_order_number = #{productionOrderNumber}
- </update>
- <delete id="deleteRingScanInformationFirstById" parameterType="Long">
- delete from fjqydb.ring_scan_information_first where id = #{id}
- </delete>
- <delete id="deleteRingScanInformationFirstByIds" parameterType="String">
- delete from fjqydb.ring_scan_information_first where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|