""" splits the routes of mould parts (design + mould)
""" splits the routes of mould parts (design + mould) and update the _class attribute of the entities
"""
"""
orders=data["input"]["BOM"]["productionOrders"]
orders=data["input"]["BOM"]["productionOrders"]
fororderinorders:
fororderinorders:
...
@@ -28,6 +28,7 @@ class SplitRoute(plugin.InputPreparationPlugin):
...
@@ -28,6 +28,7 @@ class SplitRoute(plugin.InputPreparationPlugin):
# for each step of the components route find out if it is of a design route (ENG - CAD) or of mould route (ASSM-INJM). If the route contains none of these technology-types steps then the component is normal
# for each step of the components route find out if it is of a design route (ENG - CAD) or of mould route (ASSM-INJM). If the route contains none of these technology-types steps then the component is normal
routeList=copy.deepcopy(route)
routeList=copy.deepcopy(route)
i=0
i=0
# figure out which steps are design steps
forstepinrouteList:
forstepinrouteList:
stepTechnology=step.get('technology',[])
stepTechnology=step.get('technology',[])
assertstepTechnologyinself.ROUTE_STEPS_SET,'the technology provided does not exist'
assertstepTechnologyinself.ROUTE_STEPS_SET,'the technology provided does not exist'
...
@@ -36,12 +37,19 @@ class SplitRoute(plugin.InputPreparationPlugin):
...
@@ -36,12 +37,19 @@ class SplitRoute(plugin.InputPreparationPlugin):
route.pop(i)
route.pop(i)
else:
else:
i+=1
i+=1
# if the current entity is a mold-design then create the design and update the _class attribute of the mold