执行操作决定bug
This commit is contained in:
parent
743b58ab0f
commit
9b832719f5
|
@ -61,7 +61,7 @@ def handleTicket(sender, instance, created, **kwargs):
|
||||||
wp.step = step
|
wp.step = step
|
||||||
# 找到当时所属的计划
|
# 找到当时所属的计划
|
||||||
sp = SubProductionPlan.objects.filter(ow_subplan__wproduct=wp,
|
sp = SubProductionPlan.objects.filter(ow_subplan__wproduct=wp,
|
||||||
ow_subplan__operation__is_submited=True, ow_subplan__step=step).first()
|
ow_subplan__operation__is_submited=True, ow_subplan__operation__step=step).first()
|
||||||
if sp:
|
if sp:
|
||||||
wp.subproduction_plan = sp
|
wp.subproduction_plan = sp
|
||||||
wt.save()
|
wt.save()
|
||||||
|
@ -70,7 +70,7 @@ def handleTicket(sender, instance, created, **kwargs):
|
||||||
wp.save()
|
wp.save()
|
||||||
# 更新子计划合格进度
|
# 更新子计划合格进度
|
||||||
if sp != wt.subproduction_plan:
|
if sp != wt.subproduction_plan:
|
||||||
ins = SubProductionProgress.objects.filter(subproduction_plan=sp,
|
ins = SubProductionProgress.objects.get(subproduction_plan=sp,
|
||||||
is_main=True, type=SubprodctionMaterial.SUB_MA_TYPE_OUT)
|
is_main=True, type=SubprodctionMaterial.SUB_MA_TYPE_OUT)
|
||||||
ins.count_ok = ins.count_ok - 1
|
ins.count_ok = ins.count_ok - 1
|
||||||
ins.save()
|
ins.save()
|
||||||
|
|
Loading…
Reference in New Issue