Class MobileWorkOrderDetailService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.mobile.core.rs3.workorderdetails.MobileWorkOrderDetailService
@RestController
@RequestMapping("mobile/r3/workorderdetails")
@Resource(logging=true)
public class MobileWorkOrderDetailService
extends PrivateService
Services to manage mobile work order details.
- Since:
- 19.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildDependentOperations(List<MobileMultistageGroupOperationDependentOperation> dependentOperations) Builds the list of multistage dependent operations.protected List<DTOMobileIntervention> buildInterventionList(List<Intervention> interventions) Sets the data of each work order operation intervention.protected List<DTOMobileWorkOrderOperation> buildOperationList(WorkOrder workOrder, String language) Sets the data of each work order operations.protected DTOMobileTechnicalObjectbuildTechnicalObject(TechnicalObject technicalObject) Sets the technical object data.protected List<DTOMobileWorkOrderAttachment> buildWorkOrderAttachments(List<BOMobileWorkOrderAttachment> attachments) Builds the list of work order attachments.protected DTOMobileWorkOrderDetailbuildWorkOrderDetail(MobileWorkOrderDetail workOrderDetail, WorkOrder workOrder, String language) Builds the work order detail, by loading its components.protected DTOMobileWorkOrderHeaderbuildWorkOrderHeader(WorkOrder workOrder, String language) Sets the work order header data.protected List<DTOMobileWorkOrderOperationMaterial> buildWorkOrderOperationMaterials(List<BOWorkOrderOperationMaterial> woMaterials) Sets the work order operation materials data.org.springframework.http.ResponseEntity<DTOMobileWorkOrderDetail> Retrieves the required mobile work order detail.protected ZonedDateTimegetCentralZonedDateTime(Date source) protected ZonedDateTimegetLocalZonedDateTime(BOWorkOrderHeader header, Date source) Convert the input date (defined with the application server TimeZone) in a local ZonedDateTime.org.springframework.http.ResponseEntity<List<DTOMobileWorkOrderAttachment>> getWorkOrderAttachments(Long workOrderId) Returns the work order attachments.org.springframework.http.ResponseEntity<List<DTOMobileWorkOrderOperationMaterial>> getWorkOrderOperationMaterials(Long workOrderId, Long operationId) Retrieves the required mobile work order operation materials.org.springframework.http.ResponseEntity<DTOMobileMultistageGroupOperation> getWorkOrderOperationMultistage(Long workOrderId, Long operationId) Retrieves the multistage dependent operations related to the work order operation.protected BOMaterialloadMaterialData(Long id) Loads the material data.protected StringLoads the work order operation state description.protected LocalizedStringloadWOOperationTypeDescription(Long id, String language) Loads the work order operation type description.protected StringLoads the work order state description.protected LocalizedStringloadWorkOrderTypeDescription(Long id, String language) Loads work order type description.
-
Constructor Details
-
MobileWorkOrderDetailService
public MobileWorkOrderDetailService()
-
-
Method Details
-
get
@GetMapping(value="{id:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOMobileWorkOrderDetail> get(@PathVariable("id") Long id, @RequestParam(required=false,name="language",defaultValue="user") String language) throws DAValidateException, DAException Retrieves the required mobile work order detail.MobileWorkOrderDetailLoadEvent- Parameters:
id- mobile work order detail id- Returns:
- the response containing mobile work order detail
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
buildWorkOrderDetail
protected DTOMobileWorkOrderDetail buildWorkOrderDetail(MobileWorkOrderDetail workOrderDetail, WorkOrder workOrder, String language) throws DAValidateException, DAException Builds the work order detail, by loading its components.- Parameters:
workOrderDetail- the work order detailworkOrder- the work order- Returns:
- the DTO mobile work order detail
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
buildWorkOrderHeader
protected DTOMobileWorkOrderHeader buildWorkOrderHeader(WorkOrder workOrder, String language) throws DAValidateException, DAException Sets the work order header data.- Parameters:
workOrder- the work order- Returns:
- the DTO mobile work order header
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getLocalZonedDateTime
Convert the input date (defined with the application server TimeZone) in a local ZonedDateTime.
The output ZonedDateTime has the same date value of the input date, but the TimeZone of the related entity.
Conversion are done like in FromDateToZonedDateTimeConverter converter. -
getCentralZonedDateTime
-
loadWorkOrderStateDescription
Loads the work order state description.- Parameters:
id- the state id- Returns:
- the state description
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadWorkOrderTypeDescription
protected LocalizedString loadWorkOrderTypeDescription(Long id, String language) throws DAValidateException, DAException Loads work order type description.- Parameters:
id- the type id- Returns:
- the type description
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
buildOperationList
protected List<DTOMobileWorkOrderOperation> buildOperationList(WorkOrder workOrder, String language) throws DAValidateException, DAException Sets the data of each work order operations.- Parameters:
workOrder- the work order- Returns:
- a list DTOMobileWorkOrderOperation containing the work order operations data
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception- See Also:
-
loadWOOperationStateDescription
Loads the work order operation state description.- Parameters:
id- the state id- Returns:
- the state description
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadWOOperationTypeDescription
protected LocalizedString loadWOOperationTypeDescription(Long id, String language) throws DAValidateException, DAException Loads the work order operation type description.- Parameters:
id- the type id- Returns:
- the type description
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
buildTechnicalObject
Sets the technical object data.- Parameters:
technicalObject- the technical object- Returns:
- the DTO mobile technical object
-
buildInterventionList
protected List<DTOMobileIntervention> buildInterventionList(List<Intervention> interventions) throws DAValidateException, DAException Sets the data of each work order operation intervention.- Parameters:
interventions- list of intervention- Returns:
- a list of DTOMobileIntervention containing the work order operations interventions data
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception- See Also:
-
getWorkOrderOperationMaterials
@GetMapping(value="{id:[0-9]+}/operations/{operationId:[0-9]+}/materials", produces="application/json") public org.springframework.http.ResponseEntity<List<DTOMobileWorkOrderOperationMaterial>> getWorkOrderOperationMaterials(@PathVariable("id") Long workOrderId, @PathVariable("operationId") Long operationId) throws DAValidateException, DAException Retrieves the required mobile work order operation materials.WorkOrderOperationMaterialSearchEvent- Parameters:
workOrderId- the work order idoperationId- the work order operation id- Returns:
- the response containing the list of
DTOMobileWorkOrderOperationMaterialcontaining the work order operations materials data - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception- See Also:
-
buildWorkOrderOperationMaterials
protected List<DTOMobileWorkOrderOperationMaterial> buildWorkOrderOperationMaterials(List<BOWorkOrderOperationMaterial> woMaterials) throws DAException, DAValidateException Sets the work order operation materials data.- Parameters:
woMaterials- list of BO work order operation material elements- Returns:
- a list of DTOMobileWorkOrderOperationMaterial containing the work order operations materials data
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception- See Also:
-
loadMaterialData
Loads the material data.- Parameters:
id- the material id- Returns:
- the material data
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
getWorkOrderOperationMultistage
@GetMapping(value="{id:[0-9]+}/operations/{operationId:[0-9]+}/multistageDependentOperations", produces="application/json") public org.springframework.http.ResponseEntity<DTOMobileMultistageGroupOperation> getWorkOrderOperationMultistage(@PathVariable("id") Long workOrderId, @PathVariable("operationId") Long operationId) throws DAValidateException, DAException Retrieves the multistage dependent operations related to the work order operation.MultistageComputeDependentOperationsEvent- Parameters:
workOrderId- the work order idoperationId- the work order operation id- Returns:
- the response containing the required
DTOMobileMultistageGroupOperationrelated to the work order operation - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception- See Also:
-
buildDependentOperations
protected List<DTOMobileMultistageGroupOperationDependentOperation> buildDependentOperations(List<MobileMultistageGroupOperationDependentOperation> dependentOperations) throws DAException, DAValidateException Builds the list of multistage dependent operations.- Parameters:
dependentOperations- list of BO dependent operation elements- Returns:
- a list of DTO dependent operation elements of type DTOMobileMultistageGroupOperationDependentOperation
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception- See Also:
-
getWorkOrderAttachments
@GetMapping(value="{id:[0-9]+}/attachments", produces="application/json") public org.springframework.http.ResponseEntity<List<DTOMobileWorkOrderAttachment>> getWorkOrderAttachments(@PathVariable("id") Long workOrderId) throws DAValidateException, DAException Returns the work order attachments.MobileWorkOrderAttachmentSearchEvent- Parameters:
workOrderId- the work order id- Returns:
- the response containing the list of work order attachments
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
buildWorkOrderAttachments
protected List<DTOMobileWorkOrderAttachment> buildWorkOrderAttachments(List<BOMobileWorkOrderAttachment> attachments) throws DAException, DAValidateException Builds the list of work order attachments.- Parameters:
attachments- list of BO mobile work order attachment elements- Returns:
- a list of DTO mobile work order attachment elements of type DTOMobileWorkOrderAttachment
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception- See Also:
-