From c119398f54021732e226418ce1ecb0a718c3e57f Mon Sep 17 00:00:00 2001
From: YTD <1158283261@qq.com>
Date: Tue, 11 Apr 2023 11:22:48 +0800
Subject: [PATCH] 2023-4-11
---
.../src/views/bugx/BugxList.vue | 315 ++++++++++++++++++
.../src/views/bugx/PmModule/BugxForm.vue | 198 +++++++++++
.../src/views/bugx/PmModule/BugxModal.vue | 61 ++++
.../src/views/bugx/modules/BugxForm.vue | 194 +++++++++++
.../src/views/bugx/modules/BugxModal.vue | 60 ++++
.../bugx/modules/BugxModal__Style#Drawer.vue | 84 +++++
.../src/views/functionx/FunctionxList.vue | 12 +-
.../src/views/functionx/modules/BugxForm.vue | 198 +++++++++++
.../src/views/functionx/modules/BugxModal.vue | 61 ++++
.../src/views/rulex/RulexList.vue | 9 +-
.../src/views/rulex/modules/BugxForm.vue | 199 +++++++++++
.../src/views/rulex/modules/BugxModal.vue | 61 ++++
.../demo/bugx/controller/BugxController.java | 281 ++++++++++++++++
.../jeecg/modules/demo/bugx/entity/Bugx.java | 131 ++++++++
.../modules/demo/bugx/mapper/BugxMapper.java | 35 ++
.../demo/bugx/mapper/xml/BugxMapper.xml | 5 +
.../demo/bugx/service/IBugxService.java | 20 ++
.../bugx/service/impl/BugxServiceImpl.java | 57 ++++
.../modules/demo/rulex/entity/Rulex.java | 9 +
.../demo/rulex/mapper/RulexMapper.java | 8 +
20 files changed, 1995 insertions(+), 3 deletions(-)
create mode 100644 ant-design-vue-jeecg/src/views/bugx/BugxList.vue
create mode 100644 ant-design-vue-jeecg/src/views/bugx/PmModule/BugxForm.vue
create mode 100644 ant-design-vue-jeecg/src/views/bugx/PmModule/BugxModal.vue
create mode 100644 ant-design-vue-jeecg/src/views/bugx/modules/BugxForm.vue
create mode 100644 ant-design-vue-jeecg/src/views/bugx/modules/BugxModal.vue
create mode 100644 ant-design-vue-jeecg/src/views/bugx/modules/BugxModal__Style#Drawer.vue
create mode 100644 ant-design-vue-jeecg/src/views/functionx/modules/BugxForm.vue
create mode 100644 ant-design-vue-jeecg/src/views/functionx/modules/BugxModal.vue
create mode 100644 ant-design-vue-jeecg/src/views/rulex/modules/BugxForm.vue
create mode 100644 ant-design-vue-jeecg/src/views/rulex/modules/BugxModal.vue
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/entity/Bugx.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/mapper/BugxMapper.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/mapper/xml/BugxMapper.xml
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/service/IBugxService.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/service/impl/BugxServiceImpl.java
diff --git a/ant-design-vue-jeecg/src/views/bugx/BugxList.vue b/ant-design-vue-jeecg/src/views/bugx/BugxList.vue
new file mode 100644
index 0000000..5870053
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/bugx/BugxList.vue
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
新增
+
导出
+
+ 导入
+
+
+
+
+
+ 删除
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无图片
+
+
+
+ 无文件
+
+ 下载
+
+
+
+
+ 提交
+
+
+
+
+ 审核
+
+ 驳回
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/bugx/PmModule/BugxForm.vue b/ant-design-vue-jeecg/src/views/bugx/PmModule/BugxForm.vue
new file mode 100644
index 0000000..0849996
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/bugx/PmModule/BugxForm.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/bugx/PmModule/BugxModal.vue b/ant-design-vue-jeecg/src/views/bugx/PmModule/BugxModal.vue
new file mode 100644
index 0000000..5e25e18
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/bugx/PmModule/BugxModal.vue
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/bugx/modules/BugxForm.vue b/ant-design-vue-jeecg/src/views/bugx/modules/BugxForm.vue
new file mode 100644
index 0000000..7ccb729
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/bugx/modules/BugxForm.vue
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/bugx/modules/BugxModal.vue b/ant-design-vue-jeecg/src/views/bugx/modules/BugxModal.vue
new file mode 100644
index 0000000..1084c76
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/bugx/modules/BugxModal.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/bugx/modules/BugxModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/bugx/modules/BugxModal__Style#Drawer.vue
new file mode 100644
index 0000000..795a711
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/bugx/modules/BugxModal__Style#Drawer.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
index 801f5db..d0692f4 100644
--- a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
+++ b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
@@ -142,6 +142,7 @@
+
@@ -154,12 +155,14 @@
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
import store from '@/store'
+ import BugxModal from "./modules/BugxModal";
export default {
name: 'FunctionxList',
mixins:[JeecgListMixin, mixinDevice],
components: {
- FunctionxModal
+ FunctionxModal,
+ BugxModal
},
data () {
return {
@@ -408,7 +411,7 @@
fanhui(){
this.$router.push({
/*返回产品*/
- path: '',/*在引号中填写返回vue*/
+ path: '/src/views/modulex/ModulexList',/*在引号中填写返回vue*/
});
},
initDictConfig(){
@@ -492,6 +495,11 @@
this.queryParam=''
this.loadData();
},
+ fankui: function(record){
+ this.$refs.modalForm1.add(record.id);
+ this.$refs.modalForm1.title = "反馈问题";
+ this.$refs.modalForm1.disableSubmit = false;
+ },
}
}
diff --git a/ant-design-vue-jeecg/src/views/functionx/modules/BugxForm.vue b/ant-design-vue-jeecg/src/views/functionx/modules/BugxForm.vue
new file mode 100644
index 0000000..6f05408
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/functionx/modules/BugxForm.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/functionx/modules/BugxModal.vue b/ant-design-vue-jeecg/src/views/functionx/modules/BugxModal.vue
new file mode 100644
index 0000000..5e25e18
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/functionx/modules/BugxModal.vue
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/rulex/RulexList.vue b/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
index 01e1ff2..18a5a58 100644
--- a/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
+++ b/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
@@ -112,7 +112,7 @@
-
+
@@ -126,10 +126,12 @@
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
import store from '@/store'
+ import BugxModal from "./modules/BugxModal";
export default {
name: 'RulexList',
mixins:[JeecgListMixin, mixinDevice],
components: {
+ BugxModal,
RulexModal
},
data () {
@@ -361,6 +363,11 @@
this.queryParam=''
this.loadData();
},
+ fankui: function(record){
+ this.$refs.modalForm1.add(record.id);
+ this.$refs.modalForm1.title = "反馈问题";
+ this.$refs.modalForm1.disableSubmit = false;
+ },
}
}
diff --git a/ant-design-vue-jeecg/src/views/rulex/modules/BugxForm.vue b/ant-design-vue-jeecg/src/views/rulex/modules/BugxForm.vue
new file mode 100644
index 0000000..90cf6b7
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/rulex/modules/BugxForm.vue
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/rulex/modules/BugxModal.vue b/ant-design-vue-jeecg/src/views/rulex/modules/BugxModal.vue
new file mode 100644
index 0000000..5e25e18
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/rulex/modules/BugxModal.vue
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
new file mode 100644
index 0000000..a61731e
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
@@ -0,0 +1,281 @@
+package org.jeecg.modules.demo.bugx.controller;
+
+import java.util.Arrays;
+import java.util.Date;
+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.HttpServletResponse;
+
+import org.apache.shiro.SecurityUtils;
+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.util.oConvertUtils;
+import org.jeecg.modules.demo.bugx.entity.Bugx;
+import org.jeecg.modules.demo.bugx.service.IBugxService;
+
+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.modules.demo.functionx.entity.Functionx;
+import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
+import org.jeecg.modules.demo.rulex.entity.Rulex;
+import org.jeecg.modules.demo.rulex.mapper.RulexMapper;
+import org.jeecg.modules.modulex.entity.Modulex;
+import org.jeecg.modules.modulex.mapper.ModulexMapper;
+import org.jeecg.modules.projectx.entity.Projectx;
+import org.jeecg.modules.projectx.mapper.ProjectxMapper;
+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.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;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: BUG管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-11
+ * @Version: V1.0
+ */
+@Api(tags="BUG管理")
+@RestController
+@RequestMapping("/bugx/bugx")
+@Slf4j
+public class BugxController extends JeecgController {
+ @Autowired
+ private IBugxService bugxService;
+ @Autowired
+ FunctionxMapper functionxMapper;
+ @Autowired
+ ProjectxMapper projectxMapper;
+ @Autowired
+ ModulexMapper modulexMapper;
+ @Autowired
+ RulexMapper rulexMapper;
+ /**
+ * 分页列表查询
+ *
+ * @param bugx
+ * @param pageNo
+ * @param pageSize
+ * @param req
+ * @return
+ */
+ @AutoLog(value = "BUG管理-分页列表查询")
+ @ApiOperation(value="BUG管理-分页列表查询", notes="BUG管理-分页列表查询")
+ @GetMapping(value = "/list")
+ public Result> queryPageList(Bugx bugx,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+ HttpServletRequest req) {
+ // QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(bugx, req.getParameterMap());
+ QueryWrapper queryWrapper=new QueryWrapper<>();
+ queryWrapper.orderByDesc("bug_level");
+ LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
+ List role = functionxMapper.findRole(user.getId());
+ if(role.contains("1645284981182980098")||role.contains("f6817f48af4fb3af11b9e8bf182f618b")){
+ }else{
+ //因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
+ queryWrapper.like("manager_users",user.getId());
+ }
+ if(bugx.getType()!=null){
+ queryWrapper.eq("type",bugx.getType());
+ }
+ if(bugx.getBugStatus()!=null){
+ queryWrapper.eq("bug_status",bugx.getBugStatus());
+ }
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = bugxService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
+ /**
+ * 添加
+ *
+ * @param bugx
+ * @return
+ */
+ @AutoLog(value = "BUG管理-添加")
+ @ApiOperation(value="BUG管理-添加", notes="BUG管理-添加")
+ @PostMapping(value = "/add")
+ public Result> add(@RequestBody Bugx bugx) {
+ QueryWrapper queryWrapper=new QueryWrapper();
+ String code=null;
+ int a=0;
+ //根源是找最终的项目id
+// if(bugx.getProjectId()!=null){
+// queryWrapper.eq("project_id",bugx.getProjectId());
+// a=bugxService.count(queryWrapper);
+// code=bugxService.sort(bugx.getProjectId());
+// projectxMapper.upDeBug(bugx.getProjectId());
+// }else
+ if(bugx.getModuleId()!=null){
+ queryWrapper.eq("module_id",bugx.getModuleId());
+ queryWrapper.isNull("function_id");
+ a=bugxService.count(queryWrapper);
+ Modulex modulex = modulexMapper.selectById(bugx.getModuleId());
+ code=bugxService.sort(modulex.getProjectId());
+ bugx.setProjectId(modulex.getProjectId());
+ bugx.setManagerUsers(modulex.getManagerUsers());
+ rulexMapper.upMstatus(bugx.getModuleId());
+ }else if(bugx.getFunctionId()!=null){
+ queryWrapper.eq("function_id",bugx.getFunctionId());
+ queryWrapper.isNull("rule_id");
+ a=bugxService.count(queryWrapper);
+ Functionx functionx = functionxMapper.selectById(bugx.getFunctionId());
+ Modulex modulex = modulexMapper.selectById(functionx.getModuleId());
+ code=bugxService.sort(modulex.getProjectId());
+ bugx.setModuleId(functionx.getModuleId());
+ bugx.setProjectId(modulex.getProjectId());
+ bugx.setManagerUsers(functionx.getManagerUsers());
+ rulexMapper.upFstatus(bugx.getFunctionId());
+ }else{
+ queryWrapper.eq("rule_id",bugx.getRuleId());
+ a=bugxService.count(queryWrapper);
+ Rulex rulex = rulexMapper.selectById(bugx.getRuleId());
+ Modulex modulex = modulexMapper.selectById(rulex.getModuleId());
+ bugx.setModuleId(rulex.getModuleId());
+ bugx.setFunctionId(rulex.getFunctionId());
+ code=bugxService.sort(modulex.getProjectId());
+ bugx.setProjectId(modulex.getProjectId());
+ bugx.setManagerUsers(rulex.getManagerUsers());
+ rulexMapper.upRstatus(bugx.getRuleId());
+ }
+ if(a>=1){
+ return Result.error("当前BUG以提出!!");
+ }
+ //设置BUG编码
+ if(code==null){
+ bugx.setBugCode("E00001");
+ }else{
+ int i = Integer.parseInt(code.substring(1));
+ i++;
+ String s = Integer.toString(i);
+ while(s.length()<5){
+ s="0"+s;
+ }
+ bugx.setBugCode("E"+s);
+ }
+ bugx.setPublishTime(new Date());
+ bugxService.save(bugx);
+ return Result.OK("提交BUG成功!");
+ }
+
+ /**
+ * 编辑
+ *
+ * @param bugx
+ * @return
+ */
+ @AutoLog(value = "BUG管理-编辑")
+ @ApiOperation(value="BUG管理-编辑", notes="BUG管理-编辑")
+ @PutMapping(value = "/edit")
+ public Result> edit(@RequestBody Bugx bugx) {
+ if(bugx.getBugStatus()==4){
+ return Result.error("已提交过!!");
+ }
+ if(bugx.getBugStatus()==2)
+ return Result.error("当前BUG已解决!!");
+ //提交时就相当于xiugai
+ bugx.setSubmitTime(new Date());
+ bugx.setBugStatus(4);
+ bugxService.updateById(bugx);
+ return Result.OK("提交成功!");
+ }
+
+ /**
+ * 通过id删除
+ *
+ * @param id
+ * @return
+ */
+ @AutoLog(value = "BUG管理-通过id删除")
+ @ApiOperation(value="BUG管理-通过id删除", notes="BUG管理-通过id删除")
+ @DeleteMapping(value = "/delete")
+ public Result> delete(@RequestParam(name="id",required=true) String id) {
+ bugxService.removeById(id);
+ return Result.OK("删除成功!");
+ }
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return
+ */
+ @AutoLog(value = "BUG管理-批量删除")
+ @ApiOperation(value="BUG管理-批量删除", notes="BUG管理-批量删除")
+ @DeleteMapping(value = "/deleteBatch")
+ public Result> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+ this.bugxService.removeByIds(Arrays.asList(ids.split(",")));
+ return Result.OK("批量删除成功!");
+ }
+
+ /**
+ * 通过id查询
+ *
+ * @param id
+ * @return
+ */
+ @AutoLog(value = "BUG管理-通过id查询")
+ @ApiOperation(value="BUG管理-通过id查询", notes="BUG管理-通过id查询")
+ @GetMapping(value = "/queryById")
+ public Result> queryById(@RequestParam(name="id",required=true) String id) {
+ Bugx bugx = bugxService.getById(id);
+ if(bugx==null) {
+ return Result.error("未找到对应数据");
+ }
+ return Result.OK(bugx);
+ }
+
+ /**
+ * 导出excel
+ *
+ * @param request
+ * @param bugx
+ */
+ @RequestMapping(value = "/exportXls")
+ public ModelAndView exportXls(HttpServletRequest request, Bugx bugx) {
+ return super.exportXls(request, bugx, Bugx.class, "BUG管理");
+ }
+
+ /**
+ * 通过excel导入数据
+ *
+ * @param request
+ * @param response
+ * @return
+ */
+ @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+ public Result> importExcel(HttpServletRequest request, HttpServletResponse response) {
+ return super.importExcel(request, response, Bugx.class);
+ }
+
+ @GetMapping(value = "/shenhe")
+ public Result> shenhe(@RequestParam(name="id",required=true) String id) {
+ return bugxService.shenhe(id);
+ }
+ @GetMapping(value = "/bohui")
+ public Result> bohui(@RequestParam(name="id",required=true) String id) {
+ return bugxService.bohui(id);
+ }
+
+
+ }
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/entity/Bugx.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/entity/Bugx.java
new file mode 100644
index 0000000..abdc0dc
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/entity/Bugx.java
@@ -0,0 +1,131 @@
+package org.jeecg.modules.demo.bugx.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: BUG管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-11
+ * @Version: V1.0
+ */
+@Data
+@TableName("bugx")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="bugx对象", description="BUG管理")
+public class Bugx implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**主键*/
+ @TableId(type = IdType.ASSIGN_ID)
+ @ApiModelProperty(value = "主键")
+ private java.lang.String id;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private java.lang.String createBy;
+ /**创建日期*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "创建日期")
+ private java.util.Date createTime;
+ /**更新人*/
+ @ApiModelProperty(value = "更新人")
+ private java.lang.String updateBy;
+ /**更新日期*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "更新日期")
+ private java.util.Date updateTime;
+ /**BUG编码*/
+ @Excel(name = "BUG编码", width = 15)
+ @ApiModelProperty(value = "BUG编码")
+ private java.lang.String bugCode;
+ /**BUG类型*/
+ @Excel(name = "BUG类型", width = 15)
+ @ApiModelProperty(value = "BUG类型")
+ @Dict(dicCode = "bug_type")
+ private java.lang.Integer type;
+ /**项目id*/
+ @Excel(name = "项目id", width = 15)
+ @ApiModelProperty(value = "项目id")
+ @Dict(dicText = "project_code",dicCode = "id",dictTable = "projectx")
+ private java.lang.String projectId;
+ /**对应模块id*/
+ @Excel(name = "对应模块id", width = 15)
+ @ApiModelProperty(value = "对应模块id")
+ @Dict(dicText = "module_code",dicCode = "id",dictTable = "modulex")
+ private java.lang.String moduleId;
+ /**对应功能id*/
+ @Excel(name = "对应功能id", width = 15)
+ @ApiModelProperty(value = "对应功能id")
+ @Dict(dicText = "function_code",dicCode = "id",dictTable = "functionx")
+ private java.lang.String functionId;
+ /**对应规则id*/
+ @Excel(name = "对应规则id", width = 15)
+ @ApiModelProperty(value = "对应规则id")
+ @Dict(dicText = "rule_code",dicCode = "id",dictTable = "rulex")
+ private java.lang.String ruleId;
+ /**BUG等级*/
+ @Excel(name = "BUG等级", width = 15)
+ @ApiModelProperty(value = "BUG等级")
+ @Dict(dicCode = "work_level")
+ private java.lang.Integer bugLevel;
+ /**BUG描述*/
+ @Excel(name = "BUG描述", width = 15)
+ @ApiModelProperty(value = "BUG描述")
+ private java.lang.String pmDesc;
+ /**BUG图片*/
+ @Excel(name = "BUG图片", width = 15)
+ @ApiModelProperty(value = "BUG图片")
+ private java.lang.String bugPic;
+ /**发布时间*/
+ @Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd")
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "发布时间")
+ private java.util.Date publishTime;
+ /**提交内容*/
+ @Excel(name = "提交内容", width = 15)
+ @ApiModelProperty(value = "提交内容")
+ private java.lang.String submitContent;
+ /**提交图片*/
+ @Excel(name = "提交图片", width = 15)
+ @ApiModelProperty(value = "提交图片")
+ private java.lang.String submitPic;
+ /**责任人*/
+ @Excel(name = "责任人", width = 15)
+ @ApiModelProperty(value = "责任人")
+ private java.lang.String managerUsers;
+ /**BUG状态*/
+ @Excel(name = "BUG状态", width = 15)
+ @ApiModelProperty(value = "BUG状态")
+ @Dict(dicCode = "bug_status")
+ private java.lang.Integer bugStatus;
+ /**提交时间*/
+ @Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd")
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "提交时间")
+ private java.util.Date submitTime;
+ /**审核时间*/
+ @Excel(name = "审核时间", width = 15, format = "yyyy-MM-dd")
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "审核时间")
+ private java.util.Date auditTime;
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/mapper/BugxMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/mapper/BugxMapper.java
new file mode 100644
index 0000000..49d9b7a
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/mapper/BugxMapper.java
@@ -0,0 +1,35 @@
+package org.jeecg.modules.demo.bugx.mapper;
+
+import java.util.Date;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+import org.jeecg.modules.demo.bugx.entity.Bugx;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: BUG管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-11
+ * @Version: V1.0
+ */
+public interface BugxMapper extends BaseMapper {
+
+ @Select("select bug_code from bugx where project_id=#{code} order by bug_code desc limit 0,1")
+ String sort(String code);
+
+ @Update("update bugx set bug_status=2,audit_time=#{date} where id=#{id}")
+ void shenhe(@Param("id") String id, @Param("date") Date date);
+
+ @Update("update bugx set bug_status=1,audit_time=null where id=#{id}")
+ void bohui(@Param("id") String id, @Param("date") Date date);
+
+ @Update("update rulex set work_status=4 where id=#{ruleId}")
+ void upRstatus(String ruleId);
+ @Update("update modulex set work_status=4 where id=#{ruleId}")
+ void upMstatus(String ruleId);
+ @Update("update functionx set work_status=4 where id=#{ruleId}")
+ void upFstatus(String ruleId);
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/mapper/xml/BugxMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/mapper/xml/BugxMapper.xml
new file mode 100644
index 0000000..618c841
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/mapper/xml/BugxMapper.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/service/IBugxService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/service/IBugxService.java
new file mode 100644
index 0000000..2a173c9
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/service/IBugxService.java
@@ -0,0 +1,20 @@
+package org.jeecg.modules.demo.bugx.service;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.demo.bugx.entity.Bugx;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: BUG管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-11
+ * @Version: V1.0
+ */
+public interface IBugxService extends IService {
+
+ String sort(String code);
+
+ Result> shenhe(String id);
+
+ Result> bohui(String id);
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/service/impl/BugxServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/service/impl/BugxServiceImpl.java
new file mode 100644
index 0000000..52c2106
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/service/impl/BugxServiceImpl.java
@@ -0,0 +1,57 @@
+package org.jeecg.modules.demo.bugx.service.impl;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.demo.bugx.entity.Bugx;
+import org.jeecg.modules.demo.bugx.mapper.BugxMapper;
+import org.jeecg.modules.demo.bugx.service.IBugxService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.Date;
+
+/**
+ * @Description: BUG管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-11
+ * @Version: V1.0
+ */
+@Service
+public class BugxServiceImpl extends ServiceImpl implements IBugxService {
+
+ @Autowired
+ BugxMapper bugxMapper;
+ @Override
+ public String sort(String code) {
+ return bugxMapper.sort(code);
+ }
+
+ @Override
+ public Result> shenhe(String id) {
+ Bugx bugx = bugxMapper.selectById(id);
+ if(bugx.getBugStatus()==4){
+ if(bugx.getRuleId()!=null){
+ bugxMapper.upRstatus(bugx.getRuleId());
+ }else if(bugx.getFunctionId()!=null){
+ baseMapper.upFstatus(bugx.getFunctionId());
+ }else {
+ baseMapper.upMstatus(bugx.getModuleId());
+ }
+ bugxMapper.shenhe(id,new Date());
+ return Result.OK("审核通过!!");
+ }else if(bugx.getBugStatus()==2){
+ return Result.error("已审核过!!!");
+ }
+ else{
+ return Result.error("请先提交!!");
+ }
+
+ }
+
+ @Override
+ public Result> bohui(String id) {
+ bugxMapper.bohui(id,new Date());
+ return Result.OK("驳回!!");
+ }
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/entity/Rulex.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/entity/Rulex.java
index 3cdefd0..e3137ce 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/entity/Rulex.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/entity/Rulex.java
@@ -54,10 +54,12 @@ public class Rulex implements Serializable {
/**对应模块id*/
@Excel(name = "对应模块id", width = 15)
@ApiModelProperty(value = "对应模块id")
+ @Dict(dictTable = "modulex",dicCode = "id",dicText = "module_name")
private java.lang.String moduleId;
/**对应功能id*/
@Excel(name = "对应功能id", width = 15)
@ApiModelProperty(value = "对应功能id")
+ @Dict(dictTable = "functionx",dicCode = "id",dicText = "function_name")
private java.lang.String functionId;
/**规则序号*/
@Excel(name = "规则序号", width = 15)
@@ -78,10 +80,12 @@ public class Rulex implements Serializable {
/**对应实体id*/
@Excel(name = "对应实体id", width = 15)
@ApiModelProperty(value = "对应实体id")
+ @Dict(dictTable = "tablex",dicText = "table_name",dicCode = "id")
private java.lang.String tableId;
/**对应字段*/
@Excel(name = "对应字段", width = 15)
@ApiModelProperty(value = "对应字段")
+ @Dict(dictTable = "fieldx",dicText = "field_name",dicCode = "id")
private java.lang.String fieldId;
/**责任人*/
@Excel(name = "责任人", width = 15)
@@ -90,10 +94,12 @@ public class Rulex implements Serializable {
/**任务等级*/
@Excel(name = "任务等级", width = 15)
@ApiModelProperty(value = "任务等级")
+ @Dict(dicCode = "work_level")
private java.lang.Integer workLevel;
/**任务状态*/
@Excel(name = "任务状态", width = 15)
@ApiModelProperty(value = "任务状态")
+ @Dict(dicCode = "work_status")
private java.lang.Integer workStatus;
/**开始时间*/
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@@ -118,13 +124,16 @@ public class Rulex implements Serializable {
/**规则状态*/
@Excel(name = "规则状态", width = 15)
@ApiModelProperty(value = "规则状态")
+ @Dict(dicCode = "status")
private java.lang.Integer status;
/**版本状态*/
@Excel(name = "版本状态", width = 15)
@ApiModelProperty(value = "版本状态")
+ @Dict(dicCode = "verison_status")
private java.lang.Integer verisonStatus;
/**版本号*/
@Excel(name = "版本号", width = 15)
@ApiModelProperty(value = "版本号")
+
private java.lang.String verison;
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/RulexMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/RulexMapper.java
index eb0df0a..5d661b5 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/RulexMapper.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/RulexMapper.java
@@ -4,6 +4,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -20,4 +21,11 @@ public interface RulexMapper extends BaseMapper {
@Select("select function_code from functionx where id=#{id}")
String find(String id);
+
+ @Update("update rulex set work_status=9 where id=#{ruleId}")
+ void upRstatus(String ruleId);
+ @Update("update functionx set work_status=9 where id=#{ruleId}")
+ void upFstatus(String ruleId);
+ @Update("update modulex set work_status=9 where id=#{ruleId}")
+ void upMstatus(String ruleId);
}