Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT Object.VEHICLE_ID AS OBJECT_ID,
- Object.REMOTE_UNIT_ID AS OBJECT_REMOTE_UNIT_ID,
- Object.VEHICLE_OWNER_ID AS OBJECT_VEHICLE_OWNER_ID,
- Object.PERSON_ID AS OBJECT_PERSON_ID,
- Object.NUMBERPLATE AS OBJECT_NUMBERPLATE,
- Object.COMPANY_NR AS OBJECT_COMPANY_NR,
- Object.COLOR AS OBJECT_COLOR,
- Object.BRAND AS OBJECT_BRAND,
- Object.MODEL AS OBJECT_MODEL,
- Object.DOOR AS OBJECT_DOOR,
- Object.FUEL AS OBJECT_FUEL,
- Object.RU_INSTALL_DATE AS OBJECT_RU_INSTALL_DATE,
- Object.LM_COMMENT AS OBJECT_LM_COMMENT,
- Object.VO_VEHICLE_CATEGORY_ID AS OBJECT_VO_CATEGORY_ID,
- Object.RU_INSTALL_COMMENT AS OBJECT_RU_INSTALL_COMMENT,
- TO_CHAR(touserdate(VehicleData.gps_full_date,OperationCenter.timezone),'dd/mm/yyyy hh24:mi') AS GPS_FULL_DATE_STR,
- UPPER(ObjectVoCategory.NAME
- || ' '
- || P_VEHICLE.list_vehicle_group_name(Object.VEHICLE_ID)
- ||' '
- ||Object.COMPANY_NR
- ||' '
- ||Object.NUMBERPLATE
- ||' '
- ||Object.BRAND
- ||' '
- ||Object.MODEL
- ||' '
- ||Object.COLOR
- || ' '
- || VehicleData.rg_street_nr
- || DECODE(VehicleData.rg_street_nr,NULL,'',', ')
- || VehicleData.rg_street
- || DECODE(VehicleData.rg_street,NULL,'',' - ')
- || VehicleData.rg_post_code
- || ' '
- || VehicleData.rg_location
- || ' '
- || VehicleData.rg_country
- ||' '
- ||Object.LAST_USERS_CAT
- ||' '
- ||Object.LM_COMMENT
- ||' '
- ||Object.LAST_USERS
- ||' '
- ||p_vd_poi.getVehicleDataPoiName(OperationCenter.operation_center_id, VehicleData.vehicle_data_id)
- ||' '
- ||Str.STR_VALUE
- || ' '
- || EquipmentStorePlace.NAME
- || ' '
- || ObjectVehicleOwner.COMPANY_NAME
- || ' '
- || NVL2 (Container.VEHICLE_ID , '[' || ContainerVoCategory.NAME || ']' || '.' || '[' || Container.NUMBERPLATE || ']', '')
- || ' '
- || (VehicleData.rg_street_nr || DECODE(VehicleData.rg_street_nr,NULL,'',', ') || VehicleData.rg_street || DECODE(VehicleData.rg_street,NULL,'',' - ') || VehicleData.rg_post_code || ' ' || VehicleData.rg_location || ' ' || VehicleData.rg_country)
- || ' '
- || (Person.LAST_NAME || ' ' || Person.FIRST_NAME)
- || ' '
- || Object.LM_NAME
- || ' '
- || VoClassTree.SHORT_NAME
- || ' '
- || NVL(Str1.STR_VALUE,VoOpStatus.NAME)
- || ' '
- || EquipmentStorePlace.NAME
- || ' '
- || P_OBJECT.list_object_key_strings_with_usage(Object.VEHICLE_ID)
- || ' '
- || p_person.getNameForFiltering(Object.LAST_INVENTORY_PERSON_ID)) AS IDSTRING,
- DECODE(Object.LAST_USERS,NULL,DECODE(Person.PERSON_ID,NULL,'',Person.last_name
- ||' '
- ||SUBSTR(Person.first_name,1)),Object.LAST_USERS) AS OBJECT_LAST_USERS,
- DECODE(Object.LAST_USERS_CAT,NULL,DECODE(Person.PERSON_ID,NULL,'',Person.last_name
- ||' '
- ||SUBSTR(Person.first_name,1)),Object.LAST_USERS_CAT) AS OBJECT_LAST_USERS_CAT,
- ObjectVoCategory.GRAPHICAL_SYMBOL AS OBJECT_GRAPHICAL_SYMBOL,
- ObjectVoCategory.VO_VEHICLE_CATEGORY_ID AS OBJECT_VO_CATEGORY_ID1,
- ObjectVoCategory.NAME AS OBJECT_CATEGORY_NAME,
- p_vd_poi.getVehicleDataPoiId(GuiUsers.operation_center_id, Object.last_vehicle_data_id) AS OBJECT_POI_LIST,
- P_VEHICLE.list_vehicle_group_name(Object.VEHICLE_ID) AS OBJECT_GROUP,
- ObjectVehicleOwner.COMPANY_NAME AS OBJECT_COMPANY_NAME,
- ObjectVehicleOwner.VEHICLE_OWNER_ID AS OBJECT_VEHICLE_OWNER_ID1,
- GuVehicle.VEHICLE_ID AS VEHICLE_ID1,
- GuiUsers.GUI_USER_ID AS GUI_USER_ID1,
- OcEventType.GRAPHICAL_SYMBOL AS EVENT_GRAPHICAL_SYMBOL,
- OcEventType.OPERATION_CENTER_ID,
- OcEventType.EVENT_TYPE_ID,
- VehicleData.VEHICLE_DATA_ID,
- touserdate(NVL(VehicleData.GPS_FULL_DATE,TO_DATE('1970','YYYY')),OperationCenter.timezone) AS GPS_FULL_DATE,
- (VehicleData.rg_street_nr
- || DECODE(VehicleData.rg_street_nr,NULL,'',', ')
- || VehicleData.rg_street
- || DECODE(VehicleData.rg_street,NULL,'',' - ')
- || VehicleData.rg_post_code
- || ' '
- || VehicleData.rg_location
- || ' '
- || VehicleData.rg_country) AS CONTAINER_RG_ADDRESS,
- Str.STR_VALUE AS EVENT_NAME,
- Str.STR_ID,
- p_vd_poi.getVehicleDataPoiName(OperationCenter.operation_center_id, Object.last_vehicle_data_id) AS CONTAINER_POI_NAME,
- OperationCenter.NAME AS OPERATION_CENTER_NAME,
- OperationCenter.OPERATION_CENTER_ID AS OPERATION_CENTER_ID1,
- Person.PERSON_ID AS OBJECT_DEFAULT_USER_ID,
- Person.LAST_NAME
- || ' '
- || Person.FIRST_NAME AS OBJECT_DEFAULT_USER,
- Container.VEHICLE_ID AS CONTAINER_ID,
- Container.NUMBERPLATE AS CONTAINER_NUMBERPLATE,
- Container.VO_VEHICLE_CATEGORY_ID AS CONTAINER_VO_CATEGORY_ID,
- NVL2 ( Container.VEHICLE_ID , '[' || ContainerVoCategory.NAME || ']' || '.' || '[' || Container.NUMBERPLATE || ']', '') AS CONTAINER_NAME,
- ObjectVehicleOwner.COMPANY_NAME,
- RemoteUnit.IS_CONTAINER AS IS_CONTAINER,
- Object.LM_NAME AS LM_NAME,
- Object.LM_DATE AS LM_DATE,
- EquipmentStorePlace.NAME AS LAST_STORE_PLACE,
- Object.LAST_EQUIPMENT_STORE_PLACE_ID AS LAST_EQUIPMENT_STORE_PLACE_ID,
- Object.GRAPHICAL_SYMBOL_ID,
- (SELECT NAME FROM GRAPHICAL_SYMBOL WHERE GRAPHICAL_SYMBOL_ID = Object.GRAPHICAL_SYMBOL_ID) AS G_SYMBOL,
- NVL(Str1.STR_VALUE,VoOpStatus.NAME) AS OP_STATUS_NAME,
- VoOpStatus.COLOR AS OP_STATUS_COLOR,
- VoClassTree.SHORT_NAME AS CLASSIFICATION_CODE,
- Object.VO_CLASS_TREE_ID,
- P_VO_CLASS_TREE.GETCLASSIFICATIONPATH(Object.VO_CLASS_TREE_ID) AS CLASSIFICATION_PATH,
- P_WBS.getWbsVehicleConflictCount(Object.VEHICLE_ID) AS NBR_CONFLICTS_ON_WBS,
- P_OBJECT.list_object_key_strings_with_usage(Object.VEHICLE_ID) AS KEY_CODE_LIST,
- Object.ERP_SERIAL_NUMBER AS OBJECT_ERP_SERIAL_NUMBER,
- Object.LAST_SERVICE_DATE AS OBJECT_LAST_SERVICE_DATE,
- Object.TECHNICAL_CONTROL_DATE AS OBJECT_TECHNICAL_CONTROL_DATE,
- NVL(Object.VEHICLE_STATUS_ID,0) AS OBJECT_STATUS_ID,
- Object.ERP_ARTICLE_NUMBER AS OBJECT_ERP_ARTICLE_NUMBER,
- Object.ERP_EQUIPMENT_TYPE AS OBJECT_ERP_EQUIPMENT_TYPE,
- Object.ERP_STORE AS OBJECT_ERP_STORE,
- Object.MOTOR_POWER AS OBJECT_MOTOR_POWER,
- Object.ERP_INTERNAL_ORDER_NUM AS OBJECT_INTERNAL_ORDER_NUM,
- Object.IN_SERVICE_DATE AS OBJECT_IN_SERVICE_DATE,
- Object.COST_PER_DAY AS OBJECT_COST_PER_DAY,
- Object.COST_PER_HR AS OBJECT_COST_PER_HR,
- ObjectPoi.NAME AS OBJECT_POI_NAME,
- ObjectWbs.REF_NUMBER AS OBJECT_WBS_REF_NUMBER,
- ObjectVehicleData.RG_LOCATION AS OBJECT_LOCATION,
- Object.LAST_INVENTORY_PERSON_ID AS OBJECT_LAST_INV_PERSON_ID,
- Object.LAST_INVENTORY_DATE AS OBJECT_LAST_INVENTORY_DATE,
- Object.LAST_INVENTORY_BOX_CHECKED AS OBJECT_LAST_INV_BOX_CHECKED,
- p_person.getName(Object.LAST_INVENTORY_PERSON_ID) AS OBJECT_LAST_INV_PERSON_NAME
- FROM VEHICLE Object,
- VEHICLE Container,
- REMOTE_UNIT RemoteUnit,
- VO_VEHICLE_CATEGORY ObjectVoCategory,
- VO_VEHICLE_CATEGORY ContainerVoCategory,
- GU_VEHICLE GuVehicle,
- GUI_USERS GuiUsers,
- OC_EVENT_TYPE OcEventType,
- VEHICLE_DATA VehicleData,
- OF_OWNER.STR Str,
- OPERATION_CENTER OperationCenter,
- PERSON Person,
- VEHICLE_OWNER ObjectVehicleOwner,
- EQUIPMENT_STORE_PLACE EquipmentStorePlace,
- OF_OWNER.STR Str1,
- VO_OP_STATUS VoOpStatus,
- VO_CLASS_TREE VoClassTree,
- VEHICLE_DATA ObjectVehicleData,
- VD_POI ObjectVdPoi,
- OC_POI ObjectPoi,
- Wbs ObjectWbs
- WHERE GuiUsers.GUI_USER_ID = ?
- AND GuiUsers.OPERATION_CENTER_ID = OperationCenter.OPERATION_CENTER_ID
- AND GuiUsers.GUI_USER_ID = GuVehicle.GUI_USER_ID
- AND GuVehicle.VEHICLE_ID = Object.VEHICLE_ID
- AND Object.LAST_EQUIPMENT_STORE_PLACE_ID = EquipmentStorePlace.EQUIPMENT_STORE_PLACE_ID(+)
- AND Container.VO_VEHICLE_CATEGORY_ID = ContainerVoCategory.VO_VEHICLE_CATEGORY_ID (+)
- AND Object.VO_VEHICLE_CATEGORY_ID = ObjectVoCategory.VO_VEHICLE_CATEGORY_ID
- AND Object.VEHICLE_OWNER_ID = ObjectVehicleOwner.VEHICLE_OWNER_ID
- AND Object.VO_CLASS_TREE_ID = VoClassTree.VO_CLASS_TREE_ID(+)
- AND Object.PERSON_ID = Person.PERSON_ID(+)
- AND Object.REMOTE_UNIT_ID = RemoteUnit.REMOTE_UNIT_ID(+)
- AND VehicleData.EVENT_TYPE_ID = OcEventType.EVENT_TYPE_ID(+)
- AND (OcEventType.OPERATION_CENTER_ID = OperationCenter.OPERATION_CENTER_ID
- OR OcEventType.EVENT_TYPE_ID IS NULL)
- AND OcEventType.STR_ID = Str.STR_ID(+)
- AND (str.language = GuiUsers.language
- OR str.language IS NULL)
- AND Object.VO_OP_STATUS_ID = VoOpStatus.VO_OP_STATUS_ID (+)
- AND VoOpStatus.NAME_STR_ID = Str1.STR_ID (+)
- AND GuiUsers.LANGUAGE = Str1.LANGUAGE (+)
- AND ObjectVoCategory.IS_OBJECT = 'Y'
- AND Object.LAST_CONTAINER_VEHICLE_ID = Container.VEHICLE_ID(+)
- AND Container.LAST_VEHICLE_DATA_ID = VehicleData.VEHICLE_DATA_ID (+)
- AND (? IS NULL
- OR ? = ''
- OR Object.VO_VEHICLE_CATEGORY_ID IN
- (SELECT regexp_substr(?,'[^,]+', 1, LEVEL)
- FROM dual
- CONNECT BY regexp_substr(?, '[^,]+', 1, LEVEL) IS NOT NULL
- ))
- AND (? IS NULL OR Container.VEHICLE_ID = ?)
- AND (? IS NULL OR Object.LAST_EQUIPMENT_STORE_PLACE_ID = ?)
- AND (NVL(Object.VEHICLE_STATUS_ID,0) = 0 OR ? = 'true')
- AND Object.LAST_VEHICLE_DATA_ID = ObjectVehicleData.VEHICLE_DATA_ID(+)
- AND ObjectVehicleData.VEHICLE_DATA_ID = ObjectVdPoi.VEHICLE_DATA_ID(+)
- AND ObjectVdPoi.POI_ID = ObjectPoi.POI_ID(+)
- AND ObjectPoi.POI_ID = ObjectWbs.POI_ID(+)
- AND ObjectWbs.IS_PROJECT(+) = 'Y'
- AND ObjectWbs.WBS_LEVEL(+) = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement