@ -4,34 +4,34 @@
<!-- 通用查询映射结果 -->
<resultMap id= "BaseResultMap" type= "com.foreverwin.mesnac.meapi.model.LogisticsTurnover" >
<id column= "HANDLE" property= "handle" />
<result column= "SFC_DISPATCH_BO" property= "sfcDispatchBo" />
<result column= "STATUS" property= "status" />
<result column= "CREATED_DATE_TIME" property= "createdDateTime" />
<result column= "USER" property= "user" />
<result column= "USER_NAME" property= "userName" />
<result column= "OTHER1" property= "other1" />
<result column= "OTHER2" property= "other2" />
<result column= "OTHER3" property= "other3" />
<result column= "STORAGE_LOCATION" property= "storageLocation" />
<result column= "TURNOVER_WORK_CENTER" property= "turnoverWorkCenter" />
<result column= "COM_DATE_TIME" property= "comDateTime" />
<result column= "IS_RECEIVE" property= "isReceive" />
<result column= "TURNOUT_WORKCENTER" property= "turnoutWorkcenter" />
<result column= "TURNOUT_ITEM" property= "turnoutItem" />
<result column= "OTHER4" property= "other4" />
<result column= "OTHER5" property= "other5" />
<result column= "OTHER6" property= "other6" />
<result column= "NEXT_WORK_CENTER" property= "nextWorkcenter" />
<result column= "SHOP_ORDER" property= "shopOrder" />
<result column= "SFC" property= "sfc" />
<result column= "WORK_ORDER" property= "workOrder" />
<result column= "ITEM_DESC" property= "itemdesc" />
<result column= "ITEM_DESC" property= "itemdesc" />
<result column= "TEXTURE" property= "texture" />
<result column= "BLANKING_SIZE" property= "blankingSize" />
<result column= "QTY_TO_BUILD" property= "qtyToBuild" />
<id column= "HANDLE" property= "handle" />
<result column= "SFC_DISPATCH_BO" property= "sfcDispatchBo" />
<result column= "STATUS" property= "status" />
<result column= "CREATED_DATE_TIME" property= "createdDateTime" />
<result column= "USER" property= "user" />
<result column= "USER_NAME" property= "userName" />
<result column= "OTHER1" property= "other1" />
<result column= "OTHER2" property= "other2" />
<result column= "OTHER3" property= "other3" />
<result column= "STORAGE_LOCATION" property= "storageLocation" />
<result column= "TURNOVER_WORK_CENTER" property= "turnoverWorkCenter" />
<result column= "COM_DATE_TIME" property= "comDateTime" />
<result column= "IS_RECEIVE" property= "isReceive" />
<result column= "TURNOUT_WORKCENTER" property= "turnoutWorkcenter" />
<result column= "TURNOUT_ITEM" property= "turnoutItem" />
<result column= "OTHER4" property= "other4" />
<result column= "OTHER5" property= "other5" />
<result column= "OTHER6" property= "other6" />
<result column= "NEXT_WORK_CENTER" property= "nextWorkcenter" />
<result column= "SHOP_ORDER" property= "shopOrder" />
<result column= "SFC" property= "sfc" />
<result column= "WORK_ORDER" property= "workOrder" />
<result column= "ITEM_DESC" property= "itemdesc" />
<result column= "ITEM_DESC" property= "itemdesc" />
<result column= "TEXTURE" property= "texture" />
<result column= "BLANKING_SIZE" property= "blankingSize" />
<result column= "QTY_TO_BUILD" property= "qtyToBuild" />
</resultMap>
@ -46,7 +46,8 @@
</select>
<select id= "selectByMap" resultMap= "BaseResultMap" >
SELECT <include refid= "Base_Column_List" > </include>
SELECT
<include refid= "Base_Column_List" > </include>
FROM Z_LOGISTICS_TURNOVER
<if test= "cm!=null and !cm.isEmpty" >
<where >
@ -60,7 +61,8 @@
</select>
<select id= "selectBatchIds" resultMap= "BaseResultMap" >
SELECT <include refid= "Base_Column_List" > </include>
SELECT
<include refid= "Base_Column_List" > </include>
FROM Z_LOGISTICS_TURNOVER WHERE HANDLE IN (
<foreach item= "item" index= "index" collection= "coll" separator= "," > #{item}
</foreach> )
@ -70,25 +72,25 @@
SELECT <include refid= "Base_Column_List" > </include> FROM Z_LOGISTICS_TURNOVER
<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.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</where>
</select>
@ -97,26 +99,29 @@
<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.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</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.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -129,30 +134,40 @@
</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_LOGISTICS_TURNOVER
SELECT
<choose >
<when test= "ew != null and ew.sqlSelect != null" > ${ew.sqlSelect}</when>
<otherwise >
<include refid= "Base_Column_List" > </include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER
<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.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -165,30 +180,40 @@
</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_LOGISTICS_TURNOVER
SELECT
<choose >
<when test= "ew != null and ew.sqlSelect != null" > ${ew.sqlSelect}</when>
<otherwise >
<include refid= "Base_Column_List" > </include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER
<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.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -201,30 +226,40 @@
</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_LOGISTICS_TURNOVER
SELECT
<choose >
<when test= "ew != null and ew.sqlSelect != null" > ${ew.sqlSelect}</when>
<otherwise >
<include refid= "Base_Column_List" > </include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER
<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.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -252,7 +287,14 @@
</sql>
<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_LOGISTICS_TURNOVER ZLT
SELECT
<choose >
<when test= "ew != null and ew.sqlSelect != null" > ${ew.sqlSelect}</when>
<otherwise >
<include refid= "Base_Column_List" > </include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER ZLT
<where >
<if test= "ew!=null" >
@ -260,23 +302,26 @@
<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.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -289,30 +334,40 @@
</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_LOGISTICS_TURNOVER
SELECT
<choose >
<when test= "ew != null and ew.sqlSelect != null" > ${ew.sqlSelect}</when>
<otherwise >
<include refid= "Base_Column_List" > </include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER
<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.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -345,7 +400,8 @@
<if test= "other4!=null" > OTHER4,</if>
<if test= "other5!=null" > OTHER5,</if>
<if test= "other6!=null" > OTHER6,</if>
</trim> VALUES
</trim>
VALUES
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
#{handle},
<if test= "sfcDispatchBo!=null" > #{sfcDispatchBo},</if>
@ -372,7 +428,8 @@
INSERT INTO Z_LOGISTICS_TURNOVER
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
<include refid= "Base_Column_List" > </include>
</trim> VALUES
</trim>
VALUES
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
#{handle},
#{sfcDispatchBo},
@ -397,25 +454,32 @@
<update id= "updateById" >
UPDATE Z_LOGISTICS_TURNOVER <trim prefix= "SET" suffixOverrides= "," >
<if test= "et.sfcDispatchBo!=null" > SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test= "et.status!=null" > STATUS=#{et.status},</if>
<if test= "et.createdDateTime!=null" > CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test= "et.user!=null" > USER=#{et.user},</if>
<if test= "et.userName!=null" > USER_NAME=#{et.userName},</if>
<if test= "et.other1!=null" > OTHER1=#{et.other1},</if>
<if test= "et.other2!=null" > OTHER2=#{et.other2},</if>
<if test= "et.other3!=null" > OTHER3=#{et.other3},</if>
<if test= "et.storageLocation!=null" > STORAGE_LOCATION=#{et.storageLocation},</if>
<if test= "et.turnoverWorkCenter!=null" > TURNOVER_WORK_CENTER=#{et.turnoverWorkCenter},</if>
<if test= "et.comDateTime!=null" > COM_DATE_TIME=#{et.comDateTime},</if>
<if test= "et.isReceive!=null" > IS_RECEIVE=#{et.isReceive},</if>
<if test= "et.turnoutWorkcenter!=null" > TURNOUT_WORKCENTER=#{et.turnoutWorkcenter},</if>
<if test= "et.turnoutItem!=null" > TURNOUT_ITEM=#{et.turnoutItem},</if>
<if test= "et.other4!=null" > OTHER4=#{et.other4},</if>
<if test= "et.other5!=null" > OTHER5=#{et.other5},</if>
<if test= "et.other6!=null" > OTHER6=#{et.other6},</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 Z_LOGISTICS_TURNOVER
<trim prefix= "SET" suffixOverrides= "," >
<if test= "et.sfcDispatchBo!=null" > SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test= "et.status!=null" > STATUS=#{et.status},</if>
<if test= "et.createdDateTime!=null" > CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test= "et.user!=null" > USER=#{et.user},</if>
<if test= "et.userName!=null" > USER_NAME=#{et.userName},</if>
<if test= "et.other1!=null" > OTHER1=#{et.other1},</if>
<if test= "et.other2!=null" > OTHER2=#{et.other2},</if>
<if test= "et.other3!=null" > OTHER3=#{et.other3},</if>
<if test= "et.storageLocation!=null" > STORAGE_LOCATION=#{et.storageLocation},</if>
<if test= "et.turnoverWorkCenter!=null" > TURNOVER_WORK_CENTER=#{et.turnoverWorkCenter},</if>
<if test= "et.comDateTime!=null" > COM_DATE_TIME=#{et.comDateTime},</if>
<if test= "et.isReceive!=null" > IS_RECEIVE=#{et.isReceive},</if>
<if test= "et.turnoutWorkcenter!=null" > TURNOUT_WORKCENTER=#{et.turnoutWorkcenter},</if>
<if test= "et.turnoutItem!=null" > TURNOUT_ITEM=#{et.turnoutItem},</if>
<if test= "et.other4!=null" > OTHER4=#{et.other4},</if>
<if test= "et.other5!=null" > OTHER5=#{et.other5},</if>
<if test= "et.other6!=null" > OTHER6=#{et.other6},</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>
@ -438,51 +502,60 @@
OTHER4=#{et.other4},
OTHER5=#{et.other5},
OTHER6=#{et.other6},
</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>
</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_LOGISTICS_TURNOVER <trim prefix= "SET" suffixOverrides= "," >
<if test= "et.sfcDispatchBo!=null" > SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test= "et.status!=null" > STATUS=#{et.status},</if>
<if test= "et.createdDateTime!=null" > CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test= "et.user!=null" > USER=#{et.user},</if>
<if test= "et.userName!=null" > USER_NAME=#{et.userName},</if>
<if test= "et.other1!=null" > OTHER1=#{et.other1},</if>
<if test= "et.other2!=null" > OTHER2=#{et.other2},</if>
<if test= "et.other3!=null" > OTHER3=#{et.other3},</if>
<if test= "et.storageLocation!=null" > STORAGE_LOCATION=#{et.storageLocation},</if>
<if test= "et.turnoverWorkCenter!=null" > TURNOVER_WORK_CENTER=#{et.turnoverWorkCenter},</if>
<if test= "et.comDateTime!=null" > COM_DATE_TIME=#{et.comDateTime},</if>
<if test= "et.isReceive!=null" > IS_RECEIVE=#{et.isReceive},</if>
<if test= "et.turnoutWorkcenter!=null" > TURNOUT_WORKCENTER=#{et.turnoutWorkcenter},</if>
<if test= "et.turnoutItem!=null" > TURNOUT_ITEM=#{et.turnoutItem},</if>
<if test= "et.other4!=null" > OTHER4=#{et.other4},</if>
<if test= "et.other5!=null" > OTHER5=#{et.other5},</if>
<if test= "et.other6!=null" > OTHER6=#{et.other6},</if>
</trim>
UPDATE Z_LOGISTICS_TURNOVER
<trim prefix= "SET" suffixOverrides= "," >
<if test= "et.sfcDispatchBo!=null" > SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test= "et.status!=null" > STATUS=#{et.status},</if>
<if test= "et.createdDateTime!=null" > CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test= "et.user!=null" > USER=#{et.user},</if>
<if test= "et.userName!=null" > USER_NAME=#{et.userName},</if>
<if test= "et.other1!=null" > OTHER1=#{et.other1},</if>
<if test= "et.other2!=null" > OTHER2=#{et.other2},</if>
<if test= "et.other3!=null" > OTHER3=#{et.other3},</if>
<if test= "et.storageLocation!=null" > STORAGE_LOCATION=#{et.storageLocation},</if>
<if test= "et.turnoverWorkCenter!=null" > TURNOVER_WORK_CENTER=#{et.turnoverWorkCenter},</if>
<if test= "et.comDateTime!=null" > COM_DATE_TIME=#{et.comDateTime},</if>
<if test= "et.isReceive!=null" > IS_RECEIVE=#{et.isReceive},</if>
<if test= "et.turnoutWorkcenter!=null" > TURNOUT_WORKCENTER=#{et.turnoutWorkcenter},</if>
<if test= "et.turnoutItem!=null" > TURNOUT_ITEM=#{et.turnoutItem},</if>
<if test= "et.other4!=null" > OTHER4=#{et.other4},</if>
<if test= "et.other5!=null" > OTHER5=#{et.other5},</if>
<if test= "et.other6!=null" > OTHER6=#{et.other6},</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.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -519,23 +592,26 @@
<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.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -568,59 +644,59 @@
</select>
<select id= "queryLogisticsTurnoverList" resultType= "com.foreverwin.mesnac.meapi.dto.LogisticsDto" >
SELECT
WCT.DESCRIPTION NEXT_WORK_CENTER,
ZSD.SFC,
C1.VALUE WORK_ORDER,
IT.DESCRIPTION ITEM_DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION OVER_OPERATION,
OT.DESCRIPTION NEXT_OPERATION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME
FROM
Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
LEFT JOIN OPERATION O1 ON O1.OPERATION = ZSD.OPERATION
LEFT JOIN OPERATION_T OT1 ON OT1.OPERATION_BO = O1.HANDLE
LEFT JOIN OPERATION O ON O.OPERATION = ZLT.OTHER1
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE
AND SO.SHOP_ORDER = ZSD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE
AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = ZSD.SITE
AND O.OPERATION = ZSD.OPERATION
AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
AND OT.LOCALE = 'zh'
WHERE ZLT.STATUS = 'NEW'
<if test= "HJHJ!=null" > AND ZLT.TURNOUT_ITEM like '02%' AND ZLT.TURNOUT_WORKCENTER = 'HJ' </if>
<if test= "HJXL!=null" > AND ZLT.TURNOUT_ITEM like '03%' AND ZLT.TURNOUT_WORKCENTER = 'HJ' </if>
<if test= "JJ!=null" > AND ZLT.TURNOUT_WORKCENTER = 'JJ' </if>
<if test= "WX!=null" > AND ZLT.TURNOUT_WORKCENTER = 'WX' </if>
<if test= "RC!=null" > AND ZLT.TURNOUT_WORKCENTER = 'RC' </if>
<if test= "ZP!=null" > AND ZLT.TURNOUT_WORKCENTER = 'ZP' </if>
GROUP BY WCT.DESCRIPTION,
ZSD.SFC,
C1.VALUE,
IT.DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION,
OT.DESCRIPTION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME
ORDER BY ZLT.CREATED_DATE_TIME DESC
SELECT
WCT.DESCRIPTION NEXT_WORK_CENTER,
ZSD.SFC,
C1.VALUE WORK_ORDER,
IT.DESCRIPTION ITEM_DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION OVER_OPERATION,
OT.DESCRIPTION NEXT_OPERATION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME
FROM
Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
LEFT JOIN OPERATION O1 ON O1.OPERATION = ZSD.OPERATION
LEFT JOIN OPERATION_T OT1 ON OT1.OPERATION_BO = O1.HANDLE
LEFT JOIN OPERATION O ON O.OPERATION = ZLT.OTHER1
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE
AND SO.SHOP_ORDER = ZSD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE
AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = ZSD.SITE
AND O.OPERATION = ZSD.OPERATION
AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
AND OT.LOCALE = 'zh'
WHERE ZLT.STATUS = 'NEW'
<if test= "HJHJ!=null" > AND ZLT.TURNOUT_ITEM like '02%' AND ZLT.TURNOUT_WORKCENTER = 'HJ'</if>
<if test= "HJXL!=null" > AND ZLT.TURNOUT_ITEM like '03%' AND ZLT.TURNOUT_WORKCENTER = 'HJ'</if>
<if test= "JJ!=null" > AND ZLT.TURNOUT_WORKCENTER = 'JJ'</if>
<if test= "WX!=null" > AND ZLT.TURNOUT_WORKCENTER = 'WX'</if>
<if test= "RC!=null" > AND ZLT.TURNOUT_WORKCENTER = 'RC'</if>
<if test= "ZP!=null" > AND ZLT.TURNOUT_WORKCENTER = 'ZP'</if>
GROUP BY WCT.DESCRIPTION,
ZSD.SFC,
C1.VALUE,
IT.DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION,
OT.DESCRIPTION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME
ORDER BY ZLT.CREATED_DATE_TIME DESC
</select>
<sql id= "Select_LogisticsTurnOver_List" >
WCT.DESCRIPTION NEXT_WORK_CENTER,
@ -636,7 +712,7 @@
ZLT.CREATED_DATE_TIME
</sql>
<select id= "selectLogisticsDtoPage" resultType= "com.foreverwin.mesnac.meapi.dto.LogisticsDto" >
SELECT <include refid= "Select_LogisticsTurnOver_List" > </include> FROM Z_LOGISTICS_TURNOVER ZLT
SELECT <include refid= "Select_LogisticsTurnOver_List" > </include> FROM Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
@ -662,23 +738,26 @@
<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.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
<if test= "ew.entity.sfcDispatchBo!=null" > AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test= "ew.entity.status!=null" > AND STATUS=#{ew.entity.status}</if>
<if test= "ew.entity.createdDateTime!=null" > AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test= "ew.entity.user!=null" > AND USER=#{ew.entity.user}</if>
<if test= "ew.entity.userName!=null" > AND USER_NAME=#{ew.entity.userName}</if>
<if test= "ew.entity.other1!=null" > AND OTHER1=#{ew.entity.other1}</if>
<if test= "ew.entity.other2!=null" > AND OTHER2=#{ew.entity.other2}</if>
<if test= "ew.entity.other3!=null" > AND OTHER3=#{ew.entity.other3}</if>
<if test= "ew.entity.storageLocation!=null" > AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test= "ew.entity.turnoverWorkCenter!=null" > AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test= "ew.entity.comDateTime!=null" > AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test= "ew.entity.isReceive!=null" > AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test= "ew.entity.turnoutWorkcenter!=null" > AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test= "ew.entity.turnoutItem!=null" > AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test= "ew.entity.other4!=null" > AND OTHER4=#{ew.entity.other4}</if>
<if test= "ew.entity.other5!=null" > AND OTHER5=#{ew.entity.other5}</if>
<if test= "ew.entity.other6!=null" > AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test= "ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere" >
${ew.sqlSegment}
@ -690,60 +769,114 @@
</if>
</select>
<select id= "selectlogisticsturnoverlist" resultType= "com.foreverwin.mesnac.meapi.dto.LogisticsDto" parameterType= "com.foreverwin.mesnac.meapi.dto.LogisticsDto" >
SELECT distinct
ZLT.HANDLE,
WCT.DESCRIPTION NEXT_WORK_CENTER,
ZSD.SFC,
C1.VALUE WORK_ORDER,
IT.DESCRIPTION ITEM_DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION OVER_OPERATION,
OT.DESCRIPTION NEXT_OPERATION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME,
C2.VALUE TEXTURE,
SO.QTY_TO_BUILD,
SO.SHOP_ORDER,
ZL.DESCRIPTION ZL_DESCRIPTION,
CASE WHEN ZLT.STATUS = 'NEW' THEN '待转运' ELSE '转运完成' END STATUS,
CASE WHEN ZLT.IS_RECEIVE = 'Y' THEN '已接收' ELSE '未接收' END IS_RECEIVE,
ZLT.OTHER5 COMFIRM_USER
FROM
Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
LEFT JOIN OPERATION O1 ON O1.OPERATION = ZSD.OPERATION
LEFT JOIN OPERATION_T OT1 ON OT1.OPERATION_BO = O1.HANDLE
LEFT JOIN OPERATION O ON O.OPERATION = ZLT.OTHER1
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
LEFT JOIN Z_LOCATION ZL ON ZL.LOCATION_CODE = ZLT.STORAGE_LOCATION
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE
AND SO.SHOP_ORDER = ZSD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE
AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = IM.HANDLE AND C2.ATTRIBUTE = 'TEXTTURE'
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = ZSD.SITE
AND O.OPERATION = ZSD.OPERATION
AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
AND OT.LOCALE = 'zh'
<select id= "selectlogisticsturnoverlist" resultType= "com.foreverwin.mesnac.meapi.dto.LogisticsDto"
parameterType="com.foreverwin.mesnac.meapi.dto.LogisticsDto">
SELECT distinct
ZLT.HANDLE,
WCT.DESCRIPTION NEXT_WORK_CENTER,
ZSD.SFC,
C1.VALUE WORK_ORDER,
IT.DESCRIPTION ITEM_DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION OVER_OPERATION,
OT.DESCRIPTION NEXT_OPERATION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME,
C2.VALUE TEXTURE,
SO.QTY_TO_BUILD,
SO.SHOP_ORDER,
ZL.DESCRIPTION ZL_DESCRIPTION,
CASE WHEN ZLT.STATUS = 'NEW' THEN '待转运' ELSE '转运完成' END STATUS,
CASE WHEN ZLT.IS_RECEIVE = 'Y' THEN '已接收' ELSE '未接收' END IS_RECEIVE,
ZLT.OTHER5 COMFIRM_USER
FROM
Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
LEFT JOIN OPERATION O1 ON O1.OPERATION = ZSD.OPERATION
LEFT JOIN OPERATION_T OT1 ON OT1.OPERATION_BO = O1.HANDLE
LEFT JOIN OPERATION O ON O.OPERATION = ZLT.OTHER1
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
LEFT JOIN Z_LOCATION ZL ON ZL.LOCATION_CODE = ZLT.STORAGE_LOCATION
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE
AND SO.SHOP_ORDER = ZSD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE
AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = IM.HANDLE AND C2.ATTRIBUTE = 'TEXTTURE'
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = ZSD.SITE
AND O.OPERATION = ZSD.OPERATION
AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
AND OT.LOCALE = 'zh'
<where >
<if test= "status!=null" > AND STATUS=#{status}</if>
<if test= "nextWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{nextWorkCenter}</if>
<if test= "isReceive!=null" > AND IS_RECEIVE=#{isReceive}</if>
<if test= "turnoutItem!=null" > AND TURNOUT_ITEM=#{turnoutItem}</if>
<if test= "itemDescription!=null" > AND IT.DESCRIPTION LIKE '%'||#{itemDescription}||'%'</if>
<if test= "workOrder!=null" > AND C1.VALUE LIKE '%'||#{workOrder}||'%'</if>
<if test= "status!=null" > AND STATUS=#{status}</if>
<if test= "nextWorkCenter!=null" > AND TURNOVER_WORK_CENTER=#{nextWorkCenter}</if>
<if test= "isReceive!=null" > AND IS_RECEIVE=#{isReceive}</if>
<if test= "turnoutItem!=null" > AND TURNOUT_ITEM=#{turnoutItem}</if>
<if test= "itemDescription!=null" > AND IT.DESCRIPTION LIKE '%'||#{itemDescription}||'%'</if>
<if test= "workOrder!=null" > AND C1.VALUE LIKE '%'||#{workOrder}||'%'</if>
</where>
</select>
<resultMap id= "StoreSfcInfoM" type= "com.foreverwin.mesnac.meapi.model.StoreSfcInfo" >
<result column= "SFC" property= "sfc" />
<result column= "DISPATCH_QTY" property= "dispatch_qty" />
<result column= "ITEM_BO" property= "item_bo" />
<result column= "DESCRIPTION" property= "description" />
<result column= "WORK_ORDER" property= "work_order" />
<result column= "ITEM_NUMBER" property= "item_number" />
<result column= "zs_qty" property= "zs_qty" />
<result column= "ls_qty" property= "ls_qty" />
</resultMap>
<select id= "storeSelectSfc" resultMap= "StoreSfcInfoM" >
SELECT *
FROM (SELECT zsd.sfc,
DISPATCH_QTY,
so.SHOP_ORDER,
substr(it.ITEM_BO,
instr(it.ITEM_BO, ',', 1, 1) + 1,
instr(it.ITEM_BO, ',', 1, 2) - instr(it.ITEM_BO, ',', 1, 1) - 1) as ITEM_BO,
it.DESCRIPTION,
ATTRIBUTE,
VALUE ,
IN_QTY,
IN_TYPE
FROM (select *
from (SELECT sfc, DISPATCH_QTY, SHOP_ORDER
FROM Z_SFC_DISPATCH
WHERE SFC = #{sfc}
ORDER BY ACTUAL_COMPLETE_DATE DESC)
where ROWNUM = 1) zsd
left join SHOP_ORDER so on so.SHOP_ORDER = zsd.SHOP_ORDER
left join ITEM_T it on it.ITEM_BO = so.ITEM_BO
LEFT JOIN CUSTOM_FIELDS cf
ON cf.HANDLE = SO.HANDLE AND cf.ATTRIBUTE in ('WORK_ORDER', 'ITEM_NUMBER')
left join STORE_RECORD_IN ri on ri.SFC = zsd.SFC
) a PIVOT (max(VALUE) FOR ATTRIBUTE IN ('WORK_ORDER' AS WORK_ORDER,'ITEM_NUMBER' AS ITEM_NUMBER))
PIVOT (sum(IN_QTY) FOR IN_TYPE IN ('0' AS zs_qty,'1' AS ls_qty) )
</select>
<insert id= "insertRecordInStore" >
INSERT INTO WIP.STORE_RECORD_IN (SFC, IN_QTY, STORE_LOCATION, WORK_USER, IN_TYPE)
VALUES (#{sfc}, #{qty}, #{storeLocation}, #{user}, #{inStoreType})
</insert>
<select id= "countLedgerBySfc" resultType= "integer" >
select count(1) from STORE_RECORD_LEDGER where SFC=#{sfc}
</select>
<insert id= "insertRecordLedger" >
INSERT INTO WIP.STORE_RECORD_LEDGER (SFC, IN_QTY, STORE_LOCATION) VALUES (#{sfc}, #{qty}, #{storeLocation})
</insert>
<update id= "updateRecordLedger" >
update WIP.STORE_RECORD_LEDGER set IN_QTY=IN_QTY+#{qty} where SFC=#{sfc}
</update>
</mapper>