diff --git a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql index 9f052808b..09553a281 100644 --- a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql +++ b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql @@ -27,8 +27,50 @@ 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; + +ALTER TABLE `laws_weilai`.`params_collect_manifest` + ADD COLUMN `references_col` varchar(5000) NULL COMMENT '参考列' AFTER `version`; + +ALTER TABLE `laws_weilai`.`params_collect_manifest_history` + ADD COLUMN `references_col` varchar(5000) NULL COMMENT '参考列' AFTER `version`; +ALTER TABLE `laws_weilai`.`params_manifest` + ADD COLUMN `references_col_name` varchar(255) NULL COMMENT '参数项清单的参考列名称' AFTER `project_version_id`; + +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 ('a183d186bc94f0db002bbb070017f14c', '9ca1773d2a484d2fadae38491ad51aa1', 'references_col', 'References Column', '参考列', 14, NULL, 0, 1, 'string', 500, 0, '', '', '', '', 'text', '', 120, NULL, '0', '', '', 0, 0, 1, 0, 'single', '', '', NULL, NULL, '2022-12-06 14:29:12', 'admin', '', '', '', '', '', 'text', '0', NULL, NULL, '0', NULL, NULL, NULL, 0, '7', NULL); +ALTER TABLE `laws_weilai`.`params_manifest_history` + ADD COLUMN `references_col_name` varchar(255) NULL COMMENT '参数项清单的参考列名称' AFTER `project_version_id`; +ALTER TABLE `laws_weilai`.`params_info_publish` + CHANGE COLUMN `version` `publish_version` int(11) NULL DEFAULT NULL COMMENT '发布时版本' AFTER `params_template_id`; \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java index d7e034acc..7bcd40a3e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java @@ -56,9 +56,10 @@ public class ParamsCollectManifestEOController extends JeroController>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId, + @RequestParam(name = "projectName") String projectName, @RequestParam(name = "flag") String flag, @RequestParam(name = "cut") String cut) { - List> list = paramsCollectManifestEOService.getHeader(paramsManifestId, flag, cut); + List> list = paramsCollectManifestEOService.getHeader(paramsManifestId, flag, cut, projectName); return Result.OK(list); } @@ -71,7 +72,7 @@ public class ParamsCollectManifestEOController extends JeroController queryList(ParamsCollectManifestEO paramsCollectManifestEO, + public Result queryList(ParamsCollectManifestVO paramsCollectManifestVO, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="100") Integer pageSize, @RequestParam(name = "cut") String cut, @@ -87,7 +88,7 @@ public class ParamsCollectManifestEOController extends JeroController addReferencesCol(@RequestParam(value = "paramsManifestId") String paramsManifestId, + @RequestParam(value = "paramsReportId") String paramsReportId, + @RequestParam(value = "paramsReportConfigId") String paramsReportConfigId, + @RequestParam(value = "paramsReportConfigName") String paramsReportConfigName) { + boolean isSuccess = paramsCollectManifestEOService.addReferencesCol(paramsManifestId, paramsReportId, paramsReportConfigId, paramsReportConfigName); + if (isSuccess) { + return Result.OK("引用参考列成功!"); + } else { + return Result.error("引用参考列失败!"); + } + } + + /** + * 认证工程师-更新参考列 + * + * @param paramsCollectManifestVO + * @return + */ + @AutoLog(value = "参数项收集清单-认证工程师-更新参考列") + @ApiOperation(value="参数项收集清单-认证工程师-更新参考列", notes="参数项收集清单-认证工程师-更新参考列") + @PostMapping(value = "/updateReferencesCol") +// @RequiresPermissions("params:collectManifest:save") + public Result updateReferencesCol(@RequestBody ParamsCollectManifestVO paramsCollectManifestVO) { + boolean isSuccess = paramsCollectManifestEOService.updateReferencesCol(paramsCollectManifestVO.getConfigDataList(), paramsCollectManifestVO.getParamsManifestId()); + if (isSuccess) { + return Result.OK("更新参考列成功!"); + } else { + return Result.error("更新参考列失败!"); + } + } + @@ -609,4 +652,16 @@ public class ParamsCollectManifestEOController extends JeroController mandatoryWithdraw(ParamsCollectManifestVO paramsCollectManifestVO) { + return this.paramsCollectManifestEOService.mandatoryWithdraw(paramsCollectManifestVO); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsManifestEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsManifestEOController.java index e0fb98bcf..15f45239e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsManifestEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsManifestEOController.java @@ -231,7 +231,8 @@ public class ParamsManifestEOController extends JeroController changeExtension(@RequestParam(name="id",required=true) String id, @RequestParam(name="cut",required=true) String cut) { + public Result changeExtension(@RequestParam(name="id",required=true) String id, + @RequestParam(name="cut",required=true) String cut) { boolean isSuccess = paramsManifestEOService.changeExtension(id, cut); if(isSuccess) { return Result.OK("变更扩展成功!"); 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..7159b9401 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,12 @@ public class ParamsCollectManifestEO extends ParamsCollectManifestBaseEO impleme @ApiModelProperty(value = "同步上报库时间") private Date reportTime; + @ApiModelProperty(value = "版本") + private Integer version; + + @ApiModelProperty(value = "参考列") + private String referencesCol; + @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..c0ebc31a4 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,10 @@ public class ParamsCollectManifestHistoryEO extends ParamsCollectManifestBaseEO @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "同步上报库时间") private Date reportTime; + + @ApiModelProperty(value = "版本") + private Integer version; + + @ApiModelProperty(value = "参考列") + private String referencesCol; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsManifestEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsManifestEO.java index d4b022ffa..8b69c75d7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsManifestEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsManifestEO.java @@ -112,4 +112,7 @@ public class ParamsManifestEO implements Serializable { @ApiModelProperty(value = "项目相关版本对应的项目id") private String projectVersionId; + @ApiModelProperty(value = "参数项清单的参考列名称") + private String referencesColName; + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java index f157d3b57..875737c56 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java @@ -1,8 +1,11 @@ package com.jero.modules.cert.collect.mapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import com.jero.modules.cert.collect.entity.ParamsManifestEO; +import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -28,4 +31,6 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper queryByParamManifestId(@Param("paramsManifestId") String paramsManifestIdString); + + IPage selectpage(@Param("page") IPage page, @Param("ew") Wrapper queryWrapper, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO); } 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 de267b0bb..f8147c1a5 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,8 @@ + + @@ -125,4 +127,17 @@ select * from params_collect_manifest where params_manifest_id = #{paramsManifestId} + 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..7ef7f892a 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,8 @@ + + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml index 9e9dbf9ef..9b618d292 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml @@ -19,6 +19,7 @@ + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestHistoryEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestHistoryEOMapper.xml index f0ed93178..c3f9911f4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestHistoryEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestHistoryEOMapper.xml @@ -16,5 +16,6 @@ + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java index 9ab78c99b..1ca387bb7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java @@ -73,11 +73,11 @@ public interface IParamsCollectManifestEOService extends IService> getHeader(String paramsManifestId, String flag, String cut); + List> getHeader(String paramsManifestId, String flag, String cut, String projectName); /** * 提交 @@ -182,4 +182,12 @@ public interface IParamsCollectManifestEOService extends IService> configDataList, String paramsManifestId); + + // 认证工程师-强制撤回 + Result mandatoryWithdraw(ParamsCollectManifestVO paramsCollectManifestVO); } 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 1fcb5be55..dc358f09c 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 @@ -4,15 +4,13 @@ import cn.afterturn.easypoi.excel.entity.ImportParams; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ZipUtil; -import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.Lists; import com.jero.common.api.vo.Result; -import com.jero.common.constant.CommonConstant; -import com.jero.common.constant.WebsocketConst; import com.jero.common.constant.enums.*; import com.jero.common.exception.JeroBootException; import com.jero.common.system.query.QueryGenerator; @@ -53,7 +51,6 @@ import com.jero.modules.project.service.IProjectLibraryBaseService; import com.jero.modules.project.service.IProjectRelatedPersonnelService; import com.jero.modules.split.common.FileUnZip; import com.jero.modules.split.common.ReadExcel; -import com.jero.modules.system.entity.SysAnnouncement; import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.entity.SysUserRole; @@ -61,6 +58,7 @@ import com.jero.modules.system.service.ISysAnnouncementService; import com.jero.modules.system.service.ISysDictItemService; import com.jero.modules.system.service.ISysUserRoleService; import com.jero.modules.system.service.ISysUserService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; @@ -188,6 +186,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl queryWrapper = QueryGenerator.initQueryWrapper(paramsCollectManifestEO, req.getParameterMap()); - queryWrapper.lambda().notIn(ParamsCollectManifestEO::getControlType, ControlTypeEnum.Title.getValue()) - .orderByDesc(ParamsCollectManifestEO::getDelFlag) - .orderByDesc(ParamsCollectManifestEO::getAddFlag) - .orderByDesc(ParamsCollectManifestEO::getChangeFlag) - .orderByAsc(ParamsCollectManifestEO::getNioNumber); + public IPage queryList(IPage page, ParamsCollectManifestVO paramsCollectManifestVO, String cut, HttpServletRequest req) { + ParamsCollectManifestVO queryEO = new ParamsCollectManifestVO(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(queryEO, req.getParameterMap()); + queryWrapper.notIn("control_type", ControlTypeEnum.Title.getValue()) + .orderByDesc("del_flag") + .orderByDesc("add_flag") + .orderByDesc("change_flag") + .orderByAsc("nio_number"); - String paramsManifestId = paramsCollectManifestEO.getParamsManifestId(); + String paramsManifestId = paramsCollectManifestVO.getParamsManifestId(); + ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); - String userTypes = paramsCollectManifestEO.getUserTypes(); + String userTypes = paramsCollectManifestVO.getUserTypes(); if (StringUtils.isBlank(userTypes)) { if (CutEnum.CN.getValue().equals(cut)) { throw new JeroBootException("用户类型参数不能为空!"); @@ -348,20 +349,32 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImplwrapper.eq("nio_number", paramsCollectManifestVO.getAllNumber()).or().eq("params_number", paramsCollectManifestVO.getAllNumber())); + } + if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory())) { + List dutyTerritoryList = Arrays.asList(paramsCollectManifestVO.getDutyTerritory().split(",")); + queryWrapper.in("duty_territory", dutyTerritoryList); + } + queryWrapper.like(StringUtils.isNotEmpty(paramsCollectManifestVO.getParamsName()), "params_name", paramsCollectManifestVO.getParamsName()); + queryWrapper.like(StringUtils.isNotEmpty(paramsCollectManifestVO.getSdt()), "sdt", paramsCollectManifestVO.getSdt()); + queryWrapper.like(StringUtils.isNotEmpty(paramsCollectManifestVO.getDre()), "dre", paramsCollectManifestVO.getDre()); // IPage pageInfo = paramsCollectManifestEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列 - IPage pageInfo = page(page, queryWrapper); // 查询固定列 +// IPage pageInfo = page(page, queryWrapper); // 查询固定列 + IPage pageInfo = paramsCollectManifestEOMapper.selectpage(page, queryWrapper,paramsManifestEO); // 查询固定列 List list = pageInfo.getRecords(); // 查询固定列 List paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列 List paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList()); @@ -425,6 +438,22 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl referencesColMap = new HashMap<>(); + String referencesCol = collectManifestEO.getReferencesCol(); + if (StringUtils.isNotBlank(referencesCol)) { + List referencesColVOList = getReferencesColList(controlType, referencesCol, collectManifestEO, userTypes); // 重新组合配置数据 + referencesColMap.put("controlType", controlType); + referencesColMap.put("list", referencesColVOList); + manifestMap.put("referencesCol", referencesColMap); + } else { + List referencesColVOList = getReferencesColList(controlType, " # # #", collectManifestEO, userTypes); // 重新组合配置数据 + referencesColMap.put("controlType", controlType); + referencesColMap.put("list", referencesColVOList); + manifestMap.put("referencesCol", referencesColMap); + } + } + if (CollectionUtil.isNotEmpty(paramsConfigEOList)) { paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置 Map configMap = new HashMap<>(); @@ -736,6 +765,279 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl getReferencesColList(String controlType, String referencesCol, ParamsCollectManifestEO paramsCollectManifestEO, String userTypes) { + List referencesColList = Arrays.asList(referencesCol.split("#")); + List paramsConfigDataVOList = new ArrayList<>(); + String templateId = null; + String templateName = null; + if (StringUtils.isNotEmpty(paramsCollectManifestEO.getFileTemplateConnectId())) { + List ossFiles = ossFileService.getFileInfosByConnectId(paramsCollectManifestEO.getFileTemplateConnectId()); + + if (CollectionUtil.isNotEmpty(ossFiles)) { + templateId = ossFiles.get(0).getId(); + templateName = ossFiles.get(0).getFileName(); + } + } + + String lockFlag = ConfigLockEnum.YES.getValue(); + if (CollectManifestUserTypeEnum.HOMO.getValue().equals(userTypes)) { + lockFlag = ConfigLockEnum.NO.getValue(); + } + if (ControlTypeEnum.TEXT.getValue().equals(controlType)) { + + ParamsConfigDataVO configDataVO = new ParamsConfigDataVO(); + configDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + configDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + configDataVO.setIsLock(lockFlag); + configDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (StringUtils.isNotBlank(referencesColList.get(0))) { + configDataVO.setDataValue(referencesColList.get(0)); + } + paramsConfigDataVOList.add(configDataVO); + + } else if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)) { + + ParamsConfigDataVO configDataVO = new ParamsConfigDataVO(); + configDataVO.setType(ConfigDataTypeEnum.PULL.getValue()); + configDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + configDataVO.setIsLock(lockFlag); + configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (StringUtils.isNotBlank(referencesColList.get(1))) { + configDataVO.setDataValue(referencesColList.get(1)); + } + paramsConfigDataVOList.add(configDataVO); + + } else if (ControlTypeEnum.PULL_MORE.getValue().equals(controlType)) { + + ParamsConfigDataVO configDataVO = new ParamsConfigDataVO(); + configDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue()); + configDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + configDataVO.setIsLock(lockFlag); + configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (StringUtils.isNotBlank(referencesColList.get(1))) { + configDataVO.setDataValue(referencesColList.get(1)); + } + paramsConfigDataVOList.add(configDataVO); + + } else if (ControlTypeEnum.FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO configDataVO = new ParamsConfigDataVO(); + configDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + configDataVO.setIsMust(paramsCollectManifestEO.getIsMust()); + configDataVO.setIsLock(lockFlag); + configDataVO.setTemplateId(templateId); + configDataVO.setTemplateName(templateName); + if (StringUtils.isNotBlank(referencesColList.get(2))) { + configDataVO.setDataValue(referencesColList.get(2)); + } + paramsConfigDataVOList.add(configDataVO); + + } else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)) { + + ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO(); + ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO(); + + if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) { + pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue()); + textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } else { + pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } + + textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + textConfigDataVO.setIsLock(lockFlag); + textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (StringUtils.isNotBlank(referencesColList.get(0))) { + textConfigDataVO.setDataValue(referencesColList.get(0)); + } + + pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue()); + pullConfigDataVO.setIsLock(lockFlag); + pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (StringUtils.isNotBlank(referencesColList.get(1))) { + pullConfigDataVO.setDataValue(referencesColList.get(1)); + } + + paramsConfigDataVOList.add(pullConfigDataVO); + paramsConfigDataVOList.add(textConfigDataVO); + + } else if (ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) { + + ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO(); + ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO(); + + if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) { + pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue()); + textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } else { + pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } + + textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + textConfigDataVO.setIsLock(lockFlag); + textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (StringUtils.isNotBlank(referencesColList.get(0))) { + textConfigDataVO.setDataValue(referencesColList.get(0)); + } + + pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue()); + pullMoreConfigDataVO.setIsLock(lockFlag); + pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (StringUtils.isNotBlank(referencesColList.get(1))) { + pullMoreConfigDataVO.setDataValue(referencesColList.get(1)); + } + + paramsConfigDataVOList.add(pullMoreConfigDataVO); + paramsConfigDataVOList.add(textConfigDataVO); + + } else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO(); + ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO(); + + if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) { + textConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue()); + fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } else { + textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } + + textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + textConfigDataVO.setIsLock(lockFlag); + textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (StringUtils.isNotBlank(referencesColList.get(0))) { + textConfigDataVO.setDataValue(referencesColList.get(0)); + } + + fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + fileConfigDataVO.setIsLock(lockFlag); + fileConfigDataVO.setTemplateId(templateId); + fileConfigDataVO.setTemplateName(templateName); + if (StringUtils.isNotBlank(referencesColList.get(2))) { + fileConfigDataVO.setDataValue(referencesColList.get(2)); + } + + paramsConfigDataVOList.add(textConfigDataVO); + paramsConfigDataVOList.add(fileConfigDataVO); + + } else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO(); + ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO(); + + if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) { + pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue()); + fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } else { + pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } + + pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue()); + pullConfigDataVO.setIsLock(lockFlag); + pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (StringUtils.isNotBlank(referencesColList.get(1))) { + pullConfigDataVO.setDataValue(referencesColList.get(1)); + } + + fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + fileConfigDataVO.setIsLock(lockFlag); + fileConfigDataVO.setTemplateId(templateId); + fileConfigDataVO.setTemplateName(templateName); + if (StringUtils.isNotBlank(referencesColList.get(2))) { + fileConfigDataVO.setDataValue(referencesColList.get(2)); + } + + paramsConfigDataVOList.add(pullConfigDataVO); + paramsConfigDataVOList.add(fileConfigDataVO); + + } else if (ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO(); + ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO(); + + if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) { + pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue()); + fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } else { + pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } + + pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue()); + pullMoreConfigDataVO.setIsLock(lockFlag); + pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (StringUtils.isNotBlank(referencesColList.get(1))) { + pullMoreConfigDataVO.setDataValue(referencesColList.get(1)); + } + + fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + fileConfigDataVO.setIsLock(lockFlag); + fileConfigDataVO.setTemplateId(templateId); + fileConfigDataVO.setTemplateName(templateName); + if (StringUtils.isNotBlank(referencesColList.get(2))) { + fileConfigDataVO.setDataValue(referencesColList.get(2)); + } + + paramsConfigDataVOList.add(pullMoreConfigDataVO); + paramsConfigDataVOList.add(fileConfigDataVO); + + } else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) { + + ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO(); + ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO(); + ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO(); + + if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) { + pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue()); + textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } else { + pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue()); + } + + textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue()); + textConfigDataVO.setIsLock(lockFlag); + textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify()); + if (StringUtils.isNotBlank(referencesColList.get(0))) { + textConfigDataVO.setDataValue(referencesColList.get(0)); + } + + pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue()); + pullConfigDataVO.setIsLock(lockFlag); + pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues())); + if (StringUtils.isNotBlank(referencesColList.get(1))) { + pullConfigDataVO.setDataValue(referencesColList.get(1)); + } + + fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue()); + fileConfigDataVO.setIsLock(lockFlag); + fileConfigDataVO.setTemplateId(templateId); + fileConfigDataVO.setTemplateName(templateName); + if (StringUtils.isNotBlank(referencesColList.get(2))) { + fileConfigDataVO.setDataValue(referencesColList.get(2)); + } + + paramsConfigDataVOList.add(pullConfigDataVO); + paramsConfigDataVOList.add(textConfigDataVO); + paramsConfigDataVOList.add(fileConfigDataVO); + + } + return paramsConfigDataVOList; + } + private List> getControlValueMapList(String controlValue) { List> controlValueMapList = new ArrayList<>(); if (StringUtils.isNotEmpty(controlValue)) { @@ -760,12 +1062,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl> getHeader(String paramsManifestId, String flag, String cut) { + public List> getHeader(String paramsManifestId, String flag, String cut, String projectName) { List fieldList = onlCgformFieldService.getFieldList(flag); // flag--->7 if (fieldList.size() != 0) { //过滤列表字段(is_show_list-->列表是否显示0否 1是) fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList()); } + ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId); List paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); List> listConfig = new LinkedList<>(); for (ParamsConfigEO paramsConfigEO : paramsConfigEOList) { @@ -792,7 +1095,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(ParamsInfoPublishEO::getParamsTemplateId, paramsCollectManifestVO.getParamsTemplateId()) - .eq(ParamsInfoPublishEO::getVersion, paramsCollectManifestVO.getParamsTemplatePublishVersion()) + .eq(ParamsInfoPublishEO::getPublishVersion, paramsCollectManifestVO.getParamsTemplatePublishVersion()) .like(StringUtils.isNotEmpty(paramsCollectManifestVO.getNioNumber()), ParamsInfoPublishEO::getNioNumber, paramsCollectManifestVO.getNioNumber()) .like(StringUtils.isNotEmpty(paramsCollectManifestVO.getParamsName()), ParamsInfoPublishEO::getParamsName, paramsCollectManifestVO.getParamsName()) .eq(StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory()), ParamsInfoPublishEO::getDutyTerritory, paramsCollectManifestVO.getDutyTerritory()) @@ -1655,6 +1992,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl fieldList = onlCgformFieldService.getFieldList(ModuleEnum.PARAMS_COLLECT_MANIFEST.getValue()); @@ -3034,9 +3382,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId()); if (CollectionUtil.isNotEmpty(ossFileList)) { - configDataBuilder.append(ossFileList.get(0).getFileName()).append("#"); + configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()).append("#"); fileList.addAll(ossFileList); } @@ -3234,6 +3585,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl referencesColList = Arrays.asList(collectManifestEO.getReferencesCol().split("#")); + StringBuilder referencesColBuilder = new StringBuilder(); + if (!" ".equals(referencesColList.get(0))) { + referencesColBuilder.append(referencesColList.get(0)).append("#"); + } + if (!" ".equals(referencesColList.get(1))) { + referencesColBuilder.append(referencesColList.get(1).replaceAll(",", "!")).append("#"); + } + if (!" ".equals(referencesColList.get(2))) { + List ossFileList = ossFileService.getFileInfosByConnectId(referencesColList.get(2)); + if (CollectionUtil.isNotEmpty(ossFileList)) { + referencesColBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()).append("#"); + } + } + + String referencesCol = referencesColBuilder.toString(); + if (referencesCol.endsWith("#")) { + referencesCol = referencesCol.substring(0, referencesCol.lastIndexOf("#")); + } + record1.put("references_col", referencesCol); + + } else { + record1.remove("references_col"); + } // 配置列 if (CollectionUtil.isNotEmpty(paramsConfigEOList)) { List fileList = new ArrayList<>(); @@ -3875,7 +4253,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl paramsCollectManifestEOList = paramsCollectManifestEOMapper.listInfo(queryEO); + + // 获取上报库的配置数据 + List paramsReportConfigDataEOList = paramsReportDetailEOService.listInfoForReferencesCol(paramsReportId, paramsReportConfigId); + + // 配置数据重构后入库 + List updateEOList = new ArrayList<>(); + for (ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOList) { + StringBuilder referencesColBuilder = new StringBuilder(); + if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getTextData())) { + referencesColBuilder.append(paramsReportConfigDataEO.getTextData()).append("#"); + } else { + referencesColBuilder.append(" ").append("#"); + } + + if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getPullData())) { + referencesColBuilder.append(paramsReportConfigDataEO.getPullData()).append("#"); + } else { + referencesColBuilder.append(" ").append("#"); + } + + if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) { + referencesColBuilder.append(paramsReportConfigDataEO.getFileConnectId()).append("#"); + } else { + referencesColBuilder.append(" ").append("#"); + } + + String referencesCol = referencesColBuilder.toString(); + List pcmList = paramsCollectManifestEOList.stream() + .filter(e->paramsReportConfigDataEO.getNioNumber().equals(e.getNioNumber())).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(pcmList)) { + if (pcmList.get(0).getControlType().equals(paramsReportConfigDataEO.getControlType())) { // 控件类型相同 才能引用 + ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO(); + updateCollectManifestEO.setId(pcmList.get(0).getId()); + updateCollectManifestEO.setReferencesCol(referencesCol); + updateEOList.add(updateCollectManifestEO); + } + } + + } + + // 修改参数清单的参考列名称 + ParamsManifestEO paramsManifestEO = new ParamsManifestEO(); + paramsManifestEO.setId(paramsManifestId); + paramsManifestEO.setReferencesColName(paramsReportConfigName); + paramsManifestEOService.updateById(paramsManifestEO); + + // 修改参数项 参考列 + return updateBatchById(updateEOList); + } + + @Override + public boolean updateReferencesCol(List> configDataList, String paramsManifestId) { + List updateEOList = new ArrayList<>(); + // 处理数据 + for (Map map : configDataList) { + String paramsCollectManifestId = (String) map.get("id"); + + // 添加配置数据 + for (Map.Entry entry : map.entrySet()) { + StringBuilder referncesColBuilder = new StringBuilder(); + if ("id".equals(entry.getKey())) { + continue; + } + + // 取值 + Map paramsConfigDataMap = (Map) entry.getValue(); + String controlType = (String) paramsConfigDataMap.get("controlType"); + // 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO) + List> paramsConfigDataVOList = (List>) paramsConfigDataMap.get("list"); + if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) { + // TEXT + List> textList = paramsConfigDataVOList.stream() + .filter(e->e.get("type").equals(ConfigDataTypeEnum.TEXT.getValue())).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(textList)) { + String dataValue = (String) textList.get(0).get("dataValue"); + if (StringUtils.isNotEmpty(dataValue)) { + referncesColBuilder.append(dataValue).append("#"); + } else { + referncesColBuilder.append(" ").append("#"); + } + } else { + referncesColBuilder.append(" ").append("#"); + } + + // PULL + List> pullList = paramsConfigDataVOList.stream() + .filter(e->e.get("type").equals(ConfigDataTypeEnum.PULL.getValue()) + || e.get("type").equals(ConfigDataTypeEnum.PULL_MORE.getValue())).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(pullList)) { + String dataValue = (String) pullList.get(0).get("dataValue"); + if (StringUtils.isNotEmpty(dataValue)) { + referncesColBuilder.append(dataValue).append("#"); + } else { + referncesColBuilder.append(" ").append("#"); + } + } else { + referncesColBuilder.append(" ").append("#"); + } + + // FILE + List> fileList = paramsConfigDataVOList.stream() + .filter(e->e.get("type").equals(ConfigDataTypeEnum.FILE.getValue())).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(fileList)) { + String dataValue = (String) fileList.get(0).get("dataValue"); + if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件 + // 处理文件connectId + String[] fileIdList = dataValue.split(","); + String connectId = UUID.randomUUID().toString().replace("-", ""); + List updateFileList = new ArrayList<>(); + for (int i = 0; i < fileIdList.length; i++) { + OSSFile ossFile = new OSSFile(); + ossFile.setId(fileIdList[i]); + ossFile.setConnectId(connectId); + updateFileList.add(ossFile); + } + ossFileService.updateBatchById(updateFileList); + dataValue = connectId; + } else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) { + List ossFiles = ossFileService.getFileInfosByConnectId(dataValue); + if (CollectionUtil.isEmpty(ossFiles)) { // 新加了一个文件 + String connectId = UUID.randomUUID().toString().replace("-", ""); + //修改文件表关联信息connect_id + List oSSFileList = new ArrayList<>(); + for (String fileId : dataValue.split(",")) { + OSSFile ossFile = new OSSFile(); + ossFile.setId(fileId); + ossFile.setConnectId(connectId); + oSSFileList.add(ossFile); + } + ossFileService.updateFileInfo(oSSFileList); + dataValue = connectId; + } + } + + if (StringUtils.isNotEmpty(dataValue)) { + referncesColBuilder.append(dataValue).append("#"); + } else { + referncesColBuilder.append(" ").append("#"); + } + } else { + referncesColBuilder.append(" ").append("#"); + } + + + String referencesCol = referncesColBuilder.toString(); + if (StringUtils.isNotEmpty(referencesCol)) { + ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO(); + updateEO.setId(paramsCollectManifestId); + updateEO.setReferencesCol(referencesCol); + updateEOList.add(updateEO); + } + + } + + } + } + + // 批量更新 + return updateBatchById(updateEOList); + } + + @Override + public Result mandatoryWithdraw(ParamsCollectManifestVO paramsCollectManifestVO) { + if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) { + throw new JeroBootException("参数不能为空!"); + } + String paramsCollectManifestIds = paramsCollectManifestVO.getIds(); + String[] paramsCollectManifestIdArr = paramsCollectManifestIds.split(","); + + // 根据参数收集清单id数组,查询参数配置数据 + QueryWrapper configDataQueryWrap = new QueryWrapper<>(); + configDataQueryWrap.lambda().in(ParamsConfigDataEO::getParamsCollectManifestId,paramsCollectManifestIdArr); + List paramsConfigDataList = this.paramsConfigDataEOService.list(configDataQueryWrap); + + for (int i=0; i paramsConfigDataListTemp = paramsConfigDataList.stream().filter(paramsConfig -> { + boolean flag = false; + if (StringUtils.equals(paramsConfig.getParamsCollectManifestId(), paramsCollectManifestId)) { + // 如果三种数据其中一种不为空,需要更新,都为空的话无需更新。 + if(StringUtils.isNotEmpty(paramsConfig.getTextData()) || StringUtils.isNotEmpty(paramsConfig.getPullData()) || StringUtils.isNotEmpty(paramsConfig.getFileConnectId())){ + flag = true; + } + } + return flag; + }).collect(Collectors.toList()); + + // 如果该参数收集清单数据对应的参数配置数据不为空,则设置将填写人填写的数据设置为空 + if(CollectionUtils.isNotEmpty(paramsConfigDataListTemp)){ + for (ParamsConfigDataEO paramsConfigDataEO : paramsConfigDataListTemp) { + LambdaUpdateWrapper configDataUpdateWrap = new LambdaUpdateWrapper<>(); + configDataUpdateWrap.set(ParamsConfigDataEO::getTextData,null); + configDataUpdateWrap.set(ParamsConfigDataEO::getPullData,null); + configDataUpdateWrap.set(ParamsConfigDataEO::getFileConnectId,null); + configDataUpdateWrap.eq(ParamsConfigDataEO::getId,paramsConfigDataEO.getId()); + try { + this.paramsConfigDataEOService.update(configDataUpdateWrap); + }catch (Exception ex){ + ex.printStackTrace(); + log.error("强制撤回,更新参数配置数据失败:" + ex.getMessage()); + throw new JeroBootException("强制撤回,更新参数配置数据失败!"); + } + } + } + } + + LambdaUpdateWrapper updateWrap = new LambdaUpdateWrapper<>(); + updateWrap.set(ParamsCollectManifestEO::getSdt,null); + updateWrap.set(ParamsCollectManifestEO::getDre,null); + updateWrap.set(ParamsCollectManifestEO::getDeadline,null); + updateWrap.set(ParamsCollectManifestEO::getState,CollectManifestStateEnum.WAIT_COLLECT.getValue()); + updateWrap.eq(ParamsCollectManifestEO::getId,paramsCollectManifestId); + try { + this.update(updateWrap); + }catch (Exception ex){ + ex.printStackTrace(); + log.error("强制撤回,更新参数收集清单失败:" + ex.getMessage()); + throw new JeroBootException("强制撤回,更新参数收集清单失败!"); + } + } + return Result.OK("强制撤回成功!"); + } + private void deadlineDateMap(Map> today, ParamsCollectManifestEO collectManifestEO, String thirdId) { List stringList = today.get(thirdId); if (ObjectUtils.isEmpty(stringList)) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java index c57b65ae3..418a7eb42 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java @@ -444,6 +444,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl map = new HashMap<>(); String dbFieldName = onlCgformField.getDbFieldName(); + if ("references_col".equals(dbFieldName)) { + continue; + } if ("description".equals(dbFieldName)) { indexOfDescription = i; map.put("click2", true); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java index 63fb2a13e..53f508975 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java @@ -22,6 +22,8 @@ import com.jero.modules.cert.collect.mapper.ParamsManifestEOMapper; import com.jero.modules.cert.collect.service.*; import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO; import com.jero.modules.cert.collect.vo.ParamsManifestVO; +import com.jero.modules.cert.report.entity.ParamsReportEO; +import com.jero.modules.cert.report.service.IParamsReportDetailEOService; import com.jero.modules.cert.report.service.IParamsReportEOService; import com.jero.modules.cert.template.entity.ParamsInfoPublishEO; import com.jero.modules.cert.template.entity.ParamsTemplateEO; @@ -97,6 +99,9 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl oldParamsCollectManifestEOList = paramsCollectManifestEOMapper.listInfo(paramsCollectManifestEO); + // 查询上报库的项目所有参数项的配置数据 + ParamsReportEO paramsReportEO = paramsReportEOService.queryByOldParamsManifestId(id, paramsManifestEO.getVersion()); + List> paramsReportConfigDataList = paramsReportDetailEOService.listInfoForChange(paramsReportEO.getId()); + // 比较模板参数项 和 项目参数项 // nio编号一样时,比较参数填写规则(控件类型,控件备选值,控件校验)是否一样;nio编号不一样时,不用管,用户自己添加 List oldNioNumberList = oldParamsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList()); @@ -436,6 +446,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl delCollectManifestIdList = new ArrayList<>(); List updateCollectManifestEOList = new ArrayList<>(); + List updateConfigDataEOList = new ArrayList<>(); // 模板里没有,清单里有 if (CollectionUtil.isNotEmpty(diffList)) { @@ -502,10 +513,48 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl configIdList = paramsConfigEOService.queryList(id).stream().map(ParamsConfigEO::getId).collect(Collectors.toList()); + List paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(configIdList); + // 按照上报库参数项配置数据 更新 参数收集清单配置数据 + List> reportConfigDataEOList = new ArrayList<>(); + List configDataEOList = new ArrayList<>(); + for (ParamsCollectManifestEO updateCollectManifestEO : updateCollectManifestEOList) { + for (String configId : configIdList) { + reportConfigDataEOList = paramsReportConfigDataList.stream().filter(e-> updateCollectManifestEO.getNioNumber().equals(e.get("nio_number")) + && configId.equals(e.get("old_params_config_id"))).collect(Collectors.toList()); + configDataEOList = paramsConfigDataEOList.stream().filter(e-> updateCollectManifestEO.getId().equals(e.getParamsCollectManifestId()) + && configId.equals(e.getParamsConfigId())).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(reportConfigDataEOList) && CollectionUtil.isNotEmpty(configDataEOList)) { + ParamsConfigDataEO updateParamsConfigDataEO = new ParamsConfigDataEO(); + updateParamsConfigDataEO.setId(String.valueOf(configDataEOList.get(0).getId())); + updateParamsConfigDataEO.setTextData((String) reportConfigDataEOList.get(0).get("text_data")); + updateParamsConfigDataEO.setPullData((String) reportConfigDataEOList.get(0).get("pull_data")); + updateParamsConfigDataEO.setFileConnectId((String) reportConfigDataEOList.get(0).get("file_connect_id")); + updateConfigDataEOList.add(updateParamsConfigDataEO); + } else if (CollectionUtil.isNotEmpty(reportConfigDataEOList) && CollectionUtil.isEmpty(configDataEOList)) { + ParamsConfigDataEO addParamsConfigDataEO = new ParamsConfigDataEO(); + addParamsConfigDataEO.setId(UUID.randomUUID().toString().replace("-", "")); + addParamsConfigDataEO.setTextData((String) reportConfigDataEOList.get(0).get("text_data")); + addParamsConfigDataEO.setPullData((String) reportConfigDataEOList.get(0).get("pull_data")); + addParamsConfigDataEO.setFileConnectId((String) reportConfigDataEOList.get(0).get("file_connect_id")); + addParamsConfigDataEO.setParamsConfigId(configId); + addParamsConfigDataEO.setParamsCollectManifestId(updateCollectManifestEO.getId()); + updateConfigDataEOList.add(addParamsConfigDataEO); + } + } + } + if (CollectionUtil.isNotEmpty(updateConfigDataEOList)) { + paramsConfigDataEOService.saveOrUpdateBatch(updateConfigDataEOList); + + } + // 删除参数项配置数据 if (CollectionUtil.isNotEmpty(delCollectManifestIdList)) { paramsConfigDataEOService.deleteByParamsCollectManifestIdList(delCollectManifestIdList); } + // 更新项目参数项 paramsCollectManifestEOService.updateBatchById(updateCollectManifestEOList); @@ -644,6 +693,7 @@ public class ParamsManifestEOServiceImpl 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/controller/ParamsReportEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java index 80fc4a3df..e1962639d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java @@ -5,8 +5,10 @@ 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.ParamsReportConfigEO; import com.jero.modules.cert.report.entity.ParamsReportEO; import com.jero.modules.cert.report.entity.ParamsReportExportHistoryEO; +import com.jero.modules.cert.report.service.IParamsReportConfigEOService; import com.jero.modules.cert.report.service.IParamsReportEOService; import com.jero.modules.cert.report.service.IParamsReportExportHistoryEOService; import com.jero.modules.system.util.StringUtils; @@ -21,11 +23,11 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.util.Arrays; -import java.util.List; +import java.util.*; +import java.util.stream.Collectors; - /** +/** * @Description: 上报库 * @Author: jero-boot * @Date: 2022-05-18 @@ -41,6 +43,9 @@ public class ParamsReportEOController extends JeroController queryPageListForManifest(ParamsReportEO paramsReportEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + if (StringUtils.isNotEmpty(paramsReportEO.getProjectName())) { + paramsReportEO.setProjectName(paramsReportEO.getProjectName().replace("%", "\\%")); + } + + if (StringUtils.isNotEmpty(paramsReportEO.getTitle())) { + paramsReportEO.setTitle(paramsReportEO.getTitle().replace("%", "\\%")); + } + + IPage page = new Page(pageNo, pageSize); + IPage pageList = paramsReportEOService.pageInfo(page, paramsReportEO); + List rows = pageList.getRecords(); + for (ParamsReportEO row : rows) { + // 项目名称-国家-清单名称 + row.setPageName(row.getProjectName() + "-" + row.getTargetMarket() + "-" + row.getTitle()); + // 设置配置 + List paramsReportConfigEOList = paramsReportConfigEOService.queryList(row.getId()).stream() + .sorted(Comparator.comparing(ParamsReportConfigEO::getDisplaySeq)) + .collect(Collectors.toList()); + List> mapList = new ArrayList<>(); + paramsReportConfigEOList.forEach(paramsReportConfigEO -> { + HashMap map = new HashMap<>(); + map.put("label", paramsReportConfigEO.getConfigName()); + map.put("value", paramsReportConfigEO.getId()); + mapList.add(map); + }); + row.setConfigList(mapList); + } + return Result.OK(pageList); + } + /** * 分页列表查询 * diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigDataEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigDataEO.java index f9ccbe80a..b55974ce4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigDataEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportConfigDataEO.java @@ -1,5 +1,6 @@ package com.jero.modules.cert.report.entity; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.jero.modules.cert.collect.entity.ParamsConfigDataEO; import io.swagger.annotations.ApiModel; @@ -24,4 +25,10 @@ import java.io.Serializable; public class ParamsReportConfigDataEO extends ParamsConfigDataEO implements Serializable { private static final long serialVersionUID = 1L; + @TableField(exist = false) + private String nioNumber; + + @TableField(exist = false) + private String controlType; + } 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/entity/ParamsReportEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportEO.java index 49612c6d5..0c501baac 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/entity/ParamsReportEO.java @@ -14,6 +14,8 @@ import org.jeecgframework.poi.excel.annotation.Excel; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; +import java.util.HashMap; +import java.util.List; /** @@ -82,4 +84,7 @@ public class ParamsReportEO implements Serializable { @TableField(exist = false) private String pageName; // 项目名称-国家-清单名称 + @TableField(exist = false) + private List> configList; + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailEOMapper.java index 9953f73a4..affc1ff82 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailEOMapper.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/mapper/ParamsReportDetailEOMapper.java @@ -2,6 +2,7 @@ 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.ParamsReportConfigDataEO; import com.jero.modules.cert.report.entity.ParamsReportDetailEO; import com.jero.modules.cert.report.vo.ParamsReportDetailVO; import org.apache.ibatis.annotations.Param; @@ -19,9 +20,13 @@ public interface ParamsReportDetailEOMapper extends BaseMapper listInfo(@Param("paramsReportDetailEO") ParamsReportDetailEO paramsReportDetailEO); - IPage pageInfo(@Param("page") IPage page, @Param("paramsReportDetailEO") ParamsReportDetailEO paramsReportDetailEO); + IPage pageInfo(@Param("page") IPage page, @Param("paramsReportDetailVO") ParamsReportDetailVO paramsReportDetailVO); List> listInfoForExport(@Param("idList") List idList, @Param("paramsReportDetailVO") ParamsReportDetailVO paramsReportDetailVO); + List> listInfoForChange(@Param("paramsReportId") String paramsReportId); + + List listInfoForReferencesCol(@Param("paramsReportId") String paramsReportId, + @Param("paramsReportConfigId") String paramsReportConfigId); } 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 01a75cc51..967d482ac 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 @@ + + @@ -65,6 +67,41 @@ + + + + + AND (prd.nio_number = #{paramsReportDetailVO.allNumber} or rccpi.params_number = #{paramsReportDetailVO.allNumber}) + + + AND prd.params_name LIKE CONCAT(CONCAT('%',#{paramsReportDetailVO.paramsName}),'%') + + + AND + + prd.cert_category LIKE CONCAT(CONCAT('%',#{item}),'%') + + + + AND prd.sdt in + + #{item} + + + + AND prd.dre in + + #{item} + + + + AND prd.params_manifest_id = #{paramsReportDetailVO.paramsManifestId} + + + + + + @@ -102,9 +139,10 @@ @@ -129,4 +167,26 @@ order by prd.sync_time desc, prd.nio_number ASC + + + + \ No newline at end of file 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/IParamsReportDetailEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java index 7dece4f71..4d3ec06fa 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java @@ -2,6 +2,7 @@ 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.ParamsReportConfigDataEO; import com.jero.modules.cert.report.entity.ParamsReportDetailEO; import com.jero.modules.cert.report.vo.ParamsReportDetailVO; @@ -21,11 +22,11 @@ public interface IParamsReportDetailEOService extends IService ids); + + // 变更扩展时的查询 + List> listInfoForChange(String paramsReportId); + + // 引用参考列时的查询 + List listInfoForReferencesCol(String paramsReportId, String paramsReportConfigId); } 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 9528cf673..e0944d306 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 list = pageInfo.getRecords(); // 查询固定列 List paramsConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); // 查询配置列 @@ -169,6 +177,11 @@ 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,23 +1581,39 @@ 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) { String paramsCollectManifestId = (String) map.get("id"); - + // 操作记录 + StringBuilder logCnContent = new StringBuilder(); + StringBuilder logEnContent = new StringBuilder(); + logCnContent.append(loginUser.getUsername()).append("将"); + logEnContent.append(loginUser.getUsername()).append(" set "); // 添加配置数据 for (Map.Entry 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(); // 取值 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 +1622,10 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl updateFileList = new ArrayList<>(); - for (int i = 0; i < fileIdList.length; i++) { - OSSFile ossFile = new OSSFile(); - ossFile.setId(fileIdList[i]); - ossFile.setConnectId(connectId); - updateFileList.add(ossFile); + List ossFiles = ossFileService.getFileInfosByConnectId(fileIdList[0]); + if(CollectionUtil.isEmpty(ossFiles)) { // 新加了一个文件 + String connectId = UUID.randomUUID().toString().replace("-", ""); + List updateFileList = new ArrayList<>(); + for (int i = 0; i < fileIdList.length; i++) { + OSSFile ossFile = new OSSFile(); + ossFile.setId(fileIdList[i]); + ossFile.setConnectId(connectId); + updateFileList.add(ossFile); + } + ossFileService.updateBatchById(updateFileList); + dataValue = connectId; + newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(",")); } - ossFileService.updateBatchById(updateFileList); - dataValue = connectId; } else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) { List ossFiles = ossFileService.getFileInfosByConnectId(dataValue); if(CollectionUtil.isEmpty(ossFiles)){ // 新加了一个文件 @@ -1626,21 +1700,55 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl paramsReportConfigDataEOList) { List configDataEOList = paramsReportConfigDataEOList.stream() .filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId())) @@ -1731,6 +1839,16 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl> listInfoForChange(String paramsReportId) { + return this.baseMapper.listInfoForChange(paramsReportId); + } + + @Override + public List listInfoForReferencesCol(String paramsReportId, String paramsReportConfigId) { + return this.baseMapper.listInfoForReferencesCol(paramsReportId, paramsReportConfigId); + } + /** * 实体对象转成Map * @param obj 实体对象 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); + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/vo/ParamsReportDetailVO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/vo/ParamsReportDetailVO.java index ae6b8e521..9a90907b7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/vo/ParamsReportDetailVO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/vo/ParamsReportDetailVO.java @@ -58,6 +58,6 @@ public class ParamsReportDetailVO { // 自定义导出专用 private String exportTemplateId; //导出模板id - + private String allNumber; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java index ab39e0243..a90866929 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java @@ -3,6 +3,7 @@ package com.jero.modules.cert.template.controller; import cn.hutool.core.collection.CollectionUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jero.common.api.vo.Result; @@ -66,10 +67,11 @@ public class ParamsInfoEOController extends JeroController queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(ParamsInfoEO::getParamsTemplateId, paramsInfoEO.getParamsTemplateId()) - .like(StringUtils.isNotEmpty(paramsInfoEO.getNioNumber()), ParamsInfoEO::getNioNumber, paramsInfoEO.getNioNumber()) - .like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), ParamsInfoEO::getParamsName, paramsInfoEO.getParamsName()) - .eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), ParamsInfoEO::getDutyTerritory, paramsInfoEO.getDutyTerritory()) - .orderBy(true, "asc".equals(orderBy)?true:false, ParamsInfoEO::getNioNumber); + QueryWrapper queryWrapper = new QueryWrapper<>(); + String finalAllNumber = allNumber; + queryWrapper.eq("pi.params_template_id", paramsInfoEO.getParamsTemplateId()) + .and(StringUtils.isNotEmpty(allNumber), wrapper->wrapper.eq("pi.nio_number", finalAllNumber).or().eq("ccpi.params_number", finalAllNumber)) + .like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), "pi.params_name", paramsInfoEO.getParamsName()) + .eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), "pi.duty_territory", paramsInfoEO.getDutyTerritory()) + .orderBy(true, "asc".equals(orderBy)?true:false, "pi.nio_number"); Page page = new Page(pageNo, pageSize); - IPage pageList = paramsInfoEOService.page(page, queryWrapper); +// IPage pageList = paramsInfoEOService.page(page, queryWrapper); + IPage pageList = paramsInfoEOService.selectpage(page, queryWrapper); // List rows = pageList.getRecords(); // paramsInfoEOService.getTreeDictItemText(rows, cut); return Result.OK(cut, pageList); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoPublishEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoPublishEO.java index 2f93dd0e7..1befd2771 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoPublishEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoPublishEO.java @@ -26,6 +26,6 @@ public class ParamsInfoPublishEO extends ParamsInfoEO implements Serializable { /**发布时版本*/ @ApiModelProperty(value = "发布时版本") - private Integer version; + private Integer publishVersion; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/ParamsInfoEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/ParamsInfoEOMapper.java index 70c378fc1..267f93f6e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/ParamsInfoEOMapper.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/ParamsInfoEOMapper.java @@ -1,9 +1,11 @@ package com.jero.modules.cert.template.mapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jero.modules.cert.template.entity.ParamsInfoEO; import com.jero.modules.cert.template.vo.ParamsInfoEnExport; import com.jero.modules.cert.template.vo.ParamsInfoVO; -import com.jero.modules.cert.template.entity.ParamsInfoEO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -24,4 +26,7 @@ public interface ParamsInfoEOMapper extends BaseMapper { List selectListByParamsTemplateIds(@Param("paramsTemplateIds") String paramsTemplateIds); + IPage selectpage(@Param("page") IPage page, @Param("ew") Wrapper queryWrapper); + + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml index 7416091d5..55da74b69 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml @@ -177,4 +177,10 @@ + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml index 4b3361698..0e523cbab 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml @@ -21,12 +21,12 @@ - + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java index 986b78b11..7f149fc53 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java @@ -1,5 +1,7 @@ package com.jero.modules.cert.template.service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.jero.common.api.vo.Result; import com.jero.modules.cert.template.entity.ParamsInfoEO; @@ -100,4 +102,6 @@ public interface IParamsInfoEOService extends IService { int deleteByParamsTemplateIds(String paramsTemplateIds); List selectListByParamsTemplateIds(String paramsTemplateIds); + + IPage selectpage(IPage page, Wrapper queryWrapper); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java index 3c025261d..f41bf40a0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java @@ -7,7 +7,9 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ZipUtil; import com.aliyuncs.utils.IOUtils; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.common.api.vo.Result; import com.jero.common.constant.enums.CutEnum; @@ -1824,4 +1826,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl selectListByParamsTemplateIds(String paramsTemplateIds) { return paramsInfoEOMapper.selectListByParamsTemplateIds(paramsTemplateIds); } + + @Override + public IPage selectpage(IPage page, Wrapper queryWrapper) { + return paramsInfoEOMapper.selectpage(page, queryWrapper); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoPublishEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoPublishEOServiceImpl.java index db5538fcf..743ee4c92 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoPublishEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoPublishEOServiceImpl.java @@ -117,7 +117,7 @@ public class ParamsInfoPublishEOServiceImpl extends ServiceImpl getListByPublishVersion(String paramsTemplateId, int publishVersion) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(ParamsInfoPublishEO::getParamsTemplateId, paramsTemplateId) - .eq(ParamsInfoPublishEO::getVersion, publishVersion); + .eq(ParamsInfoPublishEO::getPublishVersion, publishVersion); List paramsInfoPublishEOList = list(queryWrapper); return paramsInfoPublishEOList; } @@ -151,7 +151,7 @@ public class ParamsInfoPublishEOServiceImpl extends ServiceImpl
diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 0e6fde52c..54b32a152 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -640,6 +640,7 @@ } let params = { paramsManifestId: paramsManifestid, + projectName:this.$route.query.projectName, flag: '7' } getAction(url, params).then((res) => { @@ -649,8 +650,10 @@ let num = 0 this.content = [] jsonHead.forEach((res, index) => { + console.log(res) // 配置列 if (res.type) { + console.log('配置') this.columns.push({ dataIndex: res.db_field_name, align: 'center', @@ -834,7 +837,12 @@ Object.keys(Obj).forEach((item) => { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { Obj[item].list.forEach((itemLi) => { - itemLi.isLock = 1 + console.log(item) + if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){ + itemLi.isLock = 0 + }else{ + itemLi.isLock = 1 + } if (itemLi.type === 'pull_more') { itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',') } diff --git a/jero-web/src/components/tableCollection/index1.vue b/jero-web/src/components/tableCollection/index1.vue index c6ab13fd7..0ff347a91 100644 --- a/jero-web/src/components/tableCollection/index1.vue +++ b/jero-web/src/components/tableCollection/index1.vue @@ -28,6 +28,15 @@ {{$t('See')}} + + + + {{text}} @@ -148,6 +157,46 @@ + + + + + + + + + + +
+ +
+
@@ -235,11 +284,14 @@ indeterminate: false, columns: [], content: [], + detailDateList: [], selectedRowKeys: [], selectedRowrowValue: [], dataSource: [], pageNo: 1, pageSize: 100, + pageNohistory: 1, + pageSizehistory: 10, pageSizeOptions: ['100', '200'], total: 0, searchParmes: {}, @@ -250,7 +302,10 @@ sdt: 0, // 工程接口人 dre: 0, // 填写人 areaVisible: false, + visible: false, seeVisibleView: false, + confirmLoading: false, + paramsReportDetailId:'', form: {}, rules: { querySdt: [ @@ -273,7 +328,24 @@ Dateline: {}, getquerySdtId: '', // 当前工程接口人的id areaVisibleView: false, // 查看配置得弹框 - configDetail: {} // 查看配置得详细信息 + configDetail: {}, // 查看配置得详细信息 + dataSourcehistory:[], + columnshistory: [ + { + title: this.$t('OperationDetails'), + dataIndex: 'logContent', + align: 'center', + ellipsis: true, + scopedSlots: { customRender: 'content' } + }, + { + title: this.$t('OperationTime'), + dataIndex: 'createTime', + align: 'center', + ellipsis: true, + width: 180 + } + ] } }, mounted() { @@ -298,7 +370,6 @@ } }, onClickTitle(val) { - console.log(val) this.description = val.description this.seeVisibleView = true @@ -525,6 +596,16 @@ customRender: 'ParameterDescription' } } + if (res.click3) { + this.columns[index].scopedSlots = { + customRender: 'RemarkDescription' + } + } + if (res.click4) { + this.columns[index].scopedSlots = { + customRender: 'Operation' + } + } if (res.db_field_name == 'paramsName') { this.columns[index].width = 300 this.columns[index].ellipsis = false @@ -681,6 +762,7 @@ }) }, onChange(page, pageSize) { + }, onSelectChange(value, rowValue) { this.selectedRowKeys = [] @@ -693,6 +775,44 @@ OperationClick(ol, item) { // this.$emit(ol.ClickEvent, item) }, + UpdateLog(val) { + this.visible = true + this.paramsReportDetailId = val.id + this.bussLogList(val) + }, + bussLogList(val) { + let query = { + pageNo: this.pageNohistory, + pageSize: this.pageSizehistory, + paramsReportDetailId: this.paramsReportDetailId + } + this.loading = true + getAction('report/detailLog/page', query).then((res) => { + if (res.success) { + this.dataSourcehistory = res.result.records + this.total = res.result.total + this.loading = false + } else { + this.loading = false + } + }) + }, + handleOk() { + this.visible = false + }, + handleCancel() { + this.visible = false + }, + onChangehistory(page, pageSize) { + console.log(1) + this.pageNohistory = page + this.bussLogList() + }, + SizeChangehistory(page, pageSize) { + this.pageNo = 1 + this.pageSizehistory = pageSize + this.bussLogList() + }, detailClick(item, index) { // this.$emit('detailClick', item) } @@ -716,6 +836,11 @@ } + + \ No newline at end of file