20241122
This commit is contained in:
1 parent
aede8ad173
commit
ac36b00339
5 files changed
+297
-152
No files matched your search
@@ -1472,7 +1472,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.12"
|
||||
"version": "3.12.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
+62
-120
@@ -3,7 +3,9 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e6dcc663-e0ed-4ea3-b442-11f229f4af94",
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"jp-MarkdownHeadingCollapsed": true
|
||||
},
|
||||
"source": [
|
||||
"## 新增体测单位"
|
||||
]
|
||||
@@ -46,26 +48,10 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": null,
|
||||
"id": "6ce2cbc7-435a-461c-bdb8-abd9a6962fbc",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-09-30T09:30:45.697441Z",
|
||||
"iopub.status.busy": "2024-09-30T09:30:45.696598Z",
|
||||
"iopub.status.idle": "2024-09-30T09:30:45.721527Z",
|
||||
"shell.execute_reply": "2024-09-30T09:30:45.720414Z",
|
||||
"shell.execute_reply.started": "2024-09-30T09:30:45.697358Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import openpyxl\n",
|
||||
"import os,sys,shutil\n",
|
||||
@@ -130,57 +116,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": null,
|
||||
"id": "5f665c0f-8d30-4759-b7f8-fb7e13b98efa",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-09-30T09:42:48.068065Z",
|
||||
"iopub.status.busy": "2024-09-30T09:42:48.067381Z",
|
||||
"iopub.status.idle": "2024-09-30T09:42:48.099230Z",
|
||||
"shell.execute_reply": "2024-09-30T09:42:48.098146Z",
|
||||
"shell.execute_reply.started": "2024-09-30T09:42:48.067999Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"1 13488820384 0014-舒浩轩.pdf 12429\n",
|
||||
"2 18612703139 0025-李嘉睿.pdf 12637\n",
|
||||
"3 13522895654 0003-杨宾.pdf 12432\n",
|
||||
"4 13718367043 0012-杨玉芬.pdf 12896\n",
|
||||
"5 15210713283 0005-王红柳.pdf 12628\n",
|
||||
"6 15101087817 0024-茅晴晴.pdf 12489\n",
|
||||
"7 18810111978 0008-段丽阳.pdf 12073\n",
|
||||
"8 15224991657 0026-郑慧敏.pdf 12467\n",
|
||||
"9 15210713283 0006-高天蕴.pdf 12748\n",
|
||||
"10 15010699019 0021-董润华.pdf 12609\n",
|
||||
"11 13671026339 0013-王柱明.pdf 12749\n",
|
||||
"12 15551006319 0029-林景平.pdf 12324\n",
|
||||
"13 13522895654 0004-武馨怡.pdf 12762\n",
|
||||
"14 18660799298 0023-程军妮.pdf 12745\n",
|
||||
"15 18233207289 0019-张傲楠.pdf 12672\n",
|
||||
"16 13910932179 0017-朱芷祁.pdf 12621\n",
|
||||
"17 18210661187 0011-张耀聪.pdf 12728\n",
|
||||
"18 18232370815 0020-尹晓晴.pdf 12890\n",
|
||||
"19 13426267482 0018-卢浥尘.pdf 12951\n",
|
||||
"20 13552494958 0031-魏丽.pdf 12267\n",
|
||||
"21 13681380585 0007-刘颖.pdf 12532\n",
|
||||
"22 13311183808 0016-张玉后.pdf 12681\n",
|
||||
"23 18210661187 0001-李雪莉.pdf 12531\n",
|
||||
"24 17665174761 0027-郑文结.pdf 12502\n",
|
||||
"25 15588818169 0022-刘小云.pdf 12758\n",
|
||||
"26 13011189787 0028-潘妍.pdf 12314\n",
|
||||
"27 13770726975 0030-宋元宵.pdf 12634\n",
|
||||
"28 18210661187 0002-张进刚.pdf 12419\n",
|
||||
"29 13671271202 0010-范文兰.pdf 12132\n",
|
||||
"30 18810111978 0009-段宇辰.pdf 12901\n",
|
||||
"31 13581907290 0015-罗靖卓.pdf 12130\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from tencentcloud.common import credential\n",
|
||||
"from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n",
|
||||
@@ -256,57 +197,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": null,
|
||||
"id": "4b2b5d76-665f-4dfe-bbd3-5c80abd8c3e3",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-09-30T09:43:30.193404Z",
|
||||
"iopub.status.busy": "2024-09-30T09:43:30.192651Z",
|
||||
"iopub.status.idle": "2024-09-30T09:51:21.935881Z",
|
||||
"shell.execute_reply": "2024-09-30T09:51:21.933878Z",
|
||||
"shell.execute_reply.started": "2024-09-30T09:43:30.193333Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"13488820384 12429 send success\n",
|
||||
"18612703139 12637 send success\n",
|
||||
"13522895654 12432 send success\n",
|
||||
"13718367043 12896 send success\n",
|
||||
"15210713283 12628 send success\n",
|
||||
"15101087817 12489 send success\n",
|
||||
"18810111978 12073 send success\n",
|
||||
"15224991657 12467 send success\n",
|
||||
"15210713283 12748 send success\n",
|
||||
"15010699019 12609 send success\n",
|
||||
"13671026339 12749 send success\n",
|
||||
"15551006319 12324 send success\n",
|
||||
"13522895654 12762 send success\n",
|
||||
"18660799298 12745 send success\n",
|
||||
"18233207289 12672 send success\n",
|
||||
"13910932179 12621 send success\n",
|
||||
"18210661187 12728 send success\n",
|
||||
"18232370815 12890 send success\n",
|
||||
"13426267482 12951 send success\n",
|
||||
"13552494958 12267 send success\n",
|
||||
"13681380585 12532 send success\n",
|
||||
"13311183808 12681 send success\n",
|
||||
"18210661187 12531 send success\n",
|
||||
"17665174761 12502 send success\n",
|
||||
"15588818169 12758 send success\n",
|
||||
"13011189787 12314 send success\n",
|
||||
"13770726975 12634 send success\n",
|
||||
"18210661187 12419 send success\n",
|
||||
"13671271202 12132 send success\n",
|
||||
"18810111978 12901 send success\n",
|
||||
"13581907290 12130 send success\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from tencentcloud.common import credential\n",
|
||||
"from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n",
|
||||
@@ -391,12 +287,50 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 3,
|
||||
"id": "25a269c3-758f-4e79-ae6d-a6e6f161d64b",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-19T08:14:42.384832Z",
|
||||
"iopub.status.busy": "2024-11-19T08:14:42.384081Z",
|
||||
"iopub.status.idle": "2024-11-19T08:14:42.628910Z",
|
||||
"shell.execute_reply": "2024-11-19T08:14:42.627652Z",
|
||||
"shell.execute_reply.started": "2024-11-19T08:14:42.384763Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"+8618993712869 send success\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from tencentcloud.common import credential\n",
|
||||
"from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n",
|
||||
@@ -410,12 +344,12 @@
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"mycol = mydb[\"pdf\"]\n",
|
||||
"\n",
|
||||
"dw_jc = \"天宫院社区测试者\"\n",
|
||||
"dw_jc = \"青海油田测试者\"\n",
|
||||
"filename = 'data/天宫院社区240922.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"dict2 = {}\n",
|
||||
"place_id = 496534\n",
|
||||
"place_id = 571315\n",
|
||||
"myquery = { \"place_id\": place_id }\n",
|
||||
"for x in mycol.find(myquery,{ \"_id\": 0, \"place_id\": 0}):\n",
|
||||
" code = int(x['fn'].split('-')[0])\n",
|
||||
@@ -424,8 +358,8 @@
|
||||
" else:\n",
|
||||
" print('no phone')\n",
|
||||
"\n",
|
||||
"phone = '+86'+'18854609676'\n",
|
||||
"yzm = '13306'\n",
|
||||
"phone = '+86'+'18993712869'\n",
|
||||
"yzm = '109623'\n",
|
||||
"try: \n",
|
||||
" secretId = \"AKID22rVyvSqbikXFFvav31ykc9YmqjN6KYc\"\n",
|
||||
" secretKey = \"51XVL1YxDKI6mJh8au6DDuTskS1RhwJX\"\n",
|
||||
@@ -615,6 +549,14 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "68f838e6-5c5c-4b7a-ae78-c2117455d5ed",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
+1
-1
@@ -2842,7 +2842,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.12"
|
||||
"version": "3.12.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
+224
-23
@@ -1744,12 +1744,27 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 7,
|
||||
"id": "f0608de5-07ae-458c-999e-60968314f058",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-18T07:24:22.978299Z",
|
||||
"iopub.status.busy": "2024-11-18T07:24:22.977549Z",
|
||||
"iopub.status.idle": "2024-11-18T07:24:23.255535Z",
|
||||
"shell.execute_reply": "2024-11-18T07:24:23.254995Z",
|
||||
"shell.execute_reply.started": "2024-11-18T07:24:22.978234Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import openpyxl\n",
|
||||
@@ -1769,7 +1784,7 @@
|
||||
" list2.append(dict1[k]['name']) \n",
|
||||
" list2.append(dict1[k]['sex'])\n",
|
||||
" list2.append(dict1[k]['unit'])\n",
|
||||
" list2.append(dict1[k]['phone'])\n",
|
||||
" #list2.append(dict1[k]['phone'])\n",
|
||||
" i = 0\n",
|
||||
" if 'bmi' in dict1[k].keys():\n",
|
||||
" list2.append(dict1[k]['height']['成绩'])\n",
|
||||
@@ -1980,20 +1995,14 @@
|
||||
" i+=1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "76c5c17a-462d-4a7b-95a5-6b895f5a25dc",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 2024年体质检测"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a51dadfb-30e7-40f3-a437-321aa986a10f",
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"jp-MarkdownHeadingCollapsed": true
|
||||
},
|
||||
"source": [
|
||||
"### 北海体检情况汇总"
|
||||
"# 北海体检情况汇总"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2061,16 +2070,9 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 158,
|
||||
"execution_count": null,
|
||||
"id": "28825d80-9123-4ec5-b107-9ad133f11a82",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-04-11T03:17:59.468194Z",
|
||||
"iopub.status.busy": "2024-04-11T03:17:59.467979Z",
|
||||
"iopub.status.idle": "2024-04-11T03:17:59.981566Z",
|
||||
"shell.execute_reply": "2024-04-11T03:17:59.981079Z",
|
||||
"shell.execute_reply.started": "2024-04-11T03:17:59.468179Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -2102,10 +2104,209 @@
|
||||
"wb.save(filename) "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "76c5c17a-462d-4a7b-95a5-6b895f5a25dc",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 2024年体质检测"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b638855a-6540-44af-8f1c-796535a02a50",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 体测人员导入"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "c9262823-f492-4934-a0ce-f8f80c4a1bea",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-21T06:38:27.978576Z",
|
||||
"iopub.status.busy": "2024-11-21T06:38:27.977760Z",
|
||||
"iopub.status.idle": "2024-11-21T06:38:28.260893Z",
|
||||
"shell.execute_reply": "2024-11-21T06:38:28.260411Z",
|
||||
"shell.execute_reply.started": "2024-11-21T06:38:27.978502Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import openpyxl\n",
|
||||
"import json\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"wb = openpyxl.load_workbook('data/北海人员202410.xlsx')\n",
|
||||
"sheet = wb.active\n",
|
||||
"# sheets = wb.sheetnames\n",
|
||||
"person = {}\n",
|
||||
"\n",
|
||||
"for n in range(3, sheet.max_row+1):\n",
|
||||
" code = int(sheet.cell(n, 1).value)\n",
|
||||
" person.setdefault(code, {})\n",
|
||||
" dict1 = {}\n",
|
||||
" dict1['name'] = sheet.cell(n, 2).value\n",
|
||||
" dict1['sex'] = sheet.cell(n, 3).value\n",
|
||||
" dict1['unit'] = sheet.cell(n, 6).value\n",
|
||||
" dict1['phone'] = sheet.cell(n, 5).value\n",
|
||||
" dict1['birth'] = sheet.cell(n,4).value\n",
|
||||
" person[code] = dict1\n",
|
||||
"filename = 'data/北海炼化人员2024.json'\n",
|
||||
"with open(filename, 'w') as fl:\n",
|
||||
" json.dump(person, fl, ensure_ascii=False)\n",
|
||||
"print('ok')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "bf58deff-7f90-4828-976d-a78858326853",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 生成读卡系统文件"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "ffd34b08-40fd-45c5-a2d3-33c460c7b1dd",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-15T08:58:30.529702Z",
|
||||
"iopub.status.busy": "2024-11-15T08:58:30.528869Z",
|
||||
"iopub.status.idle": "2024-11-15T08:58:30.546247Z",
|
||||
"shell.execute_reply": "2024-11-15T08:58:30.545156Z",
|
||||
"shell.execute_reply.started": "2024-11-15T08:58:30.529616Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"\n",
|
||||
"filename = 'data/北海炼化人员2024.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"list1 = []\n",
|
||||
"for k, v in dict1.items():\n",
|
||||
" dict2 = {}\n",
|
||||
" dict2 = {'id':k,'name':v['name'],'gender':v['sex'],'birth':v['birth'],'unit':v['unit']}\n",
|
||||
" list1.append(dict2)\n",
|
||||
"json_data = json.dumps(list1,ensure_ascii=False, indent=4) \n",
|
||||
"\n",
|
||||
"# 将 json 数据写入文件\n",
|
||||
"with open(\"data/card_北海炼化人员2024.json\", \"w\",encoding = 'utf-8') as file:\n",
|
||||
" file.write(json_data) \n",
|
||||
"print('ok')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "33633f3a-e2ff-4703-850f-a5b82c0a6280",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 获取人员测试成绩"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "202dcc9d-1f36-43c4-ad8d-8ee8c9db90ce",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-21T07:01:27.546392Z",
|
||||
"iopub.status.busy": "2024-11-21T07:01:27.545774Z",
|
||||
"iopub.status.idle": "2024-11-21T07:01:27.560036Z",
|
||||
"shell.execute_reply": "2024-11-21T07:01:27.559152Z",
|
||||
"shell.execute_reply.started": "2024-11-21T07:01:27.546333Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"6\n",
|
||||
"6\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import time\n",
|
||||
"import csv\n",
|
||||
"\n",
|
||||
"filename = '../item.json'\n",
|
||||
"item = {}\n",
|
||||
"unit = {}\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"for k,v in dict1.items():\n",
|
||||
" item[k] = v\n",
|
||||
"re_ta = {}\n",
|
||||
"dict1 = {}\n",
|
||||
"list1 = []\n",
|
||||
"filename = 'data/北海炼化人员2024.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"\n",
|
||||
"filename = 'data/marks_20241121.csv'\n",
|
||||
"with open(filename,'r',newline='') as csv_file:\n",
|
||||
" fl = csv.reader(csv_file,delimiter=',')\n",
|
||||
" header = next(fl) \n",
|
||||
" for line in fl:\n",
|
||||
" #line = re.sub('[\\r\\n\\f ]{1,}', '', line)\n",
|
||||
" list1.append(line)\n",
|
||||
"#print(list1)\n",
|
||||
"for result in list1:\n",
|
||||
" user = str(result[2])\n",
|
||||
" if user in dict1.keys(): \n",
|
||||
" item_name = result[3] \n",
|
||||
" re_ta.setdefault(user,{}) \n",
|
||||
" re_ta[user]['name'] = dict1[user]['name']\n",
|
||||
" re_ta[user]['sex'] = dict1[user]['sex'] \n",
|
||||
" re_ta[user]['unit'] = dict1[user]['unit']\n",
|
||||
" re_ta[user]['rq'] = result[5].replace('/','-')\n",
|
||||
" #re_ta[user]['sub_unit'] = dict1[user]['sub_unit'] \n",
|
||||
" re_ta[user].setdefault(item_name,{})\n",
|
||||
" #if item_name =='bmi':\n",
|
||||
" # height = result[4].split(',')[0]\n",
|
||||
" # weight = result[4].split(',')[1]\n",
|
||||
" # re_ta[user]['height']['成绩'] = height\n",
|
||||
" # re_ta[user]['weight']['成绩'] = weight\n",
|
||||
" # re_ta[user]['bmi']['成绩'] = result[4]\n",
|
||||
" #else:\n",
|
||||
" # re_ta[user][item_name]['成绩'] = result[4]\n",
|
||||
" re_ta[user][item_name]['成绩'] = result[4]\n",
|
||||
"print(len(re_ta))\n",
|
||||
"filename = 'data/result_北海炼化人员2024.json'\n",
|
||||
"\n",
|
||||
"with open(filename,'w') as fl:\n",
|
||||
" json.dump(re_ta, fl, ensure_ascii=False) \n",
|
||||
"print(len(re_ta))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "d3e0075b-7a93-4454-860b-ba523e63ea08",
|
||||
"id": "7e5d9787-e982-4afd-8d48-83766f5ed1d0",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
@@ -2127,7 +2328,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.12"
|
||||
"version": "3.12.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
+9
-7
@@ -1492,6 +1492,7 @@
|
||||
"cell_type": "markdown",
|
||||
"id": "73524e7f-4262-46d3-a733-74ac18e43855",
|
||||
"metadata": {
|
||||
"jp-MarkdownHeadingCollapsed": true,
|
||||
"tags": []
|
||||
},
|
||||
"source": [
|
||||
@@ -3315,15 +3316,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 1,
|
||||
"id": "e92d76a8-6841-4a1b-8529-caa5e37d624a",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-12T05:58:46.035955Z",
|
||||
"iopub.status.busy": "2024-11-12T05:58:46.035162Z",
|
||||
"iopub.status.idle": "2024-11-12T05:58:47.364269Z",
|
||||
"shell.execute_reply": "2024-11-12T05:58:47.363796Z",
|
||||
"shell.execute_reply.started": "2024-11-12T05:58:46.035893Z"
|
||||
"iopub.execute_input": "2024-11-22T02:08:10.643448Z",
|
||||
"iopub.status.busy": "2024-11-22T02:08:10.642748Z",
|
||||
"iopub.status.idle": "2024-11-22T02:08:12.178978Z",
|
||||
"shell.execute_reply": "2024-11-22T02:08:12.178427Z",
|
||||
"shell.execute_reply.started": "2024-11-22T02:08:10.643386Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
@@ -3341,7 +3342,7 @@
|
||||
"\n",
|
||||
"items = ['lung','grip','flexion','jump','pushup','situp','balance','reaction','step']\n",
|
||||
"bmi = ['height','weight']\n",
|
||||
"title = ['编号','姓名','性别','单位','部门','身高','体重','bmi','肺活量','','握力','','坐位体前屈','','纵跳','','俯卧撑','','一分钟仰卧起坐','','单脚站立','','选择反应时','','台阶指数']\n",
|
||||
"title = ['测试编号','员工编号','姓名','性别','单位','部门','身高','体重','bmi','肺活量','','握力','','坐位体前屈','','纵跳','','俯卧撑','','一分钟仰卧起坐','','单脚站立','','选择反应时','','台阶指数']\n",
|
||||
"\n",
|
||||
"filename = 'data/result_天津石化2024.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
@@ -3354,6 +3355,7 @@
|
||||
"for k, v in dict1.items(): #print(k,dict2[str(k)]['name'])\n",
|
||||
" list2 = []\n",
|
||||
" list2.append(str(k).rjust(5,'0'))\n",
|
||||
" list2.append(dict2[k]['id'])\n",
|
||||
" list2.append(dict1[k]['name']) \n",
|
||||
" list2.append(dict1[k]['sex'])\n",
|
||||
" list2.append(dict1[k]['unit'])\n",
|
||||
|
||||
Reference in new issue
Block a user