Commit e6843375 authored by panos's avatar panos

Bug fixed in this plugin

parent c3cc2e52
...@@ -63,18 +63,20 @@ class UpdateWIP(SplitRoute.SplitRoute): ...@@ -63,18 +63,20 @@ class UpdateWIP(SplitRoute.SplitRoute):
if not last_step: if not last_step:
# find the step that follows (normal processing) # find the step that follows (normal processing)
for step in route: for step in route:
# the sequences must differ maximum one # introduced to fix the case were sequence is ''
if int(sequence)+1 == int(step.get('sequence',0)): if not step.get('sequence', 0) == '':
# and the corresponding step must have a defined technology # the sequences must differ maximum one
if step.get('technology', None): if int(sequence)+1 == int(step.get('sequence',0)):
# the station defined by the WIP must start with the technology initials (only INJM, EDM, and MILL) # and the corresponding step must have a defined technology
if workStation.startswith(step['technology']): if step.get('technology', None):
last_step = step # the station defined by the WIP must start with the technology initials (only INJM, EDM, and MILL)
# the time defined as remaining processing time is remainingSetupTime if workStation.startswith(step['technology']):
remainingSetupTime = remainingProcessingTime last_step = step
# and the remainingProcessingTime should be extracted from the step # the time defined as remaining processing time is remainingSetupTime
remainingProcessingTime = step.get('processingTime', 0) remainingSetupTime = remainingProcessingTime
break # and the remainingProcessingTime should be extracted from the step
remainingProcessingTime = step.get('processingTime', 0)
break
# if the workstation provided is not a valid station but instead the name of a technology (this happens only with EDM, INJM, and MILL that have setup and processing seperate) # if the workstation provided is not a valid station but instead the name of a technology (this happens only with EDM, INJM, and MILL that have setup and processing seperate)
if not workStation in last_step.get("stationIdsList", []): if not workStation in last_step.get("stationIdsList", []):
if workStation == last_step.get("technology", None): if workStation == last_step.get("technology", None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment