From 99a76ca58268ea1258212ecfb814860d82870758 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期四, 21 九月 2023 10:28:52 +0800
Subject: [PATCH] 修改单兵端-新任务轮询 任务详情数量 改为任务数
---
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 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..5ca3909 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,18 +789,18 @@
@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 绉�
LocalDateTime now = LocalDateTime.now(); // 鑾峰彇褰撳墠鏃ユ湡鏃堕棿
LocalDateTime earlier = now.minusSeconds(10); // 鍑忓皯30绉�
- System.out.println("褰撳墠鏃ユ湡鏃堕棿锛�" + now);
- System.out.println("鍑忓皯10绉掑悗鐨勬棩鏈熸椂闂达細" + earlier);
RecordSonParam recordSonParam = new RecordSonParam();
recordSonParam.setUserId(userId);
- recordSonParam.setTime(dateFormatTime.format(now));
- recordSonParam.setBeforeTime(dateFormatTime.format(earlier));
+ String n = fmt.format(now);
+ recordSonParam.setTime(n);
+ String e = fmt.format(earlier);
+ recordSonParam.setBeforeTime(e);
//鏍规嵁濮撳悕ID涓烘墽琛屼汉鑾峰彇鎵�鏈夊搴旂殑璁″垝鍚嶇О
List<ArdAppPatrolplan> list = patrolplanMapper.planUser(recordSonParam);
JSONArray jsonArray = new JSONArray();
--
Gitblit v1.9.3