问题管理-基础代码生成
This commit is contained in:
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.project.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.project.entity.ProblemManagementEO;
|
||||
import com.jero.modules.project.service.IProblemManagementEOService;
|
||||
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 com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题管理")
|
||||
@RestController
|
||||
@RequestMapping("/project/problemManagementEO")
|
||||
@Slf4j
|
||||
public class ProblemManagementEOController extends JeroController<ProblemManagementEO, IProblemManagementEOService> {
|
||||
@Autowired
|
||||
private IProblemManagementEOService problemManagementEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemManagementEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题管理-分页列表查询")
|
||||
@ApiOperation(value="问题管理-分页列表查询", notes="问题管理-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemManagementEO problemManagementEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemManagementEO> queryWrapper = QueryGenerator.initQueryWrapper(problemManagementEO, req.getParameterMap());
|
||||
Page<ProblemManagementEO> page = new Page<ProblemManagementEO>(pageNo, pageSize);
|
||||
IPage<ProblemManagementEO> pageList = problemManagementEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题管理-列表查询")
|
||||
@ApiOperation(value="问题管理-列表查询", notes="问题管理-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemManagementEO>> queryList() {
|
||||
List<ProblemManagementEO> list = problemManagementEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemManagementEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题管理-添加")
|
||||
@ApiOperation(value="问题管理-添加", notes="问题管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemManagementEO problemManagementEO) {
|
||||
problemManagementEOService.add(problemManagementEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemManagementEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题管理-编辑")
|
||||
@ApiOperation(value="问题管理-编辑", notes="问题管理-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemManagementEO problemManagementEO) {
|
||||
problemManagementEOService.editById(problemManagementEO);
|
||||
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) {
|
||||
problemManagementEOService.deleteById(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.problemManagementEOService.deleteByIds(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) {
|
||||
ProblemManagementEO problemManagementEO = problemManagementEOService.queryById(id);
|
||||
if(problemManagementEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemManagementEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemManagementEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemManagementEO problemManagementEO) {
|
||||
return super.exportXls(request, problemManagementEO, ProblemManagementEO.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, ProblemManagementEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package com.jero.modules.project.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
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 com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_management")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_management对象", description="问题管理")
|
||||
public class ProblemManagementEO 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;
|
||||
|
||||
/**标题*/
|
||||
@Excel(name = "标题", width = 15)
|
||||
@ApiModelProperty(value = "标题")
|
||||
private java.lang.String title;
|
||||
|
||||
/**问题类型*/
|
||||
@Excel(name = "问题类型", width = 15)
|
||||
@ApiModelProperty(value = "问题类型")
|
||||
private java.lang.String problemType;
|
||||
|
||||
/**ps_issue*/
|
||||
@Excel(name = "ps_issue", width = 15)
|
||||
@ApiModelProperty(value = "ps_issue")
|
||||
private java.lang.String psIssue;
|
||||
|
||||
/**相关法规*/
|
||||
@Excel(name = "相关法规", width = 15)
|
||||
@ApiModelProperty(value = "相关法规")
|
||||
private java.lang.String lawsId;
|
||||
|
||||
/**相关项目*/
|
||||
@Excel(name = "相关项目", width = 15)
|
||||
@ApiModelProperty(value = "相关项目")
|
||||
private java.lang.String projectId;
|
||||
|
||||
/**责任部门*/
|
||||
@Excel(name = "责任部门", width = 15)
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
private java.lang.String dutyTerritory;
|
||||
|
||||
/**问题状态*/
|
||||
@Excel(name = "问题状态", width = 15)
|
||||
@ApiModelProperty(value = "问题状态")
|
||||
private java.lang.String problemState;
|
||||
|
||||
/**描述和分析*/
|
||||
@Excel(name = "描述和分析", width = 15)
|
||||
@ApiModelProperty(value = "描述和分析")
|
||||
private java.lang.String description;
|
||||
|
||||
/**相关文件链接*/
|
||||
@Excel(name = "相关文件链接", width = 15)
|
||||
@ApiModelProperty(value = "相关文件链接")
|
||||
private java.lang.String fileLink;
|
||||
|
||||
/**相关文件*/
|
||||
@Excel(name = "相关文件", width = 15)
|
||||
@ApiModelProperty(value = "相关文件")
|
||||
private java.lang.String file;
|
||||
|
||||
/**进度追踪*/
|
||||
@Excel(name = "进度追踪", width = 15)
|
||||
@ApiModelProperty(value = "进度追踪")
|
||||
private java.lang.String progressTracking;
|
||||
|
||||
/**结论*/
|
||||
@Excel(name = "结论", width = 15)
|
||||
@ApiModelProperty(value = "结论")
|
||||
private java.lang.String conclusion;
|
||||
|
||||
/**审批证据*/
|
||||
@Excel(name = "审批证据", width = 15)
|
||||
@ApiModelProperty(value = "审批证据")
|
||||
private java.lang.String approvalEvidence;
|
||||
|
||||
/**审批证据链接*/
|
||||
@Excel(name = "审批证据链接", width = 15)
|
||||
@ApiModelProperty(value = "审批证据链接")
|
||||
private java.lang.String approvalEvidenceLink;
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.project.entity.ProblemManagementEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemManagementEOMapper extends BaseMapper<ProblemManagementEO> {
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.project.mapper.ProblemManagementEOMapper">
|
||||
<resultMap id="ProblemManagementEOResultMap" type="com.jero.modules.project.entity.ProblemManagementEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="title" property="title" />
|
||||
<result column="problem_type" property="problemType" />
|
||||
<result column="ps_issue" property="psIssue" />
|
||||
<result column="laws_id" property="lawsId" />
|
||||
<result column="project_id" property="projectId" />
|
||||
<result column="duty_territory" property="dutyTerritory" />
|
||||
<result column="problem_state" property="problemState" />
|
||||
<result column="description" property="description" />
|
||||
<result column="file_link" property="fileLink" />
|
||||
<result column="file" property="file" />
|
||||
<result column="progress_tracking" property="progressTracking" />
|
||||
<result column="conclusion" property="conclusion" />
|
||||
<result column="approval_evidence" property="approvalEvidence" />
|
||||
<result column="approval_evidence_link" property="approvalEvidenceLink" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.project.service;
|
||||
|
||||
import com.jero.modules.project.entity.ProblemManagementEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 问题管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProblemManagementEOService extends IService<ProblemManagementEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemManagementEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProblemManagementEO problemManagementEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemManagementEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProblemManagementEO problemManagementEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProblemManagementEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProblemManagementEO> queryList();
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.jero.modules.project.entity.ProblemManagementEO;
|
||||
import com.jero.modules.project.mapper.ProblemManagementEOMapper;
|
||||
import com.jero.modules.project.service.IProblemManagementEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 问题管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProblemManagementEOServiceImpl extends ServiceImpl<ProblemManagementEOMapper, ProblemManagementEO> implements IProblemManagementEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemManagementEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProblemManagementEO problemManagementEO) {
|
||||
Date now = new Date();
|
||||
problemManagementEO.setCreateTime(now);
|
||||
problemManagementEO.setUpdateTime(now);
|
||||
save(problemManagementEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemManagementEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProblemManagementEO problemManagementEO) {
|
||||
Date now = new Date();
|
||||
problemManagementEO.setUpdateTime(now);
|
||||
saveOrUpdate(problemManagementEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProblemManagementEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProblemManagementEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user