Merge branch 'develop' into feature-dataPort-v1.0.0
Showing
28 changed files
with
461 additions
and
82 deletions
| 1 | package com.csbr.qingcloud.portal.controller; | 1 | package com.csbr.qingcloud.portal.controller; |
| 2 | 2 | ||
| 3 | import com.csbr.cloud.common.enums.SystemError; | ||
| 4 | import com.csbr.cloud.common.exception.CsbrSystemException; | ||
| 3 | import com.csbr.cloud.common.response.CommonRes; | 5 | import com.csbr.cloud.common.response.CommonRes; |
| 4 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; | 6 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; |
| 7 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; | ||
| 5 | import csbr.cloud.entity.annotation.SystemLog; | 8 | import csbr.cloud.entity.annotation.SystemLog; |
| 6 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 9 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
| 7 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityQueryVO; | 10 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityQueryVO; |
| ... | @@ -13,6 +16,7 @@ import io.swagger.v3.oas.annotations.Parameter; | ... | @@ -13,6 +16,7 @@ import io.swagger.v3.oas.annotations.Parameter; |
| 13 | import io.swagger.v3.oas.annotations.tags.Tag; | 16 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 14 | import jakarta.annotation.Resource; | 17 | import jakarta.annotation.Resource; |
| 15 | import jakarta.validation.Valid; | 18 | import jakarta.validation.Valid; |
| 19 | import org.apache.commons.lang3.StringUtils; | ||
| 16 | import org.springframework.web.bind.annotation.*; | 20 | import org.springframework.web.bind.annotation.*; |
| 17 | 21 | ||
| 18 | import java.util.List; | 22 | import java.util.List; |
| ... | @@ -41,11 +45,39 @@ public class TdsConnectorIdentityController { | ... | @@ -41,11 +45,39 @@ public class TdsConnectorIdentityController { |
| 41 | return CommonRes.success(true); | 45 | return CommonRes.success(true); |
| 42 | } | 46 | } |
| 43 | 47 | ||
| 48 | @PostMapping("/change-save") | ||
| 49 | @SystemLog(value = "连接器身份信息-变更") | ||
| 50 | @Operation(summary = "连接器身份信息-变更") | ||
| 51 | public CommonRes<Boolean> changeSaveTdsConnectorIdentity(@RequestBody @Valid TdsConnectorIdentityRQVO vo) { | ||
| 52 | tdsConnectorIdentityService.changeSaveTdsConnectorIdentity(vo); | ||
| 53 | return CommonRes.success(true); | ||
| 54 | } | ||
| 55 | |||
| 44 | @PutMapping("/update") | 56 | @PutMapping("/update") |
| 45 | @SystemLog(value = "连接器身份信息-修改") | 57 | @SystemLog(value = "连接器身份信息-修改") |
| 46 | @Operation(summary = "连接器身份信息-修改") | 58 | @Operation(summary = "连接器身份信息-修改") |
| 47 | public CommonRes<Boolean> updateTdsConnectorIdentity(@RequestBody TdsConnectorIdentityRQVO vo) { | 59 | public CommonRes<Boolean> updateTdsConnectorIdentity(@RequestBody TdsConnectorIdentityRQVO vo) { |
| 60 | if (StringUtils.isBlank(vo.getGuid())) { | ||
| 61 | // W00012 = {0}:参数[{1}]不能为空! | ||
| 62 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, "数据唯一标识为空。"); | ||
| 63 | } | ||
| 64 | MfTdsConnectorIdentity mfTdsConnectorIdentity = tdsConnectorIdentityService.getTdsConnectorIdentityById(vo.getGuid()); | ||
| 65 | //变更数据重新提交流程 | ||
| 66 | if("Y".equals(mfTdsConnectorIdentity.getIsChangeData()) && vo.getImmediateApprove()){ | ||
| 67 | vo.setSourceBizGuid(mfTdsConnectorIdentity.getSourceBizGuid()); | ||
| 68 | vo.setIsRestart(true); | ||
| 69 | tdsConnectorIdentityService.changeSaveTdsConnectorIdentity(vo); | ||
| 70 | }else { | ||
| 48 | tdsConnectorIdentityService.updateTdsConnectorIdentity(vo); | 71 | tdsConnectorIdentityService.updateTdsConnectorIdentity(vo); |
| 72 | } | ||
| 73 | return CommonRes.success(true); | ||
| 74 | } | ||
| 75 | |||
| 76 | @PostMapping("/cross-flow-call-back") | ||
| 77 | @SystemLog(value = "连接器身份信息-流程结束后进行业务回调(跨服务审批)") | ||
| 78 | @Operation(summary = "连接器身份信息-流程结束后进行业务回调(跨服务审批)", hidden = true) | ||
| 79 | public CommonRes<Boolean> crossFlowCallBack(@RequestBody @Valid BizCallbackDTO dto) { | ||
| 80 | tdsConnectorIdentityService.crossFlowCallBack(dto); | ||
| 49 | return CommonRes.success(true); | 81 | return CommonRes.success(true); |
| 50 | } | 82 | } |
| 51 | 83 | ||
| ... | @@ -93,8 +125,8 @@ public class TdsConnectorIdentityController { | ... | @@ -93,8 +125,8 @@ public class TdsConnectorIdentityController { |
| 93 | 125 | ||
| 94 | @GetMapping("/check-connector") | 126 | @GetMapping("/check-connector") |
| 95 | @SystemLog(value = "连接器身份信息-检查连接器是否已经存在") | 127 | @SystemLog(value = "连接器身份信息-检查连接器是否已经存在") |
| 96 | public CommonRes<Boolean> checkConnector() { | 128 | public CommonRes<TdsConnectorIdentityRSVO> checkConnector() { |
| 97 | Boolean vo = tdsConnectorIdentityService.verifyUniqueness(null); | 129 | TdsConnectorIdentityRSVO vo = tdsConnectorIdentityService.checkConnector(); |
| 98 | return CommonRes.success(vo); | 130 | return CommonRes.success(vo); |
| 99 | } | 131 | } |
| 100 | //endregion | 132 | //endregion | ... | ... |
| ... | @@ -94,6 +94,14 @@ public class TdsConnectorIdentityManagementController { | ... | @@ -94,6 +94,14 @@ public class TdsConnectorIdentityManagementController { |
| 94 | return CommonRes.success(true); | 94 | return CommonRes.success(true); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | @PostMapping("/cross-flow-call-back") | ||
| 98 | @SystemLog(value = "连接器身份管理-流程结束后进行业务回调(跨服务审批)") | ||
| 99 | @Operation(summary = "连接器身份管理-流程结束后进行业务回调(跨服务审批)", hidden = true) | ||
| 100 | public CommonRes<Boolean> crossFlowCallBack(@RequestBody @Valid BizCallbackDTO dto) { | ||
| 101 | tdsConnectorIdentityManagementService.crossFlowCallBack(dto); | ||
| 102 | return CommonRes.success(true); | ||
| 103 | } | ||
| 104 | |||
| 97 | //endregion | 105 | //endregion |
| 98 | 106 | ||
| 99 | } | 107 | } | ... | ... |
| ... | @@ -4,6 +4,7 @@ import com.csbr.cloud.common.annotations.SystemParamsDict; | ... | @@ -4,6 +4,7 @@ import com.csbr.cloud.common.annotations.SystemParamsDict; |
| 4 | import com.csbr.cloud.workflow.domain.vo.appove.BizApproveVO; | 4 | import com.csbr.cloud.workflow.domain.vo.appove.BizApproveVO; |
| 5 | import com.fasterxml.jackson.annotation.JsonFormat; | 5 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 6 | import io.swagger.v3.oas.annotations.media.Schema; | 6 | import io.swagger.v3.oas.annotations.media.Schema; |
| 7 | import jdk.jfr.Name; | ||
| 7 | import lombok.Data; | 8 | import lombok.Data; |
| 8 | 9 | ||
| 9 | import java.math.BigDecimal; | 10 | import java.math.BigDecimal; |
| ... | @@ -266,6 +267,21 @@ public class EnterpriseRSVO { | ... | @@ -266,6 +267,21 @@ public class EnterpriseRSVO { |
| 266 | @SystemParamsDict(dictTypeName = "证件类型", codeFieldName = "handlePersonIdType") | 267 | @SystemParamsDict(dictTypeName = "证件类型", codeFieldName = "handlePersonIdType") |
| 267 | private String handlePersonIdTypeName; | 268 | private String handlePersonIdTypeName; |
| 268 | 269 | ||
| 270 | /** | ||
| 271 | * 可信身份凭证 | ||
| 272 | */ | ||
| 273 | @Schema(description = "可信身份凭证") | ||
| 274 | private String trustedIdentityCredential; | ||
| 275 | |||
| 276 | /** | ||
| 277 | * 凭证颁发日期 | ||
| 278 | */ | ||
| 279 | @Schema(description = "凭证颁发日期") | ||
| 280 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | ||
| 281 | private Date credentialTime; | ||
| 282 | |||
| 283 | private String trustedIdentityCredentialUnit="北京传世博润科技有限公司"; | ||
| 284 | |||
| 269 | /******** 库表存储属性 需处理 *****/ | 285 | /******** 库表存储属性 需处理 *****/ |
| 270 | 286 | ||
| 271 | /******** 自定义扩展 *****/ | 287 | /******** 自定义扩展 *****/ | ... | ... |
| ... | @@ -36,7 +36,7 @@ public class TdsConnectorAdditionalRQVO { | ... | @@ -36,7 +36,7 @@ public class TdsConnectorAdditionalRQVO { |
| 36 | @Schema(description = "可验证身份签发单位") | 36 | @Schema(description = "可验证身份签发单位") |
| 37 | @Size(max = 100, message = "可验证身份签发单位长度超过100") | 37 | @Size(max = 100, message = "可验证身份签发单位长度超过100") |
| 38 | // @NotBlank(message = "可验证身份签发单位为空。") | 38 | // @NotBlank(message = "可验证身份签发单位为空。") |
| 39 | private String identityIssuingUnit; | 39 | private String trustedIdentityCredentialUnit; |
| 40 | 40 | ||
| 41 | /** | 41 | /** |
| 42 | * 供应商名称 | 42 | * 供应商名称 | ... | ... |
| ... | @@ -37,7 +37,7 @@ public class TdsConnectorAdditionalRSVO { | ... | @@ -37,7 +37,7 @@ public class TdsConnectorAdditionalRSVO { |
| 37 | * 可验证身份签发单位 | 37 | * 可验证身份签发单位 |
| 38 | */ | 38 | */ |
| 39 | @Schema(description = "可验证身份签发单位") | 39 | @Schema(description = "可验证身份签发单位") |
| 40 | private String identityIssuingUnit; | 40 | private String trustedIdentityCredentialUnit; |
| 41 | 41 | ||
| 42 | /** | 42 | /** |
| 43 | * 供应商名称 | 43 | * 供应商名称 | ... | ... |
| ... | @@ -38,4 +38,10 @@ public class TdsConnectorIdentityManagementQueryVO extends FlowBizGuidQueryDTO { | ... | @@ -38,4 +38,10 @@ public class TdsConnectorIdentityManagementQueryVO extends FlowBizGuidQueryDTO { |
| 38 | @Schema(description = "是否调用查询的判断", hidden = true) | 38 | @Schema(description = "是否调用查询的判断", hidden = true) |
| 39 | private Boolean isNeedQuery; | 39 | private Boolean isNeedQuery; |
| 40 | 40 | ||
| 41 | /** | ||
| 42 | * 连接器名称 | ||
| 43 | */ | ||
| 44 | @Schema(description = "连接器名称") | ||
| 45 | private String conName; | ||
| 46 | |||
| 41 | } | 47 | } | ... | ... |
| ... | @@ -91,6 +91,9 @@ public class TdsConnectorIdentityManagementRQVO extends FlowRQBaseVO { | ... | @@ -91,6 +91,9 @@ public class TdsConnectorIdentityManagementRQVO extends FlowRQBaseVO { |
| 91 | @Schema(description = "业务审批状态") | 91 | @Schema(description = "业务审批状态") |
| 92 | private String bizApproveState; | 92 | private String bizApproveState; |
| 93 | 93 | ||
| 94 | @Schema(title = "节点名称") | ||
| 95 | private String zqName; | ||
| 96 | |||
| 94 | /******** 库表存储属性 需处理 *****/ | 97 | /******** 库表存储属性 需处理 *****/ |
| 95 | 98 | ||
| 96 | /******** 自定义扩展 *****/ | 99 | /******** 自定义扩展 *****/ | ... | ... |
| ... | @@ -106,6 +106,9 @@ public class TdsConnectorIdentityManagementRSVO extends BaseVO { | ... | @@ -106,6 +106,9 @@ public class TdsConnectorIdentityManagementRSVO extends BaseVO { |
| 106 | @Schema(title = "跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | 106 | @Schema(title = "跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") |
| 107 | private String crossPlatformApproveState; | 107 | private String crossPlatformApproveState; |
| 108 | 108 | ||
| 109 | @Schema(title = "节点名称") | ||
| 110 | private String zqName; | ||
| 111 | |||
| 109 | /******** 库表存储属性 需处理 *****/ | 112 | /******** 库表存储属性 需处理 *****/ |
| 110 | 113 | ||
| 111 | /******** 自定义扩展 *****/ | 114 | /******** 自定义扩展 *****/ | ... | ... |
| ... | @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; | ... | @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; |
| 7 | import jakarta.validation.constraints.NotBlank; | 7 | import jakarta.validation.constraints.NotBlank; |
| 8 | import jakarta.validation.constraints.NotNull; | 8 | import jakarta.validation.constraints.NotNull; |
| 9 | import jakarta.validation.constraints.Size; | 9 | import jakarta.validation.constraints.Size; |
| 10 | import jdk.jfr.Name; | ||
| 10 | import lombok.Data; | 11 | import lombok.Data; |
| 11 | import java.util.Date; | 12 | import java.util.Date; |
| 12 | import java.util.List; | 13 | import java.util.List; |
| ... | @@ -83,7 +84,7 @@ public class TdsConnectorIdentityRQVO extends FlowRQBaseVO { | ... | @@ -83,7 +84,7 @@ public class TdsConnectorIdentityRQVO extends FlowRQBaseVO { |
| 83 | * 可信身份凭证 | 84 | * 可信身份凭证 |
| 84 | */ | 85 | */ |
| 85 | @Schema(description = "可信身份凭证") | 86 | @Schema(description = "可信身份凭证") |
| 86 | private JSONArray trustedIdentityCredential; | 87 | private String trustedIdentityCredential; |
| 87 | 88 | ||
| 88 | /** | 89 | /** |
| 89 | * 凭证颁发日期 | 90 | * 凭证颁发日期 |
| ... | @@ -98,6 +99,24 @@ public class TdsConnectorIdentityRQVO extends FlowRQBaseVO { | ... | @@ -98,6 +99,24 @@ public class TdsConnectorIdentityRQVO extends FlowRQBaseVO { |
| 98 | @Schema(description = "业务审批状态") | 99 | @Schema(description = "业务审批状态") |
| 99 | private String bizApproveState; | 100 | private String bizApproveState; |
| 100 | 101 | ||
| 102 | /** | ||
| 103 | * 原始数据Guid | ||
| 104 | */ | ||
| 105 | @Schema(description = "原始数据Guid") | ||
| 106 | private String sourceBizGuid; | ||
| 107 | |||
| 108 | |||
| 109 | /** | ||
| 110 | * 是否变更数据【N 正常数据,Y 变更数据】 | ||
| 111 | */ | ||
| 112 | @Schema(description = "是否变更数据【N 正常数据,Y 变更数据】") | ||
| 113 | private String isChangeData; | ||
| 114 | |||
| 115 | private String funcCode; | ||
| 116 | |||
| 117 | @Schema(title = "节点名称") | ||
| 118 | private String zqName; | ||
| 119 | |||
| 101 | /******** 库表存储属性 需处理 *****/ | 120 | /******** 库表存储属性 需处理 *****/ |
| 102 | 121 | ||
| 103 | /******** 自定义扩展 *****/ | 122 | /******** 自定义扩展 *****/ | ... | ... |
| ... | @@ -4,6 +4,7 @@ import com.csbr.cloud.workflow.domain.vo.appove.BizApproveVO; | ... | @@ -4,6 +4,7 @@ import com.csbr.cloud.workflow.domain.vo.appove.BizApproveVO; |
| 4 | import csbr.cloud.entity.domain.base.vo.BaseVO; | 4 | import csbr.cloud.entity.domain.base.vo.BaseVO; |
| 5 | import io.swagger.v3.oas.annotations.media.Schema; | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import com.fasterxml.jackson.annotation.JsonFormat; | 6 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 7 | import jdk.jfr.Name; | ||
| 7 | import lombok.Data; | 8 | import lombok.Data; |
| 8 | import java.util.Date; | 9 | import java.util.Date; |
| 9 | import java.util.List; | 10 | import java.util.List; |
| ... | @@ -71,7 +72,7 @@ public class TdsConnectorIdentityRSVO extends BaseVO { | ... | @@ -71,7 +72,7 @@ public class TdsConnectorIdentityRSVO extends BaseVO { |
| 71 | * 可信身份凭证 | 72 | * 可信身份凭证 |
| 72 | */ | 73 | */ |
| 73 | @Schema(description = "可信身份凭证") | 74 | @Schema(description = "可信身份凭证") |
| 74 | private Map<String,String> trustedIdentityCredential; | 75 | private String trustedIdentityCredential; |
| 75 | 76 | ||
| 76 | /** | 77 | /** |
| 77 | * 凭证颁发日期 | 78 | * 凭证颁发日期 |
| ... | @@ -89,6 +90,21 @@ public class TdsConnectorIdentityRSVO extends BaseVO { | ... | @@ -89,6 +90,21 @@ public class TdsConnectorIdentityRSVO extends BaseVO { |
| 89 | @Schema(title = "跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | 90 | @Schema(title = "跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") |
| 90 | private String crossPlatformApproveState; | 91 | private String crossPlatformApproveState; |
| 91 | 92 | ||
| 93 | /** | ||
| 94 | * 原始数据Guid | ||
| 95 | */ | ||
| 96 | @Schema(description = "原始数据Guid") | ||
| 97 | private String sourceBizGuid; | ||
| 98 | |||
| 99 | /** | ||
| 100 | * 是否变更数据【N 正常数据,Y 变更数据】 | ||
| 101 | */ | ||
| 102 | @Schema(description = "是否变更数据【N 正常数据,Y 变更数据】") | ||
| 103 | private String isChangeData; | ||
| 104 | |||
| 105 | @Schema(title = "节点名称") | ||
| 106 | private String zqName; | ||
| 107 | |||
| 92 | /******** 库表存储属性 需处理 *****/ | 108 | /******** 库表存储属性 需处理 *****/ |
| 93 | 109 | ||
| 94 | /******** 自定义扩展 *****/ | 110 | /******** 自定义扩展 *****/ | ... | ... |
| ... | @@ -65,49 +65,42 @@ public class TdsConnectorVerifiableRQVO { | ... | @@ -65,49 +65,42 @@ public class TdsConnectorVerifiableRQVO { |
| 65 | * 加密模块认证 | 65 | * 加密模块认证 |
| 66 | */ | 66 | */ |
| 67 | @Schema(description = "加密模块认证") | 67 | @Schema(description = "加密模块认证") |
| 68 | @NotNull(message = "加密模块认证为空。") | ||
| 69 | private JSONArray encryptionModuleAuthentication; | 68 | private JSONArray encryptionModuleAuthentication; |
| 70 | 69 | ||
| 71 | /** | 70 | /** |
| 72 | * 软件供应链合规声明 | 71 | * 软件供应链合规声明 |
| 73 | */ | 72 | */ |
| 74 | @Schema(description = "软件供应链合规声明") | 73 | @Schema(description = "软件供应链合规声明") |
| 75 | @NotNull(message = "软件供应链合规声明为空。") | ||
| 76 | private JSONArray softwareScmStatemen; | 74 | private JSONArray softwareScmStatemen; |
| 77 | 75 | ||
| 78 | /** | 76 | /** |
| 79 | * 安全漏洞修复声明 | 77 | * 安全漏洞修复声明 |
| 80 | */ | 78 | */ |
| 81 | @Schema(description = "安全漏洞修复声明") | 79 | @Schema(description = "安全漏洞修复声明") |
| 82 | @NotNull(message = "安全漏洞修复声明为空。") | ||
| 83 | private JSONArray securityLoopholeRepairStatement; | 80 | private JSONArray securityLoopholeRepairStatement; |
| 84 | 81 | ||
| 85 | /** | 82 | /** |
| 86 | * 通信协议兼容性认证 | 83 | * 通信协议兼容性认证 |
| 87 | */ | 84 | */ |
| 88 | @Schema(description = "通信协议兼容性认证") | 85 | @Schema(description = "通信协议兼容性认证") |
| 89 | @NotNull(message = "通信协议兼容性认证为空。") | ||
| 90 | private JSONArray communicationProtocolCompatibilityCertification; | 86 | private JSONArray communicationProtocolCompatibilityCertification; |
| 91 | 87 | ||
| 92 | /** | 88 | /** |
| 93 | * 硬件可信执行环境(TEE)认证 | 89 | * 硬件可信执行环境(TEE)认证 |
| 94 | */ | 90 | */ |
| 95 | @Schema(description = "硬件可信执行环境(TEE)认证") | 91 | @Schema(description = "硬件可信执行环境(TEE)认证") |
| 96 | @NotNull(message = "硬件可信执行环境(TEE)认证为空。") | ||
| 97 | private JSONArray teeCertification; | 92 | private JSONArray teeCertification; |
| 98 | 93 | ||
| 99 | /** | 94 | /** |
| 100 | * 接入行为审计合规报告 | 95 | * 接入行为审计合规报告 |
| 101 | */ | 96 | */ |
| 102 | @Schema(description = "接入行为审计合规报告") | 97 | @Schema(description = "接入行为审计合规报告") |
| 103 | @NotNull(message = "接入行为审计合规报告为空。") | ||
| 104 | private JSONArray accessAuditReport; | 98 | private JSONArray accessAuditReport; |
| 105 | 99 | ||
| 106 | /** | 100 | /** |
| 107 | * 第三方认证声明 | 101 | * 第三方认证声明 |
| 108 | */ | 102 | */ |
| 109 | @Schema(description = "第三方认证声明") | 103 | @Schema(description = "第三方认证声明") |
| 110 | @NotNull(message = "第三方认证声明为空。") | ||
| 111 | private JSONArray thirdPartyCertification; | 104 | private JSONArray thirdPartyCertification; |
| 112 | 105 | ||
| 113 | /** | 106 | /** | ... | ... |
| ... | @@ -38,6 +38,12 @@ public class TenantRQVO extends CsbrBaseVO { | ... | @@ -38,6 +38,12 @@ public class TenantRQVO extends CsbrBaseVO { |
| 38 | private String tenantName; | 38 | private String tenantName; |
| 39 | 39 | ||
| 40 | /** | 40 | /** |
| 41 | * 统一社会信用代码 | ||
| 42 | */ | ||
| 43 | @Schema(description = "统一社会信用代码") | ||
| 44 | private String socialCreditCode; | ||
| 45 | |||
| 46 | /** | ||
| 41 | * 公司简称 | 47 | * 公司简称 |
| 42 | */ | 48 | */ |
| 43 | @Schema(description = "公司简称") | 49 | @Schema(description = "公司简称") | ... | ... |
| ... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.mybatis.entity; | ... | @@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.mybatis.entity; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.annotation.FieldStrategy; | 3 | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| 4 | import com.baomidou.mybatisplus.annotation.TableField; | 4 | import com.baomidou.mybatisplus.annotation.TableField; |
| 5 | import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; | ||
| 5 | import csbr.cloud.entity.domain.base.dao.BaseDO; | 6 | import csbr.cloud.entity.domain.base.dao.BaseDO; |
| 6 | import jdk.jfr.Name; | 7 | import jdk.jfr.Name; |
| 7 | import lombok.Data; | 8 | import lombok.Data; |
| ... | @@ -219,4 +220,16 @@ public class MfEnterprise extends BaseDO { | ... | @@ -219,4 +220,16 @@ public class MfEnterprise extends BaseDO { |
| 219 | 220 | ||
| 220 | @Name("经办人证件类型") | 221 | @Name("经办人证件类型") |
| 221 | private String handlePersonIdType; | 222 | private String handlePersonIdType; |
| 223 | |||
| 224 | /** | ||
| 225 | * 可信身份凭证 | ||
| 226 | */ | ||
| 227 | @Name("可信身份凭证") | ||
| 228 | private String trustedIdentityCredential; | ||
| 229 | |||
| 230 | /** | ||
| 231 | * 凭证颁发日期 | ||
| 232 | */ | ||
| 233 | @Name("凭证颁发日期") | ||
| 234 | private Date credentialTime; | ||
| 222 | } | 235 | } | ... | ... |
| ... | @@ -32,7 +32,7 @@ public class MfTdsConnectorAdditional extends BaseShardingDO { | ... | @@ -32,7 +32,7 @@ public class MfTdsConnectorAdditional extends BaseShardingDO { |
| 32 | * 可验证身份签发单位 | 32 | * 可验证身份签发单位 |
| 33 | */ | 33 | */ |
| 34 | @Name("可验证身份签发单位") | 34 | @Name("可验证身份签发单位") |
| 35 | private String identityIssuingUnit; | 35 | private String trustedIdentityCredentialUnit; |
| 36 | 36 | ||
| 37 | /** | 37 | /** |
| 38 | * 供应商名称 | 38 | * 供应商名称 | ... | ... |
| ... | @@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.TableName; | ... | @@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.TableName; |
| 7 | import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; | 7 | import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; |
| 8 | import csbr.cloud.entity.domain.base.dao.BaseDO; | 8 | import csbr.cloud.entity.domain.base.dao.BaseDO; |
| 9 | import csbr.cloud.entity.domain.base.dao.BaseShardingDO; | 9 | import csbr.cloud.entity.domain.base.dao.BaseShardingDO; |
| 10 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 11 | import jakarta.validation.constraints.NotBlank; | ||
| 10 | import jdk.jfr.Name; | 12 | import jdk.jfr.Name; |
| 11 | import lombok.Data; | 13 | import lombok.Data; |
| 12 | import lombok.EqualsAndHashCode; | 14 | import lombok.EqualsAndHashCode; |
| ... | @@ -75,8 +77,7 @@ public class MfTdsConnectorIdentity extends BaseShardingDO { | ... | @@ -75,8 +77,7 @@ public class MfTdsConnectorIdentity extends BaseShardingDO { |
| 75 | * 可信身份凭证 | 77 | * 可信身份凭证 |
| 76 | */ | 78 | */ |
| 77 | @Name("可信身份凭证") | 79 | @Name("可信身份凭证") |
| 78 | @TableField(typeHandler = FastjsonTypeHandler.class) | 80 | private String trustedIdentityCredential; |
| 79 | private JSONArray trustedIdentityCredential; | ||
| 80 | 81 | ||
| 81 | /** | 82 | /** |
| 82 | * 凭证颁发日期 | 83 | * 凭证颁发日期 |
| ... | @@ -93,4 +94,18 @@ public class MfTdsConnectorIdentity extends BaseShardingDO { | ... | @@ -93,4 +94,18 @@ public class MfTdsConnectorIdentity extends BaseShardingDO { |
| 93 | @Name("业务审批状态") | 94 | @Name("业务审批状态") |
| 94 | private String bizApproveState; | 95 | private String bizApproveState; |
| 95 | 96 | ||
| 97 | /** | ||
| 98 | * 是否变更数据【N 正常数据,Y 变更数据】 | ||
| 99 | */ | ||
| 100 | @Name("是否变更数据") | ||
| 101 | private String isChangeData; | ||
| 102 | |||
| 103 | /** | ||
| 104 | * 原始数据Guid | ||
| 105 | */ | ||
| 106 | @Name("原始数据Guid") | ||
| 107 | private String sourceBizGuid; | ||
| 108 | |||
| 109 | @Name("节点名称") | ||
| 110 | private String zqName; | ||
| 96 | } | 111 | } | ... | ... |
| ... | @@ -96,4 +96,7 @@ public class MfTdsConnectorIdentityManagement extends BaseShardingDO { | ... | @@ -96,4 +96,7 @@ public class MfTdsConnectorIdentityManagement extends BaseShardingDO { |
| 96 | @Name("所属法人或其他组织名称") | 96 | @Name("所属法人或其他组织名称") |
| 97 | private String legalEntity; | 97 | private String legalEntity; |
| 98 | 98 | ||
| 99 | @Name("节点名称") | ||
| 100 | private String zqName; | ||
| 101 | |||
| 99 | } | 102 | } | ... | ... |
| ... | @@ -76,4 +76,6 @@ public interface TdsConnectorIdentityManagementService { | ... | @@ -76,4 +76,6 @@ public interface TdsConnectorIdentityManagementService { |
| 76 | * @param rqVO | 76 | * @param rqVO |
| 77 | */ | 77 | */ |
| 78 | void updateVoucher(TdsConnectorIdentityManagementVoucherRQVO rqVO); | 78 | void updateVoucher(TdsConnectorIdentityManagementVoucherRQVO rqVO); |
| 79 | |||
| 80 | void crossFlowCallBack(BizCallbackDTO dto); | ||
| 79 | } | 81 | } | ... | ... |
| ... | @@ -94,4 +94,24 @@ public interface TdsConnectorIdentityService { | ... | @@ -94,4 +94,24 @@ public interface TdsConnectorIdentityService { |
| 94 | Map<String, MfTdsConnectorIdentity> getCrossTenantTdsConnectorIdentitys(Set<String> guidSet); | 94 | Map<String, MfTdsConnectorIdentity> getCrossTenantTdsConnectorIdentitys(Set<String> guidSet); |
| 95 | 95 | ||
| 96 | Boolean verifyUniqueness(TdsConnectorIdentityRQVO rqVO); | 96 | Boolean verifyUniqueness(TdsConnectorIdentityRQVO rqVO); |
| 97 | |||
| 98 | /** | ||
| 99 | * 变更数据申请 | ||
| 100 | * @param flowBaseVO | ||
| 101 | */ | ||
| 102 | void changeSaveTdsConnectorIdentity(FlowRQBaseVO flowBaseVO); | ||
| 103 | |||
| 104 | /** | ||
| 105 | * 检查连接器是否已经存在 | ||
| 106 | * @return | ||
| 107 | */ | ||
| 108 | TdsConnectorIdentityRSVO checkConnector(); | ||
| 109 | |||
| 110 | /** | ||
| 111 | * 跨平台业务调用 | ||
| 112 | * @param dto | ||
| 113 | */ | ||
| 114 | void crossFlowCallBack(BizCallbackDTO dto); | ||
| 115 | |||
| 116 | MfTdsConnectorIdentity getTdsConnectorIdentityById(String guid); | ||
| 97 | } | 117 | } | ... | ... |
| ... | @@ -311,10 +311,11 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -311,10 +311,11 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 311 | // 删除主平台数据 | 311 | // 删除主平台数据 |
| 312 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(crossPlatformApproveState)) { | 312 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(crossPlatformApproveState)) { |
| 313 | JSONObject jsonObject = new JSONObject(); | 313 | JSONObject jsonObject = new JSONObject(); |
| 314 | jsonObject.put("zqSystemCode", SysFuncCode); | 314 | jsonObject.put("bizCode", SysFuncCode); |
| 315 | jsonObject.put("zqBizGuids", JSON.toJSONString(guids)); | 315 | jsonObject.put("operation", "DEL"); |
| 316 | jsonObject.put("zqData", JSON.toJSONString(guids)); | ||
| 316 | jsonObject.put("isCollection", true); | 317 | jsonObject.put("isCollection", true); |
| 317 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getZqDelUrl()); | 318 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getReceiveUrl()); |
| 318 | } | 319 | } |
| 319 | } | 320 | } |
| 320 | 321 | ||
| ... | @@ -477,10 +478,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -477,10 +478,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 477 | // 下架主平台数据 | 478 | // 下架主平台数据 |
| 478 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(mfDemand.getCrossPlatformApproveState())) { | 479 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(mfDemand.getCrossPlatformApproveState())) { |
| 479 | JSONObject jsonObject = new JSONObject(); | 480 | JSONObject jsonObject = new JSONObject(); |
| 480 | jsonObject.put("zqSystemCode", SysFuncCode); | 481 | jsonObject.put("bizCode", SysFuncCode); |
| 481 | jsonObject.put("guid", vo.getGuid()); | 482 | jsonObject.put("operation", "SJ"); |
| 482 | jsonObject.put("listingStatus", vo.getListingStatus()); | 483 | JSONObject data = new JSONObject(); |
| 483 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getGroundingPickUrl()); | 484 | data.put("guid", vo.getGuid()); |
| 485 | data.put("listingStatus", vo.getListingStatus()); | ||
| 486 | jsonObject.put("zqData", data); | ||
| 487 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getReceiveUrl()); | ||
| 484 | } | 488 | } |
| 485 | return Boolean.TRUE; | 489 | return Boolean.TRUE; |
| 486 | } | 490 | } | ... | ... |
| ... | @@ -298,10 +298,11 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro | ... | @@ -298,10 +298,11 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro |
| 298 | // 删除主平台数据 | 298 | // 删除主平台数据 |
| 299 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(crossPlatformApproveState)) { | 299 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(crossPlatformApproveState)) { |
| 300 | JSONObject jsonObject = new JSONObject(); | 300 | JSONObject jsonObject = new JSONObject(); |
| 301 | jsonObject.put("zqSystemCode", SysFuncCode + "BG"); | 301 | jsonObject.put("bizCode", SysFuncCode + "BG"); |
| 302 | jsonObject.put("zqBizGuids", JSON.toJSONString(guids)); | 302 | jsonObject.put("operation", "DEL"); |
| 303 | jsonObject.put("zqData", JSON.toJSONString(guids)); | ||
| 303 | jsonObject.put("isCollection", true); | 304 | jsonObject.put("isCollection", true); |
| 304 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getZqDelUrl()); | 305 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getReceiveUrl()); |
| 305 | } | 306 | } |
| 306 | 307 | ||
| 307 | // 删除流程数据 | 308 | // 删除流程数据 | ... | ... |
| ... | @@ -421,10 +421,11 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -421,10 +421,11 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 421 | // 删除主平台数据 | 421 | // 删除主平台数据 |
| 422 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(crossPlatformApproveState)) { | 422 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(crossPlatformApproveState)) { |
| 423 | JSONObject jsonObject = new JSONObject(); | 423 | JSONObject jsonObject = new JSONObject(); |
| 424 | jsonObject.put("zqSystemCode", SysFuncCode); | 424 | jsonObject.put("bizCode", SysFuncCode); |
| 425 | jsonObject.put("zqBizGuids", JSON.toJSONString(guids)); | 425 | jsonObject.put("operation", "DEL"); |
| 426 | jsonObject.put("zqData", JSON.toJSONString(guids)); | ||
| 426 | jsonObject.put("isCollection", true); | 427 | jsonObject.put("isCollection", true); |
| 427 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getZqDelUrl()); | 428 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getReceiveUrl()); |
| 428 | } | 429 | } |
| 429 | 430 | ||
| 430 | // 删除流程数据 | 431 | // 删除流程数据 | ... | ... |
| 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.Wrapper; | 3 | import com.alibaba.fastjson.JSON; |
| 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 5 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 5 | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 7 | import com.csbr.cloud.common.enums.SystemError; | 7 | import com.csbr.cloud.common.enums.SystemError; |
| 8 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; | 8 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; |
| 9 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementVoucherRQVO; | ||
| 10 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; | ||
| 11 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityService; | ||
| 12 | import csbr.cloud.entity.enums.ApprovalStateEnum; | ||
| 13 | import com.csbr.cloud.common.exception.CsbrSystemException; | 9 | import com.csbr.cloud.common.exception.CsbrSystemException; |
| 14 | import com.csbr.cloud.common.util.CommonUtil; | 10 | import com.csbr.cloud.common.util.CommonUtil; |
| 15 | import com.csbr.cloud.common.util.CsbrBeanUtil; | 11 | import com.csbr.cloud.common.util.CsbrBeanUtil; |
| 16 | import com.csbr.cloud.workflow.util.ApprovalFlowUtil; | ||
| 17 | import com.csbr.cloud.workflow.util.FlowAbstractImpl; | ||
| 18 | import com.csbr.cloud.common.util.MessageSourceUtil; | 12 | import com.csbr.cloud.common.util.MessageSourceUtil; |
| 19 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
| 20 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; | ||
| 21 | import com.csbr.cloud.workflow.domain.vo.appove.BizApproveVO; | ||
| 22 | import com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO; | 13 | import com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO; |
| 23 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; | 14 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; |
| 15 | import com.csbr.cloud.workflow.domain.vo.appove.BizApproveVO; | ||
| 16 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; | ||
| 17 | import com.csbr.cloud.workflow.util.ApprovalFlowUtil; | ||
| 18 | import com.csbr.cloud.workflow.util.FlowAbstractImpl; | ||
| 24 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementQueryVO; | 19 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementQueryVO; |
| 25 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementRQVO; | 20 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementRQVO; |
| 26 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementRSVO; | 21 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementRSVO; |
| 22 | import com.csbr.qingcloud.portal.domain.vo.TdsConnectorIdentityManagementVoucherRQVO; | ||
| 23 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; | ||
| 27 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentityManagement; | 24 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentityManagement; |
| 28 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorIdentityManagementService; | 25 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorIdentityManagementService; |
| 29 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityManagementService; | 26 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityManagementService; |
| 27 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityService; | ||
| 28 | import csbr.cloud.entity.domain.base.vo.PageListVO; | ||
| 29 | import csbr.cloud.entity.enums.ApprovalStateEnum; | ||
| 30 | import io.seata.spring.annotation.GlobalTransactional; | ||
| 30 | import jakarta.annotation.Resource; | 31 | import jakarta.annotation.Resource; |
| 31 | import lombok.extern.slf4j.Slf4j; | 32 | import lombok.extern.slf4j.Slf4j; |
| 32 | import org.apache.commons.collections.CollectionUtils; | 33 | import org.apache.commons.collections.CollectionUtils; |
| 33 | import org.apache.commons.lang3.ObjectUtils; | ||
| 34 | import org.apache.commons.lang3.StringUtils; | 34 | import org.apache.commons.lang3.StringUtils; |
| 35 | import org.springframework.beans.factory.annotation.Value; | 35 | import org.springframework.beans.factory.annotation.Value; |
| 36 | import org.springframework.stereotype.Service; | 36 | import org.springframework.stereotype.Service; |
| 37 | import io.seata.spring.annotation.GlobalTransactional; | ||
| 38 | import org.springframework.transaction.annotation.Transactional; | 37 | import org.springframework.transaction.annotation.Transactional; |
| 39 | 38 | ||
| 39 | import java.text.SimpleDateFormat; | ||
| 40 | import java.util.*; | 40 | import java.util.*; |
| 41 | 41 | ||
| 42 | /** | 42 | /** |
| ... | @@ -93,6 +93,10 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | ... | @@ -93,6 +93,10 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl |
| 93 | LambdaQueryWrapper<MfTdsConnectorIdentityManagement> queryWrapper = mfTdsConnectorIdentityManagementService.csbrQueryWrapper(queryVO, MfTdsConnectorIdentityManagement.class); | 93 | LambdaQueryWrapper<MfTdsConnectorIdentityManagement> queryWrapper = mfTdsConnectorIdentityManagementService.csbrQueryWrapper(queryVO, MfTdsConnectorIdentityManagement.class); |
| 94 | queryWrapper.in(CollectionUtils.isNotEmpty(queryVO.getGuidList()), MfTdsConnectorIdentityManagement::getGuid, | 94 | queryWrapper.in(CollectionUtils.isNotEmpty(queryVO.getGuidList()), MfTdsConnectorIdentityManagement::getGuid, |
| 95 | queryVO.getGuidList()); | 95 | queryVO.getGuidList()); |
| 96 | if(StringUtils.isNotBlank(queryVO.getConName())){ | ||
| 97 | String existsSql = "select guid from mf_tds_connector_identity a where a.guid=mf_tds_connector_identity_management.connector_guid and is_deleted='N' and is_change_data='N' and a.connector_name like '%"+queryVO.getConName()+"%'"; | ||
| 98 | queryWrapper.exists(existsSql); | ||
| 99 | } | ||
| 96 | queryWrapper.orderByDesc(MfTdsConnectorIdentityManagement::getCreateTime); | 100 | queryWrapper.orderByDesc(MfTdsConnectorIdentityManagement::getCreateTime); |
| 97 | mfTdsConnectorIdentityManagementService.csbrExcludeShardingLambdaQueryWrapper(queryWrapper); | 101 | mfTdsConnectorIdentityManagementService.csbrExcludeShardingLambdaQueryWrapper(queryWrapper); |
| 98 | PageListVO<MfTdsConnectorIdentityManagement> pageList = mfTdsConnectorIdentityManagementService.csbrPageList(queryVO, queryWrapper); | 102 | PageListVO<MfTdsConnectorIdentityManagement> pageList = mfTdsConnectorIdentityManagementService.csbrPageList(queryVO, queryWrapper); |
| ... | @@ -122,6 +126,13 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | ... | @@ -122,6 +126,13 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl |
| 122 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(String.format("获取%s详情数据", FUNCTION_NAME))); | 126 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(String.format("获取%s详情数据", FUNCTION_NAME))); |
| 123 | } | 127 | } |
| 124 | TdsConnectorIdentityManagementRSVO vo = convertToVO(entity, true); | 128 | TdsConnectorIdentityManagementRSVO vo = convertToVO(entity, true); |
| 129 | Map<String, MfTdsConnectorIdentity> connectorIdentityMap = tdsConnectorIdentityService.getCrossTenantTdsConnectorIdentitys(CommonUtil.filterSetFiled(Arrays.asList(entity), | ||
| 130 | MfTdsConnectorIdentityManagement::getConnectorGuid)); | ||
| 131 | if(ObjectUtils.isNotEmpty(connectorIdentityMap) && connectorIdentityMap.containsKey(entity.getConnectorGuid())){ | ||
| 132 | vo.setConnectorName(connectorIdentityMap.get(vo.getConnectorGuid()).getConnectorName()); | ||
| 133 | vo.setLegalEntity(connectorIdentityMap.get(vo.getConnectorGuid()).getLegalEntity()); | ||
| 134 | vo.setConnectorName(connectorIdentityMap.get(vo.getConnectorGuid()).getConnectorName()); | ||
| 135 | } | ||
| 125 | return vo; | 136 | return vo; |
| 126 | } | 137 | } |
| 127 | 138 | ||
| ... | @@ -140,7 +151,7 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | ... | @@ -140,7 +151,7 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl |
| 140 | beforeSave(rqVO); | 151 | beforeSave(rqVO); |
| 141 | MfTdsConnectorIdentityManagement entity = convertToEntity(rqVO); | 152 | MfTdsConnectorIdentityManagement entity = convertToEntity(rqVO); |
| 142 | // 发起审批流程或保存草稿 | 153 | // 发起审批流程或保存草稿 |
| 143 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 154 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity,rqVO); |
| 144 | super.startWorkFlow(rqVO, approvalDTO, entity::setBizApproveState); | 155 | super.startWorkFlow(rqVO, approvalDTO, entity::setBizApproveState); |
| 145 | // 业务数据保存 | 156 | // 业务数据保存 |
| 146 | boolean flag = mfTdsConnectorIdentityManagementService.save(entity); | 157 | boolean flag = mfTdsConnectorIdentityManagementService.save(entity); |
| ... | @@ -168,7 +179,7 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | ... | @@ -168,7 +179,7 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl |
| 168 | beforeUpdate(rqVO); | 179 | beforeUpdate(rqVO); |
| 169 | MfTdsConnectorIdentityManagement entity = convertToEntity(rqVO); | 180 | MfTdsConnectorIdentityManagement entity = convertToEntity(rqVO); |
| 170 | // 发起审批流程或保存草稿 | 181 | // 发起审批流程或保存草稿 |
| 171 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 182 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity, rqVO); |
| 172 | super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState); | 183 | super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState); |
| 173 | if (rqVO.getIsRestart()) { | 184 | if (rqVO.getIsRestart()) { |
| 174 | // 重新提交 | 185 | // 重新提交 |
| ... | @@ -274,14 +285,23 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | ... | @@ -274,14 +285,23 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl |
| 274 | mfTdsConnectorIdentityManagementService.updateById(entity); | 285 | mfTdsConnectorIdentityManagementService.updateById(entity); |
| 275 | } | 286 | } |
| 276 | 287 | ||
| 288 | @Override | ||
| 289 | public void crossFlowCallBack(BizCallbackDTO dto) { | ||
| 290 | MfTdsConnectorIdentityManagement entity = mfTdsConnectorIdentityManagementService.getById(dto.getBizGuid()); | ||
| 291 | entity.setBizApproveState(dto.getApprovalState()); | ||
| 292 | entity.setCrossPlatformApproveState(dto.getApprovalState()); | ||
| 293 | mfTdsConnectorIdentityManagementService.updateById(entity); | ||
| 294 | } | ||
| 295 | |||
| 277 | /** | 296 | /** |
| 278 | * 获取发起流程参数 | 297 | * 获取发起流程参数 |
| 279 | * @author xup | 298 | * @author xup |
| 280 | * @date 2025-09-23 17:35 | 299 | * @date 2025-09-23 17:35 |
| 281 | * @param entity | 300 | * @param entity |
| 301 | * @param rqVO | ||
| 282 | * @return com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO | 302 | * @return com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO |
| 283 | */ | 303 | */ |
| 284 | private AddApprovalDTO getAddApprovalDTO(MfTdsConnectorIdentityManagement entity) { | 304 | private AddApprovalDTO getAddApprovalDTO(MfTdsConnectorIdentityManagement entity, TdsConnectorIdentityManagementRQVO rqVO) { |
| 285 | AddApprovalDTO approvalDTO = new AddApprovalDTO(FLOW_TYPE, entity.getGuid()); | 305 | AddApprovalDTO approvalDTO = new AddApprovalDTO(FLOW_TYPE, entity.getGuid()); |
| 286 | // todo | 306 | // todo |
| 287 | approvalDTO.setFuncCode(SysFuncCode); | 307 | approvalDTO.setFuncCode(SysFuncCode); |
| ... | @@ -293,6 +313,9 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | ... | @@ -293,6 +313,9 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl |
| 293 | approvalDTO.setParam3(null); | 313 | approvalDTO.setParam3(null); |
| 294 | approvalDTO.setParam4(null); | 314 | approvalDTO.setParam4(null); |
| 295 | 315 | ||
| 316 | // 增加跨服务审批字段 | ||
| 317 | rqVO.setGuid(entity.getGuid()); | ||
| 318 | approvalDTO.setBizData(JSON.toJSONString(rqVO)); | ||
| 296 | return approvalDTO; | 319 | return approvalDTO; |
| 297 | } | 320 | } |
| 298 | 321 | ||
| ... | @@ -352,13 +375,14 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | ... | @@ -352,13 +375,14 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl |
| 352 | if(StringUtils.isNotBlank(rqVO.getGuid())){ | 375 | if(StringUtils.isNotBlank(rqVO.getGuid())){ |
| 353 | queryWrapper.ne(MfTdsConnectorIdentityManagement::getGuid,rqVO.getGuid()); | 376 | queryWrapper.ne(MfTdsConnectorIdentityManagement::getGuid,rqVO.getGuid()); |
| 354 | } | 377 | } |
| 355 | //排除驳回、撤回的数据 | ||
| 356 | queryWrapper.notIn(MfTdsConnectorIdentityManagement::getBizApproveState,ApprovalStateEnum.CANCEL.getValue(), | ||
| 357 | ApprovalStateEnum.REJECT.getValue()); | ||
| 358 | //根据使用场景查询 | 378 | //根据使用场景查询 |
| 379 | queryWrapper.eq(MfTdsConnectorIdentityManagement::getConnectorGuid,rqVO.getConnectorGuid()); | ||
| 359 | queryWrapper.eq(MfTdsConnectorIdentityManagement::getUseScenariosCode,rqVO.getUseScenariosCode()); | 380 | queryWrapper.eq(MfTdsConnectorIdentityManagement::getUseScenariosCode,rqVO.getUseScenariosCode()); |
| 381 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 360 | //期望效期有效的 | 382 | //期望效期有效的 |
| 361 | queryWrapper.gt(MfTdsConnectorIdentityManagement::getExpirationTime,new Date()); | 383 | queryWrapper.ge(MfTdsConnectorIdentityManagement::getExpirationTime,sdf.format(new Date())); |
| 384 | //排除驳回、撤回的数据 | ||
| 385 | queryWrapper.and(wraper->wraper.apply("ifnull(cross_platform_approve_state,biz_approve_state) in ('A','Y')")); | ||
| 362 | if(mfTdsConnectorIdentityManagementService.count(queryWrapper)>0){ | 386 | if(mfTdsConnectorIdentityManagementService.count(queryWrapper)>0){ |
| 363 | throw new CsbrSystemException(SystemError.DATA_ALREADY_EXISTS,"该连接器的使用场景已经存在。"); | 387 | throw new CsbrSystemException(SystemError.DATA_ALREADY_EXISTS,"该连接器的使用场景已经存在。"); |
| 364 | } | 388 | } |
| ... | @@ -509,29 +533,29 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl | ... | @@ -509,29 +533,29 @@ public class TdsConnectorIdentityManagementServiceImpl extends FlowAbstractImpl |
| 509 | * @return void | 533 | * @return void |
| 510 | */ | 534 | */ |
| 511 | private void afterQuery(PageListVO<MfTdsConnectorIdentityManagement> pageList, PageListVO<TdsConnectorIdentityManagementRSVO> rsPageList) { | 535 | private void afterQuery(PageListVO<MfTdsConnectorIdentityManagement> pageList, PageListVO<TdsConnectorIdentityManagementRSVO> rsPageList) { |
| 512 | if (CollectionUtils.isNotEmpty(pageList.getRecords())) { | 536 | // if (CollectionUtils.isNotEmpty(pageList.getRecords())) { |
| 513 | rsPageList.setRecords(convertToVO(pageList.getRecords())); | 537 | // rsPageList.setRecords(convertToVO(pageList.getRecords())); |
| 514 | } | ||
| 515 | // 需要特殊处理数据时使用 | ||
| 516 | // if(CollectionUtils.isNotEmpty(pageList.getRecords())){ | ||
| 517 | // List<TdsConnectorIdentityManagementRSVO> results = new ArrayList<>(); | ||
| 518 | // Set<String> guidSet = CommonUtil.filterSetFiled(pageList.getRecords(), MfTdsConnectorIdentityManagement::getGuid); | ||
| 519 | // Map<String, BizApproveVO> approvalInfoMap = approvalFlowUtil.getApprovalCrossTenantInfoMap(guidSet); | ||
| 520 | // Map<String, MfTdsConnectorIdentity> connectorIdentityMap = tdsConnectorIdentityService.getCrossTenantTdsConnectorIdentitys(guidSet); | ||
| 521 | // for (MfTdsConnectorIdentityManagement item : pageList.getRecords()){ | ||
| 522 | // TdsConnectorIdentityManagementRSVO vo = convertToVO(item,false); | ||
| 523 | // String guid = vo.getGuid(); | ||
| 524 | // if(ObjectUtils.isNotEmpty(approvalInfoMap) && approvalInfoMap.containsKey(guid)) { | ||
| 525 | // vo.setApproveVO(approvalInfoMap.get(guid)); | ||
| 526 | // } | ||
| 527 | // if(ObjectUtils.isNotEmpty(connectorIdentityMap) && connectorIdentityMap.containsKey(guid)) { | ||
| 528 | // vo.setConnectorName(connectorIdentityMap.get(guid).getConnectorName()); | ||
| 529 | // vo.setLegalEntity(connectorIdentityMap.get(guid).getLegalEntity()); | ||
| 530 | // } | ||
| 531 | // results.add(vo); | ||
| 532 | // } | ||
| 533 | // rsPageList.setRecords(results); | ||
| 534 | // } | 538 | // } |
| 539 | // 需要特殊处理数据时使用 | ||
| 540 | if(CollectionUtils.isNotEmpty(pageList.getRecords())){ | ||
| 541 | List<TdsConnectorIdentityManagementRSVO> results = new ArrayList<>(); | ||
| 542 | Map<String, BizApproveVO> approvalInfoMap = approvalFlowUtil.getApprovalCrossTenantInfoMap(CommonUtil.filterSetFiled(pageList.getRecords(), MfTdsConnectorIdentityManagement::getGuid)); | ||
| 543 | Map<String, MfTdsConnectorIdentity> connectorIdentityMap = tdsConnectorIdentityService.getCrossTenantTdsConnectorIdentitys(CommonUtil.filterSetFiled(pageList.getRecords(), MfTdsConnectorIdentityManagement::getConnectorGuid)); | ||
| 544 | for (MfTdsConnectorIdentityManagement item : pageList.getRecords()){ | ||
| 545 | TdsConnectorIdentityManagementRSVO vo = convertToVO(item,false); | ||
| 546 | String guid = vo.getGuid(); | ||
| 547 | if(ObjectUtils.isNotEmpty(approvalInfoMap) && approvalInfoMap.containsKey(guid)) { | ||
| 548 | vo.setApproveVO(approvalInfoMap.get(guid)); | ||
| 549 | } | ||
| 550 | if(ObjectUtils.isNotEmpty(connectorIdentityMap) && connectorIdentityMap.containsKey(vo.getConnectorGuid())) { | ||
| 551 | vo.setConnectorName(connectorIdentityMap.get(vo.getConnectorGuid()).getConnectorName()); | ||
| 552 | vo.setLegalEntity(connectorIdentityMap.get(vo.getConnectorGuid()).getLegalEntity()); | ||
| 553 | vo.setConnectorName(connectorIdentityMap.get(vo.getConnectorGuid()).getConnectorName()); | ||
| 554 | } | ||
| 555 | results.add(vo); | ||
| 556 | } | ||
| 557 | rsPageList.setRecords(results); | ||
| 558 | } | ||
| 535 | } | 559 | } |
| 536 | 560 | ||
| 537 | //region 辅助操作 | 561 | //region 辅助操作 | ... | ... |
| 1 | package com.csbr.qingcloud.portal.service.impl; | 1 | package com.csbr.qingcloud.portal.service.impl; |
| 2 | 2 | ||
| 3 | import com.alibaba.fastjson.JSON; | ||
| 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | import com.csbr.cloud.common.enums.SystemError; | 6 | import com.csbr.cloud.common.enums.SystemError; |
| ... | @@ -19,11 +20,15 @@ import com.csbr.cloud.workflow.util.FlowAbstractImpl; | ... | @@ -19,11 +20,15 @@ import com.csbr.cloud.workflow.util.FlowAbstractImpl; |
| 19 | import com.csbr.qingcloud.portal.domain.vo.*; | 20 | import com.csbr.qingcloud.portal.domain.vo.*; |
| 20 | import com.csbr.qingcloud.portal.service.TdsConnectorAdditionalService; | 21 | import com.csbr.qingcloud.portal.service.TdsConnectorAdditionalService; |
| 21 | import com.csbr.qingcloud.portal.service.TdsConnectorVerifiableService; | 22 | import com.csbr.qingcloud.portal.service.TdsConnectorVerifiableService; |
| 23 | import com.csbr.qingcloud.portal.util.IdentificationCodeUtil; | ||
| 22 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 24 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
| 23 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; | 25 | import com.csbr.qingcloud.portal.mybatis.entity.MfTdsConnectorIdentity; |
| 24 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorIdentityService; | 26 | import com.csbr.qingcloud.portal.mybatis.service.MfTdsConnectorIdentityService; |
| 25 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityService; | 27 | import com.csbr.qingcloud.portal.service.TdsConnectorIdentityService; |
| 28 | import csbr.cloud.entity.domain.user.UserInfo; | ||
| 26 | import csbr.cloud.entity.enums.ApprovalStateEnum; | 29 | import csbr.cloud.entity.enums.ApprovalStateEnum; |
| 30 | import csbr.cloud.entity.utils.UserContextHolder; | ||
| 31 | import io.seata.spring.annotation.GlobalTransactional; | ||
| 27 | import jakarta.annotation.Resource; | 32 | import jakarta.annotation.Resource; |
| 28 | import lombok.extern.slf4j.Slf4j; | 33 | import lombok.extern.slf4j.Slf4j; |
| 29 | import org.apache.commons.collections.CollectionUtils; | 34 | import org.apache.commons.collections.CollectionUtils; |
| ... | @@ -142,17 +147,22 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -142,17 +147,22 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 142 | * @param flowBaseVO | 147 | * @param flowBaseVO |
| 143 | * @return boolean | 148 | * @return boolean |
| 144 | */ | 149 | */ |
| 145 | // @GlobalTransactional(rollbackFor = Exception.class) | 150 | @GlobalTransactional(rollbackFor = Exception.class) |
| 146 | @Transactional(rollbackFor = Exception.class) | 151 | // @Transactional(rollbackFor = Exception.class) |
| 147 | @Override | 152 | @Override |
| 148 | public void saveTdsConnectorIdentity(FlowRQBaseVO flowBaseVO) { | 153 | public void saveTdsConnectorIdentity(FlowRQBaseVO flowBaseVO) { |
| 149 | TdsConnectorIdentityRQVO rqVO = (TdsConnectorIdentityRQVO) flowBaseVO; | 154 | TdsConnectorIdentityRQVO rqVO = (TdsConnectorIdentityRQVO) flowBaseVO; |
| 150 | beforeSave(rqVO); | 155 | beforeSave(rqVO); |
| 151 | MfTdsConnectorIdentity entity = convertToEntity(rqVO); | 156 | MfTdsConnectorIdentity entity = convertToEntity(rqVO); |
| 152 | rqVO.setGuid(entity.getGuid()); | 157 | rqVO.setGuid(entity.getGuid()); |
| 158 | if(StringUtils.isBlank(rqVO.getSourceBizGuid()) | ||
| 159 | && StringUtils.isBlank(rqVO.getConnectorIdentity()) | ||
| 160 | && flowBaseVO.getImmediateApprove()) { | ||
| 161 | entity.setConnectorIdentity(IdentificationCodeUtil.genConnectorCode(entity.getLegalSocialCreditCode(), IdentificationCodeUtil.medIndustry)); | ||
| 162 | } | ||
| 153 | mfTdsConnectorIdentityService.csbrAddEntity(entity); | 163 | mfTdsConnectorIdentityService.csbrAddEntity(entity); |
| 154 | // 发起审批流程或保存草稿 | 164 | // 发起审批流程或保存草稿 |
| 155 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 165 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity,rqVO); |
| 156 | super.startWorkFlow(rqVO, approvalDTO, entity::setBizApproveState); | 166 | super.startWorkFlow(rqVO, approvalDTO, entity::setBizApproveState); |
| 157 | boolean flag = mfTdsConnectorIdentityService.save(entity); | 167 | boolean flag = mfTdsConnectorIdentityService.save(entity); |
| 158 | if (!flag) { | 168 | if (!flag) { |
| ... | @@ -166,11 +176,16 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -166,11 +176,16 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 166 | * @author xup | 176 | * @author xup |
| 167 | * @date 2024-12-30 13:43 | 177 | * @date 2024-12-30 13:43 |
| 168 | * @param entity | 178 | * @param entity |
| 179 | * @param rqVO | ||
| 169 | * @return com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO | 180 | * @return com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO |
| 170 | */ | 181 | */ |
| 171 | private AddApprovalDTO getAddApprovalDTO(MfTdsConnectorIdentity entity) { | 182 | private AddApprovalDTO getAddApprovalDTO(MfTdsConnectorIdentity entity, TdsConnectorIdentityRQVO rqVO) { |
| 172 | AddApprovalDTO approvalDTO = new AddApprovalDTO(FLOW_TYPE, entity.getGuid()); | 183 | AddApprovalDTO approvalDTO = new AddApprovalDTO(FLOW_TYPE, entity.getGuid()); |
| 184 | if(StringUtils.isBlank(rqVO.getFuncCode())) { | ||
| 173 | approvalDTO.setFuncCode(SysFuncCode); | 185 | approvalDTO.setFuncCode(SysFuncCode); |
| 186 | }else{ | ||
| 187 | approvalDTO.setFuncCode(rqVO.getFuncCode()); | ||
| 188 | } | ||
| 174 | // 流程消息中的变量替换参数 | 189 | // 流程消息中的变量替换参数 |
| 175 | String msParam = String.format("%s,%s",bizCommonRedisUtil.getTenantName(entity.getTenantGuid()),null); | 190 | String msParam = String.format("%s,%s",bizCommonRedisUtil.getTenantName(entity.getTenantGuid()),null); |
| 176 | approvalDTO.setFlowMessageBody(msParam); | 191 | approvalDTO.setFlowMessageBody(msParam); |
| ... | @@ -182,6 +197,10 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -182,6 +197,10 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 182 | approvalDTO.setParam3(null); | 197 | approvalDTO.setParam3(null); |
| 183 | approvalDTO.setParam4(null); | 198 | approvalDTO.setParam4(null); |
| 184 | 199 | ||
| 200 | // 增加跨服务审批字段 | ||
| 201 | rqVO.setGuid(entity.getGuid()); | ||
| 202 | approvalDTO.setBizData(JSON.toJSONString(rqVO)); | ||
| 203 | |||
| 185 | return approvalDTO; | 204 | return approvalDTO; |
| 186 | } | 205 | } |
| 187 | 206 | ||
| ... | @@ -192,7 +211,7 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -192,7 +211,7 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 192 | * @param flowBaseVO | 211 | * @param flowBaseVO |
| 193 | * @return boolean | 212 | * @return boolean |
| 194 | */ | 213 | */ |
| 195 | @Transactional(rollbackFor = Exception.class) | 214 | @GlobalTransactional(rollbackFor = Exception.class) |
| 196 | @Override | 215 | @Override |
| 197 | public void updateTdsConnectorIdentity(FlowRQBaseVO flowBaseVO) { | 216 | public void updateTdsConnectorIdentity(FlowRQBaseVO flowBaseVO) { |
| 198 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 | 217 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 |
| ... | @@ -201,9 +220,14 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -201,9 +220,14 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 201 | beforeUpdate(rqVO); | 220 | beforeUpdate(rqVO); |
| 202 | MfTdsConnectorIdentity oldEntity = mfTdsConnectorIdentityService.getById(rqVO.getGuid()); | 221 | MfTdsConnectorIdentity oldEntity = mfTdsConnectorIdentityService.getById(rqVO.getGuid()); |
| 203 | MfTdsConnectorIdentity entity = convertToEntity(rqVO); | 222 | MfTdsConnectorIdentity entity = convertToEntity(rqVO); |
| 223 | rqVO.setConnectorIdentity(oldEntity.getConnectorIdentity()); | ||
| 224 | if("N".equals(oldEntity.getIsChangeData()) && StringUtils.isBlank(oldEntity.getConnectorIdentity()) | ||
| 225 | && flowBaseVO.getImmediateApprove()) { | ||
| 226 | entity.setConnectorIdentity(IdentificationCodeUtil.genConnectorCode(entity.getLegalSocialCreditCode(), IdentificationCodeUtil.medIndustry)); | ||
| 227 | } | ||
| 204 | mfTdsConnectorIdentityService.csbrUpdateEntity(entity); | 228 | mfTdsConnectorIdentityService.csbrUpdateEntity(entity); |
| 205 | // 发起审批流程或保存草稿 | 229 | // 发起审批流程或保存草稿 |
| 206 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 230 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity, rqVO); |
| 207 | super.restartWorkFlow(rqVO,oldEntity.getBizApproveState(),approvalDTO,this::saveTdsConnectorIdentity,entity::setBizApproveState); | 231 | super.restartWorkFlow(rqVO,oldEntity.getBizApproveState(),approvalDTO,this::saveTdsConnectorIdentity,entity::setBizApproveState); |
| 208 | boolean flag = mfTdsConnectorIdentityService.updateById(entity); | 232 | boolean flag = mfTdsConnectorIdentityService.updateById(entity); |
| 209 | if (!flag) { | 233 | if (!flag) { |
| ... | @@ -271,14 +295,68 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -271,14 +295,68 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 271 | if (entity == null) { | 295 | if (entity == null) { |
| 272 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); | 296 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); |
| 273 | } | 297 | } |
| 298 | if(ApprovalStateEnum.REJECT.getValue().equals(bizApproveVO.getApprovalState()) | ||
| 299 | || ApprovalStateEnum.CANCEL.getValue().equals(bizApproveVO.getApprovalState())) { | ||
| 300 | if("Y".equals(entity.getIsChangeData())) { | ||
| 301 | MfTdsConnectorIdentity sourceEntity = mfTdsConnectorIdentityService.getById(entity.getSourceBizGuid()); | ||
| 302 | sourceEntity.setBizApproveState(ApprovalStateEnum.PASSED.getValue()); | ||
| 303 | mfTdsConnectorIdentityService.updateById(sourceEntity); | ||
| 304 | } | ||
| 305 | } | ||
| 306 | //主平台审批通过更新数据 | ||
| 307 | if("MAIN".equals(platformType)) { | ||
| 308 | if(ApprovalStateEnum.PASSED.getValue().equals(bizApproveVO.getApprovalState())){ | ||
| 309 | changSourceConnectorInentity(entity); | ||
| 310 | } | ||
| 311 | } | ||
| 274 | // 同步更新审批状态 | 312 | // 同步更新审批状态 |
| 275 | entity.setBizApproveState(bizApproveVO.getApprovalState()); | 313 | entity.setBizApproveState(bizApproveVO.getApprovalState()); |
| 276 | mfTdsConnectorIdentityService.updateById(entity); | 314 | mfTdsConnectorIdentityService.updateById(entity); |
| 277 | } | 315 | } |
| 278 | 316 | ||
| 317 | @Transactional | ||
| 318 | public void changSourceConnectorInentity(MfTdsConnectorIdentity entity) { | ||
| 319 | TdsConnectorIdentityRSVO tdsConnectorIdentityDetail = getTdsConnectorIdentityDetail(entity.getGuid()); | ||
| 320 | String sourceBizGuid = entity.getSourceBizGuid(); | ||
| 321 | TdsConnectorIdentityRSVO oldIdentityDetail = getTdsConnectorIdentityDetail(sourceBizGuid); | ||
| 322 | MfTdsConnectorIdentity mfTdsConnectorIdentity = csbrBeanUtil.convert(tdsConnectorIdentityDetail, MfTdsConnectorIdentity.class); | ||
| 323 | mfTdsConnectorIdentity.setGuid(oldIdentityDetail.getGuid()); | ||
| 324 | mfTdsConnectorIdentity.setBizApproveState(ApprovalStateEnum.PASSED.getValue()); | ||
| 325 | mfTdsConnectorIdentity.setCreateTime(null); | ||
| 326 | mfTdsConnectorIdentity.setIsChangeData("N"); | ||
| 327 | mfTdsConnectorIdentityService.updateById(mfTdsConnectorIdentity); | ||
| 328 | TdsConnectorAdditionalRSVO tdsConnectorAdditional = tdsConnectorIdentityDetail.getTdsConnectorAdditional(); | ||
| 329 | if(ObjectUtils.isEmpty(tdsConnectorAdditional)){ | ||
| 330 | tdsConnectorAdditionalService.removeByConnectorGuids(Arrays.asList(sourceBizGuid)); | ||
| 331 | }else { | ||
| 332 | TdsConnectorAdditionalRQVO connectorAdditionalRQVO = csbrBeanUtil.convert(tdsConnectorAdditional, TdsConnectorAdditionalRQVO.class); | ||
| 333 | connectorAdditionalRQVO.setConnectorGuid(sourceBizGuid); | ||
| 334 | if (ObjectUtils.isEmpty(oldIdentityDetail.getTdsConnectorAdditional())) { | ||
| 335 | tdsConnectorAdditionalService.saveTdsConnectorAdditional(connectorAdditionalRQVO); | ||
| 336 | }else{ | ||
| 337 | connectorAdditionalRQVO.setGuid(oldIdentityDetail.getTdsConnectorAdditional().getGuid()); | ||
| 338 | tdsConnectorAdditionalService.updateTdsConnectorAdditional(connectorAdditionalRQVO); | ||
| 339 | } | ||
| 340 | } | ||
| 341 | TdsConnectorVerifiableRSVO tdsConnectorVerifiable = tdsConnectorIdentityDetail.getTdsConnectorVerifiable(); | ||
| 342 | if(ObjectUtils.isEmpty(tdsConnectorVerifiable)){ | ||
| 343 | tdsConnectorVerifiableService.removeByConnectorGuids(Arrays.asList(sourceBizGuid)); | ||
| 344 | }else{ | ||
| 345 | TdsConnectorVerifiableRQVO tdsConnectorVerifiableRQVO = csbrBeanUtil.convert(tdsConnectorVerifiable, TdsConnectorVerifiableRQVO.class); | ||
| 346 | tdsConnectorVerifiableRQVO.setConnectorGuid(sourceBizGuid); | ||
| 347 | if (ObjectUtils.isEmpty(oldIdentityDetail.getTdsConnectorVerifiable())) { | ||
| 348 | tdsConnectorVerifiableService.saveTdsConnectorVerifiable(tdsConnectorVerifiableRQVO); | ||
| 349 | }else{ | ||
| 350 | tdsConnectorVerifiableRQVO.setGuid(oldIdentityDetail.getTdsConnectorVerifiable().getGuid()); | ||
| 351 | tdsConnectorVerifiableService.updateTdsConnectorVerifiable(tdsConnectorVerifiableRQVO); | ||
| 352 | } | ||
| 353 | } | ||
| 354 | } | ||
| 355 | |||
| 279 | @Override | 356 | @Override |
| 280 | public TdsConnectorIdentityRSVO getEffectiveConnector() { | 357 | public TdsConnectorIdentityRSVO getEffectiveConnector() { |
| 281 | LambdaQueryWrapper<MfTdsConnectorIdentity> queryWrapper = Wrappers.lambdaQuery(); | 358 | LambdaQueryWrapper<MfTdsConnectorIdentity> queryWrapper = Wrappers.lambdaQuery(); |
| 359 | queryWrapper.eq(MfTdsConnectorIdentity::getIsChangeData,"N"); | ||
| 282 | queryWrapper.eq(MfTdsConnectorIdentity::getBizApproveState,ApprovalStateEnum.PASSED.getValue()); | 360 | queryWrapper.eq(MfTdsConnectorIdentity::getBizApproveState,ApprovalStateEnum.PASSED.getValue()); |
| 283 | List<MfTdsConnectorIdentity> list = mfTdsConnectorIdentityService.list(queryWrapper); | 361 | List<MfTdsConnectorIdentity> list = mfTdsConnectorIdentityService.list(queryWrapper); |
| 284 | if(ObjectUtils.isNotEmpty(list)){ | 362 | if(ObjectUtils.isNotEmpty(list)){ |
| ... | @@ -330,7 +408,7 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -330,7 +408,7 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 330 | //region 2.2.业务数据验证 | 408 | //region 2.2.业务数据验证 |
| 331 | //验证接入连接器名称唯一性 | 409 | //验证接入连接器名称唯一性 |
| 332 | if("ZQ".equals(platformType)) { | 410 | if("ZQ".equals(platformType)) { |
| 333 | if(verifyUniqueness(rqVO)){ | 411 | if(verifyUniqueness(rqVO) && StringUtils.isBlank(rqVO.getSourceBizGuid())){ |
| 334 | throw new CsbrSystemException(SystemError.DATA_ALREADY_EXISTS,"该企业下已经存在连接器,无法新增。"); | 412 | throw new CsbrSystemException(SystemError.DATA_ALREADY_EXISTS,"该企业下已经存在连接器,无法新增。"); |
| 335 | } | 413 | } |
| 336 | } | 414 | } |
| ... | @@ -366,10 +444,112 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -366,10 +444,112 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 366 | public Boolean verifyUniqueness(TdsConnectorIdentityRQVO rqVO) { | 444 | public Boolean verifyUniqueness(TdsConnectorIdentityRQVO rqVO) { |
| 367 | //1、验证是否已经存在连接器 | 445 | //1、验证是否已经存在连接器 |
| 368 | LambdaQueryWrapper<MfTdsConnectorIdentity> queryWrapper = Wrappers.lambdaQuery(); | 446 | LambdaQueryWrapper<MfTdsConnectorIdentity> queryWrapper = Wrappers.lambdaQuery(); |
| 447 | queryWrapper.eq(MfTdsConnectorIdentity::getIsChangeData,"N"); | ||
| 369 | queryWrapper.notIn(MfTdsConnectorIdentity::getBizApproveState,ApprovalStateEnum.CANCEL.getValue(),ApprovalStateEnum.REJECT.getValue(),ApprovalStateEnum.DISABLE.getValue()); | 448 | queryWrapper.notIn(MfTdsConnectorIdentity::getBizApproveState,ApprovalStateEnum.CANCEL.getValue(),ApprovalStateEnum.REJECT.getValue(),ApprovalStateEnum.DISABLE.getValue()); |
| 370 | return mfTdsConnectorIdentityService.count(queryWrapper)>0; | 449 | return mfTdsConnectorIdentityService.count(queryWrapper)>0; |
| 371 | } | 450 | } |
| 372 | 451 | ||
| 452 | @Override | ||
| 453 | @GlobalTransactional | ||
| 454 | public void changeSaveTdsConnectorIdentity(FlowRQBaseVO flowBaseVO) { | ||
| 455 | TdsConnectorIdentityRQVO rqVO = (TdsConnectorIdentityRQVO) flowBaseVO; | ||
| 456 | String guid = rqVO.getGuid(); | ||
| 457 | MfTdsConnectorIdentity oldTdsConnectorIdentity = beforeChangeSaveTdsConnectorIdentity(rqVO); | ||
| 458 | //发起连接器入住申请 | ||
| 459 | rqVO.setIsChangeData("Y"); | ||
| 460 | rqVO.setFuncCode(SysFuncCode+"BG"); | ||
| 461 | saveTdsConnectorIdentity(rqVO); | ||
| 462 | afterChangeSaveTdsConnectorIdentity(guid,oldTdsConnectorIdentity,rqVO.getIsRestart()); | ||
| 463 | } | ||
| 464 | |||
| 465 | @Override | ||
| 466 | public TdsConnectorIdentityRSVO checkConnector() { | ||
| 467 | LambdaQueryWrapper<MfTdsConnectorIdentity> queryWrapper = Wrappers.lambdaQuery(); | ||
| 468 | queryWrapper.eq(MfTdsConnectorIdentity::getIsChangeData,"N"); | ||
| 469 | queryWrapper.notIn(MfTdsConnectorIdentity::getBizApproveState,ApprovalStateEnum.CANCEL.getValue(),ApprovalStateEnum.REJECT.getValue(),ApprovalStateEnum.DISABLE.getValue()); | ||
| 470 | queryWrapper.select(MfTdsConnectorIdentity::getGuid,MfTdsConnectorIdentity::getBizApproveState,MfTdsConnectorIdentity::getCrossPlatformApproveState, | ||
| 471 | MfTdsConnectorIdentity::getConnectorName); | ||
| 472 | List<MfTdsConnectorIdentity> list = mfTdsConnectorIdentityService.list(queryWrapper); | ||
| 473 | if(ObjectUtils.isEmpty(list)){ | ||
| 474 | return null; | ||
| 475 | } | ||
| 476 | return convertToVO(list.get(0)); | ||
| 477 | } | ||
| 478 | |||
| 479 | @Override | ||
| 480 | public void crossFlowCallBack(BizCallbackDTO dto) { | ||
| 481 | MfTdsConnectorIdentity entity = mfTdsConnectorIdentityService.getById(dto.getBizGuid()); | ||
| 482 | entity.setBizApproveState(dto.getApprovalState()); | ||
| 483 | entity.setCrossPlatformApproveState(dto.getApprovalState()); | ||
| 484 | mfTdsConnectorIdentityService.updateById(entity); | ||
| 485 | UserInfo userInfo = UserContextHolder.get(); | ||
| 486 | userInfo.setCurrentTenantGuid(entity.getTenantGuid()); | ||
| 487 | UserContextHolder.set(userInfo); | ||
| 488 | //如果是变更数据需要更新原来数据信息 | ||
| 489 | //审批通过 | ||
| 490 | if(ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())){ | ||
| 491 | if("Y".equals(entity.getIsChangeData())) { | ||
| 492 | changSourceConnectorInentity(entity); | ||
| 493 | } | ||
| 494 | } | ||
| 495 | //驳回和撤销是,修改原来数据状态 | ||
| 496 | if(ApprovalStateEnum.REJECT.getValue().equals(dto.getApprovalState()) | ||
| 497 | || ApprovalStateEnum.CANCEL.getValue().equals(dto.getApprovalState())) { | ||
| 498 | if("Y".equals(entity.getIsChangeData())) { | ||
| 499 | MfTdsConnectorIdentity sourceEntity = mfTdsConnectorIdentityService.getById(entity.getSourceBizGuid()); | ||
| 500 | sourceEntity.setBizApproveState(ApprovalStateEnum.PASSED.getValue()); | ||
| 501 | mfTdsConnectorIdentityService.updateById(sourceEntity); | ||
| 502 | } | ||
| 503 | } | ||
| 504 | } | ||
| 505 | |||
| 506 | @Override | ||
| 507 | public MfTdsConnectorIdentity getTdsConnectorIdentityById(String guid) { | ||
| 508 | return mfTdsConnectorIdentityService.getById(guid); | ||
| 509 | } | ||
| 510 | |||
| 511 | @Transactional | ||
| 512 | public void afterChangeSaveTdsConnectorIdentity(String guid, MfTdsConnectorIdentity oldTdsConnectorIdentity, | ||
| 513 | Boolean isRestart) { | ||
| 514 | //修改变更前数据状态为已废弃 | ||
| 515 | oldTdsConnectorIdentity.setBizApproveState("B"); | ||
| 516 | mfTdsConnectorIdentityService.updateById(oldTdsConnectorIdentity); | ||
| 517 | //如果是重新提交,需要作废数据 | ||
| 518 | if(isRestart){ | ||
| 519 | final MfTdsConnectorIdentity mfTdsConnectorIdentity = mfTdsConnectorIdentityService.getById(guid); | ||
| 520 | mfTdsConnectorIdentity.setBizApproveState("D"); | ||
| 521 | mfTdsConnectorIdentityService.updateById(mfTdsConnectorIdentity); | ||
| 522 | } | ||
| 523 | } | ||
| 524 | |||
| 525 | /** | ||
| 526 | * 变更申请校验 | ||
| 527 | * @param rqVO | ||
| 528 | */ | ||
| 529 | private MfTdsConnectorIdentity beforeChangeSaveTdsConnectorIdentity(TdsConnectorIdentityRQVO rqVO) { | ||
| 530 | //region 1.输入基础验证 | ||
| 531 | if(ObjectUtils.isEmpty(rqVO)){ | ||
| 532 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, String.format("%s参数为空。",FUNCTION_NAME)); | ||
| 533 | } | ||
| 534 | if(StringUtils.isBlank(rqVO.getSourceBizGuid())){ | ||
| 535 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, String.format("%s参数为空。","原始数据Guid")); | ||
| 536 | } | ||
| 537 | String message = validatorUtil.validateRetrunOne(rqVO); | ||
| 538 | if(StringUtils.isNotBlank(message)){ | ||
| 539 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, message); | ||
| 540 | } | ||
| 541 | MfTdsConnectorIdentity tdsConnectorIdentity = mfTdsConnectorIdentityService.getById(rqVO.getSourceBizGuid()); | ||
| 542 | if(ObjectUtils.isEmpty(tdsConnectorIdentity)){ | ||
| 543 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS,"变更数据不存在。"); | ||
| 544 | } | ||
| 545 | //置空Guid | ||
| 546 | rqVO.setGuid(null); | ||
| 547 | rqVO.setConnectorIdentity(tdsConnectorIdentity.getConnectorIdentity()); | ||
| 548 | rqVO.getTdsConnectorAdditional().setGuid(null); | ||
| 549 | rqVO.getTdsConnectorVerifiable().setGuid(null); | ||
| 550 | return tdsConnectorIdentity; | ||
| 551 | } | ||
| 552 | |||
| 373 | /** | 553 | /** |
| 374 | * 连接器身份信息新增后置处理 | 554 | * 连接器身份信息新增后置处理 |
| 375 | * @author xup | 555 | * @author xup |
| ... | @@ -382,11 +562,13 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -382,11 +562,13 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 382 | 562 | ||
| 383 | //region 1.1.输出过滤与补充处理 | 563 | //region 1.1.输出过滤与补充处理 |
| 384 | if(ObjectUtils.isNotEmpty(rqVO.getTdsConnectorAdditional())){ | 564 | if(ObjectUtils.isNotEmpty(rqVO.getTdsConnectorAdditional())){ |
| 565 | rqVO.getTdsConnectorAdditional().setGuid(null); | ||
| 385 | rqVO.getTdsConnectorAdditional().setConnectorGuid(rqVO.getGuid()); | 566 | rqVO.getTdsConnectorAdditional().setConnectorGuid(rqVO.getGuid()); |
| 386 | rqVO.getTdsConnectorAdditional().setBizApproveState(rqVO.getBizApproveState()); | 567 | rqVO.getTdsConnectorAdditional().setBizApproveState(rqVO.getBizApproveState()); |
| 387 | tdsConnectorAdditionalService.saveTdsConnectorAdditional(rqVO.getTdsConnectorAdditional()); | 568 | tdsConnectorAdditionalService.saveTdsConnectorAdditional(rqVO.getTdsConnectorAdditional()); |
| 388 | } | 569 | } |
| 389 | if(ObjectUtils.isNotEmpty(rqVO.getTdsConnectorVerifiable())){ | 570 | if(ObjectUtils.isNotEmpty(rqVO.getTdsConnectorVerifiable())){ |
| 571 | rqVO.getTdsConnectorVerifiable().setGuid(null); | ||
| 390 | rqVO.getTdsConnectorVerifiable().setConnectorGuid(rqVO.getGuid()); | 572 | rqVO.getTdsConnectorVerifiable().setConnectorGuid(rqVO.getGuid()); |
| 391 | rqVO.getTdsConnectorAdditional().setConnectorGuid(rqVO.getBizApproveState()); | 573 | rqVO.getTdsConnectorAdditional().setConnectorGuid(rqVO.getBizApproveState()); |
| 392 | tdsConnectorVerifiableService.saveTdsConnectorVerifiable(rqVO.getTdsConnectorVerifiable()); | 574 | tdsConnectorVerifiableService.saveTdsConnectorVerifiable(rqVO.getTdsConnectorVerifiable()); |
| ... | @@ -427,9 +609,11 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements | ... | @@ -427,9 +609,11 @@ public class TdsConnectorIdentityServiceImpl extends FlowAbstractImpl implements |
| 427 | //endregion 2.1.业务合规性验证 | 609 | //endregion 2.1.业务合规性验证 |
| 428 | 610 | ||
| 429 | //region 2.2.业务数据验证 | 611 | //region 2.2.业务数据验证 |
| 430 | if (!mfTdsConnectorIdentityService.isExistsData(Collections.singletonList(rqVO.getGuid()), MfTdsConnectorIdentity.class)) { | 612 | MfTdsConnectorIdentity mfTdsConnectorIdentity = mfTdsConnectorIdentityService.getById(rqVO.getGuid()); |
| 613 | if (ObjectUtils.isEmpty(mfTdsConnectorIdentity)) { | ||
| 431 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); | 614 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); |
| 432 | } | 615 | } |
| 616 | rqVO.setBizApproveState(mfTdsConnectorIdentity.getBizApproveState()); | ||
| 433 | //endregion 2.2.业务数据验证 | 617 | //endregion 2.2.业务数据验证 |
| 434 | 618 | ||
| 435 | //endregion 2.数据验证特殊处理 | 619 | //endregion 2.数据验证特殊处理 | ... | ... |
| ... | @@ -13,6 +13,7 @@ public class IdentificationCodeUtil { | ... | @@ -13,6 +13,7 @@ public class IdentificationCodeUtil { |
| 13 | 13 | ||
| 14 | private static final String CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | 14 | private static final String CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; |
| 15 | private static SecureRandom random = new SecureRandom(); | 15 | private static SecureRandom random = new SecureRandom(); |
| 16 | public static final String medIndustry = "0084"; | ||
| 16 | 17 | ||
| 17 | 18 | ||
| 18 | /** | 19 | /** | ... | ... |
| ... | @@ -21,9 +21,7 @@ public class ZQConfig { | ... | @@ -21,9 +21,7 @@ public class ZQConfig { |
| 21 | 21 | ||
| 22 | private String zqName = ""; | 22 | private String zqName = ""; |
| 23 | 23 | ||
| 24 | private String zqDelUrl = ""; | 24 | private String receiveUrl = ""; |
| 25 | |||
| 26 | private String groundingPickUrl = ""; | ||
| 27 | 25 | ||
| 28 | private Boolean isMain = false; | 26 | private Boolean isMain = false; |
| 29 | 27 | ... | ... |
-
Please register or sign in to post a comment