This commit is contained in:
512song committed 2023-11-09 00:18:14 +08:00
1 parent 674aa61c54
commit ecbd0aba0a
2 files changed
+641 -14

No files matched your search

+63 -10
View File
@@ -661,7 +661,6 @@
"cell_type": "markdown",
"id": "1e3f67e9-e332-41c5-89f8-b64ec0bace4c",
"metadata": {
"jp-MarkdownHeadingCollapsed": true,
"tags": []
},
"source": [
@@ -1221,15 +1220,15 @@
},
{
"cell_type": "code",
"execution_count": 105,
"execution_count": 11,
"id": "1aa45b35-7376-4c50-8275-79b090a6c758",
"metadata": {
"execution": {
"iopub.execute_input": "2023-11-08T01:55:24.418823Z",
"iopub.status.busy": "2023-11-08T01:55:24.418534Z",
"iopub.status.idle": "2023-11-08T01:55:24.459533Z",
"shell.execute_reply": "2023-11-08T01:55:24.458755Z",
"shell.execute_reply.started": "2023-11-08T01:55:24.418802Z"
"iopub.execute_input": "2023-11-08T13:04:51.428359Z",
"iopub.status.busy": "2023-11-08T13:04:51.427883Z",
"iopub.status.idle": "2023-11-08T13:04:51.489149Z",
"shell.execute_reply": "2023-11-08T13:04:51.488092Z",
"shell.execute_reply.started": "2023-11-08T13:04:51.428321Z"
},
"tags": []
},
@@ -1238,8 +1237,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"217\n",
"217\n"
"347\n",
"347\n"
]
}
],
@@ -1291,10 +1290,64 @@
"print(len(re_ta))"
]
},
{
"cell_type": "markdown",
"id": "429ed5f7-57cb-4fcd-a267-2d222e08d81c",
"metadata": {},
"source": [
"## 统计所有部门未体测人员明细表"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "1172a79c-ec8f-4274-8c43-6ec11d95f8ca",
"metadata": {
"execution": {
"iopub.execute_input": "2023-11-08T13:12:25.253656Z",
"iopub.status.busy": "2023-11-08T13:12:25.253181Z",
"iopub.status.idle": "2023-11-08T13:12:25.338731Z",
"shell.execute_reply": "2023-11-08T13:12:25.338208Z",
"shell.execute_reply.started": "2023-11-08T13:12:25.253599Z"
},
"tags": []
},
"outputs": [],
"source": [
"import json\n",
"import openpyxl\n",
"\n",
"filename = 'data/result_北海炼化2023.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"\n",
"filename = 'data/北海炼化2023年.json'\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl)\n",
"\n",
"list1 = []\n",
"\n",
"i = 1\n",
"for k, v in dict2.items():\n",
" \n",
" if k not in dict1.keys():\n",
" list2 = [i,k,v['name'],v['unit']]\n",
" i+=1\n",
" list1.append(list2)\n",
"filename = f'data/北海炼化未测试人员名单.xlsx'\n",
"title = ['序号','员工编号','姓名','部门']\n",
"wb = openpyxl.Workbook()\n",
"sheet = wb.active\n",
"sheet.append(title)\n",
"for row in list1:\n",
" sheet.append(row) \n",
"wb.save(filename)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "56ad2623-c435-4161-a55e-18899c6134ea",
"id": "7111dc19-387c-4e4d-bfed-0273cf0809fb",
"metadata": {},
"outputs": [],
"source": []