Skip to content

Batch report #5

Description

@kkmp-dk

REQUIREMENT

--

ID Requirement
R04 Batch report

DESIRED OUTCOME

As an end-user I want to be able to have a batch report for each production,
that have happened. The batch report includes:

  • Graph over temperature
  • Graph over humidity
  • Graph over vibration
  • Graph over state
  • Amount to produce
  • Products per minute
  • Produced
  • Acceptable products
  • Rejected products
  • Overall Equipment Effectiveness

Batch report is a interactive history page

ACCEPTANCE CRITERIA

A story can cover multiple requirements and aims to describe the desired
outcome that meets the expectations of the requirement(s). The acceptance
criteria are the agreed measure to prove the story is functionally complete
and indirectly proving the requirements are met.

Test Case ID S4G1_DST_xx
Requirement(so) Rae
Preconditions The system should have produced some batch reports.
Test Steps Click to see a specific batch report.
Expected Output The system should show the batch report from the selected report and show the information mention above

DEFINITION OF DONE

The Definition of Done describes the different steps to be completed to ensure
the product/solution increment is completed.

  • Acceptance Criteria Defined
  • Test(so) Passed
  • The story is deployed and demonstrated on development target

SOLUTION DESCRIPTION

The solution description describes how we expect to implement a solution that
satisfies the desired outcome of the user story.

The batch report will be displayed on the history page on the website.
The data for the history page is fetched from the database using a HTTP GET
request to the relevant API endpoint.

GET /batches/ will return the following:

[
  {
    "speed": 189,
    "started_dt": "2021-01-17T14:14:48.392470+00:00",
    "amount_to_produce": 100,
    "recipe_id": "Pilsner",
    "finished_dt": "2021-01-17T14:15:20.135025+00:00",
    "oee": 29.295000000000005,
    "identifier": 7
  },
  {
    "speed": 200,
    "started_dt": "2021-01-17T14:04:31.460101+00:00",
    "amount_to_produce": 100,
    "recipe_id": "Pilsner",
    "finished_dt": "2021-01-17T14:12:52.279874+00:00",
    "oee": 29.333333333333332,
    "identifier": 6
  }
]

The JSON above is an array of batches that have been produced and stored in the
database. The array is then used to make a list on the history page, from there
you can. Click on one item on the list you want to see.

On click it will then go ahead and fetch data over time with batch_id as
argument for the API endpoint. The batch_id comes from the earlier fetch done
above.
GET /data_over_time/{batch_id}

{
  "results": [
    {
      "batch_id": 7,
      "measurement_ts": "2021-01-17T14:15:20.135025+00:00",
      "temperature": 30.05,
      "humidity": 69.85,
      "vibration": 1.76,
      "produced": 100,
      "state": 17,
      "rejected": 7,
      "inserted_ts": "2021-01-17T14:15:58.929560+00:00"
    },
    {
      "batch_id": 7,
      "measurement_ts": "2021-01-17T14:15:19.817564+00:00",
      "temperature": 30.04,
      "humidity": 67.41,
      "vibration": 1.54,
      "produced": 99,
      "state": 16,
      "rejected": 7,
      "inserted_ts": "2021-01-17T14:15:58.610986+00:00"
    },
    {
      "batch_id": 7,
      "measurement_ts": "2021-01-17T14:15:19.500113+00:00",
      "temperature": 30.02,
      "humidity": 69.28,
      "vibration": 1.9,
      "produced": 98,
      "state": 6,
      "rejected": 7,
      "inserted_ts": "2021-01-17T14:15:58.286730+00:00"
    }  
    ],
  "pagination": {
    "more": true,
    "total": 100,
    "number_of_pages": 33
  }
}

The JSON above is an array of "data over time" that have been produced. The data
is then used to show a graph over:

  • temperature
    • temperature comes from the data_over_time fetch.
  • humidity
    • humidity comes from the data_over_time fetch.
  • vibration
    • vibration comes from the data_over_time fetch.
  • state
    • state comes from the data_over_time fetch.

There is also other data points that shows it total:

  • amount_to_produce
    • amount_to_produce is fetched in the start, when the user clicks on the
      history page list batch report.
  • products_per_minute
    • ??
  • produced
    • produced comes from the data_over_time fetch.
  • rejected products
    • rejected comes from the data_over_time fetch.
  • acceptable products
    • acceptable products comes from produced - rejected

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions