Hello.
i would like to build app for production control. in future i hope to integrete this with sql so i get real time control over machines
this is my problem
Table one: i get this times form Mes cycle data
part number | feature_timestamp | virsifra |
300 500 | 22.09.2021 11:26:34 | 163 |
300 500 | 22.09.2021 11:18:13 | 163 |
300 500 | 22.09.2021 11:08:13 | 163 |
300 500 | 22.09.2021 10:59:53 | 163 |
300 500 | 22.09.2021 10:51:33 | 163 |
300 200 | 22.09.2021 10:43:12 | 163 |
300 200 | 22.09.2021 10:34:52 | 163 |
300 200 | 22.09.2021 10:27:22 | 163 |
data from ERP. gives time when part needs to be finished
part number | normative |
300 500 | 9 |
300 200 | 7 |
extra table with status i need for control
status |
Late |
In time |
first cycle |
result
part number | feature_timestamp | virsifra | status |
300 500 | 22.09.2021 11:26:34 | 163 | in time |
300 500 | 22.09.2021 11:18:13 | 163 | late |
300 500 | 22.09.2021 11:08:13 | 163 | in time |
300 500 | 22.09.2021 10:59:53 | 163 | in time |
300 500 | 22.09.2021 10:51:33 | 163 | first cycle |
300 200 | 22.09.2021 10:43:12 | 163 | late |
300 200 | 22.09.2021 10:34:52 | 163 | late |
300 200 | 22.09.2021 10:27:22 | 163 | first cycle |
If timedifference is less or more as normative for part, correct ststaus shows
Any help is very welcomed