From 7991d16832df3d9f5c293d543ff8da40c36ef08d Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期六, 19 八月 2023 16:13:34 +0800
Subject: [PATCH] 巡检循环
---
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java
index d5589a2..5e97915 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java
@@ -3,6 +3,7 @@
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -788,7 +789,7 @@
@Override
public Results son() {
- SimpleDateFormat dateFormatTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
//鑾峰彇鐢ㄦ埛鎵ц浜�
String userId = SecurityUtils.getUserId();
// 鍑忓皯 10 绉�
@@ -798,8 +799,8 @@
System.out.println("鍑忓皯10绉掑悗鐨勬棩鏈熸椂闂达細" + earlier);
RecordSonParam recordSonParam = new RecordSonParam();
recordSonParam.setUserId(userId);
- recordSonParam.setTime(dateFormatTime.format(now));
- recordSonParam.setBeforeTime(dateFormatTime.format(earlier));
+ recordSonParam.setTime(fmt.format(now));
+ recordSonParam.setBeforeTime(fmt.format(earlier));
//鏍规嵁濮撳悕ID涓烘墽琛屼汉鑾峰彇鎵�鏈夊搴旂殑璁″垝鍚嶇О
List<ArdAppPatrolplan> list = patrolplanMapper.planUser(recordSonParam);
JSONArray jsonArray = new JSONArray();
--
Gitblit v1.9.3