From 81ecf23eaf7cc1e1f61710171012fd2612e1befe Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 11 Jul 2023 17:14:46 +0800 Subject: [PATCH] =?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 { + +}