认证-上报库-版本,备注,操作记录

This commit is contained in:
liyawei
2022-12-02 18:13:40 +08:00
parent 27a1ab3231
commit a1cd591f78
16 changed files with 598 additions and 4 deletions
@@ -50,6 +50,9 @@ public class ParamsCollectManifestEO extends ParamsCollectManifestBaseEO impleme
@ApiModelProperty(value = "同步上报库时间")
private Date reportTime;
@ApiModelProperty(value = "版本")
private Integer version;
@TableField(exist = false)
private String userTypes;
@@ -31,4 +31,7 @@ public class ParamsCollectManifestHistoryEO extends ParamsCollectManifestBaseEO
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "同步上报库时间")
private Date reportTime;
@ApiModelProperty(value = "版本")
private Integer version;
}
@@ -31,6 +31,7 @@
<result column="add_flag" property="addFlag" />
<result column="title_default_value" property="titleDefaultValue" />
<result column="report_time" property="reportTime" />
<result column="version" property="version" />
</resultMap>
<sql id="BaseQuerySql">
<where>
@@ -28,6 +28,7 @@
<result column="params_manifest_id" property="paramsManifestId" />
<result column="title_default_value" property="titleDefaultValue" />
<result column="report_time" property="reportTime" />
<result column="version" property="version" />
</resultMap>
<sql id="BaseQuerySql">
<where>
@@ -184,6 +184,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
target.setDelFlag(CollectManifestChangeFlagEnum.DELETE_BEFORE.getValue()); // 设置删除标识
target.setAddFlag(CollectManifestChangeFlagEnum.ADD_AFTER.getValue()); // 设置添加标识
target.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue()); // 设置变更标识
target.setVersion(1); // 设置参数项初始版本为 1
Date date = new Date();
target.setCreateBy(user.getUsername());
@@ -138,6 +138,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
target.setDelFlag(CollectManifestChangeFlagEnum.DELETE_BEFORE.getValue()); // 设置删除标识
target.setAddFlag(CollectManifestChangeFlagEnum.ADD_BEFORE.getValue()); // 设置添加标识
target.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue()); // 设置变更标识
target.setVersion(1); // 设置参数项初始版本为 1
if (!ControlTypeEnum.Title.getValue().equals(source.getControlType())) {
@@ -644,6 +645,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
addCollectManifestEO.setId(addCollectManifestId);
addCollectManifestEO.setParamsManifestId(addManifestId);
addCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue());
addCollectManifestEO.setVersion(1);
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectVersionId, addCollectManifestEO.getDutyTerritory());
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
@@ -0,0 +1,169 @@
package com.jero.modules.cert.report.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.modules.cert.report.entity.ParamsReportDetailLogEO;
import com.jero.modules.cert.report.service.IParamsReportDetailLogEOService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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 javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
* @Description: 上报库参数项操作日志
* @Author: jero-boot
* @Date: 2022-12-01
* @Version: V1.0
*/
@Api(tags="上报库参数项操作日志")
@RestController
@RequestMapping("/report/detailLog")
@Slf4j
public class ParamsReportDetailLogEOController extends JeroController<ParamsReportDetailLogEO, IParamsReportDetailLogEOService> {
@Autowired
private IParamsReportDetailLogEOService paramsReportDetailLogEOService;
/**
* 分页列表查询
*
* @param
* @param pageNo
* @param pageSize
* @param
* @return
*/
@AutoLog(value = "上报库参数项操作日志-分页列表查询")
@ApiOperation(value="上报库参数项操作日志-分页列表查询", notes="上报库参数项操作日志-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(@RequestParam(name="paramsReportDetailId") String paramsReportDetailId,
@RequestParam(name="cut") String cut,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
IPage page = new Page(pageNo, pageSize);
IPage<ParamsReportDetailLogEO> pageList = paramsReportDetailLogEOService.queryPage(page, cut, paramsReportDetailId);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "上报库参数项操作日志-列表查询")
@ApiOperation(value="上报库参数项操作日志-列表查询", notes="上报库参数项操作日志-列表查询")
@GetMapping(value = "/list")
public Result<List<ParamsReportDetailLogEO>> queryList() {
// List<ParamsReportDetailLogEO> list = paramsReportDetailLogEOService.queryList();
// return Result.OK(list);
return Result.OK();
}
/**
* 添加
*
* @param paramsReportDetailLogEO
* @return
*/
@AutoLog(value = "上报库参数项操作日志-添加")
@ApiOperation(value="上报库参数项操作日志-添加", notes="上报库参数项操作日志-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody ParamsReportDetailLogEO paramsReportDetailLogEO) {
paramsReportDetailLogEOService.add(paramsReportDetailLogEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param paramsReportDetailLogEO
* @return
*/
@AutoLog(value = "上报库参数项操作日志-编辑")
@ApiOperation(value="上报库参数项操作日志-编辑", notes="上报库参数项操作日志-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody ParamsReportDetailLogEO paramsReportDetailLogEO) {
paramsReportDetailLogEOService.editById(paramsReportDetailLogEO);
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) {
paramsReportDetailLogEOService.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.paramsReportDetailLogEOService.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) {
ParamsReportDetailLogEO paramsReportDetailLogEO = paramsReportDetailLogEOService.queryById(id);
if(paramsReportDetailLogEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(paramsReportDetailLogEO);
}
/**
* 导出excel
*
* @param request
* @param paramsReportDetailLogEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ParamsReportDetailLogEO paramsReportDetailLogEO) {
return super.exportXls(request, paramsReportDetailLogEO, ParamsReportDetailLogEO.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, ParamsReportDetailLogEO.class);
}
}
@@ -35,4 +35,9 @@ public class ParamsReportDetailEO extends ParamsCollectManifestBaseEO implements
@ApiModelProperty(value = "同步时间")
private java.util.Date syncTime;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "版本")
private Integer version;
}
@@ -0,0 +1,88 @@
package com.jero.modules.cert.report.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: 2022-12-01
* @Version: V1.0
*/
@Data
@TableName("params_report_detail_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="params_report_detail_log对象", description="上报库参数项操作日志")
public class ParamsReportDetailLogEO 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 logCnContent;
/**英文内容*/
@Excel(name = "英文内容", width = 15)
@ApiModelProperty(value = "英文内容")
private java.lang.String logEnContent;
/**上报库id*/
@Excel(name = "上报库id", width = 15)
@ApiModelProperty(value = "上报库id")
private java.lang.String paramsReportId;
/**上报库参数项id*/
@Excel(name = "上报库参数项id", width = 15)
@ApiModelProperty(value = "上报库参数项id")
private java.lang.String paramsReportDetailId;
@TableField(exist = false)
private String logContent;
}
@@ -0,0 +1,24 @@
package com.jero.modules.cert.report.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jero.modules.cert.report.entity.ParamsReportDetailLogEO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Description: 上报库参数项操作日志
* @Author: jero-boot
* @Date: 2022-12-01
* @Version: V1.0
*/
public interface ParamsReportDetailLogEOMapper extends BaseMapper<ParamsReportDetailLogEO> {
List<ParamsReportDetailLogEO> listByReportIdOrReportDetailId (@Param("paramsReportId") String paramsReportId,
@Param("paramsReportDetailId") String paramsReportDetailId);
IPage pageInfo (@Param("page") IPage page,
@Param("paramsReportDetailId") String paramsReportDetailId,
@Param("cut") String cut);
}
@@ -28,6 +28,8 @@
<result column="params_manifest_id" property="paramsManifestId" />
<result column="sync_time" property="syncTime" />
<result column="title_default_value" property="titleDefaultValue" />
<result column="remarks" property="remarks" />
<result column="version" property="version" />
</resultMap>
<sql id="BaseQuerySql">
@@ -0,0 +1,43 @@
<?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.cert.report.mapper.ParamsReportDetailLogEOMapper">
<resultMap id="ParamsReportDetailLogEOResultMap" type="com.jero.modules.cert.report.entity.ParamsReportDetailLogEO">
<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="log_cn_content" property="logCnContent" />
<result column="log_en_content" property="logEnContent" />
<result column="params_report_id" property="paramsReportId" />
<result column="params_report_detail_id" property="paramsReportDetailId" />
<result column="log_Content" property="logContent" />
</resultMap>
<select id="listByReportIdOrReportDetailId" resultMap="ParamsReportDetailLogEOResultMap">
select *
from params_report_detail_log
where 1=1
<if test="paramsReportId !=null and paramsReportId !=''">
AND params_report_id = #{paramsReportId}
</if>
<if test="paramsReportDetailId !=null and paramsReportDetailId !=''">
AND params_report_detail_id = #{paramsReportDetailId}
</if>
</select>
<select id="pageInfo" resultMap="ParamsReportDetailLogEOResultMap">
select id, create_time, create_by, params_report_id, params_report_detail_id,
<if test="cut == 'cn'">
log_cn_content as log_Content
</if>
<if test="cut == 'en'">
log_en_content as log_Content
</if>
from params_report_detail_log
where params_report_detail_id = #{paramsReportDetailId}
order by create_time desc
</select>
</mapper>
@@ -0,0 +1,68 @@
package com.jero.modules.cert.report.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.cert.report.entity.ParamsReportDetailLogEO;
import java.util.List;
/**
* @Description: 上报库参数项操作日志
* @Author: jero-boot
* @Date: 2022-12-01
* @Version: V1.0
*/
public interface IParamsReportDetailLogEOService extends IService<ParamsReportDetailLogEO> {
/**
* 保存
*
* @param paramsReportDetailLogEO
* @return
*/
void add(ParamsReportDetailLogEO paramsReportDetailLogEO);
/**
* 更新
*
* @param paramsReportDetailLogEO
* @return
*/
void editById(ParamsReportDetailLogEO paramsReportDetailLogEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
ParamsReportDetailLogEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<ParamsReportDetailLogEO> queryList(String paramsReportId,
String paramsReportDetailId);
IPage queryPage(IPage page,
String cut,
String paramsReportDetailId);
}
@@ -11,6 +11,7 @@ import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.ModuleEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.oss.CosBootUtil;
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
@@ -44,6 +45,7 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.usermodel.*;
import org.apache.shiro.SecurityUtils;
import org.aspectj.util.FileUtil;
import org.docx4j.Docx4J;
import org.docx4j.openpackaging.exceptions.Docx4JException;
@@ -79,6 +81,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
@Autowired
private ParamsReportDetailEOMapper paramsReportDetailEOMapper;
@Autowired
private IParamsReportDetailEOService paramsReportDetailEOService;
@Autowired
private OnlCgformFieldServiceImpl onlCgformFieldService;
@@ -100,6 +105,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
@Autowired
private IParamsExportTemplateEOService paramsExportTemplateEOService;
@Autowired
private IParamsReportDetailLogEOService paramsReportDetailLogEOService;
@Value(value = "${jero.path.upload}")
private String uploadpath;
@@ -169,6 +177,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
String stateName = collectManifestStateMap.get(collectManifestEO.getState());
collectManifestEO.setState(stateName);
// 处理版本字段
if (ObjectUtil.isEmpty(collectManifestEO.getVersion())) {
collectManifestEO.setVersion(1);
}
List<String> configIdList = new ArrayList<>(); // 配置列名
Map<String, Object> manifestMap = objectToMap(collectManifestEO); // 对象转map
@@ -535,6 +548,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if ("sdt".equals(dbFieldName)) {
map.put("click", true);
}
if ("remarks".equals(dbFieldName)) {
map.put("click3", true);
}
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));
if(CutEnum.CN.getValue().equals(cut)){
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
@@ -545,6 +561,14 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
}
list.addAll(indexOfDescription+1, listConfig);
Map<String, Object> map = new HashMap<>();
if(CutEnum.CN.getValue().equals(cut)){
map.put("db_field_txt","操作");
}else{
map.put("db_field_txt","操作");
}
map.put("click4", true);
list.add(map);
return list;
}
@@ -1557,9 +1581,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
@Override
public boolean save(List<Map<String, Object>> configDataList, String paramsManifestId) {
List<ParamsReportConfigDataEO> newConfigDataEOList = new ArrayList<>();
List<ParamsReportDetailEO> updateDetailEOList = new ArrayList<>();
List<ParamsReportDetailLogEO> insertLogEOList = new ArrayList<>();
List<ParamsReportConfigEO> paramsReportConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); // 查询配置列
List<String> paramsReportConfigIdList = paramsReportConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
List<ParamsReportConfigDataEO> paramsReportConfigDataEOList = paramsReportConfigDataEOService.queryListByConfigIdList(paramsReportConfigIdList); // 查询所有配置数据
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// 处理数据
for (Map<String, Object> map : configDataList) {
@@ -1567,13 +1594,25 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
// 添加配置数据
for (Map.Entry<String, Object> entry : map.entrySet()) {
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
if ("id".equals(entry.getKey())) {
continue;
}
if ("remarks".equals(entry.getKey()) && StringUtils.isNotEmpty((String) entry.getValue())) {
ParamsReportDetailEO updateDEtailEO = new ParamsReportDetailEO();
updateDEtailEO.setId(paramsCollectManifestId);
updateDEtailEO.setRemarks((String) entry.getValue());
updateDetailEOList.add(updateDEtailEO);
continue;
}
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
// 操作记录
StringBuilder logCnContent = new StringBuilder();
StringBuilder logEnContent = new StringBuilder();
// 取值
String paramsReportConfigEOId = entry.getKey();
ParamsReportConfigEO paramsReportConfigEO = paramsReportConfigEOService.getById(paramsReportConfigEOId);
Map<String, Object> paramsReportConfigDataMap = (Map<String, Object>) entry.getValue();
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsReportConfigDataMap.get("list");
@@ -1582,8 +1621,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList);
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
}
logCnContent.append(loginUser.getUsername()).append("将").append(paramsReportConfigEO.getConfigName()).append("的");
logEnContent.append(loginUser.getUsername()).append(" set ").append(paramsReportConfigEO.getConfigName()).append(" from ");
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
if (CollectionUtil.isNotEmpty(configDataVOList)) {
@@ -1634,13 +1677,27 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
}
}
newConfigDataEOList.add(paramsReportConfigDataEO);
ParamsReportDetailLogEO insertLogEO = new ParamsReportDetailLogEO();
insertLogEO.setLogCnContent(logCnContent.toString());
insertLogEO.setLogEnContent(logEnContent.toString());
insertLogEO.setParamsReportId(paramsManifestId);
insertLogEO.setParamsReportDetailId(paramsCollectManifestId);
insertLogEOList.add(insertLogEO);
}
}
// 批量更新
if (CollectionUtil.isNotEmpty(updateDetailEOList)) {
paramsReportDetailEOService.updateBatchById(updateDetailEOList);
}
if (CollectionUtil.isNotEmpty(insertLogEOList)) {
paramsReportDetailLogEOService.saveBatch(insertLogEOList);
}
return paramsReportConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
}
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList) {
List<ParamsReportConfigDataEO> configDataEOList = paramsReportConfigDataEOList.stream()
.filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId()))
@@ -0,0 +1,99 @@
package com.jero.modules.cert.report.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.modules.cert.report.entity.ParamsReportDetailLogEO;
import com.jero.modules.cert.report.mapper.ParamsReportDetailLogEOMapper;
import com.jero.modules.cert.report.service.IParamsReportDetailLogEOService;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* @Description: 上报库参数项操作日志
* @Author: jero-boot
* @Date: 2022-12-01
* @Version: V1.0
*/
@Service
public class ParamsReportDetailLogEOServiceImpl extends ServiceImpl<ParamsReportDetailLogEOMapper, ParamsReportDetailLogEO> implements IParamsReportDetailLogEOService {
/**
* 保存
*
* @param paramsReportDetailLogEO
* @return
*/
@Override
public void add(ParamsReportDetailLogEO paramsReportDetailLogEO) {
Date now = new Date();
paramsReportDetailLogEO.setCreateTime(now);
paramsReportDetailLogEO.setUpdateTime(now);
save(paramsReportDetailLogEO);
}
/**
* 更新
*
* @param paramsReportDetailLogEO
* @return
*/
@Override
public void editById(ParamsReportDetailLogEO paramsReportDetailLogEO) {
Date now = new Date();
paramsReportDetailLogEO.setUpdateTime(now);
saveOrUpdate(paramsReportDetailLogEO);
}
/**
* 通过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 ParamsReportDetailLogEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<ParamsReportDetailLogEO> queryList(String paramsReportId,
String paramsReportDetailId) {
return this.baseMapper.listByReportIdOrReportDetailId(paramsReportId, paramsReportDetailId);
}
@Override
public IPage queryPage(IPage page,
String cut,
String paramsReportDetailId) {
return this.baseMapper.pageInfo(page, paramsReportDetailId, cut);
}
}