diff --git a/apps/wpm/services_2.py b/apps/wpm/services_2.py index 3769da35..534215a2 100644 --- a/apps/wpm/services_2.py +++ b/apps/wpm/services_2.py @@ -101,7 +101,7 @@ def get_alldata_with_batch(batch: str): data["棒料成型_切料人"] = list(set(data["棒料成型_切料人"])) data["棒料成型_切料人"] = ";".join([item.name for item in data["棒料成型_切料人"]]) data["棒料成型_日期"] = list(set(data["棒料成型_日期"])) - data["棒料成型_日期"] = [item.strftime("%Y-%m-%d") for item in data["棒料成型_日期"]] + data["棒料成型_日期"] = ";".join([item.strftime("%Y-%m-%d") for item in data["棒料成型_日期"]]) try: data["棒料成型_合格率"] = round((data["棒料成型_count_ok"] * 100/ data["棒料成型_count_real"]), 1) except ZeroDivisionError: @@ -134,7 +134,7 @@ def get_alldata_with_batch(batch: str): data["产品规格"] = ";".join([item.specification for item in data["产品规格"]]) data["管料成型_合格率"] = round((data["管料成型_count_ok"] * 100 / data["管料成型_count_real"]), 1) data["管料成型_日期"] = list(set(data["管料成型_日期"])) - data["管料成型_日期"] = [item.strftime("%Y-%m-%d") for item in data["管料成型_日期"]] + data["管料成型_日期"] = ";".join([item.strftime("%Y-%m-%d") for item in data["管料成型_日期"]]) # 7车间生产入库数据/ 8车间中检数据 mioitem_count_fields = MIOItem.count_fields() @@ -483,6 +483,8 @@ def get_f_l_date(data): for k, v in data.items(): if k.endswith("_日期"): if v: + if isinstance(v, list): + myLogger.error(f"get_f_l_date {k} {v}") v = v.split(";") if first_date is None: first_date = min(v)