20241224
This commit is contained in:
1 parent
82372feb99
commit
c801f150ae
6 files changed
+1787
-626
No files matched your search
+230
-62
@@ -3,18 +3,23 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e6dcc663-e0ed-4ea3-b442-11f229f4af94",
|
||||
"metadata": {
|
||||
"jp-MarkdownHeadingCollapsed": true
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 新增体测单位"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 1,
|
||||
"id": "360f0a97-d73d-43f3-9f7a-0f9582103c82",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-12-23T02:35:15.481801Z",
|
||||
"iopub.status.busy": "2024-12-23T02:35:15.481073Z",
|
||||
"iopub.status.idle": "2024-12-23T02:35:15.588908Z",
|
||||
"shell.execute_reply": "2024-12-23T02:35:15.588281Z",
|
||||
"shell.execute_reply.started": "2024-12-23T02:35:15.481732Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -25,10 +30,10 @@
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"mycol = mydb[\"place\"]\n",
|
||||
"\n",
|
||||
"place_id = 345321\n",
|
||||
"place_code = \"14\"\n",
|
||||
"dw_name = \"中国石化镇海炼化公司\"\n",
|
||||
"dw_jc = \"中国石化镇海炼化公司\"\n",
|
||||
"place_id = 141002\n",
|
||||
"place_code = \"15\"\n",
|
||||
"dw_name = \"北体体质康健班\"\n",
|
||||
"dw_jc = \"北体体质康健班\"\n",
|
||||
"myquery = { \"id\": place_id }\n",
|
||||
"num = mycol.count_documents(myquery)\n",
|
||||
"if num>0:\n",
|
||||
@@ -48,10 +53,26 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 3,
|
||||
"id": "6ce2cbc7-435a-461c-bdb8-abd9a6962fbc",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-12-23T02:37:43.114677Z",
|
||||
"iopub.status.busy": "2024-12-23T02:37:43.113786Z",
|
||||
"iopub.status.idle": "2024-12-23T02:37:43.138884Z",
|
||||
"shell.execute_reply": "2024-12-23T02:37:43.138013Z",
|
||||
"shell.execute_reply.started": "2024-12-23T02:37:43.114598Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"71 ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import openpyxl\n",
|
||||
"import os,sys,shutil\n",
|
||||
@@ -65,10 +86,10 @@
|
||||
"myclient = pymongo.MongoClient('mongodb://localhost:27017/')\n",
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"\n",
|
||||
"place_id = 496534\n",
|
||||
"place_code = \"12\"\n",
|
||||
"dw_name = \"天宫院社区\"\n",
|
||||
"dw_jc = \"天宫院社区\"\n",
|
||||
"place_id = 141002\n",
|
||||
"place_code = \"15\"\n",
|
||||
"dw_name = \"北体体质康健班\"\n",
|
||||
"dw_jc = \"北体体质康健班\"\n",
|
||||
"fi_path = '/home/songyi/python/mycrm/flask/pdf/files'\n",
|
||||
"fls = glob.glob(f'{fi_path}/{str(place_id)}/*.pdf')\n",
|
||||
"\n",
|
||||
@@ -86,7 +107,7 @@
|
||||
"\n",
|
||||
"i = 0\n",
|
||||
"while i < len(fls):\n",
|
||||
" code = random.sample(code_list,3) #随机取3位数\n",
|
||||
" code = random.sample(code_list,4) #随机取3位数\n",
|
||||
" code_num = ''.join(code) \n",
|
||||
" if place_code+code_num not in list1 and place_code+code_num not in list2:\n",
|
||||
" list1.append(place_code+code_num)\n",
|
||||
@@ -102,8 +123,8 @@
|
||||
" dict2 = {'place_id':place_id,'code':dxm,'fn':Path(fn).name}\n",
|
||||
" list2.append(dict2)\n",
|
||||
" i +=1\n",
|
||||
"#x = mycol.insert_many(list2)\n",
|
||||
"#print('ok') "
|
||||
"x = mycol.insert_many(list2)\n",
|
||||
"print(len(list2),'ok') "
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -116,12 +137,97 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 6,
|
||||
"id": "5f665c0f-8d30-4759-b7f8-fb7e13b98efa",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-12-23T05:43:17.023291Z",
|
||||
"iopub.status.busy": "2024-12-23T05:43:17.022726Z",
|
||||
"iopub.status.idle": "2024-12-23T05:43:17.056324Z",
|
||||
"shell.execute_reply": "2024-12-23T05:43:17.055498Z",
|
||||
"shell.execute_reply.started": "2024-12-23T05:43:17.023237Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"1 15552778879 87-韩秋春.pdf 157481\n",
|
||||
"2 13176607576 40-聂秋香.pdf 150269\n",
|
||||
"3 13515466253 20-成桂艳.pdf 154130\n",
|
||||
"4 13356838977 45-齐立红.pdf 159017\n",
|
||||
"5 15505463267 6-刘来珍.pdf 151957\n",
|
||||
"6 15618032716 72-林娟.pdf 153582\n",
|
||||
"7 13001564985 23-李慧珠.pdf 153760\n",
|
||||
"8 13854609739 85-连海燕.pdf 156827\n",
|
||||
"9 13605461196 50-刘瑛.pdf 159238\n",
|
||||
"10 13697833655 48-刘其英.pdf 157409\n",
|
||||
"11 18654608681 68-张桂芝.pdf 157534\n",
|
||||
"12 13561099637 9-吕建国.pdf 157281\n",
|
||||
"13 13589970661 30-王争华.pdf 151934\n",
|
||||
"14 15666215813 5-刘晓红.pdf 152476\n",
|
||||
"15 15954638716 41-胡桂凤.pdf 153278\n",
|
||||
"16 13793983616 80-董希娥.pdf 150362\n",
|
||||
"17 18661395568 56-娄金华.pdf 153028\n",
|
||||
"18 15006966879 38-耿宏勋.pdf 154872\n",
|
||||
"19 13006548397 15-宋立君.pdf 155673\n",
|
||||
"20 13054610560 88-马国丽.pdf 153905\n",
|
||||
"21 13864711691 11-吴晓燕.pdf 156580\n",
|
||||
"22 13013569039 39-耿红霞.pdf 155263\n",
|
||||
"23 13356615748 17-张桂荣.pdf 150152\n",
|
||||
"24 13589961337 35-王霞.pdf 152574\n",
|
||||
"25 13678611392 34-王金美.pdf 152549\n",
|
||||
"26 13963356165 31-王春爱.pdf 156502\n",
|
||||
"27 13589986778 26-杨素华.pdf 158590\n",
|
||||
"28 13361512362 77-秦春霞.pdf 154059\n",
|
||||
"29 13054658622 86-郗桂红.pdf 157145\n",
|
||||
"30 18661378656 54-周春萍.pdf 154763\n",
|
||||
"31 15154636366 25-李红霞.pdf 156873\n",
|
||||
"32 18654698789 37-罗秀艳.pdf 150825\n",
|
||||
"33 13054652092 8-卢霞.pdf 159367\n",
|
||||
"34 15610063229 7-刘英.pdf 159386\n",
|
||||
"35 13963359769 1-万秀香.pdf 156540\n",
|
||||
"36 18554659267 47-任大华.pdf 156039\n",
|
||||
"37 18661376637 18-张秀玉.pdf 157206\n",
|
||||
"38 18611391991 71-朱兰生.pdf 153617\n",
|
||||
"39 13563399566 67-张伟.pdf 158436\n",
|
||||
"40 15263888916 36-生月华.pdf 150476\n",
|
||||
"41 13210319979 33-王海燕.pdf 155632\n",
|
||||
"42 13561020118 84-赵立静.pdf 156825\n",
|
||||
"43 13371503039 53-吕鸿义.pdf 159602\n",
|
||||
"44 13864791829 75-王翠云.pdf 151079\n",
|
||||
"45 18705469686 42-范晓英.pdf 157035\n",
|
||||
"46 13706366656 57-孙家祥.pdf 153718\n",
|
||||
"47 18554718350 63-宋秀娟.pdf 152087\n",
|
||||
"48 13792060709 76-盖荣.pdf 153519\n",
|
||||
"49 18860629985 46-于瑞先.pdf 154058\n",
|
||||
"50 15314347726 55-姜英.pdf 151762\n",
|
||||
"51 13854650187 32-王毅.pdf 159436\n",
|
||||
"52 15020597108 78-程茂霞.pdf 153264\n",
|
||||
"53 15606470366 73-温建华.pdf 155470\n",
|
||||
"54 13945664258 49-刘桂君.pdf 150794\n",
|
||||
"55 18554660557 65-巴建云.pdf 154836\n",
|
||||
"56 15105468997 14-宋清贤.pdf 151746\n",
|
||||
"57 13963370053 16-张德芳.pdf 158790\n",
|
||||
"58 13864707888 60-宁振莹.pdf 151487\n",
|
||||
"59 13906472659 64-尚国勋.pdf 150875\n",
|
||||
"60 13963350118 12-唐慧芳.pdf 152738\n",
|
||||
"61 13356645705 29-牛春芳.pdf 153915\n",
|
||||
"62 13054625519 89-黄启江.pdf 150912\n",
|
||||
"63 15666210207 81-袁庆敏.pdf 157248\n",
|
||||
"64 15954620216 44-雒云秀.pdf 156738\n",
|
||||
"65 13562277856 22-朱振峰.pdf 155413\n",
|
||||
"66 13181996942 70-曹玉英.pdf 151820\n",
|
||||
"67 18653699788 27-林乐武.pdf 151893\n",
|
||||
"68 13589432668 83-赵福珍.pdf 156124\n",
|
||||
"69 13563376888 3-伊茂胜.pdf 156285\n",
|
||||
"70 13375466356 13-孟凡业.pdf 150571\n",
|
||||
"71 13854664965 4-刘学农.pdf 151763\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from tencentcloud.common import credential\n",
|
||||
"from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n",
|
||||
@@ -136,8 +242,8 @@
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"mycol = mydb[\"pdf\"]\n",
|
||||
"\n",
|
||||
"dw_jc = \"天宫院社区\"\n",
|
||||
"filename = 'data/天宫院社区240922.json'\n",
|
||||
"dw_jc = \"北体体质康健班学员\"\n",
|
||||
"filename = 'data/北体体质康健班202412.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"dict2 = {}\n",
|
||||
@@ -197,12 +303,97 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 7,
|
||||
"id": "4b2b5d76-665f-4dfe-bbd3-5c80abd8c3e3",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-12-23T05:43:33.444175Z",
|
||||
"iopub.status.busy": "2024-12-23T05:43:33.443420Z",
|
||||
"iopub.status.idle": "2024-12-23T06:01:33.534050Z",
|
||||
"shell.execute_reply": "2024-12-23T06:01:33.532110Z",
|
||||
"shell.execute_reply.started": "2024-12-23T05:43:33.444103Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"15552778879 157481 send success\n",
|
||||
"13176607576 150269 send success\n",
|
||||
"13515466253 154130 send success\n",
|
||||
"13356838977 159017 send success\n",
|
||||
"15505463267 151957 send success\n",
|
||||
"15618032716 153582 send success\n",
|
||||
"13001564985 153760 send success\n",
|
||||
"13854609739 156827 send success\n",
|
||||
"13605461196 159238 send success\n",
|
||||
"13697833655 157409 send success\n",
|
||||
"18654608681 157534 send success\n",
|
||||
"13561099637 157281 send success\n",
|
||||
"13589970661 151934 send success\n",
|
||||
"15666215813 152476 send success\n",
|
||||
"15954638716 153278 send success\n",
|
||||
"13793983616 150362 send success\n",
|
||||
"18661395568 153028 send success\n",
|
||||
"15006966879 154872 send success\n",
|
||||
"13006548397 155673 send success\n",
|
||||
"13054610560 153905 send success\n",
|
||||
"13864711691 156580 send success\n",
|
||||
"13013569039 155263 send success\n",
|
||||
"13356615748 150152 send success\n",
|
||||
"13589961337 152574 send success\n",
|
||||
"13678611392 152549 send success\n",
|
||||
"13963356165 156502 send success\n",
|
||||
"13589986778 158590 send success\n",
|
||||
"13361512362 154059 send success\n",
|
||||
"13054658622 157145 send success\n",
|
||||
"18661378656 154763 send success\n",
|
||||
"15154636366 156873 send success\n",
|
||||
"18654698789 150825 send success\n",
|
||||
"13054652092 159367 send success\n",
|
||||
"15610063229 159386 send success\n",
|
||||
"13963359769 156540 send success\n",
|
||||
"18554659267 156039 send success\n",
|
||||
"18661376637 157206 send success\n",
|
||||
"18611391991 153617 send success\n",
|
||||
"13563399566 158436 send success\n",
|
||||
"15263888916 150476 send success\n",
|
||||
"13210319979 155632 send success\n",
|
||||
"13561020118 156825 send success\n",
|
||||
"13371503039 159602 send success\n",
|
||||
"13864791829 151079 send success\n",
|
||||
"18705469686 157035 send success\n",
|
||||
"13706366656 153718 send success\n",
|
||||
"18554718350 152087 send success\n",
|
||||
"13792060709 153519 send success\n",
|
||||
"18860629985 154058 send success\n",
|
||||
"15314347726 151762 send success\n",
|
||||
"13854650187 159436 send success\n",
|
||||
"15020597108 153264 send success\n",
|
||||
"15606470366 155470 send success\n",
|
||||
"13945664258 150794 send success\n",
|
||||
"18554660557 154836 send success\n",
|
||||
"15105468997 151746 send success\n",
|
||||
"13963370053 158790 send success\n",
|
||||
"13864707888 151487 send success\n",
|
||||
"13906472659 150875 send success\n",
|
||||
"13963350118 152738 send success\n",
|
||||
"13356645705 153915 send success\n",
|
||||
"13054625519 150912 send success\n",
|
||||
"15666210207 157248 send success\n",
|
||||
"15954620216 156738 send success\n",
|
||||
"13562277856 155413 send success\n",
|
||||
"13181996942 151820 send success\n",
|
||||
"18653699788 151893 send success\n",
|
||||
"13589432668 156124 send success\n",
|
||||
"13563376888 156285 send success\n",
|
||||
"13375466356 150571 send success\n",
|
||||
"13854664965 151763 send success\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from tencentcloud.common import credential\n",
|
||||
"from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n",
|
||||
@@ -217,12 +408,12 @@
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"mycol = mydb[\"pdf\"]\n",
|
||||
"\n",
|
||||
"dw_jc = \"天宫院社区测试者\"\n",
|
||||
"filename = 'data/天宫院社区240922.json'\n",
|
||||
"dw_jc = \"北体体质康健班学员\"\n",
|
||||
"filename = 'data/北体体质康健班202412.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"dict2 = {}\n",
|
||||
"place_id = 496534\n",
|
||||
"place_id = 141002\n",
|
||||
"myquery = { \"place_id\": place_id }\n",
|
||||
"for x in mycol.find(myquery,{ \"_id\": 0, \"place_id\": 0}):\n",
|
||||
" code = int(x['fn'].split('-')[0])\n",
|
||||
@@ -287,15 +478,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 5,
|
||||
"id": "25a269c3-758f-4e79-ae6d-a6e6f161d64b",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-19T08:14:42.384832Z",
|
||||
"iopub.status.busy": "2024-11-19T08:14:42.384081Z",
|
||||
"iopub.status.idle": "2024-11-19T08:14:42.628910Z",
|
||||
"shell.execute_reply": "2024-11-19T08:14:42.627652Z",
|
||||
"shell.execute_reply.started": "2024-11-19T08:14:42.384763Z"
|
||||
"iopub.execute_input": "2024-12-23T05:38:55.858379Z",
|
||||
"iopub.status.busy": "2024-12-23T05:38:55.857680Z",
|
||||
"iopub.status.idle": "2024-12-23T05:38:56.119988Z",
|
||||
"shell.execute_reply": "2024-12-23T05:38:56.118643Z",
|
||||
"shell.execute_reply.started": "2024-12-23T05:38:55.858311Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -304,30 +495,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"+8618993712869 send success\n"
|
||||
"+8613793180751 send success\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -344,12 +512,12 @@
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"mycol = mydb[\"pdf\"]\n",
|
||||
"\n",
|
||||
"dw_jc = \"青海油田测试者\"\n",
|
||||
"filename = 'data/天宫院社区240922.json'\n",
|
||||
"dw_jc = \"北体体质康健班学员\"\n",
|
||||
"filename = 'data/北体体质康健班202412.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"dict2 = {}\n",
|
||||
"place_id = 571315\n",
|
||||
"place_id = 141002\n",
|
||||
"myquery = { \"place_id\": place_id }\n",
|
||||
"for x in mycol.find(myquery,{ \"_id\": 0, \"place_id\": 0}):\n",
|
||||
" code = int(x['fn'].split('-')[0])\n",
|
||||
@@ -358,8 +526,8 @@
|
||||
" else:\n",
|
||||
" print('no phone')\n",
|
||||
"\n",
|
||||
"phone = '+86'+'18993712869'\n",
|
||||
"yzm = '109623'\n",
|
||||
"phone = '+86'+'13793180751'\n",
|
||||
"yzm = '155673'\n",
|
||||
"try: \n",
|
||||
" secretId = \"AKID22rVyvSqbikXFFvav31ykc9YmqjN6KYc\"\n",
|
||||
" secretKey = \"51XVL1YxDKI6mJh8au6DDuTskS1RhwJX\"\n",
|
||||
|
||||
Reference in new issue
Block a user