diff --git a/nladmin-system/src/main/java/org/nl/modules/system/rest/DeptController.java b/nladmin-system/src/main/java/org/nl/modules/system/rest/DeptController.java index 838441fe5..b9d9cac90 100644 --- a/nladmin-system/src/main/java/org/nl/modules/system/rest/DeptController.java +++ b/nladmin-system/src/main/java/org/nl/modules/system/rest/DeptController.java @@ -33,7 +33,6 @@ import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; import java.util.*; /** @@ -49,13 +48,6 @@ public class DeptController { private final DeptService deptService; private static final String ENTITY_NAME = "dept"; - @ApiOperation("导出部门数据") - @GetMapping(value = "/download") - @SaCheckPermission("dept:list") - public void download(HttpServletResponse response, DeptQueryCriteria criteria) throws Exception { - deptService.download(deptService.queryAll(criteria, false), response); - } - @ApiOperation("查询部门") @GetMapping @SaCheckPermission(value = {"user:list", "dept:list"}, mode = SaMode.AND) @@ -116,4 +108,4 @@ public class DeptController { deptService.delete(deptDtos); return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/nladmin-system/src/main/java/org/nl/modules/system/rest/MenuController.java b/nladmin-system/src/main/java/org/nl/modules/system/rest/MenuController.java index 2421084a9..05dc7d673 100644 --- a/nladmin-system/src/main/java/org/nl/modules/system/rest/MenuController.java +++ b/nladmin-system/src/main/java/org/nl/modules/system/rest/MenuController.java @@ -35,7 +35,6 @@ import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; import java.util.*; import java.util.stream.Collectors; @@ -54,13 +53,6 @@ public class MenuController { private final MenuMapper menuMapper; private static final String ENTITY_NAME = "menu"; - @ApiOperation("导出菜单数据") - @GetMapping(value = "/download") - @SaCheckPermission("menu:list") - public void download(HttpServletResponse response, MenuQueryCriteria criteria) throws Exception { - menuService.download(menuService.queryAll(criteria, false), response); - } - @GetMapping(value = "/build") @ApiOperation("获取前端所需菜单") public ResponseEntity buildMenus(){ diff --git a/nladmin-system/src/main/java/org/nl/modules/system/service/DeptService.java b/nladmin-system/src/main/java/org/nl/modules/system/service/DeptService.java index 8b3b4b8ee..e47a3215a 100644 --- a/nladmin-system/src/main/java/org/nl/modules/system/service/DeptService.java +++ b/nladmin-system/src/main/java/org/nl/modules/system/service/DeptService.java @@ -19,8 +19,6 @@ import org.nl.modules.system.domain.Dept; import org.nl.modules.system.service.dto.DeptDto; import org.nl.modules.system.service.dto.DeptQueryCriteria; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.util.List; import java.util.Set; @@ -93,14 +91,6 @@ public interface DeptService { */ Set findByRoleId(Long id); - /** - * 导出数据 - * - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; /** * 获取待删除的部门 diff --git a/nladmin-system/src/main/java/org/nl/modules/system/service/MenuService.java b/nladmin-system/src/main/java/org/nl/modules/system/service/MenuService.java index 3753b34da..a2366369e 100644 --- a/nladmin-system/src/main/java/org/nl/modules/system/service/MenuService.java +++ b/nladmin-system/src/main/java/org/nl/modules/system/service/MenuService.java @@ -19,8 +19,6 @@ import org.nl.modules.system.domain.Menu; import org.nl.modules.system.service.dto.MenuDto; import org.nl.modules.system.service.dto.MenuQueryCriteria; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.util.List; import java.util.Set; @@ -93,14 +91,6 @@ public interface MenuService { */ void delete(Set menuSet); - /** - * 导出 - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; - /** * 懒加载菜单数据 * @param pid / diff --git a/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DeptServiceImpl.java b/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DeptServiceImpl.java index c2f48d970..e297ae4cc 100644 --- a/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DeptServiceImpl.java +++ b/nladmin-system/src/main/java/org/nl/modules/system/service/impl/DeptServiceImpl.java @@ -23,7 +23,10 @@ import cn.hutool.db.Entity; import com.alibaba.fastjson.JSONArray; import lombok.RequiredArgsConstructor; import org.nl.modules.common.exception.BadRequestException; -import org.nl.modules.common.utils.*; +import org.nl.modules.common.utils.CacheKey; +import org.nl.modules.common.utils.QueryHelp; +import org.nl.modules.common.utils.RedisUtils; +import org.nl.modules.common.utils.ValidationUtil; import org.nl.modules.system.domain.Dept; import org.nl.modules.system.domain.User; import org.nl.modules.system.repository.DeptRepository; @@ -41,9 +44,7 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; import javax.sql.DataSource; -import java.io.IOException; import java.lang.reflect.Field; import java.sql.SQLException; import java.util.*; @@ -157,19 +158,6 @@ public class DeptServiceImpl implements DeptService { } } - @Override - public void download(List deptDtos, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (DeptDto deptDTO : deptDtos) { - Map map = new LinkedHashMap<>(); - map.put("部门名称", deptDTO.getName()); - map.put("部门状态", deptDTO.getEnabled() ? "启用" : "停用"); - map.put("创建日期", deptDTO.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } - @Override public Set getDeleteDepts(List menuList, Set deptDtos) { for (Dept dept : menuList) { diff --git a/nladmin-system/src/main/java/org/nl/modules/system/service/impl/MenuServiceImpl.java b/nladmin-system/src/main/java/org/nl/modules/system/service/impl/MenuServiceImpl.java index 4fda2a6ba..17e3a9f67 100644 --- a/nladmin-system/src/main/java/org/nl/modules/system/service/impl/MenuServiceImpl.java +++ b/nladmin-system/src/main/java/org/nl/modules/system/service/impl/MenuServiceImpl.java @@ -20,7 +20,6 @@ import cn.hutool.core.util.StrUtil; import lombok.RequiredArgsConstructor; import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.exception.EntityExistException; -import org.nl.modules.common.utils.FileUtil; import org.nl.modules.common.utils.QueryHelp; import org.nl.modules.common.utils.RedisUtils; import org.nl.modules.common.utils.ValidationUtil; @@ -43,8 +42,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.lang.reflect.Field; import java.util.*; import java.util.stream.Collectors; @@ -319,23 +316,6 @@ public class MenuServiceImpl implements MenuService { return menu; } - @Override - public void download(List menuDtos, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (MenuDto menuDTO : menuDtos) { - Map map = new LinkedHashMap<>(); - map.put("菜单标题", menuDTO.getTitle()); - map.put("菜单类型", menuDTO.getType() == null ? "目录" : menuDTO.getType() == 1 ? "菜单" : "按钮"); - map.put("权限标识", menuDTO.getPermission()); - map.put("外链菜单", menuDTO.getIFrame() ? "是" : "否"); - map.put("菜单可见", menuDTO.getHidden() ? "否" : "是"); - map.put("是否缓存", menuDTO.getCache() ? "是" : "否"); - map.put("创建日期", menuDTO.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } - private void updateSubCnt(Long menuId) { if (menuId != null) { int count = menuRepository.countByPid(menuId); diff --git a/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls b/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls index 47e23f404..0c0304517 100644 Binary files a/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls and b/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls differ diff --git a/nladmin-system/src/main/java/org/nl/modules/system/wql/sys_dept.wql b/nladmin-system/src/main/java/org/nl/modules/system/wql/sys_dept.wql new file mode 100644 index 000000000..06d93886c --- /dev/null +++ b/nladmin-system/src/main/java/org/nl/modules/system/wql/sys_dept.wql @@ -0,0 +1,56 @@ +[交易说明] + 交易名: 部门数据 + 所属模块: + 功能简述: + 版权所有: + 表引用: + 版本经历: + +[数据库] + --指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 + +[IO定义] + ################################################# + ## 表字段对应输入参数 + ################################################# + 输入.flag TYPEAS s_string + 输入.grid_name TYPEAS s_string + + + +[临时表] + --这边列出来的临时表就会在运行期动态创建 + +[临时变量] + --所有中间过程变量均可在此处定义 + +[业务过程] + + ########################################## + # 1、输入输出检查 # + ########################################## + + + ########################################## + # 2、主过程前处理 # + ########################################## + + + ########################################## + # 3、业务主过程 # + ########################################## + IF 输入.flag = "1" + PAGEQUERY + SELECT + sys_grid_field.*, sys_grid.name as grid_name + FROM + sys_grid_field + LEFT JOIN sys_grid ON sys_grid_field.grid_id = sys_grid.id + WHERE + sys_grid_field.is_delete = '0' AND sys_grid.is_delete = '0' + OPTION 输入.grid_name <> "" + sys_grid.name LIKE 输入.grid_name + ENDOPTION + ENDSELECT + ENDPAGEQUERY + ENDIF diff --git a/nladmin-ui/src/views/system/dept/index.vue b/nladmin-ui/src/views/system/dept/index.vue index 4d2c198e0..4d5696c13 100644 --- a/nladmin-ui/src/views/system/dept/index.vue +++ b/nladmin-ui/src/views/system/dept/index.vue @@ -13,7 +13,6 @@ class="filter-item" @keyup.enter.native="crud.toQuery" /> - - diff --git a/nladmin-ui/src/views/system/timing/index.vue b/nladmin-ui/src/views/system/timing/index.vue index 73504567e..9d9455c2a 100644 --- a/nladmin-ui/src/views/system/timing/index.vue +++ b/nladmin-ui/src/views/system/timing/index.vue @@ -5,7 +5,6 @@
-
@@ -85,7 +84,7 @@ - +