feat: 光子批次统计增加组合件信息6
This commit is contained in:
parent
dbde5a1327
commit
d130f75076
|
@ -486,11 +486,6 @@ def main(batch: str, mgroup_obj=None):
|
|||
|
||||
|
||||
if "销售发货_日期" in data:
|
||||
if getattr(data, "棒料成型_count_real", 0) > 0:
|
||||
data["七车间_批次发货合格率"] = round(data["销售发货_count"] * 100/ data["棒料成型_count_real"], 1)
|
||||
if getattr(data, "六车间领料_count", 0) > 0:
|
||||
data["六车间_批次发货合格率"] = round(data["销售发货_count"] * 100/ data["六车间领料_count"], 1)
|
||||
|
||||
data['销售发货_仓库执行人'] = list(set(data['销售发货_仓库执行人']))
|
||||
data['销售发货_仓库执行人'] = ";".join([item.name for item in data['销售发货_仓库执行人']])
|
||||
data["销售发货_日期"] = list(set(data["销售发货_日期"]))
|
||||
|
@ -498,9 +493,9 @@ def main(batch: str, mgroup_obj=None):
|
|||
data["销售发货_小日期"] = max(data["销售发货_日期"]).strftime("%Y-%m-%d")
|
||||
data["销售发货_大日期"] = min(data["销售发货_日期"]).strftime("%Y-%m-%d")
|
||||
data["销售发货_日期"] = ";".join([item.strftime("%Y-%m-%d") for item in data["销售发货_日期"]])
|
||||
if getattr(data, "六车间领料_count", 0) > 0:
|
||||
if data.get("六车间领料_count", 0) > 0:
|
||||
data["六车间_批次生产合格率"] = round(data["销售发货_count"] * 100/ data["六车间领料_count"], 1)
|
||||
if getattr(data, "棒料成型_count_real", 0) > 0:
|
||||
if data.get("棒料成型_count_real", 0) > 0:
|
||||
data["七车间_批次应出合格率"] = round(data["销售发货_count"] * 100/ data["棒料成型_count_real"], 1)
|
||||
|
||||
res = get_f_l_date(data)
|
||||
|
|
Loading…
Reference in New Issue