获取下一步子工序bug
This commit is contained in:
parent
de1a17f166
commit
0fb897d75b
|
@ -139,7 +139,7 @@ class WProduct(CommonAModel):
|
|||
@property
|
||||
def last_wp_test(self):
|
||||
"""
|
||||
最后提交的本产品自检
|
||||
最后提交的本产品工序自检
|
||||
"""
|
||||
return self.test_wproduct.filter(is_submited=True).order_by('-id').first()
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd
|
|||
|
||||
if step == newstep:
|
||||
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
||||
last_test = wp.last_wp_test
|
||||
last_test = wp.last_process_test
|
||||
if last_test and reuseForm:
|
||||
last_test.is_midtesting = False
|
||||
last_test.is_submited = False
|
||||
|
@ -718,7 +718,7 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd
|
|||
wp.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
||||
if needTest: #子工序若需要检验
|
||||
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
||||
last_test = wp.last_wp_test
|
||||
last_test = wp.last_process_test
|
||||
if last_test and reuseForm:
|
||||
last_test.is_midtesting = True
|
||||
last_test.is_submited = False
|
||||
|
@ -770,7 +770,7 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd
|
|||
wproduct.subproduction_plan = oms_w.subproduction_plan
|
||||
if step == newstep:
|
||||
wproduct.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
||||
last_test = wproduct.last_wp_test
|
||||
last_test = wproduct.last_process_test
|
||||
if last_test and reuseForm:
|
||||
last_test.is_midtesting = False
|
||||
last_test.is_submited = False
|
||||
|
@ -781,7 +781,7 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd
|
|||
wproduct.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
||||
if needTest:
|
||||
wproduct.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
||||
last_test = wproduct.last_wp_test
|
||||
last_test = wproduct.last_process_test
|
||||
if last_test and reuseForm:
|
||||
last_test.is_midtesting = True
|
||||
last_test.is_submited = False
|
||||
|
|
Loading…
Reference in New Issue