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.
716 lines
48 KiB
XML
716 lines
48 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.meapi.mapper.SfcMapper">
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.Sfc">
|
|
<result column="HANDLE" property="handle" />
|
|
<result column="CHANGE_STAMP" property="changeStamp" />
|
|
<result column="SITE" property="site" />
|
|
<result column="SFC" property="sfc" />
|
|
<result column="STATUS_BO" property="statusBo" />
|
|
<result column="SHOP_ORDER_BO" property="shopOrderBo" />
|
|
<result column="QTY" property="qty" />
|
|
<result column="QTY_DONE" property="qtyDone" />
|
|
<result column="QTY_SCRAPPED" property="qtyScrapped" />
|
|
<result column="QTY_HISTORICAL_MIN" property="qtyHistoricalMin" />
|
|
<result column="QTY_HISTORICAL_MAX" property="qtyHistoricalMax" />
|
|
<result column="ITEM_BO" property="itemBo" />
|
|
<result column="PRIORITY" property="priority" />
|
|
<result column="LOCATION" property="location" />
|
|
<result column="RMA_MAX_TIMES_PROCESSED" property="rmaMaxTimesProcessed" />
|
|
<result column="LCC_BO" property="lccBo" />
|
|
<result column="ORIGINAL_STATUS_BO" property="originalStatusBo" />
|
|
<result column="QTY_MULT_PERFORMED" property="qtyMultPerformed" />
|
|
<result column="ACTUAL_COMP_DATE" property="actualCompDate" />
|
|
<result column="PREV_SITE" property="prevSite" />
|
|
<result column="ORIGINAL_TRANSFER_KEY" property="originalTransferKey" />
|
|
<result column="IMMEDIATE_ARCHIVE" property="immediateArchive" />
|
|
<result column="TRANSFER_DATETIME" property="transferDatetime" />
|
|
<result column="TRANSFER_USER" property="transferUser" />
|
|
<result column="SN_DONE" property="snDone" />
|
|
<result column="AIN_EQUIPMENT_ID" property="ainEquipmentId" />
|
|
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
|
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
|
<result column="PARTITION_DATE" property="partitionDate" />
|
|
</resultMap>
|
|
|
|
<resultMap id="FullResultMap" type="com.foreverwin.mesnac.meapi.dto.SfcDto">
|
|
<result column="SHOP_ORDER" property="shopOrder" />
|
|
<result column="STATUS" property="status" />
|
|
<result column="ITEM" property="item" />
|
|
<result column="ITEM_DESCRIPTION" property="itemDescription" />
|
|
<result column="OPERATION" property="operation" />
|
|
<result column="OPERATION_DESCRIPTION" property="operationDescription" />
|
|
<result column="PREPOSITION_OPERATION" property="prepositionOperation" />
|
|
<result column="RESRCE" property="resrce" />
|
|
<result column="EMPLOYEE_DESCRIPTION" property="employeeDescription" />
|
|
<result column="LAST_OPERATION_STATUS" property="lastOperationStatus" />
|
|
|
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
HANDLE, CHANGE_STAMP, SITE, SFC, STATUS_BO, SHOP_ORDER_BO, QTY, QTY_DONE, QTY_SCRAPPED, QTY_HISTORICAL_MIN, QTY_HISTORICAL_MAX, ITEM_BO, PRIORITY, LOCATION, RMA_MAX_TIMES_PROCESSED, LCC_BO, ORIGINAL_STATUS_BO, QTY_MULT_PERFORMED, ACTUAL_COMP_DATE, PREV_SITE, ORIGINAL_TRANSFER_KEY, IMMEDIATE_ARCHIVE, TRANSFER_DATETIME, TRANSFER_USER, SN_DONE, AIN_EQUIPMENT_ID, CREATED_DATE_TIME, MODIFIED_DATE_TIME, PARTITION_DATE
|
|
</sql>
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
<select id="selectByMap" resultMap="BaseResultMap">
|
|
SELECT <include refid="Base_Column_List"></include>
|
|
FROM SFC
|
|
<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="selectOne" resultMap="BaseResultMap">
|
|
SELECT <include refid="Base_Column_List"></include> FROM SFC
|
|
<where>
|
|
<if test="ew.entity.handle!=null">
|
|
HANDLE=#{ew.handle}
|
|
</if>
|
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
|
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
|
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
|
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
|
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
|
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
|
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
|
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
|
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
|
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
|
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
|
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
|
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
|
|
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
|
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
|
<if test="ew.entity.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
|
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
|
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
|
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
|
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</if>
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectCount" resultType="Integer">
|
|
SELECT COUNT(1) FROM SFC
|
|
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
|
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
|
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
|
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
|
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
|
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
|
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
|
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
|
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
|
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
|
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
|
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
|
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
|
|
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
|
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
|
<if test="ew.entity.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
|
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
|
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
|
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
|
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</if>
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</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 SFC
|
|
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
|
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
|
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
|
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
|
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
|
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
|
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
|
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
|
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
|
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
|
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
|
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
|
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
|
|
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
|
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
|
<if test="ew.entity.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
|
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
|
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
|
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
|
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</if>
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</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 SFC
|
|
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
|
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
|
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
|
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
|
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
|
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
|
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
|
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
|
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
|
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
|
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
|
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
|
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
|
|
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
|
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
|
<if test="ew.entity.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
|
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
|
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
|
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
|
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</if>
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</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 SFC
|
|
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
|
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
|
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
|
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
|
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
|
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
|
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
|
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
|
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
|
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
|
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
|
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
|
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
|
|
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
|
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
|
<if test="ew.entity.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
|
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
|
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
|
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
|
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</if>
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</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 SFC
|
|
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
|
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
|
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
|
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
|
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
|
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
|
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
|
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
|
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
|
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
|
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
|
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
|
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
|
|
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
|
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
|
<if test="ew.entity.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
|
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
|
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
|
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
|
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</if>
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
|
</if>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
AND ${ew.sqlSegment}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
|
AND ${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 SFC
|
|
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
|
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
|
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
|
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
|
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
|
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
|
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
|
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
|
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
|
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
|
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
|
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
|
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
|
|
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
|
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
|
<if test="ew.entity.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
|
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
|
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
|
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
|
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</if>
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</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.meapi.model.Sfc">
|
|
INSERT INTO SFC
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
HANDLE,
|
|
<if test="changeStamp!=null">CHANGE_STAMP,</if>
|
|
<if test="site!=null">SITE,</if>
|
|
<if test="sfc!=null">SFC,</if>
|
|
<if test="statusBo!=null">STATUS_BO,</if>
|
|
<if test="shopOrderBo!=null">SHOP_ORDER_BO,</if>
|
|
<if test="qty!=null">QTY,</if>
|
|
<if test="qtyDone!=null">QTY_DONE,</if>
|
|
<if test="qtyScrapped!=null">QTY_SCRAPPED,</if>
|
|
<if test="qtyHistoricalMin!=null">QTY_HISTORICAL_MIN,</if>
|
|
<if test="qtyHistoricalMax!=null">QTY_HISTORICAL_MAX,</if>
|
|
<if test="itemBo!=null">ITEM_BO,</if>
|
|
<if test="priority!=null">PRIORITY,</if>
|
|
<if test="location!=null">LOCATION,</if>
|
|
<if test="rmaMaxTimesProcessed!=null">RMA_MAX_TIMES_PROCESSED,</if>
|
|
<if test="lccBo!=null">LCC_BO,</if>
|
|
<if test="originalStatusBo!=null">ORIGINAL_STATUS_BO,</if>
|
|
<if test="qtyMultPerformed!=null">QTY_MULT_PERFORMED,</if>
|
|
<if test="actualCompDate!=null">ACTUAL_COMP_DATE,</if>
|
|
<if test="prevSite!=null">PREV_SITE,</if>
|
|
<if test="originalTransferKey!=null">ORIGINAL_TRANSFER_KEY,</if>
|
|
<if test="immediateArchive!=null">IMMEDIATE_ARCHIVE,</if>
|
|
<if test="transferDatetime!=null">TRANSFER_DATETIME,</if>
|
|
<if test="transferUser!=null">TRANSFER_USER,</if>
|
|
<if test="snDone!=null">SN_DONE,</if>
|
|
<if test="ainEquipmentId!=null">AIN_EQUIPMENT_ID,</if>
|
|
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
|
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
|
<if test="partitionDate!=null">PARTITION_DATE,</if>
|
|
</trim> VALUES
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
#{handle},
|
|
<if test="changeStamp!=null">#{changeStamp},</if>
|
|
<if test="site!=null">#{site},</if>
|
|
<if test="sfc!=null">#{sfc},</if>
|
|
<if test="statusBo!=null">#{statusBo},</if>
|
|
<if test="shopOrderBo!=null">#{shopOrderBo},</if>
|
|
<if test="qty!=null">#{qty},</if>
|
|
<if test="qtyDone!=null">#{qtyDone},</if>
|
|
<if test="qtyScrapped!=null">#{qtyScrapped},</if>
|
|
<if test="qtyHistoricalMin!=null">#{qtyHistoricalMin},</if>
|
|
<if test="qtyHistoricalMax!=null">#{qtyHistoricalMax},</if>
|
|
<if test="itemBo!=null">#{itemBo},</if>
|
|
<if test="priority!=null">#{priority},</if>
|
|
<if test="location!=null">#{location},</if>
|
|
<if test="rmaMaxTimesProcessed!=null">#{rmaMaxTimesProcessed},</if>
|
|
<if test="lccBo!=null">#{lccBo},</if>
|
|
<if test="originalStatusBo!=null">#{originalStatusBo},</if>
|
|
<if test="qtyMultPerformed!=null">#{qtyMultPerformed},</if>
|
|
<if test="actualCompDate!=null">#{actualCompDate},</if>
|
|
<if test="prevSite!=null">#{prevSite},</if>
|
|
<if test="originalTransferKey!=null">#{originalTransferKey},</if>
|
|
<if test="immediateArchive!=null">#{immediateArchive},</if>
|
|
<if test="transferDatetime!=null">#{transferDatetime},</if>
|
|
<if test="transferUser!=null">#{transferUser},</if>
|
|
<if test="snDone!=null">#{snDone},</if>
|
|
<if test="ainEquipmentId!=null">#{ainEquipmentId},</if>
|
|
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
|
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
|
<if test="partitionDate!=null">#{partitionDate},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.Sfc">
|
|
INSERT INTO SFC
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<include refid="Base_Column_List"></include>
|
|
</trim> VALUES
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
#{handle},
|
|
#{changeStamp},
|
|
#{site},
|
|
#{sfc},
|
|
#{statusBo},
|
|
#{shopOrderBo},
|
|
#{qty},
|
|
#{qtyDone},
|
|
#{qtyScrapped},
|
|
#{qtyHistoricalMin},
|
|
#{qtyHistoricalMax},
|
|
#{itemBo},
|
|
#{priority},
|
|
#{location},
|
|
#{rmaMaxTimesProcessed},
|
|
#{lccBo},
|
|
#{originalStatusBo},
|
|
#{qtyMultPerformed},
|
|
#{actualCompDate},
|
|
#{prevSite},
|
|
#{originalTransferKey},
|
|
#{immediateArchive},
|
|
#{transferDatetime},
|
|
#{transferUser},
|
|
#{snDone},
|
|
#{ainEquipmentId},
|
|
#{createdDateTime},
|
|
#{modifiedDateTime},
|
|
#{partitionDate},
|
|
</trim>
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="update">
|
|
UPDATE SFC <trim prefix="SET" suffixOverrides=",">
|
|
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
|
<if test="et.changeStamp!=null">CHANGE_STAMP=#{et.changeStamp},</if>
|
|
<if test="et.site!=null">SITE=#{et.site},</if>
|
|
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
|
<if test="et.statusBo!=null">STATUS_BO=#{et.statusBo},</if>
|
|
<if test="et.shopOrderBo!=null">SHOP_ORDER_BO=#{et.shopOrderBo},</if>
|
|
<if test="et.qty!=null">QTY=#{et.qty},</if>
|
|
<if test="et.qtyDone!=null">QTY_DONE=#{et.qtyDone},</if>
|
|
<if test="et.qtyScrapped!=null">QTY_SCRAPPED=#{et.qtyScrapped},</if>
|
|
<if test="et.qtyHistoricalMin!=null">QTY_HISTORICAL_MIN=#{et.qtyHistoricalMin},</if>
|
|
<if test="et.qtyHistoricalMax!=null">QTY_HISTORICAL_MAX=#{et.qtyHistoricalMax},</if>
|
|
<if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if>
|
|
<if test="et.priority!=null">PRIORITY=#{et.priority},</if>
|
|
<if test="et.location!=null">LOCATION=#{et.location},</if>
|
|
<if test="et.rmaMaxTimesProcessed!=null">RMA_MAX_TIMES_PROCESSED=#{et.rmaMaxTimesProcessed},</if>
|
|
<if test="et.lccBo!=null">LCC_BO=#{et.lccBo},</if>
|
|
<if test="et.originalStatusBo!=null">ORIGINAL_STATUS_BO=#{et.originalStatusBo},</if>
|
|
<if test="et.qtyMultPerformed!=null">QTY_MULT_PERFORMED=#{et.qtyMultPerformed},</if>
|
|
<if test="et.actualCompDate!=null">ACTUAL_COMP_DATE=#{et.actualCompDate},</if>
|
|
<if test="et.prevSite!=null">PREV_SITE=#{et.prevSite},</if>
|
|
<if test="et.originalTransferKey!=null">ORIGINAL_TRANSFER_KEY=#{et.originalTransferKey},</if>
|
|
<if test="et.immediateArchive!=null">IMMEDIATE_ARCHIVE=#{et.immediateArchive},</if>
|
|
<if test="et.transferDatetime!=null">TRANSFER_DATETIME=#{et.transferDatetime},</if>
|
|
<if test="et.transferUser!=null">TRANSFER_USER=#{et.transferUser},</if>
|
|
<if test="et.snDone!=null">SN_DONE=#{et.snDone},</if>
|
|
<if test="et.ainEquipmentId!=null">AIN_EQUIPMENT_ID=#{et.ainEquipmentId},</if>
|
|
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
|
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
|
<if test="et.partitionDate!=null">PARTITION_DATE=#{et.partitionDate},</if>
|
|
</trim>
|
|
<where>
|
|
<if test="ew!=null">
|
|
<if test="ew.entity!=null">
|
|
HANDLE=#{ew.entity.handle}
|
|
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
|
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
|
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
|
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
|
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
|
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
|
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
|
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
|
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
|
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
|
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
|
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
|
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
|
|
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
|
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
|
<if test="ew.entity.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
|
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
|
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
|
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
|
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</if>
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</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="deleteByMap">
|
|
DELETE FROM SFC
|
|
<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 SFC
|
|
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
|
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
|
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
|
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
|
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
|
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
|
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
|
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
|
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
|
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
|
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
|
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
|
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
|
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
|
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
|
|
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
|
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
|
<if test="ew.entity.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
|
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
|
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
|
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
|
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</if>
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</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>
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
<select id="getSfcStartTime" resultType="java.time.LocalDateTime">
|
|
SELECT IW.DATE_STARTED
|
|
FROM SFC S
|
|
INNER JOIN SFC_ROUTING SR ON SR.SFC_BO = S.HANDLE
|
|
INNER JOIN SFC_ROUTER SRO ON SRO.SFC_ROUTING_BO = SR.HANDLE AND SRO.IN_USE = 'true'
|
|
INNER JOIN SFC_STEP SS ON SS.SFC_ROUTER_BO = SRO.HANDLE
|
|
INNER JOIN SFC_IN_WORK IW ON SS.HANDLE = IW.SFC_STEP_BO
|
|
INNER JOIN STATUS ST ON ST.HANDLE = S.STATUS_BO AND ST.STATUS ='403'
|
|
WHERE s.HANDLE=#{sfcBO}
|
|
</select>
|
|
|
|
|
|
|
|
<select id="findSfcData" resultMap="FullResultMap">
|
|
SELECT SC.SITE, SC.SFC, SO.SHOP_ORDER, SC.QTY, SC.QTY_DONE, ST.STATUS, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, OP.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, OTT.DESCRIPTION PREPOSITION_OPERATION
|
|
FROM SFC SC
|
|
INNER JOIN SHOP_ORDER SO ON SO.HANDLE = SC.SHOP_ORDER_BO
|
|
INNER JOIN STATUS ST ON ST.HANDLE = SC.STATUS_BO AND ST.STATUS_GROUP = 'SFC'
|
|
INNER JOIN ITEM IM ON IM.HANDLE = SC.ITEM_BO
|
|
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
|
|
INNER JOIN SFC_ROUTING SG ON SG.SFC_BO = SC.HANDLE
|
|
INNER JOIN SFC_ROUTER SR ON SR.SFC_ROUTING_BO = SG.HANDLE AND SR.IN_USE = 'true'
|
|
INNER JOIN SFC_STEP SP ON SP.SFC_ROUTER_BO = SR.HANDLE AND (SP.QTY_IN_QUEUE > 0 OR SP.QTY_IN_WORK > 0)
|
|
INNER JOIN OPERATION OP ON SP.OPERATION_BO = 'OperationBO:'||OP.SITE||','||OP.OPERATION||',#' AND OP.CURRENT_REVISION = 'true'
|
|
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = OP.HANDLE AND OT.LOCALE = 'zh'
|
|
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZSD.SITE = SC.SITE AND ZSD.SFC = SC.SFC AND ZSD.OPERATION = OP.OPERATION AND ZSD.STEP_ID = SP.STEP_ID
|
|
LEFT JOIN OPERATION_T OTT ON SPLIT(OTT.OPERATION_BO,2) = ZSD.PREPOSITION_OPERATION AND OTT.LOCALE = 'zh'
|
|
WHERE SC.SITE = #{site} AND SC.SFC = #{sfc}
|
|
</select>
|
|
|
|
<select id="pageByResrce" resultType="com.foreverwin.mesnac.meapi.dto.SfcDto">
|
|
SELECT * FROM (
|
|
SELECT S.SITE,PREZSD.EMPLOYEE_DESCRIPTION,
|
|
CASE WHEN SS.STEP_SEQUENCE>TO_NUMBER(zsd.DISPATCH_SEQ)-1 THEN '完成'
|
|
ELSE '未完成' END LAST_OPERATION_STATUS,SS.STEP_ID CURRENT_STEP_ID,zsd.STEP_ID,
|
|
S.SFC,S.QTY,IT.DESCRIPTION ITEM_DESCRIPTION,S.ITEM_BO,S.SHOP_ORDER_BO
|
|
FROM SFC S
|
|
LEFT JOIN ITEM_T IT ON S.ITEM_BO=IT.ITEM_BO AND IT.LOCALE=#{locale}
|
|
JOIN Z_SFC_DISPATCH zsd ON S.SFC=zsd.SFC AND S.SITE=zsd.SITE
|
|
LEFT JOIN Z_SFC_DISPATCH PREZSD ON zsd.SFC=PREZSD.SFC AND PREZSD.DISPATCH_SEQ=TO_NUMBER(zsd.DISPATCH_SEQ)-1 AND zsd.ROUTER_BO=PREZSD.ROUTER_BO
|
|
JOIN Z_PROD_READY_TASK zprt ON ZPRT.SFC_DISPATCH_BO=zsd.HANDLE
|
|
JOIN SFC_ROUTING SR ON SR.SFC_BO=S.HANDLE
|
|
JOIN SFC_ROUTER SR2 ON SR.HANDLE =SR2.SFC_ROUTING_BO AND SR2.IN_USE = 'true'
|
|
LEFT JOIN SFC_STEP SS ON SR2.HANDLE =SS.SFC_ROUTER_BO AND (SS.QTY_IN_QUEUE>0 or SS.QTY_IN_WORK>0)
|
|
JOIN SFC_STEP SSS ON SR2.HANDLE =SSS.SFC_ROUTER_BO AND SSS.STEP_ID = ZSD.STEP_ID AND SSS.BYPASSED = 'false'
|
|
WHERE S.SITE=#{ew.entity.site} AND ZSD.RESRCE=#{ew.entity.resrce} AND (ZSD.DISPATCH_STATUS='RELEASE' OR ZSD.DISPATCH_STATUS='START')
|
|
AND S.STATUS_BO IN ('StatusBO:'||#{ew.entity.site}||',401','StatusBO:'||#{ew.entity.site}||',402','StatusBO:'||#{ew.entity.site}||',403','StatusBO:'||#{ew.entity.site}||',404')
|
|
AND zprt.STATUS='FINISH' AND ZPRT."RESULT"='OK'
|
|
) T
|
|
WHERE T.SITE = #{ew.entity.site}
|
|
<if test="globalQuery!=null and globalQuery!=''">
|
|
<choose>
|
|
<when test="globalQuery.contains('完成')">
|
|
AND T.LAST_OPERATION_STATUS = #{globalQuery}
|
|
</when>
|
|
<otherwise>
|
|
AND T.SFC like '%${globalQuery}%'
|
|
</otherwise>
|
|
</choose>
|
|
</if>
|
|
</select>
|
|
|
|
|
|
<select id="findOperationBySfc" resultType="map">
|
|
SELECT SS.OPERATION_BO,SS.STEP_ID
|
|
FROM SFC S
|
|
INNER JOIN SFC_ROUTING SR ON SR.SFC_BO = S.HANDLE
|
|
INNER JOIN SFC_ROUTER ST ON ST.SFC_ROUTING_BO = SR.HANDLE AND ST.IN_USE = 'true'
|
|
INNER JOIN SFC_STEP SS ON SS.SFC_ROUTER_BO = ST.HANDLE
|
|
WHERE (SS.QTY_IN_QUEUE > 0 OR SS.QTY_IN_WORK > 0)
|
|
AND S.SFC = #{sfc} AND S.SITE = #{site}
|
|
</select>
|
|
|
|
<select id="findSfcByResrce" resultMap="BaseResultMap">
|
|
|
|
</select>
|
|
|
|
</mapper>
|