Merge branch 'develop-v1.0.6' into feature-tds-v1.0.0
# Conflicts: # src/main/java/com/csbr/qingcloud/portal/service/EnterpriseService.java # src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
Showing
22 changed files
with
1454 additions
and
0 deletions
| 1 | package com.csbr.qingcloud.portal.controller; | ||
| 2 | |||
| 3 | import com.csbr.qingcloud.portal.domain.vo.dataExchange.*; | ||
| 4 | import com.csbr.qingcloud.portal.service.EnterpriseAttachmentService; | ||
| 5 | import com.csbr.qingcloud.portal.service.EnterpriseService; | ||
| 6 | import io.swagger.v3.oas.annotations.Operation; | ||
| 7 | import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 8 | import jakarta.annotation.Resource; | ||
| 9 | import jakarta.validation.Valid; | ||
| 10 | import org.springframework.web.bind.annotation.PostMapping; | ||
| 11 | import org.springframework.web.bind.annotation.RequestBody; | ||
| 12 | import org.springframework.web.bind.annotation.RequestMapping; | ||
| 13 | import org.springframework.web.bind.annotation.RestController; | ||
| 14 | |||
| 15 | /** | ||
| 16 | * @program: | ||
| 17 | * @description: 数据所交互控制器-控制器 | ||
| 18 | * @author: makejava | ||
| 19 | * @create: 2025-03-24 17:29 | ||
| 20 | **/ | ||
| 21 | @RestController | ||
| 22 | @RequestMapping("/data-exchange") | ||
| 23 | @Tag(name = "数据所交互控制器-控制器") | ||
| 24 | public class DataExchangeController { | ||
| 25 | |||
| 26 | @Resource | ||
| 27 | private EnterpriseService enterpriseService; | ||
| 28 | |||
| 29 | @Resource | ||
| 30 | private EnterpriseAttachmentService enterpriseAttachmentService; | ||
| 31 | |||
| 32 | @PostMapping("/enterprise-data") | ||
| 33 | @Operation(summary= "开发主体查询") | ||
| 34 | public JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> enterpriseData(@RequestBody @Valid JSBaseRQVO<JSEnterpriseQueryVO> queryVO) { | ||
| 35 | JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> pageVO = enterpriseService.enterpriseData(queryVO); | ||
| 36 | return pageVO; | ||
| 37 | } | ||
| 38 | |||
| 39 | @PostMapping("/enterprise-attach") | ||
| 40 | @Operation(summary= "开发主体附件查询") | ||
| 41 | public JSExchageCommonRes<JSExchagePageListVO<JSAttachRSVO>> enterpriseAttach(@RequestBody @Valid JSBaseRQVO<JSAttachQueryVO> queryVO) { | ||
| 42 | JSExchageCommonRes<JSExchagePageListVO<JSAttachRSVO>> pageVO = enterpriseAttachmentService.enterpriseAttach(queryVO); | ||
| 43 | return pageVO; | ||
| 44 | } | ||
| 45 | |||
| 46 | //endregion | ||
| 47 | |||
| 48 | } |
| 1 | package com.csbr.qingcloud.portal.controller; | ||
| 2 | |||
| 3 | import com.csbr.cloud.common.response.CommonRes; | ||
| 4 | import csbr.cloud.entity.annotation.SystemLog; | ||
| 5 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
| 6 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentQueryVO; | ||
| 7 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO; | ||
| 8 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO; | ||
| 9 | import com.csbr.qingcloud.portal.service.EnterpriseAttachmentService; | ||
| 10 | import io.swagger.v3.oas.annotations.Operation; | ||
| 11 | import io.swagger.v3.oas.annotations.Parameter; | ||
| 12 | import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 13 | import jakarta.annotation.Resource; | ||
| 14 | import jakarta.validation.Valid; | ||
| 15 | import org.springframework.web.bind.annotation.*; | ||
| 16 | |||
| 17 | import java.util.List; | ||
| 18 | |||
| 19 | /** | ||
| 20 | * @program: | ||
| 21 | * @description: 开发主体附件信息-控制器 | ||
| 22 | * @author: makejava | ||
| 23 | * @create: 2025-09-05 13:50 | ||
| 24 | **/ | ||
| 25 | @RestController | ||
| 26 | @RequestMapping("/enterprise-attachment") | ||
| 27 | @Tag(name = "开发主体附件信息-控制器") | ||
| 28 | public class EnterpriseAttachmentController { | ||
| 29 | |||
| 30 | @Resource | ||
| 31 | private EnterpriseAttachmentService enterpriseAttachmentService; | ||
| 32 | |||
| 33 | //region 基本操作 | ||
| 34 | |||
| 35 | @PostMapping("/save") | ||
| 36 | @SystemLog(value = "开发主体附件信息-新增") | ||
| 37 | @Operation(summary = "开发主体附件信息-新增") | ||
| 38 | public CommonRes<Boolean> saveEnterpriseAttachment(@RequestBody @Valid EnterpriseAttachmentRQVO vo) { | ||
| 39 | enterpriseAttachmentService.saveEnterpriseAttachment(vo); | ||
| 40 | return CommonRes.success(true); | ||
| 41 | } | ||
| 42 | |||
| 43 | @PutMapping("/update") | ||
| 44 | @SystemLog(value = "开发主体附件信息-修改") | ||
| 45 | @Operation(summary = "开发主体附件信息-修改") | ||
| 46 | public CommonRes<Boolean> updateEnterpriseAttachment(@RequestBody @Valid EnterpriseAttachmentRQVO vo) { | ||
| 47 | enterpriseAttachmentService.updateEnterpriseAttachment(vo); | ||
| 48 | return CommonRes.success(true); | ||
| 49 | } | ||
| 50 | |||
| 51 | @DeleteMapping("/delete") | ||
| 52 | @SystemLog(value = "开发主体附件信息-批量删除") | ||
| 53 | @Operation(summary = "开发主体附件信息-批量删除") | ||
| 54 | public CommonRes<Boolean> removeByGuids(@RequestBody List<String> guids) { | ||
| 55 | enterpriseAttachmentService.removeByGuids(guids); | ||
| 56 | return CommonRes.success(true); | ||
| 57 | } | ||
| 58 | |||
| 59 | @PostMapping("/page-list") | ||
| 60 | @SystemLog(value = "开发主体附件信息-分页") | ||
| 61 | @Operation(summary = "开发主体附件信息-分页") | ||
| 62 | public CommonRes<PageListVO<EnterpriseAttachmentRSVO>> pageList(@RequestBody @Valid EnterpriseAttachmentQueryVO queryVO) { | ||
| 63 | PageListVO<EnterpriseAttachmentRSVO> pageVO = enterpriseAttachmentService.pageList(queryVO); | ||
| 64 | return CommonRes.success(pageVO); | ||
| 65 | } | ||
| 66 | |||
| 67 | @GetMapping("/detail") | ||
| 68 | @SystemLog(value = "开发主体附件信息-详情") | ||
| 69 | @Operation( | ||
| 70 | summary = "开发主体附件信息-详情", | ||
| 71 | parameters = { | ||
| 72 | @Parameter(name = "guid", description = "开发主体附件信息唯一标识", required = true)} | ||
| 73 | ) | ||
| 74 | public CommonRes<EnterpriseAttachmentRSVO> getEnterpriseAttachmentDetail(@RequestParam String guid) { | ||
| 75 | EnterpriseAttachmentRSVO vo = enterpriseAttachmentService.getEnterpriseAttachmentDetail(guid); | ||
| 76 | return CommonRes.success(vo); | ||
| 77 | } | ||
| 78 | |||
| 79 | @GetMapping("/get-fileUrl") | ||
| 80 | @SystemLog(value = "开发主体附件信息-查询文件Url地址") | ||
| 81 | @Operation( | ||
| 82 | summary = "开发主体附件信息-查询文件Url地址", | ||
| 83 | parameters = { | ||
| 84 | @Parameter(name = "fileId", description = "文件Id", required = true)}, | ||
| 85 | hidden = true | ||
| 86 | ) | ||
| 87 | public CommonRes<String> getFileUrl(@RequestParam String fileId) { | ||
| 88 | String fileUrl = enterpriseAttachmentService.getEnterpriseAttachmentUrl(fileId); | ||
| 89 | return CommonRes.success(fileUrl); | ||
| 90 | } | ||
| 91 | |||
| 92 | //endregion | ||
| 93 | |||
| 94 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | import csbr.cloud.entity.domain.base.dto.BasePageDTO; | ||
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | import jdk.jfr.Name; | ||
| 6 | import lombok.EqualsAndHashCode; | ||
| 7 | import lombok.Data; | ||
| 8 | import java.math.BigDecimal; | ||
| 9 | import java.util.Date; | ||
| 10 | |||
| 11 | /** | ||
| 12 | * @program: | ||
| 13 | * @description: 开发主体附件信息查询参数 | ||
| 14 | * @author: makejava | ||
| 15 | * @create: 2025-09-05 13:50 | ||
| 16 | **/ | ||
| 17 | @EqualsAndHashCode(callSuper = true) | ||
| 18 | @Data | ||
| 19 | @Schema(title = "开发主体附件信息查询参数") | ||
| 20 | public class EnterpriseAttachmentQueryVO extends BasePageDTO { | ||
| 21 | /** | ||
| 22 | * 企业认证唯一标识 | ||
| 23 | */ | ||
| 24 | @Name("企业认证唯一标识") | ||
| 25 | private String enterpriseGuid; | ||
| 26 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 5 | import jakarta.validation.constraints.Size; | ||
| 6 | import lombok.Data; | ||
| 7 | import java.math.BigDecimal; | ||
| 8 | import java.util.Date; | ||
| 9 | |||
| 10 | /** | ||
| 11 | * @program: | ||
| 12 | * @description: 开发主体附件信息新增、修改参数 | ||
| 13 | * @author: makejava | ||
| 14 | * @create: 2025-09-05 13:50 | ||
| 15 | **/ | ||
| 16 | @Data | ||
| 17 | @Schema(title = "开发主体附件信息新增、修改参数") | ||
| 18 | public class EnterpriseAttachmentRQVO { | ||
| 19 | |||
| 20 | /** | ||
| 21 | * 系统唯一标识 | ||
| 22 | */ | ||
| 23 | @Schema(description = "系统唯一标识") | ||
| 24 | @Size(max = 32, message = "系统唯一标识长度超过32") | ||
| 25 | private String guid; | ||
| 26 | |||
| 27 | /** | ||
| 28 | * 企业唯一标识 | ||
| 29 | */ | ||
| 30 | @Schema(description = "企业唯一标识") | ||
| 31 | @Size(max = 32, message = "企业唯一标识长度超过32") | ||
| 32 | private String tenantGuid; | ||
| 33 | |||
| 34 | /** | ||
| 35 | * 企业认证唯一标识 | ||
| 36 | */ | ||
| 37 | @Schema(description = "企业认证唯一标识") | ||
| 38 | @Size(max = 32, message = "企业认证唯一标识长度超过32") | ||
| 39 | private String enterpriseGuid; | ||
| 40 | |||
| 41 | /** | ||
| 42 | * 文件名称 | ||
| 43 | */ | ||
| 44 | @Schema(description = "文件名称") | ||
| 45 | @Size(max = 50, message = "文件名称长度超过50") | ||
| 46 | private String fileName; | ||
| 47 | |||
| 48 | /** | ||
| 49 | * 文件类型【详情 开发主体附件类型数据字典】 | ||
| 50 | */ | ||
| 51 | @Schema(description = "文件类型【详情 开发主体附件类型数据字典】") | ||
| 52 | @Size(max = 10, message = "文件类型【详情 开发主体附件类型数据字典】长度超过10") | ||
| 53 | private String fileType; | ||
| 54 | |||
| 55 | /** | ||
| 56 | * 文件大小 | ||
| 57 | */ | ||
| 58 | @Schema(description = "文件大小") | ||
| 59 | private BigDecimal fileSize; | ||
| 60 | |||
| 61 | /** | ||
| 62 | * 文件地址 | ||
| 63 | */ | ||
| 64 | @Schema(description = "文件地址") | ||
| 65 | @Size(max = 500, message = "文件地址长度超过500") | ||
| 66 | private String fileUrl; | ||
| 67 | |||
| 68 | /******** 库表存储属性 需处理 *****/ | ||
| 69 | |||
| 70 | /******** 自定义扩展 *****/ | ||
| 71 | |||
| 72 | /******** 子对象 *****/ | ||
| 73 | |||
| 74 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 5 | import lombok.Data; | ||
| 6 | import java.math.BigDecimal; | ||
| 7 | import java.util.Date; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * @program: | ||
| 11 | * @description: 开发主体附件信息返回参数 | ||
| 12 | * @author: makejava | ||
| 13 | * @create: 2025-09-05 13:50 | ||
| 14 | **/ | ||
| 15 | @Data | ||
| 16 | @Schema(title = "开发主体附件信息返回参数") | ||
| 17 | public class EnterpriseAttachmentRSVO { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * 系统唯一标识 | ||
| 21 | */ | ||
| 22 | @Schema(description = "系统唯一标识") | ||
| 23 | private String guid; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * 企业唯一标识 | ||
| 27 | */ | ||
| 28 | @Schema(description = "企业唯一标识") | ||
| 29 | private String tenantGuid; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * 企业认证唯一标识 | ||
| 33 | */ | ||
| 34 | @Schema(description = "企业认证唯一标识") | ||
| 35 | private String enterpriseGuid; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * 文件名称 | ||
| 39 | */ | ||
| 40 | @Schema(description = "文件名称") | ||
| 41 | private String fileName; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * 文件类型【详情 开发主体附件类型数据字典】 | ||
| 45 | */ | ||
| 46 | @Schema(description = "文件类型【详情 开发主体附件类型数据字典】") | ||
| 47 | private String fileType; | ||
| 48 | |||
| 49 | /** | ||
| 50 | * 文件大小 | ||
| 51 | */ | ||
| 52 | @Schema(description = "文件大小") | ||
| 53 | private BigDecimal fileSize; | ||
| 54 | |||
| 55 | /** | ||
| 56 | * 文件地址 | ||
| 57 | */ | ||
| 58 | @Schema(description = "文件地址") | ||
| 59 | private String fileUrl; | ||
| 60 | |||
| 61 | /******** 库表存储属性 需处理 *****/ | ||
| 62 | |||
| 63 | /******** 自定义扩展 *****/ | ||
| 64 | |||
| 65 | /******** 子对象 *****/ | ||
| 66 | |||
| 67 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo.dataExchange; | ||
| 2 | |||
| 3 | |||
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | import lombok.Data; | ||
| 6 | |||
| 7 | /** | ||
| 8 | * @program: | ||
| 9 | * @description: 江苏开发主体附件查询参数 | ||
| 10 | * @author: makejava | ||
| 11 | * @create: 2025-09-05 10:35 | ||
| 12 | **/ | ||
| 13 | @Data | ||
| 14 | @Schema(title = "江苏开发主体附件查询参数") | ||
| 15 | public class JSAttachQueryVO extends JSPageQueryVO { | ||
| 16 | |||
| 17 | /** | ||
| 18 | * 如有需要则填写开发主体名称 | ||
| 19 | */ | ||
| 20 | @Schema(title = "如有需要则填写开发主体名称") | ||
| 21 | private String entityName; | ||
| 22 | |||
| 23 | /** | ||
| 24 | * 如有需要则填写统一社会信用代码 | ||
| 25 | */ | ||
| 26 | @Schema(title = "如有需要则填写统一社会信用代码") | ||
| 27 | private String uscc; | ||
| 28 | |||
| 29 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo.dataExchange; | ||
| 2 | |||
| 3 | |||
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | import lombok.Data; | ||
| 6 | |||
| 7 | import java.math.BigDecimal; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * @program: | ||
| 11 | * @description: 江苏开发主体附件返回参数 | ||
| 12 | * @author: makejava | ||
| 13 | * @create: 2025-09-05 10:35 | ||
| 14 | **/ | ||
| 15 | @Data | ||
| 16 | @Schema(title = "江苏开发主体附件返回参数") | ||
| 17 | public class JSAttachRSVO { | ||
| 18 | /** | ||
| 19 | * 文件ID | ||
| 20 | */ | ||
| 21 | @Schema(description = "文件ID") | ||
| 22 | private String fileId; | ||
| 23 | /** | ||
| 24 | * 文件名称 | ||
| 25 | */ | ||
| 26 | @Schema(description = "文件名称") | ||
| 27 | private String fileName; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * 文件类型【详情 开发主体附件类型数据字典】 | ||
| 31 | */ | ||
| 32 | @Schema(description = "文件类型【详情 开发主体附件类型数据字典】") | ||
| 33 | private String fileType; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * 文件大小 | ||
| 37 | */ | ||
| 38 | @Schema(description = "文件大小") | ||
| 39 | private BigDecimal fileSize; | ||
| 40 | |||
| 41 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo.dataExchange; | ||
| 2 | |||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import lombok.Data; | ||
| 5 | |||
| 6 | /** | ||
| 7 | * @program: | ||
| 8 | * @description: 江苏开发主体查询参数 | ||
| 9 | * @author: makejava | ||
| 10 | * @create: 2025-09-05 10:35 | ||
| 11 | **/ | ||
| 12 | @Data | ||
| 13 | @Schema(title = "江苏开发主体查询参数") | ||
| 14 | public class JSBaseRQVO<T> { | ||
| 15 | |||
| 16 | /** | ||
| 17 | * 请求方法名 | ||
| 18 | */ | ||
| 19 | @Schema(title = "请求方法名") | ||
| 20 | private String method; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * 请求参数 | ||
| 24 | */ | ||
| 25 | @Schema(title = "请求参数") | ||
| 26 | private T bizParam; | ||
| 27 | |||
| 28 | private String appKey; | ||
| 29 | } | ||
| 30 |
| 1 | package com.csbr.qingcloud.portal.domain.vo.dataExchange; | ||
| 2 | |||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import lombok.Data; | ||
| 5 | |||
| 6 | import java.util.List; | ||
| 7 | import java.util.Map; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * @program: | ||
| 11 | * @description: 江苏数交所开发主体申请的领域列表参数 | ||
| 12 | * @author: makejava | ||
| 13 | * @create: 2025-09-05 10:35 | ||
| 14 | **/ | ||
| 15 | @Data | ||
| 16 | @Schema(title = "江苏数交所开发主体申请的领域列表参数") | ||
| 17 | public class JSDomainRSVO { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * 领域代码 | ||
| 21 | */ | ||
| 22 | @Schema(description = "领域代码") | ||
| 23 | private String domainId; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * 领域名称 | ||
| 27 | */ | ||
| 28 | @Schema(description = "领域名称") | ||
| 29 | private String domainName; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * 场景列表,scenarioName,scenarioCode | ||
| 33 | */ | ||
| 34 | @Schema(description = "场景列表") | ||
| 35 | private List<Map<String,String>> scenarioList; | ||
| 36 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo.dataExchange; | ||
| 2 | |||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import lombok.Data; | ||
| 5 | |||
| 6 | import java.util.Date; | ||
| 7 | |||
| 8 | /** | ||
| 9 | * @program: | ||
| 10 | * @description: 江苏开发主体查询参数 | ||
| 11 | * @author: makejava | ||
| 12 | * @create: 2025-09-05 10:35 | ||
| 13 | **/ | ||
| 14 | @Data | ||
| 15 | @Schema(title = "江苏开发主体查询参数") | ||
| 16 | public class JSEnterpriseQueryVO extends JSPageQueryVO { | ||
| 17 | |||
| 18 | /** | ||
| 19 | * 如有需要则填写开发主体名称 | ||
| 20 | */ | ||
| 21 | @Schema(title = "如有需要则填写开发主体名称") | ||
| 22 | private String entityName; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * 如有需要则填写统一社会信用代码 | ||
| 26 | */ | ||
| 27 | @Schema(title = "如有需要则填写统一社会信用代码") | ||
| 28 | private String uscc; | ||
| 29 | |||
| 30 | |||
| 31 | /** | ||
| 32 | * 产品更新起始时间 | ||
| 33 | */ | ||
| 34 | private Date productUpdateStartTime; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * 产品更新截止时间 | ||
| 38 | */ | ||
| 39 | private Date productUpdateEndTime; | ||
| 40 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo.dataExchange; | ||
| 2 | |||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import lombok.Data; | ||
| 5 | |||
| 6 | import java.util.List; | ||
| 7 | |||
| 8 | /** | ||
| 9 | * @program: | ||
| 10 | * @description: 江苏开发主体返回参数 | ||
| 11 | * @author: makejava | ||
| 12 | * @create: 2025-09-05 10:35 | ||
| 13 | **/ | ||
| 14 | @Data | ||
| 15 | @Schema(title = "江苏开发主体返回参数") | ||
| 16 | public class JSEnterpriseRSVO { | ||
| 17 | |||
| 18 | /** | ||
| 19 | * 主体名称 | ||
| 20 | */ | ||
| 21 | @Schema(title = "主体名称") | ||
| 22 | private String institutionName; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * 统一社会信用代码 | ||
| 26 | */ | ||
| 27 | @Schema(title = "统一社会信用代码") | ||
| 28 | private String institutionCode; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * 组织机构性质 | ||
| 32 | */ | ||
| 33 | @Schema(title = "组织机构性质") | ||
| 34 | private String institutionType; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * 国家 | ||
| 38 | */ | ||
| 39 | @Schema(title = "国家") | ||
| 40 | private String country; | ||
| 41 | |||
| 42 | /** | ||
| 43 | * 注册地 | ||
| 44 | */ | ||
| 45 | @Schema(title = "注册地") | ||
| 46 | private String region; | ||
| 47 | |||
| 48 | /** | ||
| 49 | * 详细地址 | ||
| 50 | */ | ||
| 51 | @Schema(title = "详细地址") | ||
| 52 | private String detailedAddress; | ||
| 53 | |||
| 54 | /** | ||
| 55 | * 法人名称 | ||
| 56 | */ | ||
| 57 | @Schema(title = "法人名称") | ||
| 58 | private String corpnName; | ||
| 59 | |||
| 60 | /** | ||
| 61 | * 领域列表 | ||
| 62 | */ | ||
| 63 | @Schema(title = "领域列表") | ||
| 64 | private List<JSDomainRSVO> domainList; | ||
| 65 | } | ||
| 66 |
| 1 | package com.csbr.qingcloud.portal.domain.vo.dataExchange; | ||
| 2 | |||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import lombok.Data; | ||
| 5 | |||
| 6 | import java.io.Serializable; | ||
| 7 | |||
| 8 | /** | ||
| 9 | * @program: | ||
| 10 | * @description: 江苏数交所返回结果 | ||
| 11 | * @author: makejava | ||
| 12 | * @create: 2025-09-05 10:35 | ||
| 13 | **/ | ||
| 14 | @Data | ||
| 15 | @Schema(title = "江苏数交所返回结果") | ||
| 16 | public class JSExchageCommonRes<T> implements Serializable { | ||
| 17 | |||
| 18 | /** | ||
| 19 | * 返回码,0为成功,其它为失败 | ||
| 20 | */ | ||
| 21 | @Schema(description = "返回码,0为成功,其它为失败") | ||
| 22 | private Integer code; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * 返回描述 | ||
| 26 | */ | ||
| 27 | @Schema(description = "返回描述") | ||
| 28 | private String message; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * 数据 | ||
| 32 | */ | ||
| 33 | @Schema(description = "数据") | ||
| 34 | private T data; | ||
| 35 | |||
| 36 | public JSExchageCommonRes(Integer code,T data){ | ||
| 37 | this.code = code; | ||
| 38 | this.data = data; | ||
| 39 | } | ||
| 40 | |||
| 41 | public JSExchageCommonRes(Integer code,String message){ | ||
| 42 | this.code = code; | ||
| 43 | this.message = message; | ||
| 44 | } | ||
| 45 | |||
| 46 | /** | ||
| 47 | * 返回成功 | ||
| 48 | * @param data | ||
| 49 | * @param <T> | ||
| 50 | * @return | ||
| 51 | */ | ||
| 52 | public static <T> JSExchageCommonRes<T> success(T data) { | ||
| 53 | return new JSExchageCommonRes<T>(0,data); | ||
| 54 | } | ||
| 55 | |||
| 56 | /** | ||
| 57 | * 返回失败 | ||
| 58 | * @param message | ||
| 59 | * @return | ||
| 60 | */ | ||
| 61 | public static JSExchageCommonRes fail(String message) { | ||
| 62 | return new JSExchageCommonRes(-1,message); | ||
| 63 | } | ||
| 64 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo.dataExchange; | ||
| 2 | |||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import lombok.Data; | ||
| 5 | |||
| 6 | import java.io.Serializable; | ||
| 7 | import java.util.List; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * @program: | ||
| 11 | * @description: 江苏数交所返回分页数据 | ||
| 12 | * @author: makejava | ||
| 13 | * @create: 2025-09-05 10:35 | ||
| 14 | **/ | ||
| 15 | @Data | ||
| 16 | @Schema(title = "江苏数交所返回分页数据") | ||
| 17 | public class JSExchagePageListVO<T> implements Serializable { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * 请求流水号 | ||
| 21 | */ | ||
| 22 | @Schema(description = "请求流水号") | ||
| 23 | private String respFlowId; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * 返回记录总数 | ||
| 27 | */ | ||
| 28 | @Schema(description = "返回记录总数") | ||
| 29 | private Integer total; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * 查询结果列表 | ||
| 33 | */ | ||
| 34 | @Schema(description = "查询结果列表") | ||
| 35 | private List<T> data; | ||
| 36 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo.dataExchange; | ||
| 2 | |||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import lombok.Data; | ||
| 5 | |||
| 6 | /** | ||
| 7 | * @program: | ||
| 8 | * @description: 江苏数交所分页参数 | ||
| 9 | * @author: makejava | ||
| 10 | * @create: 2025-09-05 10:35 | ||
| 11 | **/ | ||
| 12 | @Data | ||
| 13 | @Schema(title = "江苏数交所分页参数") | ||
| 14 | public class JSPageQueryVO { | ||
| 15 | |||
| 16 | /** | ||
| 17 | * 请替换为实际的请求流水号 | ||
| 18 | */ | ||
| 19 | @Schema(title = "请替换为实际的请求流水号") | ||
| 20 | private String reqFlowId; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * 页码 | ||
| 24 | */ | ||
| 25 | private Integer pageNum =1; | ||
| 26 | |||
| 27 | /** | ||
| 28 | * 每页条数 | ||
| 29 | */ | ||
| 30 | private Integer pageSize = 20; | ||
| 31 | } | ||
| 32 |
| 1 | package com.csbr.qingcloud.portal.mybatis.entity; | ||
| 2 | |||
| 3 | import com.baomidou.mybatisplus.annotation.FieldStrategy; | ||
| 4 | import com.baomidou.mybatisplus.annotation.TableField; | ||
| 5 | import csbr.cloud.entity.domain.base.dao.BaseDO; | ||
| 6 | import jdk.jfr.Name; | ||
| 7 | import lombok.Data; | ||
| 8 | import lombok.EqualsAndHashCode; | ||
| 9 | import lombok.experimental.Accessors; | ||
| 10 | import java.math.BigDecimal; | ||
| 11 | import java.util.Date; | ||
| 12 | |||
| 13 | /** | ||
| 14 | * @program: | ||
| 15 | * @description: 开发主体附件信息实体 | ||
| 16 | * @author: makejava | ||
| 17 | * @create: 2025-09-05 13:50 | ||
| 18 | **/ | ||
| 19 | @Data | ||
| 20 | @EqualsAndHashCode(callSuper = true) | ||
| 21 | @Accessors(chain = true) | ||
| 22 | @Name("开发主体附件信息") | ||
| 23 | public class MfEnterpriseAttachment extends BaseDO { | ||
| 24 | |||
| 25 | /** | ||
| 26 | * 企业唯一标识 | ||
| 27 | */ | ||
| 28 | @Name("企业唯一标识") | ||
| 29 | private String tenantGuid; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * 企业认证唯一标识 | ||
| 33 | */ | ||
| 34 | @Name("企业认证唯一标识") | ||
| 35 | private String enterpriseGuid; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * 文件ID | ||
| 39 | */ | ||
| 40 | @Name("文件ID") | ||
| 41 | private String fileId; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * 文件名称 | ||
| 45 | */ | ||
| 46 | @Name("文件名称") | ||
| 47 | private String fileName; | ||
| 48 | |||
| 49 | /** | ||
| 50 | * 文件类型【详情 开发主体附件类型数据字典】 | ||
| 51 | */ | ||
| 52 | @Name("文件类型【详情 开发主体附件类型数据字典】") | ||
| 53 | private String fileType; | ||
| 54 | |||
| 55 | /** | ||
| 56 | * 文件大小 | ||
| 57 | */ | ||
| 58 | @Name("文件大小") | ||
| 59 | private BigDecimal fileSize; | ||
| 60 | |||
| 61 | /** | ||
| 62 | * 文件地址 | ||
| 63 | */ | ||
| 64 | @Name("文件地址") | ||
| 65 | private String fileUrl; | ||
| 66 | |||
| 67 | } |
| 1 | package com.csbr.qingcloud.portal.mybatis.mapper; | ||
| 2 | |||
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 4 | import org.apache.ibatis.annotations.Mapper; | ||
| 5 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseAttachment; | ||
| 6 | |||
| 7 | /** | ||
| 8 | * @program: | ||
| 9 | * @description: 开发主体附件信息 Mapper 接口 | ||
| 10 | * @author: makejava | ||
| 11 | * @create: 2025-09-05 13:50 | ||
| 12 | **/ | ||
| 13 | @Mapper | ||
| 14 | public interface MfEnterpriseAttachmentMapper extends BaseMapper<MfEnterpriseAttachment> { | ||
| 15 | |||
| 16 | } |
src/main/java/com/csbr/qingcloud/portal/mybatis/service/MfEnterpriseAttachmentService.java
0 → 100644
| 1 | package com.csbr.qingcloud.portal.mybatis.service; | ||
| 2 | |||
| 3 | import com.csbr.cloud.base.service.CsbrService; | ||
| 4 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseAttachment; | ||
| 5 | |||
| 6 | /** | ||
| 7 | * @program: | ||
| 8 | * @description: 开发主体附件信息逻辑层接口 | ||
| 9 | * @author: makejava | ||
| 10 | * @create: 2025-09-05 13:50 | ||
| 11 | **/ | ||
| 12 | public interface MfEnterpriseAttachmentService extends CsbrService<MfEnterpriseAttachment> { | ||
| 13 | |||
| 14 | } |
src/main/java/com/csbr/qingcloud/portal/mybatis/service/impl/MfEnterpriseAttachmentServiceImpl.java
0 → 100644
| 1 | package com.csbr.qingcloud.portal.mybatis.service.impl; | ||
| 2 | |||
| 3 | import com.csbr.cloud.mybatis.service.impl.CsbrServiceImpl; | ||
| 4 | import com.csbr.qingcloud.portal.mybatis.mapper.MfEnterpriseAttachmentMapper; | ||
| 5 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseAttachment; | ||
| 6 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseAttachmentService; | ||
| 7 | import jakarta.annotation.Resource; | ||
| 8 | import org.springframework.stereotype.Service; | ||
| 9 | |||
| 10 | /** | ||
| 11 | * @program: | ||
| 12 | * @description: 开发主体附件信息逻辑层接口实现 | ||
| 13 | * @author: makejava | ||
| 14 | * @create: 2025-09-05 13:50 | ||
| 15 | **/ | ||
| 16 | @Service | ||
| 17 | public class MfEnterpriseAttachmentServiceImpl extends CsbrServiceImpl<MfEnterpriseAttachmentMapper, MfEnterpriseAttachment> implements MfEnterpriseAttachmentService { | ||
| 18 | |||
| 19 | @Resource | ||
| 20 | private MfEnterpriseAttachmentMapper mfEnterpriseAttachmentMapper; | ||
| 21 | |||
| 22 | } |
| 1 | package com.csbr.qingcloud.portal.service; | ||
| 2 | |||
| 3 | import com.csbr.qingcloud.portal.domain.vo.dataExchange.*; | ||
| 4 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
| 5 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentQueryVO; | ||
| 6 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO; | ||
| 7 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO; | ||
| 8 | |||
| 9 | import java.util.List; | ||
| 10 | |||
| 11 | /** | ||
| 12 | * @program: | ||
| 13 | * @description: 开发主体附件信息业务逻辑接口 | ||
| 14 | * @author: makejava | ||
| 15 | * @create: 2025-09-05 13:50 | ||
| 16 | **/ | ||
| 17 | public interface EnterpriseAttachmentService { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * 开发主体附件信息分页查询 | ||
| 21 | * @author makejava | ||
| 22 | * @date 2025-09-05 13:50 | ||
| 23 | * @param queryVO | ||
| 24 | * @return com.csbr.cloud.mybatis.entity.PageListVO<com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO> | ||
| 25 | */ | ||
| 26 | PageListVO<EnterpriseAttachmentRSVO> pageList(EnterpriseAttachmentQueryVO queryVO); | ||
| 27 | |||
| 28 | /** | ||
| 29 | * 开发主体附件信息获取详情数据 | ||
| 30 | * @author makejava | ||
| 31 | * @date 2025-09-05 13:50 | ||
| 32 | * @param guid | ||
| 33 | * @return com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO | ||
| 34 | */ | ||
| 35 | EnterpriseAttachmentRSVO getEnterpriseAttachmentDetail(String guid); | ||
| 36 | |||
| 37 | /** | ||
| 38 | * 开发主体附件信息数据新增 | ||
| 39 | * @author makejava | ||
| 40 | * @date 2025-09-05 13:50 | ||
| 41 | * @param rqVO | ||
| 42 | * @return boolean | ||
| 43 | */ | ||
| 44 | void saveEnterpriseAttachment(EnterpriseAttachmentRQVO rqVO); | ||
| 45 | |||
| 46 | /** | ||
| 47 | * 开发主体附件信息数据修改 | ||
| 48 | * @author makejava | ||
| 49 | * @date 2025-09-05 13:50 | ||
| 50 | * @param rqVO | ||
| 51 | * @return boolean | ||
| 52 | */ | ||
| 53 | void updateEnterpriseAttachment(EnterpriseAttachmentRQVO rqVO); | ||
| 54 | |||
| 55 | /** | ||
| 56 | * 开发主体附件信息数据删除 | ||
| 57 | * @author makejava | ||
| 58 | * @date 2025-09-05 13:50 | ||
| 59 | * @param guids | ||
| 60 | * @return void | ||
| 61 | */ | ||
| 62 | void removeByGuids(List<String> guids); | ||
| 63 | |||
| 64 | /** | ||
| 65 | * 开发主体附件信息数据删除、并有相关的处理操作 | ||
| 66 | * @author makejava | ||
| 67 | * @date 2025-09-05 13:50 | ||
| 68 | * @param guids | ||
| 69 | * @return void | ||
| 70 | */ | ||
| 71 | void removeHandleByGuids(List<String> guids); | ||
| 72 | |||
| 73 | /** | ||
| 74 | * 数交所附件同步 | ||
| 75 | * @param queryVO | ||
| 76 | * @return | ||
| 77 | */ | ||
| 78 | JSExchageCommonRes<JSExchagePageListVO<JSAttachRSVO>> enterpriseAttach(JSBaseRQVO<JSAttachQueryVO> queryVO); | ||
| 79 | |||
| 80 | /** | ||
| 81 | * 根据文件Id查询附件地址 | ||
| 82 | * @param fileId | ||
| 83 | * @return | ||
| 84 | */ | ||
| 85 | String getEnterpriseAttachmentUrl(String fileId); | ||
| 86 | } |
| ... | @@ -107,6 +107,13 @@ public interface EnterpriseService { | ... | @@ -107,6 +107,13 @@ public interface EnterpriseService { |
| 107 | EnterpriseRSVO getEnterpriseDetailByLogonUser(String logonUser); | 107 | EnterpriseRSVO getEnterpriseDetailByLogonUser(String logonUser); |
| 108 | 108 | ||
| 109 | /** | 109 | /** |
| 110 | * 开发主体分页查询 | ||
| 111 | * @param queryVO | ||
| 112 | * @return | ||
| 113 | */ | ||
| 114 | JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> enterpriseData(JSBaseRQVO<JSEnterpriseQueryVO> queryVO); | ||
| 115 | |||
| 116 | /** | ||
| 110 | * 按名称或者统一社会信用代码查企业信息详情 | 117 | * 按名称或者统一社会信用代码查企业信息详情 |
| 111 | * @param tenantName | 118 | * @param tenantName |
| 112 | * @param uscc | 119 | * @param uscc | ... | ... |
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseAttachmentServiceImpl.java
0 → 100644
| 1 | package com.csbr.qingcloud.portal.service.impl; | ||
| 2 | |||
| 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
| 5 | import com.csbr.cloud.common.enums.SystemError; | ||
| 6 | import com.csbr.cloud.common.exception.CsbrSystemException; | ||
| 7 | import com.csbr.cloud.common.util.CommonUtil; | ||
| 8 | import com.csbr.cloud.common.util.CsbrBeanUtil; | ||
| 9 | import com.csbr.cloud.common.util.MessageSourceUtil; | ||
| 10 | import com.csbr.qingcloud.portal.domain.vo.dataExchange.*; | ||
| 11 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise; | ||
| 12 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseService; | ||
| 13 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
| 14 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentQueryVO; | ||
| 15 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO; | ||
| 16 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO; | ||
| 17 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseAttachment; | ||
| 18 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseAttachmentService; | ||
| 19 | import com.csbr.qingcloud.portal.service.EnterpriseAttachmentService; | ||
| 20 | import csbr.cloud.entity.enums.ApprovalStateEnum; | ||
| 21 | import jakarta.annotation.Resource; | ||
| 22 | import lombok.extern.slf4j.Slf4j; | ||
| 23 | import org.apache.commons.collections.CollectionUtils; | ||
| 24 | import org.apache.commons.lang3.ObjectUtils; | ||
| 25 | import org.apache.commons.lang3.StringUtils; | ||
| 26 | import org.springframework.stereotype.Service; | ||
| 27 | import org.springframework.transaction.annotation.Transactional; | ||
| 28 | |||
| 29 | import java.util.ArrayList; | ||
| 30 | import java.util.Collections; | ||
| 31 | import java.util.List; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * @program: | ||
| 35 | * @description: 开发主体附件信息业务逻辑实现 | ||
| 36 | * @author: makejava | ||
| 37 | * @create: 2025-09-05 13:50 | ||
| 38 | **/ | ||
| 39 | @Slf4j | ||
| 40 | @Service | ||
| 41 | public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentService { | ||
| 42 | |||
| 43 | /** | ||
| 44 | * 功能名称 | ||
| 45 | */ | ||
| 46 | private static final String FUNCTION_NAME = "开发主体附件信息"; | ||
| 47 | |||
| 48 | @Resource | ||
| 49 | private MfEnterpriseAttachmentService mfEnterpriseAttachmentService; | ||
| 50 | |||
| 51 | @Resource | ||
| 52 | private CsbrBeanUtil csbrBeanUtil; | ||
| 53 | |||
| 54 | @Resource | ||
| 55 | private MessageSourceUtil messageSourceUtil; | ||
| 56 | |||
| 57 | @Resource | ||
| 58 | private MfEnterpriseService mfEnterpriseService; | ||
| 59 | |||
| 60 | /** | ||
| 61 | * 开发主体附件信息分页查询 | ||
| 62 | * @author makejava | ||
| 63 | * @date 2025-09-05 13:50 | ||
| 64 | * @param queryVO | ||
| 65 | * @return com.csbr.cloud.mybatis.entity.PageListVO<com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO> | ||
| 66 | */ | ||
| 67 | @Override | ||
| 68 | public PageListVO<EnterpriseAttachmentRSVO> pageList(EnterpriseAttachmentQueryVO queryVO) { | ||
| 69 | beforeQuery(queryVO); | ||
| 70 | LambdaQueryWrapper<MfEnterpriseAttachment> queryWrapper = mfEnterpriseAttachmentService.csbrQueryWrapper(queryVO, MfEnterpriseAttachment.class); | ||
| 71 | queryWrapper.orderByDesc(MfEnterpriseAttachment::getCreateTime); | ||
| 72 | PageListVO<MfEnterpriseAttachment> pageList = mfEnterpriseAttachmentService.csbrPageList(queryVO, queryWrapper); | ||
| 73 | PageListVO<EnterpriseAttachmentRSVO> rsPageList = csbrBeanUtil.convert(pageList, PageListVO.class); | ||
| 74 | afterQuery(pageList, rsPageList); | ||
| 75 | return rsPageList; | ||
| 76 | } | ||
| 77 | |||
| 78 | /** | ||
| 79 | * 开发主体附件信息获取详情数据 | ||
| 80 | * @author makejava | ||
| 81 | * @date 2025-09-05 13:50 | ||
| 82 | * @param guid | ||
| 83 | * @return com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO | ||
| 84 | */ | ||
| 85 | @Override | ||
| 86 | public EnterpriseAttachmentRSVO getEnterpriseAttachmentDetail(String guid) { | ||
| 87 | if (StringUtils.isBlank(guid)) { | ||
| 88 | // W00012 = {0}:参数[{1}]不能为空! | ||
| 89 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00010", | ||
| 90 | String.format("获取%s详情数据", FUNCTION_NAME), "数据唯一标识")); | ||
| 91 | } | ||
| 92 | MfEnterpriseAttachment entity = mfEnterpriseAttachmentService.getById(guid); | ||
| 93 | if (entity == null) { | ||
| 94 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(String.format("获取%s详情数据", FUNCTION_NAME))); | ||
| 95 | } | ||
| 96 | return convertToVO(entity); | ||
| 97 | } | ||
| 98 | |||
| 99 | /** | ||
| 100 | * 开发主体附件信息数据新增 | ||
| 101 | * @author makejava | ||
| 102 | * @date 2025-09-05 13:50 | ||
| 103 | * @param rqVO | ||
| 104 | * @return boolean | ||
| 105 | */ | ||
| 106 | @Transactional(rollbackFor = Exception.class) | ||
| 107 | @Override | ||
| 108 | public void saveEnterpriseAttachment(EnterpriseAttachmentRQVO rqVO) { | ||
| 109 | beforeSave(rqVO); | ||
| 110 | MfEnterpriseAttachment entity = convertToEntity(rqVO); | ||
| 111 | mfEnterpriseAttachmentService.csbrAddEntity(entity); | ||
| 112 | boolean flag = mfEnterpriseAttachmentService.save(entity); | ||
| 113 | if (!flag) { | ||
| 114 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(FUNCTION_NAME)); | ||
| 115 | } | ||
| 116 | afterSave(rqVO); | ||
| 117 | } | ||
| 118 | |||
| 119 | /** | ||
| 120 | * 开发主体附件信息数据修改 | ||
| 121 | * @author makejava | ||
| 122 | * @date 2025-09-05 13:50 | ||
| 123 | * @param rqVO | ||
| 124 | * @return boolean | ||
| 125 | */ | ||
| 126 | @Transactional(rollbackFor = Exception.class) | ||
| 127 | @Override | ||
| 128 | public void updateEnterpriseAttachment(EnterpriseAttachmentRQVO rqVO) { | ||
| 129 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 | ||
| 130 | // MfEnterpriseAttachment oldEntity = mfEnterpriseAttachmentService.getById(rqVO.getGuid()); | ||
| 131 | MfEnterpriseAttachment oldEntity = null; | ||
| 132 | beforeUpdate(rqVO); | ||
| 133 | MfEnterpriseAttachment entity = convertToEntity(rqVO); | ||
| 134 | mfEnterpriseAttachmentService.csbrUpdateEntity(entity); | ||
| 135 | boolean flag = mfEnterpriseAttachmentService.updateById(entity); | ||
| 136 | if (!flag) { | ||
| 137 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(FUNCTION_NAME)); | ||
| 138 | } | ||
| 139 | afterUpdate(rqVO, oldEntity); | ||
| 140 | } | ||
| 141 | |||
| 142 | /** | ||
| 143 | * 开发主体附件信息数据删除 | ||
| 144 | * @author makejava | ||
| 145 | * @date 2025-09-05 13:50 | ||
| 146 | * @param guids | ||
| 147 | * @return void | ||
| 148 | */ | ||
| 149 | @Transactional(rollbackFor = Exception.class) | ||
| 150 | @Override | ||
| 151 | public void removeByGuids(List<String> guids) { | ||
| 152 | if (CollectionUtils.isEmpty(guids)) { | ||
| 153 | // W00012 = {0}:参数[{1}]不能为空! | ||
| 154 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
| 155 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
| 156 | } | ||
| 157 | if (!mfEnterpriseAttachmentService.isExistsData(guids, MfEnterpriseAttachment.class)) { | ||
| 158 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | ||
| 159 | } | ||
| 160 | boolean flag = mfEnterpriseAttachmentService.removeByIds(guids); | ||
| 161 | if (!flag) { | ||
| 162 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | ||
| 163 | } | ||
| 164 | } | ||
| 165 | |||
| 166 | /** | ||
| 167 | * 开发主体附件信息数据删除、并有相关的处理操作 | ||
| 168 | * @author makejava | ||
| 169 | * @date 2025-09-05 13:50 | ||
| 170 | * @param guids | ||
| 171 | * @return void | ||
| 172 | */ | ||
| 173 | @Transactional(rollbackFor = Exception.class) | ||
| 174 | @Override | ||
| 175 | public void removeHandleByGuids(List<String> guids) { | ||
| 176 | if (CollectionUtils.isEmpty(guids)) { | ||
| 177 | // W00012 = {0}:参数[{1}]不能为空! | ||
| 178 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
| 179 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
| 180 | } | ||
| 181 | for (String guid : guids) { | ||
| 182 | MfEnterpriseAttachment entity = mfEnterpriseAttachmentService.getById(guid); | ||
| 183 | beforeRemove(entity); | ||
| 184 | boolean flag = mfEnterpriseAttachmentService.removeById(guid); | ||
| 185 | if (!flag) { | ||
| 186 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | ||
| 187 | } | ||
| 188 | afterRemove(entity); | ||
| 189 | } | ||
| 190 | } | ||
| 191 | |||
| 192 | @Override | ||
| 193 | public JSExchageCommonRes<JSExchagePageListVO<JSAttachRSVO>> enterpriseAttach(JSBaseRQVO<JSAttachQueryVO> queryVO) { | ||
| 194 | JSExchageCommonRes<JSExchagePageListVO<JSAttachRSVO>> result = beforeEnterpriseAttach(queryVO); | ||
| 195 | if(ObjectUtils.isNotEmpty(result)){ | ||
| 196 | return result; | ||
| 197 | } | ||
| 198 | //查询开发主体信息 | ||
| 199 | JSAttachQueryVO bizParam = queryVO.getBizParam(); | ||
| 200 | LambdaQueryWrapper<MfEnterprise> queryWrapper = Wrappers.lambdaQuery(); | ||
| 201 | if(ObjectUtils.isNotEmpty(bizParam.getEntityName())){ | ||
| 202 | queryWrapper.eq(MfEnterprise::getTenantName,bizParam.getEntityName()); | ||
| 203 | } | ||
| 204 | if(ObjectUtils.isNotEmpty(bizParam.getUscc())){ | ||
| 205 | queryWrapper.eq(MfEnterprise::getSocialCreditCode,bizParam.getUscc()); | ||
| 206 | } | ||
| 207 | queryWrapper.eq(MfEnterprise::getBizApproveState, ApprovalStateEnum.PASSED.getValue()) | ||
| 208 | .select(MfEnterprise::getGuid); | ||
| 209 | List<MfEnterprise> enterprises = mfEnterpriseService.list(queryWrapper); | ||
| 210 | if(ObjectUtils.isEmpty(enterprises)){ | ||
| 211 | return JSExchageCommonRes.fail("数据产品信息不存在"); | ||
| 212 | } | ||
| 213 | EnterpriseAttachmentQueryVO attachmentQueryVO = new EnterpriseAttachmentQueryVO(); | ||
| 214 | attachmentQueryVO.setEnterpriseGuid(enterprises.get(0).getGuid()); | ||
| 215 | attachmentQueryVO.setPageIndex(Long.valueOf(bizParam.getPageNum())); | ||
| 216 | attachmentQueryVO.setPageSize(Long.valueOf(bizParam.getPageSize())); | ||
| 217 | PageListVO<EnterpriseAttachmentRSVO> enterpriseAttachmentPageListVO = pageList(attachmentQueryVO); | ||
| 218 | JSExchagePageListVO<JSAttachRSVO> pageListVO = new JSExchagePageListVO<>(); | ||
| 219 | pageListVO.setRespFlowId(bizParam.getReqFlowId()); | ||
| 220 | afterEnterpriseAttach(pageListVO,enterpriseAttachmentPageListVO); | ||
| 221 | return JSExchageCommonRes.success(pageListVO); | ||
| 222 | } | ||
| 223 | |||
| 224 | @Override | ||
| 225 | public String getEnterpriseAttachmentUrl(String fileId) { | ||
| 226 | if(ObjectUtils.isEmpty(fileId)){ | ||
| 227 | return null; | ||
| 228 | } | ||
| 229 | LambdaQueryWrapper<MfEnterpriseAttachment> queryWrapper = Wrappers.lambdaQuery(); | ||
| 230 | queryWrapper.eq(MfEnterpriseAttachment::getFileId,fileId).select(MfEnterpriseAttachment::getFileUrl); | ||
| 231 | List<MfEnterpriseAttachment> list = mfEnterpriseAttachmentService.list(queryWrapper); | ||
| 232 | if(ObjectUtils.isEmpty(list)){ | ||
| 233 | return null; | ||
| 234 | } | ||
| 235 | return list.get(0).getFileUrl(); | ||
| 236 | } | ||
| 237 | |||
| 238 | /** | ||
| 239 | * 查询后转换 | ||
| 240 | * @param pageListVO | ||
| 241 | * @param enterpriseAttachmentPageListVO | ||
| 242 | */ | ||
| 243 | private void afterEnterpriseAttach(JSExchagePageListVO<JSAttachRSVO> pageListVO, | ||
| 244 | PageListVO<EnterpriseAttachmentRSVO> enterpriseAttachmentPageListVO) { | ||
| 245 | pageListVO.setTotal(enterpriseAttachmentPageListVO.getTotalRows().intValue()); | ||
| 246 | pageListVO.setData(csbrBeanUtil.convert(enterpriseAttachmentPageListVO.getRecords(),JSAttachRSVO.class)); | ||
| 247 | } | ||
| 248 | |||
| 249 | private JSExchageCommonRes<JSExchagePageListVO<JSAttachRSVO>> beforeEnterpriseAttach(JSBaseRQVO<JSAttachQueryVO> queryVO) { | ||
| 250 | if(ObjectUtils.isEmpty(queryVO)){ | ||
| 251 | return JSExchageCommonRes.fail("查询参数为空。"); | ||
| 252 | } | ||
| 253 | if(ObjectUtils.isEmpty(queryVO.getBizParam())){ | ||
| 254 | return JSExchageCommonRes.fail("请求参数为空。"); | ||
| 255 | } | ||
| 256 | JSAttachQueryVO bizParam = queryVO.getBizParam(); | ||
| 257 | if(bizParam.getPageNum()<1){ | ||
| 258 | return JSExchageCommonRes.fail("页码参数无效,查询页码从1开始"); | ||
| 259 | } | ||
| 260 | if(bizParam.getPageSize()<1 || bizParam.getPageSize()> 20 ){ | ||
| 261 | return JSExchageCommonRes.fail("每页条数无效,最大20"); | ||
| 262 | } | ||
| 263 | if(StringUtils.isBlank(bizParam.getEntityName()) && StringUtils.isBlank(bizParam.getUscc())){ | ||
| 264 | return JSExchageCommonRes.fail("entityName和uscc必须至少填一个"); | ||
| 265 | } | ||
| 266 | return null; | ||
| 267 | } | ||
| 268 | |||
| 269 | /** | ||
| 270 | * 开发主体附件信息新新增前置处理 | ||
| 271 | * @author makejava | ||
| 272 | * @date 2025-09-05 13:50 | ||
| 273 | * @param rqVO | ||
| 274 | * @return void | ||
| 275 | */ | ||
| 276 | private void beforeSave(EnterpriseAttachmentRQVO rqVO) { | ||
| 277 | //region 1.输入基础验证 | ||
| 278 | //endregion | ||
| 279 | |||
| 280 | //region 2.数据验证特殊处理 | ||
| 281 | //region 2.1.业务合规性验证 | ||
| 282 | //endregion 2.1.业务合规性验证 | ||
| 283 | |||
| 284 | //region 2.2.业务数据验证 | ||
| 285 | //endregion 2.2.业务数据验证 | ||
| 286 | |||
| 287 | //endregion 2.数据验证特殊处理 | ||
| 288 | |||
| 289 | //region 3.数据转换处理 | ||
| 290 | |||
| 291 | //region 3.1.数据过程转换 | ||
| 292 | //endregion 3.1.数据过程转换 | ||
| 293 | |||
| 294 | //endregion 3.数据转换处理 | ||
| 295 | |||
| 296 | //region 4.数据过滤与补充处理 | ||
| 297 | |||
| 298 | //endregion 4.数据过滤与补充处理 | ||
| 299 | |||
| 300 | //region 5.过程处理 | ||
| 301 | |||
| 302 | //region 5.1.计算逻辑处理 | ||
| 303 | //endregion 5.1.计算逻辑处理 | ||
| 304 | |||
| 305 | //region 5.2.业务逻辑处理 | ||
| 306 | //endregion 5.2.业务逻辑处理 | ||
| 307 | |||
| 308 | //endregion 5.过程处理 | ||
| 309 | } | ||
| 310 | |||
| 311 | /** | ||
| 312 | * 开发主体附件信息新增后置处理 | ||
| 313 | * @author makejava | ||
| 314 | * @date 2025-09-05 13:50 | ||
| 315 | * @param rqVO | ||
| 316 | * @return void | ||
| 317 | */ | ||
| 318 | private void afterSave(EnterpriseAttachmentRQVO rqVO) { | ||
| 319 | //region 1.输出特殊转换 | ||
| 320 | |||
| 321 | //region 1.1.输出过滤与补充处理 | ||
| 322 | //endregion 1.1.输出过滤与补充处理 | ||
| 323 | |||
| 324 | //endregion 1.输出特殊转换 | ||
| 325 | } | ||
| 326 | |||
| 327 | /** | ||
| 328 | * 开发主体附件信息修改前置校验、处理 | ||
| 329 | * @author makejava | ||
| 330 | * @date 2025-09-05 13:50 | ||
| 331 | * @param rqVO | ||
| 332 | * @return void | ||
| 333 | */ | ||
| 334 | private void beforeUpdate(EnterpriseAttachmentRQVO rqVO) { | ||
| 335 | //region 1.输入基础验证 | ||
| 336 | if (StringUtils.isBlank(rqVO.getGuid())) { | ||
| 337 | // W00012 = {0}:参数[{1}]不能为空! | ||
| 338 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00010", String.format("修改%s数据",FUNCTION_NAME), "数据唯一标识")); | ||
| 339 | } | ||
| 340 | //endregion | ||
| 341 | |||
| 342 | //region 2.数据验证特殊处理 | ||
| 343 | //region 2.1.业务合规性验证 | ||
| 344 | //endregion 2.1.业务合规性验证 | ||
| 345 | |||
| 346 | //region 2.2.业务数据验证 | ||
| 347 | if (!mfEnterpriseAttachmentService.isExistsData(Collections.singletonList(rqVO.getGuid()), MfEnterpriseAttachment.class)) { | ||
| 348 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); | ||
| 349 | } | ||
| 350 | //endregion 2.2.业务数据验证 | ||
| 351 | |||
| 352 | //endregion 2.数据验证特殊处理 | ||
| 353 | |||
| 354 | //region 3.数据转换处理 | ||
| 355 | |||
| 356 | //region 3.1.数据过程转换 | ||
| 357 | //endregion 3.1.数据过程转换 | ||
| 358 | |||
| 359 | //endregion 3.数据转换处理 | ||
| 360 | |||
| 361 | //region 4.数据过滤与补充处理 | ||
| 362 | //endregion 4.数据过滤与补充处理 | ||
| 363 | |||
| 364 | //region 5.过程处理 | ||
| 365 | |||
| 366 | //region 5.1.计算逻辑处理 | ||
| 367 | //endregion 5.1.计算逻辑处理 | ||
| 368 | |||
| 369 | //region 5.2.业务逻辑处理 | ||
| 370 | //endregion 5.2.业务逻辑处理 | ||
| 371 | |||
| 372 | //endregion 5.过程处理 | ||
| 373 | } | ||
| 374 | |||
| 375 | /** | ||
| 376 | * 开发主体附件信息修改后置处理 | ||
| 377 | * @author makejava | ||
| 378 | * @date 2025-09-05 13:50 | ||
| 379 | * @param rqVO | ||
| 380 | * @param entity | ||
| 381 | * @return void | ||
| 382 | */ | ||
| 383 | protected void afterUpdate(EnterpriseAttachmentRQVO rqVO, MfEnterpriseAttachment entity) { | ||
| 384 | //region 1.输出特殊转换 | ||
| 385 | |||
| 386 | //region 1.1.输出过滤与补充处理 | ||
| 387 | //endregion 1.1.输出过滤与补充处理 | ||
| 388 | |||
| 389 | //endregion 1.输出特殊转换 | ||
| 390 | } | ||
| 391 | |||
| 392 | |||
| 393 | /** | ||
| 394 | * 开发主体附件信息删除前置处理 | ||
| 395 | * @author makejava | ||
| 396 | * @date 2025-09-05 13:50 | ||
| 397 | * @param entity | ||
| 398 | * @return void | ||
| 399 | */ | ||
| 400 | private void beforeRemove(MfEnterpriseAttachment entity) { | ||
| 401 | if (entity == null) { | ||
| 402 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | ||
| 403 | } | ||
| 404 | } | ||
| 405 | |||
| 406 | /** | ||
| 407 | * 开发主体附件信息删除后置处理 | ||
| 408 | * @author makejava | ||
| 409 | * @date 2025-09-05 13:50 | ||
| 410 | * @param entity | ||
| 411 | * @return void | ||
| 412 | */ | ||
| 413 | private void afterRemove(MfEnterpriseAttachment entity) { | ||
| 414 | |||
| 415 | } | ||
| 416 | |||
| 417 | /** | ||
| 418 | * 开发主体附件信息查询方法前置验证、处理 | ||
| 419 | * @author makejava | ||
| 420 | * @date 2025-09-05 13:50 | ||
| 421 | * @param rqQueryVO | ||
| 422 | * @return void | ||
| 423 | */ | ||
| 424 | private void beforeQuery(EnterpriseAttachmentQueryVO rqQueryVO) { | ||
| 425 | |||
| 426 | } | ||
| 427 | |||
| 428 | /** | ||
| 429 | * 开发主体附件信息查询方法后置数据转换、处理 | ||
| 430 | * @author makejava | ||
| 431 | * @date 2025-09-05 13:50 | ||
| 432 | * @param pageList 数据库查询数据 | ||
| 433 | * @param rsPageList 返回的最终数据 | ||
| 434 | * @return void | ||
| 435 | */ | ||
| 436 | private void afterQuery(PageListVO<MfEnterpriseAttachment> pageList, PageListVO<EnterpriseAttachmentRSVO> rsPageList) { | ||
| 437 | if (CollectionUtils.isNotEmpty(pageList.getRecords())) { | ||
| 438 | rsPageList.setRecords(convertToVO(pageList.getRecords())); | ||
| 439 | } | ||
| 440 | // 需要特殊处理数据时使用 | ||
| 441 | /*if(CollectionUtils.isNotEmpty(pageList.getRecords())){ | ||
| 442 | List<EnterpriseAttachmentRSVO> results = new ArrayList<>(); | ||
| 443 | for (MfEnterpriseAttachment item : pageList.getRecords()){ | ||
| 444 | EnterpriseAttachmentRSVO vo = convertToVO(item); | ||
| 445 | results.add(vo); | ||
| 446 | } | ||
| 447 | rsPageList.setRecords(results); | ||
| 448 | }*/ | ||
| 449 | } | ||
| 450 | |||
| 451 | //region 辅助操作 | ||
| 452 | |||
| 453 | /** | ||
| 454 | * 开发主体附件信息实体数据转换为视图对象数据(多个) | ||
| 455 | * @author makejava | ||
| 456 | * @date 2025-09-05 13:50 | ||
| 457 | * @param entityList 实体数据列表 | ||
| 458 | * @return java.util.List<com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO> 视图对象列表 | ||
| 459 | */ | ||
| 460 | private List<EnterpriseAttachmentRSVO> convertToVO(List<MfEnterpriseAttachment> entityList) { | ||
| 461 | if (CollectionUtils.isEmpty(entityList)) { | ||
| 462 | // W00012 = {0}:参数[{1}]不能为空! | ||
| 463 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
| 464 | "实体数据转换为视图对象实体数据", "实体数据")); | ||
| 465 | } | ||
| 466 | List<EnterpriseAttachmentRSVO> voList = new ArrayList<>(entityList.size()); | ||
| 467 | for (MfEnterpriseAttachment item : entityList) { | ||
| 468 | EnterpriseAttachmentRSVO vo = convertToVO(item); | ||
| 469 | voList.add(vo); | ||
| 470 | } | ||
| 471 | return voList; | ||
| 472 | } | ||
| 473 | |||
| 474 | /** | ||
| 475 | * 开发主体附件信息实体数据转换为视图对象数据 | ||
| 476 | * @author makejava | ||
| 477 | * @date 2025-09-05 13:50 | ||
| 478 | * @param entity | ||
| 479 | * @return com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO | ||
| 480 | */ | ||
| 481 | private EnterpriseAttachmentRSVO convertToVO(MfEnterpriseAttachment entity) { | ||
| 482 | EnterpriseAttachmentRSVO vo = csbrBeanUtil.convert(entity, EnterpriseAttachmentRSVO.class); | ||
| 483 | return vo; | ||
| 484 | } | ||
| 485 | |||
| 486 | /** | ||
| 487 | * 开发主体附件信息新增、修改和其他情况的参数转换为实体 | ||
| 488 | * @author makejava | ||
| 489 | * @date 2025-09-05 13:50 | ||
| 490 | * @param vo | ||
| 491 | * @return com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseAttachment | ||
| 492 | */ | ||
| 493 | private MfEnterpriseAttachment convertToEntity(EnterpriseAttachmentRQVO vo) { | ||
| 494 | MfEnterpriseAttachment entity = csbrBeanUtil.convert(vo, MfEnterpriseAttachment.class); | ||
| 495 | // 新增时数据默认guid赋值,转换后该guid可能别使用 | ||
| 496 | if (StringUtils.isBlank(vo.getGuid())) { | ||
| 497 | entity.setGuid(CommonUtil.newGuid()); | ||
| 498 | } | ||
| 499 | return entity; | ||
| 500 | } | ||
| 501 | |||
| 502 | //endregion | ||
| 503 | |||
| 504 | } |
| ... | @@ -21,6 +21,7 @@ import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; | ... | @@ -21,6 +21,7 @@ import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; |
| 21 | import com.csbr.cloud.workflow.util.ApprovalFlowUtil; | 21 | import com.csbr.cloud.workflow.util.ApprovalFlowUtil; |
| 22 | import com.csbr.cloud.workflow.util.FlowAbstractImpl; | 22 | import com.csbr.cloud.workflow.util.FlowAbstractImpl; |
| 23 | import com.csbr.qingcloud.portal.domain.vo.*; | 23 | import com.csbr.qingcloud.portal.domain.vo.*; |
| 24 | import com.csbr.qingcloud.portal.domain.vo.dataExchange.*; | ||
| 24 | import com.csbr.qingcloud.portal.feign.ConfigureFeign; | 25 | import com.csbr.qingcloud.portal.feign.ConfigureFeign; |
| 25 | import com.csbr.qingcloud.portal.feign.PersonelFeign; | 26 | import com.csbr.qingcloud.portal.feign.PersonelFeign; |
| 26 | import com.csbr.qingcloud.portal.feign.WorkflowFeign; | 27 | import com.csbr.qingcloud.portal.feign.WorkflowFeign; |
| ... | @@ -629,6 +630,60 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -629,6 +630,60 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 629 | } | 630 | } |
| 630 | 631 | ||
| 631 | @Override | 632 | @Override |
| 633 | public JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> enterpriseData(JSBaseRQVO<JSEnterpriseQueryVO> queryVO) { | ||
| 634 | JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> vo = beforeEnterpriseData(queryVO); | ||
| 635 | if(ObjectUtils.isNotEmpty(vo)){ | ||
| 636 | return vo; | ||
| 637 | } | ||
| 638 | LambdaQueryWrapper<MfEnterprise> queryWrapper = Wrappers.lambdaQuery(); | ||
| 639 | queryWrapper.eq(MfEnterprise::getBizApproveState,ApprovalStateEnum.PASSED.getValue()); | ||
| 640 | queryWrapper.eq(MfEnterprise::getZqName,queryVO.getAppKey()); | ||
| 641 | queryWrapper.orderByDesc(MfEnterprise::getCreateTime); | ||
| 642 | JSEnterpriseQueryVO bizParam = queryVO.getBizParam(); | ||
| 643 | EnterpriseQueryVO enterpriseQueryVO = new EnterpriseQueryVO(); | ||
| 644 | enterpriseQueryVO.setPageIndex(Long.valueOf(bizParam.getPageNum())); | ||
| 645 | enterpriseQueryVO.setPageSize(Long.valueOf(bizParam.getPageSize())); | ||
| 646 | PageListVO<MfEnterprise> enterprisePageListVO = mfEnterpriseService.csbrPageList(enterpriseQueryVO, queryWrapper); | ||
| 647 | JSExchagePageListVO<JSEnterpriseRSVO> pageListVO = new JSExchagePageListVO<JSEnterpriseRSVO>(); | ||
| 648 | pageListVO.setRespFlowId(bizParam.getReqFlowId()); | ||
| 649 | afterEnterpriseData(enterprisePageListVO, pageListVO); | ||
| 650 | return JSExchageCommonRes.success(pageListVO); | ||
| 651 | } | ||
| 652 | |||
| 653 | private void afterEnterpriseData(PageListVO<MfEnterprise> enterprisePageListVO, JSExchagePageListVO<JSEnterpriseRSVO> pageListVO) { | ||
| 654 | pageListVO.setTotal(enterprisePageListVO.getTotalRows().intValue()); | ||
| 655 | List<MfEnterprise> records = enterprisePageListVO.getRecords(); | ||
| 656 | List<JSEnterpriseRSVO> rsvos = new ArrayList<>(); | ||
| 657 | for (MfEnterprise record : records) { | ||
| 658 | JSEnterpriseRSVO enterpriseRSVO = new JSEnterpriseRSVO(); | ||
| 659 | enterpriseRSVO.setInstitutionName(record.getTenantName()); | ||
| 660 | enterpriseRSVO.setInstitutionCode(record.getSocialCreditCode()); | ||
| 661 | enterpriseRSVO.setCountry("中国"); | ||
| 662 | enterpriseRSVO.setRegion(record.getDistrict()); | ||
| 663 | enterpriseRSVO.setCorpnName(record.getJuridicalPerson()); | ||
| 664 | rsvos.add(enterpriseRSVO); | ||
| 665 | } | ||
| 666 | pageListVO.setData(rsvos); | ||
| 667 | } | ||
| 668 | |||
| 669 | private JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> beforeEnterpriseData(JSBaseRQVO<JSEnterpriseQueryVO> queryVO) { | ||
| 670 | if(ObjectUtils.isEmpty(queryVO)){ | ||
| 671 | return JSExchageCommonRes.fail("查询参数为空。"); | ||
| 672 | } | ||
| 673 | if(ObjectUtils.isEmpty(queryVO.getBizParam())){ | ||
| 674 | return JSExchageCommonRes.fail("请求参数为空。"); | ||
| 675 | } | ||
| 676 | JSEnterpriseQueryVO bizParam = queryVO.getBizParam(); | ||
| 677 | if(bizParam.getPageNum()<1){ | ||
| 678 | return JSExchageCommonRes.fail("页码参数无效,查询页码从1开始"); | ||
| 679 | } | ||
| 680 | if(bizParam.getPageSize()<1 || bizParam.getPageSize()> 20 ){ | ||
| 681 | return JSExchageCommonRes.fail("每页条数无效,最大20"); | ||
| 682 | } | ||
| 683 | return null; | ||
| 684 | } | ||
| 685 | |||
| 686 | @Override | ||
| 632 | public EnterpriseRSVO getEnterpriseDetailByNameOrUscc(String tenantName, String uscc) { | 687 | public EnterpriseRSVO getEnterpriseDetailByNameOrUscc(String tenantName, String uscc) { |
| 633 | if(StringUtils.isBlank(tenantName) && StringUtils.isBlank(uscc)){ | 688 | if(StringUtils.isBlank(tenantName) && StringUtils.isBlank(uscc)){ |
| 634 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR,"开发主体名称和统一社会信用代码不能同时为空。"); | 689 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR,"开发主体名称和统一社会信用代码不能同时为空。"); | ... | ... |
-
Please register or sign in to post a comment