@ -5,35 +5,34 @@
<!-- 通用查询映射结果 -->
<resultMap id= "BaseResultMap" type= "com.foreverwin.mesnac.production.model.WorkShopTransfer" >
<id column= "HANDLE" property= "handle" />
<result column= "SFC_DISPATCH_BO" property= "sfcDispatchBo" />
<result column= "SITE" property= "site" />
<result column= "TRANSFER_NO" property= "transferNo" />
<result column= "WORK_CENTER" property= "workCenter" />
<result column= "TRANSFER_WORK_CENTER" property= "transferWorkCenter" />
<result column= "SFC" property= "sfc" />
<result column= "SHOP_ORDER" property= "shopOrder" />
<result column= "ITEM" property= "item" />
<result column= "LAST_OPERATION" property= "lastOperation" />
<result column= "STEP_ID" property= "stepId" />
<result column= "OPERATION" property= "operation" />
<result column= "LAST_OPERATION" property= "lastOperation" />
<result column= "NEXT_OPERATION" property= "nextOperation" />
<result column= "QTY" property= "qty" />
<result column= "TYPE" property= "type" />
<result column= "IS_OUT" property= "isOut" />
<result column= "IS_IN" property= "isIn" />
<result column= "IS_OUT_SOURCE" property= "isOutSource" />
<result column= "COMMENTS" property= "comments" />
<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= "TRANSFER_IN_USER" property= "transferInUser" />
<result column= "TRANSFER_IN_TIME" property= "transferInTime" />
<result column= "TRANSFER_OUT_USER" property= "transferOutUser" />
<result column= "TRANSFER_OUT_TIME" property= "transferOutTime" />
</resultMap>
<resultMap id= "FullResultMap" type= "com.foreverwin.mesnac.production.dto.WorkShopTransferDto" >
<result column= "MAP" property= "map" />
<result column= "WORK_ORDER" property= "workOrder" />
<result column= "ITEM_DESC" property= "itemDesc" />
<result column= "ITEM_NUMBER" property= "itemNumber" />
<result column= "OPERATION_DESC" property= "operationDesc" />
<result column= "QTY" property= "qty" />
<result column= "STATUS" property= "status" />
<result column= "DISPATCH_NO" property= "dispatchNo" />
<result column= "RESRCE" property= "resrce" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id= "Base_Column_List" >
HANDLE, SITE, WORK_CENTER, SFC, SHOP_ORDER, ITEM, LAST_OPERATION, STEP_ID, OPERATION, QTY, TYPE, IS_OUT_SOURCE, COMMENTS, CREATE_USER, CREATED_DATE _TIME
HANDLE, SFC_DISPATCH_BO, SITE, TRANSFER_NO, WORK_CENTER, TRANSFER_WORK_CENTER, SFC, SHOP_ORDER, STEP_ID, OPERATION, LAST_OPERATION, NEXT_OPERATION, QTY, IS_OUT, IS_IN, IS_OUT_SOURCE, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, TRANSFER_IN_USER, TRANSFER_IN_TIME, TRANSFER_OUT_USER, TRANSFER_OUT_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -66,22 +65,31 @@
SELECT <include refid= "Base_Column_List" > </include> FROM Z_WORK_SHOP_TRANSFER
<where >
<if test= "ew.entity.handle!=null" >
HANDLE=#{ew.handle}
HANDLE=#{ew.handle}
</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.site!=null" > AND SITE=#{ew.entity.site}</if>
<if test= "ew.entity.transferNo!=null" > AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.transferWorkCenter!=null" > AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.item!=null" > AND ITEM=#{ew.entity.item}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.nextOperation!=null" > AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.isOut!=null" > AND IS_OUT=#{ew.entity.isOut}</if>
<if test= "ew.entity.isIn!=null" > AND IS_IN=#{ew.entity.isIn}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test= "ew.entity.comments!=null" > AND COMMENTS=#{ew.entity.comments}</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.transferInUser!=null" > AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test= "ew.entity.transferInTime!=null" > AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test= "ew.entity.transferOutUser!=null" > AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test= "ew.entity.transferOutTime!=null" > AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</where>
</select>
@ -90,23 +98,32 @@
<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.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.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.item!=null" > AND ITEM=#{ew.entity.item}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test= "ew.entity.comments!=null" > AND COMMENTS=#{ew.entity.comments}</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.handle!=null" >
HANDLE=#{ew.entity.handle}
</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.site!=null" > AND SITE=#{ew.entity.site}</if>
<if test= "ew.entity.transferNo!=null" > AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.transferWorkCenter!=null" > AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.nextOperation!=null" > AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.isOut!=null" > AND IS_OUT=#{ew.entity.isOut}</if>
<if test= "ew.entity.isIn!=null" > AND IS_IN=#{ew.entity.isIn}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</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.transferInUser!=null" > AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test= "ew.entity.transferInTime!=null" > AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test= "ew.entity.transferOutUser!=null" > AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test= "ew.entity.transferOutTime!=null" > AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -126,20 +143,29 @@
<if test= "ew.entity.handle!=null" >
HANDLE=#{ew.entity.handle}
</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.site!=null" > AND SITE=#{ew.entity.site}</if>
<if test= "ew.entity.transferNo!=null" > AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.transferWorkCenter!=null" > AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.item!=null" > AND ITEM=#{ew.entity.item}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.nextOperation!=null" > AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.isOut!=null" > AND IS_OUT=#{ew.entity.isOut}</if>
<if test= "ew.entity.isIn!=null" > AND IS_IN=#{ew.entity.isIn}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test= "ew.entity.comments!=null" > AND COMMENTS=#{ew.entity.comments}</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.transferInUser!=null" > AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test= "ew.entity.transferInTime!=null" > AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test= "ew.entity.transferOutUser!=null" > AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test= "ew.entity.transferOutTime!=null" > AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -159,20 +185,29 @@
<if test= "ew.entity.handle!=null" >
HANDLE=#{ew.entity.handle}
</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.site!=null" > AND SITE=#{ew.entity.site}</if>
<if test= "ew.entity.transferNo!=null" > AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.transferWorkCenter!=null" > AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.item!=null" > AND ITEM=#{ew.entity.item}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.nextOperation!=null" > AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.isOut!=null" > AND IS_OUT=#{ew.entity.isOut}</if>
<if test= "ew.entity.isIn!=null" > AND IS_IN=#{ew.entity.isIn}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test= "ew.entity.comments!=null" > AND COMMENTS=#{ew.entity.comments}</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.transferInUser!=null" > AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test= "ew.entity.transferInTime!=null" > AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test= "ew.entity.transferOutUser!=null" > AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test= "ew.entity.transferOutTime!=null" > AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -192,20 +227,29 @@
<if test= "ew.entity.handle!=null" >
HANDLE=#{ew.entity.handle}
</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.site!=null" > AND SITE=#{ew.entity.site}</if>
<if test= "ew.entity.transferNo!=null" > AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.transferWorkCenter!=null" > AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.item!=null" > AND ITEM=#{ew.entity.item}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.nextOperation!=null" > AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.isOut!=null" > AND IS_OUT=#{ew.entity.isOut}</if>
<if test= "ew.entity.isIn!=null" > AND IS_IN=#{ew.entity.isIn}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test= "ew.entity.comments!=null" > AND COMMENTS=#{ew.entity.comments}</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.transferInUser!=null" > AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test= "ew.entity.transferInTime!=null" > AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test= "ew.entity.transferOutUser!=null" > AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test= "ew.entity.transferOutTime!=null" > AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -225,23 +269,32 @@
<if test= "ew.entity.handle!=null" >
HANDLE=#{ew.entity.handle}
</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.site!=null" > AND SITE=#{ew.entity.site}</if>
<if test= "ew.entity.transferNo!=null" > AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.transferWorkCenter!=null" > AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.item!=null" > AND ITEM=#{ew.entity.item}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.nextOperation!=null" > AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.isOut!=null" > AND IS_OUT=#{ew.entity.isOut}</if>
<if test= "ew.entity.isIn!=null" > AND IS_IN=#{ew.entity.isIn}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test= "ew.entity.comments!=null" > AND COMMENTS=#{ew.entity.comments}</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.transferInUser!=null" > AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test= "ew.entity.transferInTime!=null" > AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test= "ew.entity.transferOutUser!=null" > AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test= "ew.entity.transferOutTime!=null" > AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
AND ${ew.sqlSegment}
</if>
</if>
</where>
@ -258,20 +311,29 @@
<if test= "ew.entity.handle!=null" >
HANDLE=#{ew.entity.handle}
</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.site!=null" > AND SITE=#{ew.entity.site}</if>
<if test= "ew.entity.transferNo!=null" > AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.transferWorkCenter!=null" > AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.item!=null" > AND ITEM=#{ew.entity.item}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.nextOperation!=null" > AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.isOut!=null" > AND IS_OUT=#{ew.entity.isOut}</if>
<if test= "ew.entity.isIn!=null" > AND IS_IN=#{ew.entity.isIn}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test= "ew.entity.comments!=null" > AND COMMENTS=#{ew.entity.comments}</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.transferInUser!=null" > AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test= "ew.entity.transferInTime!=null" > AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test= "ew.entity.transferOutUser!=null" > AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test= "ew.entity.transferOutTime!=null" > AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -287,37 +349,55 @@
INSERT INTO Z_WORK_SHOP_TRANSFER
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
HANDLE,
<if test= "sfcDispatchBo!=null" > SFC_DISPATCH_BO,</if>
<if test= "site!=null" > SITE,</if>
<if test= "transferNo!=null" > TRANSFER_NO,</if>
<if test= "workCenter!=null" > WORK_CENTER,</if>
<if test= "transferWorkCenter!=null" > TRANSFER_WORK_CENTER,</if>
<if test= "sfc!=null" > SFC,</if>
<if test= "shopOrder!=null" > SHOP_ORDER,</if>
<if test= "item!=null" > ITEM,</if>
<if test= "lastOperation!=null" > LAST_OPERATION,</if>
<if test= "stepId!=null" > STEP_ID,</if>
<if test= "operation!=null" > OPERATION,</if>
<if test= "lastOperation!=null" > LAST_OPERATION,</if>
<if test= "nextOperation!=null" > NEXT_OPERATION,</if>
<if test= "qty!=null" > QTY,</if>
<if test= "type!=null" > TYPE,</if>
<if test= "isOut!=null" > IS_OUT,</if>
<if test= "isIn!=null" > IS_IN,</if>
<if test= "isOutSource!=null" > IS_OUT_SOURCE,</if>
<if test= "comments!=null" > COMMENTS,</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= "transferInUser!=null" > TRANSFER_IN_USER,</if>
<if test= "transferInTime!=null" > TRANSFER_IN_TIME,</if>
<if test= "transferOutUser!=null" > TRANSFER_OUT_USER,</if>
<if test= "transferOutTime!=null" > TRANSFER_OUT_TIME,</if>
</trim> VALUES
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
#{handle},
<if test= "sfcDispatchBo!=null" > #{sfcDispatchBo},</if>
<if test= "site!=null" > #{site},</if>
<if test= "transferNo!=null" > #{transferNo},</if>
<if test= "workCenter!=null" > #{workCenter},</if>
<if test= "transferWorkCenter!=null" > #{transferWorkCenter},</if>
<if test= "sfc!=null" > #{sfc},</if>
<if test= "shopOrder!=null" > #{shopOrder},</if>
<if test= "item!=null" > #{item},</if>
<if test= "lastOperation!=null" > #{lastOperation},</if>
<if test= "stepId!=null" > #{stepId},</if>
<if test= "operation!=null" > #{operation},</if>
<if test= "lastOperation!=null" > #{lastOperation},</if>
<if test= "nextOperation!=null" > #{nextOperation},</if>
<if test= "qty!=null" > #{qty},</if>
<if test= "type!=null" > #{type},</if>
<if test= "isOut!=null" > #{isOut},</if>
<if test= "isIn!=null" > #{isIn},</if>
<if test= "isOutSource!=null" > #{isOutSource},</if>
<if test= "comments!=null" > #{comments},</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= "transferInUser!=null" > #{transferInUser},</if>
<if test= "transferInTime!=null" > #{transferInTime},</if>
<if test= "transferOutUser!=null" > #{transferOutUser},</if>
<if test= "transferOutTime!=null" > #{transferOutTime},</if>
</trim>
</insert>
@ -328,99 +408,144 @@
</trim> VALUES
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
#{handle},
#{sfcDispatchBo},
#{site},
#{transferNo},
#{workCenter},
#{transferWorkCenter},
#{sfc},
#{shopOrder},
#{item},
#{lastOperation},
#{stepId},
#{operation},
#{lastOperation},
#{nextOperation},
#{qty},
#{type},
#{isOut},
#{isIn},
#{isOutSource},
#{comments},
#{createUser},
#{createdDateTime},
#{modifyUser},
#{modifiedDateTime},
#{transferInUser},
#{transferInTime},
#{transferOutUser},
#{transferOutTime},
</trim>
</insert>
<update id= "updateById" >
UPDATE Z_WORK_SHOP_TRANSFER <trim prefix= "SET" suffixOverrides= "," >
<if test= "et.sfcDispatchBo!=null" > SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test= "et.site!=null" > SITE=#{et.site},</if>
<if test= "et.transferNo!=null" > TRANSFER_NO=#{et.transferNo},</if>
<if test= "et.workCenter!=null" > WORK_CENTER=#{et.workCenter},</if>
<if test= "et.transferWorkCenter!=null" > TRANSFER_WORK_CENTER=#{et.transferWorkCenter},</if>
<if test= "et.sfc!=null" > SFC=#{et.sfc},</if>
<if test= "et.shopOrder!=null" > SHOP_ORDER=#{et.shopOrder},</if>
<if test= "et.item!=null" > ITEM=#{et.item},</if>
<if test= "et.lastOperation!=null" > LAST_OPERATION=#{et.lastOperation},</if>
<if test= "et.stepId!=null" > STEP_ID=#{et.stepId},</if>
<if test= "et.operation!=null" > OPERATION=#{et.operation},</if>
<if test= "et.lastOperation!=null" > LAST_OPERATION=#{et.lastOperation},</if>
<if test= "et.nextOperation!=null" > NEXT_OPERATION=#{et.nextOperation},</if>
<if test= "et.qty!=null" > QTY=#{et.qty},</if>
<if test= "et.type!=null" > TYPE=#{et.type},</if>
<if test= "et.isOut!=null" > IS_OUT=#{et.isOut},</if>
<if test= "et.isIn!=null" > IS_IN=#{et.isIn},</if>
<if test= "et.isOutSource!=null" > IS_OUT_SOURCE=#{et.isOutSource},</if>
<if test= "et.comments!=null" > COMMENTS=#{et.comments},</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>
<if test= "et.modifyUser!=null" > MODIFY_USER=#{et.modifyUser},</if>
<if test= "et.modifiedDateTime!=null" > MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test= "et.transferInUser!=null" > TRANSFER_IN_USER=#{et.transferInUser},</if>
<if test= "et.transferInTime!=null" > TRANSFER_IN_TIME=#{et.transferInTime},</if>
<if test= "et.transferOutUser!=null" > TRANSFER_OUT_USER=#{et.transferOutUser},</if>
<if test= "et.transferOutTime!=null" > TRANSFER_OUT_TIME=#{et.transferOutTime},</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_WORK_SHOP_TRANSFER <trim prefix= "SET" suffixOverrides= "," >
SFC_DISPATCH_BO=#{et.sfcDispatchBo},
SITE=#{et.site},
TRANSFER_NO=#{et.transferNo},
WORK_CENTER=#{et.workCenter},
TRANSFER_WORK_CENTER=#{et.transferWorkCenter},
SFC=#{et.sfc},
SHOP_ORDER=#{et.shopOrder},
ITEM=#{et.item},
LAST_OPERATION=#{et.lastOperation},
STEP_ID=#{et.stepId},
OPERATION=#{et.operation},
LAST_OPERATION=#{et.lastOperation},
NEXT_OPERATION=#{et.nextOperation},
QTY=#{et.qty},
TYPE=#{et.type},
IS_OUT=#{et.isOut},
IS_IN=#{et.isIn},
IS_OUT_SOURCE=#{et.isOutSource},
COMMENTS=#{et.comments},
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>
MODIFY_USER=#{et.modifyUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
TRANSFER_IN_USER=#{et.transferInUser},
TRANSFER_IN_TIME=#{et.transferInTime},
TRANSFER_OUT_USER=#{et.transferOutUser},
TRANSFER_OUT_TIME=#{et.transferOutTime},
</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_WORK_SHOP_TRANSFER <trim prefix= "SET" suffixOverrides= "," >
<if test= "et.sfcDispatchBo!=null" > SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test= "et.site!=null" > SITE=#{et.site},</if>
<if test= "et.transferNo!=null" > TRANSFER_NO=#{et.transferNo},</if>
<if test= "et.workCenter!=null" > WORK_CENTER=#{et.workCenter},</if>
<if test= "et.transferWorkCenter!=null" > TRANSFER_WORK_CENTER=#{et.transferWorkCenter},</if>
<if test= "et.sfc!=null" > SFC=#{et.sfc},</if>
<if test= "et.shopOrder!=null" > SHOP_ORDER=#{et.shopOrder},</if>
<if test= "et.item!=null" > ITEM=#{et.item},</if>
<if test= "et.lastOperation!=null" > LAST_OPERATION=#{et.lastOperation},</if>
<if test= "et.stepId!=null" > STEP_ID=#{et.stepId},</if>
<if test= "et.operation!=null" > OPERATION=#{et.operation},</if>
<if test= "et.lastOperation!=null" > LAST_OPERATION=#{et.lastOperation},</if>
<if test= "et.nextOperation!=null" > NEXT_OPERATION=#{et.nextOperation},</if>
<if test= "et.qty!=null" > QTY=#{et.qty},</if>
<if test= "et.type!=null" > TYPE=#{et.type},</if>
<if test= "et.isOut!=null" > IS_OUT=#{et.isOut},</if>
<if test= "et.isIn!=null" > IS_IN=#{et.isIn},</if>
<if test= "et.isOutSource!=null" > IS_OUT_SOURCE=#{et.isOutSource},</if>
<if test= "et.comments!=null" > COMMENTS=#{et.comments},</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.transferInUser!=null" > TRANSFER_IN_USER=#{et.transferInUser},</if>
<if test= "et.transferInTime!=null" > TRANSFER_IN_TIME=#{et.transferInTime},</if>
<if test= "et.transferOutUser!=null" > TRANSFER_OUT_USER=#{et.transferOutUser},</if>
<if test= "et.transferOutTime!=null" > TRANSFER_OUT_TIME=#{et.transferOutTime},</if>
</trim>
<where >
<if test= "ew!=null" >
<if test= "ew.entity!=null" >
HANDLE=#{ew.entity.handle}
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.site!=null" > AND SITE=#{ew.entity.site}</if>
<if test= "ew.entity.transferNo!=null" > AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.transferWorkCenter!=null" > AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.item!=null" > AND ITEM=#{ew.entity.item}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.nextOperation!=null" > AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.isOut!=null" > AND IS_OUT=#{ew.entity.isOut}</if>
<if test= "ew.entity.isIn!=null" > AND IS_IN=#{ew.entity.isIn}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test= "ew.entity.comments!=null" > AND COMMENTS=#{ew.entity.comments}</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.transferInUser!=null" > AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test= "ew.entity.transferInTime!=null" > AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test= "ew.entity.transferOutUser!=null" > AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test= "ew.entity.transferOutTime!=null" > AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -457,20 +582,29 @@
<if test= "ew.entity.handle!=null" >
HANDLE=#{ew.entity.handle}
</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.site!=null" > AND SITE=#{ew.entity.site}</if>
<if test= "ew.entity.transferNo!=null" > AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.transferWorkCenter!=null" > AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.item!=null" > AND ITEM=#{ew.entity.item}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.stepId!=null" > AND STEP_ID=#{ew.entity.stepId}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.lastOperation!=null" > AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test= "ew.entity.nextOperation!=null" > AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test= "ew.entity.qty!=null" > AND QTY=#{ew.entity.qty}</if>
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.isOut!=null" > AND IS_OUT=#{ew.entity.isOut}</if>
<if test= "ew.entity.isIn!=null" > AND IS_IN=#{ew.entity.isIn}</if>
<if test= "ew.entity.isOutSource!=null" > AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test= "ew.entity.comments!=null" > AND COMMENTS=#{ew.entity.comments}</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.transferInUser!=null" > AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test= "ew.entity.transferInTime!=null" > AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test= "ew.entity.transferOutUser!=null" > AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test= "ew.entity.transferOutTime!=null" > AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -488,12 +622,58 @@
</foreach> )
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id= "getSfcData" resultMap= "FullResultMap" >
SELECT ZSD.STEP_ID,ZSD.RESRCE,ZSD.DISPATCH_NO,ZSD.WORK_CENTER,SC.SFC, SO.SHOP_ORDER,SO_CF3.VALUE "MAP", SO_CF2.VALUE WORK_ORDER,SO_CF.VALUE ITEM_NUMBER,SC.QTY, IM.ITEM, IT.DESCRIPTION ITEM_DESC, OP.OPERATION, OT.DESCRIPTION OPERATION_DESC,
CASE WHEN ST.STATUS='403' THEN '活动中' WHEN ST.STATUS='402' THEN '排队中' WHEN ST.STATUS='401' THEN '新建' ELSE TO_CHAR(ST.STATUS) END STATUS,RO_CF.VALUE IS_OUT_SOURCE
<select id= "getOutList" resultType= "com.foreverwin.mesnac.production.dto.WorkShopTransferDto" >
SELECT zsd.handle SFC_DISPATCH_BO,zsd.sfc, PREZSD.OPERATION LAST_OPERATION,PREZSD.WORK_CENTER TRANSFER_WORK_CENTER,zsd.WORK_CENTER,WCT.DESCRIPTION WORK_CENTER_DESC,zsd.SHOP_ORDER,c1.VALUE WORK_ORDER,IT.DESCRIPTION ITEM_DESC,ZSD.BLANKING_SIZE,SFC.QTY,PREOT.DESCRIPTION LAST_OPERATION_DESC,PREZSD.EMPLOYEE_DESCRIPTION,OT.DESCRIPTION OPERATION_DESC,
CASE WHEN ZWST.IS_IN='Y' THEN '已接收' WHEN ZWST.IS_OUT='Y' THEN '转序中' ELSE '待转出' END STATUS
FROM Z_SFC_DISPATCH zsd
JOIN sfc sfc ON sfc.sfc=zsd.sfc AND zsd.site=sfc.site
INNER JOIN SFC_ROUTING SG ON SG.SFC_BO = sfc.HANDLE
INNER JOIN SFC_ROUTER SR ON SR.SFC_ROUTING_BO = SG.HANDLE AND SR.IN_USE = 'true'
left JOIN SFC_STEP SP ON SP.SFC_ROUTER_BO = SR.HANDLE and sp.step_Id=zsd.STEP_ID
JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZSD.WORK_CENTER AND WC.SITE = zsd.SITE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = 'zh'
LEFT JOIN Z_SFC_DISPATCH PREZSD ON zsd.SFC=PREZSD.SFC AND PREZSD.DISPATCH_SEQ=TO_NUMBER(zsd.DISPATCH_SEQ)-1
LEFT JOIN Z_WORK_SHOP_TRANSFER ZWST ON zsd.HANDLE=zwst.SFC_DISPATCH_BO
INNER JOIN SHOP_ORDER SO ON SO.SITE = zsd.SITE AND SO.SHOP_ORDER = zsd.SHOP_ORDER
JOIN OPERATION OP ON OP.OPERATION = zsd.OPERATION AND OP.SITE = ZSD.SITE AND OP.CURRENT_REVISION = 'true'
JOIN OPERATION_T OT ON OT.OPERATION_BO = OP.HANDLE AND OT.LOCALE ='zh'
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN SFC SFC ON SFC.SITE = zsd.SITE AND SFC.SFC = zsd.SFC
INNER JOIN ITEM IM ON IM.HANDLE = SFC.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN OPERATION PREOP ON PREOP.OPERATION = zsd.PREPOSITION_OPERATION AND PREOP.SITE = ZSD.SITE AND PREOP.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T PREOT ON PREOT.OPERATION_BO = PREOP.HANDLE AND PREOT.LOCALE ='zh'
WHERE ZSD.SITE=#{site} AND zsd.DISPATCH_STATUS!='COMPLETE' AND zsd.DISPATCH_STATUS!='CANCEL'
<if test= "stepId!=null and stepId!=''" >
AND zsd.STEP_ID=#{stepId}
</if>
<if test= "workCenter!=null and workCenter!=''" >
AND PREZSD.WORK_CENTER=#{workCenter}
</if>
<if test= "transferWorkCenter!=null and transferWorkCenter!=''" >
AND ZSD.WORK_CENTER=#{transferWorkCenter}
</if>
<if test= "operation!=null and operation!=''" >
AND ZSD.OPERATION=#{operation}
</if>
<if test= "sfc!=null and sfc!=''" >
AND ZSD.sfc=#{sfc}
</if>
<if test= " 2 eq status " >
AND ZWST.IS_IN='Y' AND ZWST.IS_OUT='Y'
</if>
<if test= " 1 eq status " >
AND ZWST.IS_OUT='Y' AND ZWST.IS_IN IS NULL AND (SP.QTY_IN_QUEUE > 0 OR SP.QTY_IN_WORK > 0)
</if>
<if test= "0 eq status" >
AND ZWST.IS_OUT IS NULL AND ZWST.IS_IN IS NULL AND (SP.QTY_IN_QUEUE > 0 OR SP.QTY_IN_WORK > 0)
</if>
</select>
<select id= "getSfcData" resultType= "com.foreverwin.mesnac.production.dto.WorkShopTransferDto" >
SELECT ZSD.handle SFC_DISPATCH_BO,ZSD.STEP_ID,ZSD.RESRCE,ZSD.DISPATCH_NO,ZSD.WORK_CENTER,SC.SFC, SO.SHOP_ORDER, SO_CF2.VALUE WORK_ORDER,SO_CF.VALUE ITEM_NUMBER,SC.QTY, IM.ITEM, IT.DESCRIPTION ITEM_DESC, OP.OPERATION, OT.DESCRIPTION OPERATION_DESC,
ST.STATUS ,RO_CF.VALUE IS_OUT_SOURCE
FROM SFC SC
INNER JOIN SHOP_ORDER SO ON SO.HANDLE = SC.SHOP_ORDER_BO
LEFT JOIN CUSTOM_FIELDS SO_CF3 ON SO_CF3.HANDLE = SO.HANDLE AND SO_CF3."ATTRIBUTE" = 'MAP'
LEFT JOIN CUSTOM_FIELDS SO_CF2 ON SO_CF2.HANDLE = SO.HANDLE AND SO_CF2."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS SO_CF ON SO_CF.HANDLE = SO.HANDLE AND SO_CF."ATTRIBUTE" = 'ITEM_NUMBER'
INNER JOIN STATUS ST ON ST.HANDLE = SC.STATUS_BO AND ST.STATUS_GROUP = 'SFC'
@ -510,4 +690,45 @@
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
WHERE SC.SITE = #{site} AND SC.SFC = #{sfc}
</select>
<select id= "getInList" resultType= "com.foreverwin.mesnac.production.dto.WorkShopTransferDto" >
SELECT zsd.sfc,zsd.handle SFC_DISPATCH_BO,PREZSD.OPERATION NEXT_OPERATION,PREZSD.WORK_CENTER TRANSFER_WORK_CENTER,zsd.WORK_CENTER,WCT.DESCRIPTION WORK_CENTER_DESC,zsd.SHOP_ORDER,c1.VALUE WORK_ORDER,IT.DESCRIPTION ITEM_DESC,ZSD.BLANKING_SIZE,SFC.QTY,PREOT.DESCRIPTION LAST_OPERATION_DESC,PREZSD.EMPLOYEE_DESCRIPTION,OT.DESCRIPTION OPERATION_DESC,
CASE WHEN ZWST.IS_IN='Y' THEN '已接收' WHEN ZWST.IS_OUT='Y' THEN '转序中' ELSE NULL END STATUS
FROM Z_SFC_DISPATCH zsd
JOIN sfc sfc ON sfc.sfc=zsd.sfc AND zsd.site=sfc.site
INNER JOIN SFC_ROUTING SG ON SG.SFC_BO = sfc.HANDLE
INNER JOIN SFC_ROUTER SR ON SR.SFC_ROUTING_BO = SG.HANDLE AND SR.IN_USE = 'true'
left JOIN SFC_STEP SP ON SP.SFC_ROUTER_BO = SR.HANDLE and sp.step_Id=zsd.STEP_ID
JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZSD.WORK_CENTER AND WC.SITE = zsd.SITE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = 'zh'
LEFT JOIN Z_SFC_DISPATCH PREZSD ON zsd.SFC=PREZSD.SFC AND PREZSD.DISPATCH_SEQ=TO_NUMBER(zsd.DISPATCH_SEQ)+1
LEFT JOIN Z_WORK_SHOP_TRANSFER ZWST ON zsd.HANDLE=zwst.SFC_DISPATCH_BO
INNER JOIN SHOP_ORDER SO ON SO.SITE = zsd.SITE AND SO.SHOP_ORDER = zsd.SHOP_ORDER
JOIN OPERATION OP ON OP.OPERATION = zsd.OPERATION AND OP.SITE = ZSD.SITE AND OP.CURRENT_REVISION = 'true'
JOIN OPERATION_T OT ON OT.OPERATION_BO = OP.HANDLE AND OT.LOCALE ='zh'
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN SFC SFC ON SFC.SITE = zsd.SITE AND SFC.SFC = zsd.SFC
INNER JOIN ITEM IM ON IM.HANDLE = SFC.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN OPERATION PREOP ON PREOP.OPERATION = zsd.PREPOSITION_OPERATION AND PREOP.SITE = ZSD.SITE AND PREOP.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T PREOT ON PREOT.OPERATION_BO = PREOP.HANDLE AND PREOT.LOCALE ='zh'
WHERE ZSD.SITE=#{site} AND zsd.DISPATCH_STATUS!='COMPLETE' AND zsd.DISPATCH_STATUS!='CANCEL'
AND ZSD.WORK_CENTER=#{workCenter}
<if test= "transferWorkCenter!=null and transferWorkCenter!=''" >
AND PREZSD.WORK_CENTER=#{transferWorkCenter}
</if>
<if test= "transferNo!=null and transferNo!=''" >
AND ZWST.TRANSFER_NO=#{transferNo}
</if>
<if test= "sfc!=null and sfc!=''" >
AND ZSD.sfc=#{sfc}
</if>
<if test= "status eq 1" >
AND ZWST.IS_IN='Y' AND ZWST.IS_OUT='Y'
</if>
<if test= "status eq 0" >
AND ZWST.IS_OUT='Y' AND ZWST.IS_IN IS NULL AND (SP.QTY_IN_QUEUE > 0 OR SP.QTY_IN_WORK > 0)
</if>
</select>
</mapper>