This commit is contained in:
512song committed 2024-11-07 09:35:36 +00:00
1 parent 3c3389a01e
commit 176bb74525
2 files changed
+438 -547

No files matched your search

+52 -389
View File
@@ -31,26 +31,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": null,
"id": "47aa588c-1880-44a8-add0-6fad777065d6", "id": "47aa588c-1880-44a8-add0-6fad777065d6",
"metadata": { "metadata": {},
"execution": { "outputs": [],
"iopub.execute_input": "2024-06-12T09:11:49.898532Z",
"iopub.status.busy": "2024-06-12T09:11:49.897811Z",
"iopub.status.idle": "2024-06-12T09:11:49.930322Z",
"shell.execute_reply": "2024-06-12T09:11:49.929864Z",
"shell.execute_reply.started": "2024-06-12T09:11:49.898469Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"51\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"import time\n", "import time\n",
@@ -266,26 +250,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 31, "execution_count": null,
"id": "5071c245-3fdb-4c16-8f15-998af7c1d2fe", "id": "5071c245-3fdb-4c16-8f15-998af7c1d2fe",
"metadata": { "metadata": {},
"execution": { "outputs": [],
"iopub.execute_input": "2024-07-09T02:15:58.088695Z",
"iopub.status.busy": "2024-07-09T02:15:58.087921Z",
"iopub.status.idle": "2024-07-09T02:15:58.100168Z",
"shell.execute_reply": "2024-07-09T02:15:58.098962Z",
"shell.execute_reply.started": "2024-07-09T02:15:58.088624Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"\n", "\n",
@@ -431,28 +399,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 23, "execution_count": null,
"id": "3e614f4a-a623-48e2-97f8-b31f62c9a983", "id": "3e614f4a-a623-48e2-97f8-b31f62c9a983",
"metadata": { "metadata": {
"execution": {
"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": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"4078\n",
"4078\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"import datetime\n", "import datetime\n",
@@ -544,27 +496,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 24, "execution_count": null,
"id": "141b30dc-5975-4dcb-9bc3-9b20d26a0917", "id": "141b30dc-5975-4dcb-9bc3-9b20d26a0917",
"metadata": { "metadata": {
"execution": {
"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": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok!\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"import time\n", "import time\n",
@@ -699,15 +636,15 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 29, "execution_count": 7,
"id": "b123ee6b-85d2-4660-b226-321832a6b796", "id": "b123ee6b-85d2-4660-b226-321832a6b796",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2024-10-12T07:02:48.877755Z", "iopub.execute_input": "2024-11-07T05:53:17.633409Z",
"iopub.status.busy": "2024-10-12T07:02:48.876986Z", "iopub.status.busy": "2024-11-07T05:53:17.632729Z",
"iopub.status.idle": "2024-10-12T07:03:30.738007Z", "iopub.status.idle": "2024-11-07T06:19:47.807506Z",
"shell.execute_reply": "2024-10-12T07:03:30.736951Z", "shell.execute_reply": "2024-11-07T06:19:47.806674Z",
"shell.execute_reply.started": "2024-10-12T07:02:48.877680Z" "shell.execute_reply.started": "2024-11-07T05:53:17.633382Z"
}, },
"tags": [] "tags": []
}, },
@@ -716,7 +653,7 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"76\n" "4058\n"
] ]
} }
], ],
@@ -729,7 +666,7 @@
"headers = {\n", "headers = {\n",
" \"Content-Type\": \"application/json; charset=UTF-8\"\n", " \"Content-Type\": \"application/json; charset=UTF-8\"\n",
" }\n", " }\n",
"filename = 'data/result_天津石化2024.json'\n", "filename = 'data/result_天津2024(部门合并).json'\n",
"with open(filename,'r') as fl:\n", "with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n", " dict1 = json.load(fl)\n",
"list1 = []\n", "list1 = []\n",
@@ -743,7 +680,7 @@
" \n", " \n",
" id = str(k).rjust(4,\"0\")\n", " id = str(k).rjust(4,\"0\")\n",
" mydata['path'] = file_path+id+'-'+ v['name']+'.pdf'\n", " mydata['path'] = file_path+id+'-'+ v['name']+'.pdf'\n",
" mydata['title'] = '天津石化2024'\n", " mydata['title'] = '中石化(天津)石油化工\\n有限公司'\n",
" mydata['subtitle'] = v['unit']\n", " mydata['subtitle'] = v['unit']\n",
" mydata['id'] = id\n", " mydata['id'] = id\n",
" mydata['name'] = v['name']\n", " mydata['name'] = v['name']\n",
@@ -779,31 +716,17 @@
" #print(id,v['name'],x.text)\n", " #print(id,v['name'],x.text)\n",
" #print(mydata)\n", " #print(mydata)\n",
" #x.close()\n", " #x.close()\n",
"print(i)" "print(i-1)"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 25, "execution_count": null,
"id": "4c1b3696-ab24-44bd-894a-e271ecfe4e38", "id": "4c1b3696-ab24-44bd-894a-e271ecfe4e38",
"metadata": { "metadata": {
"execution": { "tags": []
"iopub.execute_input": "2024-10-11T07:49:38.996411Z",
"iopub.status.busy": "2024-10-11T07:49:38.995809Z",
"iopub.status.idle": "2024-10-11T07:50:20.766115Z",
"shell.execute_reply": "2024-10-11T07:50:20.765301Z",
"shell.execute_reply.started": "2024-10-11T07:49:38.996354Z"
}
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"77\n"
]
}
],
"source": [ "source": [
"import requests\n", "import requests\n",
"import json\n", "import json\n",
@@ -876,16 +799,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 30, "execution_count": null,
"id": "d913a531-51b3-4795-adc3-f4fc858d7401", "id": "d913a531-51b3-4795-adc3-f4fc858d7401",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-12T07:07:42.539946Z",
"iopub.status.busy": "2024-10-12T07:07:42.539191Z",
"iopub.status.idle": "2024-10-12T07:07:42.573754Z",
"shell.execute_reply": "2024-10-12T07:07:42.573156Z",
"shell.execute_reply.started": "2024-10-12T07:07:42.539874Z"
},
"tags": [] "tags": []
}, },
"outputs": [], "outputs": [],
@@ -924,27 +840,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": null,
"id": "02319955-7fb6-4791-ae45-55b03bdadd54", "id": "02319955-7fb6-4791-ae45-55b03bdadd54",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-06-06T04:05:48.101908Z",
"iopub.status.busy": "2024-06-06T04:05:48.101136Z",
"iopub.status.idle": "2024-06-06T04:05:48.165587Z",
"shell.execute_reply": "2024-06-06T04:05:48.165042Z",
"shell.execute_reply.started": "2024-06-06T04:05:48.101837Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"source": [ "source": [
"import os,sys,shutil\n", "import os,sys,shutil\n",
"import json\n", "import json\n",
@@ -1596,26 +1497,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": null,
"id": "46aa847d-e1fe-45bd-85b6-e2d792ec8842", "id": "46aa847d-e1fe-45bd-85b6-e2d792ec8842",
"metadata": { "metadata": {},
"execution": { "outputs": [],
"iopub.execute_input": "2024-10-22T02:30:24.882960Z",
"iopub.status.busy": "2024-10-22T02:30:24.882217Z",
"iopub.status.idle": "2024-10-22T02:30:24.902502Z",
"shell.execute_reply": "2024-10-22T02:30:24.901201Z",
"shell.execute_reply.started": "2024-10-22T02:30:24.882891Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok!\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"import openpyxl\n", "import openpyxl\n",
@@ -1690,29 +1575,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": null,
"id": "63edd636-f034-4aa6-8575-63d5cdb84adb", "id": "63edd636-f034-4aa6-8575-63d5cdb84adb",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:34:09.495714Z",
"iopub.status.busy": "2024-10-22T02:34:09.494946Z",
"iopub.status.idle": "2024-10-22T02:34:09.503714Z",
"shell.execute_reply": "2024-10-22T02:34:09.503233Z",
"shell.execute_reply.started": "2024-10-22T02:34:09.495643Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"平均成绩:3.1688分,男性:26人\n",
"平均成绩:3.4576分,女性:17人\n",
"平均成绩:3.283分,总体:43人\n"
]
}
],
"source": [ "source": [
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n", "nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n",
"filename = 'data/data_中国石化化工销售2023.json'\n", "filename = 'data/data_中国石化化工销售2023.json'\n",
@@ -1749,32 +1617,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": null,
"id": "1b4a3f02-9b2e-41fc-ac6c-8163907a07f1", "id": "1b4a3f02-9b2e-41fc-ac6c-8163907a07f1",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:34:25.224176Z",
"iopub.status.busy": "2024-10-22T02:34:25.223420Z",
"iopub.status.idle": "2024-10-22T02:34:25.270285Z",
"shell.execute_reply": "2024-10-22T02:34:25.269687Z",
"shell.execute_reply.started": "2024-10-22T02:34:25.224075Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"0~255分人数:4人,男性:4人,女性:0人\n",
"256~332分人数:15人,男性:8人,女性:7人\n",
"333~367分人数:16人,男性:11人,女性:5人\n",
"368~500分人数:8人,男性:3人,女性:5人\n",
"43\n",
"ok\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"\n", "\n",
@@ -1820,34 +1668,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": null,
"id": "2d661ca6-6129-4da1-ac25-51d0156babb2", "id": "2d661ca6-6129-4da1-ac25-51d0156babb2",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:35:22.073628Z",
"iopub.status.busy": "2024-10-22T02:35:22.072934Z",
"iopub.status.idle": "2024-10-22T02:35:22.082760Z",
"shell.execute_reply": "2024-10-22T02:35:22.081516Z",
"shell.execute_reply.started": "2024-10-22T02:35:22.073566Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"20-24 {'合格': 1}\n",
"25-29 {'不合格': 0, '合格': 2, '良好': 2, '优秀': 1}\n",
"30-34 {'不合格': 0, '良好': 0}\n",
"35-39 {'合格': 1, '优秀': 0}\n",
"40-44 {'良好': 0, '合格': 2, '优秀': 1, '不合格': 0}\n",
"45-49 {'良好': 2, '不合格': 0, '优秀': 0}\n",
"50-54 {'合格': 1, '优秀': 3, '良好': 1}\n",
"55-80 {'优秀': 0, '合格': 0}\n"
]
}
],
"source": [ "source": [
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n", "nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n",
"\n", "\n",
@@ -1887,34 +1713,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": null,
"id": "fc97df37-34ff-4a02-9d26-b5d81b706e46", "id": "fc97df37-34ff-4a02-9d26-b5d81b706e46",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:36:41.779221Z",
"iopub.status.busy": "2024-10-22T02:36:41.778444Z",
"iopub.status.idle": "2024-10-22T02:36:41.790070Z",
"shell.execute_reply": "2024-10-22T02:36:41.788937Z",
"shell.execute_reply.started": "2024-10-22T02:36:41.779143Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"20-24 {'合格': 0}\n",
"25-29 {'不合格': 1, '合格': 2, '良好': 1, '优秀': 0}\n",
"30-34 {'不合格': 1, '良好': 1}\n",
"35-39 {'合格': 1, '优秀': 1}\n",
"40-44 {'良好': 3, '合格': 2, '优秀': 0, '不合格': 1}\n",
"45-49 {'良好': 5, '不合格': 1, '优秀': 1}\n",
"50-54 {'合格': 2, '优秀': 0, '良好': 1}\n",
"55-80 {'优秀': 1, '合格': 1}\n"
]
}
],
"source": [ "source": [
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n", "nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n",
"\n", "\n",
@@ -1954,34 +1758,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 17, "execution_count": null,
"id": "dafb86f8-5ee0-4c87-a98f-c7ff0f631fe5", "id": "dafb86f8-5ee0-4c87-a98f-c7ff0f631fe5",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:37:45.128462Z",
"iopub.status.busy": "2024-10-22T02:37:45.127749Z",
"iopub.status.idle": "2024-10-22T02:37:45.135167Z",
"shell.execute_reply": "2024-10-22T02:37:45.134680Z",
"shell.execute_reply.started": "2024-10-22T02:37:45.128396Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"16~24岁平均成绩:3.0分,人数:1人,男性:0人\n",
"25~29岁平均成绩:3.12分,人数:9人,男性:4人\n",
"30~34岁平均成绩:2.9分,人数:2人,男性:2人\n",
"35~39岁平均成绩:3.22分,人数:3人,男性:2人\n",
"40~44岁平均成绩:3.21分,人数:9人,男性:6人\n",
"45~49岁平均成绩:3.36分,人数:9人,男性:7人\n",
"50~54岁平均成绩:3.52分,人数:8人,男性:3人\n",
"55~69岁平均成绩:3.68分,人数:2人,男性:2人\n"
]
}
],
"source": [ "source": [
"nld = [[16,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,69]]\n", "nld = [[16,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,69]]\n",
"\n", "\n",
@@ -2016,34 +1798,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 18, "execution_count": null,
"id": "347703a1-501b-4800-bd29-16e94f4a6793", "id": "347703a1-501b-4800-bd29-16e94f4a6793",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:39:10.524756Z",
"iopub.status.busy": "2024-10-22T02:39:10.524082Z",
"iopub.status.idle": "2024-10-22T02:39:10.535312Z",
"shell.execute_reply": "2024-10-22T02:39:10.534072Z",
"shell.execute_reply.started": "2024-10-22T02:39:10.524697Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"20~24岁平均成绩:0分,人数:0人\n",
"25~29岁平均成绩:2.75分,人数:4人\n",
"30~34岁平均成绩:2.9分,人数:2人\n",
"35~39岁平均成绩:3.39分,人数:2人\n",
"40~44岁平均成绩:3.15分,人数:6人\n",
"45~49岁平均成绩:3.29分,人数:7人\n",
"50~54岁平均成绩:3.19分,人数:3人\n",
"55~80岁平均成绩:3.68分,人数:2人\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"\n", "\n",
@@ -2078,34 +1838,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 19, "execution_count": null,
"id": "5900d1c7-2f8c-4dfa-a60e-a577fb90f22d", "id": "5900d1c7-2f8c-4dfa-a60e-a577fb90f22d",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:39:53.521782Z",
"iopub.status.busy": "2024-10-22T02:39:53.520999Z",
"iopub.status.idle": "2024-10-22T02:39:53.530728Z",
"shell.execute_reply": "2024-10-22T02:39:53.529632Z",
"shell.execute_reply.started": "2024-10-22T02:39:53.521709Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"20~24岁平均成绩:3.0分,人数:1人\n",
"25~29岁平均成绩:3.41分,人数:5人\n",
"30~34岁平均成绩:0分,人数:0人\n",
"35~39岁平均成绩:2.89分,人数:1人\n",
"40~44岁平均成绩:3.34分,人数:3人\n",
"45~49岁平均成绩:3.62分,人数:2人\n",
"50~54岁平均成绩:3.72分,人数:5人\n",
"55~80岁平均成绩:0分,人数:0人\n"
]
}
],
"source": [ "source": [
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n", "nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n",
"\n", "\n",
@@ -2138,36 +1876,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 21, "execution_count": null,
"id": "ad69c45d-3f62-42df-894d-47424e759029", "id": "ad69c45d-3f62-42df-894d-47424e759029",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:41:46.277226Z",
"iopub.status.busy": "2024-10-22T02:41:46.276468Z",
"iopub.status.idle": "2024-10-22T02:41:46.288083Z",
"shell.execute_reply": "2024-10-22T02:41:46.287087Z",
"shell.execute_reply.started": "2024-10-22T02:41:46.277154Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"BMI 4.48 42\n",
"肺活量 3.95 42\n",
"握力 2.42 43\n",
"坐位体前屈 3.33 43\n",
"纵跳 2.88 43\n",
"俯卧撑 3.78 23\n",
"一分钟仰卧起坐 4.24 17\n",
"单脚站立 2.6 42\n",
"选择反应时 3.7 43\n",
"台阶指数 2.23 40\n"
]
}
],
"source": [ "source": [
"with open(filename,'r') as fl:\n", "with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n", " dict1 = json.load(fl) \n",
@@ -2192,39 +1906,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 22, "execution_count": null,
"id": "dcf152e7-bbcc-47d1-9c5f-83854db35412", "id": "dcf152e7-bbcc-47d1-9c5f-83854db35412",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-22T02:41:48.789473Z",
"iopub.status.busy": "2024-10-22T02:41:48.788717Z",
"iopub.status.idle": "2024-10-22T02:41:48.800140Z",
"shell.execute_reply": "2024-10-22T02:41:48.798823Z",
"shell.execute_reply.started": "2024-10-22T02:41:48.789404Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"监督审计部(纪委办公室) 2.79 6\n",
"计划信息部 3.74 3\n",
"合规管理部 3.67 1\n",
"商情研究室 3.12 1\n",
"本部 3.46 4\n",
"石化易贸科技有限公司 3.04 9\n",
"综合管理部 3.45 2\n",
"芳烃部 3.56 1\n",
"党委组织部(人力资源部) 3.62 2\n",
"合成材料部 3.76 6\n",
"财务部 3.61 2\n",
"战略合作部 2.89 1\n",
"外单位 2.98 5\n"
]
}
],
"source": [ "source": [
"with open(filename,'r') as fl:\n", "with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n", " dict1 = json.load(fl) \n",
@@ -2279,17 +1966,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"id": "6f9768ce-2ef5-4253-9fc6-49dbdcf00a19", "id": "6f9768ce-2ef5-4253-9fc6-49dbdcf00a19",
"metadata": { "metadata": {},
"execution": {
"iopub.execute_input": "2024-10-16T06:02:27.816265Z",
"iopub.status.busy": "2024-10-16T06:02:27.815491Z",
"iopub.status.idle": "2024-10-16T06:02:27.826371Z",
"shell.execute_reply": "2024-10-16T06:02:27.825201Z",
"shell.execute_reply.started": "2024-10-16T06:02:27.816192Z"
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"import json\n", "import json\n",
@@ -2418,28 +2097,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": null,
"id": "1acaf159-637e-4101-9881-f6bb79400136", "id": "1acaf159-637e-4101-9881-f6bb79400136",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-10-16T06:09:09.005052Z",
"iopub.status.busy": "2024-10-16T06:09:09.004252Z",
"iopub.status.idle": "2024-10-16T06:09:09.036024Z",
"shell.execute_reply": "2024-10-16T06:09:09.035535Z",
"shell.execute_reply.started": "2024-10-16T06:09:09.004974Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"[['39', '特禀', False, 68, 31, 32, 12, 28, 29, 17, 28, 42], ['38', '平和', False, 81, 15, 14, 9, 6, 12, 10, 3, 0], ['8', '痰湿', True, 81, 21, 7, 6, 31, 29, 17, 14, 0], ['48', '阳虚', False, 62, 18, 42, 15, 9, 0, 10, 3, 0], ['47', '湿热', False, 34, 43, 57, 50, 68, 70, 39, 57, 46], ['42', '痰湿', False, 37, 75, 67, 68, 96, 83, 67, 92, 67], ['63', '阴虚', True, 78, 18, 10, 37, 34, 25, 10, 3, 10], ['190', '阳虚', False, 56, 28, 50, 18, 31, 25, 14, 32, 17], ['5', '阳虚', False, 56, 46, 57, 40, 50, 45, 28, 39, 28], ['43', '平和', False, 68, 28, 0, 6, 9, 4, 28, 17, 3], ['64', '阳虚', False, 65, 21, 64, 9, 18, 29, 14, 14, 7], ['25', '气虚', True, 68, 31, 14, 18, 6, 12, 3, 7, 0], ['19', '阴虚', False, 68, 25, 25, 46, 46, 16, 17, 25, 32], ['18', '阳虚', False, 62, 18, 42, 25, 37, 37, 39, 3, 3], ['16', '平和', False, 81, 18, 0, 6, 3, 20, 7, 0, 14], ['56', '痰湿', False, 50, 50, 50, 50, 53, 50, 32, 42, 0], ['75', '平和', False, 90, 3, 10, 0, 0, 16, 10, 10, 0], ['76', '阳虚', False, 34, 53, 82, 46, 59, 70, 67, 50, 35], ['24', '气虚', True, 62, 34, 25, 25, 25, 25, 28, 25, 25], ['23', '平和', False, 93, 15, 10, 25, 18, 8, 7, 3, 0], ['46', '气虚', True, 71, 31, 28, 25, 25, 25, 25, 25, 25], ['10', '平和', False, 93, 0, 0, 0, 0, 0, 0, 0, 0], ['189', '痰湿', False, 75, 28, 0, 40, 62, 33, 46, 42, 17], ['9', '气郁', False, 59, 31, 7, 40, 12, 0, 42, 50, 39], ['191', '阳虚', False, 31, 50, 89, 25, 65, 58, 46, 67, 50], ['11', '气虚', False, 59, 46, 25, 3, 0, 0, 3, 10, 0], ['192', '血瘀', False, 46, 53, 53, 53, 50, 50, 57, 50, 50], ['49', '阳虚', False, 56, 25, 53, 9, 9, 4, 32, 28, 17], ['51', '阴虚', True, 68, 34, 28, 37, 31, 37, 7, 32, 14], ['62', '气郁', False, 46, 40, 32, 34, 34, 29, 39, 60, 39], ['3', '气郁', False, 56, 15, 14, 12, 18, 0, 7, 35, 14], ['83', '湿热', False, 68, 37, 10, 43, 53, 54, 35, 42, 28], ['194', '阳虚', False, 65, 37, 71, 25, 43, 25, 28, 21, 32], ['67', '阴虚', True, 78, 21, 7, 37, 34, 20, 17, 14, 10], ['84', '气虚', False, 50, 56, 53, 37, 37, 37, 39, 32, 14], ['82', '气郁', False, 53, 53, 42, 31, 43, 37, 57, 67, 17], ['80', '湿热', False, 53, 40, 46, 43, 28, 50, 28, 46, 14], ['79', '气虚', False, 71, 46, 25, 28, 43, 33, 21, 32, 14], ['78', '气虚', False, 50, 50, 50, 50, 50, 50, 50, 50, 50], ['195', '阳虚', True, 68, 18, 35, 31, 31, 8, 17, 28, 28], ['58', '气虚', False, 56, 53, 21, 43, 28, 25, 50, 35, 25], ['66', '痰湿', False, 53, 40, 39, 37, 50, 41, 35, 25, 39], ['65', '湿热', False, 65, 21, 25, 25, 43, 54, 21, 17, 42], ['32', '平和', False, 65, 25, 7, 28, 25, 8, 17, 17, 14], ['45', '湿热', False, 75, 21, 10, 34, 34, 58, 39, 32, 35], ['71', '痰湿', True, 62, 34, 28, 25, 37, 29, 21, 35, 28], ['54', '痰湿', False, 46, 40, 32, 18, 59, 20, 35, 39, 35], ['21', '平和', False, 100, 0, 0, 0, 0, 0, 0, 0, 0], ['68', '阳虚', False, 59, 25, 60, 15, 21, 25, 14, 21, 7], ['31', '阳虚', True, 71, 25, 39, 21, 21, 8, 21, 14, 28], ['44', '气虚', False, 62, 50, 39, 31, 25, 45, 7, 17, 14], ['29', '痰湿', False, 37, 50, 32, 50, 62, 45, 32, 46, 42], ['50', '阳虚', False, 78, 18, 42, 9, 21, 37, 3, 3, 32], ['34', '痰湿', False, 78, 31, 46, 40, 78, 37, 25, 50, 35], ['57', '阳虚', False, 43, 59, 64, 43, 46, 58, 42, 35, 35], ['200', '特禀', True, 81, 15, 7, 21, 15, 33, 17, 17, 35], ['12', '气虚', False, 50, 53, 50, 34, 46, 37, 28, 39, 28], ['13', '痰湿', False, 46, 56, 42, 46, 62, 50, 42, 42, 28]]\n",
"ok\n"
]
}
],
"source": [ "source": [
"import openpyxl\n", "import openpyxl\n",
"\n", "\n",
@@ -2577,7 +2240,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.12.3" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,
+386 -158
View File
@@ -2252,16 +2252,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 325, "execution_count": null,
"id": "3fa6a1a9-63af-4f4e-9d30-b94f4357f7dc", "id": "3fa6a1a9-63af-4f4e-9d30-b94f4357f7dc",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-12-20T01:58:47.982585Z",
"iopub.status.busy": "2023-12-20T01:58:47.982111Z",
"iopub.status.idle": "2023-12-20T01:58:48.241957Z",
"shell.execute_reply": "2023-12-20T01:58:48.241442Z",
"shell.execute_reply.started": "2023-12-20T01:58:47.982530Z"
},
"tags": [] "tags": []
}, },
"outputs": [], "outputs": [],
@@ -2499,27 +2492,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 324, "execution_count": null,
"id": "8397633f-fddb-4cfa-b9bd-e38f3fe6772c", "id": "8397633f-fddb-4cfa-b9bd-e38f3fe6772c",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-12-19T04:46:55.234792Z",
"iopub.status.busy": "2023-12-19T04:46:55.234584Z",
"iopub.status.idle": "2023-12-19T04:46:55.720872Z",
"shell.execute_reply": "2023-12-19T04:46:55.720417Z",
"shell.execute_reply.started": "2023-12-19T04:46:55.234777Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"source": [ "source": [
"import os,sys,shutil\n", "import os,sys,shutil\n",
"import json\n", "import json\n",
@@ -2558,16 +2536,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 323, "execution_count": null,
"id": "35d1738a-1ec1-4764-bcbd-c1333fac6bfd", "id": "35d1738a-1ec1-4764-bcbd-c1333fac6bfd",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-12-19T04:45:06.677002Z",
"iopub.status.busy": "2023-12-19T04:45:06.676614Z",
"iopub.status.idle": "2023-12-19T04:45:06.915694Z",
"shell.execute_reply": "2023-12-19T04:45:06.915217Z",
"shell.execute_reply.started": "2023-12-19T04:45:06.676971Z"
},
"tags": [] "tags": []
}, },
"outputs": [], "outputs": [],
@@ -2734,27 +2705,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 319, "execution_count": null,
"id": "ca0780fe-5d74-4d4e-ad1d-38813040c778", "id": "ca0780fe-5d74-4d4e-ad1d-38813040c778",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-12-18T11:26:08.026183Z",
"iopub.status.busy": "2023-12-18T11:26:08.025794Z",
"iopub.status.idle": "2023-12-18T11:26:08.295041Z",
"shell.execute_reply": "2023-12-18T11:26:08.294596Z",
"shell.execute_reply.started": "2023-12-18T11:26:08.026152Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"import csv\n", "import csv\n",
@@ -2796,29 +2752,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 318, "execution_count": null,
"id": "9b469138-1da9-43ca-98e8-8dc6cb3916ce", "id": "9b469138-1da9-43ca-98e8-8dc6cb3916ce",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-12-18T11:18:59.322901Z",
"iopub.status.busy": "2023-12-18T11:18:59.322423Z",
"iopub.status.idle": "2023-12-18T11:18:59.414582Z",
"shell.execute_reply": "2023-12-18T11:18:59.414174Z",
"shell.execute_reply.started": "2023-12-18T11:18:59.322852Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"1730629\n",
"3499711\n",
"3145556\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"import csv\n", "import csv\n",
@@ -2869,26 +2808,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 53, "execution_count": null,
"id": "2fdbadd7-e9b1-45bf-ae95-52b4d65e03e8", "id": "2fdbadd7-e9b1-45bf-ae95-52b4d65e03e8",
"metadata": { "metadata": {},
"execution": { "outputs": [],
"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": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"source": [ "source": [
"import openpyxl\n", "import openpyxl\n",
"import json\n", "import json\n",
@@ -2926,26 +2849,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": null,
"id": "ddb84188-aafb-49b3-836d-79d9b13dfe35", "id": "ddb84188-aafb-49b3-836d-79d9b13dfe35",
"metadata": { "metadata": {},
"execution": { "outputs": [],
"iopub.execute_input": "2024-10-14T05:51:16.063432Z",
"iopub.status.busy": "2024-10-14T05:51:16.062897Z",
"iopub.status.idle": "2024-10-14T05:51:16.111372Z",
"shell.execute_reply": "2024-10-14T05:51:16.110782Z",
"shell.execute_reply.started": "2024-10-14T05:51:16.063381Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"\n", "\n",
@@ -2978,27 +2885,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 60, "execution_count": null,
"id": "f922ad6a-e7ff-4ff9-923f-3e7aa8ea112b", "id": "f922ad6a-e7ff-4ff9-923f-3e7aa8ea112b",
"metadata": { "metadata": {},
"execution": { "outputs": [],
"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": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"4078\n",
"4078\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"import time\n", "import time\n",
@@ -3057,17 +2947,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 62, "execution_count": null,
"id": "f59cf12c-d409-4de8-80f9-8264e4a2d221", "id": "f59cf12c-d409-4de8-80f9-8264e4a2d221",
"metadata": { "metadata": {},
"execution": {
"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": [], "outputs": [],
"source": [ "source": [
"import json\n", "import json\n",
@@ -3120,17 +3002,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 59, "execution_count": null,
"id": "8301201e-43fc-4d24-94a0-9c554ca39dfb", "id": "8301201e-43fc-4d24-94a0-9c554ca39dfb",
"metadata": { "metadata": {},
"execution": {
"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": [], "outputs": [],
"source": [ "source": [
"import json\n", "import json\n",
@@ -3176,17 +3050,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": null,
"id": "efff43f0-a5f8-4de8-9f79-9564bf4fbb63", "id": "efff43f0-a5f8-4de8-9f79-9564bf4fbb63",
"metadata": { "metadata": {},
"execution": {
"iopub.execute_input": "2024-10-17T09:21:23.875202Z",
"iopub.status.busy": "2024-10-17T09:21:23.874694Z",
"iopub.status.idle": "2024-10-17T09:21:23.909617Z",
"shell.execute_reply": "2024-10-17T09:21:23.908972Z",
"shell.execute_reply.started": "2024-10-17T09:21:23.875155Z"
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"import json\n", "import json\n",
@@ -3226,6 +3092,368 @@
"wb.save(filename)" "wb.save(filename)"
] ]
}, },
{
"cell_type": "markdown",
"id": "0e3c4368-a2d7-43c7-805a-7262cf43060c",
"metadata": {},
"source": [
"## 部门、车间合并"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "e3eeb600-81a7-4220-bbfd-b0325f2ca06d",
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T04:48:06.932386Z",
"iopub.status.busy": "2024-11-07T04:48:06.931738Z",
"iopub.status.idle": "2024-11-07T04:48:07.201453Z",
"shell.execute_reply": "2024-11-07T04:48:07.200881Z",
"shell.execute_reply.started": "2024-11-07T04:48:06.932361Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"4078\n"
]
}
],
"source": [
"import json\n",
"\n",
"filename = 'data/result_天津石化2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"\n",
"filename = 'data/天津石化人员2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl)\n",
"\n",
"dict3 = {}\n",
"for k, v in dict1.items():\n",
" unit = v['unit']\n",
" sub_unit = dict2[k]['sub_unit']\n",
" v['sub_unit'] = sub_unit\n",
"filename = 'data/result_天津2024(部门).json'\n",
"\n",
"with open(filename,'w') as fl:\n",
" json.dump(dict1, fl, ensure_ascii=False) \n",
"print(len(dict1))"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "9554ebdf-6a19-4301-8c14-465d6ae4d870",
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T05:17:56.871294Z",
"iopub.status.busy": "2024-11-07T05:17:56.871011Z",
"iopub.status.idle": "2024-11-07T05:17:56.944831Z",
"shell.execute_reply": "2024-11-07T05:17:56.944011Z",
"shell.execute_reply.started": "2024-11-07T05:17:56.871269Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"物资采购中心 综合计划科 12\n",
"公司机关 经营计划部 10\n",
"研究院 科技开发中心 10\n",
"化验计量部 安全设备科 11\n",
"原油储运部 生产运行科 11\n",
"电仪部 安全生产科 9\n",
"水务部 设备科 7\n",
"化工部 综合科(党群工作科、人力资源科) 20\n",
"党委党校(培训中心) 综合科 14\n",
"烯烃部 储运车间 8\n",
"电仪部 电仪作业二区 10\n",
"炼油部 设备科 7\n",
"炼油部 联合六车间 9\n",
"水务部 生产技术科 9\n",
"烯烃部 聚丙烯车间 9\n",
"信息档案管理中心 网络与通讯室 15\n",
"公司机关 财务中心 9\n",
"原油储运部 南港商储库 11\n",
"物资采购中心 供应链管理科(招标办公室) 20\n",
"电仪部 电仪作业三区 10\n",
"电仪部 仪表作业一区 10\n",
"水务部 水处理二车间 10\n",
"电仪部 党群工作科(综合科) 14\n",
"烯烃部 综合科(党群工作科、人力资源科) 20\n",
"信息档案管理中心 ERP支持室 15\n",
"公司机关 设备管理部 10\n",
"聚醚部 研发中心 8\n",
"行政事务中心 厂容绿化科 12\n",
"研究院 材料技术研究一室 12\n",
"研究院 理化研究室 9\n",
"公司机关 安全环保部 10\n",
"物资采购中心 储运配送车间 13\n",
"研究院 精细化工团队 10\n",
"热电部 新锅炉车间 9\n",
"电仪部 电气作业一区 10\n",
"研究院 材料技术研究二室 12\n",
"水务部 综合科 7\n",
"运输销售部 综合科(党群工作科) 16\n",
"炼油部 党群工作科(人力资源科) 16\n",
"电仪部 电气科 7\n",
"装备研究院 设备安保室 11\n",
"烯烃部 聚乙烯车间 9\n",
"化工部 安全环保科 9\n",
"党委党校(培训中心) 专业培训室 16\n",
"消防支队 党群(综合)科 12\n",
"聚醚部 党群工作科 9\n",
"炼油部 安全环保科 9\n",
"化工部 储运车间 8\n",
"化验计量部 烯烃化验站 11\n",
"原油储运部 天津商储库 11\n",
"研究院 化工技术研究二室 12\n",
"水务部 安全环保科 9\n",
"装备研究院 综合室(党群工作室) 16\n",
"南港烯烃部 ABS装置 11\n",
"热电部 燃料车间 8\n",
"行政事务中心 车队 9\n",
"行政事务中心 离退服务室 12\n",
"研究院 新能源技术研究室 12\n",
"炼油部 保卫组 7\n",
"公司机关 群众工作部 10\n",
"研究院 设备安保科 9\n",
"烯烃部 设备科 7\n",
"热电部 汽机车间 8\n",
"炼油部 联合九车间 9\n",
"行政事务中心 信访室 10\n",
"炼油部 生产科 7\n",
"炼油部 联合一车间 9\n",
"化工部 生产技术科 9\n",
"运输销售部 调运队 9\n",
"热电部 安全环保科 9\n",
"信息档案管理中心 档案室 12\n",
"公司机关 企业管理部 10\n",
"化验计量部 化工化验站 11\n",
"电仪部 控制系统运维室 11\n",
"化验计量部 综合科 9\n",
"化验计量部 环境监测和职业卫生检测站 18\n",
"装备研究院 生产经营中心 12\n",
"公司机关 工程部 8\n",
"行政事务中心 综合服务队 12\n",
"水务部 水处理一车间 10\n",
"烯烃部 安全环保科 9\n",
"化验计量部 党群工作科(人力资源科) 18\n",
"原油储运部 党群工作科(人事科) 16\n",
"运输销售部 销售运行中心 12\n",
"装备研究院 科技开发中心 12\n",
"电仪部 仪表科 7\n",
"原油储运部 实华商储库 11\n",
"化工部 环氧丙烷车间 10\n",
"公司机关 审计部 8\n",
"聚醚部 综合科 7\n",
"聚醚部 聚醚装置区 9\n",
"运输销售部 统销统配室 11\n",
"物资采购中心 设备采购室(国产化办公室) 20\n",
"公司机关 纪委 7\n",
"炼油部 联合三车间 9\n",
"化验计量部 炼油化验站 11\n",
"聚醚部 销售中心 8\n",
"研究院 党群工作科(综合科) 14\n",
"电仪部 电仪南港分部 10\n",
"化工部 芳烃车间 8\n",
"聚醚部 生产技术科 9\n",
"化工部 设备科 7\n",
"物资采购中心 材料采购室 12\n",
"物资采购中心 三剂采购室 12\n",
"信息档案管理中心 党群工作室(综合科) 19\n",
"炼油部 油品车间 8\n",
"党委党校(培训中心) 党建与管理培训室 19\n",
"运输销售部 机务队 9\n",
"化验计量部 计量站 9\n",
"公司机关 生产部 8\n",
"行政事务中心 安保科 10\n",
"聚醚部 设备科 7\n",
"炼油部 联合七车间 9\n",
"党委党校(培训中心) 技能培训室 16\n",
"信息档案管理中心 编辑室 12\n",
"研究院 设计开发研究室 11\n",
"炼油部 联合五车间 9\n",
"公司机关 新闻中心 9\n",
"物资采购中心 电仪采购室 12\n",
"党委党校(培训中心) 培训控制科 16\n",
"运输销售部 营销业务室 11\n",
"公司机关 HSE督查大队 12\n",
"聚醚部 安全环保科 9\n",
"炼油部 综合科 7\n",
"物资采购中心 综合科 10\n",
"信息档案管理中心 软件开发室 14\n",
"热电部 综合科(党群工作科、人力资源科) 20\n",
"炼油部 联合二车间 9\n",
"电仪部 电仪作业四区 10\n",
"化验计量部 生产技术科 11\n",
"原油储运部 曹妃甸库区 11\n",
"烯烃部 生产技术科 9\n",
"热电部 电气车间 8\n",
"运输销售部 铁路运行中心 12\n",
"物资采购中心 项目服务室 12\n",
"信息档案管理中心 信息化管理科 15\n",
"党委党校(培训中心) 党群工作科(人事科) 21\n",
"公司机关 办公室 8\n",
"南港烯烃部 党群工作室 11\n",
"原油储运部 设备工程科 11\n",
"炼油部 技术质量科 9\n",
"行政事务中心 党群工作科(综合科) 17\n",
"电仪部 电力调度中心 10\n",
"化工部 烷基化车间 9\n",
"炼油部 新联合四车间 10\n",
"热电部 生产技术科 9\n",
"原油储运部 综合科 9\n",
"原油储运部 安全环保科 11\n",
"热电部 设备科 7\n",
"信息档案管理中心 设备维护室 14\n",
"化验计量部 计量检定站 11\n",
"原油储运部 大港枢纽库 11\n",
"党委党校(培训中心) 社保工作室 16\n",
"研究院 科技开发科 9\n",
"物资采购中心 原料采购室 12\n",
"水务部 水净化车间 9\n",
"研究院 化工技术研究一室 12\n",
"信息档案管理中心 MES支持室 15\n",
"信息档案管理中心 运行管理科 14\n"
]
}
],
"source": [
"filename = 'data/result_天津2024(部门合并).json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"set1 = set()\n",
"for k,v in dict1.items():\n",
" set1.add(v['unit'])\n",
"for item in set1:\n",
" print(item,len(item))"
]
},
{
"cell_type": "markdown",
"id": "6d673f9e-e91b-40f6-bee6-c4bf59308302",
"metadata": {},
"source": [
"## 体测报告按部门、车间分类"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "0f945c49-ac5e-4587-8d8c-96667c327248",
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T06:20:08.059278Z",
"iopub.status.busy": "2024-11-07T06:20:08.058524Z",
"iopub.status.idle": "2024-11-07T06:20:09.347745Z",
"shell.execute_reply": "2024-11-07T06:20:09.346893Z",
"shell.execute_reply.started": "2024-11-07T06:20:08.059245Z"
},
"tags": []
},
"outputs": [],
"source": [
"import os,sys,shutil\n",
"import json\n",
"import glob\n",
"from pathlib import Path\n",
"\n",
"fi_path = '/home/songyi/pdf-typescript-old2/天津石化2024'\n",
"new_path = 'file/天津石化2024'\n",
"old = []\n",
"dict2 = {}\n",
"\n",
"filename = 'data/天津石化人员2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"fls = glob.glob(f'{fi_path}/*.pdf')\n",
"for fn in fls:\n",
" fi_name =Path(fn).stem.split('-')[0]\n",
" code = int(fi_name)\n",
" unit_path = Path(new_path,dict1[str(code)]['unit'],dict1[str(code)]['sub_unit'])\n",
" unit_path.mkdir(parents = True, exist_ok = True)\n",
" n_name = Path(unit_path,Path(fn).stem+'.pdf')\n",
" if not os.path.exists(n_name):\n",
" shutil.copyfile(fn,n_name)"
]
},
{
"cell_type": "markdown",
"id": "5cab4519-5ffa-4ac0-8db7-5674e181fc14",
"metadata": {},
"source": [
"## 生成体测报告打印明细表"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "9dcbc866-2481-4cf6-a563-df4bb6596dfd",
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T06:23:23.785642Z",
"iopub.status.busy": "2024-11-07T06:23:23.785175Z",
"iopub.status.idle": "2024-11-07T06:23:24.321254Z",
"shell.execute_reply": "2024-11-07T06:23:24.320296Z",
"shell.execute_reply.started": "2024-11-07T06:23:23.785599Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"source": [
"import os,sys,shutil\n",
"import json\n",
"import glob\n",
"from pathlib import Path\n",
"import openpyxl\n",
"\n",
"fi_path = '/home/songyi/pdf-typescript-old2/天津石化2024'\n",
"\n",
"filename = 'data/天津石化人员2024.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"fls = glob.glob(f'{fi_path}/*.pdf')\n",
"list1 = []\n",
"title = ['测试编号','姓名','性别','部门','车间']\n",
"for fn in fls:\n",
" list2 = []\n",
" fi_name =Path(fn).stem.split('-')[0] \n",
" code = int(fi_name)\n",
" sex = dict1[str(code)]['sex']\n",
" unit = dict1[str(code)]['unit']\n",
" sub_unit = dict1[str(code)]['sub_unit']\n",
" list2 = [fi_name,Path(fn).stem.split('-')[1],sex,unit,sub_unit]\n",
" \n",
" list1.append(list2)\n",
"\n",
"filename = 'data/天津石化体测报告明细表(2024年).xlsx'\n",
"wb = openpyxl.Workbook()\n",
"sheet = wb.active\n",
"sheet.append(title)\n",
"for row in list1:\n",
" sheet.append(row)\n",
" \n",
"wb.save(filename) \n",
"print('ok')"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "85a03b00-9624-4ae9-aa6d-386798d457df", "id": "85a03b00-9624-4ae9-aa6d-386798d457df",
@@ -4243,7 +4471,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.12.3" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,