diff --git a/jero-boot/db/蔚来标准sql/dev_third_record.sql b/jero-boot/db/蔚来标准sql/dev_third_record.sql index d1f370f85..42b9bed98 100644 --- a/jero-boot/db/蔚来标准sql/dev_third_record.sql +++ b/jero-boot/db/蔚来标准sql/dev_third_record.sql @@ -359,4 +359,24 @@ ALTER TABLE `laws_weilai`.`params_report_detail` ALTER TABLE `laws_weilai`.`report_cert_category_params_info` MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`; ---以上SQL 2022年7月12日 已同步正式环境 \ No newline at end of file +--以上SQL 2022年7月12日 已同步正式环境 + +-- 参数项清单表 添加字段 标题默认值 2022-07-13 +ALTER TABLE `laws_weilai`.`params_info` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `params_template_id`; + +ALTER TABLE `laws_weilai`.`params_info_publish` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `version`; + +ALTER TABLE `laws_weilai`.`params_collect_manifest` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `add_flag`; + +ALTER TABLE `laws_weilai`.`params_collect_manifest_history` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `params_manifest_id`; + +ALTER TABLE `laws_weilai`.`params_report_detail` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `sync_time`; + +-- 法规技术评估 反馈评估表中,增加符合性结果表id关联 2022-07-14 +ALTER TABLE `laws_technology_evaluation_result` + ADD COLUMN `compliance_result_id` varchar(64) NULL COMMENT '符合性结果id' AFTER `acti_proc_inst_id`; diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java new file mode 100644 index 000000000..749f1f6d0 --- /dev/null +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java @@ -0,0 +1,34 @@ +package com.jero.common.util; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; + +public class FileUtils { + /** + * 复制文件 + * @param in + * @param newFile + * @throws IOException + */ + public static void copyFile(InputStream in, String newFile) throws IOException { + File file2 = new File(newFile); + if (!file2.exists()) { + file2.createNewFile(); + } + try (FileOutputStream ou = new FileOutputStream(newFile);) { + byte[] bs = new byte[1024]; + int count = 0; + while ((count = in.read(bs, 0, bs.length)) != -1) { + ou.write(bs, 0, count); + } + ou.flush(); + } catch (IOException e) { + e.printStackTrace(); + throw new IOException("复制文件失败!"); + } finally { + in.close(); + } + } +} diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java index aed81c064..682af6d01 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java @@ -5,20 +5,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; -import com.jero.common.aspect.annotation.PermissionData; import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.query.QueryGenerator; import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService; import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO; -import com.jero.modules.cert.template.entity.ParamsInfoPublishEO; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.service.ISysUserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; -import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -77,19 +74,20 @@ public class ParamsCollectManifestEOController extends JeroController queryList(ParamsCollectManifestEO paramsCollectManifestEO, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="100") Integer pageSize, - @RequestParam(name = "cut") String cut) { - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { - paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%")); - } - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) { - paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%")); - } - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) { - paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%")); - } + @RequestParam(name = "cut") String cut, + HttpServletRequest req) { +// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { +// paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%")); +// } +// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) { +// paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%")); +// } +// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) { +// paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%")); +// } IPage page = new Page(pageNo, pageSize); - IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestEO, cut); + IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestEO, cut, req); return Result.OK(list); } @@ -279,6 +277,25 @@ public class ParamsCollectManifestEOController extends JeroController updateDutyTerritory(ParamsCollectManifestVO paramsCollectManifestVO) { + boolean isSuccess = paramsCollectManifestEOService.updateDutyTerritory(paramsCollectManifestVO); + if (isSuccess) { + return Result.OK("修改责任领域成功!"); + } else { + return Result.error("修改责任领域失败!"); + } + } + /** * 分配工程接口人 * diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java index ba090fa7d..2bcab4ab6 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java @@ -6,6 +6,7 @@ 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.collect.entity.ParamsCollectManifestEO; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestHistoryEO; import com.jero.modules.cert.collect.entity.ParamsConfigHistoryEO; import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService; import com.jero.modules.cert.collect.service.IParamsCollectManifestHistoryEOService; @@ -13,13 +14,13 @@ import com.jero.modules.cert.collect.service.IParamsConfigHistoryEOService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; @@ -66,22 +67,23 @@ public class ParamsCollectManifestHistoryEOController extends JeroController queryList(ParamsCollectManifestEO paramsCollectManifestEO, + public Result queryList(ParamsCollectManifestHistoryEO paramsCollectManifestHistoryEO, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="500") Integer pageSize, - @RequestParam(name = "cut") String cut) { - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { - paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%")); - } - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) { - paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%")); - } - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) { - paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%")); - } + @RequestParam(name = "cut") String cut, + HttpServletRequest req) { +// if (StringUtils.isNotEmpty(paramsCollectManifestHistoryEO.getNioNumber())) { +// paramsCollectManifestHistoryEO.setNioNumber(paramsCollectManifestHistoryEO.getNioNumber().replace("%","\\%")); +// } +// if (StringUtils.isNotEmpty(paramsCollectManifestHistoryEO.getParamsName())) { +// paramsCollectManifestHistoryEO.setParamsName(paramsCollectManifestHistoryEO.getParamsName().replace("%","\\%")); +// } +// if (StringUtils.isNotEmpty(paramsCollectManifestHistoryEO.getDre())) { +// paramsCollectManifestHistoryEO.setDre(paramsCollectManifestHistoryEO.getDre().replace("%","\\%")); +// } IPage page = new Page(pageNo, pageSize); - IPage list = paramsCollectManifestHistoryEOService.queryList(page, paramsCollectManifestEO, cut); + IPage list = paramsCollectManifestHistoryEOService.queryList(page, paramsCollectManifestHistoryEO, cut, req); return Result.OK(list); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java index 5346caf15..8e42caf35 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java @@ -137,4 +137,9 @@ public class ParamsCollectManifestBaseEO implements Serializable { @Excel(name = "参数清单id", width = 15) @ApiModelProperty(value = "参数清单id") private String paramsManifestId; + + /**标题默认值*/ + @Excel(name = "默认值", width = 15) + @ApiModelProperty(value = "标题默认值") + private String titleDefaultValue; } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java index 9c04eeaa3..1e8304570 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java @@ -1,11 +1,11 @@ package com.jero.modules.cert.collect.mapper; -import java.util.List; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; -import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * @Description: 参数收集清单 @@ -17,5 +17,8 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO); + // 查询控件类型为 标题的 参数项 + List listInfoOfTitle(@Param("paramsManifestId") String paramsManifestId); + IPage pageInfo(@Param("page") IPage page, @Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml index 5709b8d47..873d1399a 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml @@ -29,6 +29,7 @@ + @@ -79,10 +80,18 @@ order by del_flag desc, add_flag desc, change_flag desc, nio_number asc + + diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml index d59367314..07a93e805 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml @@ -26,6 +26,7 @@ + @@ -66,6 +67,7 @@ select * from params_collect_manifest_history + and control_type != '11' order by nio_number asc \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java index fce085305..b86067b96 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java @@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO; -import com.jero.modules.cert.template.entity.ParamsInfoPublishEO; +import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; @@ -64,7 +64,7 @@ public interface IParamsCollectManifestEOService extends IService 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); + String paramsManifestId = paramsCollectManifestEO.getParamsManifestId(); String userTypes = paramsCollectManifestEO.getUserTypes(); @@ -268,16 +277,21 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl list = pageInfo.getRecords(); // 查询固定列 List paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列 List paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList()); @@ -356,6 +370,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl dutyTerritoryMap = new HashMap<>(); + dutyTerritoryMap.put("id", collectManifestEO.getId()); + dutyTerritoryMap.put("state", collectManifestEO.getState()); + dutyTerritoryMap.put("dataValue", collectManifestEO.getDutyTerritory()); + manifestMap.put("dutyTerritory", dutyTerritoryMap); + // 处理工程接口人 Map sdtMap = new HashMap<>(); sdtMap.put("id", collectManifestEO.getId()); @@ -641,6 +662,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl> getLoginUserTypes(ParamsCollectManifestVO paramsCollectManifestVO, String cut) { + if (StringUtils.isEmpty(paramsCollectManifestVO.getProjectId()) || StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId())) { + throw new JeroBootException("参数不能为空!"); + } + String projectId = paramsCollectManifestVO.getProjectId(); String paramsManifestId = paramsCollectManifestVO.getParamsManifestId(); @@ -1055,6 +1083,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(ParamsCollectManifestEO::getParamsManifestId, paramsManifestId) + .notIn(ParamsCollectManifestEO::getControlType, ControlTypeEnum.Title.getValue()) .orderByDesc(ParamsCollectManifestEO::getUpdateTime); // 按修改时间降序 List list = list(queryWrapper); int collectFinishNumber = (int) list.stream().filter(e->CollectManifestStateEnum.SYNC_REPORT.getValue().equals(e.getState())).count(); @@ -1173,6 +1202,37 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl nioNumberList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList()); + // 单独添加 控件类型为标题的参数项 + if (!isSync) { // 未上报 + List paramsCollectManifestEOListOfTitle = paramsCollectManifestEOMapper.listInfoOfTitle(paramsManifestId); + if(CollectionUtil.isNotEmpty(paramsCollectManifestEOListOfTitle)) { + for(ParamsCollectManifestEO item : paramsCollectManifestEOListOfTitle) { + ParamsReportDetailEO addReportDetailEO = new ParamsReportDetailEO(); + BeanUtils.copyProperties(item, addReportDetailEO); + String reportDetailId = UUID.randomUUID().toString().replace("-",""); + addReportDetailEO.setId(reportDetailId); + addReportDetailEO.setParamsManifestId(reportId); + addReportDetailEO.setSyncTime(syncTime); + addReportDetailEOList.add(addReportDetailEO); + } + } + + List nioNumberListOfTitle = paramsCollectManifestEOListOfTitle.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList()); + nioNumberList.addAll(nioNumberListOfTitle); + } + + // 复制认证类别参数 List certCategoryParamsInfoPublishEOS = certCategoryParamsInfoPublishEOService.queryListByVersionAndNio(paramsManifestEO.getParamsTemplateId(), paramsManifestEO.getParamsTemplatePublishVersion(), nioNumberList); for (CertCategoryParamsInfoPublishEO ccpi : certCategoryParamsInfoPublishEOS) { ReportCertCategoryParamsInfoEO addCcpi = new ReportCertCategoryParamsInfoEO(); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java index 9deb0dc6a..d15de9823 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java @@ -2,11 +2,13 @@ package com.jero.modules.cert.collect.service.impl; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.constant.enums.CutEnum; import com.jero.common.constant.enums.YesOrNoEnum; +import com.jero.common.system.query.QueryGenerator; import com.jero.generater.modules.online.cgform.entity.OnlCgformField; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; import com.jero.modules.cert.collect.entity.*; @@ -27,6 +29,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.servlet.http.HttpServletRequest; import java.lang.reflect.Field; import java.text.SimpleDateFormat; import java.util.*; @@ -74,10 +77,15 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl queryWrapper = QueryGenerator.initQueryWrapper(paramsCollectManifestHistoryEO, req.getParameterMap()); + queryWrapper.lambda().notIn(ParamsCollectManifestHistoryEO::getControlType, ControlTypeEnum.Title.getValue()) + .orderByAsc(ParamsCollectManifestHistoryEO::getNioNumber); - IPage pageInfo = paramsCollectManifestHistoryEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列 + String paramsManifestId = paramsCollectManifestHistoryEO.getParamsManifestId(); + + IPage pageInfo = page(page, queryWrapper); // 查询固定列 +// IPage pageInfo = paramsCollectManifestHistoryEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列 List list = pageInfo.getRecords(); // 查询固定列 List paramsConfigEOList = paramsConfigHistoryEOService.queryList(paramsManifestId); // 查询配置列 List paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList()); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java index 49a3b33ab..51fe947a7 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java @@ -23,6 +23,7 @@ import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO; import com.jero.modules.cert.report.service.IParamsReportEOService; import com.jero.modules.cert.template.entity.ParamsInfoPublishEO; import com.jero.modules.cert.template.entity.ParamsTemplateEO; +import com.jero.modules.cert.template.enums.ControlTypeEnum; import com.jero.modules.cert.template.service.IParamsInfoPublishEOService; import com.jero.modules.cert.template.service.IParamsTemplateEOService; import com.jero.modules.project.entity.ProjectRelatedPersonnel; @@ -126,14 +127,16 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl + @@ -104,6 +105,7 @@ prd.nio_number as nio_number, prd.params_name as params_name, prd.control_type as control_type, + prd.title_default_value as title_default_value, rccpi.params_number as cert_number, rccpi.params_name as cert_params_name from params_report_detail prd diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java index 629c3eebd..1881e36a6 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java @@ -411,6 +411,17 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl record1 : dataList) { String paramsCollectManifestId = (String) record1.get("id"); + String controlType = (String) record1.get("control_type"); + String titleDefaultValue = (String) record1.get("title_default_value"); if (CollectionUtil.isNotEmpty(paramsConfigEOList)) { List fileList = new ArrayList<>(); @@ -832,70 +845,78 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImplconfigIdList.contains(e.getId())).collect(Collectors.toList()); // 过滤出要导出的配置列 paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置 - String paramsConfigId = paramsConfigEO.getId(); - ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据 - StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 - if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { - configDataBuilder.append(paramsConfigDataEO.getTextData()).append("&"); - } - if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { - configDataBuilder.append(paramsConfigDataEO.getPullData()).append("&"); - } - if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { - List ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId()); - if (CollectionUtil.isNotEmpty(ossFileList)) { - configDataBuilder.append(ossFileList.get(0).getFileName()).append("&"); - - fileList.addAll(ossFileList); + if (ControlTypeEnum.Title.getValue().equals(controlType)) { + record1.put(paramsConfigEO.getId(), titleDefaultValue); + } else { + String paramsConfigId = paramsConfigEO.getId(); + ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据 + StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 + if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + configDataBuilder.append(paramsConfigDataEO.getTextData()).append("&"); } - } + if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + configDataBuilder.append(paramsConfigDataEO.getPullData()).append("&"); + } + if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + List ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId()); + if (CollectionUtil.isNotEmpty(ossFileList)) { + configDataBuilder.append(ossFileList.get(0).getFileName()).append("&"); - String configData = configDataBuilder.toString(); - if (configData.contains("&")) { - configData = configData.substring(0, configData.lastIndexOf("&")); - } + fileList.addAll(ossFileList); + } + } - record1.put(paramsConfigEO.getId(), configData); + String configData = configDataBuilder.toString(); + if (configData.contains("&")) { + configData = configData.substring(0, configData.lastIndexOf("&")); + } + + record1.put(paramsConfigEO.getId(), configData); + } }); } else if ("2".equals(paramsReportDetailVO.getCombineFlag())) { // 合并 String configData = ""; - List paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId); + if (ControlTypeEnum.Title.getValue().equals(controlType)) { + record1.put("params_value", titleDefaultValue); + } else { + List paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId); - String textDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getTextData())) - .map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); + String textDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getTextData())) + .map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); - String pullDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getPullData())) - .map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); + String pullDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getPullData())) + .map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); - List fileNameList = new ArrayList<>(); - paramsReportConfigDataEOS.forEach(paramsReportConfigDataEO -> { - if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) { - List ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId()); - if (CollectionUtil.isNotEmpty(ossFileList)) { - fileNameList.add(ossFileList.get(0).getFileName()); + List fileNameList = new ArrayList<>(); + paramsReportConfigDataEOS.forEach(paramsReportConfigDataEO -> { + if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) { + List ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId()); + if (CollectionUtil.isNotEmpty(ossFileList)) { + fileNameList.add(ossFileList.get(0).getFileName()); - fileList.addAll(ossFileList); + fileList.addAll(ossFileList); + } } + }); + + StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 + if (StringUtils.isNotEmpty(textDatas)) { + configDataBuilder.append(textDatas).append("&"); } - }); + if (StringUtils.isNotEmpty(pullDatas)) { + configDataBuilder.append(pullDatas).append("&"); + } + if (CollectionUtil.isNotEmpty(fileNameList)) { + configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("&"); + } + configData = configDataBuilder.toString(); + if (configData.contains("&")) { + configData = configData.substring(0, configData.lastIndexOf("&")); + } + record1.put("params_value", configData); - StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 - if (StringUtils.isNotEmpty(textDatas)) { - configDataBuilder.append(textDatas).append("&"); } - if (StringUtils.isNotEmpty(pullDatas)) { - configDataBuilder.append(pullDatas).append("&"); - } - if (CollectionUtil.isNotEmpty(fileNameList)) { - configDataBuilder.append(StringUtils.join(fileNameList, ",")).append("&"); - } - configData = configDataBuilder.toString(); - if (configData.contains("&")) { - configData = configData.substring(0, configData.lastIndexOf("&")); - } - record1.put("params_value", configData); - } record1.put("fileList", fileList); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java index 548885b9d..1df1f9a2e 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java @@ -106,7 +106,7 @@ public class ParamsInfoEO implements Serializable { private String certCategory; /**控件类型*/ - @Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10"}) + @Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10","标题_11"}) @ApiModelProperty(value = "控件类型") private String controlType; @@ -120,7 +120,12 @@ public class ParamsInfoEO implements Serializable { @ApiModelProperty(value = "控件备选值") private String controlValues; - /**附件模板*/ + /**标题默认值*/ + @Excel(name = "默认值", width = 15) + @ApiModelProperty(value = "标题默认值") + private String titleDefaultValue; + + /**附件模板*/ @ApiModelProperty(value = "附件模板") private String fileTemplateConnectId; diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java index 3beeb783d..9304ce180 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java @@ -20,7 +20,8 @@ public enum ControlTypeEnum { TEXT_FILE("文本+附件","Text+File","7"), PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"), PULL_MORE_FILE("下拉多选+附件","Pull more+File","9"), - TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10"); + TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10"), + Title("标题","Title","11"); String name; String enName; diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml index 9b653f43e..7416091d5 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml @@ -21,6 +21,7 @@ + @@ -43,6 +44,7 @@ + @@ -74,6 +76,7 @@ + @@ -105,6 +108,7 @@ pi.control_verify as control_verify, pi.file_template_connect_id as file_template_connect_id, pi.params_template_id as params_template_id, + pi.title_default_value as title_default_value, ccpi.id as ccpi_id, ccpi.params_number as ccpi_params_number, ccpi.params_name as ccpi_params_name, diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml index a41f24b12..4b3361698 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml @@ -22,6 +22,7 @@ +