Commit 385150f6 by 张晓

fix bugs

1 parent 5464816e
...@@ -49,7 +49,7 @@ public class BatchServiceImpl implements BatchService { ...@@ -49,7 +49,7 @@ public class BatchServiceImpl implements BatchService {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmm"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmm");
// 将当前时间转换为字符串 // 将当前时间转换为字符串
String result = LocalTime.now().format(formatter); String result = LocalTime.now().format(formatter);
return day.replaceAll("-","") + "-" + result; return day.replaceAll("-", "") + "-" + result;
} }
...@@ -103,7 +103,8 @@ public class BatchServiceImpl implements BatchService { ...@@ -103,7 +103,8 @@ public class BatchServiceImpl implements BatchService {
" order by a.expect_time_begin asc "; " order by a.expect_time_begin asc ";
int orderCount = jdbcTemplate.update(sqlOrder, batchNo, groupId, batchDay + " 00:00:00", batchDay + " 23:59:59"); int orderCount = jdbcTemplate.update(sqlOrder, batchNo, groupId, batchDay + " 00:00:00", batchDay + " 23:59:59");
jdbcTemplate.update("update dispatch_batch set engineer_num=? , order_num=?, status='RUNNING' where group_id=? and batch_no=?", engCount, orderCount, groupId, batchNo); jdbcTemplate.update("update dispatch_batch set engineer_num=? , order_num=?, start_time=?, status='RUNNING' where group_id=? and batch_no=?",
engCount, orderCount, LocalDateTime.now(), groupId, batchNo);
log.info("准备批次数据完成, groupId:{}, day:{}, batchNo:{}", groupId, batchDay, batchNo); log.info("准备批次数据完成, groupId:{}, day:{}, batchNo:{}", groupId, batchDay, batchNo);
......
...@@ -130,8 +130,8 @@ public class ExtractServiceImpl implements ExtractService { ...@@ -130,8 +130,8 @@ public class ExtractServiceImpl implements ExtractService {
}); });
Object[] paramBatch= {groupId, batchNo}; Object[] paramBatch = {LocalDateTime.now(), groupId, batchNo};
jdbcTemplate.update(" update dispatch_batch set status='DONE' where group_id=? and batch_no=? ", paramBatch); jdbcTemplate.update(" update dispatch_batch set status='DONE', end_time=? where group_id=? and batch_no=? ", paramBatch);
log.info("算法结果回写dispatch完成, groupId:{}, batchNo:{}", groupId, batchNo); log.info("算法结果回写dispatch完成, groupId:{}, batchNo:{}", groupId, batchNo);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!