From 4b61f417607c539fa58a67fa61f9f35d7ddb6b88 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期六, 02 九月 2023 15:12:29 +0800
Subject: [PATCH] 雷达报警增加时间动态筛选
---
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java | 38 +++++++++++++++++++++++++++++++++++++-
1 files changed, 37 insertions(+), 1 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java
index 89450e6..55a739f 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.app.patrolplan.service.impl;
+import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
@@ -106,7 +107,7 @@
* @return 缁撴灉
*/
@Override
- public Results updateArdAppPatrolplan(Map<String,Object> para) {
+ public Results BeforeUpdateArdAppPatrolplan(Map<String,Object> para) {
if(para.get("id").toString().isEmpty()){
return Results.error("ID鏃犳晥锛�");
}
@@ -276,4 +277,39 @@
return Results.succeed(jsonObject);
}
+ @Override
+ public Results updateArdAppPatrolplan(Map<String,Object> para){
+ if(para.get("id").toString().isEmpty()){
+ return Results.error("ID鏃犳晥锛�");
+ }
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ //鏌ヨ璇ユ潯璁板綍
+ ArdAppPatrolplan planList = ardAppPatrolplanMapper.selectById(para.get("id").toString());
+ String userId = SecurityUtils.getUserId();
+ SysUser sysUser = sysUserMapper.selectUserById(userId);
+ String userName = sysUser.getNickName();
+ planList.setDelName(userName);
+ planList.setDelTime(dateFormat.format(new Date()));
+ int result = ardAppPatrolplanMapper.updateById(planList);
+ if(result<1){
+ return Results.error("淇敼澶辫触锛屽師鏁版嵁鍋滅敤鍑洪敊锛�");
+ }
+ int num = insertArdAppPatrolplan(para);
+ if(num==1){
+ return Results.succeed("淇敼鎴愬姛锛屽凡閲嶆柊閮ㄧ讲浠诲姟锛�");
+ }else {
+ return Results.error("淇敼澶辫触锛岄噸鏂伴儴缃蹭换鍔″け璐ワ紒");
+ }
+ }
+
+ @Override
+ public List<ArdAppPatrolplan> executeList(ArdAppPatrolplan ardAppPatrolplan) {
+ return ardAppPatrolplanMapper.executeList(ardAppPatrolplan);
+ }
+
+ @Override
+ public Results executeOneById(String id) {
+ return Results.succeed(ardAppPatrolplanMapper.selectById(id));
+ }
+
}
--
Gitblit v1.9.3