Browse Source

表单设计管理,底部快捷菜单管理

chenc 3 years ago
parent
commit
c0a573c815

+ 4 - 0
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/entity/ActZprocess.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.activiti.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -107,4 +108,7 @@ public class ActZprocess {
 	private String iconAddress;
 	//公司id
 	private String pkOrg;
+	//关联业务表单名称
+	@TableField(exist = false)
+	private String businessTableName;
 }

+ 13 - 7
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/service/Impl/ActBusinessServiceImpl.java

@@ -101,8 +101,10 @@ public class ActBusinessServiceImpl extends ServiceImpl<ActBusinessMapper, ActBu
                     JSONObject jobj = (JSONObject) jsonArray.get(i);
 
                     for(String filed : fileds2) {
-                        filedIdB.append(",`" + filed + "`");
-                        filedIdVB.append(",'" + jobj.getString(filed) + "'");
+                        if(!filed.equals("key")){
+                            filedIdB.append(",`" + filed + "`");
+                            filedIdVB.append(",'" + jobj.getString(filed) + "'");
+                        }
                     }
 
                     //排序
@@ -139,8 +141,10 @@ public class ActBusinessServiceImpl extends ServiceImpl<ActBusinessMapper, ActBu
 
 
                     for(String filed : fileds2) {
-                        filedIdB.append(",`" + filed+"`");
-                        filedIdVB.append(",'" + jobj.getString(filed) + "'");
+                        if(!filed.equals("key")) {
+                            filedIdB.append(",`" + filed + "`");
+                            filedIdVB.append(",'" + jobj.getString(filed) + "'");
+                        }
                     }
 
                     //排序
@@ -189,8 +193,10 @@ public class ActBusinessServiceImpl extends ServiceImpl<ActBusinessMapper, ActBu
 
 
                     for (String filed : fileds2) {
-                        filedIdB.append(",`"+filed+"`");
-                        filedIdVB.append(",'"+jobj.getString(filed)+"'");
+                        if(!filed.equals("key")) {
+                            filedIdB.append(",`" + filed + "`");
+                            filedIdVB.append(",'" + jobj.getString(filed) + "'");
+                        }
                     }
 
                     //排序
