20251203
This commit is contained in:
1 parent
7b02657d6d
commit
1036605b50
6 files changed
+761
-281
No files matched your search
+60
-26
@@ -1131,9 +1131,17 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 1,
|
||||
"id": "22be8f39-afbb-448a-8ae6-c825c7d38757",
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-12-01T08:20:03.713528Z",
|
||||
"iopub.status.busy": "2025-12-01T08:20:03.713011Z",
|
||||
"iopub.status.idle": "2025-12-01T08:20:04.212086Z",
|
||||
"shell.execute_reply": "2025-12-01T08:20:04.211619Z",
|
||||
"shell.execute_reply.started": "2025-12-01T08:20:03.713468Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
@@ -1142,7 +1150,7 @@
|
||||
"\n",
|
||||
"title = []\n",
|
||||
"\n",
|
||||
"filename = 'data/surveys_records_2025-11-24.json'\n",
|
||||
"filename = 'data/surveys_records_2025-11-30.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"list1 = []\n",
|
||||
@@ -1167,7 +1175,7 @@
|
||||
" \n",
|
||||
" list1.append(list2)\n",
|
||||
"all_title = ['id', 'date_created','name', 'gender', 'birth', 'code', 'unit', 'height', 'weight', 'next_weight', 'waist', 'hip', 'level4', 'level3', 'level2', 'recipe', 'level1', 'last_level4', 'last_level3', 'last_level2', 'last_level1', 'last_recipe', 'last_lose', 'last_sport', 'sport_type', 'sport_duration', 'last_sport_time', 'last_lose-Comment', 'last_recipe-Comment', 'last_lose_weight', 'last_sport-Comment', 'sport_type-Comment']\n",
|
||||
"filename = 'data/宁夏能化干预人员问卷(20251123).xlsx'\n",
|
||||
"filename = 'data/宁夏能化干预人员问卷(20251130).xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"sheet.append(all_title)\n",
|
||||
@@ -1219,7 +1227,7 @@
|
||||
" password=\"songyi\"\n",
|
||||
")\n",
|
||||
"cur = conn.cursor()\n",
|
||||
"wb = openpyxl.load_workbook('data/宁夏能化干预人员问卷(20251123).xlsx',data_only=True)\n",
|
||||
"wb = openpyxl.load_workbook('data/宁夏能化干预人员问卷(20251130).xlsx',data_only=True)\n",
|
||||
"sheet = wb.active\n",
|
||||
"# sheets = wb.sheetnames\n",
|
||||
"person = {}\n",
|
||||
@@ -1262,10 +1270,36 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 2,
|
||||
"id": "91c53866-3725-4ceb-b0eb-23fb14e20561",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-12-01T08:22:23.093768Z",
|
||||
"iopub.status.busy": "2025-12-01T08:22:23.093084Z",
|
||||
"iopub.status.idle": "2025-12-01T08:22:23.315461Z",
|
||||
"shell.execute_reply": "2025-12-01T08:22:23.314813Z",
|
||||
"shell.execute_reply.started": "2025-12-01T08:22:23.093711Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"('李涛', '男', '企业管理部(法律事务部)', '1984-10-16', '02020309', 1)\n",
|
||||
"('马宏伟', '男', 'BDO运行部', '1998-08-26', '03497946', 1)\n",
|
||||
"('吴婷', '女', '电气仪表中心', '1989-06-12', '02020010', 1)\n",
|
||||
"('罗继发', '男', '安全环保部', '1986-09-15', '02019647', 1)\n",
|
||||
"('苟小锐', '男', '安全环保部', '1974-04-08', '02018416', 1)\n",
|
||||
"('王振华', '男', '设备工程部', '1981-10-31', '02018482', 1)\n",
|
||||
"('莫文宁', '男', '物资采购中心', '1972-09-02', '02020208', 1)\n",
|
||||
"('张保华', '男', '质检中心', '1991-12-11', '02018721', 1)\n",
|
||||
"('邓蓉芳', '女', '质检中心', '1980-11-12', '02018677', 1)\n",
|
||||
"('冯波', '男', '乙炔运行部', '1984-07-01', '02019339', 1)\n",
|
||||
"('尹小俊', '男', '乙炔运行部', '1977-06-05', '2019493', 1)\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import openpyxl\n",
|
||||
@@ -1278,7 +1312,7 @@
|
||||
" password=\"songyi\"\n",
|
||||
")\n",
|
||||
"cur = conn.cursor()\n",
|
||||
"wb = openpyxl.load_workbook('data/宁夏能化干预人员问卷(20251123).xlsx',data_only=True)\n",
|
||||
"wb = openpyxl.load_workbook('data/宁夏能化干预人员问卷(20251130).xlsx',data_only=True)\n",
|
||||
"sheet = wb.active\n",
|
||||
"# sheets = wb.sheetnames\n",
|
||||
"org_id = 1\n",
|
||||
@@ -1404,15 +1438,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 106,
|
||||
"execution_count": 4,
|
||||
"id": "b7133988-213c-4b52-8d6b-17b56b8ea310",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-24T05:18:02.990193Z",
|
||||
"iopub.status.busy": "2025-11-24T05:18:02.989559Z",
|
||||
"iopub.status.idle": "2025-11-24T05:18:03.293675Z",
|
||||
"shell.execute_reply": "2025-11-24T05:18:03.293166Z",
|
||||
"shell.execute_reply.started": "2025-11-24T05:18:02.990132Z"
|
||||
"iopub.execute_input": "2025-12-01T08:24:08.522567Z",
|
||||
"iopub.status.busy": "2025-12-01T08:24:08.522021Z",
|
||||
"iopub.status.idle": "2025-12-01T08:24:08.789832Z",
|
||||
"shell.execute_reply": "2025-12-01T08:24:08.789290Z",
|
||||
"shell.execute_reply.started": "2025-12-01T08:24:08.522517Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
@@ -1420,7 +1454,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"483 ok\n"
|
||||
"361 ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -1428,7 +1462,7 @@
|
||||
"import json\n",
|
||||
"import openpyxl\n",
|
||||
"\n",
|
||||
"wb = openpyxl.load_workbook('data/宁夏能化干预人员问卷(20251123).xlsx',data_only=True)\n",
|
||||
"wb = openpyxl.load_workbook('data/宁夏能化干预人员问卷(20251130).xlsx',data_only=True)\n",
|
||||
"sheet = wb.active\n",
|
||||
"# sheets = wb.sheetnames\n",
|
||||
"person = {}\n",
|
||||
@@ -1447,7 +1481,7 @@
|
||||
" person[code] = dict1\n",
|
||||
"#print(person)\n",
|
||||
"\n",
|
||||
"filename = 'data/surveys_records_2025-11-24.json'\n",
|
||||
"filename = 'data/surveys_records_2025-11-30.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"list1 = []\n",
|
||||
@@ -1505,7 +1539,7 @@
|
||||
" dict2['last_lose-Comment'] = data['last_lose-Comment']\n",
|
||||
" if code in person.keys():\n",
|
||||
" person[code][rq] = dict2\n",
|
||||
"filename = 'data/宁夏能化干预人员问卷情况(20251124).json'\n",
|
||||
"filename = 'data/宁夏能化干预人员问卷情况(20251130).json'\n",
|
||||
"\n",
|
||||
"with open(filename,'w') as fl:\n",
|
||||
" json.dump(person, fl, ensure_ascii=False)\n",
|
||||
@@ -1609,15 +1643,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 107,
|
||||
"execution_count": 5,
|
||||
"id": "55b20059-ae36-493e-b0c5-c7e35473efc7",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-24T05:21:09.966817Z",
|
||||
"iopub.status.busy": "2025-11-24T05:21:09.966532Z",
|
||||
"iopub.status.idle": "2025-11-24T05:21:11.798693Z",
|
||||
"shell.execute_reply": "2025-11-24T05:21:11.798041Z",
|
||||
"shell.execute_reply.started": "2025-11-24T05:21:09.966796Z"
|
||||
"iopub.execute_input": "2025-12-01T08:24:33.067615Z",
|
||||
"iopub.status.busy": "2025-12-01T08:24:33.067012Z",
|
||||
"iopub.status.idle": "2025-12-01T08:24:34.348805Z",
|
||||
"shell.execute_reply": "2025-12-01T08:24:34.348172Z",
|
||||
"shell.execute_reply.started": "2025-12-01T08:24:33.067560Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -1636,7 +1670,7 @@
|
||||
"cur = conn.cursor()\n",
|
||||
"event_id = 1\n",
|
||||
"org_id = 1\n",
|
||||
"filename = 'data/宁夏能化干预人员问卷情况(20251124).json'\n",
|
||||
"filename = 'data/宁夏能化干预人员问卷情况(20251130).json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"list1 = ['name','sex','birth','unit']\n",
|
||||
|
||||
Reference in new issue
Block a user