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.
520 lines
25 KiB
XML
520 lines
25 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.foreverwin.mesnac.production.mapper.CutterLogMapper">
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.production.model.CutterLog">
|
|
<id column="HANDLE" property="handle"/>
|
|
<result column="SITE" property="site"/>
|
|
<result column="CUTTER" property="cutter"/>
|
|
<result column="SHOP_ORDER" property="shopOrder"/>
|
|
<result column="WORK_CENTER" property="workCenter"/>
|
|
<result column="SFC" property="sfc"/>
|
|
<result column="TYPE" property="type"/>
|
|
<result column="OPERATION" property="operation"/>
|
|
<result column="STEP_ID" property="stepId"/>
|
|
<result column="ITEM" property="item"/>
|
|
<result column="RESRCE" property="resrce"/>
|
|
<result column="QTY" property="qty"/>
|
|
<result column="CREATE_USER" property="createUser"/>
|
|
<result column="CREATED_DATE_TIME" property="createdDateTime"/>
|
|
</resultMap>
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
HANDLE, SITE, CUTTER, SHOP_ORDER, WORK_CENTER, SFC, TYPE, OPERATION, STEP_ID, ITEM, RESRCE, QTY, CREATE_USER,
|
|
CREATED_DATE_TIME
|
|
</sql>
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
<select id="selectById" resultMap="BaseResultMap">
|
|
SELECT <include refid="Base_Column_List"></include> FROM Z_CUTTER_LOG WHERE HANDLE=#{handle}
|
|
</select>
|
|
|
|
<select id="selectByMap" resultMap="BaseResultMap">
|
|
SELECT
|
|
<include refid="Base_Column_List"></include>
|
|
FROM Z_CUTTER_LOG
|
|
<if test="cm!=null and !cm.isEmpty">
|
|
<where>
|
|
<foreach collection="cm.keys" item="k" separator="AND">
|
|
<if test="cm[k] != null">
|
|
${k} = #{cm[${k}]}
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
</select>
|
|
|
|
<select id="selectBatchIds" resultMap="BaseResultMap">
|
|
SELECT
|
|
<include refid="Base_Column_List"></include>
|
|
FROM Z_CUTTER_LOG WHERE HANDLE IN (
|
|
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
|
</foreach>)
|
|
</select>
|
|
|
|
<select id="selectOne" resultMap="BaseResultMap">
|
|
SELECT <include refid="Base_Column_List"></include> FROM Z_CUTTER_LOG
|
|
<where>
|
|
<if test="ew.entity.handle!=null">
|
|
HANDLE=#{ew.handle}
|
|
</if>
|
|
<if test="ew.entity.site!=null">AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.cutter!=null">AND CUTTER=#{ew.entity.cutter}</if>
|
|
<if test="ew.entity.shopOrder!=null">AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
<if test="ew.entity.workCenter!=null">AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
<if test="ew.entity.sfc!=null">AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.type!=null">AND TYPE=#{ew.entity.type}</if>
|
|
<if test="ew.entity.operation!=null">AND OPERATION=#{ew.entity.operation}</if>
|
|
<if test="ew.entity.stepId!=null">AND STEP_ID=#{ew.entity.stepId}</if>
|
|
<if test="ew.entity.item!=null">AND ITEM=#{ew.entity.item}</if>
|
|
<if test="ew.entity.resrce!=null">AND RESRCE=#{ew.entity.resrce}</if>
|
|
<if test="ew.entity.qty!=null">AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.createUser!=null">AND CREATE_USER=#{ew.entity.createUser}</if>
|
|
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectCount" resultType="Integer">
|
|
SELECT COUNT(1) FROM Z_CUTTER_LOG
|
|
<where>
|
|
<if test="ew!=null">
|
|
<if test="ew.entity!=null">
|
|
<if test="ew.entity.handle!=null">
|
|
HANDLE=#{ew.entity.handle}
|
|
</if>
|
|
<if test="ew.entity.site!=null">AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.cutter!=null">AND CUTTER=#{ew.entity.cutter}</if>
|
|
<if test="ew.entity.shopOrder!=null">AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
<if test="ew.entity.workCenter!=null">AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
<if test="ew.entity.sfc!=null">AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.type!=null">AND TYPE=#{ew.entity.type}</if>
|
|
<if test="ew.entity.operation!=null">AND OPERATION=#{ew.entity.operation}</if>
|
|
<if test="ew.entity.stepId!=null">AND STEP_ID=#{ew.entity.stepId}</if>
|
|
<if test="ew.entity.item!=null">AND ITEM=#{ew.entity.item}</if>
|
|
<if test="ew.entity.resrce!=null">AND RESRCE=#{ew.entity.resrce}</if>
|
|
<if test="ew.entity.qty!=null">AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.createUser!=null">AND CREATE_USER=#{ew.entity.createUser}</if>
|
|
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
</if>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="selectList" resultMap="BaseResultMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
|
|
<otherwise>
|
|
<include refid="Base_Column_List"></include>
|
|
</otherwise>
|
|
</choose>
|
|
FROM Z_CUTTER_LOG
|
|
<where>
|
|
<if test="ew!=null">
|
|
<if test="ew.entity!=null">
|
|
<if test="ew.entity.handle!=null">
|
|
HANDLE=#{ew.entity.handle}
|
|
</if>
|
|
<if test="ew.entity.site!=null">AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.cutter!=null">AND CUTTER=#{ew.entity.cutter}</if>
|
|
<if test="ew.entity.shopOrder!=null">AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
<if test="ew.entity.workCenter!=null">AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
<if test="ew.entity.sfc!=null">AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.type!=null">AND TYPE=#{ew.entity.type}</if>
|
|
<if test="ew.entity.operation!=null">AND OPERATION=#{ew.entity.operation}</if>
|
|
<if test="ew.entity.stepId!=null">AND STEP_ID=#{ew.entity.stepId}</if>
|
|
<if test="ew.entity.item!=null">AND ITEM=#{ew.entity.item}</if>
|
|
<if test="ew.entity.resrce!=null">AND RESRCE=#{ew.entity.resrce}</if>
|
|
<if test="ew.entity.qty!=null">AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.createUser!=null">AND CREATE_USER=#{ew.entity.createUser}</if>
|
|
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
</if>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="selectMaps" resultType="HashMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
|
|
<otherwise>
|
|
<include refid="Base_Column_List"></include>
|
|
</otherwise>
|
|
</choose>
|
|
FROM Z_CUTTER_LOG
|
|
<where>
|
|
<if test="ew!=null">
|
|
<if test="ew.entity!=null">
|
|
<if test="ew.entity.handle!=null">
|
|
HANDLE=#{ew.entity.handle}
|
|
</if>
|
|
<if test="ew.entity.site!=null">AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.cutter!=null">AND CUTTER=#{ew.entity.cutter}</if>
|
|
<if test="ew.entity.shopOrder!=null">AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
<if test="ew.entity.workCenter!=null">AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
<if test="ew.entity.sfc!=null">AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.type!=null">AND TYPE=#{ew.entity.type}</if>
|
|
<if test="ew.entity.operation!=null">AND OPERATION=#{ew.entity.operation}</if>
|
|
<if test="ew.entity.stepId!=null">AND STEP_ID=#{ew.entity.stepId}</if>
|
|
<if test="ew.entity.item!=null">AND ITEM=#{ew.entity.item}</if>
|
|
<if test="ew.entity.resrce!=null">AND RESRCE=#{ew.entity.resrce}</if>
|
|
<if test="ew.entity.qty!=null">AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.createUser!=null">AND CREATE_USER=#{ew.entity.createUser}</if>
|
|
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
</if>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="selectObjs" resultType="Object">
|
|
SELECT
|
|
<choose>
|
|
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
|
|
<otherwise>
|
|
<include refid="Base_Column_List"></include>
|
|
</otherwise>
|
|
</choose>
|
|
FROM Z_CUTTER_LOG
|
|
<where>
|
|
<if test="ew!=null">
|
|
<if test="ew.entity!=null">
|
|
<if test="ew.entity.handle!=null">
|
|
HANDLE=#{ew.entity.handle}
|
|
</if>
|
|
<if test="ew.entity.site!=null">AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.cutter!=null">AND CUTTER=#{ew.entity.cutter}</if>
|
|
<if test="ew.entity.shopOrder!=null">AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
<if test="ew.entity.workCenter!=null">AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
<if test="ew.entity.sfc!=null">AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.type!=null">AND TYPE=#{ew.entity.type}</if>
|
|
<if test="ew.entity.operation!=null">AND OPERATION=#{ew.entity.operation}</if>
|
|
<if test="ew.entity.stepId!=null">AND STEP_ID=#{ew.entity.stepId}</if>
|
|
<if test="ew.entity.item!=null">AND ITEM=#{ew.entity.item}</if>
|
|
<if test="ew.entity.resrce!=null">AND RESRCE=#{ew.entity.resrce}</if>
|
|
<if test="ew.entity.qty!=null">AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.createUser!=null">AND CREATE_USER=#{ew.entity.createUser}</if>
|
|
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
</if>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="selectPage" resultMap="BaseResultMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
|
|
<otherwise>
|
|
<include refid="Base_Column_List"></include>
|
|
</otherwise>
|
|
</choose>
|
|
FROM Z_CUTTER_LOG
|
|
<where>
|
|
<if test="ew!=null">
|
|
<if test="ew.entity!=null">
|
|
<if test="ew.entity.handle!=null">
|
|
HANDLE=#{ew.entity.handle}
|
|
</if>
|
|
<if test="ew.entity.site!=null">AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.cutter!=null">AND CUTTER=#{ew.entity.cutter}</if>
|
|
<if test="ew.entity.shopOrder!=null">AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
<if test="ew.entity.workCenter!=null">AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
<if test="ew.entity.sfc!=null">AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.type!=null">AND TYPE=#{ew.entity.type}</if>
|
|
<if test="ew.entity.operation!=null">AND OPERATION=#{ew.entity.operation}</if>
|
|
<if test="ew.entity.stepId!=null">AND STEP_ID=#{ew.entity.stepId}</if>
|
|
<if test="ew.entity.item!=null">AND ITEM=#{ew.entity.item}</if>
|
|
<if test="ew.entity.resrce!=null">AND RESRCE=#{ew.entity.resrce}</if>
|
|
<if test="ew.entity.qty!=null">AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.createUser!=null">AND CREATE_USER=#{ew.entity.createUser}</if>
|
|
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
</if>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="selectMapsPage" resultType="HashMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
|
|
<otherwise>
|
|
<include refid="Base_Column_List"></include>
|
|
</otherwise>
|
|
</choose>
|
|
FROM Z_CUTTER_LOG
|
|
<where>
|
|
<if test="ew!=null">
|
|
<if test="ew.entity!=null">
|
|
<if test="ew.entity.handle!=null">
|
|
HANDLE=#{ew.entity.handle}
|
|
</if>
|
|
<if test="ew.entity.site!=null">AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.cutter!=null">AND CUTTER=#{ew.entity.cutter}</if>
|
|
<if test="ew.entity.shopOrder!=null">AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
<if test="ew.entity.workCenter!=null">AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
<if test="ew.entity.sfc!=null">AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.type!=null">AND TYPE=#{ew.entity.type}</if>
|
|
<if test="ew.entity.operation!=null">AND OPERATION=#{ew.entity.operation}</if>
|
|
<if test="ew.entity.stepId!=null">AND STEP_ID=#{ew.entity.stepId}</if>
|
|
<if test="ew.entity.item!=null">AND ITEM=#{ew.entity.item}</if>
|
|
<if test="ew.entity.resrce!=null">AND RESRCE=#{ew.entity.resrce}</if>
|
|
<if test="ew.entity.qty!=null">AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.createUser!=null">AND CREATE_USER=#{ew.entity.createUser}</if>
|
|
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
</if>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</select>
|
|
|
|
<insert id="insert" parameterType="com.foreverwin.mesnac.production.model.CutterLog">
|
|
INSERT INTO Z_CUTTER_LOG
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
HANDLE,
|
|
<if test="site!=null">SITE,</if>
|
|
<if test="cutter!=null">CUTTER,</if>
|
|
<if test="shopOrder!=null">SHOP_ORDER,</if>
|
|
<if test="workCenter!=null">WORK_CENTER,</if>
|
|
<if test="sfc!=null">SFC,</if>
|
|
<if test="type!=null">TYPE,</if>
|
|
<if test="operation!=null">OPERATION,</if>
|
|
<if test="stepId!=null">STEP_ID,</if>
|
|
<if test="item!=null">ITEM,</if>
|
|
<if test="resrce!=null">RESRCE,</if>
|
|
<if test="qty!=null">QTY,</if>
|
|
<if test="createUser!=null">CREATE_USER,</if>
|
|
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
|
</trim>
|
|
VALUES
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
#{handle},
|
|
<if test="site!=null">#{site},</if>
|
|
<if test="cutter!=null">#{cutter},</if>
|
|
<if test="shopOrder!=null">#{shopOrder},</if>
|
|
<if test="workCenter!=null">#{workCenter},</if>
|
|
<if test="sfc!=null">#{sfc},</if>
|
|
<if test="type!=null">#{type},</if>
|
|
<if test="operation!=null">#{operation},</if>
|
|
<if test="stepId!=null">#{stepId},</if>
|
|
<if test="item!=null">#{item},</if>
|
|
<if test="resrce!=null">#{resrce},</if>
|
|
<if test="qty!=null">#{qty},</if>
|
|
<if test="createUser!=null">#{createUser},</if>
|
|
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.production.model.CutterLog">
|
|
INSERT INTO Z_CUTTER_LOG
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<include refid="Base_Column_List"></include>
|
|
</trim>
|
|
VALUES
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
#{handle},
|
|
#{site},
|
|
#{cutter},
|
|
#{shopOrder},
|
|
#{workCenter},
|
|
#{sfc},
|
|
#{type},
|
|
#{operation},
|
|
#{stepId},
|
|
#{item},
|
|
#{resrce},
|
|
#{qty},
|
|
#{createUser},
|
|
#{createdDateTime},
|
|
</trim>
|
|
</insert>
|
|
|
|
|
|
<update id="updateById">
|
|
UPDATE Z_CUTTER_LOG
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="et.site!=null">SITE=#{et.site},</if>
|
|
<if test="et.cutter!=null">CUTTER=#{et.cutter},</if>
|
|
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
|
|
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
|
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
|
<if test="et.type!=null">TYPE=#{et.type},</if>
|
|
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
|
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
|
<if test="et.item!=null">ITEM=#{et.item},</if>
|
|
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
|
<if test="et.qty!=null">QTY=#{et.qty},</if>
|
|
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
|
|
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
|
</trim>
|
|
WHERE HANDLE=#{et.handle}
|
|
<if test="et instanceof java.util.Map">
|
|
<if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and
|
|
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
|
|
</if>
|
|
</if>
|
|
</update>
|
|
|
|
|
|
<update id="updateAllColumnById">
|
|
UPDATE Z_CUTTER_LOG <trim prefix="SET" suffixOverrides=",">
|
|
SITE=#{et.site},
|
|
CUTTER=#{et.cutter},
|
|
SHOP_ORDER=#{et.shopOrder},
|
|
WORK_CENTER=#{et.workCenter},
|
|
SFC=#{et.sfc},
|
|
TYPE=#{et.type},
|
|
OPERATION=#{et.operation},
|
|
STEP_ID=#{et.stepId},
|
|
ITEM=#{et.item},
|
|
RESRCE=#{et.resrce},
|
|
QTY=#{et.qty},
|
|
CREATE_USER=#{et.createUser},
|
|
CREATED_DATE_TIME=#{et.createdDateTime},
|
|
</trim> WHERE HANDLE=#{et.handle}
|
|
<if test="et instanceof java.util.Map">
|
|
<if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and
|
|
${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
|
|
</if>
|
|
</if>
|
|
</update>
|
|
|
|
|
|
<update id="update">
|
|
UPDATE Z_CUTTER_LOG
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="et.site!=null">SITE=#{et.site},</if>
|
|
<if test="et.cutter!=null">CUTTER=#{et.cutter},</if>
|
|
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
|
|
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
|
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
|
<if test="et.type!=null">TYPE=#{et.type},</if>
|
|
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
|
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
|
<if test="et.item!=null">ITEM=#{et.item},</if>
|
|
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
|
<if test="et.qty!=null">QTY=#{et.qty},</if>
|
|
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
|
|
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
|
</trim>
|
|
<where>
|
|
<if test="ew!=null">
|
|
<if test="ew.entity!=null">
|
|
HANDLE=#{ew.entity.handle}
|
|
<if test="ew.entity.site!=null">AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.cutter!=null">AND CUTTER=#{ew.entity.cutter}</if>
|
|
<if test="ew.entity.shopOrder!=null">AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
<if test="ew.entity.workCenter!=null">AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
<if test="ew.entity.sfc!=null">AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.type!=null">AND TYPE=#{ew.entity.type}</if>
|
|
<if test="ew.entity.operation!=null">AND OPERATION=#{ew.entity.operation}</if>
|
|
<if test="ew.entity.stepId!=null">AND STEP_ID=#{ew.entity.stepId}</if>
|
|
<if test="ew.entity.item!=null">AND ITEM=#{ew.entity.item}</if>
|
|
<if test="ew.entity.resrce!=null">AND RESRCE=#{ew.entity.resrce}</if>
|
|
<if test="ew.entity.qty!=null">AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.createUser!=null">AND CREATE_USER=#{ew.entity.createUser}</if>
|
|
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
</if>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</update>
|
|
|
|
<delete id="deleteById">
|
|
DELETE FROM Z_CUTTER_LOG WHERE HANDLE=#{handle}
|
|
</delete>
|
|
|
|
<delete id="deleteByMap">
|
|
DELETE FROM Z_CUTTER_LOG
|
|
<if test="cm!=null and !cm.isEmpty">
|
|
<where>
|
|
<foreach collection="cm.keys" item="k" separator="AND">
|
|
<if test="cm[k] != null">
|
|
${k} = #{cm[${k}]}
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
</delete>
|
|
|
|
<delete id="delete">
|
|
DELETE FROM Z_CUTTER_LOG
|
|
<where>
|
|
<if test="ew!=null">
|
|
<if test="ew.entity!=null">
|
|
<if test="ew.entity.handle!=null">
|
|
HANDLE=#{ew.entity.handle}
|
|
</if>
|
|
<if test="ew.entity.site!=null">AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.cutter!=null">AND CUTTER=#{ew.entity.cutter}</if>
|
|
<if test="ew.entity.shopOrder!=null">AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
<if test="ew.entity.workCenter!=null">AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
<if test="ew.entity.sfc!=null">AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.type!=null">AND TYPE=#{ew.entity.type}</if>
|
|
<if test="ew.entity.operation!=null">AND OPERATION=#{ew.entity.operation}</if>
|
|
<if test="ew.entity.stepId!=null">AND STEP_ID=#{ew.entity.stepId}</if>
|
|
<if test="ew.entity.item!=null">AND ITEM=#{ew.entity.item}</if>
|
|
<if test="ew.entity.resrce!=null">AND RESRCE=#{ew.entity.resrce}</if>
|
|
<if test="ew.entity.qty!=null">AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.createUser!=null">AND CREATE_USER=#{ew.entity.createUser}</if>
|
|
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
</if>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
|
${ew.sqlSegment}
|
|
</if>
|
|
</delete>
|
|
|
|
<delete id="deleteBatchIds">
|
|
DELETE FROM Z_CUTTER_LOG WHERE HANDLE IN (
|
|
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
|
</foreach>)
|
|
</delete>
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
</mapper>
|