From ab15bf85cf383e092f60bdf70c1f3c177be38e17 Mon Sep 17 00:00:00 2001 From: chengyufei <1932574737@qq.com> Date: Wed, 12 Jul 2023 15:10:18 +0800 Subject: [PATCH 1/5] =?UTF-8?q?1.=E6=A8=A1=E5=9D=97=E8=81=94=E5=8A=A8?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E3=80=81=E5=8A=9F=E8=83=BD=E8=81=94=E5=8A=A8?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E3=80=81=E8=A7=84=E5=88=99=E8=81=94=E5=8A=A8?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=B8=94=E4=B8=8E=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=B1=82=E7=BA=A7=E8=81=94=E5=8A=A8=EF=BC=8C=E5=8D=B3=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=B1=82=E7=BA=A7=E9=80=89=E6=8B=A9=E5=93=AA=E4=B8=80?= =?UTF-8?q?=E7=BA=A7=EF=BC=8C=E6=A8=A1=E5=9D=97=E3=80=81=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E3=80=81=E8=A7=84=E5=88=99=E6=98=BE=E7=A4=BA=E5=88=B0=E5=93=AA?= =?UTF-8?q?=E4=B8=80=E7=BA=A7=E3=80=82=203.=E5=8F=91=E5=B8=83=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=BB=98=E8=AE=A4=E5=BD=93=E5=89=8D=E6=97=B6=E9=97=B4?= =?UTF-8?q?=204.=E6=A8=A1=E5=9D=97=E6=96=87=E6=9C=AC=E6=A1=86=E5=90=8E?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B7=BB=E5=8A=A0=E6=8C=89=E9=92=AE=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=BC=B9=E5=87=BA=E6=96=B0=E5=A2=9E=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=8F=AF=E4=BB=A5=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E6=96=B0=E5=A2=9E=E6=A8=A1=E5=9D=97=E3=80=82=205.?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=96=87=E6=9C=AC=E6=A1=86=E5=90=8E=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=B7=BB=E5=8A=A0=E6=8C=89=E9=92=AE=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=BC=B9=E5=87=BA=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=8F=AF=E4=BB=A5=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=E3=80=82=206.=E8=A7=84?= =?UTF-8?q?=E5=88=99=E6=96=87=E6=9C=AC=E6=A1=86=E5=90=8E=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8C=89=E9=92=AE=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=96=B0=E5=A2=9E=E8=A7=84=E5=88=99=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=8F=AF=E4=BB=A5=E7=9B=B4=E6=8E=A5=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=A7=84=E5=88=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/task/modules/TaskForm.vue | 86 +++++++++++++++---- 1 file changed, 68 insertions(+), 18 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue b/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue index 4b216ed..db95e8d 100644 --- a/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue +++ b/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue @@ -16,13 +16,13 @@ /> - + + + + + + + @@ -76,23 +76,27 @@ - - - + + + 新增模块 - + + :dict-code="functionx" + style="width: 100%" @change="fillFunctionName()"> + 新增功能 - - + + + 新增规则 @@ -125,7 +129,7 @@ - + @@ -166,6 +170,9 @@ + + + @@ -176,12 +183,23 @@ import {httpAction, getAction} from '@api/manage' import {validateDuplicateValue} from '@/utils/util' import JVxeDateCell from "@comp/jeecg/JVxeTable/components/cells/JVxeDateCell"; import JMultiSelectTag from "@/components/dict/JMultiSelectTag" +import TaskModal from "@views/task/modules/TaskModal.vue"; +import {JeecgListMixin} from '@/mixins/JeecgListMixin' +import {mixinDevice} from "@/utils/mixin"; +import modulexModal from "@views/modulex/modules/ModulexModal.vue"; +import FunctionxModal from "@views/functionx/modules/FunctionxModal__Style#Drawer.vue"; +import RulexModal from "@views/rulex/modules/RulexModal__Style#Drawer.vue"; export default { name: 'TaskForm', + mixins: [JeecgListMixin, mixinDevice], components: { + RulexModal, + FunctionxModal, + modulexModal, + TaskModal, JVxeDateCell, - JMultiSelectTag + JMultiSelectTag, }, props: { //表单禁用 @@ -193,6 +211,12 @@ export default { }, data() { return { + modulex: "modulex,module_name,id", + functionx: "functionx,function_name,id", + rulex: "rulex,rule_no,id", + task: "task,task_name,id", + value: new Date(), + model: { workLevel: 2, workStatus: 0, @@ -318,6 +342,8 @@ export default { } , fillTaskName() { + this.modulex = "modulex,module_name,id,project_id='"+this.model.projectId+"'"; + let that = this; let fillTaskName = ""; let param = { @@ -343,7 +369,31 @@ export default { } } , - + fillLevelName(){ + this.task = "task,task_name,id,level='"+this.model.level+"'"; + } + , + handleAdd3: function () { + this.$refs.modalForm3.add(); + this.$refs.modalForm3.title = "新增"; + this.$refs.modalForm3.disableSubmit = false; + }, + handleAdd1: function () { + this.$refs.modalForm1.add(); + this.$refs.modalForm1.title = "新增"; + this.$refs.modalForm1.disableSubmit = false; + }, + handleAdd2: function () { + this.$refs.modalForm2.add(); + this.$refs.modalForm2.title = "新增"; + this.$refs.modalForm2.disableSubmit = false; + }, + fillModuleName() { + this.functionx = "functionx,function_name,id,module_id='"+this.model.moduleId+"'"; + }, + fillFunctionName(){ + this.rulex = "rulex,rule_no,id,function_id='"+this.model.functionId+"'"; + }, // 获取当前日期的方法 getProjectNum() { const projectTime = new Date() // 当前中国标准时间 From 6ba5bd093b421fae8c25b813a37a0e52f23c6d1d Mon Sep 17 00:00:00 2001 From: zjh <10930829+zheng-jinhao1209@user.noreply.gitee.com> Date: Wed, 12 Jul 2023 15:22:29 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=A7=84=E5=88=99?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/modulex/ModulexList.vue | 11 +- .../org/jeecg/JeecgSystemApplication.java | 2 +- .../rulex/controller/RulexController.java | 257 ++++++++++++++---- 3 files changed, 211 insertions(+), 59 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue index a2a2738..4535d68 100644 --- a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue +++ b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue @@ -397,7 +397,8 @@ export default { deleteBatch: "/modulex/modulex/deleteBatch", exportXlsUrl: "/modulex/modulex/exportXls", importExcelUrl: "modulex/modulex/importExcel", - + tablexImportExcelUrl: "tablex/tablex/importExcel", + ruleImportExcelUrl: "rulex/rulex/importExcel", }, dictOptions: {}, superFieldList: [], @@ -422,7 +423,13 @@ export default { // 用计算属性取出columns的dataIndex,作为多选框的选项数据 checkColumn: function () { return this.columns.map(item => item.title) - } + }, + tablexImportExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.tablexImportExcelUrl}`; + }, + ruleImportExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.ruleImportExcelUrl}` + }, }, methods: { // 多选框的事件回调 diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java index 07a2ce3..4658e77 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java @@ -14,7 +14,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; /** - * 单体启动类(采用此类启动为单体模式) 想笑 别叫 有用 + * 单体启动类(采用此类启动为单体模式) 想笑 别叫 有用 别想 别叫 别用 */ @Slf4j @SpringBootApplication 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 index 8f0b8f2..428f7c5 100644 --- 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 @@ -1,16 +1,23 @@ package org.jeecg.modules.demo.rulex.controller; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.Arrays; +import java.util.Date; import java.util.List; import java.util.Map; import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.jeecg.modules.demo.rulex.entity.RuleVo; import org.jeecg.modules.demo.rulex.entity.Rulex; +import org.jeecg.modules.demo.rulex.mapper.RulexMapper; import org.jeecg.modules.demo.rulex.service.IRuleVoService; import org.jeecg.modules.demo.rulex.service.IRulexService; @@ -19,16 +26,24 @@ 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.rulex.util.DateValidator; +import org.jeecg.modules.demo.rulex.util.DateValidatorUsingDateFormat; import org.jeecg.modules.fieldx.entity.Fieldx; import org.jeecg.modules.fieldx.service.IFieldxService; import org.jeecg.modules.modulex.entity.Modulex; import org.jeecg.modules.modulex.service.IModulexService; +import org.jeecg.modules.system.entity.SysDict; +import org.jeecg.modules.system.entity.SysDictItem; +import org.jeecg.modules.system.mapper.SysDictItemMapper; import org.jeecg.modules.tablex.entity.Tablex; import org.jeecg.modules.tablex.service.ITablexService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.entity.ImportParams; import org.jeecg.common.system.base.controller.JeecgController; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; @@ -54,7 +69,10 @@ public class RulexController extends JeecgController { private IRuleVoService iRuleVoService; @Autowired FunctionxMapper functionxMapper; - + @Autowired + IFunctionxService functionxService; + @Autowired + RulexMapper rulexMapper; @Autowired IFieldxService iFieldxService; @Autowired @@ -62,6 +80,12 @@ public class RulexController extends JeecgController { @Autowired IModulexService iModulexService; + @Autowired + RulexController rulexController; + + @Autowired + private SysDictItemMapper sysDictItemMapper; + /** * 分页列表查询 @@ -205,13 +229,16 @@ public class RulexController extends JeecgController { */ @RequestMapping(value = "/importExcel", method = RequestMethod.POST) public Result importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, Rulex.class); + + return rulexController.preImportAndExcel(request); } - public Result preImportAndExcel(HttpServletRequest request) { + @Transactional + public Result preImportAndExcel(HttpServletRequest request) { //return super.importExcel(request, response, ScTeams.class); MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map fileMap = multipartRequest.getFileMap(); - + //校验时间 + final DateValidator validator = new DateValidatorUsingDateFormat("yyyy-MM-dd hh:mm:ss"); for (Map.Entry entity : fileMap.entrySet()) { System.err.println("----------------------------------------------"); // 获取上传文件对象 @@ -233,37 +260,37 @@ public class RulexController extends JeecgController { System.out.println("List list = ExcelImportUtil.importExcel: " + list); int num = 0; for (int i = 0; i < list.size(); i++) { - if (list.size() > 0 && - list.get(i).getRuleNo() == null && - list.get(i).getRuleCode() == null && - list.get(i).getPmDescribe() == null && - list.get(i).getModuleId() == null && - list.get(i).getFunctionId() == null && - list.get(i).getDiagrams() == null && - list.get(i).getTableId() == null && - list.get(i).getFieldId() == null && - list.get(i).getManagerUsers() == null && - list.get(i).getWorkLevel() == null && - list.get(i).getWorkStatus() == null && - list.get(i).getStartTime() == null && - list.get(i).getManagerUsers() == null && - list.get(i).getDuration() == null && - list.get(i).getSubmitTime() == null && + if ( + //excel出现必要值未填该行直接跳过 + list.get(i).getRuleNo() == null || + list.get(i).getRuleCode() == null || +// list.get(i).getPmDescribe() == null && + list.get(i).getModuleId() == null || + list.get(i).getFunctionId() == null || +// list.get(i).getDiagrams() == null && + list.get(i).getTableId() == null || + list.get(i).getFieldId() == null || + list.get(i).getManagerUsers() == null || + list.get(i).getWorkLevel() == null || + list.get(i).getWorkStatus() == null || +// list.get(i).getStartTime() == null && +// list.get(i).getManagerUsers() == null && +// list.get(i).getDuration() == null && +// list.get(i).getSubmitTime() == null && list.get(i).getRealDuration() == null&& - list.get(i).getStatus() == null&& - list.get(i).getVerisonStatus() == null&& + list.get(i).getStatus() == null|| + list.get(i).getVerisonStatus() == null|| list.get(i).getVerison() == null) { continue; } - iRuleVoService.save(list.get(i)); + num++; if (num == 0) { return Result.error("文件导入失败:导入模板不匹配"); - } else { - return Result.ok("文件导入成功!"); +// } else if (num!=list.size()) { +// return Result.error("文件导入失败:请检查填写文字"); } + iRuleVoService.save(list.get(i)); } - - }catch (Exception e) { //update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示 String msg = e.getMessage(); @@ -285,69 +312,187 @@ public class RulexController extends JeecgController { } List ruleVoList = iRuleVoService.list(); if (ruleVoList.size()<=0||ruleVoList==null){ - return Result.error("文件导入失败"); + return Result.error("文件导入失败,模板不匹配"); } for (int i = 0; i < ruleVoList.size(); i++) { + Rulex rulex = new Rulex(); RuleVo ruleVo = ruleVoList.get(i); //对应字段 String fieldId = ruleVo.getFieldId(); - Fieldx byId = iFieldxService.getById(fieldId); - if (byId==null){ + LambdaQueryWrapper rulexLambdaQueryWrapper = new LambdaQueryWrapper<>(); + rulexLambdaQueryWrapper.eq(Fieldx::getFieldName, fieldId); + Fieldx byId = iFieldxService.getOne(rulexLambdaQueryWrapper); + if (byId == null) { + iRuleVoService.remove(null); return Result.error("字段输入错误,请核对"); } + rulex.setFieldId(byId.getId()); //对应功能 - String functionId = ruleVo.getFunctionId(); - Fieldx byId1 = iFieldxService.getById(functionId); - if (byId1==null){ + String functionName = ruleVo.getFunctionId(); + LambdaQueryWrapper functionxLambdaQueryWrapper = new LambdaQueryWrapper(); + functionxLambdaQueryWrapper.eq(Functionx::getFunctionName, functionName); + Functionx byId1 = functionxService.getOne(functionxLambdaQueryWrapper); + if (byId1 == null) { + iRuleVoService.remove(null); return Result.error("功能输入错误,请核对"); } + rulex.setFunctionId(byId1.getId()); //对应模块 - String moduleId = ruleVo.getModuleId(); - Modulex byId2 = iModulexService.getById(moduleId); - if (byId2==null){ + String moduleName = ruleVo.getModuleId(); + LambdaQueryWrapper modulexLambdaQueryWrapper = new LambdaQueryWrapper<>(); + modulexLambdaQueryWrapper.eq(Modulex::getModuleName, moduleName); + Modulex byId2 = iModulexService.getOne(modulexLambdaQueryWrapper); + if (byId2 == null) { + iRuleVoService.remove(null); + return Result.error("模块输入错误,请核对"); } + rulex.setModuleId(byId2.getId()); //对应实体 String tableId = ruleVo.getTableId(); - Tablex byId3 = iTablexService.getById(tableId); - if (byId3==null){ + LambdaQueryWrapper tableLambdaQueryWrapper = new LambdaQueryWrapper<>(); + tableLambdaQueryWrapper.eq(Tablex::getTableName, tableId); + Tablex byId3 = iTablexService.getOne(tableLambdaQueryWrapper); + if (byId3 == null) { + iRuleVoService.remove(null); + return Result.error("实体输入错误,请核对"); } + rulex.setTableId(byId3.getId()); + Double aDouble = null; try { - Double.valueOf(ruleVo.getDuration()); - }catch (Exception e){ + if (aDouble != null) + aDouble = Double.valueOf(ruleVo.getDuration()); + rulex.setDuration(aDouble); + } catch (Exception e) { + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); //手动回滚,这样上层就无需去处理异常了 + return Result.error("任务时长输入错误,请核对"); } + Double d; try { - Integer.valueOf(ruleVo.getRealDuration()); - }catch (Exception e){ + d = Double.valueOf(ruleVo.getRealDuration()); + } catch (Exception e) { + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); //手动回滚,这样上层就无需去处理异常了 + return Result.error("实际时长输入错误,请核对"); } - + rulex.setRealDuration(d); + Integer integer; try { - Integer.valueOf(ruleVo.getWorkLevel()); - }catch (Exception e){ + integer = Integer.valueOf(ruleVo.getWorkLevel()); + } catch (Exception e) { + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); //手动回滚,这样上层就无需去处理异常了 + return Result.error("任务等级输入错误,请核对"); } - try { - Double.valueOf(ruleVo.getWorkStatus()); - }catch (Exception e){ + rulex.setWorkLevel(integer); + String workStatus = ruleVo.getWorkStatus(); + LambdaQueryWrapper sysDictItemLambdaQueryWrapper = new LambdaQueryWrapper<>(); + sysDictItemLambdaQueryWrapper.eq(SysDictItem::getItemText, workStatus).eq(SysDictItem::getDictId,"1645268542514421762"); + SysDictItem sysDictItem = sysDictItemMapper.selectOne(sysDictItemLambdaQueryWrapper); + if (sysDictItem == null){ + iRuleVoService.remove(null); return Result.error("任务状态输入错误,请核对"); } - try { - Integer.valueOf(ruleVo.getStatus()); - }catch (Exception e){ - return Result.error("规则输入错误,请核对"); + + rulex.setWorkStatus(Integer.valueOf(sysDictItem.getItemValue())); + + String status = ruleVo.getStatus(); + LambdaQueryWrapper sysDictItemLambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + sysDictItemLambdaQueryWrapper2.eq(SysDictItem::getItemText, status).eq(SysDictItem::getDictId,"1645264493205491713"); + SysDictItem sysDictItem2 = sysDictItemMapper.selectOne(sysDictItemLambdaQueryWrapper2); + if (sysDictItem2 == null){ + iRuleVoService.remove(null); + return Result.error("规则状态输入错误,请核对"); } - try { - Double.valueOf(ruleVo.getVerisonStatus()); - }catch (Exception e){ + + + rulex.setStatus(Integer.valueOf(sysDictItem2.getItemValue())); + String verisonStatus = ruleVo.getVerisonStatus(); + LambdaQueryWrapper sysDictItemLambdaQueryWrapper3 = new LambdaQueryWrapper<>(); + sysDictItemLambdaQueryWrapper3.eq(SysDictItem::getItemText, verisonStatus); + SysDictItem sysDictItem3 = sysDictItemMapper.selectOne(sysDictItemLambdaQueryWrapper3); + if (sysDictItem3 == null) { + iRuleVoService.remove(null); return Result.error("版本状态输入错误,请核对"); } + rulex.setVerisonStatus(Integer.valueOf(sysDictItem3.getItemValue())); + + //String转Date + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + try { + String startTime = ruleVo.getStartTime(); + if (startTime != null) + if (!validator.isValid(startTime)){ + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); //手动回滚,这样上层就无需去处理异常了 + return Result.error("开始时间输入错误"); + } + + else { + Date date = simpleDateFormat.parse(startTime); + rulex.setStartTime(date); + } + String submitTime = ruleVo.getSubmitTime(); + if (submitTime != null) + if (!validator.isValid(submitTime)){ + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); //手动回滚,这样上层就无需去处理异常了 + return Result.error("提交时间输入错误"); + } + + else { + Date date1 = simpleDateFormat.parse(submitTime); + rulex.setSubmitTime(date1); + } + } catch (ParseException e) { + e.printStackTrace(); + } + + //规则序号 + String ruleNo = ruleVo.getRuleNo(); + List list = rulexMapper.checkRuleNo(byId1.getId()); + if (list.contains(ruleNo)) { + iRuleVoService.remove(null); + return Result.error("规则序号已存在"); + } + rulex.setRuleNo(ruleNo); + //规则编码 + String ruleCode = ruleVo.getRuleCode(); + Functionx functionxServiceById = functionxService.getById(byId1.getId()); + String functionCode = functionxServiceById.getFunctionCode(); +// if (!ruleCode.matches(functionCode)) +// return Result.error("规则编码错误"); + rulex.setRuleCode(functionCode); + //规则描述 + String pmDescribe = ruleVo.getPmDescribe(); + if (pmDescribe != null) + rulex.setPmDescribe(pmDescribe); + //分析图 + String diagrams = ruleVo.getDiagrams(); + if (diagrams != null) + rulex.setDiagrams(diagrams); + //版本号 + Integer integer1; + try { + integer1 = Integer.valueOf(ruleVo.getVerison()); + } catch (Exception e) { + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); //手动回滚,这样上层就无需去处理异常了 + + return Result.error("版本号输入错误,请核对"); + } + rulex.setVerison(String.valueOf(integer1)); + //责任人、 + String managerUsers = ruleVo.getManagerUsers(); + if (managerUsers != null) + rulex.setManagerUsers(managerUsers); + //存入真实表 + rulexService.save(rulex); + iRuleVoService.remove(null); } - return Result.error("文件导入失败!"); + return Result.ok("文件导入成功!"); } @GetMapping(value = "/sort") From 0b439bc52ba155b42cecd10f2374aa18218445b7 Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 12 Jul 2023 16:26:59 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/jeecg/JeecgSystemApplication.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java index 4658e77..07a2ce3 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java @@ -14,7 +14,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; /** - * 单体启动类(采用此类启动为单体模式) 想笑 别叫 有用 别想 别叫 别用 + * 单体启动类(采用此类启动为单体模式) 想笑 别叫 有用 */ @Slf4j @SpringBootApplication From b6a345c25e55e7de09593a588f6ee85d21c8a25c Mon Sep 17 00:00:00 2001 From: zjh <10930829+zheng-jinhao1209@user.noreply.gitee.com> Date: Wed, 12 Jul 2023 16:37:30 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant-design-vue-jeecg/src/views/modulex/ModulexList.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue index 4535d68..c6c1e0f 100644 --- a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue +++ b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue @@ -633,6 +633,9 @@ export default { param.field = this.getQueryField() param.pageNo = this.ipagination.current param.pageSize = this.ipagination.pageSize + //模块管理 条件查询如果没有条件,则使用路由跳转值 ;直接点击模块管理则查询全部 + if(param.projectId==null) + param.projectId = this.$route.query.project; //param.id=this.id; //!!!!!!! // param.projectId = this.$route.query.project; From 44609442d015466f1efe623fd4ad7b7f295072bf Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 12 Jul 2023 16:38:14 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../requiremententity/modules/RequirementEntityForm.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue index 2bc44a7..f27eb7b 100644 --- a/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue +++ b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue @@ -19,13 +19,13 @@ - - + + - - + +