20251126
This commit is contained in:
1 parent
aff0303bc9
commit
d41474d9f1
6 files changed
+662
-1607
No files matched your search
+87
-23
@@ -2793,7 +2793,9 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "08bcbf58-4356-4f30-850f-0d0ff0e2528b",
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"jp-MarkdownHeadingCollapsed": true
|
||||
},
|
||||
"source": [
|
||||
"# 第三次体测(2024年10月)"
|
||||
]
|
||||
@@ -3511,6 +3513,67 @@
|
||||
"print(len(list1),'ok')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4b7730ae-e5ca-4d4f-8abf-fd23e9138002",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 合并读卡系统文件"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "0bebc944-ffa0-4bc9-8ae5-5643fe1015dd",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-25T09:08:42.753636Z",
|
||||
"iopub.status.busy": "2025-11-25T09:08:42.752981Z",
|
||||
"iopub.status.idle": "2025-11-25T09:08:42.813419Z",
|
||||
"shell.execute_reply": "2025-11-25T09:08:42.812811Z",
|
||||
"shell.execute_reply.started": "2025-11-25T09:08:42.753578Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"03603055 赵文远 电仪部-电气作业一区\n",
|
||||
"03603051 李英豪 电仪部-电气作业一区\n",
|
||||
"5060 ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"\n",
|
||||
"filename = 'data/天津石化人员2025.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"\n",
|
||||
"filename = 'data/data_天津石化2025.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" list1 = json.load(fl)\n",
|
||||
"for item in list1:\n",
|
||||
" code = item['id'].lower()\n",
|
||||
" if code not in dict1.keys():\n",
|
||||
" print(code,item['name'],item['unit'])\n",
|
||||
" code = code.lower()\n",
|
||||
" unit = item['unit'].split('-')[0]\n",
|
||||
" sub_unit = item['unit'].split('-')[1]\n",
|
||||
" dict1.setdefault(code,{})\n",
|
||||
" dict1[code]['name'] = item['name']\n",
|
||||
" dict1[code]['sex'] = item['gender']\n",
|
||||
" dict1[code]['unit'] = unit\n",
|
||||
" dict1[code]['sub_unit'] = sub_unit\n",
|
||||
" dict1[code]['birth'] = item['birth']\n",
|
||||
"filename = 'data/天津石化人员2025.json'\n",
|
||||
"with open(filename, 'w') as fl:\n",
|
||||
" json.dump(dict1, fl, ensure_ascii=False)\n",
|
||||
"print(len(dict1),'ok')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "fd5cb794-6197-4204-a421-fd7a14aeab20",
|
||||
@@ -3521,15 +3584,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"execution_count": 2,
|
||||
"id": "52de3ba0-f430-444b-87e9-1f13c3e2dcc2",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-21T13:09:49.032705Z",
|
||||
"iopub.status.busy": "2025-11-21T13:09:49.032208Z",
|
||||
"iopub.status.idle": "2025-11-21T13:09:49.211933Z",
|
||||
"shell.execute_reply": "2025-11-21T13:09:49.211382Z",
|
||||
"shell.execute_reply.started": "2025-11-21T13:09:49.032662Z"
|
||||
"iopub.execute_input": "2025-11-25T09:12:56.872603Z",
|
||||
"iopub.status.busy": "2025-11-25T09:12:56.871910Z",
|
||||
"iopub.status.idle": "2025-11-25T09:12:57.023721Z",
|
||||
"shell.execute_reply": "2025-11-25T09:12:57.023114Z",
|
||||
"shell.execute_reply.started": "2025-11-25T09:12:56.872536Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
@@ -3537,7 +3600,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"1898\n"
|
||||
"2646\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -3551,7 +3614,7 @@
|
||||
"filename = 'data/天津石化人员2025.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"filename = 'data/marks_20251121.csv'\n",
|
||||
"filename = 'data/marks_20251125.csv'\n",
|
||||
"re_ta = My.get_result(filename,dict1)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
@@ -3623,20 +3686,21 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 26,
|
||||
"execution_count": 4,
|
||||
"id": "fcb3c816-5260-4807-9536-b8203680ed1c",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-21T13:10:04.169431Z",
|
||||
"iopub.status.busy": "2025-11-21T13:10:04.168764Z",
|
||||
"iopub.status.idle": "2025-11-21T13:10:04.215983Z",
|
||||
"shell.execute_reply": "2025-11-21T13:10:04.215442Z",
|
||||
"shell.execute_reply.started": "2025-11-21T13:10:04.169372Z"
|
||||
"iopub.execute_input": "2025-11-25T09:13:27.357951Z",
|
||||
"iopub.status.busy": "2025-11-25T09:13:27.357275Z",
|
||||
"iopub.status.idle": "2025-11-25T09:13:27.620960Z",
|
||||
"shell.execute_reply": "2025-11-25T09:13:27.620410Z",
|
||||
"shell.execute_reply.started": "2025-11-25T09:13:27.357888Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import openpyxl\n",
|
||||
"\n",
|
||||
"filename = 'data/result_天津石化2025.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
@@ -3669,7 +3733,7 @@
|
||||
" list2 = [k,v['人数'],v['体测人数']]\n",
|
||||
" list1.append(list2)\n",
|
||||
"\n",
|
||||
"filename = 'data/天津石化部门测试情况(截至20241121).xlsx'\n",
|
||||
"filename = 'data/天津石化部门测试情况(截至20241125).xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"sheet.append(title)\n",
|
||||
@@ -3689,15 +3753,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 27,
|
||||
"execution_count": 5,
|
||||
"id": "df8b9405-a2d9-413d-bcf4-205704b0243a",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-21T13:10:36.807855Z",
|
||||
"iopub.status.busy": "2025-11-21T13:10:36.807222Z",
|
||||
"iopub.status.idle": "2025-11-21T13:10:37.013652Z",
|
||||
"shell.execute_reply": "2025-11-21T13:10:37.013094Z",
|
||||
"shell.execute_reply.started": "2025-11-21T13:10:36.807795Z"
|
||||
"iopub.execute_input": "2025-11-25T09:13:35.113929Z",
|
||||
"iopub.status.busy": "2025-11-25T09:13:35.113224Z",
|
||||
"iopub.status.idle": "2025-11-25T09:13:35.286136Z",
|
||||
"shell.execute_reply": "2025-11-25T09:13:35.285593Z",
|
||||
"shell.execute_reply.started": "2025-11-25T09:13:35.113867Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -3722,7 +3786,7 @@
|
||||
" i+=1\n",
|
||||
" list1.append(list2)\n",
|
||||
"#print(list1)\n",
|
||||
"filename = f'data/天津石化未测试人员名单(截至20251121).xlsx'\n",
|
||||
"filename = f'data/天津石化未测试人员名单(截至20251125).xlsx'\n",
|
||||
"title = ['序号','员工编号','姓名','部门']\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
|
||||
Reference in new issue
Block a user