Commit 2eefae34 authored by Jialin's avatar Jialin

代码更新

parent 4df69b5b
......@@ -251,14 +251,15 @@ def class_washing(category, filepath, b=0.01):
)
subtitle_fetch=cursor_zi_new.fetchall()
if not subtitle_fetch:
print('该类别无‘标准参数异常’列名,或者类别名输入有误,请查证数据库。代码继续运行')
print('该类别在vw_property中没有identy不等于0000的数据,请查证数据库')
return
stdparam_col_list=[]
for subtitle_tuple in subtitle_fetch:
if subtitle_tuple[1][2]=='1': # identy第三个值为1代表是标准项
stdparam_col_list.append(subtitle_tuple[0])
if not stdparam_col_list:
print('该类别无标准参数项')
print('该类别无标准参数项, 请去库里查证,代码继续运行')
character_minor_dict = {}
for col_i in stdparam_col_list:
......@@ -266,7 +267,7 @@ def class_washing(category, filepath, b=0.01):
cursor_zi_new.execute(f"select stdvalue from ShuJuZiDian_Cfg where categoryname='{category}' and subtitle='{col_i.strip('*')}'")
standard_value_fetchall=cursor_zi_new.fetchall()
if not standard_value_fetchall:
print(f"{col_i.strip('*')} 不在 ShuJuZiDian_Cfg,请检查。该参数项在此次运行中未被采用")
print(f"{col_i.strip('*')} 不在 ShuJuZiDian_Cfg,请检查。该参数项在此次运行中未被采用,代码继续运行")
continue
standard_value=[]
......
......@@ -160,7 +160,9 @@ def product_washing(filepath, category, thre=1, a=0):
for column in df.columns:
worksheet.write_string(row, col, column, bold_format)
col += 1
worksheet.write_string(row, col, '正确产品编号', bold_format)
worksheet.write_string(row, col, '正确产品编码', bold_format)
col += 1
worksheet.write_string(row, col, '正确产品名称', bold_format)
row = 1
col = 0
for item in related_product:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment