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
e50e02c9
Commit
e50e02c9
authored
Aug 31, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'face' into 'master'
Face See merge request
!97
parents
07f5b959
79e97585
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
hospital_transfer.py
trans2es/utils/hospital_transfer.py
+5
-7
No files found.
trans2es/utils/hospital_transfer.py
View file @
e50e02c9
...
...
@@ -33,9 +33,8 @@ class HospitalTransfer(object):
# item_dict["id"] = getMd5Digest(str(name))
item_dict
[
"id"
]
=
"hospital_"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
name
# item_dict["is_online"] = by_hospital_id_judge_office_online(is_online=instance.is_online,
# hospital_id=instance.id, name=name)
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"is_online"
]
=
by_hospital_id_judge_office_online
(
hospital_id
=
instance
.
id
,
name
=
name
)
# item_dict["is_online"] = instance.is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_hospital_query_word_weight
(
name
=
name
,
hospital_id
=
instance
.
id
)
item_dict
[
"results_num"
]
=
QueryWordAttr
.
get_query_results_num
(
name
)
...
...
@@ -86,9 +85,8 @@ class HospitalTransferV1(object):
# item_dict["id"] = getMd5Digest(str(name))
item_dict
[
"id"
]
=
"hospital_"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
name
# item_dict["is_online"] = by_hospital_id_judge_office_online(is_online=instance.is_online,
# hospital_id=instance.id, name=name)
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"is_online"
]
=
by_hospital_id_judge_office_online
(
hospital_id
=
instance
.
id
)
# item_dict["is_online"] = instance.is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_hospital_query_word_weight
(
name
=
name
,
hospital_id
=
instance
.
id
)
item_dict
[
"results_num"
]
=
QueryWordAttr
.
get_query_results_num
(
name
)
...
...
@@ -119,7 +117,7 @@ class HospitalTransferV1(object):
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
def
by_hospital_id_judge_office_online
(
is_online
=
False
,
hospital_id
=
None
,
name
=
None
):
def
by_hospital_id_judge_office_online
(
hospital_id
=
None
):
try
:
office
=
Doctor
.
objects
.
filter
(
is_online
=
True
,
doctor_type
=
1
,
hospital_id
=
hospital_id
)
if
office
:
...
...
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