@@ -228,7 +234,7 @@ public class ActBusinessServiceImpl extends ServiceImpl<ActBusinessMapper, ActBu
 
 
                             for (String filed : fileds2) {
-                                if(!filed.equals("sort")&&!filed.equals("id")&&!filed.equals(tableName+"_id")&&!(jobj.getString(filed)==null||jobj.getString(filed).equals("null"))){
+                                if(!filed.equals("key")&&!filed.equals("sort")&&!filed.equals("id")&&!filed.equals(tableName+"_id")&&!(jobj.getString(filed)==null||jobj.getString(filed).equals("null"))){
                                     filedIdB.append(",`"+filed+"`");
                                     filedIdVB.append(",'"+jobj.getString(filed)+"'");
                                 }

+ 17 - 0
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/ActivitiProcessController.java

@@ -17,6 +17,7 @@ import org.activiti.editor.language.json.converter.BpmnJsonConverter;
 import org.activiti.engine.RepositoryService;
 import org.activiti.engine.repository.Model;
 import org.activiti.engine.repository.ProcessDefinition;
+import org.apache.commons.lang.StringUtils;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.vo.LoginUser;
@@ -91,10 +92,26 @@ public class ActivitiProcessController {
         LoginUser sysUser1 = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         wrapper.eq(ActZprocess::getPkOrg,sysUser1.getOrgCode());
         List<ActZprocess> list = actZprocessService.list(wrapper);
+        //获取表单名称
+        if(list!=null&&list.size()>0){
+            //获取表单数据
+            List<TbTableInfo> tableInfoList = tbTableInfoService.list(new QueryWrapper<TbTableInfo>().eq("del_flag","0").orderByAsc("create_time").groupBy("business_table"));
+            for(ActZprocess actZprocess:list){
+                //获取表单名称
+                if(tableInfoList!=null){
+                    for(TbTableInfo tbTableInfo:tableInfoList){
+                        if(StringUtils.isNotBlank(actZprocess.getBusinessTable())&&actZprocess.getBusinessTable().equals(tbTableInfo.getBusinessTable())){
+                            actZprocess.setBusinessTableName(tbTableInfo.getText());
+                        }
+                    }
+                }
+            }
+        }
         if (StrUtil.isNotBlank(request.getParameter("roles"))){ //过滤角色
             LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
             List<String> roleByUserName = actNodeService.getRoleByUserName(sysUser.getUsername());
             list = list.stream().filter(p->{
+
                 String roles = p.getRoles();
                 if (StrUtil.isBlank(roles)) {
                     return true; //未设置授权的所有人都能用

+ 52 - 3
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/TbTableInfoController.java

@@ -3,9 +3,13 @@ package org.jeecg.modules.activiti.web;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.activiti.entity.ActNode;
 import org.jeecg.modules.activiti.entity.TbTableInfo;
@@ -33,6 +37,30 @@ public class TbTableInfoController {
     @Autowired
     private ITbTableInfoPracticeService iTbTableInfoPracticeService;
 
+    @AutoLog(value = "友情链接-分页列表查询")
+    @ApiOperation(value="友情链接-分页列表查询", notes="友情链接-分页列表查询")
+    @GetMapping(value = "/getPageList")
+    public Result<?> queryPageList(TbTableInfo tbTableInfo,
+                                   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+                                   HttpServletRequest req) {
+        String text=tbTableInfo.getText();
+        if(StringUtils.isNotBlank(text)){
+            tbTableInfo.setText(null);
+        }
+        QueryWrapper<TbTableInfo> queryWrapper = QueryGenerator.initQueryWrapper(tbTableInfo, req.getParameterMap());
+//        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+//        queryWrapper.lambda().eq(TbTableInfo::getPkOrg,sysUser.getOrgCode());
+        if(StringUtils.isNotBlank(text)){
+            queryWrapper.lambda().like(TbTableInfo::getText,text);
+        }
+        queryWrapper.lambda().eq(TbTableInfo::getDelFlag,'0');
+        queryWrapper.lambda().orderByDesc(TbTableInfo::getCreateTime);
+        Page<TbTableInfo> page = new Page<TbTableInfo>(pageNo, pageSize);
+        IPage<TbTableInfo> pageList = tbTableInfoService.page(page, queryWrapper);
+        return Result.ok(pageList);
+    }
+
    @ResponseBody
     @RequestMapping("/list")
     public Result<Object> list(){
@@ -50,7 +78,7 @@ public class TbTableInfoController {
      */
     @PostMapping("/add")
     public Result<Object> add(@RequestBody TbTableInfo tbTableInfo){
-        TbTableInfo tableInfo = tbTableInfoService.getOne(new QueryWrapper<TbTableInfo>().eq("business_table", tbTableInfo.getBusinessTable()).eq("step_memo",tbTableInfo.getStepMemo()).eq("type",tbTableInfo.getType()));
+        TbTableInfo tableInfo = tbTableInfoService.getOne(new QueryWrapper<TbTableInfo>().eq("del_flag","0").eq("business_table", tbTableInfo.getBusinessTable()).eq("step_memo",tbTableInfo.getStepMemo()).eq("type",tbTableInfo.getType()));
         String  jsonContent = JSON.toJSONString(tbTableInfo.getJsonContent());
         tbTableInfo.setContent(jsonContent);
         if(tableInfo != null){
@@ -113,7 +141,7 @@ public class TbTableInfoController {
     //获取初始表单Json
     public Result queryInitial(String businessTable,String taskNodeId,String type){
         boolean isSave=false;
-        QueryWrapper<TbTableInfo> queryWrapper = new QueryWrapper<TbTableInfo>().eq("business_table", businessTable);
+        QueryWrapper<TbTableInfo> queryWrapper = new QueryWrapper<TbTableInfo>().eq("business_table", businessTable).eq("del_flag","0");
         String whereType="1";//默认类型为PC端表单
         //如果类型不为PC端的表单则验证
         if(!type.equals("1")){
@@ -164,7 +192,7 @@ public class TbTableInfoController {
     //随着业务不断变化的json
     public Result queryBusiness(String businessTable,String taskNodeId,String tableId,String type){
         boolean isSave=false;
-        QueryWrapper<TbTableInfoPractice> queryWrapper = new QueryWrapper<TbTableInfoPractice>().eq("business_table_id", tableId);
+        QueryWrapper<TbTableInfoPractice> queryWrapper = new QueryWrapper<TbTableInfoPractice>().eq("business_table_id", tableId).eq("del_flag","0");
         String whereType="1";//默认类型为PC端表单
         //如果类型不为PC端的表单则验证
         if(!type.equals("1")){
@@ -300,4 +328,25 @@ public class TbTableInfoController {
         }
         return result;
     }
+
+    @AutoLog(value = "表单设计-通过id删除")
+    @ApiOperation(value="表单设计-通过id删除", notes="表单设计-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result delete(@RequestParam(name="id",required=true) String id) {
+        Result result=new Result();
+        TbTableInfo tbTableInfo=tbTableInfoService.getById(id);
+        if(tbTableInfo==null){
+            result.error500("未找到实体");
+            return result;
+        }
+        try {
+            tbTableInfo.setDelFlag("1");
+            tbTableInfoService.updateById(tbTableInfo);
+            result.success("删除成功");
+        } catch (Exception e) {
+            e.printStackTrace();
+            result.error500("删除失败:"+e.getMessage());
+        }
+        return result;
+    }
 }

+ 235 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/BottomMenuController.java

@@ -0,0 +1,235 @@
+package org.jeecg.modules.system.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.system.entity.BottomMenu;
+import org.jeecg.modules.system.service.IBottomMenuService;
+import java.util.Date;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+ /**
+ * @Description: 底部导航栏显示的菜单
+ * @Author: jeecg-boot
+ * @Date:   2021-12-17
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags="底部导航栏显示的菜单")
+@RestController
+@RequestMapping("/system/bottomMenu")
+public class BottomMenuController extends JeecgController<BottomMenu, IBottomMenuService> {
+	@Autowired
+	private IBottomMenuService bottomMenuService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param bottomMenu
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "底部导航栏显示的菜单-分页列表查询")
+	@ApiOperation(value="底部导航栏显示的菜单-分页列表查询", notes="底部导航栏显示的菜单-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result queryPageList(BottomMenu bottomMenu,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		Result result=new Result();
+		try {
+			QueryWrapper<BottomMenu> queryWrapper = QueryGenerator.initQueryWrapper(bottomMenu, req.getParameterMap());
+			LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+			queryWrapper.lambda().eq(BottomMenu::getPkOrg,sysUser.getOrgCode());
+			queryWrapper.lambda().eq(BottomMenu::getDelFlag,"0");
+			Page<BottomMenu> page = new Page<BottomMenu>(pageNo, pageSize);
+			IPage<BottomMenu> pageList = bottomMenuService.page(page, queryWrapper);
+			result.setResult(pageList);
+			result.success("查询成功");
+		} catch (Exception e) {
+			e.printStackTrace();
+			result.error500("查询失败");
+		}
+		return result;
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param bottomMenu
+	 * @return
+	 */
+	@AutoLog(value = "底部导航栏显示的菜单-添加")
+	@ApiOperation(value="底部导航栏显示的菜单-添加", notes="底部导航栏显示的菜单-添加")
+	@PostMapping(value = "/add")
+	public Result<?> add(@RequestBody BottomMenu bottomMenu) {
+		LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		bottomMenu.setPkOrg(sysUser.getOrgCode());
+		bottomMenuService.save(bottomMenu);
+		return Result.ok("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param bottomMenu
+	 * @return
+	 */
+	@AutoLog(value = "底部导航栏显示的菜单-编辑")
+	@ApiOperation(value="底部导航栏显示的菜单-编辑", notes="底部导航栏显示的菜单-编辑")
+	@PutMapping(value = "/edit")
+	public Result<?> edit(@RequestBody BottomMenu bottomMenu) {
+		bottomMenuService.updateById(bottomMenu);
+		return Result.ok("编辑成功!");
+	}
+	
+	/**
+	 * 通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "底部导航栏显示的菜单-通过id删除")
+	@ApiOperation(value="底部导航栏显示的菜单-通过id删除", notes="底部导航栏显示的菜单-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+		bottomMenuService.removeById(id);
+		return Result.ok("删除成功!");
+	}
+	
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "底部导航栏显示的菜单-批量删除")
+	@ApiOperation(value="底部导航栏显示的菜单-批量删除", notes="底部导航栏显示的菜单-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.bottomMenuService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.ok("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "底部导航栏显示的菜单-通过id查询")
+	@ApiOperation(value="底部导航栏显示的菜单-通过id查询", notes="底部导航栏显示的菜单-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
+		BottomMenu bottomMenu = bottomMenuService.getById(id);
+		return Result.ok(bottomMenu);
+	}
+
+  /**
+   * 导出excel
+   *
+   * @param request
+   * @param bottomMenu
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, BottomMenu bottomMenu) {
+      return super.exportXls(request, bottomMenu, BottomMenu.class, "底部导航栏显示的菜单");
+  }
+
+  /**
+   * 通过excel导入数据
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+      return super.importExcel(request, response, BottomMenu.class);
+  }
+
+	 /**
+	  * 添加多条
+	  *
+	  * @param bottomMenu
+	  * @return
+	  */
+	 @AutoLog(value = "底部导航栏显示的菜单-添加多条")
+	 @ApiOperation(value="底部导航栏显示的菜单-添加多条", notes="底部导航栏显示的菜单-添加多条")
+	 @PostMapping(value = "/addBatch")
+	 public Result addBatch(@RequestBody BottomMenu bottomMenu) {
+		 Result  result=new Result();
+		 try {
+			 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+			 bottomMenu.setPkOrg(sysUser.getOrgCode());
+			 bottomMenuService.addBatch(bottomMenu);
+			 result.success("保存成功");
+		 } catch (Exception e) {
+			 e.printStackTrace();
+			 result.error500("保存失败");
+		 }
+		 return result;
+	 }
+
+	/**
+	* @Author chenchuang
+	* @Description //TODO 根据登陆人查询底部快捷菜单
+	* @Date 2021/12/17 18:19
+	* @Param [bottomMenu]
+	* @return org.jeecg.common.api.vo.Result
+	*/
+	 @AutoLog(value = "底部导航栏显示的菜单-根据登陆人查询底部快捷菜单")
+	 @ApiOperation(value="底部导航栏显示的菜单-根据登陆人查询底部快捷菜单", notes="底部导航栏显示的菜单-根据登陆人查询底部快捷菜单")
+	 @GetMapping(value = "/getListByCreateBy")
+	 public Result getListByCreateBy() {
+		 Result result=new Result();
+		 try {
+			 QueryWrapper<BottomMenu> queryWrapper = new QueryWrapper<>();
+			 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+			 queryWrapper.lambda().eq(BottomMenu::getPkOrg,sysUser.getOrgCode());
+			 queryWrapper.lambda().eq(BottomMenu::getDelFlag,"0");
+			 queryWrapper.lambda().eq(BottomMenu::getCreateBy,sysUser.getUsername());
+			 queryWrapper.lambda().orderByAsc(BottomMenu::getSort);
+			 List<BottomMenu> bottomMenuList=bottomMenuService.list(queryWrapper);
+			 result.setResult(bottomMenuList);
+			 result.success("查询成功");
+		 } catch (Exception e) {
+			 e.printStackTrace();
+			 result.error500("查询失败");
+		 }
+		 return result;
+	 }
+
+}

+ 69 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java

@@ -195,7 +195,7 @@ public class SysPermissionController {
 //	}
 
 	/**
-	 * 查询用户拥有的菜单权限和按钮权限(根据TOKEN)
+	 * 查询用户拥有的菜单权限(根据TOKEN)
 	 * 
 	 * @return
 	 */
@@ -244,6 +244,74 @@ public class SysPermissionController {
 		return result;
 	}
 
+	/**
+	 * 查询用户拥有的菜单权限和按钮权限(根据TOKEN)
+	 *
+	 * @return
+	 */
+	@RequestMapping(value = "/getUserPermissionByTokenBottom", method = RequestMethod.GET)
+	public Result<?> getUserPermissionByTokenBottom(@RequestParam(name = "token", required = true) String token) {
+		Result<JSONObject> result = new Result<JSONObject>();
+		try {
+			if (oConvertUtils.isEmpty(token)) {
+				return Result.error("TOKEN不允许为空!");
+			}
+			log.info(" ------ 通过令牌获取用户拥有的访问菜单 ---- TOKEN ------ " + token);
+			String username = JwtUtil.getUsername(token);
+			List<SysPermission> metaList = sysPermissionService.queryByUser(username);
+			//添加首页路由
+			//update-begin-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存
+			if(!PermissionDataUtil.hasIndexPage(metaList)){
+				SysPermission indexMenu = sysPermissionService.list(new LambdaQueryWrapper<SysPermission>().eq(SysPermission::getName,"首页")).get(0);
+				metaList.add(0,indexMenu);
+			}
+			//update-end-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存
+			JSONObject json = new JSONObject();
+			JSONArray menujsonArray = new JSONArray();
+			this.getPermissionJsonArray(menujsonArray, metaList, null);
+//			List<Object>  list=menujsonArray.toJavaList(Object.class);
+			List<Map<String,Object>> mapList=new ArrayList<>();
+			if(menujsonArray!=null){
+				for(int i=0;i<menujsonArray.size();i++){
+					Map<String,Object> map=new LinkedHashMap<>();
+					//获取顶级菜单名称
+					map.put("name",menujsonArray.getJSONObject(i).getJSONObject("meta").get("title"));
+					List<Map<String,Object>> mapListChild=new ArrayList<>();
+					//获取对应子集菜单
+					if(menujsonArray.getJSONObject(i).getJSONArray("children")!=null){
+						getChildList(mapListChild,menujsonArray.getJSONObject(i).getJSONArray("children"));
+					}
+					map.put("childList",mapListChild);
+					mapList.add(map);
+				}
+			}
+			//路由菜单
+			json.put("menu", mapList);
+			result.setResult(json);
+			result.success("查询成功");
+		} catch (Exception e) {
+			result.error500("查询失败:" + e.getMessage());
+			log.error(e.getMessage(), e);
+		}
+		return result;
+	}
+
+	//查询顶级菜单下所有的子菜单
+	public void getChildList(List<Map<String,Object>> mapListChild,JSONArray jsonArray){
+		for(int i=0;i<jsonArray.size();i++){
+			if(jsonArray.getJSONObject(i).getJSONArray("children")!=null){
+				getChildList(mapListChild,jsonArray);
+			}else{
+				Map<String,Object> map=new LinkedHashMap<>();
+				map.put("name",jsonArray.getJSONObject(i).getJSONObject("meta").get("title"));
+				map.put("sysPermissionId",jsonArray.getJSONObject(i).get("id"));
+				map.put("path",jsonArray.getJSONObject(i).get("path"));
+				map.put("id",jsonArray.getJSONObject(i).get("id"));
+				mapListChild.add(map);
+			}
+		}
+	}
+
 	/**
 	  * 添加菜单
 	 * @param permission

+ 86 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/BottomMenu.java

@@ -0,0 +1,86 @@
+package org.jeecg.modules.system.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * @Description: 底部导航栏显示的菜单
+ * @Author: jeecg-boot
+ * @Date:   2021-12-17
+ * @Version: V1.0
+ */
+@Data
+@TableName("bottom_menu")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="bottom_menu对象", description="底部导航栏显示的菜单")
+public class BottomMenu {
+    
+	/**主键*/
+	@TableId(type = IdType.ID_WORKER_STR)
+    @ApiModelProperty(value = "主键")
+	private String id;
+	/**菜单名称*/
+	@Excel(name = "菜单名称", width = 15)
+    @ApiModelProperty(value = "菜单名称")
+	private String name;
+	/**菜单id*/
+	@Excel(name = "菜单id", width = 15)
+    @ApiModelProperty(value = "菜单id")
+	private String sysPermissionId;
+	/**访问地址*/
+	@Excel(name = "访问地址", width = 15)
+    @ApiModelProperty(value = "访问地址")
+	private String path;
+	/**修改人*/
+	@Excel(name = "修改人", width = 15)
+    @ApiModelProperty(value = "修改人")
+	private String updateBy;
+	/**修改时间*/
+	@Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**创建时间*/
+	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**创建人*/
+	@Excel(name = "创建人", width = 15)
+    @ApiModelProperty(value = "创建人")
+	private String createBy;
+	/**组织*/
+	@Excel(name = "组织", width = 15)
+    @ApiModelProperty(value = "组织")
+	private String pkOrg;
+	/**删除状态*/
+	@Excel(name = "删除状态", width = 15)
+    @ApiModelProperty(value = "删除状态")
+	private String delFlag;
+	/**排序字段*/
+	@Excel(name = "排序", width = 15)
+	@ApiModelProperty(value = "排序")
+	private Integer sort;
+
+
+	//多条数据
+	@TableField(exist = false)
+	private List<BottomMenu> bottomMenuList;
+}

+ 17 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/BottomMenuMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.system.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.system.entity.BottomMenu;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 底部导航栏显示的菜单
+ * @Author: jeecg-boot
+ * @Date:   2021-12-17
+ * @Version: V1.0
+ */
+public interface BottomMenuMapper extends BaseMapper<BottomMenu> {
+
+}

+ 5 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/BottomMenuMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.system.mapper.BottomMenuMapper">
+
+</mapper>

+ 14 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IBottomMenuService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.system.service;
+
+import org.jeecg.modules.system.entity.BottomMenu;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 底部导航栏显示的菜单
+ * @Author: jeecg-boot
+ * @Date:   2021-12-17
+ * @Version: V1.0
+ */
+public interface IBottomMenuService extends IService<BottomMenu> {
+    void addBatch(BottomMenu bottomMenu);
+}

+ 44 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/BottomMenuServiceImpl.java

@@ -0,0 +1,44 @@
+package org.jeecg.modules.system.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.modules.system.entity.BottomMenu;
+import org.jeecg.modules.system.mapper.BottomMenuMapper;
+import org.jeecg.modules.system.service.IBottomMenuService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 底部导航栏显示的菜单
+ * @Author: jeecg-boot
+ * @Date:   2021-12-17
+ * @Version: V1.0
+ */
+@Service
+public class BottomMenuServiceImpl extends ServiceImpl<BottomMenuMapper, BottomMenu> implements IBottomMenuService {
+
+    @Override
+    public void addBatch(BottomMenu bottomMenu) {
+        //逻辑删除当前人员下定的底部快捷菜单
+        QueryWrapper<BottomMenu> queryWrapper=new QueryWrapper<>();
+        queryWrapper.lambda().eq(BottomMenu::getDelFlag,"0");
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        queryWrapper.lambda().eq(BottomMenu::getPkOrg,sysUser.getOrgCode());
+        queryWrapper.lambda().eq(BottomMenu::getCreateBy,sysUser.getUsername());
+        BottomMenu bottomMenuUpdate=new BottomMenu();
+        bottomMenuUpdate.setDelFlag("1");
+        this.update(bottomMenuUpdate,queryWrapper);
+        if(bottomMenu.getBottomMenuList()!=null&&bottomMenu.getBottomMenuList().size()>0){
+            //保存新的底部快捷菜单
+            int sort=1;
+            for(BottomMenu b:bottomMenu.getBottomMenuList()){
+                b.setId(null);
+                b.setSort(sort);
+                sort++;
+            }
+            this.saveBatch(bottomMenu.getBottomMenuList());
+        }
+    }
+}