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
894987b3
Commit
894987b3
authored
Jul 03, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
87a01c0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
agile_tag_transfer.py
associate/utils/agile_tag_transfer.py
+20
-7
No files found.
associate/utils/agile_tag_transfer.py
View file @
894987b3
...
...
@@ -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
()
...
...
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