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.

627 lines
39 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.common.mapper.ProdReadyTaskMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.common.model.ProdReadyTask">
<id column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="TASK_NO" property="taskNo" />
<result column="SFC_DISPATCH_BO" property="sfcDispatchBo" />
<result column="SHOP_ORDER" property="shopOrder" />
<result column="WORK_CENTER" property="workCenter" />
<result column="SFC" property="sfc" />
<result column="OPERATION" property="operation" />
<result column="STEP_ID" property="stepId" />
<result column="ITEM" property="item" />
<result column="RESRCE" property="resrce" />
<result column="RESLUT" property="reslut" />
<result column="STATUS" property="status" />
<result column="CREATE_USER" property="createUser" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFY_USER" property="modifyUser" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
<result column="READY_USER" property="readyUser" />
<result column="READY_DATE_TIME" property="readyDateTime" />
<result column="COMPLETE_DATE_TIME" property="completeDateTime" />
<result column="COMPLETE_USER" property="completeUser" />
<result column="CANCEL_DATE_TIME" property="cancelDateTime" />
<result column="CANCEL_USER" property="cancelUser" />
<result column="REMARKS" property="remarks" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, TASK_NO, SFC_DISPATCH_BO, SHOP_ORDER, WORK_CENTER, SFC, OPERATION, STEP_ID, ITEM, RESRCE, RESLUT, STATUS, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, READY_USER, READY_DATE_TIME, COMPLETE_DATE_TIME, COMPLETE_USER, CANCEL_DATE_TIME, CANCEL_USER, REMARKS
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectById" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_PROD_READY_TASK WHERE HANDLE=#{handle}
</select>
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_PROD_READY_TASK
<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_PROD_READY_TASK 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_PROD_READY_TASK
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</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.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.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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 test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_PROD_READY_TASK
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</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.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.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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 test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</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_PROD_READY_TASK
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</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.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.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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 test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</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_PROD_READY_TASK
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</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.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.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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 test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</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_PROD_READY_TASK
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</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.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.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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 test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</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_PROD_READY_TASK
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</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.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.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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 test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</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_PROD_READY_TASK
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</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.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.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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 test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</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.common.model.ProdReadyTask">
INSERT INTO Z_PROD_READY_TASK
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="site!=null">SITE,</if>
<if test="taskNo!=null">TASK_NO,</if>
<if test="sfcDispatchBo!=null">SFC_DISPATCH_BO,</if>
<if test="shopOrder!=null">SHOP_ORDER,</if>
<if test="workCenter!=null">WORK_CENTER,</if>
<if test="sfc!=null">SFC,</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="reslut!=null">RESLUT,</if>
<if test="status!=null">STATUS,</if>
<if test="createUser!=null">CREATE_USER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifyUser!=null">MODIFY_USER,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
<if test="readyUser!=null">READY_USER,</if>
<if test="readyDateTime!=null">READY_DATE_TIME,</if>
<if test="completeDateTime!=null">COMPLETE_DATE_TIME,</if>
<if test="completeUser!=null">COMPLETE_USER,</if>
<if test="cancelDateTime!=null">CANCEL_DATE_TIME,</if>
<if test="cancelUser!=null">CANCEL_USER,</if>
<if test="remarks!=null">REMARKS,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="site!=null">#{site},</if>
<if test="taskNo!=null">#{taskNo},</if>
<if test="sfcDispatchBo!=null">#{sfcDispatchBo},</if>
<if test="shopOrder!=null">#{shopOrder},</if>
<if test="workCenter!=null">#{workCenter},</if>
<if test="sfc!=null">#{sfc},</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="reslut!=null">#{reslut},</if>
<if test="status!=null">#{status},</if>
<if test="createUser!=null">#{createUser},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifyUser!=null">#{modifyUser},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
<if test="readyUser!=null">#{readyUser},</if>
<if test="readyDateTime!=null">#{readyDateTime},</if>
<if test="completeDateTime!=null">#{completeDateTime},</if>
<if test="completeUser!=null">#{completeUser},</if>
<if test="cancelDateTime!=null">#{cancelDateTime},</if>
<if test="cancelUser!=null">#{cancelUser},</if>
<if test="remarks!=null">#{remarks},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.common.model.ProdReadyTask">
INSERT INTO Z_PROD_READY_TASK
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{site},
#{taskNo},
#{sfcDispatchBo},
#{shopOrder},
#{workCenter},
#{sfc},
#{operation},
#{stepId},
#{item},
#{resrce},
#{reslut},
#{status},
#{createUser},
#{createdDateTime},
#{modifyUser},
#{modifiedDateTime},
#{readyUser},
#{readyDateTime},
#{completeDateTime},
#{completeUser},
#{cancelDateTime},
#{cancelUser},
#{remarks},
</trim>
</insert>
<update id="updateById">
UPDATE Z_PROD_READY_TASK <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.taskNo!=null">TASK_NO=#{et.taskNo},</if>
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</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.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.reslut!=null">RESLUT=#{et.reslut},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.readyUser!=null">READY_USER=#{et.readyUser},</if>
<if test="et.readyDateTime!=null">READY_DATE_TIME=#{et.readyDateTime},</if>
<if test="et.completeDateTime!=null">COMPLETE_DATE_TIME=#{et.completeDateTime},</if>
<if test="et.completeUser!=null">COMPLETE_USER=#{et.completeUser},</if>
<if test="et.cancelDateTime!=null">CANCEL_DATE_TIME=#{et.cancelDateTime},</if>
<if test="et.cancelUser!=null">CANCEL_USER=#{et.cancelUser},</if>
<if test="et.remarks!=null">REMARKS=#{et.remarks},</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_PROD_READY_TASK <trim prefix="SET" suffixOverrides=",">
SITE=#{et.site},
TASK_NO=#{et.taskNo},
SFC_DISPATCH_BO=#{et.sfcDispatchBo},
SHOP_ORDER=#{et.shopOrder},
WORK_CENTER=#{et.workCenter},
SFC=#{et.sfc},
OPERATION=#{et.operation},
STEP_ID=#{et.stepId},
ITEM=#{et.item},
RESRCE=#{et.resrce},
RESLUT=#{et.reslut},
STATUS=#{et.status},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFY_USER=#{et.modifyUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
READY_USER=#{et.readyUser},
READY_DATE_TIME=#{et.readyDateTime},
COMPLETE_DATE_TIME=#{et.completeDateTime},
COMPLETE_USER=#{et.completeUser},
CANCEL_DATE_TIME=#{et.cancelDateTime},
CANCEL_USER=#{et.cancelUser},
REMARKS=#{et.remarks},
</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_PROD_READY_TASK <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.taskNo!=null">TASK_NO=#{et.taskNo},</if>
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</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.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.reslut!=null">RESLUT=#{et.reslut},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.readyUser!=null">READY_USER=#{et.readyUser},</if>
<if test="et.readyDateTime!=null">READY_DATE_TIME=#{et.readyDateTime},</if>
<if test="et.completeDateTime!=null">COMPLETE_DATE_TIME=#{et.completeDateTime},</if>
<if test="et.completeUser!=null">COMPLETE_USER=#{et.completeUser},</if>
<if test="et.cancelDateTime!=null">CANCEL_DATE_TIME=#{et.cancelDateTime},</if>
<if test="et.cancelUser!=null">CANCEL_USER=#{et.cancelUser},</if>
<if test="et.remarks!=null">REMARKS=#{et.remarks},</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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</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.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.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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 test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</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_PROD_READY_TASK WHERE HANDLE=#{handle}
</delete>
<delete id="deleteByMap">
DELETE FROM Z_PROD_READY_TASK
<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_PROD_READY_TASK
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</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.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.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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 test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</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_PROD_READY_TASK WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>