From a1cd591f786a6860e29da44246f1a46e7ac08a49 Mon Sep 17 00:00:00 2001 From: liyawei Date: Fri, 2 Dec 2022 18:13:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E4=B8=8A=E6=8A=A5=E5=BA=93-?= =?UTF-8?q?=E7=89=88=E6=9C=AC,=E5=A4=87=E6=B3=A8,=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-boot/db/蔚来标准sql/dev_2nd_period.sql | 32 +++- .../entity/ParamsCollectManifestEO.java | 3 + .../ParamsCollectManifestHistoryEO.java | 3 + .../xml/ParamsCollectManifestEOMapper.xml | 1 + .../ParamsCollectManifestHistoryEOMapper.xml | 1 + .../ParamsCollectManifestEOServiceImpl.java | 1 + .../impl/ParamsManifestEOServiceImpl.java | 2 + .../ParamsReportDetailLogEOController.java | 169 ++++++++++++++++++ .../report/entity/ParamsReportDetailEO.java | 5 + .../entity/ParamsReportDetailLogEO.java | 88 +++++++++ .../mapper/ParamsReportDetailLogEOMapper.java | 24 +++ .../mapper/xml/ParamsReportDetailEOMapper.xml | 2 + .../xml/ParamsReportDetailLogEOMapper.xml | 43 +++++ .../IParamsReportDetailLogEOService.java | 68 +++++++ .../impl/ParamsReportDetailEOServiceImpl.java | 61 ++++++- .../ParamsReportDetailLogEOServiceImpl.java | 99 ++++++++++ 16 files changed, 598 insertions(+), 4 deletions(-) create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/controller/ParamsReportDetailLogEOController.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailLogEO.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailLogEOMapper.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailLogEOMapper.xml create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailLogEOService.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailLogEOServiceImpl.java diff --git a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql index 9f052808b..ce6eff01d 100644 --- a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql +++ b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql @@ -27,8 +27,36 @@ ALTER TABLE `laws_weilai`.`params_manifest_history` ADD COLUMN `project_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相关项目版本' AFTER `params_template_name`, ADD COLUMN `explanation` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '说明' AFTER `project_version`; --- 认证参数历史列表添加字段--------2022-11-23 未同步生产环境 +-- 认证参数 添加字段--------2022-11-23 已同步生产环境 ALTER TABLE `laws_weilai`.`params_manifest` ADD COLUMN `project_version_id` varchar(50) NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`; ALTER TABLE `laws_weilai`.`params_manifest_history` - ADD COLUMN `project_version_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`; \ No newline at end of file + ADD COLUMN `project_version_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`; + +-- 认证参数 添加字段--------2022-12-01 未同步生产环境 +ALTER TABLE `laws_weilai`.`params_report_detail` + ADD COLUMN `remarks` varchar(255) NULL COMMENT '备注' AFTER `title_default_value`; +ALTER TABLE `laws_weilai`.`params_report_detail` + ADD COLUMN `version` int(11) NULL COMMENT '变更版本' AFTER `remarks`; + +INSERT INTO `laws_weilai`.`onl_cgform_field`(`id`, `cgform_head_id`, `db_field_name`, `db_field_en_name`, `db_field_txt`, `order_num`, `db_field_name_old`, `db_is_key`, `db_is_null`, `db_type`, `db_length`, `db_point_length`, `db_default_val`, `dict_field`, `dict_table`, `dict_text`, `field_show_type`, `field_href`, `field_length`, `field_valid_type`, `field_must_input`, `field_extend_json`, `field_default_value`, `is_query`, `is_show_form`, `is_show_list`, `is_read_only`, `query_mode`, `main_table`, `main_field`, `update_by`, `update_time`, `create_time`, `create_by`, `converter`, `query_def_val`, `query_dict_text`, `query_dict_field`, `query_dict_table`, `query_show_type`, `query_config_flag`, `query_valid_type`, `query_must_input`, `sort_flag`, `show_area`, `is_show_laws_list`, `is_show_search`, `is_delete`, `is_model`, `dict_id`) VALUES ('ed44d35e43e9c4e4920ca434f06d3be8', '891a5f26e9224ddfb811441c1947d20e', 'version', 'Version', '版本', 21, NULL, 0, 1, 'int', 11, 0, '', '', '', '', 'text', '', 120, NULL, '0', '', '', 0, 0, 1, 0, 'single', '', '', 'admin', '2022-12-01 11:41:53', '2022-12-01 11:41:53', 'admin', '', '', '', '', '', 'text', '0', NULL, NULL, '0', NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `laws_weilai`.`onl_cgform_field`(`id`, `cgform_head_id`, `db_field_name`, `db_field_en_name`, `db_field_txt`, `order_num`, `db_field_name_old`, `db_is_key`, `db_is_null`, `db_type`, `db_length`, `db_point_length`, `db_default_val`, `dict_field`, `dict_table`, `dict_text`, `field_show_type`, `field_href`, `field_length`, `field_valid_type`, `field_must_input`, `field_extend_json`, `field_default_value`, `is_query`, `is_show_form`, `is_show_list`, `is_read_only`, `query_mode`, `main_table`, `main_field`, `update_by`, `update_time`, `create_time`, `create_by`, `converter`, `query_def_val`, `query_dict_text`, `query_dict_field`, `query_dict_table`, `query_show_type`, `query_config_flag`, `query_valid_type`, `query_must_input`, `sort_flag`, `show_area`, `is_show_laws_list`, `is_show_search`, `is_delete`, `is_model`, `dict_id`) VALUES ('3bdfa37f06666961213ebfcd94ec1381', '891a5f26e9224ddfb811441c1947d20e', 'remarks', 'Remarks', '备注', 22, NULL, 0, 1, 'string', 255, 0, '', '', '', '', 'text', '', 120, NULL, '0', '', '', 0, 0, 1, 0, 'single', '', '', 'admin', '2022-12-01 11:41:53', '2022-12-01 11:36:38', 'admin', '', '', '', '', '', 'text', '0', NULL, NULL, '0', NULL, NULL, NULL, 0, NULL, NULL); + +ALTER TABLE `laws_weilai`.`params_collect_manifest` + ADD COLUMN `version` int(11) NULL COMMENT '版本' AFTER `report_time`; +ALTER TABLE `laws_weilai`.`params_collect_manifest_history` + ADD COLUMN `version` int(11) NULL COMMENT '版本' AFTER `report_time`; + +CREATE TABLE `params_report_detail_log` ( + `id` varchar(36) NOT NULL, + `create_by` varchar(50) DEFAULT NULL COMMENT '创建人', + `create_time` datetime DEFAULT NULL COMMENT '创建日期', + `update_by` varchar(50) DEFAULT NULL COMMENT '更新人', + `update_time` datetime DEFAULT NULL COMMENT '更新日期', + `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门', + `log_cn_content` varchar(5000) DEFAULT NULL COMMENT '中文内容', + `log_en_content` varchar(5000) DEFAULT NULL COMMENT '英文内容', + `params_report_id` varchar(36) DEFAULT NULL COMMENT '上报库id', + `params_report_detail_id` varchar(36) DEFAULT NULL COMMENT '上报库参数项id', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestEO.java index 2dfe8f17f..ba0c48f8b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestEO.java @@ -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; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestHistoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestHistoryEO.java index 7a69ce97f..027aa1f2f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestHistoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestHistoryEO.java @@ -31,4 +31,7 @@ public class ParamsCollectManifestHistoryEO extends ParamsCollectManifestBaseEO @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "同步上报库时间") private Date reportTime; + + @ApiModelProperty(value = "版本") + private Integer version; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml index ff334e410..6eb7a798b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml @@ -31,6 +31,7 @@ + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml index e02a6edb6..7ad4d613a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml @@ -28,6 +28,7 @@ + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index 489859a09..f3f9377c0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -184,6 +184,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl { + @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 pageList = paramsReportDetailLogEOService.queryPage(page, cut, paramsReportDetailId); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "上报库参数项操作日志-列表查询") + @ApiOperation(value="上报库参数项操作日志-列表查询", notes="上报库参数项操作日志-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { +// List 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); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailEO.java index cba41a0d0..8529dc664 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailEO.java @@ -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; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailLogEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailLogEO.java new file mode 100644 index 000000000..0e78f1404 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportDetailLogEO.java @@ -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; + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailLogEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailLogEOMapper.java new file mode 100644 index 000000000..74a8a6ad2 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailLogEOMapper.java @@ -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 { + + List listByReportIdOrReportDetailId (@Param("paramsReportId") String paramsReportId, + @Param("paramsReportDetailId") String paramsReportDetailId); + + IPage pageInfo (@Param("page") IPage page, + @Param("paramsReportDetailId") String paramsReportDetailId, + @Param("cut") String cut); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml index b4f4de794..41e2db1c9 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml @@ -28,6 +28,8 @@ + + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailLogEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailLogEOMapper.xml new file mode 100644 index 000000000..80eb9ba71 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailLogEOMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailLogEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailLogEOService.java new file mode 100644 index 000000000..563544a45 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailLogEOService.java @@ -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 { + + /** + * 保存 + * + * @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 ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + ParamsReportDetailLogEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(String paramsReportId, + String paramsReportDetailId); + + IPage queryPage(IPage page, + String cut, + String paramsReportDetailId); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java index d53ae54b0..6c6eba91c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java @@ -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 configIdList = new ArrayList<>(); // 配置列名 Map manifestMap = objectToMap(collectManifestEO); // 对象转map @@ -535,6 +548,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl 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> configDataList, String paramsManifestId) { List newConfigDataEOList = new ArrayList<>(); + List updateDetailEOList = new ArrayList<>(); + List insertLogEOList = new ArrayList<>(); List paramsReportConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); // 查询配置列 List paramsReportConfigIdList = paramsReportConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList()); List paramsReportConfigDataEOList = paramsReportConfigDataEOService.queryListByConfigIdList(paramsReportConfigIdList); // 查询所有配置数据 + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 处理数据 for (Map map : configDataList) { @@ -1567,13 +1594,25 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl 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 paramsReportConfigDataMap = (Map) entry.getValue(); // 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO) List> configDataVOList = (List>) paramsReportConfigDataMap.get("list"); @@ -1582,8 +1621,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl paramsReportConfigDataEOList) { List configDataEOList = paramsReportConfigDataEOList.stream() .filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId())) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailLogEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailLogEOServiceImpl.java new file mode 100644 index 000000000..c46e7fbde --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailLogEOServiceImpl.java @@ -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 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 ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public ParamsReportDetailLogEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List 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); + } +}