fix: do_in wm_production_dept
This commit is contained in:
parent
8c63aea877
commit
2c569db0d8
|
@ -132,9 +132,10 @@ def do_in(item: MIOItem):
|
||||||
else:
|
else:
|
||||||
raise ParseError(f'{str(xmaterial)}-{xbatch}车间物料不足')
|
raise ParseError(f'{str(xmaterial)}-{xbatch}车间物料不足')
|
||||||
|
|
||||||
|
wm_production_dept = wm.mgroup.belong_dept if wm.mgroup else None
|
||||||
if production_dept is None:
|
if production_dept is None:
|
||||||
production_dept = wm.mgroup.belong_dept
|
production_dept = wm_production_dept
|
||||||
elif production_dept != wm.mgroup.belong_dept:
|
elif wm_production_dept and production_dept != wm_production_dept:
|
||||||
raise ParseError(f'{str(xmaterial)}-{xbatch}车间物料不属于同一车间')
|
raise ParseError(f'{str(xmaterial)}-{xbatch}车间物料不属于同一车间')
|
||||||
# 增加mb
|
# 增加mb
|
||||||
if not is_zhj:
|
if not is_zhj:
|
||||||
|
|
Loading…
Reference in New Issue