首页 > 解决方案 > maximo 7.5 结果集中两种特殊情况的饼图

问题描述

我正在使用 Maximo 7.5 版。我想在饼图的开始中心显示一个结果集,其中包含状态已取消(已完成/关闭)的已关闭未计划 WO 与未取消状态的已创建未计划 WO。如何使用结果集仅获取这两种情况而不是所有状态?

查询已关闭的未计划 WO:

(
  (status = 'CLOSE' or status = 'COMPLETED')
  and (woclass = 'WORKORDER' or woclass = 'ACTIVITY')
  and historyflag = 0
  and istask = 0 
  and siteid = 'SPCSITE'
  and upper(exedepartment) = 'ELECT' 
  and (worktype != 'PM' or worktype != 'PMCAL')
)
and (
  exists (
    select 1 from dbo.locations
    where ((upper(division) = 'ETH'))
      and (
        location = workorder.location
        and siteid=workorder.siteid
      )
  )
)

查询已创建的未计划 WO:

(
  (status != 'CAN')
  and (woclass = 'WORKORDER' or woclass = 'ACTIVITY')
  and historyflag = 0
  and istask = 0 
  and siteid = 'SPCSITE'
  and upper(exedepartment) = 'ELECT'
  and (worktype != 'PM' or worktype != 'PMCAL')
)
and (
  exists (
    select 1 from dbo.locations 
    where ((upper(division) = 'ETH'))
      and (
        location = workorder.location 
        and siteid=workorder.siteid
      )
  )
 )

标签: pie-chartstatusmaximo

解决方案


我没有时间尝试它,但我会创建一个具有您想要显示的两种状态的 ALN 域,创建一个从工作订单到您的域的关系,它将根据您的标准找到正确的值,然后添加到或创建通过您的关系包含 ALNDOMAIN 的报告对象结构。毕竟,您可以使用该属性的相关值作为图表的基础。

如果这不起作用,可能是因为要绘制的属性必须是本地的(即在 WORKORDER 上)。在这种情况下,您需要向 WORKORDER 添加一个属性并通过升级或自动脚本对其进行管理。

但是您的查询也有问题。当状态为 CLOSE 或 CAN 时,将设置历史标志 (historyflag=1)。它也可以在状态为 COMP 时设置,具体取决于您的组织 > 工单选项。


推荐阅读