<?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.jcdm.main.da.passingStationCollection.mapper.ProductNewPassStationMapper">
|
|
<resultMap type="ProductNewPassStation" id="ProductNewPassStationResult">
|
<result property="id" column="id" />
|
<result property="sfcCode" column="sfc_code" />
|
<result property="rodCode" column="rod_code" />
|
<result property="finishFlag" column="finish_flag" />
|
<result property="productType" column="product_type" />
|
<result property="createTime" column="create_time" />
|
<result property="boxCode" column="box_code" />
|
<result property="balanceCode" column="balance_code" />
|
</resultMap>
|
|
<sql id="selectProductNewPassStationVo">
|
select id, sfc_code,rod_code, finish_flag,product_type,create_time,box_code,balance_code from product_new_pass_station
|
</sql>
|
<insert id="insertPassStation">
|
insert into product_new_pass_station
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="sfcCode != null">sfc_code,</if>
|
<if test="rodCode != null">rod_code,</if>
|
<if test="finishFlag != null">finish_flag,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="productType != null">product_type,</if>
|
<if test="boxCode != null">box_code,</if>
|
<if test="balanceCode != null">balance_code,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="sfcCode != null">#{sfcCode},</if>
|
<if test="rodCode != null">#{rodCode},</if>
|
<if test="finishFlag != null">#{finishFlag},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="productType != null">#{productType},</if>
|
<if test="boxCode != null">#{boxCode},</if>
|
<if test="balanceCode != null">#{balanceCode},</if>
|
</trim>
|
</insert>
|
<update id="updatePassStation">
|
update product_new_pass_station
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="sfcCode != null">#{sfcCode},</if>
|
<if test="rodCode != null">#{rodCode},</if>
|
<if test="finishFlag != null">#{finishFlag},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="productType != null">#{productType},</if>
|
<if test="boxCode != null">#{boxCode},</if>
|
<if test="balanceCode != null">#{balanceCode},</if>
|
</trim>
|
where id = #{productNewPassStation.id}
|
</update>
|
<update id="updatePassStationBySfcCode">
|
update product_new_pass_station set finish_flag = '1' where sfc_code = #{sfcCode}
|
</update>
|
<update id="updatePassStationRodCodeBySfcCode"> update product_new_pass_station set finish_flag = '1' where sfc_code = #{sfcCode}</update>
|
<update id="updatePassStationBalanceCode">
|
update product_new_pass_station set balance_code = #{balanceCode} where sfc_code = #{sfcCode}
|
</update>
|
<update id="updatePassStationRodCode">
|
update product_new_pass_station set rod_code = #{rodCode} where sfc_code = #{sfcCode}
|
</update>
|
<update id="updateBoxCodeBySfcCode">
|
update product_new_pass_station set box_code = #{newBoxCode} where sfc_code = #{sfcCode}
|
</update>
|
<select id="getPassStation"
|
resultMap="ProductNewPassStationResult">
|
<include refid="selectProductNewPassStationVo"/>
|
<where>
|
<if test="sfcCode != null">and sfc_code = #{sfcCode}</if>
|
<if test="rodCode != null">and rod_code = #{rodCode}</if>
|
<if test="finishFlag != null">and finish_flag = #{finishFlag}</if>
|
<if test="productType != null">and product_type = #{productType}</if>
|
<if test="boxCode != null">and box_code = #{boxCode}</if>
|
<if test="balanceCode != null">and balance_code = #{balanceCode}</if>
|
</where>
|
</select>
|
<select id="getProductPassStationList"
|
resultMap="ProductNewPassStationResult">
|
<include refid="selectProductNewPassStationVo"/>
|
<where>
|
<if test="sfcCode != null">and sfc_code = #{sfcCode}</if>
|
<if test="rodCode != null">and rod_code = #{rodCode}</if>
|
<if test="finishFlag != null">and finish_flag = #{finishFlag}</if>
|
<if test="productType != null">and product_type = #{productType}</if>
|
<if test="boxCode != null">and box_code = #{boxCode}</if>
|
<if test="balanceCode != null">and balance_code = #{balanceCode}</if>
|
</where>
|
</select>
|
<select id="getProductPassStationListByEngineList"
|
resultMap="ProductNewPassStationResult">
|
<include refid="selectProductNewPassStationVo"/>
|
<where>
|
sfc_code in
|
<foreach collection="engineNoList" item="sfcCode" open="(" separator="," close=")">
|
#{sfcCode}
|
</foreach>
|
</where>
|
</select>
|
|
|
</mapper>
|