You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Maximo 7.6.1.1:如何让点类型资产的XY坐标优先于工单服务地址XY?

Can This Priority Coordinate Logic Be Implemented in Maximo 7.6.1.1?

Absolutely, this is totally achievable! We can leverage Maximo's Automation Scripts and its GIS integration configuration to build this logic, which dynamically prioritizes either the asset's coordinates or the service address coordinates based on the linked asset's GEOMETRYTYPE field. Here's a step-by-step breakdown tailored to your requirements:

Core Logic Overview

We need to:

  • Flag when a linked asset is of type POINT (to prioritize its X/Y coordinates)
  • Override map positioning and spatial record creation logic to use the asset's coordinates only for POINT assets; fall back to service address coordinates for LINE/POLYGON assets

1. Track Asset Coordinates & Priority Flag on Work Orders

First, add 3 custom fields to the WORKORDER object via Database Configuration:

  • ASSETX (Double): Stores the linked point asset's X coordinate
  • ASSETY (Double): Stores the linked point asset's Y coordinate
  • USEASSETCOORD (Boolean/YesNo): Flags whether to use the asset's coordinates

Then, create an Automation Script triggered when the ASSETNUM field on the work order changes (trigger point: WORKORDER object, ASSETNUM attribute, VALUECHANGED event):

from psdi.mbo import MboConstants

# Get the current work order MBO
wo = mbo
# Fetch the linked asset MBO
linked_asset = wo.getMboSet("ASSET").getMbo(0)

if linked_asset:
    geom_type = linked_asset.getString("GEOMETRYTYPE")
    if geom_type == "POINT":
        # Save the asset's coordinates and set the priority flag
        wo.setValue("ASSETX", linked_asset.getDouble("X"), MboConstants.NOACCESSCHECK)
        wo.setValue("ASSETY", linked_asset.getDouble("Y"), MboConstants.NOACCESSCHECK)
        wo.setValue("USEASSETCOORD", "Y", MboConstants.NOACCESSCHECK)
    else:
        # Clear the flag and stored coordinates to use service address
        wo.setValue("ASSETX", None, MboConstants.NOACCESSCHECK)
        wo.setValue("ASSETY", None, MboConstants.NOACCESSCHECK)
        wo.setValue("USEASSETCOORD", "N", MboConstants.NOACCESSCHECK)

2. Control Map Blue Pin Positioning Priority

To make the map use the asset's coordinates for point assets:

  1. Go to System Configuration > Platform Configuration > Map Manager
  2. Find the work order map configuration (typically named WORKORDER_MAP)
  3. Edit the map's Positioning Settings:
    • Set the coordinate source to a conditional rule:
      • If WO.USEASSETCOORD = 'Y', use WO.ASSETX and WO.ASSETY
      • Else, use the service address's coordinates (e.g., LOCATION.X and LOCATION.Y linked to the work order's LOCATION)

If the Map Manager's visual configuration isn't flexible enough, add a Client Script to the Work Order application's map component. This script runs when the map loads, checks the USEASSETCOORD flag, and overrides the pin's position accordingly.

3. Automate Spatial Record Creation Logic

When creating spatial records for work orders (either automatically or manually), we need to enforce the coordinate priority:
Create an Automation Script triggered on the SPATIALRECORD object's BEFOREINSERT event:

from psdi.mbo import MboConstants

spatial_rec = mbo
# Get the linked work order
wo = spatial_rec.getMboSet("WORKORDER").getMbo(0)

if wo:
    linked_asset = wo.getMboSet("ASSET").getMbo(0)
    if linked_asset and linked_asset.getString("GEOMETRYTYPE") == "POINT":
        # Use the point asset's coordinates for the spatial record
        spatial_rec.setValue("X", linked_asset.getDouble("X"), MboConstants.NOACCESSCHECK)
        spatial_rec.setValue("Y", linked_asset.getDouble("Y"), MboConstants.NOACCESSCHECK)
    else:
        # Fall back to the service address's coordinates
        service_loc = wo.getMboSet("LOCATION").getMbo(0)
        if service_loc:
            spatial_rec.setValue("X", service_loc.getDouble("X"), MboConstants.NOACCESSCHECK)
            spatial_rec.setValue("Y", service_loc.getDouble("Y"), MboConstants.NOACCESSCHECK)

Quick Testing Tips

  • Test scenarios like:
    • Converting an SR to a WO, then linking a point asset
    • Linking a line/polygon asset to a WO with an existing service address
    • Updating the linked asset on an existing WO
  • Verify both the map pin position and the generated spatial record coordinates match your expectations

内容的提问来源于stack exchange,提问作者User1974

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 12:48:13