diff --git a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue index 29dee61..eab2b01 100644 --- a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue +++ b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue @@ -39,6 +39,9 @@
新增 + + 模板 + 导出 导入 @@ -143,6 +146,7 @@
+ @@ -157,13 +161,15 @@ import {filterObj} from "@/utils/util"; import store from '@/store' import BugxModal from "./modules/BugxModal"; + import MoBanModal from "./modules/MoBanModal"; export default { name: 'FunctionxList', mixins:[JeecgListMixin, mixinDevice], components: { FunctionxModal, - BugxModal + BugxModal, + MoBanModal }, data () { return { @@ -443,7 +449,9 @@ fieldList.push({type:'int',value:'verison',text:'版本号',dictCode:''}) this.superFieldList = fieldList }, - + valueChange(value){ + if (value) this.loadData() + }, loadParameter() { if (this.loadRouteType === false) { this.id = this.$route.query.moduleid; @@ -504,6 +512,11 @@ this.$refs.modalForm1.title = "反馈问题"; this.$refs.modalForm1.disableSubmit = false; }, + muban: function (record) { + this.$refs.modalForm2.add() + this.$refs.modalForm2.title = '模板导入' + this.$refs.modalForm2.disableSubmit = false; + }, } } diff --git a/ant-design-vue-jeecg/src/views/functionx/modules/FunctionTemplateList.vue b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionTemplateList.vue new file mode 100644 index 0000000..aca377c --- /dev/null +++ b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionTemplateList.vue @@ -0,0 +1,335 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/functionx/modules/MoBanModal.vue b/ant-design-vue-jeecg/src/views/functionx/modules/MoBanModal.vue new file mode 100644 index 0000000..19ea8ea --- /dev/null +++ b/ant-design-vue-jeecg/src/views/functionx/modules/MoBanModal.vue @@ -0,0 +1,78 @@ + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java index 38e00b1..bd1862f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java @@ -88,6 +88,31 @@ public class FunctionTemplateController extends JeecgController pageList = functionTemplateService.page(page, queryWrapper); return Result.OK(pageList); } + @AutoLog(value = "功能模板管理-分页列表查询") + @ApiOperation(value="功能模板管理-分页列表查询", notes="功能模板管理-分页列表查询") + @GetMapping(value = "/list1") + public Result queryPageList1(FunctionTemplate functionTemplate, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { +// QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(functionTemplate, req.getParameterMap()); + QueryWrapper queryWrapper=new QueryWrapper<>(); + if(functionTemplate.getFunctionTemplateName()!=null){ + queryWrapper.like("function_template_name",functionTemplate.getFunctionTemplateName()); + } + if(functionTemplate.getFunctionTemplateEnName()!=null){ + queryWrapper.like("function_template_en_name",functionTemplate.getFunctionTemplateEnName()); + } + if(functionTemplate.getWorkStatus()!=null){ + queryWrapper.eq("work_status",functionTemplate.getWorkStatus()); + } + if(functionTemplate.getFunctionTemplateType()!=null){ + queryWrapper.eq("function_template_type",functionTemplate.getFunctionTemplateType()); + } + Page page = new Page(pageNo, pageSize); + IPage pageList = functionTemplateService.page(page, queryWrapper); + return Result.OK(pageList); + } /** * 添加 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 index b6e7c08..3a47e8f 100644 --- 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 @@ -246,5 +246,12 @@ public class FunctionxController extends JeecgController muban(@RequestParam(name="id",required=true) String id,@RequestParam(name="ids",required=true) String ids){ + + return functionxService.muban(id,ids); + } + + } 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 index 39e18cb..1f3ae7f 100644 --- 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 @@ -27,4 +27,6 @@ public interface IFunctionxService extends IService { Result cehui(String id); Result shenhe(String id); + + Result muban(String id, String ids); } 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 index a4df3f8..6389cf3 100644 --- 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 @@ -1,9 +1,12 @@ package org.jeecg.modules.demo.functionx.service.impl; import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.demo.functiontemplate.entity.FunctionTemplate; +import org.jeecg.modules.demo.functiontemplate.mapper.FunctionTemplateMapper; 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.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -24,6 +27,8 @@ public class FunctionxServiceImpl extends ServiceImpl muban(String id, String ids) { + //本质上就是添加,id为对应的模块id,然后ids为id集合 + System.err.println(id+" "+ids); + String[] split = ids.split(","); + for (String s : split) { + FunctionTemplate functionTemplate = functionTemplateMapper.selectById(s); + Functionx functionx=new Functionx(); + if(functionTemplate!=null){ + functionx.setFunctionName(functionTemplate.getFunctionTemplateName()); + functionx.setFunctionEnName(functionTemplate.getFunctionTemplateEnName()); + functionx.setWorkStatus(functionTemplate.getWorkStatus()); + //根据id获得当前对应模块的编码,然后截取模板的最后两个字符,拼接成为新的功能编码 + functionx.setFunctionCode(functionTemplate.getFunctionTemplateCode()); + functionx.setFunctionType(functionTemplate.getFunctionTemplateType()); + functionx.setDiagrams(functionTemplate.getDiagrams()); + functionx.setPmDescribe(functionTemplate.getFunctionTemplateDescribe()); + functionx.setWorkLevel(functionTemplate.getWorkLevel()); + functionx.setWorkStatus(functionTemplate.getWorkStatus()); + functionx.setModuleId(id); + functionx.setId(null); + functionxMapper.insert(functionx); + } + } + return Result.OK("模板添加成功"); + } } 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 27e3680..5b03388 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 @@ -63,7 +63,7 @@ SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and module_id=#{moduleid} - SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and id <> #{dataId} and modulextype_id=#{moduleid}