Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
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
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
1c436d5b
Commit
1c436d5b
authored
Jul 16, 2020
by
wyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模板bug修改
parent
b46ce1eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
textAnnotation.py
DAPlatform/views/textAnnotation.py
+9
-6
文本标注接口列表.docx
文档/文本标注接口列表.docx
+0
-0
No files found.
DAPlatform/views/textAnnotation.py
View file @
1c436d5b
...
...
@@ -179,17 +179,18 @@ def insertDocument():
return
json
.
dumps
(
return_dict
,
ensure_ascii
=
False
)
templateId
=
get_Data
.
get
(
'templateId'
,
None
)
creatorId
=
get_Data
.
get
(
'creatorId'
,
None
)
annotatorId
=
get_Data
.
get
(
'annotatorId'
,
None
)
fileId
=
get_Data
.
get
(
'fileId'
,
None
)
textUrl
=
get_Data
.
get
(
'textUrl'
,
None
)
type
=
get_Data
.
get
(
'type'
,
None
)
if
templateId
is
None
or
annotatorId
is
None
or
fileId
is
None
or
textUrl
is
None
or
type
is
None
:
if
templateId
is
None
or
creatorId
is
None
or
annotatorId
is
None
or
fileId
is
None
or
textUrl
is
None
or
type
is
None
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
return
json
.
dumps
(
return_dict
,
ensure_ascii
=
False
)
result
=
mongodbApi
.
findOne
(
collectionTest
,
{
"templateId"
:
templateId
,
"annotatorId"
:
annotatorId
,
"fileId"
:
fileId
,
result
=
mongodbApi
.
findOne
(
collectionTest
,
{
"templateId"
:
templateId
,
"
creatorId"
:
creatorId
,
"
annotatorId"
:
annotatorId
,
"fileId"
:
fileId
,
"textUrl"
:
textUrl
,
"type"
:
type
})
if
result
is
not
None
:
...
...
@@ -198,7 +199,7 @@ def insertDocument():
documentId
=
str
(
uuid
.
uuid1
())
.
replace
(
'-'
,
''
)
result
=
mongodbApi
.
insert
(
collectionTest
,
{
"documentId"
:
documentId
,
"templateId"
:
templateId
,
result
=
mongodbApi
.
insert
(
collectionTest
,
{
"documentId"
:
documentId
,
"templateId"
:
templateId
,
"creatorId"
:
creatorId
,
"annotatorId"
:
annotatorId
,
"fileId"
:
fileId
,
"textUrl"
:
textUrl
,
"state"
:
"0"
,
"type"
:
type
,
"tokenList"
:
[]})
...
...
@@ -330,13 +331,14 @@ def getOneTemplate():
return
json
.
dumps
(
return_dict
,
ensure_ascii
=
False
)
templateId
=
get_Data
.
get
(
'templateId'
,
None
)
creatorId
=
get_Data
.
get
(
'creatorId'
,
None
)
if
templateId
is
None
:
if
templateId
is
None
or
creatorId
is
None
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
return
json
.
dumps
(
return_dict
,
ensure_ascii
=
False
)
result
=
mongodbApi
.
findOneTemplate
(
collectionTemplate
,
{
"templateId"
:
templateId
})
result
=
mongodbApi
.
findOneTemplate
(
collectionTemplate
,
{
"templateId"
:
templateId
,
"creatorId"
:
creatorId
})
if
result
is
None
:
return_dict
[
'return_code'
]
=
'201'
...
...
@@ -362,13 +364,14 @@ def deleteTemplate():
return
json
.
dumps
(
return_dict
,
ensure_ascii
=
False
)
templateId
=
get_Data
.
get
(
'templateId'
,
None
)
creatorId
=
get_Data
.
get
(
'creatorId'
,
None
)
if
templateId
is
None
:
return_dict
[
'return_code'
]
=
'201'
return_dict
[
'return_info'
]
=
'请求参数有误'
return
json
.
dumps
(
return_dict
,
ensure_ascii
=
False
)
result
=
mongodbApi
.
deleteTemplate
(
collectionTemplate
,
{
"templateId"
:
templateId
})
result
=
mongodbApi
.
deleteTemplate
(
collectionTemplate
,
{
"templateId"
:
templateId
,
"creatorId"
:
creatorId
})
if
result
is
None
:
return_dict
[
'return_code'
]
=
'208'
...
...
文档/文本标注接口列表.docx
View file @
1c436d5b
No preview for this file type
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