Commit 6d786d2b by 丁伟峰

Merge remote-tracking branch 'origin/develop' into develop

2 parents ff17835d 1e3cd390
...@@ -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()) {
......
...@@ -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);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!