pie-chart - 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
)
)
)
解决方案
我没有时间尝试它,但我会创建一个具有您想要显示的两种状态的 ALN 域,创建一个从工作订单到您的域的关系,它将根据您的标准找到正确的值,然后添加到或创建通过您的关系包含 ALNDOMAIN 的报告对象结构。毕竟,您可以使用该属性的相关值作为图表的基础。
如果这不起作用,可能是因为要绘制的属性必须是本地的(即在 WORKORDER 上)。在这种情况下,您需要向 WORKORDER 添加一个属性并通过升级或自动脚本对其进行管理。
但是您的查询也有问题。当状态为 CLOSE 或 CAN 时,将设置历史标志 (historyflag=1)。它也可以在状态为 COMP 时设置,具体取决于您的组织 > 工单选项。
推荐阅读
- javascript - 如何在反应挂钩中将回调 url 形成查询字符串
- python - 从复杂的 json 内容中获取值
- mysql - 在不使用交叉连接(MySQL 5.6)的情况下,如何在提供的示例数据中为两个字段的所有不同条目实现笛卡尔积?
- python - 带有用户令牌的 guild.members 不起作用
- python-3.x - 在 docker 内使用 g++ 编译 pybind11 失败
- python - Thread won't stop until window is destroyed, window won't destroy unless thread is stopped
- docker - Fluentbit kubernetes - 如何在 /var/log/ 中存在的应用程序日志中添加 kubernetes 元数据
/ 小路 - python - python tkinter如何使用画布找到特定列表中最近的项目
- java - 未找到 Maven 模块:javafx.fxml
- laravel - 如何使用查询字符串重定向命名路由?