completed entry used to identify the whereabouts of the entities through their routes

parent 6f210ee3
...@@ -31,7 +31,6 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin): ...@@ -31,7 +31,6 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
""" """
self.data=data self.data=data
WPdata = data["input"].get("workplan_spreadsheet",[]) WPdata = data["input"].get("workplan_spreadsheet",[])
orders = data["input"]["BOM"].get("orders",{})
if WPdata: if WPdata:
WPdata.pop(0) # pop the column names WPdata.pop(0) # pop the column names
for line in WPdata: for line in WPdata:
...@@ -55,11 +54,11 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin): ...@@ -55,11 +54,11 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
order["componentsList"] = components order["componentsList"] = components
# update the route of the component # update the route of the component
route = part.get("route", []) route = part.get("route", [])
task_id = line[-1] task_id = line[-2]
sequence = line[4] sequence = line[4]
processingTime = line[-4] processingTime = line[-5]
operator = line[5] operator = line[5]
partsneeded = line[-3] partsneeded = line[-4]
# if there are requested parts then split them # if there are requested parts then split them
if partsneeded: if partsneeded:
partsneeded = partsneeded.replace(" ","").split(',') partsneeded = partsneeded.replace(" ","").split(',')
...@@ -67,6 +66,7 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin): ...@@ -67,6 +66,7 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
partsneeded = [""] partsneeded = [""]
technology = line[3] technology = line[3]
quantity = line[6] quantity = line[6]
completed = line[-1]
# append the current step to the route of the part # append the current step to the route of the part
route.append({ route.append({
"task_id": task_id, "task_id": task_id,
...@@ -75,9 +75,8 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin): ...@@ -75,9 +75,8 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
"operator": operator, "operator": operator,
"partsneeded": partsneeded, "partsneeded": partsneeded,
"technology": technology, "technology": technology,
"quantity": quantity "quantity": quantity,
"completed": completed
}) })
part["route"] = route part["route"] = route
return data return data
\ No newline at end of file
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