Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
search_tips
Commits
508875b3
Commit
508875b3
authored
Jan 22, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
3b750ff4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
doctor_transfer.py
trans2es/utils/doctor_transfer.py
+4
-3
No files found.
trans2es/utils/doctor_transfer.py
View file @
508875b3
...
...
@@ -7,6 +7,7 @@ import traceback
from
libs.tools
import
tzlc
from
libs.es
import
ESPerform
from
libs.cache
import
redis_client
import
json
import
pypinyin
from
pypinyin
import
lazy_pinyin
...
...
@@ -27,8 +28,8 @@ class DoctorTransfer(object):
@classmethod
def
get_doctor_data_name_mapping_results_to_redis
(
cls
,
instance
):
try
:
doctor_name
=
instance
.
name
if
doctor_name
.
strip
()
:
doctor_name
=
instance
.
name
.
strip
()
if
doctor_name
:
multi_fields
=
{
'hospital.city_province_name'
:
1
,
'hospital.name'
:
1
,
...
...
@@ -73,7 +74,7 @@ class DoctorTransfer(object):
redis_val_dict
[
'd'
]
=
doctor_results
logging
.
info
(
"duan add,redis_key_prefix:
%
s,redis_val_dict:
%
s"
%
(
str
(
redis_key_prefix
),
str
(
redis_val_dict
)))
redis_client
.
h
mset
(
redis_key_prefix
,
redis_val_dict
)
redis_client
.
h
set
(
redis_key_prefix
,
doctor_name
,
json
.
dumps
(
redis_val_dict
)
)
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment