From f8ca81e96bcb9a9a05531d606f1dd67953c7a976 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期五, 06 十月 2023 15:40:56 +0800
Subject: [PATCH] 应急预案查询加入分页提交
---
ard-work/src/main/java/com/ruoyi/plan/controller/ArdEplanController.java | 17 ++------
ard-work/src/main/java/com/ruoyi/plan/service/impl/ArdEplanServiceImpl.java | 33 ++++++++++++++++
ard-work/src/main/java/com/ruoyi/plan/domain/ArdEplan.java | 14 +++++++
ard-work/src/main/java/com/ruoyi/plan/service/IArdEplanService.java | 3 +
4 files changed, 53 insertions(+), 14 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/plan/controller/ArdEplanController.java b/ard-work/src/main/java/com/ruoyi/plan/controller/ArdEplanController.java
index fb6bd28..6e8904a 100644
--- a/ard-work/src/main/java/com/ruoyi/plan/controller/ArdEplanController.java
+++ b/ard-work/src/main/java/com/ruoyi/plan/controller/ArdEplanController.java
@@ -64,12 +64,7 @@
{
startPage();
List<ArdEplan> list = ardEplanService.selectArdEplanList(ardEplan);
- List<Map<String,Object>> result = new ArrayList();
for(ArdEplan para : list){
- Map<String,Object> map = new HashMap();
- map.put("id",para.getId());
- map.put("name",para.getName());
- map.put("time",para.getTime());
String info = para.getInfo();
String[] infoArr = info.split(";");
List<Map<String,String>> infoList = new ArrayList();
@@ -81,20 +76,16 @@
infoMap.put("text",str.split(",")[3]);
infoList.add(infoMap);
}
- map.put("obj",infoList);
- map.put("userId",para.getUserId());
- map.put("deptId",para.getDeptId());
- map.put("createBy",para.getCreateBy());
- result.add(map);
+ para.setInfoList(infoList);
}
- return getDataTable(result);
+ return getDataTable(list);
}
/**
* 瀵煎嚭搴旀�ラ妗堝垪琛�
*/
- @PreAuthorize("@ss.hasPermi('plan:eplan:export')")
+ /*@PreAuthorize("@ss.hasPermi('plan:eplan:export')")
@Log(title = "搴旀�ラ妗�", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ArdEplan ardEplan)
@@ -102,7 +93,7 @@
List<ArdEplan> list = ardEplanService.selectArdEplanList(ardEplan);
ExcelUtil<ArdEplan> util = new ExcelUtil<ArdEplan>(ArdEplan.class);
util.exportExcel(response, list, "搴旀�ラ妗堟暟鎹�");
- }
+ }*/
/**
* 鑾峰彇搴旀�ラ妗堣缁嗕俊鎭�
diff --git a/ard-work/src/main/java/com/ruoyi/plan/domain/ArdEplan.java b/ard-work/src/main/java/com/ruoyi/plan/domain/ArdEplan.java
index d59a3a2..7a263a2 100644
--- a/ard-work/src/main/java/com/ruoyi/plan/domain/ArdEplan.java
+++ b/ard-work/src/main/java/com/ruoyi/plan/domain/ArdEplan.java
@@ -5,6 +5,10 @@
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
/**
* 搴旀�ラ妗堝璞� ard_eplan
*
@@ -40,6 +44,8 @@
/** 鍒犻櫎鏍囪 */
private String delFlag;
+
+ private List<Map<String,String>> infoList = new ArrayList();
public void setId(String id)
{
@@ -105,6 +111,14 @@
return delFlag;
}
+ public List<Map<String, String>> getInfoList() {
+ return infoList;
+ }
+
+ public void setInfoList(List<Map<String, String>> infoList) {
+ this.infoList = infoList;
+ }
+
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
diff --git a/ard-work/src/main/java/com/ruoyi/plan/service/IArdEplanService.java b/ard-work/src/main/java/com/ruoyi/plan/service/IArdEplanService.java
index 19520da..e3b4abf 100644
--- a/ard-work/src/main/java/com/ruoyi/plan/service/IArdEplanService.java
+++ b/ard-work/src/main/java/com/ruoyi/plan/service/IArdEplanService.java
@@ -1,6 +1,8 @@
package com.ruoyi.plan.service;
import java.util.List;
+import java.util.Map;
+
import com.ruoyi.plan.domain.ArdEplan;
/**
@@ -26,6 +28,7 @@
* @return 搴旀�ラ妗堥泦鍚�
*/
public List<ArdEplan> selectArdEplanList(ArdEplan ardEplan);
+ //public List<Map<String,Object>> selectArdEplanList(ArdEplan ardEplan);
/**
* 鏂板搴旀�ラ妗�
diff --git a/ard-work/src/main/java/com/ruoyi/plan/service/impl/ArdEplanServiceImpl.java b/ard-work/src/main/java/com/ruoyi/plan/service/impl/ArdEplanServiceImpl.java
index e8751c4..79cbf47 100644
--- a/ard-work/src/main/java/com/ruoyi/plan/service/impl/ArdEplanServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/plan/service/impl/ArdEplanServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.plan.service.impl;
+import java.util.HashMap;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
@@ -7,11 +8,15 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
+import java.util.Map;
+
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.plan.mapper.ArdEplanMapper;
import com.ruoyi.plan.domain.ArdEplan;
import com.ruoyi.plan.service.IArdEplanService;
+
+import javax.annotation.Resource;
/**
* 搴旀�ラ妗圫ervice涓氬姟灞傚鐞�
@@ -21,7 +26,7 @@
*/
@Service
public class ArdEplanServiceImpl implements IArdEplanService {
- @Autowired
+ @Resource
private ArdEplanMapper ardEplanMapper;
/**
@@ -43,6 +48,32 @@
*/
@Override
public List<ArdEplan> selectArdEplanList(ArdEplan ardEplan) {
+ //public List<Map<String,Object>> selectArdEplanList(ArdEplan ardEplan) {
+ /*List<ArdEplan> list = ardEplanMapper.selectArdEplanList(ardEplan);
+ List<Map<String,Object>> result = new ArrayList();
+ for(ArdEplan para : list){
+ Map<String,Object> map = new HashMap();
+ map.put("id",para.getId());
+ map.put("name",para.getName());
+ map.put("time",para.getTime());
+ String info = para.getInfo();
+ String[] infoArr = info.split(";");
+ List<Map<String,String>> infoList = new ArrayList();
+ for(String str : infoArr){
+ Map<String,String> infoMap = new HashMap();
+ infoMap.put("longitude",str.split(",")[0]);
+ infoMap.put("latitude",str.split(",")[1]);
+ infoMap.put("altitude",str.split(",")[2]);
+ infoMap.put("text",str.split(",")[3]);
+ infoList.add(infoMap);
+ }
+ map.put("obj",infoList);
+ map.put("userId",para.getUserId());
+ map.put("deptId",para.getDeptId());
+ map.put("createBy",para.getCreateBy());
+ result.add(map);
+ }
+ return result;*/
return ardEplanMapper.selectArdEplanList(ardEplan);
}
--
Gitblit v1.9.3