This commit is contained in:
512song committed 2024-11-06 15:41:52 +08:00
1 parent 7af0af0f7e
commit 569345e192
3 files changed
+834 -128

No files matched your search

+22 -22
View File
@@ -431,15 +431,15 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 23,
"id": "3e614f4a-a623-48e2-97f8-b31f62c9a983",
"metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:28:16.776885Z",
"iopub.status.busy": "2024-10-22T02:28:16.776070Z",
"iopub.status.idle": "2024-10-22T02:28:16.799797Z",
"shell.execute_reply": "2024-10-22T02:28:16.798876Z",
"shell.execute_reply.started": "2024-10-22T02:28:16.776803Z"
"iopub.execute_input": "2024-11-06T07:40:00.103580Z",
"iopub.status.busy": "2024-11-06T07:40:00.102762Z",
"iopub.status.idle": "2024-11-06T07:40:00.398714Z",
"shell.execute_reply": "2024-11-06T07:40:00.398050Z",
"shell.execute_reply.started": "2024-11-06T07:40:00.103502Z"
},
"tags": []
},
@@ -448,8 +448,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"44\n",
"44\n"
"4078\n",
"4078\n"
]
}
],
@@ -482,11 +482,11 @@
"re_ta = {}\n",
"dict1 = {}\n",
"list1 = []\n",
"filename = 'data/中国石化化工销售.json'\n",
"filename = 'data/天津石化人员2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"\n",
"filename = 'data/places_result_20241022.csv'\n",
"filename = 'data/places_result_20241104.csv'\n",
"with open(filename,'r',newline='') as csv_file:\n",
" fl = csv.reader(csv_file,delimiter=',')\n",
" header = next(fl) \n",
@@ -527,7 +527,7 @@
" score = int(result[4])/item[m_item]['divisor'] \n",
" re_ta[user][item_name]['成绩'] = f'{score} {item[m_item][\"unit\"]}'\n",
"print(len(re_ta))\n",
"filename = 'data/result_中国石化化工销售2023.json'\n",
"filename = 'data/result_天津石化2024.json'\n",
"\n",
"with open(filename,'w') as fl:\n",
" json.dump(re_ta, fl, ensure_ascii=False) \n",
@@ -544,15 +544,15 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 24,
"id": "141b30dc-5975-4dcb-9bc3-9b20d26a0917",
"metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:28:54.799670Z",
"iopub.status.busy": "2024-10-22T02:28:54.798913Z",
"iopub.status.idle": "2024-10-22T02:28:54.824340Z",
"shell.execute_reply": "2024-10-22T02:28:54.823796Z",
"shell.execute_reply.started": "2024-10-22T02:28:54.799596Z"
"iopub.execute_input": "2024-11-06T07:40:45.997372Z",
"iopub.status.busy": "2024-11-06T07:40:45.996600Z",
"iopub.status.idle": "2024-11-06T07:40:46.225740Z",
"shell.execute_reply": "2024-11-06T07:40:46.225151Z",
"shell.execute_reply.started": "2024-11-06T07:40:45.997299Z"
},
"tags": []
},
@@ -662,7 +662,7 @@
"\n",
"#list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp','height','weight']\n",
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp']\n",
"filename = 'data/result_中国石化化工销售2023.json'\n",
"filename = 'data/result_天津石化2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl) \n",
"for k, v in dict2.items():\n",
@@ -683,7 +683,7 @@
" dict2[k][item_en]['score'] = cal_score(data1)\n",
" #print(k,v[item_en]['成绩'],cal_score(data1))\n",
"\n",
"filename = f'data/result_中国石化化工销售2023.json'\n",
"filename = f'data/result_天津石化2024.json'\n",
"with open(filename,'w') as fl:\n",
" json.dump(dict2,fl , ensure_ascii=False) \n",
"print('ok!') "
@@ -729,11 +729,11 @@
"headers = {\n",
" \"Content-Type\": \"application/json; charset=UTF-8\"\n",
" }\n",
"filename = 'data/result_东营工程设计院2024_all.json'\n",
"filename = 'data/result_天津石化2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"list1 = []\n",
"file_path ='./中石化石油工程设计有限公司1/'\n",
"file_path ='./天津石化2024/'\n",
"list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp','bmi']\n",
"i=0\n",
"list2 = []\n",
@@ -743,7 +743,7 @@
" \n",
" id = str(k).rjust(4,\"0\")\n",
" mydata['path'] = file_path+id+'-'+ v['name']+'.pdf'\n",
" mydata['title'] = '中石化石油工程设计有限公司'\n",
" mydata['title'] = '天津石化2024'\n",
" mydata['subtitle'] = v['unit']\n",
" mydata['id'] = id\n",
" mydata['name'] = v['name']\n",
+38 -31
View File
@@ -2869,15 +2869,15 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 53,
"id": "2fdbadd7-e9b1-45bf-ae95-52b4d65e03e8",
"metadata": {
"execution": {
"iopub.execute_input": "2024-10-23T09:55:33.364069Z",
"iopub.status.busy": "2024-10-23T09:55:33.363405Z",
"iopub.status.idle": "2024-10-23T09:55:33.951219Z",
"shell.execute_reply": "2024-10-23T09:55:33.950610Z",
"shell.execute_reply.started": "2024-10-23T09:55:33.364010Z"
"iopub.execute_input": "2024-10-30T11:24:58.227514Z",
"iopub.status.busy": "2024-10-30T11:24:58.226738Z",
"iopub.status.idle": "2024-10-30T11:24:58.856785Z",
"shell.execute_reply": "2024-10-30T11:24:58.856213Z",
"shell.execute_reply.started": "2024-10-30T11:24:58.227440Z"
}
},
"outputs": [
@@ -2978,15 +2978,15 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 60,
"id": "f922ad6a-e7ff-4ff9-923f-3e7aa8ea112b",
"metadata": {
"execution": {
"iopub.execute_input": "2024-10-23T09:55:59.147673Z",
"iopub.status.busy": "2024-10-23T09:55:59.146895Z",
"iopub.status.idle": "2024-10-23T09:55:59.282790Z",
"shell.execute_reply": "2024-10-23T09:55:59.282220Z",
"shell.execute_reply.started": "2024-10-23T09:55:59.147598Z"
"iopub.execute_input": "2024-11-04T01:48:56.782816Z",
"iopub.status.busy": "2024-11-04T01:48:56.782058Z",
"iopub.status.idle": "2024-11-04T01:48:57.061456Z",
"shell.execute_reply": "2024-11-04T01:48:57.060893Z",
"shell.execute_reply.started": "2024-11-04T01:48:56.782746Z"
}
},
"outputs": [
@@ -2994,8 +2994,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"2284\n",
"2284\n"
"4078\n",
"4078\n"
]
}
],
@@ -3018,7 +3018,7 @@
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"\n",
"filename = 'data/places_result_20241023.csv'\n",
"filename = 'data/places_result_20241104.csv'\n",
"with open(filename,'r',newline='') as csv_file:\n",
" fl = csv.reader(csv_file,delimiter=',')\n",
" header = next(fl) \n",
@@ -3057,15 +3057,15 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 62,
"id": "f59cf12c-d409-4de8-80f9-8264e4a2d221",
"metadata": {
"execution": {
"iopub.execute_input": "2024-10-23T09:56:07.021662Z",
"iopub.status.busy": "2024-10-23T09:56:07.021113Z",
"iopub.status.idle": "2024-10-23T09:56:07.230651Z",
"shell.execute_reply": "2024-10-23T09:56:07.230168Z",
"shell.execute_reply.started": "2024-10-23T09:56:07.021612Z"
"iopub.execute_input": "2024-11-04T01:50:30.199976Z",
"iopub.status.busy": "2024-11-04T01:50:30.199216Z",
"iopub.status.idle": "2024-11-04T01:50:31.228142Z",
"shell.execute_reply": "2024-11-04T01:50:31.227668Z",
"shell.execute_reply.started": "2024-11-04T01:50:30.199902Z"
}
},
"outputs": [],
@@ -3074,8 +3074,8 @@
"import openpyxl\n",
"\n",
"items = ['身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"#title = ['编号','姓名','性别','单位','部门','身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"title = ['编号','姓名','性别','单位','部门']\n",
"title = ['编号','姓名','性别','单位','部门','身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"\n",
"filename = 'data/result_天津2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
@@ -3092,8 +3092,15 @@
" list2.append(dict2[k]['sex'])\n",
" list2.append(dict2[k]['unit'])\n",
" list2.append(dict2[k]['sub_unit'])\n",
" for item in items:\n",
" if item in v.keys():\n",
" list2.append(v[item]['成绩']) \n",
" elif item =='name':\n",
" list2.append(v[item])\n",
" else:\n",
" list2.append('') \n",
" list1.append(list2)\n",
"filename = 'data/天津石化体测情况(截至20241023).xlsx'\n",
"filename = 'data/天津石化体测情况(2024年).xlsx'\n",
"wb = openpyxl.Workbook()\n",
"sheet = wb.active\n",
"sheet.append(title)\n",
@@ -3113,15 +3120,15 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 59,
"id": "8301201e-43fc-4d24-94a0-9c554ca39dfb",
"metadata": {
"execution": {
"iopub.execute_input": "2024-10-23T09:56:17.323294Z",
"iopub.status.busy": "2024-10-23T09:56:17.322526Z",
"iopub.status.idle": "2024-10-23T09:56:17.364386Z",
"shell.execute_reply": "2024-10-23T09:56:17.363829Z",
"shell.execute_reply.started": "2024-10-23T09:56:17.323222Z"
"iopub.execute_input": "2024-10-31T09:18:08.391778Z",
"iopub.status.busy": "2024-10-31T09:18:08.391003Z",
"iopub.status.idle": "2024-10-31T09:18:08.453792Z",
"shell.execute_reply": "2024-10-31T09:18:08.453243Z",
"shell.execute_reply.started": "2024-10-31T09:18:08.391707Z"
}
},
"outputs": [],
@@ -3157,7 +3164,7 @@
" list2 = [k,v['人数']]\n",
" list1.append(list2)\n",
"\n",
"filename = 'data/天津部门未测试情况(截至20241023).xlsx'\n",
"filename = 'data/天津部门未测试情况(截至20241031).xlsx'\n",
"wb = openpyxl.Workbook()\n",
"sheet = wb.active\n",
"sheet.append(title)\n",
+774 -75
View File
File diff suppressed because it is too large. Load diff