生产派工的操作员,按工序的成本中心查询---回退

master
zpl 4 years ago
parent d0f94d47f4
commit bba57fd7d0

@ -482,26 +482,12 @@
</select>
<select id="findEmployeeList" resultType="com.foreverwin.mesnac.meapi.model.NwaUser">
/*SELECT DISTINCT A.SITE, A.USER_ID USER_NAME, B.FIRST_NAME, B.LAST_NAME, NVL(B.FULL_NAME, A.USER_DESCRIPTION) FULL_NAME
FROM Z_USER_RESOURCE A
INNER JOIN RESOURCE_TYPE_RESOURCE WM ON WM.RESOURCE_BO = A.RESOURCE_BO
INNER JOIN RESOURCE_TYPE RT ON RT.HANDLE = WM.RESOURCE_TYPE_BO
LEFT JOIN Z_NWA_USER B ON A.SITE = B.SITE AND A.USER_ID = B.USER_NAME
WHERE A.SITE = #{site} AND RT.RESOURCE_TYPE = #{resourceType}*/
SELECT DISTINCT A.SITE, A.USER_ID USER_NAME, B.FIRST_NAME, B.LAST_NAME, NVL(B.FULL_NAME, A.USER_DESCRIPTION) FULL_NAME
FROM Z_USER_RESOURCE A
INNER JOIN RESOURCE_TYPE_RESOURCE WM ON WM.RESOURCE_BO = A.RESOURCE_BO
INNER JOIN RESOURCE_TYPE RT ON RT.HANDLE = WM.RESOURCE_TYPE_BO
LEFT JOIN Z_NWA_USER B ON A.SITE = B.SITE AND A.USER_ID = B.USER_NAME
WHERE A.SITE = #{site} AND RT.RESOURCE_TYPE IN (
SELECT O.OPERATION FROM OPERATION o
INNER JOIN CUSTOM_FIELDS cf ON CF.HANDLE = O.HANDLE
WHERE CF.VALUE = (
SELECT CF.VALUE FROM OPERATION o
INNER JOIN CUSTOM_FIELDS cf ON CF.HANDLE = O.HANDLE AND CF."ATTRIBUTE" = 'COST_CENTER'
WHERE O.OPERATION = #{resourceType}
)
)
WHERE A.SITE = #{site} AND RT.RESOURCE_TYPE = #{resourceType}
</select>
<select id="findAll" resultMap="UserResourceDto">

Loading…
Cancel
Save