冷加工产品合格率为1
This commit is contained in:
parent
db270f7914
commit
d01ca7df0f
|
@ -50,7 +50,9 @@ class ProcessYieldView(CreateAPIView):
|
|||
if m['step__process__id'] == ret_item['id']:
|
||||
ret_item['count_ok'] = m['count_ok']
|
||||
for n in count_notok_g:
|
||||
if n['step__process__id'] == ret_item['id']:
|
||||
if n['step__process__id'] == 1: # 如果是冷加工
|
||||
ret['count_notok'] = ret_item['count_ok']
|
||||
elif n['step__process__id'] == ret_item['id']:
|
||||
ret_item['count_notok'] = n['count_notok']
|
||||
rate = (ret_item['count_ok']/(ret_item['count_ok']+ret_item['count_notok'])) \
|
||||
if ret_item['count_ok']+ret_item['count_notok']>0 else 1
|
||||
|
|
Loading…
Reference in New Issue