Commit a19e1b7a authored by lixiaofang's avatar lixiaofang

add

parent aeb95691
...@@ -36,7 +36,7 @@ class HospitalTransfer(object): ...@@ -36,7 +36,7 @@ class HospitalTransfer(object):
item_dict["id"] = getMd5Digest(str(name)) item_dict["id"] = getMd5Digest(str(name))
item_dict["ori_name"] = name item_dict["ori_name"] = name
item_dict["is_online"] = by_hospital_id_judge_office_online(is_online=instance.is_online, item_dict["is_online"] = by_hospital_id_judge_office_online(is_online=instance.is_online,
hospital_id=instance.id) hospital_id=instance.id, name=name)
item_dict["order_weight"] = QueryWordAttr.get_hospital_query_word_weight(name) item_dict["order_weight"] = QueryWordAttr.get_hospital_query_word_weight(name)
item_dict["results_num"] = QueryWordAttr.get_query_results_num(name) item_dict["results_num"] = QueryWordAttr.get_query_results_num(name)
...@@ -88,7 +88,7 @@ class HospitalTransferV1(object): ...@@ -88,7 +88,7 @@ class HospitalTransferV1(object):
item_dict["id"] = getMd5Digest(str(name)) item_dict["id"] = getMd5Digest(str(name))
item_dict["ori_name"] = name item_dict["ori_name"] = name
item_dict["is_online"] = by_hospital_id_judge_office_online(is_online=instance.is_online, item_dict["is_online"] = by_hospital_id_judge_office_online(is_online=instance.is_online,
hospital_id=instance.id) hospital_id=instance.id, name=name)
item_dict["order_weight"] = QueryWordAttr.get_hospital_query_word_weight(name) item_dict["order_weight"] = QueryWordAttr.get_hospital_query_word_weight(name)
item_dict["results_num"] = QueryWordAttr.get_query_results_num(name) item_dict["results_num"] = QueryWordAttr.get_query_results_num(name)
...@@ -119,9 +119,9 @@ class HospitalTransferV1(object): ...@@ -119,9 +119,9 @@ class HospitalTransferV1(object):
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
def by_hospital_id_judge_office_online(is_online=False, hospital_id=None): def by_hospital_id_judge_office_online(is_online=False, hospital_id=None, name=None):
try: try:
office = Doctor.objects.filter(hospital_id=hospital_id, is_online=True, doctor_type=1) office = Doctor.objects.filter(is_online=True, doctor_type=1, name=name)
if office and is_online: if office and is_online:
return True return True
return False return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment