feat: get_alldata_with_batch 其他入库也需要记录产品规格

This commit is contained in:
caoqianming 2024-12-04 12:37:08 +08:00
parent a69f718859
commit 784500bf5b
1 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,8 @@ def get_alldata_with_batch(batch: str):
mlog_count_fields = Mlog.count_fields()
data["产品规格"] = []
if mlogs_blcx_qs.exists():
data["产品规格"] = []
data["棒料成型_出料人"] = []
@ -182,7 +184,15 @@ def get_alldata_with_batch(batch: str):
data["六车间领料_日期"] = []
data["六车间领料_车间执行人"] = []
data["六车间领料_仓库执行人"] = []
add_guige = False
if data["产品规格"]:
pass
else:
add_guige = True
data["产品规格"] = []
for item in mioitem6_qs:
if add_guige:
data["产品规格"].append(item.material)
last_time = item.update_time if item.update_time > last_time else last_time
data["六车间领料_日期"].append(item.mio.inout_date)
if item.mio.do_user:
@ -201,6 +211,11 @@ def get_alldata_with_batch(batch: str):
data["六车间领料_仓库执行人"] = ";".join([item.name for item in data["六车间领料_仓库执行人"]])
data["六车间领料_车间执行人"] = list(set(data["六车间领料_车间执行人"]))
data["六车间领料_车间执行人"] = ";".join([item.name for item in data["六车间领料_车间执行人"]])
if add_guige:
data["产品规格"] = list(set(data["产品规格"]))
data["产品规格"] = ";".join([item.specification for item in data["产品规格"]])
# 六车间工段生产数据
# 六车间工段生产数据
mgroup_list = ["平头", "粘铁头", "粗中细磨", "抛光", "开槽"]