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 6d786d2b
authored
Jul 17, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
2 parents
ff17835d
1e3cd390
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
project-dispatch/src/main/java/com/dituhui/pea/dispatch/scheduler/BatchScheduler.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/SolveServiceImpl.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/scheduler/BatchScheduler.java
View file @
6d786d2
...
@@ -74,7 +74,9 @@ public class BatchScheduler {
...
@@ -74,7 +74,9 @@ public class BatchScheduler {
LocalTime
currentTime
=
LocalTime
.
now
();
LocalTime
currentTime
=
LocalTime
.
now
();
LocalTime
cutoffTime
=
LocalTime
.
parse
(
"16:00:00"
,
DateTimeFormatter
.
ISO_LOCAL_TIME
);
LocalTime
cutoffTime
=
LocalTime
.
parse
(
"16:00:00"
,
DateTimeFormatter
.
ISO_LOCAL_TIME
);
if
(
i
==
1
&&
currentTime
.
isAfter
(
cutoffTime
))
{
// 明天单才有cutoff
if
(
i
==
1
&&
currentTime
.
isAfter
(
cutoffTime
))
{
log
.
info
(
"dispatchRun 已过cutoff时间,更新pre状态为confirm----- group:{}, day:{}"
,
groupId
,
currDay
);
log
.
info
(
"dispatchRun 已过cutoff时间,更新pre状态为confirm----- group:{}, day:{}"
,
groupId
,
currDay
);
DispatchBatch
dispatchBatch
=
batchService
.
queryBatchInfoByDay
(
groupId
,
currDay
);
DispatchBatch
dispatchBatch
=
batchService
.
queryBatchInfoByDay
(
groupId
,
currDay
);
if
(
null
==
dispatchBatch
.
getBatchNo
())
{
if
(
null
==
dispatchBatch
.
getBatchNo
())
{
...
...
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/SolveServiceImpl.java
View file @
6d786d2
...
@@ -258,11 +258,13 @@ public class SolveServiceImpl implements SolveService {
...
@@ -258,11 +258,13 @@ public class SolveServiceImpl implements SolveService {
File
tempFile
=
new
File
(
fileName
);
File
tempFile
=
new
File
(
fileName
);
exporter
.
write
(
solution
,
tempFile
);
exporter
.
write
(
solution
,
tempFile
);
String
dispatchResultJson
=
"{}"
;
String
dispatchResultJson
=
"{}"
;
/*
try {
try {
dispatchResultJson = FileUtil.readAsString(tempFile);
dispatchResultJson = FileUtil.readAsString(tempFile);
} catch (IOException e) {
} catch (IOException e) {
log.error("json算法结果回写 error , groupId:{}, batchNo:{} ", groupId, batchNo, e);
log.error("json算法结果回写 error , groupId:{}, batchNo:{} ", groupId, batchNo, e);
}
}
*/
Object
[]
paramBatch
=
{
LocalDateTime
.
now
(),
dispatchResultJson
,
groupId
,
batchNo
};
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
);
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