psdi.app.workorder

Class WPService

  • All Implemented Interfaces:
    java.rmi.Remote, WorkPlanMbo, WPItemRemote, WPServiceRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class WPService
    extends WPItem
    implements WPServiceRemote
    Mbo to Represent the WPService Object.

    See WorkOrder Package description.

    There is no key attribute for this object. The attributes in this object are as follows:

    Attribute NameDescription
    CatalogCodeCatalog code for the item or vendor part number. Not applicable for WPService
    ConditionCodeThe condition of the service item/service planned for a given work order
    DescriptionThe Description for the Service or Service item.
    DirectReqThis is to signify if the item on this reservation will be ordered outside of standard inventory.
    IssueTo Issue to a laborcode or craft.
    ItemNumIdentifier of the Item for this WPService.
    ItemQtyItem quantity required for the work plan task.
    LdKeyLong description key. This is a link to text stored in the LongDescription table.
    LineCostA attribute to calculate the total cost of the line(ItemQty * UnitCost).
    LineTypeThe type of work plan Service. It could be SERVICE or STDSERVICE type.
    OrderUnitOrder unit for the item of this work plan service.
    OrgIdIdentifier of the organization for this failure.
    PRIdentifier of the purchase requisition of the ordered item of this work plan service.
    PRLineNumThe Purchase requisition Line number of the ordered service of this work plan service.
    RequestByThe Person requesting this service of this work plan service.
    RequireDateThe Date this Service item is needed.
    SiteIdIdentifier of the site for this failure.
    TaskIDA non-persistent attribute to reprsent the task identifier of the Work Order associate with this work plan service.
    UnitCostItem unit cost when work order was approved.
    UnitCostHasChanged Flag tracks if the unit cost has been overwritten by user. If No - field will be overwritten by MAXIMO on Approval. If Yes - field will not be overwritten by MAXIMO on Approval.
    VendorSuggested vendor to order this item from.
    VendorUnitPriceThe unit price of the item in vendor's currency.
    VendorWareHouseVendor's warehouse for the service item.
    WoNumIdentifier of the work order associate with this work plan service.
    WPM1-WPM3Extra fields, crossover fields from JobMaterial.JM1-JM3.
    RATEThe toolrate of the tool. This attribute is applicable to WPTool only.
    RaterHasChangedSet to True when a user manually enters rate for a tool. This attribute is applicable to WPTool only.
    HoursThe number of hours that this tool was used for. User-entered value. This attribute is applicable to WPTool only.
    RESERVEREQIndicates whether or not the tool requires a reservation. This attribute is applicable to WPTool only.
    • Constructor Detail

      • WPService

        public WPService(MboSet ms)
                  throws MXException,
                         java.rmi.RemoteException
        Basic construtor
        Parameters:
        ms - The WPService MboSet.
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialize the WPService object, owner must be workorder
        Overrides:
        init in class Mbo
        Throws:
        MXApplicationException - ownerWoWPService when this WPService does not have a owner or its owner is not a workorder.
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Sets Default value for some of the fields of the new WPService. New WPService can only be created by the work order object.

        WONUM defaults from the parent and set WONUM of parent to read only.
        The table below shows the default values for each of the attributes listed.

        Attribute NameAttribute Value
        DirectReqtrue
        UNITCOSTHASCHANGEDfalse
        LineTypeSERVICE
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class WPItem
        Throws:
        MXApplicationException - ownerWoWPService when this wpservice does not have a owner or its owner is not a workorder.
        MXException
        java.rmi.RemoteException
      • updateEstimateTotal

        public void updateEstimateTotal(double delta)
                                 throws MXException,
                                        java.rmi.RemoteException
        Called by custom classes for quantity and rate to update the value of WO.EstMatCost
        Parameters:
        delta - the cost need be added to WO.EstMatCost.
        Throws:
        MXException
        java.rmi.RemoteException
      • setEstCost

        public void setEstCost(MboRemote wo,
                               double lineCost)
                        throws MXException,
                               java.rmi.RemoteException
        Set the Estimated Service cost(EstServCost) in workorder
        Overrides:
        setEstCost in class WPItem
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Subtracts the line cost from WO.EstSerCost. When the last WPService is deleted, WO.EstSerCost is editable.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WPServiceSet.checkToRemoveHazardInfo(String)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Adds the line cost to WO.EstSerCost. If the MboSet was empty before, WO.EstSerCost is zero'ed out and made read-only.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • setBaseCurrencyUnitCost

        public void setBaseCurrencyUnitCost(double vendorunitcost)
                                     throws MXException,
                                            java.rmi.RemoteException
        Calculate unitcost based on vendorunitcost and set the unitcost.
        Overrides:
        setBaseCurrencyUnitCost in class WPItem
        Throws:
        MXException
        java.rmi.RemoteException