From 83d5672603c23c1fd0ea118ce297758182a5df3a Mon Sep 17 00:00:00 2001 From: mqh <1571896045@qq.com> Date: Mon, 10 Jul 2023 18:37:12 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=AE=9E=E4=BD=93vo=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tablex/controller/TablexController.java | 147 ++++++-- .../modules/tablex/mapper/TablexMapper.java | 2 + .../modules/tablex/mapper/TablexVoMapper.java | 18 + .../tablex/mapper/xml/TablexMapper.xml | 2 +- .../tablex/mapper/xml/TablexVoMapper.xml | 5 + .../tablex/service/ITablexVoService.java | 15 + .../service/impl/TablexVoServiceImpl.java | 22 ++ .../org/jeecg/modules/tablex/vo/TablexVo.java | 331 ++++++++++++++++++ .../src/main/resources/application-dev.yml | 4 +- .../src/main/resources/application-prod.yml | 4 +- .../src/main/resources/application-test.yml | 2 +- package-lock.json | 2 +- 12 files changed, 521 insertions(+), 33 deletions(-) create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexVoMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexVoMapper.xml create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/ITablexVoService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexVoServiceImpl.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vo/TablexVo.java 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 a283457..b1957f9 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 @@ -1,6 +1,9 @@ package org.jeecg.modules.tablex.controller; -import java.util.*; +import java.util.ArrayList; +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; @@ -9,8 +12,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import io.swagger.models.auth.In; +import org.apache.commons.lang.StringUtils; +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.fieldx.controller.FieldxController; import org.jeecg.modules.fieldx.entity.Fieldx; @@ -25,6 +31,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; +import org.jeecg.modules.tablex.service.ITablexVoService; +import org.jeecg.modules.tablex.vo.TablexVo; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -62,6 +70,9 @@ public class TablexController extends JeecgController { @Autowired private FieldxController fieldxController; + + @Autowired + private ITablexVoService tablexVoService; /** * 分页列表查询 @@ -84,22 +95,7 @@ public class TablexController extends JeecgController { IPage pageList = tablexService.page(page, queryWrapper); return Result.OK(pageList); } - @AutoLog(value = "实体管理-通过模块查询实体") - @ApiOperation(value="实体管理-通过模块查询实体", notes="实体管理-通过模块查询实体") - @GetMapping(value = "/getTableByModuleId") - public Result getTableByModuleId(@RequestParam(name="moduleId",required=true) String moduleId){ - if (moduleId!=null){ - List tablexList = tablexService.list(new QueryWrapper().eq("module_id", moduleId)); - ArrayList hashMaps = new ArrayList<>(); - for (Tablex tablex:tablexList){ - HashMap hashMap = new HashMap<>(); - hashMap.put("text",tablex.getTableName()); - hashMap.put("value",tablex.getId()); - hashMaps.add(hashMap); - } - return Result.OK(hashMaps); - }else return Result.error("未找到数据,请重试"); - } + /** * 添加 * @@ -140,12 +136,12 @@ public class TablexController extends JeecgController { @PutMapping(value = "/edit") public Result edit(@RequestBody Tablex tablex) { tablex.setVerison(tablex.getVerison()+1); -// List tablexList = tablexService.list(); -// for (Tablex tablex1 : tablexList){ -// if (tablex1.getModuleId().equals(tablex.getModuleId())){ -// return Result.error("该模块已有实体,编辑失败"); -// } -// } + List tablexList = tablexService.list(); + for (Tablex tablex1 : tablexList){ + if (tablex1.getModuleId().equals(tablex.getModuleId())){ + return Result.error("该模块已有实体,编辑失败"); + } + } if (tablex.getModuleId() != null){ Modulex modulex = modulexService.getById(tablex.getModuleId()); tablex.setTableName(modulex.getModuleName()); @@ -230,7 +226,106 @@ public class TablexController extends JeecgController { */ @RequestMapping(value = "/importExcel", method = RequestMethod.POST) public Result importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, Tablex.class); - } + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + for (Map.Entry entry : fileMap.entrySet()) { + //获取上传文件对象 + MultipartFile file = entry.getValue(); + ImportParams params = new ImportParams(); + params.setTitleRows(2);//表格标题行数,默认0 + params.setHeadRows(1);//表头行数,默认1 + params.setNeedSave(true);//是否需要保存上传的Excel,默认为false + + // 判断文件是否是表格 + String originalFilename = file.getOriginalFilename(); + if (StringUtils.isBlank(originalFilename) || + (!originalFilename.endsWith("xls") && + !originalFilename.endsWith("xlsx"))) { + return Result.error("文件格式不正确"); + } + List list = null; + try { + //读取excel数据 + list = ExcelImportUtil.importExcel(file.getInputStream(), Tablex.class, params); + } catch (Exception e) { + return Result.error("文件读取失败"); + } + + //判断文件中是否存在数据 + if (list == null || list.size() == 0) { + return Result.error("Excel数据为空"); + } + + for (int i = 0; i < list.size(); i++) { + //判断当前存入行是否为空值 + if (list.size() > 0 && + list.get(i).getId() == null && + list.get(i).getModuleId() == null && + list.get(i).getTableName() == null && + list.get(i).getTableEnName() == null && + list.get(i).getTableStructure() == null && + list.get(i).getStructuralDiagram() == null && + list.get(i).getStatus() == null && + list.get(i).getVerisonStatus() == null && + list.get(i).getVerison() == null) continue; -} + //存入临时表中 + tablexVoService.save((TablexVo) list.get(i)); + } + + //从临时表中取出数据 + List voList = tablexVoService.list(); + if (voList == null) { + return Result.error("数据为空"); + } + + List tablexList = new ArrayList<>(); + for (int i = 0; i < voList.size(); i++) { + //判断对应模块 + if (voList.get(i).getModuleId() != null || !voList.get(i).getModuleId().equals("")) { + //判断中文名称 + if (voList.get(i).getTableName() != null || !voList.get(i).getTableName().equals("")) { + //判断英文名称 + if (voList.get(i).getTableEnName() != null || !voList.get(i).getTableEnName().equals("")) { + //判断表结构SQL + if (voList.get(i).getTableStructure() != null || !voList.get(i).getTableStructure().equals("")) { + //判断结构图 + if (voList.get(i).getStructuralDiagram() != null || !voList.get(i).getStructuralDiagram().equals("")) { + //判断实体状态 + if (voList.get(i).getStatus() != null || !voList.get(i).getStatus().equals("")) { + //判断版本状态 + if (voList.get(i).getVerisonStatus() != null || !voList.get(i).getVerisonStatus().equals("")){ + //判断版本号 + if (voList.get(i).getVerison() != null || !voList.get(i).getVerison().equals("")){ + + } else { + return Result.error("导入失败,第" + i + 1 + "行的版本号填写错误!"); + } + } else { + return Result.error("导入失败,第" + i + 1 + "行的版本状态填写错误!"); + } + } else { + return Result.error("导入失败,第" + i + 1 + "行的实体状态填写错误!"); + } + } else { + return Result.error("导入失败,第" + i + 1 + "行的结构图填写错误!"); + } + } else { + return Result.error("导入失败,第" + i + 1 + "行的表结构SQL填写错误!"); + } + } else { + return Result.error("导入失败,第" + i + 1 + "行的英文名称填写错误!"); + } + } else { + return Result.error("导入失败,第" + i + 1 + "行的中文名称填写错误!"); + } + } else { + return Result.error("导入失败,第" + i + 1 + "行的对应模块填写错误!"); + } + } + + } + return super.importExcel(request, response, Tablex.class); + } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java index 8911f7b..05b8718 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java @@ -2,6 +2,7 @@ package org.jeecg.modules.tablex.mapper; import java.util.List; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Update; import org.checkerframework.checker.guieffect.qual.UI; @@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @Date: 2023-04-10 * @Version: V1.0 */ +@Mapper public interface TablexMapper extends BaseMapper { @Update("update tablex set table_structure = #{sql} where id = #{tableId}") diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexVoMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexVoMapper.java new file mode 100644 index 0000000..f554a76 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexVoMapper.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.tablex.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Update; +import org.jeecg.modules.tablex.entity.Tablex; +import org.jeecg.modules.tablex.vo.TablexVo; + +/** + * @Description: 实体表 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +@Mapper +public interface TablexVoMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml index 3e55de2..1ae4119 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexVoMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexVoMapper.xml new file mode 100644 index 0000000..f964916 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexVoMapper.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/tablex/service/ITablexVoService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/ITablexVoService.java new file mode 100644 index 0000000..44ae5ca --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/ITablexVoService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.tablex.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.tablex.entity.Tablex; +import org.jeecg.modules.tablex.vo.TablexVo; + +/** + * @Description: 实体表 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +public interface ITablexVoService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexVoServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexVoServiceImpl.java new file mode 100644 index 0000000..2526ae6 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexVoServiceImpl.java @@ -0,0 +1,22 @@ +package org.jeecg.modules.tablex.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.tablex.entity.Tablex; +import org.jeecg.modules.tablex.mapper.TablexMapper; +import org.jeecg.modules.tablex.mapper.TablexVoMapper; +import org.jeecg.modules.tablex.service.ITablexService; +import org.jeecg.modules.tablex.service.ITablexVoService; +import org.jeecg.modules.tablex.vo.TablexVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @Description: 实体表 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +@Service +public class TablexVoServiceImpl extends ServiceImpl implements ITablexVoService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vo/TablexVo.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vo/TablexVo.java new file mode 100644 index 0000000..0b9d199 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vo/TablexVo.java @@ -0,0 +1,331 @@ +package org.jeecg.modules.tablex.vo; + +import org.jeecg.modules.tablex.entity.Tablex; + +import java.io.Serializable; + +/** + * + * @TableName tablex_vo + */ +public class TablexVo extends Tablex implements Serializable { + /** + * + */ + private String id; + + /** + * 对应模块id + */ + private String moduleId; + + /** + * 中文名称 + */ + private String tableName; + + /** + * 英文名称 + */ + private String tableEnName; + + /** + * 表结构SQL + */ + private String tableStructure; + + /** + * 结构图 + */ + private String structuralDiagram; + + /** + * 创建人 + */ + private String createBy; + + /** + * 创建时间 + */ + private String createTime; + + /** + * 修改人 + */ + private String updateBy; + + /** + * 修改时间 + */ + private String updateTime; + + /** + * 实体状态 + */ + private String status; + + /** + * 版本状态 + */ + private String verisonStatus; + + /** + * 版本号 + */ + private String verison; + + private static final long serialVersionUID = 1L; + + /** + * + */ + public String getId() { + return id; + } + + /** + * + */ + public void setId(String id) { + this.id = id; + } + + /** + * 对应模块id + */ + public String getModuleId() { + return moduleId; + } + + /** + * 对应模块id + */ + public void setModuleId(String moduleId) { + this.moduleId = moduleId; + } + + /** + * 中文名称 + */ + public String getTableName() { + return tableName; + } + + /** + * 中文名称 + */ + public void setTableName(String tableName) { + this.tableName = tableName; + } + + /** + * 英文名称 + */ + public String getTableEnName() { + return tableEnName; + } + + /** + * 英文名称 + */ + public void setTableEnName(String tableEnName) { + this.tableEnName = tableEnName; + } + + /** + * 表结构SQL + */ + public String getTableStructure() { + return tableStructure; + } + + /** + * 表结构SQL + */ + public void setTableStructure(String tableStructure) { + this.tableStructure = tableStructure; + } + + /** + * 结构图 + */ + public String getStructuralDiagram() { + return structuralDiagram; + } + + /** + * 结构图 + */ + public void setStructuralDiagram(String structuralDiagram) { + this.structuralDiagram = structuralDiagram; + } + + /** + * 创建人 + */ + public String getCreateBy() { + return createBy; + } + + /** + * 创建人 + */ + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + /** + * 创建时间 + */ + public String getCreateTime() { + return createTime; + } + + /** + * 创建时间 + */ + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + /** + * 修改人 + */ + public String getUpdateBy() { + return updateBy; + } + + /** + * 修改人 + */ + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + /** + * 修改时间 + */ + public String getUpdateTime() { + return updateTime; + } + + /** + * 修改时间 + */ + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + /** + * 实体状态 + */ + public String getStatus() { + return status; + } + + /** + * 实体状态 + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * 版本状态 + */ + public String getVerisonStatus() { + return verisonStatus; + } + + /** + * 版本状态 + */ + public void setVerisonStatus(String verisonStatus) { + this.verisonStatus = verisonStatus; + } + + /** + * 版本号 + */ + public String getVerison() { + return verison; + } + + /** + * 版本号 + */ + public void setVerison(String verison) { + this.verison = verison; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TablexVo other = (TablexVo) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getModuleId() == null ? other.getModuleId() == null : this.getModuleId().equals(other.getModuleId())) + && (this.getTableName() == null ? other.getTableName() == null : this.getTableName().equals(other.getTableName())) + && (this.getTableEnName() == null ? other.getTableEnName() == null : this.getTableEnName().equals(other.getTableEnName())) + && (this.getTableStructure() == null ? other.getTableStructure() == null : this.getTableStructure().equals(other.getTableStructure())) + && (this.getStructuralDiagram() == null ? other.getStructuralDiagram() == null : this.getStructuralDiagram().equals(other.getStructuralDiagram())) + && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getVerisonStatus() == null ? other.getVerisonStatus() == null : this.getVerisonStatus().equals(other.getVerisonStatus())) + && (this.getVerison() == null ? other.getVerison() == null : this.getVerison().equals(other.getVerison())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getModuleId() == null) ? 0 : getModuleId().hashCode()); + result = prime * result + ((getTableName() == null) ? 0 : getTableName().hashCode()); + result = prime * result + ((getTableEnName() == null) ? 0 : getTableEnName().hashCode()); + result = prime * result + ((getTableStructure() == null) ? 0 : getTableStructure().hashCode()); + result = prime * result + ((getStructuralDiagram() == null) ? 0 : getStructuralDiagram().hashCode()); + result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getVerisonStatus() == null) ? 0 : getVerisonStatus().hashCode()); + result = prime * result + ((getVerison() == null) ? 0 : getVerison().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", moduleId=").append(moduleId); + sb.append(", tableName=").append(tableName); + sb.append(", tableEnName=").append(tableEnName); + sb.append(", tableStructure=").append(tableStructure); + sb.append(", structuralDiagram=").append(structuralDiagram); + sb.append(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", status=").append(status); + sb.append(", verisonStatus=").append(verisonStatus); + sb.append(", verison=").append(verison); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml index d113636..8788030 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml @@ -137,9 +137,9 @@ spring: # driver-class-name: com.mysql.cj.jdbc.Driver # 多数据源配置 #multi-datasource1: - url: jdbc:mysql://182.92.169.222:3306/project_management?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai + url: jdbc:mysql://localhost:3306/project_management?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai username: root - password: ycwl2022. + password: 157189 driver-class-name: com.mysql.cj.jdbc.Driver #redis 配置 redis: diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml index c998adc..91e4214 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml @@ -132,9 +132,9 @@ spring: connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 datasource: master: - url: jdbc:mysql://182.92.169.222:3306/project_management?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai + url: jdbc:mysql://localhost:3306/project_management?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai username: root - password: ycwl2022. + password: 157189 driver-class-name: com.mysql.cj.jdbc.Driver # 多数据源配置 #multi-datasource1: diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-test.yml b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-test.yml index 83c39db..ce7f33d 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-test.yml +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-test.yml @@ -133,7 +133,7 @@ spring: master: url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai username: root - password: root + password: 157189 driver-class-name: com.mysql.cj.jdbc.Driver # 多数据源配置 #multi-datasource1: diff --git a/package-lock.json b/package-lock.json index e721786..a033ef7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "education", + "name": "projectManagement", "lockfileVersion": 2, "requires": true, "packages": {} From 3af797a48c8abadb69da1901b5a97e990a70587d Mon Sep 17 00:00:00 2001 From: mqh <1571896045@qq.com> Date: Mon, 10 Jul 2023 18:44:54 +0800 Subject: [PATCH 02/17] =?UTF-8?q?Revert=20"=E6=8F=90=E4=BA=A4=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=AE=9E=E4=BD=93vo=E7=B1=BB"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 83d56726 --- .../modules/tablex/mapper/TablexMapper.java | 2 - .../modules/tablex/mapper/TablexVoMapper.java | 18 - .../tablex/mapper/xml/TablexMapper.xml | 2 +- .../tablex/mapper/xml/TablexVoMapper.xml | 5 - .../service/impl/TablexVoServiceImpl.java | 22 -- .../org/jeecg/modules/tablex/vo/TablexVo.java | 331 ------------------ 6 files changed, 1 insertion(+), 379 deletions(-) delete mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexVoMapper.java delete mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexVoMapper.xml delete mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexVoServiceImpl.java delete mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vo/TablexVo.java diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java index 05b8718..8911f7b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java @@ -2,7 +2,6 @@ package org.jeecg.modules.tablex.mapper; import java.util.List; -import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Update; import org.checkerframework.checker.guieffect.qual.UI; @@ -15,7 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @Date: 2023-04-10 * @Version: V1.0 */ -@Mapper public interface TablexMapper extends BaseMapper { @Update("update tablex set table_structure = #{sql} where id = #{tableId}") diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexVoMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexVoMapper.java deleted file mode 100644 index f554a76..0000000 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexVoMapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.jeecg.modules.tablex.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Update; -import org.jeecg.modules.tablex.entity.Tablex; -import org.jeecg.modules.tablex.vo.TablexVo; - -/** - * @Description: 实体表 - * @Author: jeecg-boot - * @Date: 2023-04-10 - * @Version: V1.0 - */ -@Mapper -public interface TablexVoMapper extends BaseMapper { - -} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml index 1ae4119..3e55de2 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexVoMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexVoMapper.xml deleted file mode 100644 index f964916..0000000 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexVoMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexVoServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexVoServiceImpl.java deleted file mode 100644 index 2526ae6..0000000 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexVoServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.jeecg.modules.tablex.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.jeecg.modules.tablex.entity.Tablex; -import org.jeecg.modules.tablex.mapper.TablexMapper; -import org.jeecg.modules.tablex.mapper.TablexVoMapper; -import org.jeecg.modules.tablex.service.ITablexService; -import org.jeecg.modules.tablex.service.ITablexVoService; -import org.jeecg.modules.tablex.vo.TablexVo; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Description: 实体表 - * @Author: jeecg-boot - * @Date: 2023-04-10 - * @Version: V1.0 - */ -@Service -public class TablexVoServiceImpl extends ServiceImpl implements ITablexVoService { - -} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vo/TablexVo.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vo/TablexVo.java deleted file mode 100644 index 0b9d199..0000000 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vo/TablexVo.java +++ /dev/null @@ -1,331 +0,0 @@ -package org.jeecg.modules.tablex.vo; - -import org.jeecg.modules.tablex.entity.Tablex; - -import java.io.Serializable; - -/** - * - * @TableName tablex_vo - */ -public class TablexVo extends Tablex implements Serializable { - /** - * - */ - private String id; - - /** - * 对应模块id - */ - private String moduleId; - - /** - * 中文名称 - */ - private String tableName; - - /** - * 英文名称 - */ - private String tableEnName; - - /** - * 表结构SQL - */ - private String tableStructure; - - /** - * 结构图 - */ - private String structuralDiagram; - - /** - * 创建人 - */ - private String createBy; - - /** - * 创建时间 - */ - private String createTime; - - /** - * 修改人 - */ - private String updateBy; - - /** - * 修改时间 - */ - private String updateTime; - - /** - * 实体状态 - */ - private String status; - - /** - * 版本状态 - */ - private String verisonStatus; - - /** - * 版本号 - */ - private String verison; - - private static final long serialVersionUID = 1L; - - /** - * - */ - public String getId() { - return id; - } - - /** - * - */ - public void setId(String id) { - this.id = id; - } - - /** - * 对应模块id - */ - public String getModuleId() { - return moduleId; - } - - /** - * 对应模块id - */ - public void setModuleId(String moduleId) { - this.moduleId = moduleId; - } - - /** - * 中文名称 - */ - public String getTableName() { - return tableName; - } - - /** - * 中文名称 - */ - public void setTableName(String tableName) { - this.tableName = tableName; - } - - /** - * 英文名称 - */ - public String getTableEnName() { - return tableEnName; - } - - /** - * 英文名称 - */ - public void setTableEnName(String tableEnName) { - this.tableEnName = tableEnName; - } - - /** - * 表结构SQL - */ - public String getTableStructure() { - return tableStructure; - } - - /** - * 表结构SQL - */ - public void setTableStructure(String tableStructure) { - this.tableStructure = tableStructure; - } - - /** - * 结构图 - */ - public String getStructuralDiagram() { - return structuralDiagram; - } - - /** - * 结构图 - */ - public void setStructuralDiagram(String structuralDiagram) { - this.structuralDiagram = structuralDiagram; - } - - /** - * 创建人 - */ - public String getCreateBy() { - return createBy; - } - - /** - * 创建人 - */ - public void setCreateBy(String createBy) { - this.createBy = createBy; - } - - /** - * 创建时间 - */ - public String getCreateTime() { - return createTime; - } - - /** - * 创建时间 - */ - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - /** - * 修改人 - */ - public String getUpdateBy() { - return updateBy; - } - - /** - * 修改人 - */ - public void setUpdateBy(String updateBy) { - this.updateBy = updateBy; - } - - /** - * 修改时间 - */ - public String getUpdateTime() { - return updateTime; - } - - /** - * 修改时间 - */ - public void setUpdateTime(String updateTime) { - this.updateTime = updateTime; - } - - /** - * 实体状态 - */ - public String getStatus() { - return status; - } - - /** - * 实体状态 - */ - public void setStatus(String status) { - this.status = status; - } - - /** - * 版本状态 - */ - public String getVerisonStatus() { - return verisonStatus; - } - - /** - * 版本状态 - */ - public void setVerisonStatus(String verisonStatus) { - this.verisonStatus = verisonStatus; - } - - /** - * 版本号 - */ - public String getVerison() { - return verison; - } - - /** - * 版本号 - */ - public void setVerison(String verison) { - this.verison = verison; - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - TablexVo other = (TablexVo) that; - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getModuleId() == null ? other.getModuleId() == null : this.getModuleId().equals(other.getModuleId())) - && (this.getTableName() == null ? other.getTableName() == null : this.getTableName().equals(other.getTableName())) - && (this.getTableEnName() == null ? other.getTableEnName() == null : this.getTableEnName().equals(other.getTableEnName())) - && (this.getTableStructure() == null ? other.getTableStructure() == null : this.getTableStructure().equals(other.getTableStructure())) - && (this.getStructuralDiagram() == null ? other.getStructuralDiagram() == null : this.getStructuralDiagram().equals(other.getStructuralDiagram())) - && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) - && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) - && (this.getVerisonStatus() == null ? other.getVerisonStatus() == null : this.getVerisonStatus().equals(other.getVerisonStatus())) - && (this.getVerison() == null ? other.getVerison() == null : this.getVerison().equals(other.getVerison())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getModuleId() == null) ? 0 : getModuleId().hashCode()); - result = prime * result + ((getTableName() == null) ? 0 : getTableName().hashCode()); - result = prime * result + ((getTableEnName() == null) ? 0 : getTableEnName().hashCode()); - result = prime * result + ((getTableStructure() == null) ? 0 : getTableStructure().hashCode()); - result = prime * result + ((getStructuralDiagram() == null) ? 0 : getStructuralDiagram().hashCode()); - result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); - result = prime * result + ((getVerisonStatus() == null) ? 0 : getVerisonStatus().hashCode()); - result = prime * result + ((getVerison() == null) ? 0 : getVerison().hashCode()); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", moduleId=").append(moduleId); - sb.append(", tableName=").append(tableName); - sb.append(", tableEnName=").append(tableEnName); - sb.append(", tableStructure=").append(tableStructure); - sb.append(", structuralDiagram=").append(structuralDiagram); - sb.append(", createBy=").append(createBy); - sb.append(", createTime=").append(createTime); - sb.append(", updateBy=").append(updateBy); - sb.append(", updateTime=").append(updateTime); - sb.append(", status=").append(status); - sb.append(", verisonStatus=").append(verisonStatus); - sb.append(", verison=").append(verison); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file From 9c49f1bd055122b63c04bdd42c6262dba1ea3eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B1=E5=B1=8B?= <3180483789@qq.com> Date: Tue, 11 Jul 2023 15:59:56 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E9=9C=80=E6=B1=82=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/RequirementItemForm.vue | 51 ++++++++++++++----- .../entity/RequirementItem.java | 10 ++-- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue index 3e06c82..7264ed3 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue @@ -8,10 +8,23 @@ - + + + + + @@ -28,14 +41,19 @@ + + + + + - + - + @@ -43,13 +61,11 @@ - - - - - - - + + + + + @@ -83,13 +99,21 @@ model:{ }, labelCol: { - xs: { span: 24 }, - sm: { span: 5 }, + xs: { span: 23 }, + sm: { span: 6 }, }, wrapperCol: { xs: { span: 24 }, sm: { span: 16 }, }, + labelCol1: { + xs: { span: 24 }, + sm: { span: 3 }, + }, + wrapperCol1: { + xs: { span: 24 }, + sm: { span: 20 }, + }, confirmLoading: false, validatorRules: { projectId: [ @@ -127,6 +151,9 @@ //备份model原始值 }, methods: { + popupCallback(value,row){ + this.model = Object.assign(this.model, row); + }, getxqbm(){ if(this.model.upperId===undefined||this.model.upperId===null){ this.model.upperId = ""; diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementitem/entity/RequirementItem.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementitem/entity/RequirementItem.java index 75522d7..53b0968 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementitem/entity/RequirementItem.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementitem/entity/RequirementItem.java @@ -62,11 +62,15 @@ public class RequirementItem implements Serializable { @Dict(dictTable = "projectx", dicText = "project_name", dicCode = "id") @ApiModelProperty(value = "项目id") private java.lang.String projectId; - /**类型id*/ - @Excel(name = "类型id", width = 15, dictTable = "requirement_type", dicText = "type_name", dicCode = "id") - @Dict(dictTable = "requirement_type", dicText = "type_name", dicCode = "id") + /**类型id*/ + @Excel(name = "类型id", width = 15, dictTable = "requirement_type", dicText = "type_name", dicCode = "id") + @Dict(dictTable = "requirement_type", dicText = "type_name", dicCode = "id") @ApiModelProperty(value = "类型id") private java.lang.String typeId; + /**类型*/ + @Excel(name = "类型", width = 15) + @ApiModelProperty(value = "类型") + private java.lang.String typeName; /**上级需求id*/ @Excel(name = "上级需求id", width = 15) @ApiModelProperty(value = "上级需求id") From 8112129d1f4eb1de85490f46a02f223c4b6fa3aa Mon Sep 17 00:00:00 2001 From: shiji <1913712590@qq.com> Date: Tue, 11 Jul 2023 16:01:39 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=82=B9=E5=87=BB=E6=A8=A1=E5=9D=97=EF=BC=8C?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E6=A8=A1=E5=9D=97=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=9A=84bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant-design-vue-jeecg/src/views/modulex/ModulexList.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue index 750f5e2..21f50f2 100644 --- a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue +++ b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue @@ -624,7 +624,9 @@ export default { param.pageSize = this.ipagination.pageSize //param.id=this.id; //!!!!!!! - // param.projectId = this.$route.query.project; + //模块管理 条件查询如果没有条件,则使用路由跳转值 ;直接点击模块管理则查询全部 + if(param.projectId==null) + param.projectId = this.$route.query.project; // console.log('paaaaaaaaaaaaaaaaaaaaa') return filterObj(param) }, From 475921a9495a7c414689278674aaa8504a9bcc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B1=E5=B1=8B?= <3180483789@qq.com> Date: Tue, 11 Jul 2023 16:02:58 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/requirementitem/RequirementItemList.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue index 1e94e75..e69ed90 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue @@ -170,9 +170,14 @@ align:"center", dataIndex: 'projectId_dictText' }, + // { + // title:'类型', + // align:"center", + // dataIndex: 'typeId_dictText' + // }, { - title:'类型', - align:"center", + title: '类型id', + align: "center", dataIndex: 'typeId_dictText' }, { From 03c76491ee586521a4368950bb4684e65f916d1f Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 11 Jul 2023 16:47:58 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E9=9C=80=E6=B1=82=E6=8A=BD=E5=8F=96?= =?UTF-8?q?=E5=AE=9E=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/requirementitem/RequirementItemList.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue index e69ed90..4cb12fd 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue @@ -119,6 +119,8 @@ 拆分 + 抽取对象 + 确认需求 @@ -129,6 +131,7 @@ + @@ -143,12 +146,13 @@ import ModulexModal1 from "../modulex/modules/ModulexModal1"; import FunctionxModal1 from "../functionx/modules/FunctionxModal1"; import RulexModal1 from "../rulex/modules/RulexModal1"; + import RequirementEntityList1 from "../requiremententity/RequirementEntityList1"; export default { name: 'RequirementItemList', mixins:[JeecgListMixin, mixinDevice], components: { - RequirementItemModal,ModulexModal1,FunctionxModal1,RulexModal1 + RequirementItemModal,ModulexModal1,FunctionxModal1,RulexModal1,RequirementEntityList1 }, data () { return { @@ -315,6 +319,15 @@ } }); }, + cqdx(record){ + let s = null + getAction('/requiremententity/requirementEntity/list', { requirementId: record.id }).then((res) => { + s = res.result.records; + this.$refs.rel1.showModal(); + this.$refs.rel1.edit(s[0]); + this.$refs.rel1.disableSubmit = false; + }) + }, wdxq(){ this.searchQuerywdxq(); }, From 2ef9b39cf98b1639ff09c38e35195d1df74c32b0 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 11 Jul 2023 16:48:58 +0800 Subject: [PATCH 07/17] wenti --- .../src/views/requirementitem/RequirementItemList.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue index 4cb12fd..9103237 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue @@ -174,13 +174,8 @@ align:"center", dataIndex: 'projectId_dictText' }, - // { - // title:'类型', - // align:"center", - // dataIndex: 'typeId_dictText' - // }, { - title: '类型id', + title: '类型', align: "center", dataIndex: 'typeId_dictText' }, From 9d1aaaec6d3cc9d3dc727902c1b7105a71383a22 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Tue, 11 Jul 2023 17:03:22 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=8A=9F=E8=83=BD=E7=B1=BB=E5=9E=8B=E6=98=AF?= =?UTF-8?q?=E2=80=98=E6=96=B0=E5=A2=9E=E2=80=99=E5=92=8C=E2=80=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E2=80=99=20=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FunctionxController.java | 7 + .../demo/rulex/service/IRulexService.java | 2 + .../rulex/service/impl/RulexServiceImpl.java | 120 +++++++++++++----- 3 files changed, 96 insertions(+), 33 deletions(-) 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 ab5d776..bbde1a4 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 @@ -28,6 +28,7 @@ import org.jeecg.modules.demo.requirementfun.entity.RequirementFun; import org.jeecg.modules.demo.requirementfun.service.IRequirementFunService; import org.jeecg.modules.demo.requirementitem.entity.RequirementItem; import org.jeecg.modules.demo.requirementitem.service.IRequirementItemService; +import org.jeecg.modules.demo.rulex.service.IRulexService; import org.jeecg.modules.modulex.entity.Modulex; import org.jeecg.modules.modulex.service.IModulexService; import org.jeecgframework.poi.excel.ExcelImportUtil; @@ -66,6 +67,9 @@ public class FunctionxController extends JeecgController { Result sort(String id); List queryRuleListByFunctionId(Functionx functionx); + + void saveRulex(Functionx functionx); } 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 index 8b3babc..126b80e 100644 --- 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 @@ -1,16 +1,23 @@ package org.jeecg.modules.demo.rulex.service.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; import org.jeecg.modules.demo.functionx.entity.Functionx; 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.jeecg.modules.fieldx.entity.Fieldx; +import org.jeecg.modules.fieldx.service.IFieldxService; +import org.jeecg.modules.tablex.entity.Tablex; +import org.jeecg.modules.tablex.service.ITablexService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; - +import java.util.Date; import java.util.List; /** @@ -19,39 +26,86 @@ import java.util.List; * @Date: 2023-04-10 * @Version: V1.0 */ + +@Slf4j @Service public class RulexServiceImpl extends ServiceImpl implements IRulexService { - @Autowired - RulexMapper rulexMapper; - - @Override - public Result sort(String id) { - String sort = rulexMapper.sort(id); - String functioncode = rulexMapper.find(id); - if (sort == null) { - return Result.OK("001" + functioncode); - } else { - int i = Integer.parseInt(sort); - i++; - String s = Integer.toString(i); - while (s.length() < 3) { - s = "0" + s; - } - return Result.OK(s + functioncode); + @Autowired + RulexMapper rulexMapper; + + @Autowired + private ITablexService iTablexService; + + @Autowired + private IFieldxService iFieldxService; + + @Override + public Result sort(String id) { + String sort = rulexMapper.sort(id); + String functioncode = rulexMapper.find(id); + if (sort == null) { + return Result.OK("001" + functioncode); + } else { + int i = Integer.parseInt(sort); + i++; + String s = Integer.toString(i); + while (s.length() < 3) { + s = "0" + s; + } + return Result.OK(s + functioncode); + } + } + + /** + * 根据功能id查询对应的规则 + * + * @param functionx functionx + * @return {@link List}<{@link Rulex}> + */ + @Override + public List queryRuleListByFunctionId(Functionx functionx) { + LambdaQueryWrapper ruleWrapper = new LambdaQueryWrapper<>(); + ruleWrapper.eq(Rulex::getFunctionId, functionx.getId()); + return this.list(ruleWrapper); + } + + /** + * 功能管理新增规则操作时,如果功能类型是‘新增’和‘修改’,自动根据实体对应的字段,自动生成若干条记录(根据实体的字段生成多条规则) + * + * @param functionx + */ + @Override + public void saveRulex(Functionx functionx) { + int functionType = functionx.getFunctionType().intValue(); + if (1 == functionType || 3 == functionType) { + String moduleId = functionx.getModuleId(); + Tablex tablex = iTablexService.getOne(new LambdaQueryWrapper().eq(Tablex::getModuleId, moduleId)); + if (!ObjectUtils.isEmpty(tablex)) { + List fieldxList = iFieldxService.list(new LambdaQueryWrapper().eq(Fieldx::getTableId, tablex.getId())); + if (!ObjectUtils.isEmpty(fieldxList)) { + fieldxList.stream().forEach(o -> { + //主键字段不创建规则 + if (0 == o.getIsPk()) { + Rulex rulex = new Rulex(); + rulex.setModuleId(moduleId); + rulex.setTableId(tablex.getId()); + rulex.setFunctionId(functionx.getId()); + rulex.setFieldId(o.getId()); + rulex.setCreateTime(new Date()); + Result result = this.sort(functionx.getId()); + String roleCodeStr = result.getResult().toString(); + log.info("-----------------the roleCodeStr:{}", roleCodeStr); + String ruleNo = roleCodeStr.substring(0, 3); + String ruleCode = roleCodeStr.substring(3) + ruleNo; + rulex.setRuleNo(ruleNo); + rulex.setRuleCode(ruleCode); + rulex.setPmDescribe(JSON.toJSONString(o)); + this.save(rulex); + } + }); + } + } + } } - } - - /** - * 根据功能id查询对应的规则 - * - * @param functionx functionx - * @return {@link List}<{@link Rulex}> - */ - @Override - public List queryRuleListByFunctionId(Functionx functionx) { - LambdaQueryWrapper ruleWrapper = new LambdaQueryWrapper<>(); - ruleWrapper.eq(Rulex::getFunctionId, functionx.getId()); - return this.list(ruleWrapper); - } } From 81ecf23eaf7cc1e1f61710171012fd2612e1befe Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 11 Jul 2023 17:14:46 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RequirementEntityList.vue | 210 ++++++++++ .../RequirementEntityList1.vue | 382 ++++++++++++++++++ .../modules/RequirementEntityForm.vue | 133 ++++++ .../modules/RequirementEntityModal.vue | 60 +++ .../RequirementEntityModal__Style#Drawer.vue | 84 ++++ .../RequirementEntityController.java | 171 ++++++++ .../entity/RequirementEntity.java | 79 ++++ .../mapper/RequirementEntityMapper.java | 17 + .../mapper/xml/RequirementEntityMapper.xml | 5 + .../service/IRequirementEntityService.java | 14 + .../impl/RequirementEntityServiceImpl.java | 19 + 11 files changed, 1174 insertions(+) create mode 100644 ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue create mode 100644 ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList1.vue create mode 100644 ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue create mode 100644 ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal.vue create mode 100644 ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal__Style#Drawer.vue create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/entity/RequirementEntity.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/mapper/RequirementEntityMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/mapper/xml/RequirementEntityMapper.xml create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/service/IRequirementEntityService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/service/impl/RequirementEntityServiceImpl.java diff --git a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue new file mode 100644 index 0000000..c16119b --- /dev/null +++ b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue @@ -0,0 +1,210 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList1.vue b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList1.vue new file mode 100644 index 0000000..3317328 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList1.vue @@ -0,0 +1,382 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue new file mode 100644 index 0000000..2bc44a7 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityForm.vue @@ -0,0 +1,133 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal.vue b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal.vue new file mode 100644 index 0000000..20fcb28 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal__Style#Drawer.vue new file mode 100644 index 0000000..edfb89a --- /dev/null +++ b/ant-design-vue-jeecg/src/views/requiremententity/modules/RequirementEntityModal__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/requiremententity/controller/RequirementEntityController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java new file mode 100644 index 0000000..264bcd4 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.demo.requiremententity.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.requiremententity.entity.RequirementEntity; +import org.jeecg.modules.demo.requiremententity.service.IRequirementEntityService; + +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-07-10 + * @Version: V1.0 + */ +@Api(tags="需求实体抽取管理") +@RestController +@RequestMapping("/requiremententity/requirementEntity") +@Slf4j +public class RequirementEntityController extends JeecgController { + @Autowired + private IRequirementEntityService requirementEntityService; + + /** + * 分页列表查询 + * + * @param requirementEntity + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "需求实体抽取管理-分页列表查询") + @ApiOperation(value="需求实体抽取管理-分页列表查询", notes="需求实体抽取管理-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(RequirementEntity requirementEntity, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(requirementEntity, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = requirementEntityService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param requirementEntity + * @return + */ + @AutoLog(value = "需求实体抽取管理-添加") + @ApiOperation(value="需求实体抽取管理-添加", notes="需求实体抽取管理-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody RequirementEntity requirementEntity) { + requirementEntityService.save(requirementEntity); + return Result.OK(requirementEntity); + } + + /** + * 编辑 + * + * @param requirementEntity + * @return + */ + @AutoLog(value = "需求实体抽取管理-编辑") + @ApiOperation(value="需求实体抽取管理-编辑", notes="需求实体抽取管理-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody RequirementEntity requirementEntity) { + requirementEntityService.updateById(requirementEntity); + 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) { + requirementEntityService.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.requirementEntityService.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) { + RequirementEntity requirementEntity = requirementEntityService.getById(id); + if(requirementEntity==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(requirementEntity); + } + + /** + * 导出excel + * + * @param request + * @param requirementEntity + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, RequirementEntity requirementEntity) { + return super.exportXls(request, requirementEntity, RequirementEntity.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, RequirementEntity.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/entity/RequirementEntity.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/entity/RequirementEntity.java new file mode 100644 index 0000000..a194949 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/entity/RequirementEntity.java @@ -0,0 +1,79 @@ +package org.jeecg.modules.demo.requiremententity.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-07-10 + * @Version: V1.0 + */ +@Data +@TableName("requirement_entity") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="requirement_entity对象", description="需求实体抽取管理") +public class RequirementEntity 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; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + /**需求id*/ + @Excel(name = "需求id", width = 15, dictTable = "requirement_item", dicText = "requirement_name", dicCode = "id") + @Dict(dictTable = "requirement_item", dicText = "requirement_name", dicCode = "id") + @ApiModelProperty(value = "需求id") + private java.lang.String requirementId; + /**名称*/ + @Excel(name = "名称", width = 15) + @ApiModelProperty(value = "名称") + private java.lang.String entityName; + /**英文名称*/ + @Excel(name = "英文名称", width = 15) + @ApiModelProperty(value = "英文名称") + private java.lang.String entityEnName; + /**实体描述*/ + @Excel(name = "实体描述", width = 15) + @ApiModelProperty(value = "实体描述") + private java.lang.String entityDescribe; + /**实体状态*/ + @Excel(name = "实体状态", width = 15, dicCode = "entity_status") + @Dict(dicCode = "entity_status") + @ApiModelProperty(value = "实体状态") + private java.lang.Integer entityStatus; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/mapper/RequirementEntityMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/mapper/RequirementEntityMapper.java new file mode 100644 index 0000000..e2fe915 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/mapper/RequirementEntityMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.requiremententity.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.requiremententity.entity.RequirementEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 需求实体抽取管理 + * @Author: jeecg-boot + * @Date: 2023-07-10 + * @Version: V1.0 + */ +public interface RequirementEntityMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/mapper/xml/RequirementEntityMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/mapper/xml/RequirementEntityMapper.xml new file mode 100644 index 0000000..fa57acf --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/mapper/xml/RequirementEntityMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/service/IRequirementEntityService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/service/IRequirementEntityService.java new file mode 100644 index 0000000..cd54740 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/service/IRequirementEntityService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.requiremententity.service; + +import org.jeecg.modules.demo.requiremententity.entity.RequirementEntity; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 需求实体抽取管理 + * @Author: jeecg-boot + * @Date: 2023-07-10 + * @Version: V1.0 + */ +public interface IRequirementEntityService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/service/impl/RequirementEntityServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/service/impl/RequirementEntityServiceImpl.java new file mode 100644 index 0000000..c3c8506 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/service/impl/RequirementEntityServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.requiremententity.service.impl; + +import org.jeecg.modules.demo.requiremententity.entity.RequirementEntity; +import org.jeecg.modules.demo.requiremententity.mapper.RequirementEntityMapper; +import org.jeecg.modules.demo.requiremententity.service.IRequirementEntityService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 需求实体抽取管理 + * @Author: jeecg-boot + * @Date: 2023-07-10 + * @Version: V1.0 + */ +@Service +public class RequirementEntityServiceImpl extends ServiceImpl implements IRequirementEntityService { + +} From 15917569cc26a0e9780a59b6e1f08116d1369122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B1=E5=B1=8B?= <3180483789@qq.com> Date: Tue, 11 Jul 2023 17:44:53 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/requirementitem/modules/RequirementItemForm.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue index 7264ed3..bd8d70d 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue @@ -26,6 +26,13 @@ /> + + + + + + + From 89b95608ed8249f867a6e589d97022dfd82603b7 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 11 Jul 2023 17:54:50 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/requiremententity/RequirementEntityList1.vue | 6 +++--- .../src/views/requirementitem/RequirementItemList.vue | 10 +++------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList1.vue b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList1.vue index 3317328..90d1715 100644 --- a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList1.vue +++ b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList1.vue @@ -262,9 +262,9 @@ this.model = Object.assign({}, record); console.log(this.model) //console.log(topicid); - this.queryParam.requirementId = this.model.requirementId; - this.tableid = this.model.requirementId - this.tableName=this.model.requirementId_dictText; + this.queryParam.requirementId = this.model.id; + this.tableid = this.model.id; + this.tableName=this.model.requirementName; //console.log(this.queryParam.topicid); this.loadData(); }, diff --git a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue index 9103237..56dbb56 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue @@ -315,13 +315,9 @@ }); }, cqdx(record){ - let s = null - getAction('/requiremententity/requirementEntity/list', { requirementId: record.id }).then((res) => { - s = res.result.records; - this.$refs.rel1.showModal(); - this.$refs.rel1.edit(s[0]); - this.$refs.rel1.disableSubmit = false; - }) + this.$refs.rel1.showModal(); + this.$refs.rel1.edit(record); + this.$refs.rel1.disableSubmit = false; }, wdxq(){ this.searchQuerywdxq(); From 3ab6b01f0015bcd86e4d4494016cc8d789567f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B1=E5=B1=8B?= <3180483789@qq.com> Date: Tue, 11 Jul 2023 18:09:49 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E9=9C=80=E6=B1=82=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../requirementitem/modules/RequirementItemForm.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue index bd8d70d..4b38260 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue @@ -21,7 +21,7 @@ org-fields="id,type_name" dest-fields="typeId,typeName" code="typename" - :multi="true" + :multi="multi" @input="popupCallback" /> @@ -101,6 +101,7 @@ }, data () { return { + multi: "false", disablecol:false, num:0, model:{ @@ -126,8 +127,11 @@ projectId: [ { required: true, message: '请输入项目!'}, ], - typeId: [ - { required: true, message: '请输入类型!'}, + // typeId: [ + // { required: true, message: '请输入类型!'}, + // ], + typeName: [ + { required: true, message: '请输入!'}, ], /* upperId: [ { required: true, message: '请输入上级需求!'}, From 5fc6b94f6bb831a6e23408cc26b896be03a7a38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B1=E5=B1=8B?= <3180483789@qq.com> Date: Tue, 11 Jul 2023 18:16:23 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E9=9C=80=E6=B1=82=E6=9B=B4=E6=96=B02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../requirementitem/modules/RequirementItemForm.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue index 4b38260..c5cf02f 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue @@ -101,10 +101,10 @@ }, data () { return { - multi: "false", - disablecol:false, - num:0, - model:{ + multi: false, + disablecol: false, + num: 0, + model: { }, labelCol: { xs: { span: 23 }, @@ -131,7 +131,7 @@ // { required: true, message: '请输入类型!'}, // ], typeName: [ - { required: true, message: '请输入!'}, + { required: true, message: '请选择类型!'}, ], /* upperId: [ { required: true, message: '请输入上级需求!'}, From a7c2c3bc82bed52a63429639c09f12083c00fb0b Mon Sep 17 00:00:00 2001 From: shiji <1913712590@qq.com> Date: Tue, 11 Jul 2023 19:01:13 +0800 Subject: [PATCH 14/17] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E5=92=8C=E5=9B=BE=E7=89=87=E4=B8=8D=E8=83=BD=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant-design-vue-jeecg/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ant-design-vue-jeecg/public/index.html b/ant-design-vue-jeecg/public/index.html index d99759e..2ffd6a0 100644 --- a/ant-design-vue-jeecg/public/index.html +++ b/ant-design-vue-jeecg/public/index.html @@ -268,7 +268,7 @@