Analysis
This section describes the calls for obtaining analysis reports.
GET /analysis/productivity
This method returns the same information as the Analysis/Productivity report.
Request parameters:
- company [required]: The name or ID of the company.
- session [required]: The ID of the active session.
- datefrom [required]: The start date of the selection.
- dateto [required]: the end date of the selection.
- tree: the tree structure with the selected areas and processes. Default value: empty, equivalent to all areas and processes. Format: area1{process1,process2,etc.},area2{...
- inhours: indicates whether the times will be returned in hours (1) or in minutes (0). Default value: 0.
- inkg: indicates whether the quantities will be returned in kilograms (1) or in units (0). Default value: 0.
- detail: indicates if the results will be returned grouped (0) or with detail (1). Default value: 0.
- explode_operation: indicates whether the results will be returned grouped by order (0) or differentiated by operation (1). Default value: 0.
- totalize: indicates whether a row will be returned with the totals (1) or not (0). Default value: 1.
- fields: if indicated, it displays and differentiates the results based on the values of the indicated fields. Up to two fields separated by "|" can be included.
- contains: if specified, filters the data returned based on whether the specified text is in the chosen field. You can put a value for each field, separated by "|".
Response:
- status: returns "0" in case of success and an error code in any other case.
- data: returns the same data as the productivity report.
- message: "Success" or a descriptive information of the error in any other case.
Example:
Request: {"type":"get", "url":"analysis/productivity", "data":"company=1763635394&session=MYNzf634ce2lST5eliLPTOYfOVhzhpufAEsvDlb9xm8zISQ0WLH6Uh3CVSxs&datefrom=20210501054500&dateto=20210601054500&inhours=1&inkg=1&detail=1&explode_operation=1&fields=Planta|ProductionLine"} Reponse (success): {"status":"0", "data":[{"area":"SOL-SOLIDOS\/POLVOS","process":"RO02-Rovema 02","planta":"1010","productionline":"L18","production_order":"100263275-0010","result":"86002149\/0012","Description":"SODIUM SACCHARIN. 2.1 KG","good_quantity":"1","units":"PK","scrap":"0","rework":"0","good_quantity_kg":"2.1","start":"07\/05\/2021 09:22:20","end":"01\/06\/2021 05:45:00","total_time":"596.34","availability_losses":"330.13","production_time":"266.21","not_required_time":"0.04","attendance_time":"894.57","productivity":"0"},{"area":"","process":"","planta":"","productionline":"","production_order":"","result":"","Description":"","good_quantity":"1","units":"PK","scrap":"0","rework":"0","good_quantity_kg":"2.1","start":"07\/05\/2021 09:22:20","end":"01\/06\/2021 05:45:00","total_time":"596.34","availability_losses":"330.13","production_time":"266.21","not_required_time":"0.04","attendance_time":"894.57","productivity":"0"}], "message":"Success"} Reponse (error): {"status":"1070", "data":"<a href='http:\/\/mayen19:8080\/edinnM2\/help\/en\/API_Analysis_Productivity.html'>for additional information follow this link<\/a>", "message":"The dateFrom should be earlier than dateTo"} |