fix: do_in wm_production_dept

This commit is contained in:
caoqianming 2024-11-21 17:23:35 +08:00
parent 8c63aea877
commit 2c569db0d8
1 changed files with 3 additions and 2 deletions

View File

@ -132,9 +132,10 @@ def do_in(item: MIOItem):
else:
raise ParseError(f'{str(xmaterial)}-{xbatch}车间物料不足')
wm_production_dept = wm.mgroup.belong_dept if wm.mgroup else None
if production_dept is None:
production_dept = wm.mgroup.belong_dept
elif production_dept != wm.mgroup.belong_dept:
production_dept = wm_production_dept
elif wm_production_dept and production_dept != wm_production_dept:
raise ParseError(f'{str(xmaterial)}-{xbatch}车间物料不属于同一车间')
# 增加mb
if not is_zhj: