|
|
@ -6,31 +6,32 @@
|
|
|
|
SELECT INTEGRATION_TYPE, CATEGORY, INTEGRATION_WAY,STATUS,REQUEST_DATE_TIME,TO_CHAR(RESULT_MESSAGE) RESULT_MESSAGE,TO_CHAR(PARAM) PARAM
|
|
|
|
SELECT INTEGRATION_TYPE, CATEGORY, INTEGRATION_WAY,STATUS,REQUEST_DATE_TIME,TO_CHAR(RESULT_MESSAGE) RESULT_MESSAGE,TO_CHAR(PARAM) PARAM
|
|
|
|
FROM Z_INTEGRATION_LOG
|
|
|
|
FROM Z_INTEGRATION_LOG
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
SITE = #{integration.site}
|
|
|
|
SITE = #{site}
|
|
|
|
<if test="integration.integrationType != null and integration.integrationType != ''">
|
|
|
|
<if test="param.integrationType != null and param.integrationType != ''">
|
|
|
|
AND INTEGRATION_TYPE = #{integration.integrationType}
|
|
|
|
AND INTEGRATION_TYPE = #{param.integrationType}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="integration.integrationWay != null and integration.integrationWay != ''">
|
|
|
|
<if test="param.integrationWay != null and param.integrationWay != ''">
|
|
|
|
AND INTEGRATION_WAY = #{integration.integrationWay}
|
|
|
|
AND INTEGRATION_WAY = #{param.integrationWay}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="integration.status != null and integration.status != ''">
|
|
|
|
<if test="param.status != null and param.status != ''">
|
|
|
|
AND STATUS = #{integration.status}
|
|
|
|
AND STATUS = #{param.status}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="integration.startDateTime != null">
|
|
|
|
<if test="param.startDateTime != null">
|
|
|
|
AND REQUEST_DATE_TIME >= #{integration.startDateTime}
|
|
|
|
AND REQUEST_DATE_TIME >= TO_DATE(#{param.startDateTime}, 'YYYY-MM-DD HH24:MI:SS')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="integration.endDateTime != null">
|
|
|
|
<if test="param.endDateTime != null">
|
|
|
|
AND REQUEST_DATE_TIME <= #{integration.endDateTime}
|
|
|
|
AND REQUEST_DATE_TIME <= TO_DATE(#{param.endDateTime}, 'YYYY-MM-DD HH24:MI:SS')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="integration.param != null and integration.param != ''">
|
|
|
|
<if test="param.param != null and param.param != ''">
|
|
|
|
AND PARAM LIKE '%${integration.param}%'
|
|
|
|
AND PARAM LIKE '%${param.param}%'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
ORDER BY REQUEST_DATE_TIME DESC
|
|
|
|
ORDER BY REQUEST_DATE_TIME DESC
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="partsManufacturing" resultType="Map">
|
|
|
|
<select id="partsManufacturing" resultType="Map">
|
|
|
|
SELECT CF.VALUE ITEM_NUMBER,ZSD.SHOP_ORDER SHOP_ORDER,I.ITEM ITEM,IT.DESCRIPTION ITEM_DESCRIPTION,SO.QTY_TO_BUILD SHOP_ORDER_QTY , ZSD.OPERATION ,OT.DESCRIPTION OPERATION_DESCRIPTION,
|
|
|
|
SELECT CF.VALUE ITEM_NUMBER,ZSD.SHOP_ORDER SHOP_ORDER,I.ITEM ITEM,IT.DESCRIPTION ITEM_DESCRIPTION,
|
|
|
|
|
|
|
|
SO.QTY_TO_BUILD SHOP_ORDER_QTY , ZSD.OPERATION ,OT.DESCRIPTION OPERATION_DESCRIPTION,
|
|
|
|
ZNU.FULL_NAME OPERATION_USER,ZSD.SFC SFC,ZSD.DISPATCH_STATUS ,
|
|
|
|
ZNU.FULL_NAME OPERATION_USER,ZSD.SFC SFC,ZSD.DISPATCH_STATUS ,
|
|
|
|
ZSD.EARLIEST_START_DATE EARLIEST_START_DATE,ZSD.LATEST_END_DATE LATEST_END_DATE,
|
|
|
|
ZSD.EARLIEST_START_DATE EARLIEST_START_DATE,ZSD.LATEST_END_DATE LATEST_END_DATE,
|
|
|
|
ZSD.ACTUAL_START_DATE ACTUAL_START_DATE,ZSD.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE
|
|
|
|
ZSD.ACTUAL_START_DATE ACTUAL_START_DATE,ZSD.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE
|
|
|
@ -48,24 +49,24 @@
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = S.SHOP_ORDER_BO AND CF."ATTRIBUTE" = 'ITEM_NUMBER'
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = S.SHOP_ORDER_BO AND CF."ATTRIBUTE" = 'ITEM_NUMBER'
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
S.SITE = #{site}
|
|
|
|
S.SITE = #{site}
|
|
|
|
<if test="partsManufacturing != null">
|
|
|
|
<if test="param != null">
|
|
|
|
<if test="partsManufacturing.itemNumber != null and partsManufacturing.itemNumber != ''">
|
|
|
|
<if test="param.itemNumber != null and partparamsManufacturing.itemNumber != ''">
|
|
|
|
AND CF.VALUE LIKE '%${partsManufacturing.itemNumber}%'
|
|
|
|
AND CF.VALUE LIKE '%${param.itemNumber}%'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="partsManufacturing.shopOrder != null and partsManufacturing.shopOrder != ''">
|
|
|
|
<if test="param.shopOrder != null and param.shopOrder != ''">
|
|
|
|
AND ZSD.SHOP_ORDER LIKE '%${partsManufacturing.shopOrder}%'
|
|
|
|
AND ZSD.SHOP_ORDER LIKE '%${param.shopOrder}%'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="partsManufacturing.item != null and partsManufacturing.item != ''">
|
|
|
|
<if test="param.item != null and param.item != ''">
|
|
|
|
AND I.ITEM LIKE '%${partsManufacturing.item}%'
|
|
|
|
AND I.ITEM LIKE '%${param.item}%'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="partsManufacturing.itemDescription != null and partsManufacturing.itemDescription != ''">
|
|
|
|
<if test="param.itemDescription != null and param.itemDescription != ''">
|
|
|
|
AND IT.DESCRIPTION LIKE '%${partsManufacturing.itemDescription}%'
|
|
|
|
AND IT.DESCRIPTION LIKE '%${param.itemDescription}%'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="partsManufacturing.startDateTime != null">
|
|
|
|
<if test="param.startDateTime != null">
|
|
|
|
AND ZSD.ACTUAL_START_DATE >= #{partsManufacturing.startDateTime}
|
|
|
|
AND ZSD.ACTUAL_START_DATE >= TO_DATE(#{param.startDateTime}, 'YYYY-MM-DD HH24:MI:SS')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="partsManufacturing.endDateTime != null">
|
|
|
|
<if test="param.endDateTime != null">
|
|
|
|
AND ZSD.ACTUAL_COMPLETE_DATE <= #{partsManufacturing.endDateTime}
|
|
|
|
AND ZSD.ACTUAL_COMPLETE_DATE <= TO_DATE(#{param.endDateTime}, 'YYYY-MM-DD HH24:MI:SS')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
@ -73,7 +74,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<select id="surplusReturnTable" resultType="map">
|
|
|
|
<select id="surplusReturnTable" resultType="map">
|
|
|
|
SELECT ZSR.INVENTORY INVENTORY,ZSR.ITEM_BO ITEM_BO,IT.DESCRIPTION ITEM_DESCRIPTION,ZSR.LENGHT LENGHT,
|
|
|
|
SELECT ZSR.INVENTORY INVENTORY,ZSR.ITEM_BO ITEM_BO,IT.DESCRIPTION ITEM_DESCRIPTION,ZSR.LENGHT LENGHT,
|
|
|
|
ZSR.WIDTH WIDTH,ZSR.NUMBERS NUMBERS,ZSR.QTY QTY,ZSR.CREATED_DATE_TIME CREATED_DATE_TIME
|
|
|
|
ZSR.WIDTH WIDTH,ZSR.NUMBERS NUMBERS,ZSR.QTY QTY,ZSR.CREATED_DATE_TIME CREATED_DATE_TIME,I.ITEM ITEM
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
Z_SURPLUS_RETURN ZSR
|
|
|
|
Z_SURPLUS_RETURN ZSR
|
|
|
|
INNER JOIN ITEM I ON I.HANDLE = ZSR.ITEM_BO
|
|
|
|
INNER JOIN ITEM I ON I.HANDLE = ZSR.ITEM_BO
|
|
|
@ -100,7 +101,7 @@
|
|
|
|
END WORK_CENTER_DESCRIPTION,
|
|
|
|
END WORK_CENTER_DESCRIPTION,
|
|
|
|
ZRRT.RESOURCE_NO,R.DESCRIPTION RESOURCE_DESCRIPTION,ZRRT.NC_CODE_NO, /*不良代码描述,维修人员*/
|
|
|
|
ZRRT.RESOURCE_NO,R.DESCRIPTION RESOURCE_DESCRIPTION,ZRRT.NC_CODE_NO, /*不良代码描述,维修人员*/
|
|
|
|
ZRRT.PRELIMINARY_REASON ,ZRRT.DEAL_WAY ,ZRRT.DEAL_WAY_DESCRIPTION ,
|
|
|
|
ZRRT.PRELIMINARY_REASON ,ZRRT.DEAL_WAY ,ZRRT.DEAL_WAY_DESCRIPTION ,
|
|
|
|
ZRITS.ITEM_BO ITEM_BO,
|
|
|
|
I.ITEM ITEM,
|
|
|
|
CASE WHEN ZRITS.ITEM_BO != 'NULL' THEN IT.DESCRIPTION
|
|
|
|
CASE WHEN ZRITS.ITEM_BO != 'NULL' THEN IT.DESCRIPTION
|
|
|
|
ELSE ZRITS.DESCRIPTION
|
|
|
|
ELSE ZRITS.DESCRIPTION
|
|
|
|
END ITEM_DESCRIPTION,
|
|
|
|
END ITEM_DESCRIPTION,
|
|
|
@ -123,6 +124,7 @@
|
|
|
|
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
|
|
|
|
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
|
|
|
|
LEFT JOIN WORK_CENTER_T WCT2 ON WCT2.WORK_CENTER_BO = WC2.HANDLE AND WCT2.LOCALE = #{locale}
|
|
|
|
LEFT JOIN WORK_CENTER_T WCT2 ON WCT2.WORK_CENTER_BO = WC2.HANDLE AND WCT2.LOCALE = #{locale}
|
|
|
|
LEFT JOIN Z_RESOURCE_INSPECT_TASK_SPARE ZRITS ON ZRITS.RESOURCE_INSPECT_TASK_BO = ZRRT.HANDLE
|
|
|
|
LEFT JOIN Z_RESOURCE_INSPECT_TASK_SPARE ZRITS ON ZRITS.RESOURCE_INSPECT_TASK_BO = ZRRT.HANDLE
|
|
|
|
|
|
|
|
LEFT JOIN ITEM I ON I.HANDLE = ZRITS.ITEM_BO
|
|
|
|
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = ZRITS.ITEM_BO AND IT.LOCALE = #{locale}
|
|
|
|
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = ZRITS.ITEM_BO AND IT.LOCALE = #{locale}
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = ZRITS.ITEM_BO AND CF."ATTRIBUTE" = 'MAT_SPEC'
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = ZRITS.ITEM_BO AND CF."ATTRIBUTE" = 'MAT_SPEC'
|
|
|
|
|
|
|
|
|
|
|
|