diff --git a/体测单位/体测数据管理.ipynb b/体测单位/体测数据管理.ipynb index 1396168..561fba1 100644 --- a/体测单位/体测数据管理.ipynb +++ b/体测单位/体测数据管理.ipynb @@ -10,16 +10,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "360f0a97-d73d-43f3-9f7a-0f9582103c82", "metadata": { - "execution": { - "iopub.execute_input": "2024-09-24T09:50:41.703850Z", - "iopub.status.busy": "2024-09-24T09:50:41.703095Z", - "iopub.status.idle": "2024-09-24T09:50:41.720718Z", - "shell.execute_reply": "2024-09-24T09:50:41.719536Z", - "shell.execute_reply.started": "2024-09-24T09:50:41.703777Z" - }, "tags": [] }, "outputs": [], @@ -53,15 +46,15 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 7, "id": "6ce2cbc7-435a-461c-bdb8-abd9a6962fbc", "metadata": { "execution": { - "iopub.execute_input": "2024-09-23T09:16:02.614379Z", - "iopub.status.busy": "2024-09-23T09:16:02.613463Z", - "iopub.status.idle": "2024-09-23T09:16:02.633416Z", - "shell.execute_reply": "2024-09-23T09:16:02.632423Z", - "shell.execute_reply.started": "2024-09-23T09:16:02.614298Z" + "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": [ @@ -123,8 +116,8 @@ " dict2 = {'place_id':place_id,'code':dxm,'fn':Path(fn).name}\n", " list2.append(dict2)\n", " i +=1\n", - "x = mycol.insert_many(list2)\n", - "print('ok') " + "#x = mycol.insert_many(list2)\n", + "#print('ok') " ] }, { @@ -137,15 +130,15 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 10, "id": "5f665c0f-8d30-4759-b7f8-fb7e13b98efa", "metadata": { "execution": { - "iopub.execute_input": "2024-09-24T06:02:00.787106Z", - "iopub.status.busy": "2024-09-24T06:02:00.786300Z", - "iopub.status.idle": "2024-09-24T06:02:00.838883Z", - "shell.execute_reply": "2024-09-24T06:02:00.838280Z", - "shell.execute_reply.started": "2024-09-24T06:02:00.787028Z" + "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": [] }, @@ -154,37 +147,37 @@ "name": "stdout", "output_type": "stream", "text": [ - "1 13488820384 0014-舒浩轩.pdf\n", - "2 18612703139 0025-李嘉睿.pdf\n", - "3 13522895654 0003-杨宾.pdf\n", - "4 13718367043 0012-杨玉芬.pdf\n", - "5 15210713283 0005-王红柳.pdf\n", - "6 15101087817 0024-茅晴晴.pdf\n", - "7 18810111978 0008-段丽阳.pdf\n", - "8 15224991657 0026-郑慧敏.pdf\n", - "9 15210713283 0006-高天蕴.pdf\n", - "10 15010699019 0021-董润华.pdf\n", - "11 13671026339 0013-王柱明.pdf\n", - "12 15551006319 0029-林景平.pdf\n", - "13 13522895654 0004-武馨怡.pdf\n", - "14 18660799298 0023-程军妮.pdf\n", - "15 18233207289 0019-张傲楠.pdf\n", - "16 13910932179 0017-朱芷祁.pdf\n", - "17 18210661187 0011-张耀聪.pdf\n", - "18 18232370815 0020-尹晓晴.pdf\n", - "19 13426267482 0018-卢浥尘.pdf\n", - "20 13552494958 0031-魏丽.pdf\n", - "21 13681380585 0007-刘颖.pdf\n", - "22 13311183808 0016-张玉后.pdf\n", - "23 18210661187 0001-李雪莉.pdf\n", - "24 17665174761 0027-郑文结.pdf\n", - "25 15588818169 0022-刘小云.pdf\n", - "26 13011189787 0028-潘妍.pdf\n", - "27 13770726975 0030-宋元宵.pdf\n", - "28 18210661187 0002-张进刚.pdf\n", - "29 13671271202 0010-范文兰.pdf\n", - "30 18810111978 0009-段宇辰.pdf\n", - "31 13581907290 0015-罗靖卓.pdf\n" + "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" ] } ], @@ -196,6 +189,7 @@ "from tencentcloud.common.profile.http_profile import HttpProfile\n", "import json\n", "import pymongo\n", + "import time\n", "\n", "myclient = pymongo.MongoClient('mongodb://localhost:27017/')\n", "mydb = myclient[\"baogao\"]\n", @@ -246,7 +240,7 @@ " #dict3 = json.loads(resp.to_json_string(indent=2))\n", "\n", " #print(v['phone'],dict3['SendStatusSet'][0][\"Message\"])\n", - " print(i,v['phone'],v['name'],)\n", + " print(i,v['phone'],v['name'], v['code'])\n", " i+=1\n", " except TencentCloudSDKException as err:\n", " print(v['phone'],err)" @@ -262,12 +256,57 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "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": [], + "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" + ] + } + ], "source": [ "from tencentcloud.common import credential\n", "from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n", @@ -287,7 +326,7 @@ "with open(filename,'r') as fl:\n", " dict1 = json.load(fl) \n", "dict2 = {}\n", - "#place_id = 571315\n", + "place_id = 496534\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", @@ -325,8 +364,8 @@ " req.SenderId = \"\"\n", " resp = client.SendSms(req)\n", " dict3 = json.loads(resp.to_json_string(indent=2))\n", - " print(v['phone'],dict3['SendStatusSet'][0][\"Message\"])\n", - " time.sleep(2)\n", + " print(v['phone'], v['code'],dict3['SendStatusSet'][0][\"Message\"])\n", + " time.sleep(15)\n", " except TencentCloudSDKException as err:\n", " print(v['phone'],err)" ] @@ -371,20 +410,19 @@ "mydb = myclient[\"baogao\"]\n", "mycol = mydb[\"pdf\"]\n", "\n", - "filename = 'data/北体体质康健.json'\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 = 571315\n", - "myquery = { \"place_id\": place_id,\"rq\":'20240914' }\n", + "place_id = 496534\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", " if str(code) in dict1.keys() and 'phone' in dict1[str(code)].keys():\n", " dict2[code] = {'phone':str(dict1[str(code)]['phone']),'code':x['code'],'name':x['fn']}\n", " else:\n", " print('no phone')\n", - "#print(dict2)\n", - "dw_jc = \"北体体质康健班测试者\"\n", "\n", "phone = '+86'+'18854609676'\n", "yzm = '13306'\n", diff --git a/体测单位/天宫院社区.ipynb b/体测单位/天宫院社区.ipynb index 6a171c3..7722107 100644 --- a/体测单位/天宫院社区.ipynb +++ b/体测单位/天宫院社区.ipynb @@ -10,27 +10,12 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "a03a5289-9766-4a60-9d38-245deb2ee4e6", "metadata": { - "execution": { - "iopub.execute_input": "2024-09-23T08:54:21.300838Z", - "iopub.status.busy": "2024-09-23T08:54:21.300070Z", - "iopub.status.idle": "2024-09-23T08:54:21.477586Z", - "shell.execute_reply": "2024-09-23T08:54:21.476575Z", - "shell.execute_reply.started": "2024-09-23T08:54:21.300765Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok\n" - ] - } - ], + "outputs": [], "source": [ "import openpyxl\n", "import json\n", @@ -147,28 +132,12 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "db39190f-47d4-4a7c-b727-c79e2a64452f", "metadata": { - "execution": { - "iopub.execute_input": "2024-09-23T08:55:23.555758Z", - "iopub.status.busy": "2024-09-23T08:55:23.554865Z", - "iopub.status.idle": "2024-09-23T08:55:23.569912Z", - "shell.execute_reply": "2024-09-23T08:55:23.568888Z", - "shell.execute_reply.started": "2024-09-23T08:55:23.555680Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "31\n", - "31\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "import time\n", @@ -217,27 +186,10 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "590775c3-16ef-43ad-99a2-85e847fe4079", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-23T08:57:30.916080Z", - "iopub.status.busy": "2024-09-23T08:57:30.915319Z", - "iopub.status.idle": "2024-09-23T08:57:30.930835Z", - "shell.execute_reply": "2024-09-23T08:57:30.929793Z", - "shell.execute_reply.started": "2024-09-23T08:57:30.916010Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "31\n", - "31\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "import time\n", @@ -293,57 +245,12 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "c2ee2c71-7e28-4201-af85-ed7f001c6872", "metadata": { - "execution": { - "iopub.execute_input": "2024-09-23T08:58:27.504156Z", - "iopub.status.busy": "2024-09-23T08:58:27.503390Z", - "iopub.status.idle": "2024-09-23T08:58:27.530165Z", - "shell.execute_reply": "2024-09-23T08:58:27.529383Z", - "shell.execute_reply.started": "2024-09-23T08:58:27.504064Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "31 魏丽\n", - "1 李雪莉\n", - "2 张进刚\n", - "3 杨宾\n", - "4 武馨怡\n", - "6 高天蕴\n", - "5 王红柳\n", - "7 刘颖\n", - "8 段丽阳\n", - "9 段宇辰\n", - "10 范文兰\n", - "11 张耀聪\n", - "12 杨玉芬\n", - "13 王柱明\n", - "14 舒浩轩\n", - "15 罗靖卓\n", - "16 张玉后\n", - "17 朱芷祁\n", - "18 卢浥尘\n", - "19 张傲楠\n", - "20 尹晓晴\n", - "21 董润华\n", - "22 刘小云\n", - "23 程军妮\n", - "24 茅晴晴\n", - "25 李嘉睿\n", - "26 郑慧敏\n", - "27 郑文结\n", - "28 潘妍\n", - "29 林景平\n", - "30 宋元宵\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "import openpyxl\n", diff --git a/体测单位/镇海.ipynb b/体测单位/镇海.ipynb index 2375670..41689ba 100644 --- a/体测单位/镇海.ipynb +++ b/体测单位/镇海.ipynb @@ -18,26 +18,10 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": null, "id": "ba24132c-133f-4508-8fe7-e68d1908b6e9", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-23T08:05:35.010497Z", - "iopub.status.busy": "2024-09-23T08:05:35.009998Z", - "iopub.status.idle": "2024-09-23T08:05:35.403341Z", - "shell.execute_reply": "2024-09-23T08:05:35.402730Z", - "shell.execute_reply.started": "2024-09-23T08:05:35.010448Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import openpyxl\n", "import json\n", @@ -77,26 +61,10 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "63ab2d5b-3a0a-4ac7-a3e7-b3a34e621e98", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-17T01:49:44.352863Z", - "iopub.status.busy": "2024-09-17T01:49:44.352020Z", - "iopub.status.idle": "2024-09-17T01:49:44.374799Z", - "shell.execute_reply": "2024-09-17T01:49:44.374342Z", - "shell.execute_reply.started": "2024-09-17T01:49:44.352780Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "\n", @@ -129,27 +97,10 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": null, "id": "5d864909-d10f-461d-8e6e-dc5c43613576", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-22T10:49:09.815998Z", - "iopub.status.busy": "2024-09-22T10:49:09.815209Z", - "iopub.status.idle": "2024-09-22T10:49:09.910712Z", - "shell.execute_reply": "2024-09-22T10:49:09.910125Z", - "shell.execute_reply.started": "2024-09-22T10:49:09.815926Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1365\n", - "1365\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "import time\n", @@ -208,15 +159,15 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 108, "id": "bc79f0d2-62a2-40c8-bd74-9c7ff17bec8e", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T10:44:33.765318Z", - "iopub.status.busy": "2024-09-22T10:44:33.764545Z", - "iopub.status.idle": "2024-09-22T10:44:33.796972Z", - "shell.execute_reply": "2024-09-22T10:44:33.796426Z", - "shell.execute_reply.started": "2024-09-22T10:44:33.765245Z" + "iopub.execute_input": "2024-09-30T06:59:45.541438Z", + "iopub.status.busy": "2024-09-30T06:59:45.540672Z", + "iopub.status.idle": "2024-09-30T06:59:46.017490Z", + "shell.execute_reply": "2024-09-30T06:59:46.016942Z", + "shell.execute_reply.started": "2024-09-30T06:59:45.541365Z" } }, "outputs": [], @@ -231,7 +182,7 @@ "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", @@ -248,9 +199,11 @@ " elif item =='name':\n", " list2.append(v[item])\n", " else:\n", - " list2.append('') \n", + " list2.append('')\n", + " list2.append(dict2[k]['gwxl'])\n", + " list2.append(dict2[k]['gzz'])\n", " list1.append(list2)\n", - "filename = 'data/镇海体测情况(20240922手工).xlsx'\n", + "filename = 'data/镇海体测情况表.xlsx'\n", "wb = openpyxl.Workbook()\n", "sheet = wb.active\n", "sheet.append(title)\n", @@ -270,17 +223,9 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": null, "id": "cf22739a-5cf3-47fd-b87a-158a2e2d5a95", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-22T03:58:55.502517Z", - "iopub.status.busy": "2024-09-22T03:58:55.501726Z", - "iopub.status.idle": "2024-09-22T03:58:55.536562Z", - "shell.execute_reply": "2024-09-22T03:58:55.536063Z", - "shell.execute_reply.started": "2024-09-22T03:58:55.502442Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "import json\n", @@ -323,27 +268,10 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": null, "id": "f4dade65-f760-4220-8a65-39843688a60a", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-22T03:58:31.869404Z", - "iopub.status.busy": "2024-09-22T03:58:31.868639Z", - "iopub.status.idle": "2024-09-22T03:58:32.098484Z", - "shell.execute_reply": "2024-09-22T03:58:32.097950Z", - "shell.execute_reply.started": "2024-09-22T03:58:31.869332Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1462\n", - "1406\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "\n", @@ -383,27 +311,10 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": null, "id": "7f038e8d-dd57-4880-8726-6dfa86fbc4a2", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-22T10:49:29.510032Z", - "iopub.status.busy": "2024-09-22T10:49:29.509298Z", - "iopub.status.idle": "2024-09-22T10:49:29.639707Z", - "shell.execute_reply": "2024-09-22T10:49:29.639166Z", - "shell.execute_reply.started": "2024-09-22T10:49:29.509965Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1365\n", - "1365\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "import datetime\n", @@ -495,26 +406,10 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": null, "id": "763aa68a-da54-4745-a759-4399aba10f7e", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-22T10:49:36.694100Z", - "iopub.status.busy": "2024-09-22T10:49:36.693314Z", - "iopub.status.idle": "2024-09-22T10:49:36.784607Z", - "shell.execute_reply": "2024-09-22T10:49:36.784166Z", - "shell.execute_reply.started": "2024-09-22T10:49:36.694030Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok!\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "import time\n", @@ -649,26 +544,10 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": null, "id": "90faac13-492d-4b3d-bb21-c228af6d9864", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-22T10:54:16.247571Z", - "iopub.status.busy": "2024-09-22T10:54:16.246795Z", - "iopub.status.idle": "2024-09-22T11:05:57.685110Z", - "shell.execute_reply": "2024-09-22T11:05:57.683956Z", - "shell.execute_reply.started": "2024-09-22T10:54:16.247498Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1365\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import requests\n", "import json\n", @@ -741,26 +620,10 @@ }, { "cell_type": "code", - "execution_count": 88, + "execution_count": null, "id": "61c731bc-6117-4a9f-8bfa-66f820e49fc4", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-23T08:21:40.030772Z", - "iopub.status.busy": "2024-09-23T08:21:40.030153Z", - "iopub.status.idle": "2024-09-23T08:21:40.215352Z", - "shell.execute_reply": "2024-09-23T08:21:40.214783Z", - "shell.execute_reply.started": "2024-09-23T08:21:40.030713Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1365\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "import glob\n", @@ -807,6 +670,62 @@ "wb.save(filename)" ] }, + { + "cell_type": "markdown", + "id": "fc0f353c-1021-4c8c-bb7c-7a4abb609836", + "metadata": {}, + "source": [ + "## 补充报告人员信息" + ] + }, + { + "cell_type": "code", + "execution_count": 107, + "id": "fa963fb6-b47d-4b75-9109-6cda89218182", + "metadata": { + "execution": { + "iopub.execute_input": "2024-09-30T06:58:38.490350Z", + "iopub.status.busy": "2024-09-30T06:58:38.489677Z", + "iopub.status.idle": "2024-09-30T06:58:38.708672Z", + "shell.execute_reply": "2024-09-30T06:58:38.708145Z", + "shell.execute_reply.started": "2024-09-30T06:58:38.490289Z" + }, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ok!\n" + ] + } + ], + "source": [ + "import json\n", + "import glob\n", + "from pathlib import Path\n", + "import openpyxl\n", + "\n", + "\n", + "filename = 'data/镇海体测人员.json'\n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl)\n", + "wb = openpyxl.load_workbook('data/镇海炼化参加测试人员名单(分析用).xlsx')\n", + "sheet = wb.active\n", + "for n in range(2, sheet.max_row+1):\n", + " if sheet.cell(n, 12).value is not None:\n", + " code = int(sheet.cell(n, 1).value)\n", + " if sheet.cell(n, 12).value is not None:\n", + " dict1[str(code)]['gwlb'] = sheet.cell(n, 12).value\n", + " dict1[str(code)]['gwxl'] = sheet.cell(n, 9).value\n", + " dict1[str(code)]['gzz'] = sheet.cell(n, 11).value\n", + "\n", + "with open(filename, 'w') as fl:\n", + " json.dump(dict1, fl, ensure_ascii=False) \n", + "print('ok!') \n" + ] + }, { "cell_type": "markdown", "id": "385285b8-fdb3-421d-afbf-c13e4f55bb46", @@ -817,29 +736,10 @@ }, { "cell_type": "code", - "execution_count": 94, + "execution_count": null, "id": "c6195bc3-64bc-4f52-8ebc-ba16fd222f85", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-24T09:46:54.184271Z", - "iopub.status.busy": "2024-09-24T09:46:54.183550Z", - "iopub.status.idle": "2024-09-24T09:46:54.365589Z", - "shell.execute_reply": "2024-09-24T09:46:54.364993Z", - "shell.execute_reply.started": "2024-09-24T09:46:54.184207Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "71 方法泉\n", - "125 徐荟杰\n", - "704 陈鼎\n", - "1365\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import openpyxl\n", "import json\n", @@ -881,26 +781,10 @@ }, { "cell_type": "code", - "execution_count": 98, + "execution_count": null, "id": "299c1d41-7634-4703-8411-08f175df4e16", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-24T09:56:29.452711Z", - "iopub.status.busy": "2024-09-24T09:56:29.451957Z", - "iopub.status.idle": "2024-09-24T09:56:29.517710Z", - "shell.execute_reply": "2024-09-24T09:56:29.517153Z", - "shell.execute_reply.started": "2024-09-24T09:56:29.452638Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import openpyxl\n", "import os,sys,shutil\n", @@ -946,26 +830,10 @@ }, { "cell_type": "code", - "execution_count": 96, + "execution_count": null, "id": "f709fd4a-d0b0-44a9-a782-0c1ffd43f6b8", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-24T09:47:36.612690Z", - "iopub.status.busy": "2024-09-24T09:47:36.611927Z", - "iopub.status.idle": "2024-09-24T09:47:36.637765Z", - "shell.execute_reply": "2024-09-24T09:47:36.637249Z", - "shell.execute_reply.started": "2024-09-24T09:47:36.612619Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[]\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "filename = 'data/镇海炼化参加测试人员.json'\n", @@ -994,17 +862,9 @@ }, { "cell_type": "code", - "execution_count": 99, + "execution_count": null, "id": "7eac364f-0fde-4853-9d2b-8c4c0c59a341", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-24T10:28:39.624502Z", - "iopub.status.busy": "2024-09-24T10:28:39.623736Z", - "iopub.status.idle": "2024-09-24T10:28:39.991374Z", - "shell.execute_reply": "2024-09-24T10:28:39.990804Z", - "shell.execute_reply.started": "2024-09-24T10:28:39.624428Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "import os,sys,shutil\n", @@ -1041,26 +901,10 @@ }, { "cell_type": "code", - "execution_count": 100, + "execution_count": null, "id": "d88bd5c4-1df3-457b-b65d-61692c45e7bd", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-24T10:30:51.115176Z", - "iopub.status.busy": "2024-09-24T10:30:51.114431Z", - "iopub.status.idle": "2024-09-24T10:30:51.335424Z", - "shell.execute_reply": "2024-09-24T10:30:51.334870Z", - "shell.execute_reply.started": "2024-09-24T10:30:51.115089Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import os,sys,shutil\n", "import json\n", @@ -1115,26 +959,10 @@ }, { "cell_type": "code", - "execution_count": 101, + "execution_count": null, "id": "cccc2e43-7a73-48ec-8540-06b4d59f8ceb", - "metadata": { - "execution": { - "iopub.execute_input": "2024-09-25T07:48:05.301620Z", - "iopub.status.busy": "2024-09-25T07:48:05.301088Z", - "iopub.status.idle": "2024-09-25T07:48:05.386752Z", - "shell.execute_reply": "2024-09-25T07:48:05.386215Z", - "shell.execute_reply.started": "2024-09-25T07:48:05.301569Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok!\n" - ] - } - ], + "metadata": {}, + "outputs": [], "source": [ "import json\n", "import openpyxl\n", @@ -1199,6 +1027,104 @@ "print('ok!') " ] }, + { + "cell_type": "markdown", + "id": "1c0bca93-d8a7-42ba-9a2c-50d3493c802f", + "metadata": {}, + "source": [ + "## 报告按照工作制分类" + ] + }, + { + "cell_type": "code", + "execution_count": 113, + "id": "a550ecd7-da8e-41b6-8b8f-8bc144d48bfe", + "metadata": { + "execution": { + "iopub.execute_input": "2024-09-30T07:33:01.527422Z", + "iopub.status.busy": "2024-09-30T07:33:01.527168Z", + "iopub.status.idle": "2024-09-30T07:33:01.595828Z", + "shell.execute_reply": "2024-09-30T07:33:01.595271Z", + "shell.execute_reply.started": "2024-09-30T07:33:01.527399Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "782\n" + ] + } + ], + "source": [ + "import json\n", + "import openpyxl\n", + "\n", + "\n", + "filename = 'data/result_镇海2.json'\n", + "with open(filename,'r',encoding = 'utf-8') as fl:\n", + " dict1 = json.load(fl)\n", + "filename = 'data/镇海体测人员.json'\n", + "with open(filename,'r',encoding = 'utf-8') as fl:\n", + " dict3 = json.load(fl)\n", + "\n", + "\n", + "#items = ['身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n", + "items = {}\n", + "items['lung'] = '肺活量'\n", + "items['grip'] ='握力'\n", + "items['flexion'] ='坐位体前屈'\n", + "items['jump'] ='纵跳'\n", + "items['pushup'] ='俯卧撑'\n", + "items['balance'] ='单脚站立'\n", + "items['reaction'] ='选择反应时'\n", + "items['step'] ='台阶指数'\n", + "items['situp'] ='一分钟仰卧起坐'\n", + "items['bmi'] ='BMI'\n", + "\n", + "\n", + "list1 = []\n", + "#fiie_path ='./138/'\n", + "list_item = ['lung','grip','flexion','jump','pushup','balance','reaction','step','situp','bmi']\n", + "i=1\n", + "list2 = []\n", + "dict2 = {}\n", + "for k, v in dict1.items():\n", + " if dict3[k]['gzz'] == '倒班':\n", + " list1 = []\n", + " mydata = {}\n", + " \n", + " id = str(k).rjust(8,\"0\")\n", + " mydata['unit'] = v['unit']\n", + " mydata['name'] = v['name']\n", + " mydata['sex'] = v['sex']\n", + " mydata['month'] = v['month']\n", + " age = int(v['month']/12)\n", + " if age <20:\n", + " mydata['age'] = 20\n", + " else:\n", + " mydata['age'] = int(v['month']/12)\n", + " \n", + " mydata['fits'] = {}\n", + " score = 0\n", + " for item in list_item:\n", + " if item in v.keys():\n", + " if item in ['lung','pushup','step','situp']:\n", + " mark = v[item]['成绩'].split()[0].split('.')[0]\n", + " else:\n", + " mark = v[item]['成绩'].split()[0]\n", + " mydata['fits'][items[item]] = {'mark':mark,'score':v[item]['score']}\n", + " score = score + v[item]['score']\n", + " mydata['score'] = round(score/len(mydata['fits']),2)\n", + " if len(mydata['fits']) >2:\n", + " dict2[str(k)] = mydata\n", + "filename = f'data/data_镇海_倒班.json'\n", + "with open(filename,'w') as fl:\n", + " json.dump(dict2,fl , ensure_ascii=False) \n", + "print(len(dict2)) " + ] + }, { "cell_type": "markdown", "id": "c3bcd7ec-1d66-40c6-a27d-1c73e6eef695", @@ -1209,15 +1135,15 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 137, "id": "d5721244-b5f5-4577-bae8-2e6c5bd8e4da", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T11:07:17.674314Z", - "iopub.status.busy": "2024-09-22T11:07:17.673571Z", - "iopub.status.idle": "2024-09-22T11:07:17.699078Z", - "shell.execute_reply": "2024-09-22T11:07:17.698099Z", - "shell.execute_reply.started": "2024-09-22T11:07:17.674240Z" + "iopub.execute_input": "2024-09-30T08:09:20.461987Z", + "iopub.status.busy": "2024-09-30T08:09:20.460968Z", + "iopub.status.idle": "2024-09-30T08:09:20.476548Z", + "shell.execute_reply": "2024-09-30T08:09:20.475718Z", + "shell.execute_reply.started": "2024-09-30T08:09:20.461927Z" } }, "outputs": [ @@ -1225,15 +1151,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "平均成绩:3.1739分,男性:1074人\n", - "平均成绩:3.3303分,女性:291人\n", - "平均成绩:3.2072分,总体:1365人\n" + "平均成绩:3.2405分,男性:313人\n", + "平均成绩:3.4483分,女性:92人\n", + "平均成绩:3.2877分,总体:405人\n" ] } ], "source": [ "nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n", - "filename = 'data/data_镇海.json'\n", + "filename = 'data/data_镇海_白班.json'\n", "with open(filename,'r') as fl:\n", " dict1 = json.load(fl) \n", "i = 1\n", @@ -1267,15 +1193,15 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 138, "id": "cff50f06-3221-4340-950f-3a24073b8565", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T11:09:10.042162Z", - "iopub.status.busy": "2024-09-22T11:09:10.041458Z", - "iopub.status.idle": "2024-09-22T11:09:10.113085Z", - "shell.execute_reply": "2024-09-22T11:09:10.112552Z", - "shell.execute_reply.started": "2024-09-22T11:09:10.042084Z" + "iopub.execute_input": "2024-09-30T08:10:16.993594Z", + "iopub.status.busy": "2024-09-30T08:10:16.992995Z", + "iopub.status.idle": "2024-09-30T08:10:17.024014Z", + "shell.execute_reply": "2024-09-30T08:10:17.023470Z", + "shell.execute_reply.started": "2024-09-30T08:10:16.993539Z" } }, "outputs": [ @@ -1283,11 +1209,11 @@ "name": "stdout", "output_type": "stream", "text": [ - "0~255分人数:134人,男性:118人,女性:16人\n", - "256~332分人数:585人,男性:472人,女性:113人\n", - "333~367分人数:431人,男性:333人,女性:98人\n", - "368~500分人数:215人,男性:151人,女性:64人\n", - "1365\n", + "0~255分人数:27人,男性:24人,女性:3人\n", + "256~332分人数:155人,男性:131人,女性:24人\n", + "333~367分人数:146人,男性:104人,女性:42人\n", + "368~500分人数:77人,男性:54人,女性:23人\n", + "405\n", "ok\n" ] } @@ -1337,15 +1263,15 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": 139, "id": "6baf0ff2-cdfa-4396-bcf8-3e23a18670dc", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T11:11:36.729958Z", - "iopub.status.busy": "2024-09-22T11:11:36.729223Z", - "iopub.status.idle": "2024-09-22T11:11:36.759840Z", - "shell.execute_reply": "2024-09-22T11:11:36.759298Z", - "shell.execute_reply.started": "2024-09-22T11:11:36.729889Z" + "iopub.execute_input": "2024-09-30T08:11:01.790765Z", + "iopub.status.busy": "2024-09-30T08:11:01.789996Z", + "iopub.status.idle": "2024-09-30T08:11:01.809947Z", + "shell.execute_reply": "2024-09-30T08:11:01.809201Z", + "shell.execute_reply.started": "2024-09-30T08:11:01.790691Z" } }, "outputs": [ @@ -1353,13 +1279,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "20-24 {'良好': 29, '合格': 60, '优秀': 22, '不合格': 8}\n", - "25-29 {'良好': 24, '合格': 32, '不合格': 3, '优秀': 14}\n", - "30-34 {'不合格': 3, '优秀': 6, '合格': 11, '良好': 15}\n", - "35-39 {'合格': 5, '不合格': 2, '良好': 13, '优秀': 6}\n", - "40-44 {'良好': 6, '合格': 1, '优秀': 1, '不合格': 0}\n", - "45-49 {'良好': 8, '合格': 4, '优秀': 12, '不合格': 0}\n", - "50-54 {'良好': 3, '不合格': 0, '合格': 0, '优秀': 2}\n", + "20-24 {'合格': 1, '良好': 3, '优秀': 0}\n", + "25-29 {'良好': 9, '合格': 11, '优秀': 3, '不合格': 0}\n", + "30-34 {'合格': 6, '优秀': 5, '良好': 12, '不合格': 2}\n", + "35-39 {'良好': 6, '合格': 3, '不合格': 1, '优秀': 5}\n", + "40-44 {'良好': 5, '合格': 1, '优秀': 1}\n", + "45-49 {'合格': 2, '优秀': 6, '良好': 4, '不合格': 0}\n", + "50-54 {'良好': 3, '不合格': 0, '优秀': 2, '合格': 0}\n", "55-80 {'优秀': 1, '合格': 0, '良好': 0, '不合格': 0}\n" ] } @@ -1403,15 +1329,15 @@ }, { "cell_type": "code", - "execution_count": 66, + "execution_count": 140, "id": "2979cf80-5268-4754-ab8a-11a539315e92", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T11:14:29.282315Z", - "iopub.status.busy": "2024-09-22T11:14:29.281554Z", - "iopub.status.idle": "2024-09-22T11:14:29.310507Z", - "shell.execute_reply": "2024-09-22T11:14:29.309894Z", - "shell.execute_reply.started": "2024-09-22T11:14:29.282244Z" + "iopub.execute_input": "2024-09-30T08:11:49.628176Z", + "iopub.status.busy": "2024-09-30T08:11:49.627421Z", + "iopub.status.idle": "2024-09-30T08:11:49.647219Z", + "shell.execute_reply": "2024-09-30T08:11:49.646522Z", + "shell.execute_reply.started": "2024-09-30T08:11:49.628086Z" } }, "outputs": [ @@ -1419,14 +1345,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "20-24 {'良好': 97, '合格': 177, '优秀': 38, '不合格': 53}\n", - "25-29 {'良好': 57, '合格': 97, '不合格': 21, '优秀': 21}\n", - "30-34 {'不合格': 15, '优秀': 13, '合格': 43, '良好': 29}\n", - "35-39 {'合格': 57, '不合格': 11, '良好': 45, '优秀': 22}\n", - "40-44 {'良好': 27, '合格': 18, '优秀': 12, '不合格': 2}\n", - "45-49 {'良好': 26, '合格': 28, '优秀': 17, '不合格': 1}\n", - "50-54 {'良好': 33, '不合格': 10, '合格': 29, '优秀': 16}\n", - "55-80 {'优秀': 12, '合格': 23, '良好': 19, '不合格': 5}\n" + "20-24 {'合格': 8, '良好': 3, '优秀': 3}\n", + "25-29 {'良好': 24, '合格': 33, '优秀': 6, '不合格': 6}\n", + "30-34 {'合格': 21, '优秀': 5, '良好': 15, '不合格': 7}\n", + "35-39 {'良好': 19, '合格': 28, '不合格': 4, '优秀': 13}\n", + "40-44 {'良好': 12, '合格': 8, '优秀': 7}\n", + "45-49 {'合格': 10, '优秀': 4, '良好': 7, '不合格': 1}\n", + "50-54 {'良好': 16, '不合格': 4, '优秀': 9, '合格': 11}\n", + "55-80 {'优秀': 7, '合格': 12, '良好': 8, '不合格': 2}\n" ] } ], @@ -1469,15 +1395,15 @@ }, { "cell_type": "code", - "execution_count": 67, + "execution_count": 141, "id": "8a7cb3b0-d7be-44ac-a1ec-40bdcf29e83b", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T11:16:13.093509Z", - "iopub.status.busy": "2024-09-22T11:16:13.092890Z", - "iopub.status.idle": "2024-09-22T11:16:13.121521Z", - "shell.execute_reply": "2024-09-22T11:16:13.120918Z", - "shell.execute_reply.started": "2024-09-22T11:16:13.093450Z" + "iopub.execute_input": "2024-09-30T08:12:43.756100Z", + "iopub.status.busy": "2024-09-30T08:12:43.755357Z", + "iopub.status.idle": "2024-09-30T08:12:43.770919Z", + "shell.execute_reply": "2024-09-30T08:12:43.769768Z", + "shell.execute_reply.started": "2024-09-30T08:12:43.756030Z" } }, "outputs": [ @@ -1485,14 +1411,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "16~24岁平均成绩:3.11分,人数:484人,男性:365人\n", - "25~29岁平均成绩:3.16分,人数:269人,男性:196人\n", - "30~34岁平均成绩:3.15分,人数:135人,男性:100人\n", - "35~39岁平均成绩:3.3分,人数:161人,男性:135人\n", - "40~44岁平均成绩:3.39分,人数:67人,男性:59人\n", - "45~49岁平均成绩:3.48分,人数:96人,男性:72人\n", - "50~54岁平均成绩:3.29分,人数:93人,男性:88人\n", - "55~69岁平均成绩:3.27分,人数:60人,男性:59人\n" + "16~24岁平均成绩:3.24分,人数:18人,男性:14人\n", + "25~29岁平均成绩:3.18分,人数:92人,男性:69人\n", + "30~34岁平均成绩:3.19分,人数:73人,男性:48人\n", + "35~39岁平均成绩:3.33分,人数:79人,男性:64人\n", + "40~44岁平均成绩:3.43分,人数:34人,男性:27人\n", + "45~49岁平均成绩:3.45分,人数:34人,男性:22人\n", + "50~54岁平均成绩:3.38分,人数:45人,男性:40人\n", + "55~69岁平均成绩:3.3分,人数:30人,男性:29人\n" ] } ], @@ -1530,15 +1456,15 @@ }, { "cell_type": "code", - "execution_count": 68, + "execution_count": 142, "id": "c5bb03ca-b7ee-4564-b425-8513e1bff081", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T11:18:31.953834Z", - "iopub.status.busy": "2024-09-22T11:18:31.953204Z", - "iopub.status.idle": "2024-09-22T11:18:31.982787Z", - "shell.execute_reply": "2024-09-22T11:18:31.982216Z", - "shell.execute_reply.started": "2024-09-22T11:18:31.953775Z" + "iopub.execute_input": "2024-09-30T08:13:35.726671Z", + "iopub.status.busy": "2024-09-30T08:13:35.725976Z", + "iopub.status.idle": "2024-09-30T08:13:35.738750Z", + "shell.execute_reply": "2024-09-30T08:13:35.737676Z", + "shell.execute_reply.started": "2024-09-30T08:13:35.726606Z" } }, "outputs": [ @@ -1546,14 +1472,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "20~24岁平均成绩:3.08分,人数:365人\n", - "25~29岁平均成绩:3.1分,人数:196人\n", - "30~34岁平均成绩:3.1分,人数:100人\n", - "35~39岁平均成绩:3.27分,人数:135人\n", - "40~44岁平均成绩:3.39分,人数:59人\n", - "45~49岁平均成绩:3.4分,人数:72人\n", - "50~54岁平均成绩:3.27分,人数:88人\n", - "55~80岁平均成绩:3.25分,人数:59人\n" + "20~24岁平均成绩:3.21分,人数:14人\n", + "25~29岁平均成绩:3.13分,人数:69人\n", + "30~34岁平均成绩:3.1分,人数:48人\n", + "35~39岁平均成绩:3.3分,人数:64人\n", + "40~44岁平均成绩:3.44分,人数:27人\n", + "45~49岁平均成绩:3.28分,人数:22人\n", + "50~54岁平均成绩:3.34分,人数:40人\n", + "55~80岁平均成绩:3.28分,人数:29人\n" ] } ], @@ -1591,15 +1517,15 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": 143, "id": "bf333998-230c-4365-aadc-b0d1be073b39", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T11:20:46.582055Z", - "iopub.status.busy": "2024-09-22T11:20:46.581306Z", - "iopub.status.idle": "2024-09-22T11:20:46.606923Z", - "shell.execute_reply": "2024-09-22T11:20:46.606298Z", - "shell.execute_reply.started": "2024-09-22T11:20:46.581983Z" + "iopub.execute_input": "2024-09-30T08:14:20.172349Z", + "iopub.status.busy": "2024-09-30T08:14:20.171955Z", + "iopub.status.idle": "2024-09-30T08:14:20.181587Z", + "shell.execute_reply": "2024-09-30T08:14:20.180965Z", + "shell.execute_reply.started": "2024-09-30T08:14:20.172326Z" } }, "outputs": [ @@ -1607,12 +1533,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "20~24岁平均成绩:3.21分,人数:119人\n", - "25~29岁平均成绩:3.32分,人数:73人\n", - "30~34岁平均成绩:3.32分,人数:35人\n", - "35~39岁平均成绩:3.44分,人数:26人\n", - "40~44岁平均成绩:3.4分,人数:8人\n", - "45~49岁平均成绩:3.73分,人数:24人\n", + "20~24岁平均成绩:3.37分,人数:4人\n", + "25~29岁平均成绩:3.31分,人数:23人\n", + "30~34岁平均成绩:3.36分,人数:25人\n", + "35~39岁平均成绩:3.48分,人数:15人\n", + "40~44岁平均成绩:3.4分,人数:7人\n", + "45~49岁平均成绩:3.77分,人数:12人\n", "50~54岁平均成绩:3.71分,人数:5人\n", "55~80岁平均成绩:4.0分,人数:1人\n" ] @@ -1650,15 +1576,15 @@ }, { "cell_type": "code", - "execution_count": 70, + "execution_count": 144, "id": "352c6c29-8929-4210-84c5-8dbc3d5ffeee", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T11:21:51.501623Z", - "iopub.status.busy": "2024-09-22T11:21:51.500851Z", - "iopub.status.idle": "2024-09-22T11:21:51.526895Z", - "shell.execute_reply": "2024-09-22T11:21:51.526331Z", - "shell.execute_reply.started": "2024-09-22T11:21:51.501553Z" + "iopub.execute_input": "2024-09-30T08:15:17.750779Z", + "iopub.status.busy": "2024-09-30T08:15:17.750013Z", + "iopub.status.idle": "2024-09-30T08:15:17.769711Z", + "shell.execute_reply": "2024-09-30T08:15:17.768948Z", + "shell.execute_reply.started": "2024-09-30T08:15:17.750706Z" } }, "outputs": [ @@ -1666,16 +1592,16 @@ "name": "stdout", "output_type": "stream", "text": [ - "BMI 4.0 1364\n", - "肺活量 3.52 1364\n", - "握力 3.25 1361\n", - "坐位体前屈 2.93 1346\n", - "纵跳 3.4 1316\n", - "俯卧撑 3.65 1047\n", - "一分钟仰卧起坐 4.27 240\n", - "单脚站立 2.6 1356\n", - "选择反应时 2.88 1317\n", - "台阶指数 2.5 1286\n" + "BMI 4.07 404\n", + "肺活量 3.59 405\n", + "握力 3.13 403\n", + "坐位体前屈 2.98 400\n", + "纵跳 3.48 394\n", + "俯卧撑 3.8 308\n", + "一分钟仰卧起坐 4.58 78\n", + "单脚站立 2.78 397\n", + "选择反应时 3.02 388\n", + "台阶指数 2.6 381\n" ] } ], @@ -1703,15 +1629,15 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 145, "id": "97f5a1cf-341e-4b99-9549-b6a3fb165849", "metadata": { "execution": { - "iopub.execute_input": "2024-09-22T11:23:46.840351Z", - "iopub.status.busy": "2024-09-22T11:23:46.839524Z", - "iopub.status.idle": "2024-09-22T11:23:46.865572Z", - "shell.execute_reply": "2024-09-22T11:23:46.865072Z", - "shell.execute_reply.started": "2024-09-22T11:23:46.840276Z" + "iopub.execute_input": "2024-09-30T08:16:03.902202Z", + "iopub.status.busy": "2024-09-30T08:16:03.901487Z", + "iopub.status.idle": "2024-09-30T08:16:03.914044Z", + "shell.execute_reply": "2024-09-30T08:16:03.913182Z", + "shell.execute_reply.started": "2024-09-30T08:16:03.902118Z" } }, "outputs": [ @@ -1720,38 +1646,37 @@ "output_type": "stream", "text": [ "采购中心 3.39 20\n", - "炼油三部 3.2 30\n", - "烯烃一部 3.21 156\n", - "炼油五部 3.26 72\n", - "公用工程二部 3.26 72\n", - "合成材料部 3.12 55\n", - "质管中心 3.24 56\n", - "储运一部 3.1 82\n", - "氢能制造部 3.18 59\n", - "电气中心 3.14 45\n", - "公用工程一部 3.12 81\n", - "仪表和计量中心 3.29 81\n", - "港储部 3.13 36\n", - "炼油二部 3.28 60\n", - "消防支队 3.35 25\n", - "烯烃二部 3.03 42\n", - "炼油一部 3.29 42\n", - "事务中心 3.17 35\n", - "公司机关 3.3 102\n", - "化学制品部 3.31 43\n", - "项目管理部 3.38 19\n", - "新材料研究院 3.31 15\n", - "炼油四部 3.08 27\n", - "油库中心 3.22 25\n", - "炼油六部 3.08 34\n", - "储运二部 3.12 13\n", + "公用工程一部 3.28 24\n", + "炼油二部 3.21 8\n", + "事务中心 3.19 32\n", + "公司机关 3.31 83\n", + "储运一部 3.29 26\n", + "仪表和计量中心 3.31 22\n", + "项目管理部 3.36 17\n", + "港储部 3.0 7\n", + "电气中心 3.18 5\n", + "公用工程二部 3.26 13\n", + "炼油五部 3.56 16\n", + "消防支队 3.14 6\n", + "新材料研究院 3.21 11\n", + "合成材料部 3.47 9\n", + "氢能制造部 3.19 4\n", + "油库中心 3.3 17\n", + "炼油三部 3.46 8\n", + "质管中心 3.2 11\n", + "烯烃一部 3.41 21\n", + "化学制品部 3.51 5\n", + "炼油六部 3.17 6\n", + "炼油一部 3.24 10\n", "宣传部 3.11 1\n", "财务部 3.0 1\n", "生产部 3.04 3\n", "发展部 2.78 4\n", "项目部 2.7 2\n", - "炼油七部 3.25 26\n", - "公用工程五部 2.8 1\n" + "炼油四部 3.25 4\n", + "烯烃二部 3.13 6\n", + "炼油七部 2.89 1\n", + "储运二部 3.44 2\n" ] } ], diff --git a/体测单位/长炼医院.ipynb b/体测单位/长炼医院.ipynb index 0e046c3..37cc5a7 100644 --- a/体测单位/长炼医院.ipynb +++ b/体测单位/长炼医院.ipynb @@ -4,7 +4,6 @@ "cell_type": "markdown", "id": "55644860-57e6-466b-b6e9-e6fdd807498d", "metadata": { - "jp-MarkdownHeadingCollapsed": true, "tags": [] }, "source": [ @@ -2367,15 +2366,15 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "id": "1e2d586e-6ff5-4fd1-a909-278d23e54561", "metadata": { "execution": { - "iopub.execute_input": "2024-09-29T02:18:02.228980Z", - "iopub.status.busy": "2024-09-29T02:18:02.228201Z", - "iopub.status.idle": "2024-09-29T02:18:02.253056Z", - "shell.execute_reply": "2024-09-29T02:18:02.252599Z", - "shell.execute_reply.started": "2024-09-29T02:18:02.228910Z" + "iopub.execute_input": "2024-09-29T05:14:10.446230Z", + "iopub.status.busy": "2024-09-29T05:14:10.445350Z", + "iopub.status.idle": "2024-09-29T05:14:10.477950Z", + "shell.execute_reply": "2024-09-29T05:14:10.477374Z", + "shell.execute_reply.started": "2024-09-29T05:14:10.446151Z" } }, "outputs": [ @@ -2383,8 +2382,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "80\n", - "80\n" + "212\n", + "212\n" ] } ], @@ -2403,7 +2402,7 @@ "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", @@ -2428,7 +2427,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_湖南石化青年体质检测.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", @@ -2445,15 +2444,15 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "id": "64c6e1e3-801c-4573-b78f-5a9e842597a9", "metadata": { "execution": { - "iopub.execute_input": "2024-09-29T02:18:45.748557Z", - "iopub.status.busy": "2024-09-29T02:18:45.748059Z", - "iopub.status.idle": "2024-09-29T02:18:45.957948Z", - "shell.execute_reply": "2024-09-29T02:18:45.957465Z", - "shell.execute_reply.started": "2024-09-29T02:18:45.748511Z" + "iopub.execute_input": "2024-09-29T05:14:43.182012Z", + "iopub.status.busy": "2024-09-29T05:14:43.181450Z", + "iopub.status.idle": "2024-09-29T05:14:43.242249Z", + "shell.execute_reply": "2024-09-29T05:14:43.241683Z", + "shell.execute_reply.started": "2024-09-29T05:14:43.181959Z" } }, "outputs": [], @@ -2464,11 +2463,11 @@ "items = ['身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n", "title = ['编号','姓名','性别','单位','身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n", "\n", - "filename = 'data/result_湖南石化青年体质检测.json'\n", + "filename = 'data/result_长炼医院人员2024.json'\n", "with open(filename,'r') as fl:\n", " dict1 = json.load(fl)\n", "\n", - "filename = 'data/湖南石化青年体质检测.json'\n", + "filename = 'data/长炼医院人员2024.json'\n", "with open(filename,'r') as fl:\n", " dict2 = json.load(fl)\n", " \n", @@ -2488,7 +2487,7 @@ " else:\n", " list2.append('') \n", " list1.append(list2)\n", - "filename = 'data/湖南石化青年体质检测情况表(20240720).xlsx'\n", + "filename = 'data/长炼医院人员检测情况表(20240720).xlsx'\n", "wb = openpyxl.Workbook()\n", "sheet = wb.active\n", "sheet.append(title)\n",