Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
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
1
Merge Requests
1
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
poc
poc-api
Commits
1980143b
Commit
1980143b
authored
Sep 01, 2025
by
R10
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取单据结果修改
parent
52c4aa6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
ExtractionReviewScheduler.java
...com/poc/covenant/scheduler/ExtractionReviewScheduler.java
+3
-1
TextInClient.java
...com/poc/thirdparty/resource/text_in/api/TextInClient.java
+7
-7
No files found.
src/main/java/cn/com/poc/covenant/scheduler/ExtractionReviewScheduler.java
View file @
1980143b
...
...
@@ -136,10 +136,11 @@ public class ExtractionReviewScheduler {
FileFetchResponse
fileFetchResponse
=
textInClient
.
fileFetch
(
fileFetchRequest
);
if
(
fileFetchResponse
==
null
)
{
model
.
setReviewStatus
(
"
ERROR
"
);
model
.
setReviewStatus
(
"
RUN
"
);
}
else
if
(
fileFetchResponse
.
getCode
()
==
200L
)
{
if
(
fileFetchResponse
.
getResult
()
!=
null
)
{
model
.
setReviewStatus
(
"END"
);
model
.
setReviewErrorMsg
(
fileFetchResponse
.
getMessage
());
BizExtractionDocFlowEntity
bizExtractionDocFlowEntity
=
new
BizExtractionDocFlowEntity
();
bizExtractionDocFlowEntity
.
setBizTextInTaskId
(
model
.
getTextInTaskId
());
bizExtractionDocFlowEntity
.
setBizDocFlowStamps
(
JsonUtils
.
serialize
(
fileFetchResponse
.
getResult
().
getFiles
().
get
(
0
).
getData
().
getStamps
()));
...
...
@@ -151,6 +152,7 @@ public class ExtractionReviewScheduler {
}
}
else
{
model
.
setReviewStatus
(
"ERROR"
);
model
.
setReviewErrorMsg
(
fileFetchResponse
.
getMessage
());
}
}
bizExtractionReviewTaskService
.
saveAll
(
models
);
...
...
src/main/java/cn/com/poc/thirdparty/resource/text_in/api/TextInClient.java
View file @
1980143b
...
...
@@ -353,13 +353,13 @@ public class TextInClient {
StringBuilder
stringBuilder
=
new
StringBuilder
(
"https://docflow.textin.com/api/app-api/sip/platform/v2/file/upload"
);
if
(
StringUtils
.
isNotBlank
(
fileUploadRequest
.
getWorkspaceid
()))
{
logger
.
info
(
"------workspace_id-----:"
,
fileUploadRequest
.
getWorkspaceid
());
logger
.
info
(
"------workspace_id-----:"
,
fileUploadRequest
.
getWorkspaceid
());
// urlBuilder.addQuery("workspace_id", fileUploadRequest.getWorkspaceid());
// urlBuilder.
stringBuilder
.
append
(
"?workspace_id="
+
fileUploadRequest
.
getWorkspaceid
());
stringBuilder
.
append
(
"?workspace_id="
+
fileUploadRequest
.
getWorkspaceid
());
}
if
(
StringUtils
.
isNotBlank
(
fileUploadRequest
.
getCategory
()))
{
stringBuilder
.
append
(
"&category="
+
fileUploadRequest
.
getCategory
());
stringBuilder
.
append
(
"&category="
+
fileUploadRequest
.
getCategory
());
}
Request
request
=
new
Request
.
Builder
()
...
...
@@ -385,18 +385,18 @@ public class TextInClient {
public
FileFetchResponse
fileFetch
(
FileFetchRequest
fileFetchRequest
)
throws
IOException
{
UrlBuilder
urlBuilder
=
UrlBuilder
.
of
(
"https://docflow.textin.com/api/app-api/sip/platform/v2/file/fetch"
);
StringBuilder
urlBuilder
=
new
StringBuilder
(
"https://docflow.textin.com/api/app-api/sip/platform/v2/file/fetch"
);
if
(
StringUtils
.
isNotBlank
(
fileFetchRequest
.
getWorkspaceid
()))
{
urlBuilder
.
a
ddQuery
(
"workspace_id"
,
fileFetchRequest
.
getWorkspaceid
());
urlBuilder
.
a
ppend
(
"?workspace_id="
+
fileFetchRequest
.
getWorkspaceid
());
}
if
(
StringUtils
.
isNotBlank
(
fileFetchRequest
.
getFileid
()))
{
urlBuilder
.
a
ddQuery
(
"file_id"
,
fileFetchRequest
.
getFileid
());
urlBuilder
.
a
ppend
(
"&file_id="
+
fileFetchRequest
.
getFileid
());
}
HttpUriRequest
httpUriRequest
=
RequestBuilder
.
get
()
.
setUri
(
urlBuilder
.
to
URI
())
.
setUri
(
urlBuilder
.
to
String
())
// .addHeader("x-ti-app-id", appId_for_docFlow)
// .addHeader("x-ti-secret-code", secretCode_for_docFlow)
.
addHeader
(
"x-ti-app-id"
,
"dafd04a574230c00ccba61132160de0c"
)
...
...
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