From 14a15733c4266400e7896db930d3eb614974ff58 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 24 May 2024 19:06:48 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF:?= =?UTF-8?q?=E5=87=BA=E5=B7=AE=E5=8D=95=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E4=B8=8B=E6=8B=89=E6=A1=86=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=B7=AE=E5=8D=95=E7=BC=96=E5=8F=B7=E6=96=B9=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/BaseEvectionFormController.java | 7 ++++++- .../ruoyi/system/service/IBaseEvectionFormService.java | 2 ++ .../system/service/impl/BaseEvectionFormServiceImpl.java | 9 +++++++++ .../resources/templates/system/baseEvectionForm/add.html | 4 ++-- .../system/baseEvectionForm/baseEvectionForm.html | 2 ++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java index 84d15fb4..cd62d1a8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java @@ -147,5 +147,10 @@ public class BaseEvectionFormController extends BaseController return toAjax(baseEvectionFormService.restoreBaseEvectionFormById(id)); } - + @RequestMapping("/getId") + @ResponseBody + public AjaxResult getId() + { + return AjaxResult.success(baseEvectionFormService.getId()); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java index 2bf7e793..e3c050d2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java @@ -72,4 +72,6 @@ public interface IBaseEvectionFormService * @return */ int restoreBaseEvectionFormById(Long evectionId); + + Object getId(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java index fa4862aa..d485c505 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service.impl; import java.util.List; + +import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -22,6 +24,9 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService @Autowired private BaseEvectionFormMapper baseEvectionFormMapper; + @Autowired + private RedisCache redisCache; + /** * 查询出差单 * @@ -123,4 +128,8 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService { return baseEvectionFormMapper.restoreBaseEvectionFormById(evectionId); } + @Override + public Object getId() { + return redisCache.getCacheObject("CC"); + } } diff --git a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html index 528da7db..1e0ff6e0 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html @@ -80,7 +80,7 @@ - + diff --git a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html index ba1f3fd0..9cccc171 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html @@ -77,6 +77,8 @@ restoreUrl: prefix + "/restore/{id}", exportUrl: prefix + "/export", modalName: "出差单", + pageSize: 5, + pageList: [5, 10, 25, 50], columns: [ {checkbox: true}, {title: '出差单索引id',field: 'evectionId',visible: false},