Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6f6f6e9e
authored
Jul 10, 2023
by
张晓
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-dispatch-zx' into develop
2 parents
a57f5fe5
df4a5e49
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/ExtractServiceImpl.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/ExtractServiceImpl.java
View file @
6f6f6e9
...
...
@@ -83,7 +83,7 @@ public class ExtractServiceImpl implements ExtractService {
*/
@Transactional
@Override
public
void
saveSolutionToDispatch
(
String
groupId
,
String
batchNo
,
DispatchSolution
solution
)
throws
RuntimeException
,
IOException
{
public
void
saveSolutionToDispatch
(
String
groupId
,
String
batchNo
,
DispatchSolution
solution
)
throws
RuntimeException
{
log
.
info
(
"算法结果回写dispatch, groupId:{}, batchNo:{}"
,
groupId
,
batchNo
);
// 清理当前批次指派结果
...
...
@@ -139,8 +139,12 @@ public class ExtractServiceImpl implements ExtractService {
String
fileName
=
String
.
format
(
"dispatchSolution-%s-%s.json"
,
groupId
,
batchNo
);
File
tempFile
=
new
File
(
fileName
);
exporter
.
write
(
solution
,
tempFile
);
String
dispatchResultJson
=
FileUtil
.
readAsString
(
tempFile
);
String
dispatchResultJson
=
"{}"
;
try
{
dispatchResultJson
=
FileUtil
.
readAsString
(
tempFile
);
}
catch
(
IOException
e
)
{
log
.
error
(
"json算法结果回写 error , groupId:{}, batchNo:{} "
,
groupId
,
batchNo
,
e
);
}
Object
[]
paramBatch
=
{
LocalDateTime
.
now
(),
dispatchResultJson
,
groupId
,
batchNo
};
jdbcTemplate
.
update
(
" update dispatch_batch set status='DONE', end_time=? , ext=? where group_id=? and batch_no=? "
,
paramBatch
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment