feat: 修改导出文字等

This commit is contained in:
caoqianming 2023-12-13 09:33:23 +08:00
parent fea5db0b78
commit 2e51df333f
3 changed files with 7 additions and 7 deletions

View File

@ -478,7 +478,7 @@
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string>5</string> <string>0</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="bStart"> <widget class="QPushButton" name="bStart">

View File

@ -190,7 +190,7 @@ def get_cbma_info_from_db_and_ana(year: str = '2023'):
# 矫正数据类型 # 矫正数据类型
df_fx = df_fx.applymap(float_to_int) df_fx = df_fx.applymap(float_to_int)
# 先输出原始统计数据 # 先输出原始统计数据
origin_path = os.path.join(BASE_DIR, f'summary/{year}_fx.xlsx') origin_path = os.path.join(BASE_DIR, f'summary/{year}年_汇总分析.xlsx')
df_fx.to_excel(origin_path, index=True) df_fx.to_excel(origin_path, index=True)
# 追加到总院年分析表中 # 追加到总院年分析表中
@ -209,7 +209,7 @@ def get_cbma_info_from_db_and_ana(year: str = '2023'):
sheet.cell(row=ind_zy+3, column=7, value=row['id']) sheet.cell(row=ind_zy+3, column=7, value=row['id'])
sheet.cell(row=ind_zy+3, column=8, value=row['content_url']) sheet.cell(row=ind_zy+3, column=8, value=row['content_url'])
ind_zy = ind_zy + 1 ind_zy = ind_zy + 1
cbma_path = os.path.join(BASE_DIR, f'summary/{year}年_cbma.xlsx') cbma_path = os.path.join(BASE_DIR, f'summary/{year}年_总院文章.xlsx')
workbook.save(cbma_path) workbook.save(cbma_path)
print(f'总院{year}年文章表生成完毕!') print(f'总院{year}年文章表生成完毕!')
@ -225,7 +225,7 @@ def get_cbma_info_from_db_and_ana(year: str = '2023'):
sheet2.cell(row=12, column=5+2*ind, value=df_fx.at[row_ind_df_fx, '供总院全年阅读10000及以上数']) sheet2.cell(row=12, column=5+2*ind, value=df_fx.at[row_ind_df_fx, '供总院全年阅读10000及以上数'])
sheet2.cell(row=13, column=5+2*ind, value=df_fx.at[row_ind_df_fx, '供总院全年阅读5000及以上数']) sheet2.cell(row=13, column=5+2*ind, value=df_fx.at[row_ind_df_fx, '供总院全年阅读5000及以上数'])
sheet2.cell(row=14, column=5+2*ind, value=df_fx.at[row_ind_df_fx, '供总院全年阅读1000及以上数']) sheet2.cell(row=14, column=5+2*ind, value=df_fx.at[row_ind_df_fx, '供总院全年阅读1000及以上数'])
cbma_cal_path = os.path.join(BASE_DIR, f'summary/{year}年_cbma_cal.xlsx') cbma_cal_path = os.path.join(BASE_DIR, f'summary/{year}年_总院打分.xlsx')
workbook2.save(cbma_cal_path) workbook2.save(cbma_cal_path)
print(f'总院{year}年打分表生成完毕!') print(f'总院{year}年打分表生成完毕!')
@ -286,7 +286,7 @@ def get_cbma_info_from_db_and_ana(year: str = '2023'):
# sheet.cell(row=25, column=3, value=df_fx.at[dw_list.index('水泥新材院'), f'{i}发布数']) # sheet.cell(row=25, column=3, value=df_fx.at[dw_list.index('水泥新材院'), f'{i}发布数'])
sheet.cell(row=25, column=6, value=df_fx.at[dw_list.index('水泥新材院'), f'供总院{i}稿数']) sheet.cell(row=25, column=6, value=df_fx.at[dw_list.index('水泥新材院'), f'供总院{i}稿数'])
# sheet.cell(row=26, column=3, value=df_fx.at[dw_list.index('中建材科创院'), f'{i}发布数']) sheet.cell(row=26, column=3, value=df_fx.at[dw_list.index('中建材科创院'), f'{i}发布数'])
sheet.cell(row=26, column=6, value=df_fx.at[dw_list.index('中建材科创院'), f'供总院{i}稿数']) sheet.cell(row=26, column=6, value=df_fx.at[dw_list.index('中建材科创院'), f'供总院{i}稿数'])
# sheet.cell(row=27, column=3, value=df_fx.at[dw_list.index('科建苑'), f'{i}发布数']) # sheet.cell(row=27, column=3, value=df_fx.at[dw_list.index('科建苑'), f'{i}发布数'])
@ -304,7 +304,7 @@ def get_cbma_info_from_db_and_ana(year: str = '2023'):
sheet.cell(row=33, column=7, value=df_fx.at[dw_list.index('审计办公室'), f'供总院{i}稿数']) sheet.cell(row=33, column=7, value=df_fx.at[dw_list.index('审计办公室'), f'供总院{i}稿数'])
cbma_month_path = os.path.join(BASE_DIR, f'summary/{year}年_cbma_month.xlsx') cbma_month_path = os.path.join(BASE_DIR, f'summary/{year}年_单位月度.xlsx')
workbook3.save(cbma_month_path) workbook3.save(cbma_month_path)
print(f'总院{year}年月度表生成完毕!') print(f'总院{year}年月度表生成完毕!')

View File

@ -274,7 +274,7 @@ class Ui_MainWindow(object):
self.label_2.setText(QCoreApplication.translate("MainWindow", u"\u8bf7\u5728\u4fee\u6539\u540e\u4fdd\u5b58\u5e76\u5173\u95ed", None)) self.label_2.setText(QCoreApplication.translate("MainWindow", u"\u8bf7\u5728\u4fee\u6539\u540e\u4fdd\u5b58\u5e76\u5173\u95ed", None))
self.label_6.setText(QCoreApplication.translate("MainWindow", u"\u5c0f\u4e8e", None)) self.label_6.setText(QCoreApplication.translate("MainWindow", u"\u5c0f\u4e8e", None))
self.label_3.setText(QCoreApplication.translate("MainWindow", u"KB-Chrome", None)) self.label_3.setText(QCoreApplication.translate("MainWindow", u"KB-Chrome", None))
self.lSize.setText(QCoreApplication.translate("MainWindow", u"5", None)) self.lSize.setText(QCoreApplication.translate("MainWindow", u"0", None))
self.bStart.setText(QCoreApplication.translate("MainWindow", u"\u5f00\u59cb\u722c\u53d6", None)) self.bStart.setText(QCoreApplication.translate("MainWindow", u"\u5f00\u59cb\u722c\u53d6", None))
self.groupBox_7.setTitle(QCoreApplication.translate("MainWindow", u"\u603b\u9662\u5b98\u5fae", None)) self.groupBox_7.setTitle(QCoreApplication.translate("MainWindow", u"\u603b\u9662\u5b98\u5fae", None))
self.label_10.setText(QCoreApplication.translate("MainWindow", u"\u5206\u6790\u6c47\u603b\u6570\u636e", None)) self.label_10.setText(QCoreApplication.translate("MainWindow", u"\u5206\u6790\u6c47\u603b\u6570\u636e", None))