项目库-认证清单-修改历史开发。

This commit is contained in:
wangzhijiang
2023-03-13 16:09:15 +08:00
parent eba335c5de
commit c0f48f4e28
7 changed files with 472 additions and 0 deletions
@@ -339,3 +339,17 @@ ALTER TABLE `auth_dummy_inventory_info`
-- 项目库-认证清单 修改交付物类型字段长度 2023-03-13 未同步生产环境
ALTER TABLE `project_certification_inventory`
MODIFY COLUMN `deliverable_type` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交付物类型' AFTER `duty_person`;
-- 项目库-认证清单-修改历史表 2023-03-13 未同步生产环境
CREATE TABLE `project_certification_inventory_log` (
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
`content_cn` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作内容-中文',
`content_en` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作内容-英文',
`project_certification_inventory_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '认证清单数据id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目库-认证清单-修改历史表' ROW_FORMAT = Dynamic;
@@ -0,0 +1,171 @@
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.ProjectCertificationInventoryLogEO;
import com.jero.modules.project.service.IProjectCertificationInventoryLogEOService;
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-03-13
* @Version: V1.0
*/
@Api(tags="项目库-认证清单-修改历史表")
@RestController
@RequestMapping("/project/projectCertificationInventoryLogEO")
@Slf4j
public class ProjectCertificationInventoryLogEOController extends JeroController<ProjectCertificationInventoryLogEO, IProjectCertificationInventoryLogEOService> {
@Autowired
private IProjectCertificationInventoryLogEOService projectCertificationInventoryLogEOService;
/**
* 分页列表查询
*
* @param projectCertificationInventoryLogEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "项目库-认证清单-修改历史表-分页列表查询")
@ApiOperation(value="项目库-认证清单-修改历史表-分页列表查询", notes="项目库-认证清单-修改历史表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ProjectCertificationInventoryLogEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryLogEO, req.getParameterMap());
Page<ProjectCertificationInventoryLogEO> page = new Page<ProjectCertificationInventoryLogEO>(pageNo, pageSize);
queryWrapper.orderByDesc("create_time");
IPage<ProjectCertificationInventoryLogEO> pageList = projectCertificationInventoryLogEOService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "项目库-认证清单-修改历史表-列表查询")
@ApiOperation(value="项目库-认证清单-修改历史表-列表查询", notes="项目库-认证清单-修改历史表-列表查询")
@GetMapping(value = "/list")
public Result<List<ProjectCertificationInventoryLogEO>> queryList(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO,HttpServletRequest req) {
List<ProjectCertificationInventoryLogEO> list = projectCertificationInventoryLogEOService.queryList(projectCertificationInventoryLogEO,req);
return Result.OK(list);
}
/**
* 添加
*
* @param projectCertificationInventoryLogEO
* @return
*/
@AutoLog(value = "项目库-认证清单-修改历史表-添加")
@ApiOperation(value="项目库-认证清单-修改历史表-添加", notes="项目库-认证清单-修改历史表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO) {
projectCertificationInventoryLogEOService.add(projectCertificationInventoryLogEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param projectCertificationInventoryLogEO
* @return
*/
@AutoLog(value = "项目库-认证清单-修改历史表-编辑")
@ApiOperation(value="项目库-认证清单-修改历史表-编辑", notes="项目库-认证清单-修改历史表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO) {
projectCertificationInventoryLogEOService.editById(projectCertificationInventoryLogEO);
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) {
projectCertificationInventoryLogEOService.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.projectCertificationInventoryLogEOService.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) {
ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = projectCertificationInventoryLogEOService.queryById(id);
if(projectCertificationInventoryLogEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(projectCertificationInventoryLogEO);
}
/**
* 导出excel
*
* @param request
* @param projectCertificationInventoryLogEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO) {
return super.exportXls(request, projectCertificationInventoryLogEO, ProjectCertificationInventoryLogEO.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, ProjectCertificationInventoryLogEO.class);
}
}
@@ -0,0 +1,86 @@
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.TableField;
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-03-13
* @Version: V1.0
*/
@Data
@TableName("project_certification_inventory_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="project_certification_inventory_log对象", description="项目库-认证清单-修改历史表")
public class ProjectCertificationInventoryLogEO 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 contentCn;
/**操作内容-英文*/
@Excel(name = "操作内容-英文", width = 15)
@ApiModelProperty(value = "操作内容-英文")
private java.lang.String contentEn;
/**认证清单数据id*/
@Excel(name = "认证清单数据id", width = 15)
@ApiModelProperty(value = "认证清单数据id")
private java.lang.String projectCertificationInventoryId;
@TableField(exist = false)
private String cut;
/**操作内容回显**/
@TableField(exist = false)
private String content;
}
@@ -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.ProjectCertificationInventoryLogEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 项目库-认证清单-修改历史表
* @Author: jero-boot
* @Date: 2023-03-13
* @Version: V1.0
*/
public interface ProjectCertificationInventoryLogEOMapper extends BaseMapper<ProjectCertificationInventoryLogEO> {
}
@@ -0,0 +1,14 @@
<?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.ProjectCertificationInventoryLogEOMapper">
<resultMap id="ProjectCertificationInventoryLogEOResultMap" type="com.jero.modules.project.entity.ProjectCertificationInventoryLogEO">
<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="content" property="content" />
<result column="project_certification_inventory_id" property="projectCertificationInventoryId" />
</resultMap>
</mapper>
@@ -0,0 +1,69 @@
package com.jero.modules.project.service;
import com.jero.modules.project.entity.ProjectCertificationInventoryLogEO;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @Description: 项目库-认证清单-修改历史表
* @Author: jero-boot
* @Date: 2023-03-13
* @Version: V1.0
*/
public interface IProjectCertificationInventoryLogEOService extends IService<ProjectCertificationInventoryLogEO> {
/**
* 保存
*
* @param projectCertificationInventoryLogEO
* @return
*/
void add(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO);
/**
* 更新
*
* @param projectCertificationInventoryLogEO
* @return
*/
void editById(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
ProjectCertificationInventoryLogEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<ProjectCertificationInventoryLogEO> queryList(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO, HttpServletRequest req);
/**
* 批量添加认证清单明细操作历史信息
* @param projectCertificationInventoryLogEOList
*/
void insertBatch(List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList);
}
@@ -0,0 +1,101 @@
package com.jero.modules.project.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ProjectCertificationInventoryLogEO;
import com.jero.modules.project.mapper.ProjectCertificationInventoryLogEOMapper;
import com.jero.modules.project.service.IProjectCertificationInventoryLogEOService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest;
/**
* @Description: 项目库-认证清单-修改历史表
* @Author: jero-boot
* @Date: 2023-03-13
* @Version: V1.0
*/
@Service
public class ProjectCertificationInventoryLogEOServiceImpl extends ServiceImpl<ProjectCertificationInventoryLogEOMapper, ProjectCertificationInventoryLogEO> implements IProjectCertificationInventoryLogEOService {
/**
* 保存
*
* @param projectCertificationInventoryLogEO
* @return
*/
@Override
public void add(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO) {
Date now = new Date();
projectCertificationInventoryLogEO.setCreateTime(now);
projectCertificationInventoryLogEO.setUpdateTime(now);
save(projectCertificationInventoryLogEO);
}
/**
* 更新
*
* @param projectCertificationInventoryLogEO
* @return
*/
@Override
public void editById(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO) {
Date now = new Date();
projectCertificationInventoryLogEO.setUpdateTime(now);
saveOrUpdate(projectCertificationInventoryLogEO);
}
/**
* 通过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 ProjectCertificationInventoryLogEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<ProjectCertificationInventoryLogEO> queryList(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO, HttpServletRequest req) {
QueryWrapper<ProjectCertificationInventoryLogEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryLogEO, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = this.list(queryWrapper);
return projectCertificationInventoryLogEOList;
}
@Override
public void insertBatch(List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList) {
this.saveBatch(projectCertificationInventoryLogEOList);
}
}