|
|
@@ -600,13 +600,13 @@ async fn insert_record(client: &tokio_postgres::Client, info: &RecordInfo) -> Re |
|
|
|
|
|
|
|
// 解析时间字段 |
|
|
|
let check_time = info.check_time.as_deref() |
|
|
|
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%d %H:%M:%S").ok()); |
|
|
|
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%dT%H:%M:%S%.3f").ok()); |
|
|
|
let approve_time = info.approve_time.as_deref() |
|
|
|
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%d %H:%M:%S").ok()); |
|
|
|
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%dT%H:%M:%S%.3f").ok()); |
|
|
|
let hy_time = info.hy_time.as_deref() |
|
|
|
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%d %H:%M:%S").ok()); |
|
|
|
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%dT%H:%M:%S%.3f").ok()); |
|
|
|
let accept_time = info.accept_time.as_deref() |
|
|
|
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%d %H:%M:%S").ok()); |
|
|
|
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%dT%H:%M:%S%.3f").ok()); |
|
|
|
|
|
|
|
if exists { |
|
|
|
// 如果记录存在,执行更新操作 |
|
|
|