Commit 894987b3 authored by lixiaofang's avatar lixiaofang

add

parent 87a01c0b
......@@ -26,7 +26,14 @@ class TagTransfer(object):
@classmethod
def get_tag_suggest_data_list(cls, instance):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type__in=[AGILE_TAG_TYPE.BRAND,
AGILE_TAG_TYPE.HOSPITAL,
AGILE_TAG_TYPE.POSITION,
AGILE_TAG_TYPE.INSTRUMENT,
AGILE_TAG_TYPE.PROJECT,
AGILE_TAG_TYPE.DOCTOR,
AGILE_TAG_TYPE.UNDEFINED])
ret_list = list()
item_dict = dict()
item_dict["id"] = getMd5Digest(str(instance.name))
......@@ -56,7 +63,8 @@ class TagTransfer(object):
def get_tag_suggest_brand_data_list(self, instance):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.BRAND)
agile_tag_type__in=[AGILE_TAG_TYPE.BRAND,
AGILE_TAG_TYPE.UNDEFINED])
if result:
ret_list = list()
item_dict = dict()
......@@ -87,7 +95,8 @@ class TagTransfer(object):
def get_tag_suggest_project_data_list(self, instance):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.PROJECT)
agile_tag_type__in=[AGILE_TAG_TYPE.PROJECT,
AGILE_TAG_TYPE.UNDEFINED])
if result:
ret_list = list()
......@@ -119,7 +128,8 @@ class TagTransfer(object):
def get_tag_suggest_position_data_list(self, instance):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.POSITION)
agile_tag_type__in=[AGILE_TAG_TYPE.POSITION,
AGILE_TAG_TYPE.UNDEFINED])
if result:
ret_list = list()
......@@ -151,7 +161,8 @@ class TagTransfer(object):
def get_tag_suggest_instrument_data_list(self, instance):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.INSTRUMENT)
agile_tag_type__in=[AGILE_TAG_TYPE.INSTRUMENT,
AGILE_TAG_TYPE.UNDEFINED])
if result:
ret_list = list()
item_dict = dict()
......@@ -182,7 +193,8 @@ class TagTransfer(object):
def get_tag_suggest_hospital_data_list(self, instance):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.HOSPITAL)
agile_tag_type__in=[AGILE_TAG_TYPE.HOSPITAL,
AGILE_TAG_TYPE.UNDEFINED])
if result:
ret_list = list()
item_dict = dict()
......@@ -213,7 +225,8 @@ class TagTransfer(object):
def get_tag_suggest_doctor_data_list(self, instance):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.DOCTOR)
agile_tag_type__in=[AGILE_TAG_TYPE.DOCTOR,
AGILE_TAG_TYPE.UNDEFINED])
if result:
ret_list = list()
item_dict = dict()
......
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