|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.LogisticsTurnover">
|
|
|
|
|
<id column="HANDLE" property="handle" />
|
|
|
|
|
<result column="HANDLE" property="handle" />
|
|
|
|
|
<result column="SFC_DISPATCH_BO" property="sfcDispatchBo" />
|
|
|
|
|
<result column="STATUS" property="status" />
|
|
|
|
|
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
|
|
|
@ -15,22 +15,16 @@
|
|
|
|
|
<result column="OTHER3" property="other3" />
|
|
|
|
|
<result column="STORAGE_LOCATION" property="storageLocation" />
|
|
|
|
|
<result column="TURNOVER_WORK_CENTER" property="turnoverWorkCenter" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="FullResultMap" type="com.foreverwin.mesnac.meapi.dto.LogisticsDto">
|
|
|
|
|
|
|
|
|
|
<result column="COM_DATE_TIME" property="comDateTime" />
|
|
|
|
|
<result column="IS_RECEIVE" property="isReceive" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
HANDLE, SFC_DISPATCH_BO, STATUS, CREATED_DATE_TIME, USER, USER_NAME, OTHER1, OTHER2, OTHER3, STORAGE_LOCATION, TURNOVER_WORK_CENTER
|
|
|
|
|
HANDLE, SFC_DISPATCH_BO, STATUS, CREATED_DATE_TIME, USER, USER_NAME, OTHER1, OTHER2, OTHER3, STORAGE_LOCATION, TURNOVER_WORK_CENTER, COM_DATE_TIME, IS_RECEIVE
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
|
<select id="selectById" resultMap="BaseResultMap">
|
|
|
|
|
SELECT <include refid="Base_Column_List"></include> FROM Z_LOGISTICS_TURNOVER WHERE HANDLE=#{handle}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectByMap" resultMap="BaseResultMap">
|
|
|
|
|
SELECT <include refid="Base_Column_List"></include>
|
|
|
|
@ -46,12 +40,6 @@
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBatchIds" resultMap="BaseResultMap">
|
|
|
|
|
SELECT <include refid="Base_Column_List"></include>
|
|
|
|
|
FROM Z_LOGISTICS_TURNOVER WHERE HANDLE IN (
|
|
|
|
|
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
|
|
|
|
</foreach>)
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectOne" resultMap="BaseResultMap">
|
|
|
|
|
SELECT <include refid="Base_Column_List"></include> FROM Z_LOGISTICS_TURNOVER
|
|
|
|
@ -69,6 +57,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -90,6 +80,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -119,6 +111,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -148,6 +142,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -177,6 +173,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -206,6 +204,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -235,6 +235,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -245,39 +247,6 @@
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="queryLogisticsTurnoverList" resultMap="FullResultMap">
|
|
|
|
|
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
|
|
|
|
|
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'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.LogisticsTurnover">
|
|
|
|
|
INSERT INTO Z_LOGISTICS_TURNOVER
|
|
|
|
@ -293,6 +262,8 @@
|
|
|
|
|
<if test="other3!=null">OTHER3,</if>
|
|
|
|
|
<if test="storageLocation!=null">STORAGE_LOCATION,</if>
|
|
|
|
|
<if test="turnoverWorkCenter!=null">TURNOVER_WORK_CENTER,</if>
|
|
|
|
|
<if test="comDateTime!=null">COM_DATE_TIME,</if>
|
|
|
|
|
<if test="isReceive!=null">IS_RECEIVE,</if>
|
|
|
|
|
</trim> VALUES
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
#{handle},
|
|
|
|
@ -306,6 +277,8 @@
|
|
|
|
|
<if test="other3!=null">#{other3},</if>
|
|
|
|
|
<if test="storageLocation!=null">#{storageLocation},</if>
|
|
|
|
|
<if test="turnoverWorkCenter!=null">#{turnoverWorkCenter},</if>
|
|
|
|
|
<if test="comDateTime!=null">#{comDateTime},</if>
|
|
|
|
|
<if test="isReceive!=null">#{isReceive},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -326,44 +299,19 @@
|
|
|
|
|
#{other3},
|
|
|
|
|
#{storageLocation},
|
|
|
|
|
#{turnoverWorkCenter},
|
|
|
|
|
#{comDateTime},
|
|
|
|
|
#{isReceive},
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
</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_LOGISTICS_TURNOVER <trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
SFC_DISPATCH_BO=#{et.sfcDispatchBo},
|
|
|
|
|
STATUS=#{et.status},
|
|
|
|
|
CREATED_DATE_TIME=#{et.createdDateTime},
|
|
|
|
|
USER=#{et.user},
|
|
|
|
|
USER_NAME=#{et.userName},
|
|
|
|
|
OTHER1=#{et.other1},
|
|
|
|
|
OTHER2=#{et.other2},
|
|
|
|
|
OTHER3=#{et.other3},
|
|
|
|
|
STORAGE_LOCATION=#{et.storageLocation},
|
|
|
|
|
TURNOVER_WORK_CENTER=#{et.turnoverWorkCenter},
|
|
|
|
|
</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.handle!=null">HANDLE=#{et.handle},</if>
|
|
|
|
|
<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>
|
|
|
|
@ -374,6 +322,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
</trim>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="ew!=null">
|
|
|
|
@ -389,6 +339,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -400,9 +352,6 @@
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteById">
|
|
|
|
|
DELETE FROM Z_LOGISTICS_TURNOVER WHERE HANDLE=#{handle}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByMap">
|
|
|
|
|
DELETE FROM Z_LOGISTICS_TURNOVER
|
|
|
|
@ -435,6 +384,8 @@
|
|
|
|
|
<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>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -446,11 +397,54 @@
|
|
|
|
|
</if>
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBatchIds">
|
|
|
|
|
DELETE FROM Z_LOGISTICS_TURNOVER WHERE HANDLE IN (
|
|
|
|
|
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
|
|
|
|
</foreach>)
|
|
|
|
|
</delete>
|
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
|
|
|
|
|
|
<select id="queryNewtistTurnoverTask" resultType="com.foreverwin.mesnac.meapi.model.LogisticsTurnover">
|
|
|
|
|
SELECT
|
|
|
|
|
ZLT.HANDLE,
|
|
|
|
|
WCT.DESCRIPTION TURNOVER_WORK_CENTER
|
|
|
|
|
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 WC.HANDLE = WCT.WORK_CENTER_BO
|
|
|
|
|
WHERE
|
|
|
|
|
OTHER3=#{InspectionTaskNo}
|
|
|
|
|
</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
|
|
|
|
|
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'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|