<?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.aps.core.mapper.ApsPlateProcessShopStatMapper">
|
|
<resultMap type="com.aps.core.domain.ApsPlate.ApsPlateProcessShopStat" id="ApsPlateProcessShopStatResult">
|
<result property="id" column="id" />
|
<result property="docNo" column="doc_no" />
|
<result property="shopCode" column="shop_code" />
|
<result property="shopName" column="shop_name" />
|
<result property="planStartDate" column="plan_start_date" />
|
<result property="planEndDate" column="plan_end_date" />
|
<result property="delFlag" column="del_flag" />
|
<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="processNumber" column="process_number" />
|
<result property="workCenter" column="work_center" />
|
|
</resultMap>
|
|
<sql id="selectApsPlateProcessShopStatVo">
|
select id, doc_no, shop_code, shop_name, plan_start_date, plan_end_date, del_flag, create_by, create_time, update_by, update_time,
|
process_number,work_center
|
from aps_plate_process_shop_stat
|
</sql>
|
|
<select id="selectApsPlateProcessShopStatList" parameterType="com.aps.core.domain.ApsPlate.ApsPlateProcessShopStat" resultMap="ApsPlateProcessShopStatResult">
|
<include refid="selectApsPlateProcessShopStatVo"/>
|
<where>
|
<if test="docNo != null and docNo != ''"> and doc_no = #{docNo}</if>
|
<if test="shopCode != null and shopCode != ''"> and shop_code = #{shopCode}</if>
|
<if test="shopName != null and shopName != ''"> and shop_name = #{shopName}</if>
|
<if test="planStartDate != null and planStartDate != ''"> and plan_start_date = #{planStartDate}</if>
|
<if test="planEndDate != null and planEndDate != ''"> and plan_end_date = #{planEndDate}</if>
|
|
<if test="processNumber != null and processNumber != ''"> and process_number = #{processNumber}</if>
|
<if test="workCenter != null and workCenter != ''"> and work_center = #{workCenter}</if>
|
and del_flag='0'
|
</where>
|
</select>
|
|
<select id="selectApsPlateProcessShopStatById" parameterType="Long" resultMap="ApsPlateProcessShopStatResult">
|
<include refid="selectApsPlateProcessShopStatVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertApsPlateProcessShopStat" parameterType="com.aps.core.domain.ApsPlate.ApsPlateProcessShopStat" useGeneratedKeys="true" keyProperty="id">
|
insert into aps_plate_process_shop_stat
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="docNo != null">doc_no,</if>
|
<if test="shopCode != null">shop_code,</if>
|
<if test="shopName != null">shop_name,</if>
|
<if test="planStartDate != null">plan_start_date,</if>
|
<if test="planEndDate != null">plan_end_date,</if>
|
<if test="delFlag != null">del_flag,</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="processNumber != null">process_number,</if>
|
<if test="workCenter != null">work_center,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="docNo != null">#{docNo},</if>
|
<if test="shopCode != null">#{shopCode},</if>
|
<if test="shopName != null">#{shopName},</if>
|
<if test="planStartDate != null">#{planStartDate},</if>
|
<if test="planEndDate != null">#{planEndDate},</if>
|
<if test="delFlag != null">#{delFlag},</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="processNumber != null">#{processNumber},</if>
|
<if test="workCenter != null">#{workCenter},</if>
|
</trim>
|
</insert>
|
|
<update id="updateApsPlateProcessShopStat" parameterType="com.aps.core.domain.ApsPlate.ApsPlateProcessShopStat">
|
update aps_plate_process_shop_stat
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="docNo != null">doc_no = #{docNo},</if>
|
<if test="shopCode != null">shop_code = #{shopCode},</if>
|
<if test="shopName != null">shop_name = #{shopName},</if>
|
<if test="planStartDate != null">plan_start_date = #{planStartDate},</if>
|
<if test="planEndDate != null">plan_end_date = #{planEndDate},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</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>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteApsPlateProcessShopStatById" parameterType="Long">
|
delete from aps_plate_process_shop_stat where id = #{id}
|
</delete>
|
|
<delete id="deleteApsPlateProcessShopStatByIds" parameterType="String">
|
delete from aps_plate_process_shop_stat where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
<delete id="deleteAll" >
|
delete from aps_plate_process_shop_stat where del_flag in ('0','1')
|
</delete>
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
insert into aps_plate_process_shop_stat
|
(doc_no, shop_code, shop_name, plan_start_date, plan_end_date, del_flag, create_by, create_time,
|
process_number, work_center
|
)
|
values
|
<foreach collection="list" item="item" separator=",">
|
(
|
#{item.docNo},
|
#{item.shopCode},
|
#{item.shopName},
|
#{item.planStartDate},
|
#{item.planEndDate},
|
#{item.delFlag},
|
#{item.createBy},
|
#{item.createTime},
|
#{item.processNumber},
|
#{item.workCenter}
|
)
|
</foreach>
|
</insert>
|
</mapper>
|