You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
146 lines
7.9 KiB
XML
146 lines
7.9 KiB
XML
<?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.op.mes.mapper.MesStationArriveMapper">
|
|
|
|
<resultMap type="MesStationArrive" id="MesStationArriveResult">
|
|
<result property="recordId" column="record_id"/>
|
|
<result property="reqCode" column="reqCode"/>
|
|
<result property="reqTime" column="reqTime"/>
|
|
<result property="stationType" column="stationType"/>
|
|
<result property="stationNo" column="stationNo"/>
|
|
<result property="rfidNo" column="rfidNo"/>
|
|
<result property="workorderCode" column="workorder_code"/>
|
|
<result property="batchCode" column="batch_code"/>
|
|
<result property="cku" column="cku"/>
|
|
<result property="spec" column="spec"/>
|
|
<result property="remark" column="remark"/>
|
|
<result property="attr1" column="attr1"/>
|
|
<result property="attr2" column="attr2"/>
|
|
<result property="attr3" column="attr3"/>
|
|
<result property="attr4" column="attr4"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="factoryCode" column="factory_code"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectMesStationArriveVo">
|
|
select record_id, reqCode, reqTime, stationType, stationNo, rfidNo, workorder_code, batch_code, cku, spec, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code from mes_station_arrive
|
|
</sql>
|
|
|
|
<select id="selectMesStationArriveList" parameterType="MesStationArrive" resultMap="MesStationArriveResult">
|
|
<include refid="selectMesStationArriveVo"/>
|
|
<where>
|
|
<if test="reqCode != null and reqCode != ''">and reqCode = #{reqCode}</if>
|
|
<if test="reqTime != null ">and reqTime = #{reqTime}</if>
|
|
<if test="stationType != null and stationType != ''">and stationType = #{stationType}</if>
|
|
<if test="stationNo != null and stationNo != ''">and stationNo = #{stationNo}</if>
|
|
<if test="rfidNo != null and rfidNo != ''">and rfidNo = #{rfidNo}</if>
|
|
<if test="workorderCode != null and workorderCode != ''">and workorder_code = #{workorderCode}</if>
|
|
<if test="batchCode != null and batchCode != ''">and batch_code = #{batchCode}</if>
|
|
<if test="cku != null and cku != ''">and cku = #{cku}</if>
|
|
<if test="spec != null and spec != ''">and spec = #{spec}</if>
|
|
<if test="attr1 != null and attr1 != ''">and attr1 = #{attr1}</if>
|
|
<if test="attr2 != null and attr2 != ''">and attr2 = #{attr2}</if>
|
|
<if test="attr3 != null and attr3 != ''">and attr3 = #{attr3}</if>
|
|
<if test="attr4 != null and attr4 != ''">and attr4 = #{attr4}</if>
|
|
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectMesStationArriveByRecordId" parameterType="String" resultMap="MesStationArriveResult">
|
|
<include refid="selectMesStationArriveVo"/>
|
|
where record_id = #{recordId}
|
|
</select>
|
|
|
|
<insert id="insertMesStationArrive" parameterType="MesStationArrive">
|
|
insert into mes_station_arrive
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="recordId != null">record_id,</if>
|
|
<if test="reqCode != null and reqCode != ''">reqCode,</if>
|
|
<if test="reqTime != null">reqTime,</if>
|
|
<if test="stationType != null">stationType,</if>
|
|
<if test="stationNo != null">stationNo,</if>
|
|
<if test="rfidNo != null">rfidNo,</if>
|
|
<if test="workorderCode != null and workorderCode != ''">workorder_code,</if>
|
|
<if test="batchCode != null and batchCode != ''">batch_code,</if>
|
|
<if test="cku != null">cku,</if>
|
|
<if test="spec != null">spec,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="attr1 != null">attr1,</if>
|
|
<if test="attr2 != null">attr2,</if>
|
|
<if test="attr3 != null">attr3,</if>
|
|
<if test="attr4 != null">attr4,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="factoryCode != null">factory_code,</if>
|
|
<if test="status != null">status,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="recordId != null">#{recordId},</if>
|
|
<if test="reqCode != null and reqCode != ''">#{reqCode},</if>
|
|
<if test="reqTime != null">#{reqTime},</if>
|
|
<if test="stationType != null">#{stationType},</if>
|
|
<if test="stationNo != null">#{stationNo},</if>
|
|
<if test="rfidNo != null">#{rfidNo},</if>
|
|
<if test="workorderCode != null and workorderCode != ''">#{workorderCode},</if>
|
|
<if test="batchCode != null and batchCode != ''">#{batchCode},</if>
|
|
<if test="cku != null">#{cku},</if>
|
|
<if test="spec != null">#{spec},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="attr1 != null">#{attr1},</if>
|
|
<if test="attr2 != null">#{attr2},</if>
|
|
<if test="attr3 != null">#{attr3},</if>
|
|
<if test="attr4 != null">#{attr4},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="factoryCode != null">#{factoryCode},</if>
|
|
<if test="status != null">#{status},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateMesStationArrive" parameterType="MesStationArrive">
|
|
update mes_station_arrive
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="reqCode != null and reqCode != ''">reqCode = #{reqCode},</if>
|
|
<if test="reqTime != null">reqTime = #{reqTime},</if>
|
|
<if test="stationType != null">stationType = #{stationType},</if>
|
|
<if test="stationNo != null">stationNo = #{stationNo},</if>
|
|
<if test="rfidNo != null">rfidNo = #{rfidNo},</if>
|
|
<if test="workorderCode != null and workorderCode != ''">workorder_code = #{workorderCode},</if>
|
|
<if test="batchCode != null and batchCode != ''">batch_code = #{batchCode},</if>
|
|
<if test="cku != null">cku = #{cku},</if>
|
|
<if test="spec != null">spec = #{spec},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
|
<if test="attr4 != null">attr4 = #{attr4},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
|
</trim>
|
|
where record_id = #{recordId}
|
|
</update>
|
|
|
|
<delete id="deleteMesStationArriveByRecordId" parameterType="String">
|
|
delete from mes_station_arrive where record_id = #{recordId}
|
|
</delete>
|
|
|
|
<delete id="deleteMesStationArriveByRecordIds" parameterType="String">
|
|
delete from mes_station_arrive where record_id in
|
|
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
|
#{recordId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|