20251130
This commit is contained in:
1 parent
9c7595b43d
commit
7b02657d6d
2 files changed
+109
-49
No files matched your search
+77
-17
@@ -3584,15 +3584,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 1,
|
||||
"id": "52de3ba0-f430-444b-87e9-1f13c3e2dcc2",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-26T12:46:47.103732Z",
|
||||
"iopub.status.busy": "2025-11-26T12:46:47.102890Z",
|
||||
"iopub.status.idle": "2025-11-26T12:46:47.347739Z",
|
||||
"shell.execute_reply": "2025-11-26T12:46:47.347143Z",
|
||||
"shell.execute_reply.started": "2025-11-26T12:46:47.103689Z"
|
||||
"iopub.execute_input": "2025-11-29T12:48:41.369858Z",
|
||||
"iopub.status.busy": "2025-11-29T12:48:41.369285Z",
|
||||
"iopub.status.idle": "2025-11-29T12:48:41.616095Z",
|
||||
"shell.execute_reply": "2025-11-29T12:48:41.615602Z",
|
||||
"shell.execute_reply.started": "2025-11-29T12:48:41.369808Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
@@ -3600,7 +3600,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3085\n"
|
||||
"3749\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -3614,7 +3614,7 @@
|
||||
"filename = 'data/天津石化人员2025.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"filename = 'data/marks_20251126.csv'\n",
|
||||
"filename = 'data/marks_20251129.csv'\n",
|
||||
"re_ta = My.get_result(filename,dict1)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
@@ -3634,15 +3634,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": 6,
|
||||
"id": "04990b9f-a8f9-4442-935e-d223fde24e72",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-19T10:30:02.364463Z",
|
||||
"iopub.status.busy": "2025-11-19T10:30:02.363762Z",
|
||||
"iopub.status.idle": "2025-11-19T10:30:02.477779Z",
|
||||
"shell.execute_reply": "2025-11-19T10:30:02.477220Z",
|
||||
"shell.execute_reply.started": "2025-11-19T10:30:02.364407Z"
|
||||
"iopub.execute_input": "2025-11-30T09:11:15.004533Z",
|
||||
"iopub.status.busy": "2025-11-30T09:11:15.003858Z",
|
||||
"iopub.status.idle": "2025-11-30T09:11:15.536091Z",
|
||||
"shell.execute_reply": "2025-11-30T09:11:15.535622Z",
|
||||
"shell.execute_reply.started": "2025-11-30T09:11:15.004455Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -3662,12 +3662,12 @@
|
||||
"\n",
|
||||
"i = 1\n",
|
||||
"for k, v in dict1.items(): \n",
|
||||
" list2 = [i,k,v['name'],v['unit'],dict2[k]['sub_unit']]\n",
|
||||
" list2 = [i,k,v['name'],v['unit'],dict2[k]['sub_unit'],v['rq'],]\n",
|
||||
" i+=1\n",
|
||||
" list1.append(list2)\n",
|
||||
"#print(list1)\n",
|
||||
"filename = f'data/天津石化体测人员名单(截至20251119).xlsx'\n",
|
||||
"title = ['序号','员工编号','姓名','部门','车间']\n",
|
||||
"filename = f'data/天津石化体测人员名单.xlsx'\n",
|
||||
"title = ['序号','员工编号','姓名','部门','车间','体测日期']\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"sheet.append(title)\n",
|
||||
@@ -3796,6 +3796,66 @@
|
||||
"wb.save(filename)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "dd24318c-a408-43b0-9b5d-3f8e643d7bab",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 统计俯卧撑人员明细表"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "06979464-2285-4862-94de-84e772f44bbf",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-29T13:28:01.451927Z",
|
||||
"iopub.status.busy": "2025-11-29T13:28:01.451274Z",
|
||||
"iopub.status.idle": "2025-11-29T13:28:02.297890Z",
|
||||
"shell.execute_reply": "2025-11-29T13:28:02.297407Z",
|
||||
"shell.execute_reply.started": "2025-11-29T13:28:01.451868Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import openpyxl\n",
|
||||
"import json\n",
|
||||
"from datetime import date\n",
|
||||
"\n",
|
||||
"wb = openpyxl.load_workbook('data/天津手工记录明细表.xlsx')\n",
|
||||
"sheet = wb.active\n",
|
||||
"# sheets = wb.sheetnames\n",
|
||||
"person = {}\n",
|
||||
"list1 = []\n",
|
||||
"for n in range(2, sheet.max_row+1):\n",
|
||||
" \n",
|
||||
" if sheet.cell(n, 4).value=='pushup':\n",
|
||||
" code = str(int(sheet.cell(n, 3).value))\n",
|
||||
" person.setdefault(code, {})\n",
|
||||
" dict1 = {}\n",
|
||||
" \n",
|
||||
" dict1['item'] = sheet.cell(n, 4).value\n",
|
||||
" dict1['mark'] = sheet.cell(n, 5).value\n",
|
||||
" dict1['date'] = sheet.cell(n, 6).value \n",
|
||||
" dict1['create_date'] = sheet.cell(n, 7).value\n",
|
||||
" person[code] = dict1\n",
|
||||
" #list2 = [code,dict1['date'],sheet.cell(n, 5).value,dict1['create_date']]\n",
|
||||
" #list1.append(list2)\n",
|
||||
"for k, v in person.items():\n",
|
||||
" list2 = [k,v['date'],v['mark'],v['create_date']]\n",
|
||||
" list1.append(list2)\n",
|
||||
" \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": "markdown",
|
||||
"id": "85a03b00-9624-4ae9-aa6d-386798d457df",
|
||||
|
||||
Reference in new issue
Block a user