|
|
@ -883,11 +883,14 @@
|
|
|
|
<!--批量获取维修任务-->
|
|
|
|
<!--批量获取维修任务-->
|
|
|
|
<select id="findResourceRepairTaskList" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
|
|
|
|
<select id="findResourceRepairTaskList" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
|
|
|
|
SELECT DISTINCT RRT.*, ZNU.FULL_NAME AS REPORT_USER_NAME, R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
|
|
|
|
SELECT DISTINCT RRT.*, ZNU.FULL_NAME AS REPORT_USER_NAME, R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
|
|
|
|
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,
|
|
|
|
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,NCT.DESCRIPTION AS CANCEL_CODE_DESCRIPTION, ZNU2.FULL_NAME AS CANCEL_USER_NAME,
|
|
|
|
WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
|
|
|
|
WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
WIP.Z_RESOURCE_REPAIR_TASK RRT
|
|
|
|
WIP.Z_RESOURCE_REPAIR_TASK RRT
|
|
|
|
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = RRT.REPORT_USER
|
|
|
|
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = RRT.REPORT_USER
|
|
|
|
|
|
|
|
LEFT JOIN NC_CODE NC ON NC.NC_CODE = RRT.CANCEL_CODE
|
|
|
|
|
|
|
|
LEFT JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
|
|
|
|
|
|
|
|
LEFT JOIN Z_NWA_USER ZNU2 ON ZNU2.USER_NAME = RRT.CANCEL_USER
|
|
|
|
INNER JOIN WIP.RESRCE R ON RRT.SITE = R.SITE AND R.RESRCE = RRT.RESOURCE_NO
|
|
|
|
INNER JOIN WIP.RESRCE R ON RRT.SITE = R.SITE AND R.RESRCE = RRT.RESOURCE_NO
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO
|
|
|
@ -921,14 +924,20 @@
|
|
|
|
<if test="compareEndDate != null and compareEndDate != ''">
|
|
|
|
<if test="compareEndDate != null and compareEndDate != ''">
|
|
|
|
AND RRT.PLAN_START_DATE <= (TO_DATE( #{compareEndDate},'yyyy-MM-dd hh24:mi-ss' ) - 8/24 )
|
|
|
|
AND RRT.PLAN_START_DATE <= (TO_DATE( #{compareEndDate},'yyyy-MM-dd hh24:mi-ss' ) - 8/24 )
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
ORDER BY PLAN_START_DATE , ACTUAL_START_DATE
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<!--根据维修任务HANDLE获取维修任务详细数据-->
|
|
|
|
<!--根据维修任务HANDLE获取维修任务详细数据-->
|
|
|
|
<select id="findResourceRepairTaskByHandleAndSite" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
|
|
|
|
<select id="findResourceRepairTaskByHandleAndSite" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
|
|
|
|
SELECT DISTINCT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
|
|
|
|
SELECT DISTINCT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO, NCT.DESCRIPTION AS CANCEL_CODE_DESCRIPTION,
|
|
|
|
|
|
|
|
ZNU.FULL_NAME AS REPORT_USER_NAME, ZNU2.FULL_NAME AS CANCEL_USER_NAME ,
|
|
|
|
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
|
|
|
|
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
WIP.Z_RESOURCE_REPAIR_TASK RRT
|
|
|
|
WIP.Z_RESOURCE_REPAIR_TASK RRT
|
|
|
|
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO AND R.SITE = RRT.SITE
|
|
|
|
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO AND R.SITE = RRT.SITE
|
|
|
|
|
|
|
|
LEFT JOIN NC_CODE NC ON NC.NC_CODE = RRT.CANCEL_CODE
|
|
|
|
|
|
|
|
LEFT JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
|
|
|
|
|
|
|
|
LEFT JOIN WIP.Z_NWA_USER ZNU ON ZNU.USER_NAME = RRT.REPORT_USER
|
|
|
|
|
|
|
|
LEFT JOIN WIP.Z_NWA_USER ZNU2 ON ZNU2.USER_NAME = RRT.CANCEL_USER
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCMA.WORK_CENTER_BO
|
|
|
|
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCMA.WORK_CENTER_BO
|
|
|
|