江苏数交所接口开发
Showing
14 changed files
with
529 additions
and
1 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 JSQueryVO<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<JSEnterpriseRSVO>> enterpriseAttach(@RequestBody @Valid JSQueryVO<JSAttachQueryVO> queryVO) { | ||
42 | JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> pageVO = enterpriseAttachmentService.enterpriseAttach(queryVO); | ||
43 | return pageVO; | ||
44 | } | ||
45 | |||
46 | //endregion | ||
47 | |||
48 | } |
... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.domain.vo; | ... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.domain.vo; |
2 | 2 | ||
3 | import csbr.cloud.entity.domain.base.dto.BasePageDTO; | 3 | import csbr.cloud.entity.domain.base.dto.BasePageDTO; |
4 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
5 | import jdk.jfr.Name; | ||
5 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
6 | import lombok.Data; | 7 | import lombok.Data; |
7 | import java.math.BigDecimal; | 8 | import java.math.BigDecimal; |
... | @@ -17,5 +18,9 @@ import java.util.Date; | ... | @@ -17,5 +18,9 @@ import java.util.Date; |
17 | @Data | 18 | @Data |
18 | @Schema(title = "开发主体附件信息查询参数") | 19 | @Schema(title = "开发主体附件信息查询参数") |
19 | public class EnterpriseAttachmentQueryVO extends BasePageDTO { | 20 | public class EnterpriseAttachmentQueryVO extends BasePageDTO { |
20 | 21 | /** | |
22 | * 企业认证唯一标识 | ||
23 | */ | ||
24 | @Name("企业认证唯一标识") | ||
25 | private String enterpriseGuid; | ||
21 | } | 26 | } | ... | ... |
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 | 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.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 JSQueryVO<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.service; | 1 | package com.csbr.qingcloud.portal.service; |
2 | 2 | ||
3 | import com.csbr.qingcloud.portal.domain.vo.dataExchange.*; | ||
3 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 4 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
4 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentQueryVO; | 5 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentQueryVO; |
5 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO; | 6 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO; |
... | @@ -69,4 +70,10 @@ public interface EnterpriseAttachmentService { | ... | @@ -69,4 +70,10 @@ public interface EnterpriseAttachmentService { |
69 | */ | 70 | */ |
70 | void removeHandleByGuids(List<String> guids); | 71 | void removeHandleByGuids(List<String> guids); |
71 | 72 | ||
73 | /** | ||
74 | * 数交所附件同步 | ||
75 | * @param queryVO | ||
76 | * @return | ||
77 | */ | ||
78 | JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> enterpriseAttach(JSQueryVO<JSAttachQueryVO> queryVO); | ||
72 | } | 79 | } | ... | ... |
... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.service; | ... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.service; |
2 | 2 | ||
3 | import com.csbr.cloud.workflow.domain.dto.appove.FlowQueryDTO; | 3 | import com.csbr.cloud.workflow.domain.dto.appove.FlowQueryDTO; |
4 | import com.csbr.qingcloud.portal.domain.vo.*; | 4 | import com.csbr.qingcloud.portal.domain.vo.*; |
5 | import com.csbr.qingcloud.portal.domain.vo.dataExchange.*; | ||
5 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise; | 6 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise; |
6 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 7 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
7 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; | 8 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; |
... | @@ -105,4 +106,11 @@ public interface EnterpriseService { | ... | @@ -105,4 +106,11 @@ public interface EnterpriseService { |
105 | * @return | 106 | * @return |
106 | */ | 107 | */ |
107 | EnterpriseRSVO getEnterpriseDetailByLogonUser(String logonUser); | 108 | EnterpriseRSVO getEnterpriseDetailByLogonUser(String logonUser); |
109 | |||
110 | /** | ||
111 | * 开发主体分页查询 | ||
112 | * @param queryVO | ||
113 | * @return | ||
114 | */ | ||
115 | JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> enterpriseData(JSQueryVO<JSEnterpriseQueryVO> queryVO); | ||
108 | } | 116 | } | ... | ... |
1 | package com.csbr.qingcloud.portal.service.impl; | 1 | package com.csbr.qingcloud.portal.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
4 | import com.csbr.cloud.common.enums.SystemError; | 5 | import com.csbr.cloud.common.enums.SystemError; |
5 | import com.csbr.cloud.common.exception.CsbrSystemException; | 6 | import com.csbr.cloud.common.exception.CsbrSystemException; |
6 | import com.csbr.cloud.common.util.CommonUtil; | 7 | import com.csbr.cloud.common.util.CommonUtil; |
7 | import com.csbr.cloud.common.util.CsbrBeanUtil; | 8 | import com.csbr.cloud.common.util.CsbrBeanUtil; |
8 | import com.csbr.cloud.common.util.MessageSourceUtil; | 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; | ||
9 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 13 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
10 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentQueryVO; | 14 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentQueryVO; |
11 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO; | 15 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRQVO; |
... | @@ -13,9 +17,11 @@ import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO; | ... | @@ -13,9 +17,11 @@ import com.csbr.qingcloud.portal.domain.vo.EnterpriseAttachmentRSVO; |
13 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseAttachment; | 17 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseAttachment; |
14 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseAttachmentService; | 18 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseAttachmentService; |
15 | import com.csbr.qingcloud.portal.service.EnterpriseAttachmentService; | 19 | import com.csbr.qingcloud.portal.service.EnterpriseAttachmentService; |
20 | import csbr.cloud.entity.enums.ApprovalStateEnum; | ||
16 | import jakarta.annotation.Resource; | 21 | import jakarta.annotation.Resource; |
17 | import lombok.extern.slf4j.Slf4j; | 22 | import lombok.extern.slf4j.Slf4j; |
18 | import org.apache.commons.collections.CollectionUtils; | 23 | import org.apache.commons.collections.CollectionUtils; |
24 | import org.apache.commons.lang3.ObjectUtils; | ||
19 | import org.apache.commons.lang3.StringUtils; | 25 | import org.apache.commons.lang3.StringUtils; |
20 | import org.springframework.stereotype.Service; | 26 | import org.springframework.stereotype.Service; |
21 | import org.springframework.transaction.annotation.Transactional; | 27 | import org.springframework.transaction.annotation.Transactional; |
... | @@ -48,6 +54,9 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ | ... | @@ -48,6 +54,9 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ |
48 | @Resource | 54 | @Resource |
49 | private MessageSourceUtil messageSourceUtil; | 55 | private MessageSourceUtil messageSourceUtil; |
50 | 56 | ||
57 | @Resource | ||
58 | private MfEnterpriseService mfEnterpriseService; | ||
59 | |||
51 | /** | 60 | /** |
52 | * 开发主体附件信息分页查询 | 61 | * 开发主体附件信息分页查询 |
53 | * @author makejava | 62 | * @author makejava |
... | @@ -180,6 +189,69 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ | ... | @@ -180,6 +189,69 @@ public class EnterpriseAttachmentServiceImpl implements EnterpriseAttachmentServ |
180 | } | 189 | } |
181 | } | 190 | } |
182 | 191 | ||
192 | @Override | ||
193 | public JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> enterpriseAttach(JSQueryVO<JSAttachQueryVO> queryVO) { | ||
194 | JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> 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<JSEnterpriseRSVO> pageListVO = new JSExchagePageListVO<>(); | ||
219 | pageListVO.setRespFlowId(bizParam.getReqFlowId()); | ||
220 | afterEnterpriseAttach(pageListVO,enterpriseAttachmentPageListVO); | ||
221 | return JSExchageCommonRes.success(pageListVO); | ||
222 | } | ||
223 | |||
224 | /** | ||
225 | * 查询后转换 | ||
226 | * @param pageListVO | ||
227 | * @param enterpriseAttachmentPageListVO | ||
228 | */ | ||
229 | private void afterEnterpriseAttach(JSExchagePageListVO<JSEnterpriseRSVO> pageListVO, | ||
230 | PageListVO<EnterpriseAttachmentRSVO> enterpriseAttachmentPageListVO) { | ||
231 | pageListVO.setTotal(enterpriseAttachmentPageListVO.getTotalRows().intValue()); | ||
232 | pageListVO.setData(csbrBeanUtil.convert(enterpriseAttachmentPageListVO.getRecords(),JSEnterpriseRSVO.class)); | ||
233 | } | ||
234 | |||
235 | private JSExchageCommonRes<JSExchagePageListVO<JSEnterpriseRSVO>> beforeEnterpriseAttach(JSQueryVO<JSAttachQueryVO> queryVO) { | ||
236 | if(ObjectUtils.isEmpty(queryVO)){ | ||
237 | return JSExchageCommonRes.fail("查询参数为空。"); | ||
238 | } | ||
239 | if(ObjectUtils.isEmpty(queryVO.getBizParam())){ | ||
240 | return JSExchageCommonRes.fail("请求参数为空。"); | ||
241 | } | ||
242 | JSAttachQueryVO bizParam = queryVO.getBizParam(); | ||
243 | if(bizParam.getPageNum()<1){ | ||
244 | return JSExchageCommonRes.fail("页码参数无效,查询页码从1开始"); | ||
245 | } | ||
246 | if(bizParam.getPageSize()<1 || bizParam.getPageSize()> 20 ){ | ||
247 | return JSExchageCommonRes.fail("每页条数无效,最大20"); | ||
248 | } | ||
249 | if(StringUtils.isBlank(bizParam.getEntityName()) && StringUtils.isBlank(bizParam.getUscc())){ | ||
250 | return JSExchageCommonRes.fail("entityName和uscc必须至少填一个"); | ||
251 | } | ||
252 | return null; | ||
253 | } | ||
254 | |||
183 | /** | 255 | /** |
184 | * 开发主体附件信息新新增前置处理 | 256 | * 开发主体附件信息新新增前置处理 |
185 | * @author makejava | 257 | * @author makejava | ... | ... |
... | @@ -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(JSQueryVO<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(JSQueryVO<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 Boolean check(EnterpriseRQVO vo) { | 687 | public Boolean check(EnterpriseRQVO vo) { |
633 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(vo.getTenantGuid()); | 688 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(vo.getTenantGuid()); |
634 | TenantRQVO tenant = csbrBeanUtil.convert(vo,TenantRQVO.class); | 689 | TenantRQVO tenant = csbrBeanUtil.convert(vo,TenantRQVO.class); | ... | ... |
-
Please register or sign in to post a comment