diff --git a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue
index 3baf893..f15121a 100644
--- a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue
+++ b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue
@@ -44,7 +44,12 @@
-
+
+
+ 合并
+
+ 合并操作
+
@@ -96,6 +101,8 @@
废弃
+ 转化
+
handleDelete(record.id)">
删除
@@ -105,6 +112,8 @@
+
+
@@ -114,14 +123,16 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import RequirementEntityModal from './modules/RequirementEntityModal'
+ import RequirementEntityModal1 from './modules/RequirementEntityModal1'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { httpAction, getAction } from '@/api/manage'
+ import TablexModal1 from '../tablex/modules/TablexModal1'
export default {
name: 'RequirementEntityList',
mixins:[JeecgListMixin, mixinDevice],
components: {
- RequirementEntityModal
+ RequirementEntityModal,RequirementEntityModal1,TablexModal1
},
data () {
return {
@@ -180,6 +191,7 @@
exportXlsUrl: "/requiremententity/requirementEntity/exportXls",
importExcelUrl: "requiremententity/requirementEntity/importExcel",
fq:"/requiremententity/requirementEntity/fq",
+ hb:"/requiremententity/requirementEntity/hb",
},
dictOptions:{},
@@ -195,6 +207,27 @@
},
},
methods: {
+ hb(hbsj){
+ console.log(hbsj)
+ if(hbsj.length<2){
+ this.$message.warning("请选择两条以上记录进行合并");
+ }else{
+ var ids = "";
+ for (var a = 0; a < hbsj.length; a++) {
+ ids += hbsj[a] + ",";
+ }
+ console.log(ids)
+ this.$refs.modalForm1.add(ids);
+ this.$refs.modalForm1.title = "合并";
+ this.$refs.modalForm1.disableSubmit = false;
+ }
+/* deleteAction(this.url.hb,{ids:ids}).then((res)=>{
+ if (res.success) {
+ }else{
+ this.$message.warning(res.message);
+ }
+ });*/
+ },
fq(id){
getAction(this.url.fq,{id:id}).then((res)=>{
if (res.success) {
@@ -205,6 +238,17 @@
}
});
},
+ zh(record){
+ if(record.entityStatus===3){
+ this.$message.warning("已转化,不可再次转化");
+ }else if(record.entityStatus===9){
+ this.$message.warning("已废弃,不可转化");
+ }else {
+ this.$refs.modalForm2.add(record.id);
+ this.$refs.modalForm2.title = "转化";
+ this.$refs.modalForm2.disableSubmit = false;
+ }
+ },
initDictConfig(){
},
getSuperFieldList(){
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 f27eb7b..2670529 100644
--- a/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue
+++ b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue
@@ -18,11 +18,11 @@
-
+
diff --git a/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm1.vue b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm1.vue
new file mode 100644
index 0000000..e1b98bd
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm1.vue
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal1.vue b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal1.vue
new file mode 100644
index 0000000..68fd52c
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal1.vue
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/tablex/modules/TablexForm1.vue b/ant-design-vue-jeecg/src/views/tablex/modules/TablexForm1.vue
new file mode 100644
index 0000000..e334662
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/tablex/modules/TablexForm1.vue
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/tablex/modules/TablexModal1.vue b/ant-design-vue-jeecg/src/views/tablex/modules/TablexModal1.vue
new file mode 100644
index 0000000..a50c8b4
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/tablex/modules/TablexModal1.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java
index bf291b1..92da0c6 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java
@@ -72,6 +72,42 @@ public class RequirementEntityController extends JeecgController queryPageList1(RequirementEntity requirementEntity,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,@RequestParam(name="id",required=true) String id,
+ HttpServletRequest req) {
+ if(!id.equals("")){
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(requirementEntity, req.getParameterMap());
+ queryWrapper.clear();
+ List listids =Arrays.asList(id.split(","));
+ queryWrapper.in("id",listids);
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = requirementEntityService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }else{
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(requirementEntity, req.getParameterMap());
+ queryWrapper.clear();
+ queryWrapper.eq("id",id);
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = requirementEntityService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
+ }
+
/**
* 添加
*
@@ -164,6 +200,30 @@ public class RequirementEntityController extends JeecgController hb(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="id",required=true) String id) {
+ List listids = Arrays.asList(ids.split(","));
+ for (int i = 0 ; i < listids.size(); i++){
+ if(!id.equals(listids.get(i))){
+ RequirementEntity requirementEntity = requirementEntityService.getById(listids.get(i));
+ requirementEntity.setEntityStatus(9);
+ requirementEntityService.updateById(requirementEntity);
+ }
+ }
+ RequirementEntity requirementEntity1 = requirementEntityService.getById(id);
+ requirementEntity1.setEntityStatus(2);
+ requirementEntityService.updateById(requirementEntity1);
+ return Result.OK("成功");
+ }
+
/**
* 导出excel
*
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java
index 8eaeeb3..5dac3f3 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java
@@ -20,6 +20,8 @@ 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.requiremententity.entity.RequirementEntity;
+import org.jeecg.modules.demo.requiremententity.service.IRequirementEntityService;
import org.jeecg.modules.fieldx.controller.FieldxController;
import org.jeecg.modules.fieldx.entity.Fieldx;
import org.jeecg.modules.fieldx.service.IFieldxService;
@@ -76,6 +78,9 @@ public class TablexController extends JeecgController {
@Autowired
private ITablexVoService tablexVoService;
+ @Autowired
+ private IRequirementEntityService requirementEntityService;
+
/**
* 分页列表查询
*
@@ -127,6 +132,43 @@ public class TablexController extends JeecgController {
return Result.OK("添加成功!");
}
+ /**
+ * 转化
+ *
+ * @param tablex
+ * @return
+ */
+ @AutoLog(value = "转化")
+ @ApiOperation(value = "转化", notes = "转化")
+ @PostMapping(value = "/zh")
+ public Result> zh(@RequestBody Tablex tablex,HttpServletRequest req) {
+ String reid = tablex.getId();
+ tablex.setId(null);
+ List tablexList = tablexService.list();
+ for (Tablex tablex1 : tablexList) {
+ if (tablex1.getModuleId().equals(tablex.getModuleId())) {
+ return Result.error("该模块已有实体,转化失败");
+ }
+ }
+ RequirementEntity requirementEntity = requirementEntityService.getById(reid);
+ tablex.setTableName(requirementEntity.getEntityName());
+ tablex.setTableEnName(requirementEntity.getEntityEnName());
+ tablex.setVerison(1);
+ tablex.setTableStructure("CREATE TABLE '" + tablex.getTableEnName() + "' ();");
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(tablex, req.getParameterMap());
+ queryWrapper.eq("table_name",tablex.getTableName()).or().eq("table_en_name",tablex.getTableEnName());
+ List tlist = tablexService.list(queryWrapper);
+ if(tlist.size()>0){
+ return Result.error("中文或者英文名称重复,不可转化");
+ }else {
+ tablexService.save(tablex);
+ modulexService.setmodule(tablex.getId(), tablex.getModuleId());
+ requirementEntity.setEntityStatus(3);
+ requirementEntityService.updateById(requirementEntity);
+ return Result.OK("转化成功!");
+ }
+ }
+
/**
* 编辑
*