【数据资产】
查询企业认证附件和领域
Showing
3 changed files
with
140 additions
and
0 deletions
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | |||
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | import lombok.Data; | ||
| 6 | |||
| 7 | /** | ||
| 8 | * @program: ms-zcgl-system-manager-service | ||
| 9 | * @description: TODO | ||
| 10 | * @author: lixiang | ||
| 11 | * @create: 2023-10-19 16:28 | ||
| 12 | **/ | ||
| 13 | @Data | ||
| 14 | public class DataDictDetailVO { | ||
| 15 | |||
| 16 | /** 系统唯一标识 */ | ||
| 17 | @Schema(title="系统唯一标识") | ||
| 18 | private String guid; | ||
| 19 | |||
| 20 | /** 参数名称 */ | ||
| 21 | @Schema(title="参数名称") | ||
| 22 | private String paramName; | ||
| 23 | |||
| 24 | /** 参数编码 */ | ||
| 25 | @Schema(title="参数编码") | ||
| 26 | private String paramCode; | ||
| 27 | |||
| 28 | /** 参数类型(用途归类) */ | ||
| 29 | @Schema(title="参数类型(用途归类)") | ||
| 30 | private String paramType; | ||
| 31 | |||
| 32 | /** 参数值 */ | ||
| 33 | @Schema(title="参数值") | ||
| 34 | private String paramValue; | ||
| 35 | |||
| 36 | /** 排序 */ | ||
| 37 | @Schema(title="排序") | ||
| 38 | private Integer orderNum; | ||
| 39 | |||
| 40 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | import lombok.Data; | ||
| 6 | |||
| 7 | import java.util.List; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * @program: @program: | ||
| 11 | * @description: 数据字典返回对象 | ||
| 12 | * @author: csbrAuthor | ||
| 13 | * @create: 2023-08-25 | ||
| 14 | **/ | ||
| 15 | @Data | ||
| 16 | @Schema(title="数据字典返回对象") | ||
| 17 | public class DataDictVO { | ||
| 18 | |||
| 19 | /** 系统唯一标识 */ | ||
| 20 | @Schema(title="系统唯一标识") | ||
| 21 | private String guid; | ||
| 22 | |||
| 23 | /** 参数类型(用途归类) */ | ||
| 24 | @Schema(title="参数类型(用途归类)") | ||
| 25 | private String paramType; | ||
| 26 | |||
| 27 | /** 参数编码 */ | ||
| 28 | @Schema(title="参数编码") | ||
| 29 | private String paramCode; | ||
| 30 | |||
| 31 | /** 参数名称 */ | ||
| 32 | @Schema(title="参数名称") | ||
| 33 | private String paramName; | ||
| 34 | |||
| 35 | /** 描述 */ | ||
| 36 | @Schema(title="描述") | ||
| 37 | private String remarks; | ||
| 38 | |||
| 39 | /** 参数值 */ | ||
| 40 | @Schema(title="参数值") | ||
| 41 | private String paramValue; | ||
| 42 | |||
| 43 | /** 排序 */ | ||
| 44 | @Schema(title="排序") | ||
| 45 | private Integer orderNum; | ||
| 46 | |||
| 47 | /** 修改姓名 */ | ||
| 48 | @Schema(title="修改姓名") | ||
| 49 | private String updateUserName; | ||
| 50 | |||
| 51 | /** 修改时间 */ | ||
| 52 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 53 | @Schema(title="修改时间") | ||
| 54 | private String updateTime; | ||
| 55 | |||
| 56 | @Schema(title="系统参数子明细") | ||
| 57 | List<DataDictDetailVO> detailVOList; | ||
| 58 | |||
| 59 | |||
| 60 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject; | ... | @@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject; |
| 6 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 6 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 7 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 7 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 8 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 8 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 9 | import com.csbr.cloud.common.entity.DictModel; | ||
| 10 | import com.csbr.cloud.common.enums.RedisKeyEnum; | ||
| 9 | import com.csbr.cloud.common.enums.SystemError; | 11 | import com.csbr.cloud.common.enums.SystemError; |
| 10 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; | 12 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; |
| 11 | import com.csbr.cloud.common.exception.CsbrSystemException; | 13 | import com.csbr.cloud.common.exception.CsbrSystemException; |
| ... | @@ -784,6 +786,23 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -784,6 +786,23 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 784 | check(rqVO); | 786 | check(rqVO); |
| 785 | //endregion | 787 | //endregion |
| 786 | // 校验附加信息 | 788 | // 校验附加信息 |
| 789 | List<EnterpriseAttachmentRQVO> attachmentRQVOS = rqVO.getAttachmentRQVOS(); | ||
| 790 | if (ObjectUtils.isNotEmpty(attachmentRQVOS)) { | ||
| 791 | List<DataDictVO> dataDictVOS = getSystemParamsList("开发主体附件类型"); | ||
| 792 | Map<String, String> dataDictMap = new HashMap<>(); | ||
| 793 | if (ObjectUtils.isNotEmpty(dataDictVOS)) { | ||
| 794 | dataDictMap = dataDictVOS.stream().collect(Collectors.toMap(DataDictVO::getParamValue, DataDictVO::getParamName)); | ||
| 795 | } | ||
| 796 | for (EnterpriseAttachmentRQVO attachmentRQVO : attachmentRQVOS) { | ||
| 797 | if (StringUtils.isNotEmpty(attachmentRQVO.getFileName()) && attachmentRQVO.getFileName().length() > 100) { | ||
| 798 | String fileType = ""; | ||
| 799 | if (ObjectUtils.isNotEmpty(dataDictMap) && dataDictMap.containsKey(attachmentRQVO.getFileType())) { | ||
| 800 | fileType = dataDictMap.get(attachmentRQVO.getFileType()); | ||
| 801 | } | ||
| 802 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, fileType + "上传的文件名称长度超过100."); | ||
| 803 | } | ||
| 804 | } | ||
| 805 | } | ||
| 787 | if (isRequired) { | 806 | if (isRequired) { |
| 788 | if (ObjectUtils.isEmpty(rqVO.getAttachmentRQVOS())) { | 807 | if (ObjectUtils.isEmpty(rqVO.getAttachmentRQVOS())) { |
| 789 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, "附件信息不能为空."); | 808 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, "附件信息不能为空."); |
| ... | @@ -825,6 +844,27 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -825,6 +844,27 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 825 | //endregion 5.过程处理 | 844 | //endregion 5.过程处理 |
| 826 | } | 845 | } |
| 827 | 846 | ||
| 847 | public List<DataDictVO> getSystemParamsList(String dictType){ | ||
| 848 | if(StringUtils.isEmpty(dictType)){ | ||
| 849 | throw new CsbrSystemException(SystemError.ERROR,"数据字典类型不能为空。"); | ||
| 850 | } | ||
| 851 | Object dictListValue= redisUtil.get(String.format(RedisKeyEnum.DICT_ITEM_DATA.getCode(), dictType)); | ||
| 852 | if(ObjectUtils.isNotEmpty(dictListValue)) { | ||
| 853 | List<DictModel> dictModels = (List<DictModel>) dictListValue; | ||
| 854 | return dictModels.stream().map(d->getDataDictVO(d)).collect(Collectors.toList()); | ||
| 855 | } | ||
| 856 | return new ArrayList<>(); | ||
| 857 | } | ||
| 858 | |||
| 859 | private DataDictVO getDataDictVO(DictModel dm) { | ||
| 860 | DataDictVO vo = new DataDictVO(); | ||
| 861 | vo.setGuid(dm.getGuid()); | ||
| 862 | vo.setParamName(dm.getText()); | ||
| 863 | vo.setParamValue(dm.getValue()); | ||
| 864 | vo.setRemarks(dm.getRemarks()); | ||
| 865 | return vo; | ||
| 866 | } | ||
| 867 | |||
| 828 | /** | 868 | /** |
| 829 | * 企业信息新增后置处理 | 869 | * 企业信息新增后置处理 |
| 830 | * @author xcq | 870 | * @author xcq | ... | ... |
-
Please register or sign in to post a comment