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