From 7142d5adebf9baea3d1f6b49ba01af33369cba53 Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Wed, 27 Mar 2024 15:01:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A2=98=E5=8F=B7=E4=BD=8D?= =?UTF-8?q?=E6=95=B0=E5=BC=95=E8=B5=B7=E7=9A=84=E4=B8=80=E4=B8=AA=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E4=BD=BF=E7=94=A8=E8=AE=B0=E5=BD=95=E6=97=B6=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E4=BC=9A=E5=8F=91=E7=94=9F=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 6 ++++++ 工具v2/获取小闲平台使用数据new.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index 167e2d3c..b6a9531c 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -2245,5 +2245,11 @@ def usagelistdifference(lista,listb): #比较两个usage数组的最大差别( return maxdiff +def RefineExclude(excludejson): #将excludejson的key变为6位题号 + newjson = {} + for key in excludejson: + newjson[key.zfill(6)] = excludejson[key] + return newjson + if __name__ == "__main__": print("数据库工具, import用.") \ No newline at end of file diff --git a/工具v2/获取小闲平台使用数据new.py b/工具v2/获取小闲平台使用数据new.py index 43611cec..ea60be8e 100644 --- a/工具v2/获取小闲平台使用数据new.py +++ b/工具v2/获取小闲平台使用数据new.py @@ -143,7 +143,7 @@ class MyWindow(QWidget,Ui_Form): validcols,marks = generateColIndexandMarks(statsfilepathlist,self.statsfilename,paperinfo) dfcurrent = pd.read_excel(os.path.join(statsfilepathlist[0],self.statsfilename)) correspondence_dict = generateIDtoUsageCorrespondence(idlist,validcols,dfcurrent.iloc[1,validcols]) - output = CalculateUsages(statsfilepathlist,self.statsfilename,gradename,threshold,marks,correspondence_dict,validcols,date,exclude=excludejson) + output = CalculateUsages(statsfilepathlist,self.statsfilename,gradename,threshold,marks,correspondence_dict,validcols,date,exclude=RefineExclude(excludejson)) return output #返回由usages开始的使用记录文本 except: return 1 #无法生成就返回1