|
|
@ -20,10 +20,10 @@ |
|
|
, A.part_no |
|
|
, A.part_no |
|
|
, A.qty_usable |
|
|
, A.qty_usable |
|
|
, A.id |
|
|
, A.id |
|
|
, B.resource_desc |
|
|
|
|
|
|
|
|
, B.ObjectDesc resource_desc |
|
|
, C.part_description |
|
|
, C.part_description |
|
|
from resource_spare A |
|
|
from resource_spare A |
|
|
left join resource B on A.site = B.site and A.resource_id = B.resource_id |
|
|
|
|
|
|
|
|
left join eam_object B on A.site = B.site and A.resource_id = B.ObjectID |
|
|
left join part_spare C on A.site = C.site and A.part_no = C.part_no |
|
|
left join part_spare C on A.site = C.site and A.part_no = C.part_no |
|
|
<where> |
|
|
<where> |
|
|
A.site = #{query.site} |
|
|
A.site = #{query.site} |
|
|
@ -37,11 +37,11 @@ |
|
|
and A.resource_id like '%' + #{query.resourceId} +'%' |
|
|
and A.resource_id like '%' + #{query.resourceId} +'%' |
|
|
</if> |
|
|
</if> |
|
|
<if test="query.resourceDesc != null and query.resourceDesc != ''"> |
|
|
<if test="query.resourceDesc != null and query.resourceDesc != ''"> |
|
|
and B.resource_desc = '%' + #{query.resourceDesc}+'%' |
|
|
|
|
|
|
|
|
and B.ObjectDesc = '%' + #{query.resourceDesc}+'%' |
|
|
</if> |
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
|
|
|
|
|
|
GROUP BY A.site, A.resource_id, B.resource_desc, A.part_no, A.qty_usable, A.id |
|
|
|
|
|
|
|
|
GROUP BY A.site, A.resource_id, B.ObjectDesc , A.part_no, A.qty_usable, A.id |
|
|
, C.part_description |
|
|
, C.part_description |
|
|
|
|
|
|
|
|
</select> |
|
|
</select> |
|
|
|