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},