master
YTD 2 years ago
parent 45b9332648
commit 7f6335087c
  1. 23825
      ant-design-vue-jeecg/package-lock.json
  2. 2
      jeecg-boot/jeecg-boot-module-system/pom.xml
  3. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
  4. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java
  5. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
  6. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/RoleConstant.java
  7. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java

File diff suppressed because it is too large Load Diff

@ -125,7 +125,7 @@
</dependencies> </dependencies>
<build> <build>
<finalName>projectManagement</finalName> <!-- <finalName>projectManagement</finalName>-->
<plugins> <plugins>
<plugin> <plugin>
<!-- <groupId>org.springframework.boot</groupId>--> <!-- <groupId>org.springframework.boot</groupId>-->

@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.functionx.entity.Functionx; import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.entity.RoleConstant;
import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper; import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
import org.jeecg.modules.demo.rulex.entity.Rulex; import org.jeecg.modules.demo.rulex.entity.Rulex;
import org.jeecg.modules.demo.rulex.mapper.RulexMapper; import org.jeecg.modules.demo.rulex.mapper.RulexMapper;
@ -92,7 +93,7 @@ public class BugxController extends JeecgController<Bugx, IBugxService> {
queryWrapper.orderByDesc("bug_level"); queryWrapper.orderByDesc("bug_level");
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxMapper.findRole(user.getId()); List<String> role = functionxMapper.findRole(user.getId());
if (role.contains("1645284981182980098") || role.contains("f6817f48af4fb3af11b9e8bf182f618b")) { if (role.contains(RoleConstant.managementId) || role.contains(RoleConstant.adminId)) {
} else { } else {
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到 //因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users", user.getId()); queryWrapper.like("manager_users", user.getId());
@ -196,8 +197,8 @@ public class BugxController extends JeecgController<Bugx, IBugxService> {
if (bugx.getBugStatus() == 4) { if (bugx.getBugStatus() == 4) {
return Result.error("已提交过!!"); return Result.error("已提交过!!");
} }
if (bugx.getBugStatus() == 2) if (bugx.getBugStatus() == 2){
return Result.error("当前BUG已解决!!"); return Result.error("当前BUG已解决!!");}
//提交时就相当于xiugai //提交时就相当于xiugai
bugx.setSubmitTime(new Date()); bugx.setSubmitTime(new Date());
bugx.setBugStatus(4); bugx.setBugStatus(4);

@ -1,18 +1,13 @@
package org.jeecg.modules.demo.functiontemplate.controller; package org.jeecg.modules.demo.functiontemplate.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.functiontemplate.entity.FunctionTemplate; import org.jeecg.modules.demo.functiontemplate.entity.FunctionTemplate;
@ -23,18 +18,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; 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 org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;

@ -16,6 +16,7 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.functionx.entity.Functionx; import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.entity.RoleConstant;
import org.jeecg.modules.demo.functionx.service.IFunctionxService; import org.jeecg.modules.demo.functionx.service.IFunctionxService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -78,7 +79,7 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
QueryWrapper<Functionx> queryWrapper=new QueryWrapper<>(); QueryWrapper<Functionx> queryWrapper=new QueryWrapper<>();
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxService.findRole(user.getId()); List<String> role = functionxService.findRole(user.getId());
if(role.contains("1645284981182980098")||role.contains("f6817f48af4fb3af11b9e8bf182f618b")){ if(role.contains(RoleConstant.managementId)||role.contains(RoleConstant.adminId)){
}else{ }else{
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到 //因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users",user.getId()); queryWrapper.like("manager_users",user.getId());
@ -219,11 +220,11 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
public Result<?> loginrole(@RequestParam(name="id",required=true) String id) { public Result<?> loginrole(@RequestParam(name="id",required=true) String id) {
List<String> list=functionxService.findRole(id); List<String> list=functionxService.findRole(id);
//如果角色是项目管理员或管理员 就返回1 其他的返回 2 //如果角色是项目管理员或管理员 就返回1 其他的返回 2
if(list.contains("1645284981182980098")||list.contains("f6817f48af4fb3af11b9e8bf182f618b"))//是项目负责人,管理员也可以 if(list.contains(RoleConstant.managementId)||list.contains(RoleConstant.adminId)){//是项目负责人,管理员也可以
return Result.OK("1"); return Result.OK("1");}
else else {
return Result.OK("2"); return Result.OK("2");
} } }
@GetMapping(value = "/fabu") @GetMapping(value = "/fabu")
public Result<?> fabu(@RequestParam(name="id",required=true) String id) { public Result<?> fabu(@RequestParam(name="id",required=true) String id) {
return functionxService.fabu(id); return functionxService.fabu(id);

@ -0,0 +1,6 @@
package org.jeecg.modules.demo.functionx.entity;
public interface RoleConstant {
public final String adminId="f6817f48af4fb3af11b9e8bf182f618b";
public final String managementId="1645284981182980098";
}

@ -71,7 +71,6 @@ public class RulexController extends JeecgController<Rulex, IRulexService> {
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
// QueryWrapper<Rulex> queryWrapper = QueryGenerator.initQueryWrapper(rulex, req.getParameterMap());
QueryWrapper<Rulex> queryWrapper=new QueryWrapper<>(); QueryWrapper<Rulex> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("function_id",rulex.getFunctionId()); queryWrapper.eq("function_id",rulex.getFunctionId());
queryWrapper.orderByDesc("work_level"); queryWrapper.orderByDesc("work_level");

Loading…
Cancel
Save