feat: 组合件和入库检验追加统计分析
This commit is contained in:
parent
7c752ec39b
commit
ac610a53ce
|
@ -58,6 +58,8 @@ def do_out(item: MIOItem):
|
||||||
raise ParseError("组合件暂不支持追踪单件")
|
raise ParseError("组合件暂不支持追踪单件")
|
||||||
|
|
||||||
xbatches = []
|
xbatches = []
|
||||||
|
if is_zhj:
|
||||||
|
xbatches = [item.batch]
|
||||||
for al in action_list:
|
for al in action_list:
|
||||||
xmaterial:Material = al[0]
|
xmaterial:Material = al[0]
|
||||||
xbatch:str = al[1]
|
xbatch:str = al[1]
|
||||||
|
@ -140,6 +142,8 @@ def do_in(item: MIOItem):
|
||||||
production_dept = None
|
production_dept = None
|
||||||
|
|
||||||
xbatchs = []
|
xbatchs = []
|
||||||
|
if is_zhj:
|
||||||
|
xbatchs = [item.batch]
|
||||||
for al in action_list:
|
for al in action_list:
|
||||||
xmaterial, xbatch, xcount = al
|
xmaterial, xbatch, xcount = al
|
||||||
if xcount <= 0:
|
if xcount <= 0:
|
||||||
|
@ -351,7 +355,9 @@ class InmService:
|
||||||
defect = defects_map[defect_id]
|
defect = defects_map[defect_id]
|
||||||
m_list.append((material, warehouse, i.batch, xcount, defect, i))
|
m_list.append((material, warehouse, i.batch, xcount, defect, i))
|
||||||
|
|
||||||
|
xbatchs = []
|
||||||
for material, warehouse, batch, change_count, defect, mioitem in m_list:
|
for material, warehouse, batch, change_count, defect, mioitem in m_list:
|
||||||
|
xbatchs.append(batch)
|
||||||
if change_count <= 0:
|
if change_count <= 0:
|
||||||
raise ParseError("存在非正数!")
|
raise ParseError("存在非正数!")
|
||||||
state = WMaterial.WM_OK
|
state = WMaterial.WM_OK
|
||||||
|
@ -402,6 +408,10 @@ class InmService:
|
||||||
else:
|
else:
|
||||||
raise ParseError("不支持的操作")
|
raise ParseError("不支持的操作")
|
||||||
|
|
||||||
|
# 批次统计分析
|
||||||
|
xbatchs = list(set(xbatchs))
|
||||||
|
for xbatch in xbatchs:
|
||||||
|
MyThread(target=get_alldata_with_batch_and_store, args=(xbatch,)).start()
|
||||||
|
|
||||||
def daoru_mb(path: str):
|
def daoru_mb(path: str):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue