This commit is contained in:
512song committed 2025-06-23 18:07:05 +08:00
1 parent 926edeed0a
commit 678a2c983d
4 files changed
+733 -198

No files matched your search

+37 -37
View File
@@ -10,15 +10,15 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 13,
"id": "bbba6efc-73cd-4db6-bae7-014724fee731",
"metadata": {
"execution": {
"iopub.execute_input": "2025-06-18T03:26:12.021116Z",
"iopub.status.busy": "2025-06-18T03:26:12.020644Z",
"iopub.status.idle": "2025-06-18T03:26:12.049270Z",
"shell.execute_reply": "2025-06-18T03:26:12.048820Z",
"shell.execute_reply.started": "2025-06-18T03:26:12.021068Z"
"iopub.execute_input": "2025-06-20T10:47:35.704078Z",
"iopub.status.busy": "2025-06-20T10:47:35.703306Z",
"iopub.status.idle": "2025-06-20T10:47:35.731176Z",
"shell.execute_reply": "2025-06-20T10:47:35.730652Z",
"shell.execute_reply.started": "2025-06-20T10:47:35.704005Z"
},
"tags": []
},
@@ -27,7 +27,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"73 ok\n"
"79 ok\n"
]
}
],
@@ -50,7 +50,8 @@
" dict1['unit'] = sheet.cell(n, 2).value\n",
" #dict1['sub_unit'] = sheet.cell(n, 6).value\n",
" dict1['birth'] = str(sheet.cell(n, 5).value).replace('/','-').split(' ')[0]\n",
" dict1['phone'] = sheet.cell(n,6).value\n",
" if sheet.cell(n,6).value is not None:\n",
" dict1['phone'] = sheet.cell(n,6).value\n",
" person[code] = dict1\n",
"filename = 'data/东营胜利宾馆人员.json'\n",
"with open(filename, 'w') as fl:\n",
@@ -121,15 +122,15 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 17,
"id": "970e171e-1360-448f-a28c-520ccb8f314a",
"metadata": {
"execution": {
"iopub.execute_input": "2025-06-18T01:40:54.605859Z",
"iopub.status.busy": "2025-06-18T01:40:54.605169Z",
"iopub.status.idle": "2025-06-18T01:40:54.711625Z",
"shell.execute_reply": "2025-06-18T01:40:54.711049Z",
"shell.execute_reply.started": "2025-06-18T01:40:54.605797Z"
"iopub.execute_input": "2025-06-20T10:51:01.494775Z",
"iopub.status.busy": "2025-06-20T10:51:01.494058Z",
"iopub.status.idle": "2025-06-20T10:51:01.506744Z",
"shell.execute_reply": "2025-06-20T10:51:01.505991Z",
"shell.execute_reply.started": "2025-06-20T10:51:01.494710Z"
},
"tags": []
},
@@ -138,7 +139,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"1690\n"
"70\n"
]
}
],
@@ -149,14 +150,14 @@
"from datetime import date\n",
"import my_module as My\n",
"\n",
"filename = 'data/宁夏能化人员.json'\n",
"filename = 'data/东营胜利宾馆人员.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"filename = 'data/marks_20250618.csv'\n",
"filename = 'data/marks_20250620.csv'\n",
"re_ta = My.get_result(filename,dict1)\n",
"\n",
"\n",
"filename = 'data/result_宁夏能化人员.json'\n",
"filename = 'data/result_东营胜利宾馆.json'\n",
"with open(filename,'w') as fl:\n",
" json.dump(re_ta, fl, ensure_ascii=False) \n",
"print(len(re_ta))"
@@ -172,15 +173,15 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 18,
"id": "0905ad6a-f7e4-43ed-ae29-c4850deb946b",
"metadata": {
"execution": {
"iopub.execute_input": "2025-06-18T01:41:01.815005Z",
"iopub.status.busy": "2025-06-18T01:41:01.814285Z",
"iopub.status.idle": "2025-06-18T01:41:01.908319Z",
"shell.execute_reply": "2025-06-18T01:41:01.907777Z",
"shell.execute_reply.started": "2025-06-18T01:41:01.814939Z"
"iopub.execute_input": "2025-06-20T10:51:03.742479Z",
"iopub.status.busy": "2025-06-20T10:51:03.741782Z",
"iopub.status.idle": "2025-06-20T10:51:03.759950Z",
"shell.execute_reply": "2025-06-20T10:51:03.759128Z",
"shell.execute_reply.started": "2025-06-20T10:51:03.742415Z"
}
},
"outputs": [
@@ -199,7 +200,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_宁夏能化人员.json'\n",
"filename = 'data/result_东营胜利宾馆.json'\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl) \n",
"for k, v in dict2.items():\n",
@@ -222,7 +223,7 @@
" dict2[k][item_en]['score'] = My.cal_score(data1)\n",
" #print(k,v[item_en]['成绩'],cal_score(data1))\n",
"\n",
"filename = f'data/result_宁夏能化人员.json'\n",
"filename = f'data/result_东营胜利宾馆.json'\n",
"with open(filename,'w') as fl:\n",
" json.dump(dict2,fl , ensure_ascii=False) \n",
"print('ok!') "
@@ -238,15 +239,15 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 19,
"id": "867ad6b0-9e9d-48bc-a10a-3b9cb6125890",
"metadata": {
"execution": {
"iopub.execute_input": "2025-06-18T01:41:10.410077Z",
"iopub.status.busy": "2025-06-18T01:41:10.409472Z",
"iopub.status.idle": "2025-06-18T01:41:10.837219Z",
"shell.execute_reply": "2025-06-18T01:41:10.836678Z",
"shell.execute_reply.started": "2025-06-18T01:41:10.410021Z"
"iopub.execute_input": "2025-06-20T10:51:06.440772Z",
"iopub.status.busy": "2025-06-20T10:51:06.440201Z",
"iopub.status.idle": "2025-06-20T10:51:06.470414Z",
"shell.execute_reply": "2025-06-20T10:51:06.469898Z",
"shell.execute_reply.started": "2025-06-20T10:51:06.440747Z"
},
"tags": []
},
@@ -258,22 +259,21 @@
"items = ['lung','grip','flexion','jump','pushup','situp','balance','reaction','step']\n",
"title = ['编号','姓名','性别','单位','部门','身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"\n",
"filename = 'data/result_宁夏能化人员.json'\n",
"filename = 'data/result_东营胜利宾馆.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"\n",
"filename = 'data/宁夏能化人员.json'\n",
"filename = 'data/东营胜利宾馆人员.json'\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl)\n",
" \n",
"list1 = []\n",
"for k, v in dict1.items():\n",
" list2 = []\n",
" list2.append(str(k).rjust(5,'0'))\n",
" list2.append(str(k).rjust(6,'0'))\n",
" list2.append(v['name']) \n",
" list2.append(dict2[k]['sex'])\n",
" list2.append(dict2[k]['unit'])\n",
" list2.append(dict2[k]['sub_unit'])\n",
" if 'bmi' in v.keys():\n",
" height = v['bmi']['成绩'].split(',')[0]\n",
" weight = v['bmi']['成绩'].split(',')[1]\n",
@@ -291,7 +291,7 @@
" list2.append('')\n",
" \n",
" list1.append(list2)\n",
"filename = 'data/宁夏能化测试情况明细表.xlsx'\n",
"filename = 'data/东营胜利宾馆测试情况明细表.xlsx'\n",
"wb = openpyxl.Workbook()\n",
"sheet = wb.active\n",
"sheet.append(title)\n",