|
|
@ -883,16 +883,20 @@
|
|
|
|
<!--批量获取维修任务-->
|
|
|
|
<!--批量获取维修任务-->
|
|
|
|
<select id="findResourceRepairTaskList" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
|
|
|
|
<select id="findResourceRepairTaskList" 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 NC_CODE_DESCRIPTION,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
|
|
|
|
NCT.DESCRIPTION AS NC_CODE_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
|
|
|
|
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
|
|
|
|
INNER JOIN WIP.NC_CODE NC ON RRT.SITE = NC.SITE AND NC.NC_CODE = RRT.NC_CODE_NO
|
|
|
|
INNER JOIN WIP.NC_CODE NC ON RRT.SITE = NC.SITE AND NC.NC_CODE = RRT.NC_CODE_NO
|
|
|
|
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NCT.LOCALE = 'zh'
|
|
|
|
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NCT.LOCALE = 'zh'
|
|
|
|
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_T WCT ON WCT.WORK_CENTER_BO = 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
|
|
|
|
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
|
|
|
|
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
|
|
|
|
WHERE RRT.SITE = #{site}
|
|
|
|
WHERE RRT.SITE = #{site}
|
|
|
|
|
|
|
|
--AND WCT.LOCALE = 'zh'
|
|
|
|
<if test="resourceBo != null and resourceBo != ''">
|
|
|
|
<if test="resourceBo != null and resourceBo != ''">
|
|
|
|
AND RRT.RESOURCE_BO = #{resourceBo}
|
|
|
|
AND RRT.RESOURCE_BO = #{resourceBo}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -914,27 +918,28 @@
|
|
|
|
<if test="reportSource != null and reportSource != ''">
|
|
|
|
<if test="reportSource != null and reportSource != ''">
|
|
|
|
AND RRT.REPORT_SOURCE = #{reportSource}
|
|
|
|
AND RRT.REPORT_SOURCE = #{reportSource}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="compareStartTime != null and compareStartTime != ''">
|
|
|
|
<if test="compareStartDate != null and compareStartDate != ''">
|
|
|
|
AND RRT.PLAN_START_DATE > #{compareStartTime}
|
|
|
|
AND RRT.PLAN_START_DATE > TO_DATE( #{compareStartDate},'yyyy-MM-dd hh24:mi-ss' )
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="compareEndTime != null and compareEndTime != ''">
|
|
|
|
<if test="compareEndDate != null and compareEndDate != ''">
|
|
|
|
AND RRT.PLAN_START_DATE < #{compareEndTime}
|
|
|
|
AND RRT.PLAN_START_DATE < TO_DATE( #{compareEndDate},'yyyy-MM-dd hh24:mi-ss' )
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</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 RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
|
|
|
|
SELECT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
|
|
|
|
NCT.DESCRIPTION AS NC_CODE_DESCRIPTION,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
|
|
|
|
NCT.DESCRIPTION AS NC_CODE_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
|
|
|
|
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO AND R.SITE = RRT.SITE
|
|
|
|
LEFT JOIN WIP.NC_CODE NC ON NC.NC_CODE = RRT.NC_CODE_NO
|
|
|
|
LEFT JOIN WIP.NC_CODE NC ON NC.NC_CODE = RRT.NC_CODE_NO AND NC.SITE = RRT.SITE
|
|
|
|
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
|
|
|
|
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NC.LOCALE = 'zh'
|
|
|
|
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_T WCT ON WCT.WORK_CENTER_BO = 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
|
|
|
|
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
|
|
|
|
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
|
|
|
|
WHERE RRT.SITE = #{site} AND RRT.HANDLE = #{handle}
|
|
|
|
WHERE RRT.SITE = #{site} AND RRT.HANDLE = #{handle}
|
|
|
|
AND R.SITE = #{site} AND NC.SITE = #{site}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<!--自定义sql-->
|
|
|
|
<!--自定义sql-->
|
|
|
|