diff --git a/tools/cal_weight_excel.py b/tools/cal_weight_excel.py index 9a22833..5927431 100644 --- a/tools/cal_weight_excel.py +++ b/tools/cal_weight_excel.py @@ -79,16 +79,26 @@ def main(action, pid, sizes,orderId=0): df = pd.read_excel(excel_file) new_data = { 'pid': [pid], # 假设新的 pid 是 '002' - '1/4': [0], # 新的 6cm 数据 - '1/6': [0], # 新的 7cm 数据 - '1/10': [0], # 新的 8cm 数据 - '1/12': [0], # 新的 8cm 数据 - '1/16': [0], # 新的 8cm 数据 - '1/18': [0], # 新的 8cm 数据 - '1/24': [0], # 新的 8cm 数据 - '1/32': [0], # 新的 8cm 数据 - '1/43': [0], # 新的 8cm 数据 - '1/64': [0], # 新的 8cm 数据 + '1/4尺寸': [0], + '1/4': [0], + '1/6尺寸': [0], + '1/6': [0], + '1/10尺寸': [0], + '1/10': [0], + '1/12尺寸': [0], + '1/12': [0], + '1/16尺寸': [0], + '1/16': [0], + '1/18尺寸': [0], + '1/18': [0], + '1/24尺寸': [0], + '1/24': [0], + '1/32尺寸': [0], + '1/32': [0], + '1/43尺寸': [0], + '1/43': [0], + '1/64尺寸': [0], + '1/64': [0], } for sizeV in sizes: @@ -99,7 +109,8 @@ def main(action, pid, sizes,orderId=0): arrData[arrSize[1]] = str(weight)+"g" if arrSize[1] in df.columns: - new_data[arrSize[1]] = [str(weight) + "("+str(size)+"cm)"] + new_data[arrSize[1]+"尺寸"] = [str(size/10)+"cm"] + new_data[arrSize[1]] = [str(weight)] # 更新数据 # 将新数据转换为 DataFrame diff --git a/tools/weights.xlsx b/tools/weights.xlsx index 1308d2d..9897568 100644 Binary files a/tools/weights.xlsx and b/tools/weights.xlsx differ