|
|
|
@ -3997,6 +3997,31 @@ |
|
|
|
where site = #{site} and bu_no = #{buNo} and OrderNo = #{orderNo} and partNo = #{partNo} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getCoreSerialLatestAction" resultType="java.lang.String" parameterType="com.xujie.sys.modules.pms.entity.EamWorkOrderCoreComponentsData"> |
|
|
|
SELECT TOP 1 tempData.action |
|
|
|
FROM ( |
|
|
|
SELECT |
|
|
|
created_date, |
|
|
|
'下机' AS action |
|
|
|
FROM eam_workOrder_coreComponents |
|
|
|
WHERE site = #{site} and bu_no = #{buNo} and partNo = #{partNo} and oldSerialNo = #{serialNo} |
|
|
|
<if test="orderNo != null and orderNo != ''"> |
|
|
|
and OrderNo != #{orderNo} |
|
|
|
</if> |
|
|
|
UNION ALL |
|
|
|
SELECT |
|
|
|
created_date, |
|
|
|
'上机' AS action |
|
|
|
FROM eam_workOrder_coreComponents |
|
|
|
WHERE site = #{site} and bu_no = #{buNo} and partNo = #{partNo} and newSerialNo = #{serialNo} |
|
|
|
<if test="orderNo != null and orderNo != ''"> |
|
|
|
and OrderNo != #{orderNo} |
|
|
|
</if> |
|
|
|
) tempData |
|
|
|
ORDER BY tempData.created_date DESC, |
|
|
|
CASE WHEN tempData.action = '上机' THEN 0 ELSE 1 END |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getRoleByUserName" resultType="com.xujie.sys.modules.factory.entity.vo.BusinessRoleVo" parameterType="com.xujie.sys.modules.factory.entity.vo.BusinessRoleVo"> |
|
|
|
SELECT |
|
|
|
a.site, |
|
|
|
|