From 0928a93007281d5cc1416055b922e112225df657 Mon Sep 17 00:00:00 2001
From: YTD <1158283261@qq.com>
Date: Mon, 10 Apr 2023 16:29:03 +0800
Subject: [PATCH] 2023-4-10
---
.../jeecgbiz/modal/JSelectUserByDepModal.vue | 6 +-
.../src/mixins/JeecgListMixin.js | 9 +
ant-design-vue-jeecg/src/utils/util.js | 18 +
.../src/views/functionx/FunctionxList.vue | 500 ++++++++++++++++++
.../views/functionx/modules/FunctionxForm.vue | 279 ++++++++++
.../functionx/modules/FunctionxModal.vue | 60 +++
.../modules/FunctionxModal__Style#Drawer.vue | 84 +++
.../src/views/rulex/RulexList.vue | 274 ++++++++++
.../src/views/rulex/modules/RulexForm.vue | 227 ++++++++
.../src/views/rulex/modules/RulexModal.vue | 60 +++
.../modules/RulexModal__Style#Drawer.vue | 84 +++
.../controller/FunctionxController.java | 237 +++++++++
.../demo/functionx/entity/Functionx.java | 147 +++++
.../functionx/mapper/FunctionxMapper.java | 42 ++
.../functionx/mapper/xml/FunctionxMapper.xml | 5 +
.../functionx/service/IFunctionxService.java | 30 ++
.../service/impl/FunctionxServiceImpl.java | 136 +++++
.../rulex/controller/RulexController.java | 171 ++++++
.../modules/demo/rulex/entity/Rulex.java | 130 +++++
.../demo/rulex/mapper/RulexMapper.java | 17 +
.../demo/rulex/mapper/xml/RulexMapper.xml | 5 +
.../demo/rulex/service/IRulexService.java | 14 +
.../rulex/service/impl/RulexServiceImpl.java | 19 +
.../controller/DuplicateCheckController.java | 25 +-
.../modules/system/mapper/SysDictMapper.java | 17 +-
.../system/mapper/xml/SysDictMapper.xml | 27 +-
.../system/model/DuplicateCheckVo.java | 14 +-
27 files changed, 2610 insertions(+), 27 deletions(-)
create mode 100644 ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
create mode 100644 ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue
create mode 100644 ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal.vue
create mode 100644 ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue
create mode 100644 ant-design-vue-jeecg/src/views/rulex/RulexList.vue
create mode 100644 ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue
create mode 100644 ant-design-vue-jeecg/src/views/rulex/modules/RulexModal.vue
create mode 100644 ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/Functionx.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/FunctionxMapper.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/xml/FunctionxMapper.xml
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/IFunctionxService.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionxServiceImpl.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/entity/Rulex.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/RulexMapper.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/xml/RulexMapper.xml
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/IRulexService.java
create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/impl/RulexServiceImpl.java
diff --git a/ant-design-vue-jeecg/src/components/jeecgbiz/modal/JSelectUserByDepModal.vue b/ant-design-vue-jeecg/src/components/jeecgbiz/modal/JSelectUserByDepModal.vue
index bbbe810..e5fe305 100644
--- a/ant-design-vue-jeecg/src/components/jeecgbiz/modal/JSelectUserByDepModal.vue
+++ b/ant-design-vue-jeecg/src/components/jeecgbiz/modal/JSelectUserByDepModal.vue
@@ -58,7 +58,7 @@
@change="handleTableChange"
>
@@ -163,7 +163,7 @@ export default {
selectUserRows: {
deep: true,
handler() {
-
+
this.$bus.$emit('headleUser', {
restle: this.selectUserRows, //选中的数据
userSelect: this._props.userSelect, //是哪个组件
@@ -296,7 +296,7 @@ export default {
this.selectUserRows.push(row)
}
}
- this.selectUserIds = this.selectUserRows.map((row) => row.username).join(',')
+ this.selectUserIds = this.selectUserRows.map((row) => row.id).join(',')
},
// 点击树节点,筛选出对应的用户
onDepSelect(selectedDepIds) {
diff --git a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
index 8e9359b..808df50 100644
--- a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
+++ b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
@@ -274,6 +274,15 @@ export const JeecgListMixin = {
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
},
+ fuzhi: function(record){
+ record.id=''
+ record.functionName=record.functionName+1
+ record.functionEnName=record.functionEnName+1
+ record.functionCode=record.functionCode+1
+ this.$refs.modalForm.edit(record);
+ this.$refs.modalForm.title = "复制";
+ this.$refs.modalForm.disableSubmit = false;
+ },
handleAdd: function () {
this.$refs.modalForm.add();
this.$refs.modalForm.title = "新增";
diff --git a/ant-design-vue-jeecg/src/utils/util.js b/ant-design-vue-jeecg/src/utils/util.js
index 0e53d81..8edfa68 100644
--- a/ant-design-vue-jeecg/src/utils/util.js
+++ b/ant-design-vue-jeecg/src/utils/util.js
@@ -358,6 +358,7 @@ export function jsExpand(options = {}) {
* @param callback
*/
export function validateDuplicateValue(tableName, fieldName, fieldVal, dataId, callback) {
+
if (fieldVal) {
let params = { tableName, fieldName, fieldVal, dataId }
api
@@ -372,6 +373,23 @@ export function validateDuplicateValue(tableName, fieldName, fieldVal, dataId, c
callback()
}
}
+export function validateDuplicateValue1(tableName, fieldName, fieldVal, dataId,moduleid, callback) {
+
+ if (fieldVal) {
+ let params = { tableName, fieldName, fieldVal, dataId ,moduleid}
+ api
+ .duplicateCheck(params)
+ .then((res) => {
+ res['success'] ? callback() : callback(res['message'])
+ })
+ .catch((err) => {
+ callback(err.message || err)
+ })
+ } else {
+ callback()
+ }
+}
+
/**
* 根据编码校验规则code,校验传入的值是否合法
diff --git a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
new file mode 100644
index 0000000..801f5db
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
@@ -0,0 +1,500 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
新增
+
导出
+
+ 导入
+
+
+
+
+
+
+
+
+
+
返回
+
+
+
+
+
+
+
+
+
+
+
+
+ 无图片
+
+
+
+ 无文件
+
+ 下载
+
+
+
+
+ 开发规则
+
+
+
+
+ 发布
+ 已发布
+
+ 开始
+
+ 提交
+
+ 详情
+
+
+
+
+
+ 发布
+ 已发布
+
+ 开始
+
+ 提交
+
+ 复制
+
+ 撤回
+
+ DEBUG
+
+ 审核
+
+ 编辑
+
+ 详情
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue
new file mode 100644
index 0000000..2c24364
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue
@@ -0,0 +1,279 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal.vue b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal.vue
new file mode 100644
index 0000000..ebad580
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue
new file mode 100644
index 0000000..867d695
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
\ 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
new file mode 100644
index 0000000..9a41f9d
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/rulex/RulexList.vue
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+
+
+
新增
+
导出
+
+ 导入
+
+
+
+
+
+ 删除
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无图片
+
+
+
+ 无文件
+
+ 下载
+
+
+
+
+ 编辑
+
+
+
+ 更多
+
+
+ 详情
+
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue b/ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue
new file mode 100644
index 0000000..500fef2
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue
@@ -0,0 +1,227 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal.vue b/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal.vue
new file mode 100644
index 0000000..8b48889
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue
new file mode 100644
index 0000000..7827922
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
new file mode 100644
index 0000000..bad0dfe
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
@@ -0,0 +1,237 @@
+package org.jeecg.modules.demo.functionx.controller;
+
+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.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.functionx.entity.Functionx;
+import org.jeecg.modules.demo.functionx.service.IFunctionxService;
+
+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.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: 功能管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+@Api(tags="功能管理")
+@RestController
+@RequestMapping("/functionx/functionx")
+@Slf4j
+public class FunctionxController extends JeecgController {
+ @Autowired
+ private IFunctionxService functionxService;
+
+ /**
+ * 分页列表查询
+ *
+ * @param functionx
+ * @param pageNo
+ * @param pageSize
+ * @param req
+ * @return
+ */
+ @AutoLog(value = "功能管理-分页列表查询")
+ @ApiOperation(value="功能管理-分页列表查询", notes="功能管理-分页列表查询")
+ @GetMapping(value = "/list")
+ public Result> queryPageList(Functionx functionx,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+ HttpServletRequest req) {
+ //QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(functionx, req.getParameterMap());
+ //判断一下登陆人,如果是项目负责人,就可以看到所有,如果是参与干活的人,只能看到自己参与的
+ QueryWrapper queryWrapper=new QueryWrapper<>();
+ LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
+ List role = functionxService.findRole(user.getId());
+ if(role.contains("1645284981182980098")||role.contains("f6817f48af4fb3af11b9e8bf182f618b")){
+ }else{
+ //因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
+ queryWrapper.like("manager_users",user.getId());
+ }
+ queryWrapper.eq("module_id",functionx.getModuleId());
+ queryWrapper.orderByDesc("work_level");
+ if(functionx.getFunctionName()!=null){
+ queryWrapper.like("function_name",functionx.getFunctionName());
+ }
+ if(functionx.getFunctionEnName()!=null){
+ queryWrapper.like("function_en_name",functionx.getFunctionEnName());
+ }
+ if(functionx.getWorkStatus()!=null){
+ queryWrapper.eq("work_status",functionx.getWorkStatus());
+ }
+ if(functionx.getFunctionType()!=null){
+ queryWrapper.eq("function_type",functionx.getFunctionType());
+ }
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = functionxService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
+ /**
+ * 添加
+ *
+ * @param functionx
+ * @return
+ */
+ @AutoLog(value = "功能管理-添加")
+ @ApiOperation(value="功能管理-添加", notes="功能管理-添加")
+ @PostMapping(value = "/add")
+ public Result> add(@RequestBody Functionx functionx) {
+ functionxService.save(functionx);
+ return Result.OK("添加成功!");
+ }
+
+ /**
+ * 编辑
+ *
+ * @param functionx
+ * @return
+ */
+ @AutoLog(value = "功能管理-编辑")
+ @ApiOperation(value="功能管理-编辑", notes="功能管理-编辑")
+ @PutMapping(value = "/edit")
+ public Result> edit(@RequestBody Functionx functionx) {
+ functionxService.updateById(functionx);
+ 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) {
+ functionxService.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.functionxService.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) {
+ Functionx functionx = functionxService.getById(id);
+ if(functionx==null) {
+ return Result.error("未找到对应数据");
+ }
+ return Result.OK(functionx);
+ }
+
+ /**
+ * 导出excel
+ *
+ * @param request
+ * @param functionx
+ */
+ @RequestMapping(value = "/exportXls")
+ public ModelAndView exportXls(HttpServletRequest request, Functionx functionx) {
+ return super.exportXls(request, functionx, Functionx.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, Functionx.class);
+ }
+
+ //获得模块管理的编码,填充给功能编码
+ @GetMapping(value = "/bianma")
+ public Result> moduleCode(@RequestParam(name="id",required=true) String id) {
+ String s=functionxService.findModuleCode(id);
+ //后期放入返回值中,当前为返回信息
+ System.out.println(s);
+ return Result.OK("编码");
+ }
+ //在主界面判断一下登录角色,对操作栏进行替换
+ @GetMapping(value = "/loginrole")
+ public Result> loginrole(@RequestParam(name="id",required=true) String id) {
+ List list=functionxService.findRole(id);
+ if(list.contains("1645284981182980098")||list.contains("f6817f48af4fb3af11b9e8bf182f618b"))//是项目负责人,管理员也可以
+ return Result.OK("1");
+ else
+ return Result.OK("2");
+ }
+ @GetMapping(value = "/fabu")
+ public Result> fabu(@RequestParam(name="id",required=true) String id) {
+ return functionxService.fabu(id);
+ }
+ @GetMapping(value = "/kaishi")
+ public Result> kaishi(@RequestParam(name="id",required=true) String id) {
+ return functionxService.kaishi(id);
+ }
+ @GetMapping(value = "/tijiao")
+ public Result> tijiao(@RequestParam(name="id",required=true) String id) {
+ return functionxService.tijiao(id);
+ }
+ @GetMapping(value = "/cehui")
+ public Result> cehui(@RequestParam(name="id",required=true) String id) {
+ return functionxService.cehui(id);
+ }
+ @GetMapping(value = "/shenhe")
+ public Result> shenhe(@RequestParam(name="id",required=true) String id) {
+ return functionxService.shenhe(id);
+ }
+
+
+
+ }
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/Functionx.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/Functionx.java
new file mode 100644
index 0000000..59e2185
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/Functionx.java
@@ -0,0 +1,147 @@
+package org.jeecg.modules.demo.functionx.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: 功能管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+@Data
+@TableName("functionx")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="functionx对象", description="功能管理")
+public class Functionx 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;
+ /**对应模块id*/
+ @Excel(name = "对应模块id", width = 15)
+ @ApiModelProperty(value = "对应模块id")
+ // @Dict(dictTable = "modulex",dicCode = "id",dicText = "module_name")
+ private java.lang.String moduleId;
+ /**中文名称*/
+ @Excel(name = "中文名称", width = 15)
+ @ApiModelProperty(value = "中文名称")
+ private java.lang.String functionName;
+ /**英文名称*/
+ @Excel(name = "英文名称", width = 15)
+ @ApiModelProperty(value = "英文名称")
+ private java.lang.String functionEnName;
+ /**功能编码*/
+ @Excel(name = "功能编码", width = 15)
+ @ApiModelProperty(value = "功能编码")
+ private java.lang.String functionCode;
+ /**功能
+ * 值:列表0、增加1、删除2、修改3、查看4、导入5、导出6、其它99;默认99
+ * 类型*/
+ @Excel(name = "功能类型", width = 15)
+ @ApiModelProperty(value = "功能类型")
+ @Dict(dicCode = "function_type")
+ private java.lang.Integer functionType;
+ /**功能描述*/
+ @Excel(name = "功能描述", width = 15)
+ @ApiModelProperty(value = "功能描述")
+ private java.lang.String pmDescribe;
+ /**分析图*/
+ @Excel(name = "分析图", width = 15)
+ @ApiModelProperty(value = "分析图")
+ private java.lang.String diagrams;
+ /**用户角色*/
+ @Excel(name = "用户角色", width = 15)
+ @ApiModelProperty(value = "用户角色")
+ private java.lang.String userRole;
+ /**责任人*/
+ @Excel(name = "责任人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @ApiModelProperty(value = "责任人")
+ private java.lang.String managerUsers;
+ /**任务等级*/
+ @Excel(name = "任务等级", width = 15)
+ @ApiModelProperty(value = "任务等级")
+ @Dict(dicCode = "work_level")
+ private java.lang.Integer workLevel;
+ /**任务状
+ * 值:未发布0、已发布1、开发中2、已完成3、已审核4、DEBUG9;默认0
+ * 态*/
+ @Excel(name = "任务状态", width = 15)
+ @ApiModelProperty(value = "任务状态")
+ @Dict(dicCode = "work_status")
+ private java.lang.Integer workStatus;
+ /**发布时间*/
+ @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, 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 startTime;
+ /**任务时长*/
+ @Excel(name = "任务时长", width = 15)
+ @ApiModelProperty(value = "任务时长")
+ private java.lang.Double duration;
+ /**提交时间*/
+ @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)
+ @ApiModelProperty(value = "实际时长")
+ private java.lang.Double realDuration;
+ /**功能状态*/
+ @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.Integer verison;
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/FunctionxMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/FunctionxMapper.java
new file mode 100644
index 0000000..0d7f8d7
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/FunctionxMapper.java
@@ -0,0 +1,42 @@
+package org.jeecg.modules.demo.functionx.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.functionx.entity.Functionx;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @Description: 功能管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+@Repository
+public interface FunctionxMapper extends BaseMapper {
+
+ @Select("select module_code from modulex where id=#{id}")
+ String findModuleCode(String id);
+
+ @Select("select role_id from sys_user_role where user_id=#{id}")
+ List findRole(String id);
+
+ @Update("update rulex set work_status=1 where function_id=#{id} and work_status=0")
+ void updateruleByFunctionId(String id);
+ @Update("update rulex set work_status=2,submit_time=#{date},real_duration=#{v} where function_id=#{id} and work_status=2")
+ void updateruleByFunctionIdStartTime(@Param("id") String id, @Param("date") Date date,@Param("v") Double v);
+ @Update("update rulex set work_status=2,start_time=#{date} where function_id=#{id} and work_status=1")
+ void updateruleByFunctionIdStart(@Param("id")String id,@Param("date") Date date);
+ //撤回
+ @Update("update rulex set work_status=2,submit_time=null,real_duration=null where function_id=#{id} ")
+ void rule(String id);
+ //审核
+ @Update("update rulex set work_status=4 where function_id=#{id} and work_status=3")
+ void uprule(String id);
+ @Update("update functionx set work_status=2,submit_time=null,real_duration=null where id=#{id} ")
+ void cehui(String id);
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/xml/FunctionxMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/xml/FunctionxMapper.xml
new file mode 100644
index 0000000..56381a6
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/xml/FunctionxMapper.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/functionx/service/IFunctionxService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/IFunctionxService.java
new file mode 100644
index 0000000..39e18cb
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/IFunctionxService.java
@@ -0,0 +1,30 @@
+package org.jeecg.modules.demo.functionx.service;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.demo.functionx.entity.Functionx;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * @Description: 功能管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+public interface IFunctionxService extends IService {
+
+ String findModuleCode(String id);
+
+ List findRole(String id);
+
+ Result> fabu(String id);
+
+ Result> kaishi(String id);
+
+ Result> tijiao(String id);
+
+ Result> cehui(String id);
+
+ Result> shenhe(String id);
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionxServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionxServiceImpl.java
new file mode 100644
index 0000000..a4df3f8
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionxServiceImpl.java
@@ -0,0 +1,136 @@
+package org.jeecg.modules.demo.functionx.service.impl;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.demo.functionx.entity.Functionx;
+import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
+import org.jeecg.modules.demo.functionx.service.IFunctionxService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 功能管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+@Service
+public class FunctionxServiceImpl extends ServiceImpl implements IFunctionxService {
+
+ @Autowired
+ FunctionxMapper functionxMapper;
+
+ @Override
+ public String findModuleCode(String id) {
+ return functionxMapper.findModuleCode(id);
+ }
+
+ @Override
+ public List findRole(String id) {
+ return functionxMapper.findRole(id);
+ }
+
+ @Override
+ public Result> fabu(String id) {
+ Functionx functionx = functionxMapper.selectById(id);
+ //先判断一下当前是什么状态,如果不是处于未发布状态就不让发布
+ //先改变功能的状态,变为已发布
+ //然后改变对应规则的所有状态
+ if(functionx.getWorkStatus()==0){
+ functionx.setWorkStatus(1);
+ functionx.setPublishTime(new Date());
+ functionxMapper.updateById(functionx);
+ functionxMapper.updateruleByFunctionId(id);
+ return Result.OK("发布成功!!");
+ }else{
+ return Result.error("当前功能已发布!!!");
+ }
+ }
+ @Override
+ public Result> kaishi(String id) {
+ Functionx functionx = functionxMapper.selectById(id);
+ //只用判断前一级的状态
+ //然后改变对应规则的所有状态
+ if(functionx.getWorkStatus()==0)
+ return Result.error("请先进行发布!!!");
+ else if(functionx.getWorkStatus()==1){
+ functionx.setWorkStatus(2);
+ functionx.setStartTime(new Date());
+ functionxMapper.updateById(functionx);
+ functionxMapper.updateruleByFunctionIdStart(id,new Date());
+ return Result.OK("开始工作!!");
+ }else if(functionx.getWorkStatus()==2){
+ return Result.error("已经开始!!!");
+ }else {
+ return Result.error("当前不处于开始阶段!!!");
+ }
+
+ }
+
+ @Override
+ public Result> tijiao(String id) {
+ Functionx functionx = functionxMapper.selectById(id);
+ //只用判断前一级的状态
+ //然后改变对应规则的所有状态
+ if(functionx.getWorkStatus()==1)
+ return Result.error("请先开始工作!!!");
+ else if(functionx.getWorkStatus()==2){
+ functionx.setWorkStatus(3);
+ functionx.setSubmitTime(new Date());
+ //获得实际工作时间
+ //更新规则的提交时间还有时长
+ long a=(new Date().getTime()-functionx.getStartTime().getTime());
+ String s=""+a;
+ BigDecimal bigDecimal=new BigDecimal(s);
+ BigDecimal divide = bigDecimal.divide(new BigDecimal("3600000"),1,BigDecimal.ROUND_HALF_UP);
+ double v = Double.parseDouble(divide.toString());
+ functionx.setRealDuration(v);
+ functionxMapper.updateById(functionx);
+ functionxMapper.updateruleByFunctionIdStartTime(id,new Date(),v);
+ return Result.OK("提交成功!!");
+ }else if(functionx.getWorkStatus()==3){
+ return Result.error("已提交!!!");
+ }else{
+ return Result.error("当前不属于提交阶段!!!");
+ }
+ }
+
+ @Override
+ public Result> cehui(String id) {
+ Functionx functionx = functionxMapper.selectById(id);
+ if(functionx.getWorkStatus()==2){
+ return Result.error("正处于开发中!!");
+ }
+// functionxMapper.updateById(functionx);
+ functionxMapper.cehui(id);
+ //工作状态全部开发者,提交时间null,真实工作时间null
+ functionxMapper.rule(id);
+ return Result.OK("撤回成功!!!");
+ }
+
+ @Override
+ public Result> shenhe(String id) {
+ Functionx functionx = functionxMapper.selectById(id);
+ if(functionx.getWorkStatus()==3){
+ functionx.setWorkStatus(4);
+ functionxMapper.updateById(functionx);
+ functionxMapper.uprule(id);
+ return Result.OK("审核通过!!1");
+ }
+ if(functionx.getWorkStatus()==4){
+ return Result.error("已审核!!!");
+ }
+ if(functionx.getWorkStatus()<3){
+ return Result.error("请先完成之前的步骤");
+ }
+ if(functionx.getWorkStatus()==9){
+ return Result.error("出现BUG,请先解决");
+ }
+ return null;
+ }
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java
new file mode 100644
index 0000000..d32d9f9
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java
@@ -0,0 +1,171 @@
+package org.jeecg.modules.demo.rulex.controller;
+
+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.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.demo.rulex.entity.Rulex;
+import org.jeecg.modules.demo.rulex.service.IRulexService;
+
+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.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: 规则管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+@Api(tags="规则管理")
+@RestController
+@RequestMapping("/rulex/rulex")
+@Slf4j
+public class RulexController extends JeecgController {
+ @Autowired
+ private IRulexService rulexService;
+
+ /**
+ * 分页列表查询
+ *
+ * @param rulex
+ * @param pageNo
+ * @param pageSize
+ * @param req
+ * @return
+ */
+ @AutoLog(value = "规则管理-分页列表查询")
+ @ApiOperation(value="规则管理-分页列表查询", notes="规则管理-分页列表查询")
+ @GetMapping(value = "/list")
+ public Result> queryPageList(Rulex rulex,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+ HttpServletRequest req) {
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(rulex, req.getParameterMap());
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = rulexService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
+ /**
+ * 添加
+ *
+ * @param rulex
+ * @return
+ */
+ @AutoLog(value = "规则管理-添加")
+ @ApiOperation(value="规则管理-添加", notes="规则管理-添加")
+ @PostMapping(value = "/add")
+ public Result> add(@RequestBody Rulex rulex) {
+ rulexService.save(rulex);
+ return Result.OK("添加成功!");
+ }
+
+ /**
+ * 编辑
+ *
+ * @param rulex
+ * @return
+ */
+ @AutoLog(value = "规则管理-编辑")
+ @ApiOperation(value="规则管理-编辑", notes="规则管理-编辑")
+ @PutMapping(value = "/edit")
+ public Result> edit(@RequestBody Rulex rulex) {
+ rulexService.updateById(rulex);
+ 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) {
+ rulexService.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.rulexService.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) {
+ Rulex rulex = rulexService.getById(id);
+ if(rulex==null) {
+ return Result.error("未找到对应数据");
+ }
+ return Result.OK(rulex);
+ }
+
+ /**
+ * 导出excel
+ *
+ * @param request
+ * @param rulex
+ */
+ @RequestMapping(value = "/exportXls")
+ public ModelAndView exportXls(HttpServletRequest request, Rulex rulex) {
+ return super.exportXls(request, rulex, Rulex.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, Rulex.class);
+ }
+
+}
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
new file mode 100644
index 0000000..3cdefd0
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/entity/Rulex.java
@@ -0,0 +1,130 @@
+package org.jeecg.modules.demo.rulex.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: 规则管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+@Data
+@TableName("rulex")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="rulex对象", description="规则管理")
+public class Rulex 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;
+ /**对应模块id*/
+ @Excel(name = "对应模块id", width = 15)
+ @ApiModelProperty(value = "对应模块id")
+ private java.lang.String moduleId;
+ /**对应功能id*/
+ @Excel(name = "对应功能id", width = 15)
+ @ApiModelProperty(value = "对应功能id")
+ private java.lang.String functionId;
+ /**规则序号*/
+ @Excel(name = "规则序号", width = 15)
+ @ApiModelProperty(value = "规则序号")
+ private java.lang.String ruleNo;
+ /**规则编码*/
+ @Excel(name = "规则编码", width = 15)
+ @ApiModelProperty(value = "规则编码")
+ private java.lang.String ruleCode;
+ /**规则描述*/
+ @Excel(name = "规则描述", width = 15)
+ @ApiModelProperty(value = "规则描述")
+ private java.lang.String pmDescribe;
+ /**分析图*/
+ @Excel(name = "分析图", width = 15)
+ @ApiModelProperty(value = "分析图")
+ private java.lang.String diagrams;
+ /**对应实体id*/
+ @Excel(name = "对应实体id", width = 15)
+ @ApiModelProperty(value = "对应实体id")
+ private java.lang.String tableId;
+ /**对应字段*/
+ @Excel(name = "对应字段", width = 15)
+ @ApiModelProperty(value = "对应字段")
+ private java.lang.String fieldId;
+ /**责任人*/
+ @Excel(name = "责任人", width = 15)
+ @ApiModelProperty(value = "责任人")
+ private java.lang.String managerUsers;
+ /**任务等级*/
+ @Excel(name = "任务等级", width = 15)
+ @ApiModelProperty(value = "任务等级")
+ private java.lang.Integer workLevel;
+ /**任务状态*/
+ @Excel(name = "任务状态", width = 15)
+ @ApiModelProperty(value = "任务状态")
+ private java.lang.Integer workStatus;
+ /**开始时间*/
+ @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 java.util.Date startTime;
+ /**任务时长*/
+ @Excel(name = "任务时长", width = 15)
+ @ApiModelProperty(value = "任务时长")
+ private java.lang.Double duration;
+ /**提交时间*/
+ @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 java.util.Date submitTime;
+ /**实际时长*/
+ @Excel(name = "实际时长", width = 15)
+ @ApiModelProperty(value = "实际时长")
+ private java.lang.Double realDuration;
+ /**规则状态*/
+ @Excel(name = "规则状态", width = 15)
+ @ApiModelProperty(value = "规则状态")
+ private java.lang.Integer status;
+ /**版本状态*/
+ @Excel(name = "版本状态", width = 15)
+ @ApiModelProperty(value = "版本状态")
+ 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
new file mode 100644
index 0000000..cba71e6
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/RulexMapper.java
@@ -0,0 +1,17 @@
+package org.jeecg.modules.demo.rulex.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.demo.rulex.entity.Rulex;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 规则管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+public interface RulexMapper extends BaseMapper {
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/xml/RulexMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/xml/RulexMapper.xml
new file mode 100644
index 0000000..a5e0cd8
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/xml/RulexMapper.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/rulex/service/IRulexService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/IRulexService.java
new file mode 100644
index 0000000..71a977f
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/IRulexService.java
@@ -0,0 +1,14 @@
+package org.jeecg.modules.demo.rulex.service;
+
+import org.jeecg.modules.demo.rulex.entity.Rulex;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 规则管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+public interface IRulexService extends IService {
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/impl/RulexServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/impl/RulexServiceImpl.java
new file mode 100644
index 0000000..0ad2443
--- /dev/null
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/impl/RulexServiceImpl.java
@@ -0,0 +1,19 @@
+package org.jeecg.modules.demo.rulex.service.impl;
+
+import org.jeecg.modules.demo.rulex.entity.Rulex;
+import org.jeecg.modules.demo.rulex.mapper.RulexMapper;
+import org.jeecg.modules.demo.rulex.service.IRulexService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 规则管理
+ * @Author: jeecg-boot
+ * @Date: 2023-04-10
+ * @Version: V1.0
+ */
+@Service
+public class RulexServiceImpl extends ServiceImpl implements IRulexService {
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java
index db5f8f5..b8a94b3 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java
@@ -34,7 +34,7 @@ public class DuplicateCheckController {
/**
* 校验数据是否在系统中是否存在
- *
+ *
* @return
*/
@RequestMapping(value = "/check", method = RequestMethod.GET)
@@ -47,14 +47,25 @@ public class DuplicateCheckController {
//SQL注入校验(只限制非法串改数据库)
final String[] sqlInjCheck = {duplicateCheckVo.getTableName(),duplicateCheckVo.getFieldName()};
SqlInjectionUtil.filterContent(sqlInjCheck);
- if (StringUtils.isNotBlank(duplicateCheckVo.getDataId())) {
- // [2].编辑页面校验
- num = sysDictMapper.duplicateCheckCountSql(duplicateCheckVo);
- } else {
- // [1].添加页面校验
- num = sysDictMapper.duplicateCheckCountSqlNoDataId(duplicateCheckVo);
+ if(duplicateCheckVo.getModuleid()!=null){
+ if (StringUtils.isNotBlank(duplicateCheckVo.getDataId())) {
+ // [2].编辑页面校验
+ num = sysDictMapper.duplicateCheckCountSql1(duplicateCheckVo);
+ } else {
+ // [1].添加页面校验
+ num = sysDictMapper.duplicateCheckCountSqlNoDataId1(duplicateCheckVo);
+ }
+ }else{
+ if (StringUtils.isNotBlank(duplicateCheckVo.getDataId())) {
+ // [2].编辑页面校验
+ num = sysDictMapper.duplicateCheckCountSql(duplicateCheckVo);
+ } else {
+ // [1].添加页面校验
+ num = sysDictMapper.duplicateCheckCountSqlNoDataId(duplicateCheckVo);
+ }
}
+
if (num == null || num == 0) {
// 该值可用
return Result.ok("该值可用!");
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
index ab35a5d..adc12c8 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
@@ -25,14 +25,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @since 2018-12-28
*/
public interface SysDictMapper extends BaseMapper {
-
+
/**
* 重复检查SQL
* @return
*/
public Long duplicateCheckCountSql(DuplicateCheckVo duplicateCheckVo);
public Long duplicateCheckCountSqlNoDataId(DuplicateCheckVo duplicateCheckVo);
-
+
public List queryDictItemsByCode(@Param("code") String code);
@Deprecated
@@ -58,13 +58,13 @@ public interface SysDictMapper extends BaseMapper {
* @return
*/
public List queryAllDepartBackDictModel();
-
+
/**
* 查询所有用户 作为字典信息 username -->value,realname -->text
* @return
*/
public List queryAllUserBackDictModel();
-
+
/**
* 通过关键字查询出字典表
* @param table
@@ -153,4 +153,13 @@ public interface SysDictMapper extends BaseMapper {
* @return
*/
List queryAllTableDictItems(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql);
+
+
+
+ /*
+ * 针对模块中的功能点
+ * */
+ Long duplicateCheckCountSql1(DuplicateCheckVo duplicateCheckVo);
+
+ Long duplicateCheckCountSqlNoDataId1(DuplicateCheckVo duplicateCheckVo);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysDictMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysDictMapper.xml
index 5ec7206..9ccb332 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysDictMapper.xml
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysDictMapper.xml
@@ -8,10 +8,10 @@
where dict_id = (select id from sys_dict where dict_code = #{code})
order by s.sort_order asc
-
+
@@ -21,7 +21,7 @@
-
+
-
+