子计划进度接口

This commit is contained in:
caoqianming 2021-10-19 09:54:45 +08:00
parent 1d056a775f
commit da1bb4e320
1 changed files with 2 additions and 2 deletions

View File

@ -76,9 +76,9 @@ class ProductionPlanViewSet(CreateUpdateModelAMixin, ListModelMixin, CreateModel
start_date=production_plan.start_date, end_date=production_plan.end_date,
workshop=i.process.workshop, process=i.process, create_by=request.user,
steps = list(steps))
for m in InputMaterial.objects.filter(subproduction=i, is_delete=False).order_by('sort'):
for m in InputMaterial.objects.filter(subproduction=i, is_deleted=False).order_by('sort'):
SubProductionProgress.objects.create(material=m.material, type=1, count=m.count, subproduction_plan=instance)
for m in OutputMaterial.objects.filter(subproduction=i, is_delete=False).order_by('sort'):
for m in OutputMaterial.objects.filter(subproduction=i, is_deleted=False).order_by('sort'):
SubProductionProgress.objects.create(material=m.material, type=2, count=m.count, subproduction_plan=instance)
production_plan.is_planed=True
production_plan.save()