fix: inm校验非正数
This commit is contained in:
parent
e24d92fe9b
commit
0489a545e8
|
@ -63,6 +63,8 @@ def do_out(item: MIOItem):
|
|||
xbatch:str = al[1]
|
||||
xcount:str = al[2]
|
||||
xbatches.append(xbatch)
|
||||
if xcount <= 0:
|
||||
raise ParseError("存在非正数!")
|
||||
mb = None
|
||||
if not is_zhj:
|
||||
try:
|
||||
|
@ -140,6 +142,8 @@ def do_in(item: MIOItem):
|
|||
xbatchs = []
|
||||
for al in action_list:
|
||||
xmaterial, xbatch, xcount = al
|
||||
if xcount <= 0:
|
||||
raise ParseError("存在非正数!")
|
||||
xbatchs.append(xbatch)
|
||||
# 扣减车间库存
|
||||
wm_qs = WMaterial.objects.filter(
|
||||
|
@ -353,7 +357,7 @@ class InmService:
|
|||
|
||||
for material, warehouse, batch, change_count, defect, mioitem in m_list:
|
||||
if change_count <= 0:
|
||||
continue
|
||||
raise ParseError("存在非正数!")
|
||||
state = WMaterial.WM_OK
|
||||
if defect:
|
||||
state = WMaterial.WM_NOTOK
|
||||
|
|
Loading…
Reference in New Issue