Merge remote-tracking branch 'origin/develop' into develop
Showing
35 changed files
with
1338 additions
and
297 deletions
| ... | @@ -89,6 +89,14 @@ public class DemandController { | ... | @@ -89,6 +89,14 @@ public class DemandController { |
| 89 | return CommonRes.success(true); | 89 | return CommonRes.success(true); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | @PostMapping("/cross-flow-call-back") | ||
| 93 | @SystemLog(value = "数据需求-流程结束后进行业务回调(跨服务审批)") | ||
| 94 | @Operation(summary = "数据需求-流程结束后进行业务回调(跨服务审批)", hidden = true) | ||
| 95 | public CommonRes<Boolean> crossFlowCallBack(@RequestBody @Valid BizCallbackDTO dto) { | ||
| 96 | demandService.crossFlowCallBack(dto); | ||
| 97 | return CommonRes.success(true); | ||
| 98 | } | ||
| 99 | |||
| 92 | @PostMapping("/last-approve") | 100 | @PostMapping("/last-approve") |
| 93 | @SystemLog(value = "数据需求审批") | 101 | @SystemLog(value = "数据需求审批") |
| 94 | @Operation(summary = "数据需求审批-最后一个节点时调用") | 102 | @Operation(summary = "数据需求审批-最后一个节点时调用") |
| ... | @@ -96,6 +104,13 @@ public class DemandController { | ... | @@ -96,6 +104,13 @@ public class DemandController { |
| 96 | Boolean vo = demandService.lastApprove(dto); | 104 | Boolean vo = demandService.lastApprove(dto); |
| 97 | return CommonRes.success(vo); | 105 | return CommonRes.success(vo); |
| 98 | } | 106 | } |
| 107 | |||
| 108 | @PostMapping("/process-order-list") | ||
| 109 | @Operation(summary = "查询加工单列表") | ||
| 110 | public CommonRes<List<ProcessOrderProcessDtlRSVO>> listByProcessOrderNo() { | ||
| 111 | List<ProcessOrderProcessDtlRSVO> pageVO = demandService.listByProcessOrderNo(); | ||
| 112 | return CommonRes.success(pageVO); | ||
| 113 | } | ||
| 99 | 114 | ||
| 100 | //endregion | 115 | //endregion |
| 101 | 116 | ... | ... |
| ... | @@ -3,6 +3,7 @@ package com.csbr.qingcloud.portal.controller; | ... | @@ -3,6 +3,7 @@ package com.csbr.qingcloud.portal.controller; |
| 3 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 4 | import com.alibaba.fastjson.JSONObject; | 4 | import com.alibaba.fastjson.JSONObject; |
| 5 | import com.csbr.cloud.common.response.CommonRes; | 5 | import com.csbr.cloud.common.response.CommonRes; |
| 6 | import com.csbr.cloud.workflow.domain.dto.appove.FlowQueryDTO; | ||
| 6 | import com.csbr.cloud.workflow.domain.dto.appove.FlowUpdateStateDTO; | 7 | import com.csbr.cloud.workflow.domain.dto.appove.FlowUpdateStateDTO; |
| 7 | import com.csbr.qingcloud.portal.domain.vo.*; | 8 | import com.csbr.qingcloud.portal.domain.vo.*; |
| 8 | import com.csbr.qingcloud.portal.service.EnterpriseChangeApproveService; | 9 | import com.csbr.qingcloud.portal.service.EnterpriseChangeApproveService; |
| ... | @@ -69,6 +70,14 @@ public class EnterpriseController { | ... | @@ -69,6 +70,14 @@ public class EnterpriseController { |
| 69 | PageListVO<EnterpriseRSVO> pageVO = enterpriseService.pageList(queryVO); | 70 | PageListVO<EnterpriseRSVO> pageVO = enterpriseService.pageList(queryVO); |
| 70 | return CommonRes.success(pageVO); | 71 | return CommonRes.success(pageVO); |
| 71 | } | 72 | } |
| 73 | |||
| 74 | @PostMapping("/flow/page-list") | ||
| 75 | @SystemLog(value = "企业信息-分页(调用流程)") | ||
| 76 | @Operation(summary = "企业信息-分页(调用流程)") | ||
| 77 | public CommonRes<PageListVO<EnterpriseApproveRSVO>> flowPageList(@RequestBody @Valid FlowQueryDTO dto) { | ||
| 78 | PageListVO<EnterpriseApproveRSVO> pageVO = enterpriseService.flowPageList(dto); | ||
| 79 | return CommonRes.success(pageVO); | ||
| 80 | } | ||
| 72 | 81 | ||
| 73 | @GetMapping("/detail") | 82 | @GetMapping("/detail") |
| 74 | @SystemLog(value = "企业信息-详情") | 83 | @SystemLog(value = "企业信息-详情") |
| ... | @@ -79,6 +88,15 @@ public class EnterpriseController { | ... | @@ -79,6 +88,15 @@ public class EnterpriseController { |
| 79 | return CommonRes.success(vo); | 88 | return CommonRes.success(vo); |
| 80 | } | 89 | } |
| 81 | 90 | ||
| 91 | @GetMapping("/detail-by-logonUser") | ||
| 92 | @SystemLog(value = "企业信息-根据登陆账号查询详情") | ||
| 93 | @Operation(summary = "企业信息-根据登陆账号查询详情", | ||
| 94 | parameters = {@Parameter(name = "logonUser", description = "登陆账号", required = true)} ) | ||
| 95 | public CommonRes<EnterpriseRSVO> getEnterpriseDetailByLogonUser(@RequestParam String logonUser) { | ||
| 96 | EnterpriseRSVO vo = enterpriseService.getEnterpriseDetailByLogonUser(logonUser); | ||
| 97 | return CommonRes.success(vo); | ||
| 98 | } | ||
| 99 | |||
| 82 | @GetMapping("/detail-by-name") | 100 | @GetMapping("/detail-by-name") |
| 83 | @SystemLog(value = "按名称查企业信息详情") | 101 | @SystemLog(value = "按名称查企业信息详情") |
| 84 | @Operation(summary = "按名称查企业信息详情", | 102 | @Operation(summary = "按名称查企业信息详情", |
| ... | @@ -96,12 +114,12 @@ public class EnterpriseController { | ... | @@ -96,12 +114,12 @@ public class EnterpriseController { |
| 96 | return CommonRes.success(true); | 114 | return CommonRes.success(true); |
| 97 | } | 115 | } |
| 98 | 116 | ||
| 99 | @PostMapping("/last-approve") | 117 | @PostMapping("/cross-flow-call-back") |
| 100 | @SystemLog(value = "企业认证审批") | 118 | @SystemLog(value = "企业信息-流程结束后进行业务回调(跨服务审批)") |
| 101 | @Operation(summary = "企业认证审批-最后一个节点时调用") | 119 | @Operation(summary = "企业信息-流程结束后进行业务回调(跨服务审批)", hidden = true) |
| 102 | public CommonRes<Boolean> lastApprove(@RequestBody FlowUpdateStateDTO dto) { | 120 | public CommonRes<Boolean> crossFlowCallBack(@RequestBody @Valid BizCallbackDTO dto) { |
| 103 | Boolean vo = enterpriseService.lastApprove(dto); | 121 | enterpriseService.crossFlowCallBack(dto); |
| 104 | return CommonRes.success(vo); | 122 | return CommonRes.success(true); |
| 105 | } | 123 | } |
| 106 | 124 | ||
| 107 | @PostMapping("/move-old-data") | 125 | @PostMapping("/move-old-data") |
| ... | @@ -135,6 +153,14 @@ public class EnterpriseController { | ... | @@ -135,6 +153,14 @@ public class EnterpriseController { |
| 135 | return CommonRes.success(true); | 153 | return CommonRes.success(true); |
| 136 | } | 154 | } |
| 137 | 155 | ||
| 156 | @PostMapping("/change/cross-flow-call-back") | ||
| 157 | @SystemLog(value = "变更审批-最终更新(跨平台)") | ||
| 158 | @Operation( summary = "变更审批-最终更新(跨平台)" ) | ||
| 159 | public CommonRes<Boolean> changeCrossFlowCallBack(@RequestBody BizCallbackDTO dto) { | ||
| 160 | enterpriseChangeApproveService.crossFlowCallBack(dto); | ||
| 161 | return CommonRes.success(true); | ||
| 162 | } | ||
| 163 | |||
| 138 | @PostMapping("/change/save") | 164 | @PostMapping("/change/save") |
| 139 | @SystemLog(value = "变更申请-保存数据") | 165 | @SystemLog(value = "变更申请-保存数据") |
| 140 | @Operation(summary = "变更申请-保存数据") | 166 | @Operation(summary = "变更申请-保存数据") |
| ... | @@ -151,6 +177,22 @@ public class EnterpriseController { | ... | @@ -151,6 +177,22 @@ public class EnterpriseController { |
| 151 | return CommonRes.success(enterpriseChangeApproveService.changeDetail(guid)); | 177 | return CommonRes.success(enterpriseChangeApproveService.changeDetail(guid)); |
| 152 | } | 178 | } |
| 153 | 179 | ||
| 180 | @DeleteMapping("/change/delete") | ||
| 181 | @SystemLog(value = "变更申请-批量删除") | ||
| 182 | @Operation(summary = "变更申请-批量删除") | ||
| 183 | public CommonRes<Boolean> changeRemoveByGuids(@RequestBody List<String> guids) { | ||
| 184 | enterpriseChangeApproveService.removeByGuids(guids); | ||
| 185 | return CommonRes.success(true); | ||
| 186 | } | ||
| 187 | |||
| 188 | @DeleteMapping("/change/cross-delete") | ||
| 189 | @SystemLog(value = "变更申请-批量删除(跨平台)") | ||
| 190 | @Operation(summary = "变更申请-批量删除(跨平台)", hidden = true) | ||
| 191 | public CommonRes<Boolean> crossRemoveByGuids(@RequestBody List<String> zqBizGuids) { | ||
| 192 | enterpriseChangeApproveService.crossRemoveByBizGuid(zqBizGuids); | ||
| 193 | return CommonRes.success(true); | ||
| 194 | } | ||
| 195 | |||
| 154 | //endregion | 196 | //endregion |
| 155 | 197 | ||
| 156 | } | 198 | } | ... | ... |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | |||
| 5 | /** | ||
| 6 | * @program: ms-user-scm-service | ||
| 7 | * @description: 行政区 | ||
| 8 | * @author: yio | ||
| 9 | * @create: 2021-01-14 15:39 | ||
| 10 | **/ | ||
| 11 | @Data | ||
| 12 | public class BoroughPOJO { | ||
| 13 | private String code; | ||
| 14 | private String name; | ||
| 15 | private String parentId; | ||
| 16 | private String isPCapital; | ||
| 17 | private String isDeleted; | ||
| 18 | /** 城市等级 (0 一线城市,1 新一线城市,2 二线城市,3 三线城市,4 四线城市,5 五线城市,6 六线城市)*/ | ||
| 19 | private String areaLevel; | ||
| 20 | } |
| ... | @@ -55,4 +55,7 @@ public class ChangeApproveVO { | ... | @@ -55,4 +55,7 @@ public class ChangeApproveVO { |
| 55 | @Schema(description = "原业务数据明细") | 55 | @Schema(description = "原业务数据明细") |
| 56 | private String oldBizDataDetailJson; | 56 | private String oldBizDataDetailJson; |
| 57 | 57 | ||
| 58 | private String zqName; | ||
| 59 | private String zqBizGuid; | ||
| 60 | |||
| 58 | } | 61 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -3,6 +3,7 @@ package com.csbr.qingcloud.portal.domain.vo; | ... | @@ -3,6 +3,7 @@ package com.csbr.qingcloud.portal.domain.vo; |
| 3 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; | 3 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; |
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import com.fasterxml.jackson.annotation.JsonFormat; | 5 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 6 | import jdk.jfr.Name; | ||
| 6 | import lombok.Data; | 7 | import lombok.Data; |
| 7 | import java.math.BigDecimal; | 8 | import java.math.BigDecimal; |
| 8 | import java.util.Date; | 9 | import java.util.Date; |
| ... | @@ -28,6 +29,9 @@ public class DemandRQVO extends FlowRQBaseVO { | ... | @@ -28,6 +29,9 @@ public class DemandRQVO extends FlowRQBaseVO { |
| 28 | */ | 29 | */ |
| 29 | @Schema(description = "需求类型") | 30 | @Schema(description = "需求类型") |
| 30 | private String requirementType; | 31 | private String requirementType; |
| 32 | |||
| 33 | @Schema(title = "专区名称") | ||
| 34 | private String zqName; | ||
| 31 | 35 | ||
| 32 | /** | 36 | /** |
| 33 | * 需求分类【1新增 2调整】 | 37 | * 需求分类【1新增 2调整】 |
| ... | @@ -205,6 +209,18 @@ public class DemandRQVO extends FlowRQBaseVO { | ... | @@ -205,6 +209,18 @@ public class DemandRQVO extends FlowRQBaseVO { |
| 205 | /******** 库表存储属性 需处理 *****/ | 209 | /******** 库表存储属性 需处理 *****/ |
| 206 | 210 | ||
| 207 | /******** 自定义扩展 *****/ | 211 | /******** 自定义扩展 *****/ |
| 212 | |||
| 213 | @Schema(description = "合同附件") | ||
| 214 | private String contractAttachJson; | ||
| 215 | |||
| 216 | @Schema(description = "加工单位类型") | ||
| 217 | private String processCompanyType; | ||
| 218 | |||
| 219 | @Schema(description = "加工单位唯一标识") | ||
| 220 | private String processCompanyGuid; | ||
| 221 | |||
| 222 | @Schema(description = "加工单位名称") | ||
| 223 | private String processCompanyName; | ||
| 208 | 224 | ||
| 209 | /******** 子对象 *****/ | 225 | /******** 子对象 *****/ |
| 210 | 226 | ... | ... |
| ... | @@ -168,7 +168,7 @@ public class DemandRSVO { | ... | @@ -168,7 +168,7 @@ public class DemandRSVO { |
| 168 | * 加工单生成时间 | 168 | * 加工单生成时间 |
| 169 | */ | 169 | */ |
| 170 | @Schema(description = "加工单生成时间") | 170 | @Schema(description = "加工单生成时间") |
| 171 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | 171 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| 172 | private Date processingGenerateTime; | 172 | private Date processingGenerateTime; |
| 173 | 173 | ||
| 174 | /** | 174 | /** |
| ... | @@ -218,7 +218,7 @@ public class DemandRSVO { | ... | @@ -218,7 +218,7 @@ public class DemandRSVO { |
| 218 | private String processCompanyGuid; | 218 | private String processCompanyGuid; |
| 219 | 219 | ||
| 220 | @Schema(description = "加工单位名称") | 220 | @Schema(description = "加工单位名称") |
| 221 | private String productAcceptName; | 221 | private String processCompanyName; |
| 222 | 222 | ||
| 223 | @Schema(description = "发起人") | 223 | @Schema(description = "发起人") |
| 224 | private String createUserName; | 224 | private String createUserName; |
| ... | @@ -231,6 +231,18 @@ public class DemandRSVO { | ... | @@ -231,6 +231,18 @@ public class DemandRSVO { |
| 231 | 231 | ||
| 232 | @Schema(description = "加工单编号") | 232 | @Schema(description = "加工单编号") |
| 233 | private String processOrderNo; | 233 | private String processOrderNo; |
| 234 | |||
| 235 | @Schema(title = "专区名称") | ||
| 236 | private String zqName; | ||
| 237 | |||
| 238 | @Schema(description ="业务名称") | ||
| 239 | private String bizName; | ||
| 240 | |||
| 241 | /** | ||
| 242 | * 跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销) | ||
| 243 | */ | ||
| 244 | @Schema(title = "跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | ||
| 245 | private String crossPlatformApproveState; | ||
| 234 | 246 | ||
| 235 | /******** 库表存储属性 需处理 *****/ | 247 | /******** 库表存储属性 需处理 *****/ |
| 236 | 248 | ... | ... |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | 1 | package com.csbr.qingcloud.portal.domain.vo; |
| 2 | 2 | ||
| 3 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 5 | import lombok.Data; |
| 6 | |||
| 7 | import java.util.Date; | ||
| 5 | import java.util.List; | 8 | import java.util.List; |
| 6 | 9 | ||
| 7 | /** | 10 | /** |
| ... | @@ -32,5 +35,11 @@ public class DemandUpdateStateVO { | ... | @@ -32,5 +35,11 @@ public class DemandUpdateStateVO { |
| 32 | @Schema(description = "产品验收状态【N未开始 A进行中 Y已完成】") | 35 | @Schema(description = "产品验收状态【N未开始 A进行中 Y已完成】") |
| 33 | private String productAcceptState; | 36 | private String productAcceptState; |
| 34 | 37 | ||
| 38 | @Schema(description ="产品验收验收完成时间") | ||
| 39 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | ||
| 40 | private Date acceptFinishTime; | ||
| 41 | |||
| 42 | @Schema(description ="业务名称") | ||
| 43 | private String bizName; | ||
| 35 | 44 | ||
| 36 | } | 45 | } | ... | ... |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | import com.csbr.cloud.workflow.domain.vo.appove.ApproveVO; | ||
| 4 | import com.csbr.cloud.workflow.domain.vo.appove.BizApproveVO; | ||
| 5 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 6 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 7 | import lombok.Data; | ||
| 8 | |||
| 9 | import java.math.BigDecimal; | ||
| 10 | import java.util.Date; | ||
| 11 | import java.util.List; | ||
| 12 | |||
| 13 | /** | ||
| 14 | * @program: D:/git/ms-data-circulation-portal-service | ||
| 15 | * @description: 企业信息返回参数 | ||
| 16 | * @author: xcq | ||
| 17 | * @create: 2024-12-26 16:18 | ||
| 18 | **/ | ||
| 19 | @Data | ||
| 20 | @Schema(title = "企业信息返回参数") | ||
| 21 | public class EnterpriseApproveRSVO extends ApproveVO { | ||
| 22 | |||
| 23 | @Schema(description = "跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | ||
| 24 | private String crossPlatformApproveState; | ||
| 25 | |||
| 26 | @Schema(description = "专区名称") | ||
| 27 | private String zqName; | ||
| 28 | |||
| 29 | /******** 子对象 *****/ | ||
| 30 | |||
| 31 | } |
| ... | @@ -16,12 +16,17 @@ import java.util.Date; | ... | @@ -16,12 +16,17 @@ import java.util.Date; |
| 16 | @Data | 16 | @Data |
| 17 | @Schema(title = "企业信息新增、修改参数") | 17 | @Schema(title = "企业信息新增、修改参数") |
| 18 | public class EnterpriseRQVO extends FlowRQBaseVO { | 18 | public class EnterpriseRQVO extends FlowRQBaseVO { |
| 19 | 19 | ||
| 20 | @Schema(description = "会员GUID") | ||
| 21 | private String tenantGuid; | ||
| 20 | /** | 22 | /** |
| 21 | * 公司名称 | 23 | * 公司名称 |
| 22 | */ | 24 | */ |
| 23 | @Schema(description = "公司名称") | 25 | @Schema(description = "公司名称") |
| 24 | private String tenantName; | 26 | private String tenantName; |
| 27 | |||
| 28 | @Schema(title = "专区名称") | ||
| 29 | private String zqName; | ||
| 25 | 30 | ||
| 26 | /** | 31 | /** |
| 27 | * 统一社会信用代码 | 32 | * 统一社会信用代码 | ... | ... |
| ... | @@ -23,7 +23,10 @@ public class EnterpriseRSVO { | ... | @@ -23,7 +23,10 @@ public class EnterpriseRSVO { |
| 23 | */ | 23 | */ |
| 24 | @Schema(description = "系统唯一标识") | 24 | @Schema(description = "系统唯一标识") |
| 25 | private String guid; | 25 | private String guid; |
| 26 | 26 | ||
| 27 | @Schema(description = "会员GUID") | ||
| 28 | private String tenantGuid; | ||
| 29 | |||
| 27 | /** | 30 | /** |
| 28 | * 公司名称 | 31 | * 公司名称 |
| 29 | */ | 32 | */ |
| ... | @@ -185,6 +188,15 @@ public class EnterpriseRSVO { | ... | @@ -185,6 +188,15 @@ public class EnterpriseRSVO { |
| 185 | 188 | ||
| 186 | @Schema(description = "提交时间") | 189 | @Schema(description = "提交时间") |
| 187 | private Date createTime; | 190 | private Date createTime; |
| 191 | |||
| 192 | @Schema(title = "专区名称") | ||
| 193 | private String zqName; | ||
| 194 | |||
| 195 | /** | ||
| 196 | * 跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销) | ||
| 197 | */ | ||
| 198 | @Schema(title = "跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | ||
| 199 | private String crossPlatformApproveState; | ||
| 188 | 200 | ||
| 189 | /******** 库表存储属性 需处理 *****/ | 201 | /******** 库表存储属性 需处理 *****/ |
| 190 | 202 | ... | ... |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | import lombok.Data; | ||
| 6 | |||
| 7 | import java.util.Date; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * @program: | ||
| 11 | * @description: 加工单加工明细返回参数 | ||
| 12 | * @author: xup | ||
| 13 | * @create: 2025-02-10 17:57 | ||
| 14 | **/ | ||
| 15 | @Data | ||
| 16 | @Schema(title = "加工单加工明细返回参数") | ||
| 17 | public class ProcessOrderProcessDtlRSVO { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * 系统唯一标识 | ||
| 21 | */ | ||
| 22 | @Schema(description = "系统唯一标识") | ||
| 23 | private String guid; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * 会员Guid | ||
| 27 | */ | ||
| 28 | @Schema(description = "会员Guid") | ||
| 29 | private String tenantGuid; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * 加工单Guid | ||
| 33 | */ | ||
| 34 | @Schema(description = "加工单Guid") | ||
| 35 | private String processOrderGuid; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * 加工单号 | ||
| 39 | */ | ||
| 40 | @Schema(description = "加工单号") | ||
| 41 | private String processOrderNo; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * 加工单名称 | ||
| 45 | */ | ||
| 46 | @Schema(description = "加工单名称") | ||
| 47 | private String processOrderName; | ||
| 48 | |||
| 49 | /** | ||
| 50 | * 加工方式(1 数据服务;2 需求申请) | ||
| 51 | */ | ||
| 52 | @Schema(description = "加工方式(1 数据服务;2 需求申请)") | ||
| 53 | private Integer processType; | ||
| 54 | |||
| 55 | /** | ||
| 56 | * 业务Guid | ||
| 57 | */ | ||
| 58 | @Schema(description = "业务Guid") | ||
| 59 | private String bizGuid; | ||
| 60 | |||
| 61 | /** | ||
| 62 | * 业务名称 | ||
| 63 | */ | ||
| 64 | @Schema(description = "业务名称") | ||
| 65 | private String bizName; | ||
| 66 | |||
| 67 | /** | ||
| 68 | * 加工状态(N 未开始;A 进行中;Y 已完成) | ||
| 69 | */ | ||
| 70 | @Schema(description = "加工状态(N 未开始;A 进行中;Y 已完成)") | ||
| 71 | private String processState; | ||
| 72 | |||
| 73 | /** | ||
| 74 | * 加工时间 | ||
| 75 | */ | ||
| 76 | @Schema(description = "加工时间") | ||
| 77 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | ||
| 78 | private Date processTime; | ||
| 79 | |||
| 80 | /** | ||
| 81 | * 交付时间 | ||
| 82 | */ | ||
| 83 | @Schema(description = "交付时间") | ||
| 84 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | ||
| 85 | private Date deliverTime; | ||
| 86 | |||
| 87 | /******** 库表存储属性 需处理 *****/ | ||
| 88 | |||
| 89 | /******** 自定义扩展 *****/ | ||
| 90 | |||
| 91 | /******** 子对象 *****/ | ||
| 92 | |||
| 93 | } |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | ||
| 2 | |||
| 3 | import csbr.cloud.entity.domain.base.vo.CsbrBaseVO; | ||
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | import lombok.Data; | ||
| 6 | import lombok.EqualsAndHashCode; | ||
| 7 | import lombok.experimental.Accessors; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * 企业证照表 视图对象类 | ||
| 11 | * | ||
| 12 | * @author xiaocq | ||
| 13 | * @date 2023-12-19 | ||
| 14 | */ | ||
| 15 | @Data | ||
| 16 | @Accessors(chain = true) | ||
| 17 | @EqualsAndHashCode(callSuper = true) | ||
| 18 | @Schema(name = "企业证照表") | ||
| 19 | public class TenantLicRQVO extends CsbrBaseVO { | ||
| 20 | /** | ||
| 21 | * 企业唯一标识 | ||
| 22 | */ | ||
| 23 | @Schema(description = "企业唯一标识") | ||
| 24 | private String tenantGuid; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * 证照类型 | ||
| 28 | */ | ||
| 29 | @Schema(description = "证照类型") | ||
| 30 | private String licenseType; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * 图片内容 | ||
| 34 | */ | ||
| 35 | @Schema(description = "图片内容") | ||
| 36 | private String pictContentJson; | ||
| 37 | |||
| 38 | |||
| 39 | /********非库表存储属性*****/ | ||
| 40 | |||
| 41 | |||
| 42 | |||
| 43 | /********字典类*****/ | ||
| 44 | |||
| 45 | /********实体类、用户单选、组织机构单选*****/ | ||
| 46 | |||
| 47 | /********范围查询*****/ | ||
| 48 | |||
| 49 | /********自定义扩展*****/ | ||
| 50 | |||
| 51 | /********子对象*****/ | ||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | |||
| 56 | } |
| ... | @@ -154,6 +154,9 @@ public class TenantRQVO extends CsbrBaseVO { | ... | @@ -154,6 +154,9 @@ public class TenantRQVO extends CsbrBaseVO { |
| 154 | @Schema(description = "token后台赋值") | 154 | @Schema(description = "token后台赋值") |
| 155 | private String token; | 155 | private String token; |
| 156 | 156 | ||
| 157 | @Schema(description = "业务唯一标识") | ||
| 158 | private String bizGuid; | ||
| 159 | |||
| 157 | /********字典类*****/ | 160 | /********字典类*****/ |
| 158 | 161 | ||
| 159 | /********实体类、用户单选、组织机构单选*****/ | 162 | /********实体类、用户单选、组织机构单选*****/ |
| ... | @@ -164,6 +167,9 @@ public class TenantRQVO extends CsbrBaseVO { | ... | @@ -164,6 +167,9 @@ public class TenantRQVO extends CsbrBaseVO { |
| 164 | 167 | ||
| 165 | /********子对象*****/ | 168 | /********子对象*****/ |
| 166 | 169 | ||
| 170 | @Schema(description = "企业证照列表") | ||
| 171 | private List<TenantLicRQVO> tenantLicList; | ||
| 172 | |||
| 167 | @Schema(hidden = true,description = "分库标识") | 173 | @Schema(hidden = true,description = "分库标识") |
| 168 | private String shardingFlag; | 174 | private String shardingFlag; |
| 169 | } | 175 | } | ... | ... |
| ... | @@ -4,6 +4,7 @@ import com.csbr.cloud.common.config.FastCallFeignConfiguration; | ... | @@ -4,6 +4,7 @@ import com.csbr.cloud.common.config.FastCallFeignConfiguration; |
| 4 | import com.csbr.cloud.common.entity.DictModel; | 4 | import com.csbr.cloud.common.entity.DictModel; |
| 5 | import com.csbr.cloud.common.entity.DictionaryVO; | 5 | import com.csbr.cloud.common.entity.DictionaryVO; |
| 6 | import com.csbr.cloud.common.response.CommonRes; | 6 | import com.csbr.cloud.common.response.CommonRes; |
| 7 | import com.csbr.qingcloud.portal.domain.vo.BoroughPOJO; | ||
| 7 | import com.csbr.qingcloud.portal.domain.vo.RuleDTO; | 8 | import com.csbr.qingcloud.portal.domain.vo.RuleDTO; |
| 8 | import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; | 9 | import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; |
| 9 | import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty; | 10 | import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty; |
| ... | @@ -43,5 +44,8 @@ public interface ConfigureFeign { | ... | @@ -43,5 +44,8 @@ public interface ConfigureFeign { |
| 43 | @PostMapping(value = "/rule/new-code",produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 44 | @PostMapping(value = "/rule/new-code",produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) |
| 44 | CommonRes<String> newCode(@RequestBody RuleDTO dto); | 45 | CommonRes<String> newCode(@RequestBody RuleDTO dto); |
| 45 | 46 | ||
| 47 | @GetMapping(value = "/borough/get-borough",produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | ||
| 48 | CommonRes<List<BoroughPOJO>> getBoroughCodeName(); | ||
| 49 | |||
| 46 | 50 | ||
| 47 | } | 51 | } | ... | ... |
| ... | @@ -3,6 +3,7 @@ package com.csbr.qingcloud.portal.feign; | ... | @@ -3,6 +3,7 @@ package com.csbr.qingcloud.portal.feign; |
| 3 | import com.csbr.cloud.common.config.FastCallFeignConfiguration; | 3 | import com.csbr.cloud.common.config.FastCallFeignConfiguration; |
| 4 | import com.csbr.cloud.common.response.CommonRes; | 4 | import com.csbr.cloud.common.response.CommonRes; |
| 5 | import com.csbr.qingcloud.portal.domain.vo.DemandUpdateStateVO; | 5 | import com.csbr.qingcloud.portal.domain.vo.DemandUpdateStateVO; |
| 6 | import com.csbr.qingcloud.portal.domain.vo.ProcessOrderProcessDtlRSVO; | ||
| 6 | import com.csbr.qingcloud.portal.domain.vo.ProcessOrderRQVO; | 7 | import com.csbr.qingcloud.portal.domain.vo.ProcessOrderRQVO; |
| 7 | import jakarta.validation.Valid; | 8 | import jakarta.validation.Valid; |
| 8 | import org.springframework.cloud.openfeign.FeignClient; | 9 | import org.springframework.cloud.openfeign.FeignClient; |
| ... | @@ -18,10 +19,13 @@ import java.util.Map; | ... | @@ -18,10 +19,13 @@ import java.util.Map; |
| 18 | @FeignClient(value = "ms-data-process-basic-service",url = "${dataProcessUrl}", configuration = FastCallFeignConfiguration.class) | 19 | @FeignClient(value = "ms-data-process-basic-service",url = "${dataProcessUrl}", configuration = FastCallFeignConfiguration.class) |
| 19 | public interface DataProcessBasicFeign { | 20 | public interface DataProcessBasicFeign { |
| 20 | 21 | ||
| 21 | @PostMapping(value = "/process-order/save", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 22 | @PostMapping(value = "/process-order/saveOrUpdate", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) |
| 22 | CommonRes<Boolean> saveProcessOrder(@RequestBody @Valid ProcessOrderRQVO vo); | 23 | CommonRes<Boolean> saveProcessOrder(@RequestBody @Valid ProcessOrderRQVO vo); |
| 23 | 24 | ||
| 24 | @PostMapping(value = "/process-order-process-dtl/get-order-state", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 25 | @PostMapping(value = "/process-order-process-dtl/get-order-state", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) |
| 25 | CommonRes<Map<String, DemandUpdateStateVO>> getOrderState(@RequestBody List<String> processOrderGuids); | 26 | CommonRes<Map<String, DemandUpdateStateVO>> getOrderState(@RequestBody List<String> processOrderGuids); |
| 26 | 27 | ||
| 28 | @PostMapping(value = "/process-order-process-dtl/process-order-list", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | ||
| 29 | CommonRes<List<ProcessOrderProcessDtlRSVO>> processOrderList(@RequestBody List<String> processOrderGuids); | ||
| 30 | |||
| 27 | } | 31 | } | ... | ... |
| ... | @@ -21,7 +21,10 @@ public interface PersonelFeign { | ... | @@ -21,7 +21,10 @@ public interface PersonelFeign { |
| 21 | CommonRes<TenantRQVO> authTenant(@RequestBody TenantRQVO vo); | 21 | CommonRes<TenantRQVO> authTenant(@RequestBody TenantRQVO vo); |
| 22 | 22 | ||
| 23 | @PutMapping(value = "/tenant/update", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 23 | @PutMapping(value = "/tenant/update", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) |
| 24 | CommonRes<Boolean> updateTenant(@RequestBody TenantRQVO vo); | 24 | CommonRes<String> updateTenant(@RequestBody TenantRQVO vo); |
| 25 | |||
| 26 | @PutMapping(value = "/tenant/change-update", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | ||
| 27 | CommonRes<Boolean> changeUpdate(@RequestBody TenantRQVO vo); | ||
| 25 | 28 | ||
| 26 | @GetMapping(value = "/tenant/get-all-tenant-guid-name-map", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 29 | @GetMapping(value = "/tenant/get-all-tenant-guid-name-map", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) |
| 27 | CommonRes<Map<String, String>> getAllTenantGuidNameMap(); | 30 | CommonRes<Map<String, String>> getAllTenantGuidNameMap(); | ... | ... |
| ... | @@ -2,10 +2,9 @@ package com.csbr.qingcloud.portal.feign; | ... | @@ -2,10 +2,9 @@ package com.csbr.qingcloud.portal.feign; |
| 2 | 2 | ||
| 3 | import com.csbr.cloud.common.config.FastCallFeignConfiguration; | 3 | import com.csbr.cloud.common.config.FastCallFeignConfiguration; |
| 4 | import com.csbr.cloud.common.response.CommonRes; | 4 | import com.csbr.cloud.common.response.CommonRes; |
| 5 | import com.csbr.cloud.workflow.domain.dto.appove.FlowQueryDTO; | ||
| 5 | import com.csbr.cloud.workflow.domain.dto.appove.FlowUpdateStateDTO; | 6 | import com.csbr.cloud.workflow.domain.dto.appove.FlowUpdateStateDTO; |
| 6 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; | 7 | import com.csbr.cloud.workflow.domain.vo.appove.ApproveVO; |
| 7 | import com.csbr.qingcloud.portal.domain.vo.UserQueryDTO; | ||
| 8 | import com.csbr.qingcloud.portal.domain.vo.UserVO; | ||
| 9 | import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; | 8 | import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; |
| 10 | import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty; | 9 | import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty; |
| 11 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 10 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
| ... | @@ -13,10 +12,10 @@ import jakarta.validation.Valid; | ... | @@ -13,10 +12,10 @@ import jakarta.validation.Valid; |
| 13 | import org.springframework.cloud.openfeign.FeignClient; | 12 | import org.springframework.cloud.openfeign.FeignClient; |
| 14 | import org.springframework.http.MediaType; | 13 | import org.springframework.http.MediaType; |
| 15 | import org.springframework.util.MultiValueMap; | 14 | import org.springframework.util.MultiValueMap; |
| 16 | import org.springframework.web.bind.annotation.*; | 15 | import org.springframework.web.bind.annotation.RequestBody; |
| 17 | 16 | import org.springframework.web.bind.annotation.RequestHeader; | |
| 18 | import java.net.URI; | 17 | import org.springframework.web.bind.annotation.RequestMapping; |
| 19 | import java.util.List; | 18 | import org.springframework.web.bind.annotation.RequestMethod; |
| 20 | 19 | ||
| 21 | /** | 20 | /** |
| 22 | * @author Xiaocq | 21 | * @author Xiaocq |
| ... | @@ -30,5 +29,9 @@ public interface WorkflowFeign { | ... | @@ -30,5 +29,9 @@ public interface WorkflowFeign { |
| 30 | @RequestMapping(value = "/work-flow/data/allow-flow-core", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 29 | @RequestMapping(value = "/work-flow/data/allow-flow-core", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) |
| 31 | CommonRes<Boolean> allowFlowCore(@RequestBody FlowUpdateStateDTO dto, @RequestHeader(required = false) MultiValueMap<String, String> headers); | 30 | CommonRes<Boolean> allowFlowCore(@RequestBody FlowUpdateStateDTO dto, @RequestHeader(required = false) MultiValueMap<String, String> headers); |
| 32 | 31 | ||
| 32 | @HystrixCommand(fallbackMethod = "CommonUtil.sleepFallback", commandProperties = { | ||
| 33 | @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "4500")}) | ||
| 34 | @RequestMapping(value = "/work-flow/data/get-flow-list-tenant", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | ||
| 35 | CommonRes<PageListVO<ApproveVO>> getFlowListCrossTenant(@RequestBody @Valid FlowQueryDTO dto); | ||
| 33 | 36 | ||
| 34 | } | 37 | } | ... | ... |
| ... | @@ -221,4 +221,13 @@ public class MfDemand extends BaseShardingDO { | ... | @@ -221,4 +221,13 @@ public class MfDemand extends BaseShardingDO { |
| 221 | @Name("加工单编号") | 221 | @Name("加工单编号") |
| 222 | private String processOrderNo; | 222 | private String processOrderNo; |
| 223 | 223 | ||
| 224 | @Name("资产Guid") | ||
| 225 | private String zqBizGuid; | ||
| 226 | |||
| 227 | @Name("专区名称") | ||
| 228 | private String zqName; | ||
| 229 | |||
| 230 | @Name("审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | ||
| 231 | private String crossPlatformApproveState; | ||
| 232 | |||
| 224 | } | 233 | } | ... | ... |
| ... | @@ -21,7 +21,10 @@ import java.util.Date; | ... | @@ -21,7 +21,10 @@ import java.util.Date; |
| 21 | @Accessors(chain = true) | 21 | @Accessors(chain = true) |
| 22 | @Name("企业信息") | 22 | @Name("企业信息") |
| 23 | public class MfEnterprise extends BaseDO { | 23 | public class MfEnterprise extends BaseDO { |
| 24 | 24 | ||
| 25 | @Name("会员GUID") | ||
| 26 | private String tenantGuid; | ||
| 27 | |||
| 25 | /** | 28 | /** |
| 26 | * 公司名称 | 29 | * 公司名称 |
| 27 | */ | 30 | */ |
| ... | @@ -37,7 +40,7 @@ public class MfEnterprise extends BaseDO { | ... | @@ -37,7 +40,7 @@ public class MfEnterprise extends BaseDO { |
| 37 | /** | 40 | /** |
| 38 | * 企业类型【选择平台字典【公司类型】的选项】 | 41 | * 企业类型【选择平台字典【公司类型】的选项】 |
| 39 | */ | 42 | */ |
| 40 | @Name("企业类型【选择平台字典【公司类型】的选项】") | 43 | @Name("企业类型") |
| 41 | private String tenantType; | 44 | private String tenantType; |
| 42 | 45 | ||
| 43 | /** | 46 | /** |
| ... | @@ -49,7 +52,7 @@ public class MfEnterprise extends BaseDO { | ... | @@ -49,7 +52,7 @@ public class MfEnterprise extends BaseDO { |
| 49 | /** | 52 | /** |
| 50 | * 注册资本【(万元)】 | 53 | * 注册资本【(万元)】 |
| 51 | */ | 54 | */ |
| 52 | @Name("注册资本【(万元)】") | 55 | @Name("注册资本") |
| 53 | private BigDecimal registeredCapital; | 56 | private BigDecimal registeredCapital; |
| 54 | 57 | ||
| 55 | /** | 58 | /** |
| ... | @@ -79,7 +82,7 @@ public class MfEnterprise extends BaseDO { | ... | @@ -79,7 +82,7 @@ public class MfEnterprise extends BaseDO { |
| 79 | /** | 82 | /** |
| 80 | * 营业期限【1 长期有效;2 自定义】 | 83 | * 营业期限【1 长期有效;2 自定义】 |
| 81 | */ | 84 | */ |
| 82 | @Name("营业期限【1 长期有效;2 自定义】") | 85 | @Name("营业期限") |
| 83 | private String businessLicenseTerm; | 86 | private String businessLicenseTerm; |
| 84 | 87 | ||
| 85 | /** | 88 | /** |
| ... | @@ -102,9 +105,9 @@ public class MfEnterprise extends BaseDO { | ... | @@ -102,9 +105,9 @@ public class MfEnterprise extends BaseDO { |
| 102 | private String businessLicenseJson; | 105 | private String businessLicenseJson; |
| 103 | 106 | ||
| 104 | /** | 107 | /** |
| 105 | * 营业执照经营范围 | 108 | * 经营范围 |
| 106 | */ | 109 | */ |
| 107 | @Name("营业执照经营范围") | 110 | @Name("经营范围") |
| 108 | private String businessLicenseScope; | 111 | private String businessLicenseScope; |
| 109 | 112 | ||
| 110 | /** | 113 | /** |
| ... | @@ -168,11 +171,20 @@ public class MfEnterprise extends BaseDO { | ... | @@ -168,11 +171,20 @@ public class MfEnterprise extends BaseDO { |
| 168 | */ | 171 | */ |
| 169 | @Name("授权委托书") | 172 | @Name("授权委托书") |
| 170 | private String authorizationLetter; | 173 | private String authorizationLetter; |
| 174 | |||
| 175 | @Name("资产Guid") | ||
| 176 | private String zqBizGuid; | ||
| 177 | |||
| 178 | @Name("专区名称") | ||
| 179 | private String zqName; | ||
| 180 | |||
| 181 | @Name("审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | ||
| 182 | private String crossPlatformApproveState; | ||
| 171 | 183 | ||
| 172 | /** | 184 | /** |
| 173 | * 业务审批状态【N 草稿中,A 审批中,Y 已通过,R 驳回,C 已撤销,D 已废弃; 默认 N】 | 185 | * 业务审批状态【N 草稿中,A 审批中,Y 已通过,R 驳回,C 已撤销,D 已废弃; 默认 N】 |
| 174 | */ | 186 | */ |
| 175 | @Name("业务审批状态【N 草稿中,A 审批中,Y 已通过,R 驳回,C 已撤销,D 已废弃;B 变更中 默认 N】") | 187 | @Name("业务审批状态") |
| 176 | private String bizApproveState; | 188 | private String bizApproveState; |
| 177 | 189 | ||
| 178 | } | 190 | } | ... | ... |
| ... | @@ -21,7 +21,10 @@ import java.util.Date; | ... | @@ -21,7 +21,10 @@ import java.util.Date; |
| 21 | @Accessors(chain = true) | 21 | @Accessors(chain = true) |
| 22 | @Name("企业信息变更审批") | 22 | @Name("企业信息变更审批") |
| 23 | public class MfEnterpriseChangeApprove extends BaseDO { | 23 | public class MfEnterpriseChangeApprove extends BaseDO { |
| 24 | 24 | ||
| 25 | @Name("会员GUID") | ||
| 26 | private String tenantGuid; | ||
| 27 | |||
| 25 | /** | 28 | /** |
| 26 | * 公司名称 | 29 | * 公司名称 |
| 27 | */ | 30 | */ |
| ... | @@ -37,7 +40,7 @@ public class MfEnterpriseChangeApprove extends BaseDO { | ... | @@ -37,7 +40,7 @@ public class MfEnterpriseChangeApprove extends BaseDO { |
| 37 | /** | 40 | /** |
| 38 | * 企业类型【选择平台字典【公司类型】的选项】 | 41 | * 企业类型【选择平台字典【公司类型】的选项】 |
| 39 | */ | 42 | */ |
| 40 | @Name("企业类型【选择平台字典【公司类型】的选项】") | 43 | @Name("企业类型") |
| 41 | private String tenantType; | 44 | private String tenantType; |
| 42 | 45 | ||
| 43 | /** | 46 | /** |
| ... | @@ -49,7 +52,7 @@ public class MfEnterpriseChangeApprove extends BaseDO { | ... | @@ -49,7 +52,7 @@ public class MfEnterpriseChangeApprove extends BaseDO { |
| 49 | /** | 52 | /** |
| 50 | * 注册资本【(万元)】 | 53 | * 注册资本【(万元)】 |
| 51 | */ | 54 | */ |
| 52 | @Name("注册资本【(万元)】") | 55 | @Name("注册资本") |
| 53 | private BigDecimal registeredCapital; | 56 | private BigDecimal registeredCapital; |
| 54 | 57 | ||
| 55 | /** | 58 | /** |
| ... | @@ -79,7 +82,7 @@ public class MfEnterpriseChangeApprove extends BaseDO { | ... | @@ -79,7 +82,7 @@ public class MfEnterpriseChangeApprove extends BaseDO { |
| 79 | /** | 82 | /** |
| 80 | * 营业期限【1 长期有效;2 自定义】 | 83 | * 营业期限【1 长期有效;2 自定义】 |
| 81 | */ | 84 | */ |
| 82 | @Name("营业期限【1 长期有效;2 自定义】") | 85 | @Name("营业期限") |
| 83 | private String businessLicenseTerm; | 86 | private String businessLicenseTerm; |
| 84 | 87 | ||
| 85 | /** | 88 | /** |
| ... | @@ -172,7 +175,7 @@ public class MfEnterpriseChangeApprove extends BaseDO { | ... | @@ -172,7 +175,7 @@ public class MfEnterpriseChangeApprove extends BaseDO { |
| 172 | /** | 175 | /** |
| 173 | * 业务审批状态【N 草稿中,A 审批中,Y 已通过,R 驳回,C 已撤销,D 已废弃; 默认 N】 | 176 | * 业务审批状态【N 草稿中,A 审批中,Y 已通过,R 驳回,C 已撤销,D 已废弃; 默认 N】 |
| 174 | */ | 177 | */ |
| 175 | @Name("业务审批状态【N 草稿中,A 审批中,Y 已通过,R 驳回,C 已撤销,D 已废弃; 默认 N】") | 178 | @Name("业务审批状态") |
| 176 | private String bizApproveState; | 179 | private String bizApproveState; |
| 177 | 180 | ||
| 178 | /** | 181 | /** |
| ... | @@ -186,11 +189,20 @@ public class MfEnterpriseChangeApprove extends BaseDO { | ... | @@ -186,11 +189,20 @@ public class MfEnterpriseChangeApprove extends BaseDO { |
| 186 | */ | 189 | */ |
| 187 | @Name("原数据唯一标识") | 190 | @Name("原数据唯一标识") |
| 188 | private String sourceGuid; | 191 | private String sourceGuid; |
| 192 | |||
| 193 | @Name("资产Guid") | ||
| 194 | private String zqBizGuid; | ||
| 195 | |||
| 196 | @Name("专区名称") | ||
| 197 | private String zqName; | ||
| 198 | |||
| 199 | @Name("审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | ||
| 200 | private String crossPlatformApproveState; | ||
| 189 | 201 | ||
| 190 | /** | 202 | /** |
| 191 | * 数据类型【数据类型 1原数据 2新数据】 | 203 | * 数据类型【数据类型 1原数据 2新数据】 |
| 192 | */ | 204 | */ |
| 193 | @Name("数据类型【数据类型 1原数据 2新数据】") | 205 | @Name("数据类型") |
| 194 | private String dataType; | 206 | private String dataType; |
| 195 | 207 | ||
| 196 | } | 208 | } | ... | ... |
| 1 | package com.csbr.qingcloud.portal.mybatis.service.impl; | 1 | package com.csbr.qingcloud.portal.mybatis.service.impl; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
| 3 | import com.csbr.cloud.mybatis.service.impl.CsbrServiceImpl; | 5 | import com.csbr.cloud.mybatis.service.impl.CsbrServiceImpl; |
| 4 | import com.csbr.qingcloud.portal.mybatis.mapper.MfEnterpriseMapper; | 6 | import com.csbr.qingcloud.portal.mybatis.mapper.MfEnterpriseMapper; |
| 5 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise; | 7 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise; |
| ... | @@ -7,6 +9,10 @@ import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseService; | ... | @@ -7,6 +9,10 @@ import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseService; |
| 7 | import jakarta.annotation.Resource; | 9 | import jakarta.annotation.Resource; |
| 8 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
| 9 | 11 | ||
| 12 | import java.io.Serializable; | ||
| 13 | import java.util.Collection; | ||
| 14 | import java.util.List; | ||
| 15 | |||
| 10 | /** | 16 | /** |
| 11 | * @program: D:/git/ms-data-circulation-portal-service | 17 | * @program: D:/git/ms-data-circulation-portal-service |
| 12 | * @description: 企业信息逻辑层接口实现 | 18 | * @description: 企业信息逻辑层接口实现 |
| ... | @@ -18,5 +24,12 @@ public class MfEnterpriseServiceImpl extends CsbrServiceImpl<MfEnterpriseMapper, | ... | @@ -18,5 +24,12 @@ public class MfEnterpriseServiceImpl extends CsbrServiceImpl<MfEnterpriseMapper, |
| 18 | 24 | ||
| 19 | @Resource | 25 | @Resource |
| 20 | private MfEnterpriseMapper mfEnterpriseMapper; | 26 | private MfEnterpriseMapper mfEnterpriseMapper; |
| 21 | 27 | ||
| 28 | @Override | ||
| 29 | public List<MfEnterprise> listByIds(Collection<? extends Serializable> idList) { | ||
| 30 | LambdaQueryWrapper<MfEnterprise> queryWrapper = Wrappers.lambdaQuery(MfEnterprise.class); | ||
| 31 | queryWrapper.in(MfEnterprise::getGuid, idList); | ||
| 32 | csbrExcludeShardingLambdaQueryWrapper(queryWrapper); | ||
| 33 | return list(queryWrapper); | ||
| 34 | } | ||
| 22 | } | 35 | } | ... | ... |
| 1 | package com.csbr.qingcloud.portal.service; | 1 | package com.csbr.qingcloud.portal.service; |
| 2 | 2 | ||
| 3 | import com.csbr.qingcloud.portal.domain.vo.DemandApproveVO; | 3 | import com.csbr.qingcloud.portal.domain.vo.*; |
| 4 | import com.csbr.qingcloud.portal.domain.vo.DemandUpdateStateVO; | ||
| 5 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 4 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
| 6 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; | 5 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; |
| 7 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; | 6 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; |
| 8 | import com.csbr.qingcloud.portal.domain.vo.DemandQueryVO; | ||
| 9 | import com.csbr.qingcloud.portal.domain.vo.DemandRSVO; | ||
| 10 | 7 | ||
| 11 | import java.util.List; | 8 | import java.util.List; |
| 12 | 9 | ||
| ... | @@ -72,8 +69,19 @@ public interface DemandService { | ... | @@ -72,8 +69,19 @@ public interface DemandService { |
| 72 | */ | 69 | */ |
| 73 | void flowCallBack(BizCallbackDTO dto); | 70 | void flowCallBack(BizCallbackDTO dto); |
| 74 | 71 | ||
| 72 | /** | ||
| 73 | * 数据需求-流程结束后进行业务回调(跨服务审批) | ||
| 74 | * @param dto | ||
| 75 | */ | ||
| 76 | void crossFlowCallBack(BizCallbackDTO dto); | ||
| 77 | |||
| 75 | Boolean lastApprove(DemandApproveVO dto); | 78 | Boolean lastApprove(DemandApproveVO dto); |
| 76 | 79 | ||
| 77 | DemandRSVO getDemandDetailByProcess(String processOrderNo); | 80 | DemandRSVO getDemandDetailByProcess(String processOrderNo); |
| 78 | 81 | ||
| 82 | /** | ||
| 83 | * 根据加工单编号查询资产列表 | ||
| 84 | * @return | ||
| 85 | */ | ||
| 86 | List<ProcessOrderProcessDtlRSVO> listByProcessOrderNo(); | ||
| 79 | } | 87 | } | ... | ... |
| ... | @@ -16,4 +16,10 @@ public interface EnterpriseChangeApproveService { | ... | @@ -16,4 +16,10 @@ public interface EnterpriseChangeApproveService { |
| 16 | ChangeApproveVO changeDetail(String guid); | 16 | ChangeApproveVO changeDetail(String guid); |
| 17 | 17 | ||
| 18 | void changeUpdate(BizCallbackDTO dto); | 18 | void changeUpdate(BizCallbackDTO dto); |
| 19 | |||
| 20 | void removeByGuids(List<String> guids); | ||
| 21 | |||
| 22 | void crossFlowCallBack(BizCallbackDTO dto); | ||
| 23 | |||
| 24 | void crossRemoveByBizGuid(List<String> zqBizGuids); | ||
| 19 | } | 25 | } | ... | ... |
| 1 | package com.csbr.qingcloud.portal.service; | 1 | package com.csbr.qingcloud.portal.service; |
| 2 | 2 | ||
| 3 | import com.csbr.cloud.workflow.domain.dto.appove.FlowUpdateStateDTO; | 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.mybatis.entity.MfEnterprise; | ||
| 5 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 6 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
| 6 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; | 7 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; |
| 7 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; | 8 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; |
| 8 | 9 | ||
| 10 | import java.util.Date; | ||
| 9 | import java.util.List; | 11 | import java.util.List; |
| 10 | 12 | ||
| 11 | /** | 13 | /** |
| ... | @@ -26,6 +28,13 @@ public interface EnterpriseService { | ... | @@ -26,6 +28,13 @@ public interface EnterpriseService { |
| 26 | PageListVO<EnterpriseRSVO> pageList(EnterpriseQueryVO queryVO); | 28 | PageListVO<EnterpriseRSVO> pageList(EnterpriseQueryVO queryVO); |
| 27 | 29 | ||
| 28 | /** | 30 | /** |
| 31 | * 企业信息-分页(调用流程) | ||
| 32 | * @param dto | ||
| 33 | * @return | ||
| 34 | */ | ||
| 35 | PageListVO<EnterpriseApproveRSVO> flowPageList(FlowQueryDTO dto); | ||
| 36 | |||
| 37 | /** | ||
| 29 | * 企业信息获取详情数据 | 38 | * 企业信息获取详情数据 |
| 30 | * @author xcq | 39 | * @author xcq |
| 31 | * @date 2024-12-26 16:18 | 40 | * @date 2024-12-26 16:18 |
| ... | @@ -60,7 +69,7 @@ public interface EnterpriseService { | ... | @@ -60,7 +69,7 @@ public interface EnterpriseService { |
| 60 | * @return void | 69 | * @return void |
| 61 | */ | 70 | */ |
| 62 | void removeByGuids(List<String> guids); | 71 | void removeByGuids(List<String> guids); |
| 63 | 72 | ||
| 64 | /** | 73 | /** |
| 65 | * 流程结束后进行业务回调 | 74 | * 流程结束后进行业务回调 |
| 66 | * @author xcq | 75 | * @author xcq |
| ... | @@ -70,14 +79,28 @@ public interface EnterpriseService { | ... | @@ -70,14 +79,28 @@ public interface EnterpriseService { |
| 70 | */ | 79 | */ |
| 71 | void flowCallBack(BizCallbackDTO dto); | 80 | void flowCallBack(BizCallbackDTO dto); |
| 72 | 81 | ||
| 82 | /** | ||
| 83 | * 流程结束后进行业务回调(跨服务审批) | ||
| 84 | * @param dto | ||
| 85 | */ | ||
| 86 | void crossFlowCallBack(BizCallbackDTO dto); | ||
| 87 | |||
| 73 | Boolean check(EnterpriseRQVO vo); | 88 | Boolean check(EnterpriseRQVO vo); |
| 74 | 89 | ||
| 75 | List<ChangeInfoVO> getChange(String tenantName); | 90 | List<ChangeInfoVO> getChange(String sourceGuid, Date createTime); |
| 76 | 91 | ||
| 77 | EnterpriseRSVO getEnterpriseDetailByName(String tenantName); | 92 | EnterpriseRSVO getEnterpriseDetailByName(String tenantName); |
| 78 | 93 | ||
| 79 | /** 将此账号提交的数据需求迁移到新的企业 */ | 94 | /** 将此账号提交的数据需求迁移到新的企业 */ |
| 80 | void moveOldData(TenantRQVO vo); | 95 | void moveOldData(TenantRQVO vo); |
| 81 | 96 | ||
| 82 | Boolean lastApprove(FlowUpdateStateDTO dto); | 97 | /** 更新会员信息 */ |
| 98 | void updateTenant(MfEnterprise vo); | ||
| 99 | |||
| 100 | /** | ||
| 101 | * 企业信息-根据登陆账号查询详情 | ||
| 102 | * @param logonUser | ||
| 103 | * @return | ||
| 104 | */ | ||
| 105 | EnterpriseRSVO getEnterpriseDetailByLogonUser(String logonUser); | ||
| 83 | } | 106 | } | ... | ... |
| 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.alibaba.fastjson.JSON; |
| 4 | import com.alibaba.fastjson.JSONArray; | ||
| 5 | import com.alibaba.fastjson.JSONObject; | 4 | import com.alibaba.fastjson.JSONObject; |
| 6 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 5 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 7 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 6 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 7 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
| 8 | import com.csbr.cloud.common.enums.SystemError; | 8 | import com.csbr.cloud.common.enums.SystemError; |
| 9 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; | 9 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; |
| 10 | import com.csbr.cloud.workflow.domain.dto.appove.FlowUpdateStateDTO; | 10 | import com.csbr.cloud.workflow.domain.dto.appove.FlowUpdateStateDTO; |
| ... | @@ -13,6 +13,9 @@ import com.csbr.qingcloud.portal.domain.vo.*; | ... | @@ -13,6 +13,9 @@ import com.csbr.qingcloud.portal.domain.vo.*; |
| 13 | import com.csbr.qingcloud.portal.feign.ConfigureFeign; | 13 | import com.csbr.qingcloud.portal.feign.ConfigureFeign; |
| 14 | import com.csbr.qingcloud.portal.feign.DataProcessBasicFeign; | 14 | import com.csbr.qingcloud.portal.feign.DataProcessBasicFeign; |
| 15 | import com.csbr.qingcloud.portal.feign.PersonelFeign; | 15 | import com.csbr.qingcloud.portal.feign.PersonelFeign; |
| 16 | import com.csbr.qingcloud.portal.util.DateUtil; | ||
| 17 | import com.csbr.qingcloud.portal.util.InvokeUtil; | ||
| 18 | import com.csbr.qingcloud.portal.util.ZQConfig; | ||
| 16 | import csbr.cloud.entity.domain.user.UserInfo; | 19 | import csbr.cloud.entity.domain.user.UserInfo; |
| 17 | import csbr.cloud.entity.enums.ApprovalStateEnum; | 20 | import csbr.cloud.entity.enums.ApprovalStateEnum; |
| 18 | import com.csbr.cloud.common.exception.CsbrSystemException; | 21 | import com.csbr.cloud.common.exception.CsbrSystemException; |
| ... | @@ -32,11 +35,13 @@ import csbr.cloud.entity.utils.UserContextHolder; | ... | @@ -32,11 +35,13 @@ import csbr.cloud.entity.utils.UserContextHolder; |
| 32 | import jakarta.annotation.Resource; | 35 | import jakarta.annotation.Resource; |
| 33 | import lombok.extern.slf4j.Slf4j; | 36 | import lombok.extern.slf4j.Slf4j; |
| 34 | import org.apache.commons.collections.CollectionUtils; | 37 | import org.apache.commons.collections.CollectionUtils; |
| 38 | import org.apache.commons.lang3.ObjectUtils; | ||
| 35 | import org.apache.commons.lang3.StringUtils; | 39 | import org.apache.commons.lang3.StringUtils; |
| 40 | import org.springframework.beans.factory.annotation.Autowired; | ||
| 41 | import org.springframework.beans.factory.annotation.Value; | ||
| 36 | import org.springframework.stereotype.Service; | 42 | import org.springframework.stereotype.Service; |
| 37 | import io.seata.spring.annotation.GlobalTransactional; | 43 | import io.seata.spring.annotation.GlobalTransactional; |
| 38 | import org.springframework.transaction.annotation.Transactional; | 44 | import org.springframework.transaction.annotation.Transactional; |
| 39 | |||
| 40 | import java.util.*; | 45 | import java.util.*; |
| 41 | import java.util.stream.Collectors; | 46 | import java.util.stream.Collectors; |
| 42 | 47 | ||
| ... | @@ -54,11 +59,19 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -54,11 +59,19 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 54 | * 功能名称 | 59 | * 功能名称 |
| 55 | */ | 60 | */ |
| 56 | private static final String FUNCTION_NAME = "数据需求"; | 61 | private static final String FUNCTION_NAME = "数据需求"; |
| 62 | |||
| 63 | private static final String SysFuncCode = "SJXQ"; | ||
| 57 | 64 | ||
| 58 | /** | 65 | /** |
| 59 | * 流程类型 | 66 | * 流程类型 |
| 60 | */ | 67 | */ |
| 61 | private static final String FLOW_TYPE = WorkFlowBizEnum.DATA_DEMAND.getValue(); | 68 | private static final String FLOW_TYPE = WorkFlowBizEnum.DATA_DEMAND.getValue(); |
| 69 | |||
| 70 | @Autowired | ||
| 71 | private ZQConfig zqConfig; | ||
| 72 | |||
| 73 | @Autowired | ||
| 74 | private InvokeUtil invokeUtil; | ||
| 62 | 75 | ||
| 63 | @Resource | 76 | @Resource |
| 64 | private MfDemandService mfDemandService; | 77 | private MfDemandService mfDemandService; |
| ... | @@ -136,8 +149,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -136,8 +149,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 136 | if(CollectionUtils.isEmpty(guids)){ | 149 | if(CollectionUtils.isEmpty(guids)){ |
| 137 | return null; | 150 | return null; |
| 138 | } | 151 | } |
| 139 | Map<String, DemandUpdateStateVO> map = dataProcessBasicFeign.getOrderState(guids).getData(); | 152 | try{ |
| 140 | return map; | 153 | Map<String, DemandUpdateStateVO> map = dataProcessBasicFeign.getOrderState(guids).getData(); |
| 154 | return map; | ||
| 155 | }catch (Exception e){ | ||
| 156 | e.printStackTrace(); | ||
| 157 | return null; | ||
| 158 | } | ||
| 141 | } | 159 | } |
| 142 | 160 | ||
| 143 | /** | 161 | /** |
| ... | @@ -151,11 +169,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -151,11 +169,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 151 | @Override | 169 | @Override |
| 152 | public void saveDemand(FlowRQBaseVO flowBaseVO) { | 170 | public void saveDemand(FlowRQBaseVO flowBaseVO) { |
| 153 | DemandRQVO rqVO = (DemandRQVO) flowBaseVO; | 171 | DemandRQVO rqVO = (DemandRQVO) flowBaseVO; |
| 172 | log.info("======rqVO, {}", JSON.toJSONString(rqVO)); | ||
| 173 | System.out.println("======rqVO, " + JSON.toJSONString(rqVO)); | ||
| 154 | beforeSave(rqVO); | 174 | beforeSave(rqVO); |
| 155 | MfDemand entity = convertToEntity(rqVO); | 175 | MfDemand entity = convertToEntity(rqVO); |
| 156 | entity.setRequirementOrderNo(configureFeign.newCode(new RuleDTO().setRuleName("demand-code").setRuleType("generate")).getData()); | 176 | entity.setRequirementOrderNo(configureFeign.newCode(new RuleDTO().setRuleName("demand-code").setRuleType("generate")).getData()); |
| 157 | // 发起审批流程或保存草稿 | 177 | // 发起审批流程或保存草稿 |
| 158 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 178 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity, rqVO); |
| 159 | super.startWorkFlow(rqVO, approvalDTO, entity::setBizApproveState); | 179 | super.startWorkFlow(rqVO, approvalDTO, entity::setBizApproveState); |
| 160 | // 业务数据保存 | 180 | // 业务数据保存 |
| 161 | boolean flag = mfDemandService.save(entity); | 181 | boolean flag = mfDemandService.save(entity); |
| ... | @@ -166,6 +186,20 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -166,6 +186,20 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 166 | afterSave(entity, rqVO); | 186 | afterSave(entity, rqVO); |
| 167 | } | 187 | } |
| 168 | 188 | ||
| 189 | private void checkProductGuid(String dataProductGuid){ | ||
| 190 | if (StringUtils.isBlank(dataProductGuid)) { | ||
| 191 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, "产品不能为空"); | ||
| 192 | } | ||
| 193 | //此产品审批中的需求只能有1个 | ||
| 194 | LambdaQueryWrapper<MfDemand> wrapper = new LambdaQueryWrapper<>(); | ||
| 195 | wrapper.eq(MfDemand::getDataProductGuid,dataProductGuid); | ||
| 196 | wrapper.eq(MfDemand::getBizApproveState,"A"); | ||
| 197 | List<MfDemand> list = mfDemandService.list(wrapper); | ||
| 198 | if(CollectionUtils.isNotEmpty(list)){ | ||
| 199 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, "该数据产品已在审批中,请勿重复提交!"); | ||
| 200 | } | ||
| 201 | } | ||
| 202 | |||
| 169 | /** | 203 | /** |
| 170 | * 数据需求数据修改 | 204 | * 数据需求数据修改 |
| 171 | * @author xcq | 205 | * @author xcq |
| ... | @@ -183,7 +217,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -183,7 +217,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 183 | beforeUpdate(rqVO); | 217 | beforeUpdate(rqVO); |
| 184 | MfDemand entity = convertToEntity(rqVO); | 218 | MfDemand entity = convertToEntity(rqVO); |
| 185 | // 发起审批流程或保存草稿 | 219 | // 发起审批流程或保存草稿 |
| 186 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 220 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity, rqVO); |
| 187 | super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState); | 221 | super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState); |
| 188 | if (rqVO.getIsRestart()) { | 222 | if (rqVO.getIsRestart()) { |
| 189 | // 重新提交 | 223 | // 重新提交 |
| ... | @@ -209,9 +243,9 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -209,9 +243,9 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 209 | * @return void | 243 | * @return void |
| 210 | */ | 244 | */ |
| 211 | private void againSubmitFlow(MfDemand entity, DemandRQVO rqVO, AddApprovalDTO approvalDTO) { | 245 | private void againSubmitFlow(MfDemand entity, DemandRQVO rqVO, AddApprovalDTO approvalDTO) { |
| 212 | // 重新提交的数据重置相关字段 | ||
| 213 | entity.setGuid(CommonUtil.newGuid()); | 246 | entity.setGuid(CommonUtil.newGuid()); |
| 214 | mfDemandService.csbrBaseEntity(entity); | 247 | mfDemandService.csbrBaseEntity(entity); |
| 248 | entity.setBizApproveState("A"); | ||
| 215 | // 保存新数据 | 249 | // 保存新数据 |
| 216 | boolean flag = mfDemandService.save(entity); | 250 | boolean flag = mfDemandService.save(entity); |
| 217 | if (!flag) { | 251 | if (!flag) { |
| ... | @@ -219,6 +253,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -219,6 +253,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 219 | } | 253 | } |
| 220 | // 发起新的流程 | 254 | // 发起新的流程 |
| 221 | approvalDTO.setBizGuid(entity.getGuid()); | 255 | approvalDTO.setBizGuid(entity.getGuid()); |
| 256 | approvalDTO.setUrlParam(String.format("guid=%s&demandCategory=%s&name=%s&type=detail", entity.getGuid(), entity.getDemandCategory(), entity.getDataDemandName())); | ||
| 222 | approvalFlowUtil.addApproval(approvalDTO); | 257 | approvalFlowUtil.addApproval(approvalDTO); |
| 223 | afterSave(entity, rqVO); | 258 | afterSave(entity, rqVO); |
| 224 | } | 259 | } |
| ... | @@ -238,6 +273,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -238,6 +273,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 238 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | 273 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", |
| 239 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | 274 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); |
| 240 | } | 275 | } |
| 276 | String crossPlatformApproveState = ""; | ||
| 241 | for (String guid : guids) { | 277 | for (String guid : guids) { |
| 242 | MfDemand entity = mfDemandService.getById(guid); | 278 | MfDemand entity = mfDemandService.getById(guid); |
| 243 | beforeRemove(entity); | 279 | beforeRemove(entity); |
| ... | @@ -246,9 +282,19 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -246,9 +282,19 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 246 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | 282 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); |
| 247 | } | 283 | } |
| 248 | afterRemove(entity); | 284 | afterRemove(entity); |
| 285 | crossPlatformApproveState = entity.getCrossPlatformApproveState(); | ||
| 249 | } | 286 | } |
| 250 | // 删除流程数据 | 287 | // 删除流程数据 |
| 251 | approvalFlowUtil.removeApproveByBizGuids(guids); | 288 | approvalFlowUtil.removeApproveByBizGuids(guids); |
| 289 | |||
| 290 | // 删除主平台数据 | ||
| 291 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(crossPlatformApproveState)) { | ||
| 292 | JSONObject jsonObject = new JSONObject(); | ||
| 293 | jsonObject.put("zqSystemCode", SysFuncCode); | ||
| 294 | jsonObject.put("zqBizGuids", JSON.toJSONString(guids)); | ||
| 295 | jsonObject.put("isCollection", true); | ||
| 296 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getZqDelUrl()); | ||
| 297 | } | ||
| 252 | } | 298 | } |
| 253 | 299 | ||
| 254 | /** | 300 | /** |
| ... | @@ -265,6 +311,29 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -265,6 +311,29 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 265 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); | 311 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); |
| 266 | } | 312 | } |
| 267 | String orderNo = null; | 313 | String orderNo = null; |
| 314 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState()) && !dto.getIsZqPlatformApprove() && StringUtils.isEmpty(entity.getZqName())) { | ||
| 315 | //生成加工单 | ||
| 316 | orderNo = addOrder(mfDemandService.getById(dto.getBizGuid()),dto); | ||
| 317 | } | ||
| 318 | // 同步更新审批状态 | ||
| 319 | LambdaUpdateWrapper<MfDemand> updateWrapper = new LambdaUpdateWrapper<>(); | ||
| 320 | updateWrapper.set(MfDemand::getBizApproveState, dto.getApprovalState()); | ||
| 321 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessOrderNo, orderNo); | ||
| 322 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessingGenerateTime, new Date()); | ||
| 323 | updateWrapper.eq(MfDemand::getGuid, dto.getBizGuid()); | ||
| 324 | boolean flag = mfDemandService.update(updateWrapper); | ||
| 325 | if (!flag) { | ||
| 326 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); | ||
| 327 | } | ||
| 328 | } | ||
| 329 | |||
| 330 | @Override | ||
| 331 | public void crossFlowCallBack(BizCallbackDTO dto) { | ||
| 332 | MfDemand entity = mfDemandService.getById(dto.getBizGuid()); | ||
| 333 | if (entity == null) { | ||
| 334 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); | ||
| 335 | } | ||
| 336 | String orderNo = null; | ||
| 268 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { | 337 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { |
| 269 | //生成加工单 | 338 | //生成加工单 |
| 270 | orderNo = addOrder(mfDemandService.getById(dto.getBizGuid()),dto); | 339 | orderNo = addOrder(mfDemandService.getById(dto.getBizGuid()),dto); |
| ... | @@ -272,6 +341,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -272,6 +341,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 272 | // 同步更新审批状态 | 341 | // 同步更新审批状态 |
| 273 | LambdaUpdateWrapper<MfDemand> updateWrapper = new LambdaUpdateWrapper<>(); | 342 | LambdaUpdateWrapper<MfDemand> updateWrapper = new LambdaUpdateWrapper<>(); |
| 274 | updateWrapper.set(MfDemand::getBizApproveState, dto.getApprovalState()); | 343 | updateWrapper.set(MfDemand::getBizApproveState, dto.getApprovalState()); |
| 344 | updateWrapper.set(MfDemand::getCrossPlatformApproveState, dto.getApprovalState()); | ||
| 275 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessOrderNo, orderNo); | 345 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessOrderNo, orderNo); |
| 276 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessingGenerateTime, new Date()); | 346 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessingGenerateTime, new Date()); |
| 277 | updateWrapper.eq(MfDemand::getGuid, dto.getBizGuid()); | 347 | updateWrapper.eq(MfDemand::getGuid, dto.getBizGuid()); |
| ... | @@ -323,6 +393,12 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -323,6 +393,12 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 323 | entity.setProcessCompanyName(dto.getProcessCompanyName()); | 393 | entity.setProcessCompanyName(dto.getProcessCompanyName()); |
| 324 | mfDemandService.updateById(entity); | 394 | mfDemandService.updateById(entity); |
| 325 | FlowUpdateStateDTO flowDTO = csbrBeanUtil.convert(dto,FlowUpdateStateDTO.class); | 395 | FlowUpdateStateDTO flowDTO = csbrBeanUtil.convert(dto,FlowUpdateStateDTO.class); |
| 396 | MfDemand demand = new MfDemand(); | ||
| 397 | demand.setContractAttachJson(entity.getContractAttachJson()); | ||
| 398 | demand.setProcessCompanyType(entity.getProcessCompanyType()); | ||
| 399 | demand.setProcessCompanyGuid(entity.getProcessCompanyGuid()); | ||
| 400 | demand.setProcessCompanyName(entity.getProcessCompanyName()); | ||
| 401 | flowDTO.setBizData(JSON.toJSONString(demand)); | ||
| 326 | flowDTO.setBackEndInvoke(true); | 402 | flowDTO.setBackEndInvoke(true); |
| 327 | workflowFeign.allowFlowCore(flowDTO).getData(); | 403 | workflowFeign.allowFlowCore(flowDTO).getData(); |
| 328 | 404 | ||
| ... | @@ -340,25 +416,45 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -340,25 +416,45 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 340 | return convertToVO(list.get(0),getStateMap(Collections.singletonList(list.get(0).getGuid()))); | 416 | return convertToVO(list.get(0),getStateMap(Collections.singletonList(list.get(0).getGuid()))); |
| 341 | } | 417 | } |
| 342 | 418 | ||
| 419 | @Override | ||
| 420 | public List<ProcessOrderProcessDtlRSVO> listByProcessOrderNo() { | ||
| 421 | LambdaQueryWrapper<MfDemand> queryWrapper = Wrappers.lambdaQuery(MfDemand.class); | ||
| 422 | queryWrapper.isNotNull(MfDemand::getRequirementOrderNo).isNotNull(MfDemand::getProcessOrderNo); | ||
| 423 | queryWrapper.orderByDesc(MfDemand::getCreateTime); | ||
| 424 | List<MfDemand> mfDemands = mfDemandService.list(queryWrapper); | ||
| 425 | if (ObjectUtils.isEmpty(mfDemands)) { | ||
| 426 | return null; | ||
| 427 | } | ||
| 428 | List<String> guids = mfDemands.stream().map(MfDemand::getGuid).toList(); | ||
| 429 | return dataProcessBasicFeign.processOrderList(guids).getData(); | ||
| 430 | } | ||
| 431 | |||
| 343 | /** | 432 | /** |
| 344 | * 获取发起流程参数 | 433 | * 获取发起流程参数 |
| 345 | * @author xcq | 434 | * |
| 346 | * @date 2024-12-31 18:46 | ||
| 347 | * @param entity | 435 | * @param entity |
| 436 | * @param rqVO | ||
| 348 | * @return com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO | 437 | * @return com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO |
| 438 | * @author xcq | ||
| 439 | * @date 2024-12-31 18:46 | ||
| 349 | */ | 440 | */ |
| 350 | private AddApprovalDTO getAddApprovalDTO(MfDemand entity) { | 441 | private AddApprovalDTO getAddApprovalDTO(MfDemand entity, DemandRQVO rqVO) { |
| 351 | AddApprovalDTO approvalDTO = new AddApprovalDTO(FLOW_TYPE, entity.getGuid()); | 442 | AddApprovalDTO approvalDTO = new AddApprovalDTO(FLOW_TYPE, entity.getGuid()); |
| 352 | // todo | 443 | // todo |
| 353 | approvalDTO.setFuncCode("SJXQ"); | 444 | approvalDTO.setFuncCode(SysFuncCode); |
| 445 | approvalDTO.setUrlParam(String.format("guid=%s&demandCategory=%s&name=%s&type=detail", entity.getGuid(), entity.getDemandCategory(), entity.getDataDemandName())); | ||
| 354 | // 流程消息中的变量替换参数 | 446 | // 流程消息中的变量替换参数 |
| 355 | approvalDTO.setFlowMessageBody(null); | 447 | approvalDTO.setFlowMessageBody(String.format("%s,%s", CommonUtil.getUserInfo().getUserName(),entity.getDataDemandName())); |
| 356 | // 流程列表数据核心param参数处理 | 448 | // 流程列表数据核心param参数处理 |
| 357 | approvalDTO.setParam1(entity.getDataDemandName()); | 449 | approvalDTO.setParam1(entity.getDataDemandName()); |
| 358 | approvalDTO.setParam2(null); | 450 | approvalDTO.setParam2(null); |
| 359 | approvalDTO.setParam3(null); | 451 | approvalDTO.setParam3(null); |
| 360 | approvalDTO.setParam4(null); | 452 | approvalDTO.setParam4(null); |
| 361 | 453 | ||
| 454 | // 增加跨服务审批字段 | ||
| 455 | rqVO.setGuid(entity.getGuid()); | ||
| 456 | approvalDTO.setBizData(JSON.toJSONString(rqVO)); | ||
| 457 | |||
| 362 | return approvalDTO; | 458 | return approvalDTO; |
| 363 | } | 459 | } |
| 364 | 460 | ||
| ... | @@ -378,6 +474,9 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -378,6 +474,9 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 378 | //endregion 2.1.业务合规性验证 | 474 | //endregion 2.1.业务合规性验证 |
| 379 | 475 | ||
| 380 | //region 2.2.业务数据验证 | 476 | //region 2.2.业务数据验证 |
| 477 | if(rqVO.getImmediateApprove() && "2".equals(rqVO.getDemandCategory())){ | ||
| 478 | checkProductGuid(rqVO.getDataProductGuid()); | ||
| 479 | } | ||
| 381 | //endregion 2.2.业务数据验证 | 480 | //endregion 2.2.业务数据验证 |
| 382 | 481 | ||
| 383 | //endregion 2.数据验证特殊处理 | 482 | //endregion 2.数据验证特殊处理 |
| ... | @@ -449,13 +548,15 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -449,13 +548,15 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 449 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); | 548 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME)); |
| 450 | } | 549 | } |
| 451 | //endregion 2.2.业务数据验证 | 550 | //endregion 2.2.业务数据验证 |
| 452 | 551 | if(rqVO.getImmediateApprove() && "2".equals(rqVO.getDemandCategory())){ | |
| 552 | checkProductGuid(rqVO.getDataProductGuid()); | ||
| 553 | } | ||
| 453 | //endregion 2.数据验证特殊处理 | 554 | //endregion 2.数据验证特殊处理 |
| 555 | rqVO.setBizApproveState(entity.getBizApproveState()); | ||
| 454 | 556 | ||
| 455 | //region 3.数据转换处理 | 557 | //region 3.数据转换处理 |
| 456 | 558 | ||
| 457 | //region 3.1.数据过程转换 | 559 | //region 3.1.数据过程转换 |
| 458 | rqVO.setBizApproveState(entity.getBizApproveState()); | ||
| 459 | //endregion 3.1.数据过程转换 | 560 | //endregion 3.1.数据过程转换 |
| 460 | 561 | ||
| 461 | //endregion 3.数据转换处理 | 562 | //endregion 3.数据转换处理 |
| ... | @@ -549,7 +650,6 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -549,7 +650,6 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 549 | 650 | ||
| 550 | private StaffRSVO getCurStaff(){ | 651 | private StaffRSVO getCurStaff(){ |
| 551 | UserInfo userInfo = UserContextHolder.get(); | 652 | UserInfo userInfo = UserContextHolder.get(); |
| 552 | userInfo.getUserId(); | ||
| 553 | StaffRSVO staffVO = personelFeign.getByUserGuid(userInfo.getUserId()).getData(); | 653 | StaffRSVO staffVO = personelFeign.getByUserGuid(userInfo.getUserId()).getData(); |
| 554 | return staffVO; | 654 | return staffVO; |
| 555 | } | 655 | } |
| ... | @@ -596,11 +696,16 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -596,11 +696,16 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 596 | vo.setProductProcessingState(voState.getProductProcessingState()); | 696 | vo.setProductProcessingState(voState.getProductProcessingState()); |
| 597 | vo.setProductDeliveryState(voState.getProductDeliveryState()); | 697 | vo.setProductDeliveryState(voState.getProductDeliveryState()); |
| 598 | vo.setProductAcceptState(voState.getProductAcceptState()); | 698 | vo.setProductAcceptState(voState.getProductAcceptState()); |
| 699 | vo.setAcceptFinishTime(DateUtil.getShortDate(voState.getAcceptFinishTime())); | ||
| 700 | vo.setFinishCycle(DateUtil.getDiffDay(voState.getAcceptFinishTime(),entity.getProcessingGenerateTime())); | ||
| 701 | vo.setBizName(voState.getBizName()); | ||
| 599 | } | 702 | } |
| 600 | } | 703 | } |
| 601 | return vo; | 704 | return vo; |
| 602 | } | 705 | } |
| 603 | 706 | ||
| 707 | |||
| 708 | |||
| 604 | /** | 709 | /** |
| 605 | * 数据需求新增、修改和其他情况的参数转换为实体 | 710 | * 数据需求新增、修改和其他情况的参数转换为实体 |
| 606 | * @author xcq | 711 | * @author xcq | ... | ... |
| 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.alibaba.fastjson.JSON; |
| 4 | import com.alibaba.fastjson.JSONObject; | ||
| 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 5 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 5 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 6 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 7 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
| 6 | import com.csbr.cloud.common.enums.SystemError; | 8 | import com.csbr.cloud.common.enums.SystemError; |
| 7 | import com.csbr.cloud.common.exception.CsbrSystemException; | 9 | import com.csbr.cloud.common.exception.CsbrSystemException; |
| 8 | import com.csbr.cloud.common.util.CommonUtil; | 10 | import com.csbr.cloud.common.util.CommonUtil; |
| 9 | import com.csbr.cloud.common.util.CsbrBeanUtil; | 11 | import com.csbr.cloud.common.util.CsbrBeanUtil; |
| 12 | import com.csbr.cloud.common.util.MessageSourceUtil; | ||
| 10 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; | 13 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; |
| 14 | import com.csbr.cloud.workflow.util.ApprovalFlowUtil; | ||
| 11 | import com.csbr.qingcloud.portal.domain.vo.ChangeApproveVO; | 15 | import com.csbr.qingcloud.portal.domain.vo.ChangeApproveVO; |
| 12 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseRQVO; | 16 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseRQVO; |
| 13 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseRSVO; | 17 | import com.csbr.qingcloud.portal.domain.vo.EnterpriseRSVO; |
| 14 | import com.csbr.qingcloud.portal.domain.vo.TenantRQVO; | ||
| 15 | import com.csbr.qingcloud.portal.feign.PersonelFeign; | 18 | import com.csbr.qingcloud.portal.feign.PersonelFeign; |
| 16 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise; | 19 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise; |
| 17 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseChangeApprove; | 20 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseChangeApprove; |
| ... | @@ -19,14 +22,21 @@ import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseChangeApproveServic | ... | @@ -19,14 +22,21 @@ import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseChangeApproveServic |
| 19 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseService; | 22 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseService; |
| 20 | import com.csbr.qingcloud.portal.service.EnterpriseChangeApproveService; | 23 | import com.csbr.qingcloud.portal.service.EnterpriseChangeApproveService; |
| 21 | import com.csbr.qingcloud.portal.service.EnterpriseService; | 24 | import com.csbr.qingcloud.portal.service.EnterpriseService; |
| 25 | import com.csbr.qingcloud.portal.util.InvokeUtil; | ||
| 26 | import com.csbr.qingcloud.portal.util.ZQConfig; | ||
| 22 | import csbr.cloud.entity.enums.ApprovalStateEnum; | 27 | import csbr.cloud.entity.enums.ApprovalStateEnum; |
| 28 | import io.seata.spring.annotation.GlobalTransactional; | ||
| 23 | import jakarta.annotation.Resource; | 29 | import jakarta.annotation.Resource; |
| 24 | import lombok.extern.slf4j.Slf4j; | 30 | import lombok.extern.slf4j.Slf4j; |
| 25 | import org.apache.commons.collections.CollectionUtils; | 31 | import org.apache.commons.collections.CollectionUtils; |
| 26 | import org.apache.commons.lang.StringUtils; | 32 | import org.apache.commons.lang.StringUtils; |
| 33 | import org.apache.commons.lang3.ObjectUtils; | ||
| 34 | import org.springframework.beans.factory.annotation.Autowired; | ||
| 27 | import org.springframework.stereotype.Component; | 35 | import org.springframework.stereotype.Component; |
| 36 | |||
| 37 | import java.util.Arrays; | ||
| 38 | import java.util.Collections; | ||
| 28 | import java.util.List; | 39 | import java.util.List; |
| 29 | import java.util.Map; | ||
| 30 | 40 | ||
| 31 | /** | 41 | /** |
| 32 | * @program: ms-hc-customer-service | 42 | * @program: ms-hc-customer-service |
| ... | @@ -38,6 +48,19 @@ import java.util.Map; | ... | @@ -38,6 +48,19 @@ import java.util.Map; |
| 38 | @Slf4j | 48 | @Slf4j |
| 39 | public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeApproveService { | 49 | public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeApproveService { |
| 40 | 50 | ||
| 51 | /** | ||
| 52 | * 功能名称 | ||
| 53 | */ | ||
| 54 | private static final String FUNCTION_NAME = "企业变更信息"; | ||
| 55 | |||
| 56 | private static final String SysFuncCode = "QYRZ"; | ||
| 57 | |||
| 58 | @Autowired | ||
| 59 | private ZQConfig zqConfig; | ||
| 60 | |||
| 61 | @Autowired | ||
| 62 | private InvokeUtil invokeUtil; | ||
| 63 | |||
| 41 | @Resource | 64 | @Resource |
| 42 | private MfEnterpriseChangeApproveService mfEnterpriseChangeApproveService; | 65 | private MfEnterpriseChangeApproveService mfEnterpriseChangeApproveService; |
| 43 | 66 | ||
| ... | @@ -51,11 +74,18 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro | ... | @@ -51,11 +74,18 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro |
| 51 | private EnterpriseService enterpriseService; | 74 | private EnterpriseService enterpriseService; |
| 52 | 75 | ||
| 53 | @Resource | 76 | @Resource |
| 77 | private MessageSourceUtil messageSourceUtil; | ||
| 78 | |||
| 79 | @Resource | ||
| 80 | private ApprovalFlowUtil approvalFlowUtil; | ||
| 81 | |||
| 82 | @Resource | ||
| 54 | private PersonelFeign personelFeign; | 83 | private PersonelFeign personelFeign; |
| 55 | 84 | ||
| 56 | /** 保存变更数据 */ | 85 | /** 保存变更数据 */ |
| 57 | @Override | 86 | @Override |
| 58 | public void changeSave(ChangeApproveVO vo) { | 87 | public void changeSave(ChangeApproveVO vo) { |
| 88 | log.info("======vo, {}", JSON.toJSONString(vo)); | ||
| 59 | //对重新发起的原审批源数据进行废弃 | 89 | //对重新发起的原审批源数据进行废弃 |
| 60 | if(StringUtils.isNotBlank(vo.getSourceApproveGuid())){ | 90 | if(StringUtils.isNotBlank(vo.getSourceApproveGuid())){ |
| 61 | LambdaUpdateWrapper<MfEnterpriseChangeApprove> updateWrapper = new LambdaUpdateWrapper<>(); | 91 | LambdaUpdateWrapper<MfEnterpriseChangeApprove> updateWrapper = new LambdaUpdateWrapper<>(); |
| ... | @@ -66,9 +96,11 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro | ... | @@ -66,9 +96,11 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro |
| 66 | 96 | ||
| 67 | //保存新数据 | 97 | //保存新数据 |
| 68 | EnterpriseRQVO beanVO = JSON.parseObject(vo.getBizDataJson(), EnterpriseRQVO.class); | 98 | EnterpriseRQVO beanVO = JSON.parseObject(vo.getBizDataJson(), EnterpriseRQVO.class); |
| 99 | String tenantGuid = beanVO.getTenantGuid(); | ||
| 69 | MfEnterpriseChangeApprove entity = csbrBeanUtil.convert(beanVO, MfEnterpriseChangeApprove.class); | 100 | MfEnterpriseChangeApprove entity = csbrBeanUtil.convert(beanVO, MfEnterpriseChangeApprove.class); |
| 70 | setEntity(entity,beanVO,vo); | 101 | setEntity(entity,beanVO,vo); |
| 71 | entity.setDataType("2"); | 102 | entity.setDataType("2"); |
| 103 | entity.setBizApproveState(ApprovalStateEnum.CHECKING.getValue()); | ||
| 72 | entity.setGuid(vo.getGuid()); | 104 | entity.setGuid(vo.getGuid()); |
| 73 | mfEnterpriseChangeApproveService.save(entity); | 105 | mfEnterpriseChangeApproveService.save(entity); |
| 74 | 106 | ||
| ... | @@ -78,8 +110,10 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro | ... | @@ -78,8 +110,10 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro |
| 78 | setEntity(entity,beanVO,vo); | 110 | setEntity(entity,beanVO,vo); |
| 79 | entity.setDataType("1"); | 111 | entity.setDataType("1"); |
| 80 | entity.setGuid(CommonUtil.newGuid()); | 112 | entity.setGuid(CommonUtil.newGuid()); |
| 113 | entity.setTenantGuid(tenantGuid); | ||
| 81 | mfEnterpriseChangeApproveService.save(entity); | 114 | mfEnterpriseChangeApproveService.save(entity); |
| 82 | 115 | ||
| 116 | log.info("========entity, {}", entity); | ||
| 83 | MfEnterprise bean = mfEnterpriseService.getById(entity.getSourceGuid()); | 117 | MfEnterprise bean = mfEnterpriseService.getById(entity.getSourceGuid()); |
| 84 | bean.setBizApproveState("B"); | 118 | bean.setBizApproveState("B"); |
| 85 | mfEnterpriseService.updateById(bean); | 119 | mfEnterpriseService.updateById(bean); |
| ... | @@ -88,6 +122,8 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro | ... | @@ -88,6 +122,8 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro |
| 88 | private void setEntity(MfEnterpriseChangeApprove entity,EnterpriseRQVO customerVO,ChangeApproveVO vo){ | 122 | private void setEntity(MfEnterpriseChangeApprove entity,EnterpriseRQVO customerVO,ChangeApproveVO vo){ |
| 89 | entity.setApproveGuid(vo.getApproveGuid()); | 123 | entity.setApproveGuid(vo.getApproveGuid()); |
| 90 | entity.setSourceGuid(vo.getSourceGuid()); | 124 | entity.setSourceGuid(vo.getSourceGuid()); |
| 125 | entity.setZqName(vo.getZqName()); | ||
| 126 | entity.setZqBizGuid(vo.getZqBizGuid()); | ||
| 91 | } | 127 | } |
| 92 | 128 | ||
| 93 | /** 变更数据详细接口 */ | 129 | /** 变更数据详细接口 */ |
| ... | @@ -124,6 +160,12 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro | ... | @@ -124,6 +160,12 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro |
| 124 | @Override | 160 | @Override |
| 125 | public void changeUpdate(BizCallbackDTO dto) { | 161 | public void changeUpdate(BizCallbackDTO dto) { |
| 126 | MfEnterpriseChangeApprove entity = mfEnterpriseChangeApproveService.getById(dto.getBizGuid()); | 162 | MfEnterpriseChangeApprove entity = mfEnterpriseChangeApproveService.getById(dto.getBizGuid()); |
| 163 | |||
| 164 | LambdaUpdateWrapper<MfEnterpriseChangeApprove> updateWrapper = new LambdaUpdateWrapper<>(); | ||
| 165 | updateWrapper.eq(MfEnterpriseChangeApprove::getApproveGuid,entity.getApproveGuid()); | ||
| 166 | updateWrapper.set(MfEnterpriseChangeApprove::getBizApproveState,dto.getApprovalState()); | ||
| 167 | mfEnterpriseChangeApproveService.update(updateWrapper); | ||
| 168 | |||
| 127 | //审批不通过则将状态恢复到以前的Y | 169 | //审批不通过则将状态恢复到以前的Y |
| 128 | if(!dto.getApprovalState().equals(ApprovalStateEnum.PASSED.getValue())){ | 170 | if(!dto.getApprovalState().equals(ApprovalStateEnum.PASSED.getValue())){ |
| 129 | MfEnterprise bean = mfEnterpriseService.getById(entity.getSourceGuid()); | 171 | MfEnterprise bean = mfEnterpriseService.getById(entity.getSourceGuid()); |
| ... | @@ -131,31 +173,120 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro | ... | @@ -131,31 +173,120 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro |
| 131 | mfEnterpriseService.updateById(bean); | 173 | mfEnterpriseService.updateById(bean); |
| 132 | return; | 174 | return; |
| 133 | } | 175 | } |
| 176 | if (!dto.getIsZqPlatformApprove()) { | ||
| 177 | //审批通过则执行更新 | ||
| 178 | MfEnterprise vo = csbrBeanUtil.convert(entity,MfEnterprise.class); | ||
| 179 | vo.setGuid(entity.getSourceGuid()); | ||
| 180 | vo.setBizApproveState("Y"); | ||
| 181 | mfEnterpriseService.updateById(vo); | ||
| 182 | |||
| 183 | //同步更新会员表 | ||
| 184 | enterpriseService.updateTenant(vo); | ||
| 185 | } | ||
| 186 | } | ||
| 187 | |||
| 188 | @Override | ||
| 189 | @GlobalTransactional(rollbackFor = Exception.class) | ||
| 190 | public void removeByGuids(List<String> guids) { | ||
| 191 | if (CollectionUtils.isEmpty(guids)) { | ||
| 192 | // W00012 = {0}:参数[{1}]不能为空! | ||
| 193 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | ||
| 194 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
| 195 | } | ||
| 196 | String crossPlatformApproveState = ""; | ||
| 197 | for (String guid : guids) { | ||
| 198 | MfEnterpriseChangeApprove entity = mfEnterpriseChangeApproveService.getById(guid); | ||
| 199 | beforeRemove(entity); | ||
| 200 | boolean flag = mfEnterpriseChangeApproveService.removeById(guid); | ||
| 201 | if (!flag) { | ||
| 202 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | ||
| 203 | } | ||
| 204 | |||
| 205 | crossPlatformApproveState = entity.getCrossPlatformApproveState(); | ||
| 206 | } | ||
| 207 | |||
| 208 | // 删除主平台数据 | ||
| 209 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(crossPlatformApproveState)) { | ||
| 210 | JSONObject jsonObject = new JSONObject(); | ||
| 211 | jsonObject.put("zqSystemCode", SysFuncCode + "BG"); | ||
| 212 | jsonObject.put("zqBizGuids", JSON.toJSONString(guids)); | ||
| 213 | jsonObject.put("isCollection", true); | ||
| 214 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getZqDelUrl()); | ||
| 215 | } | ||
| 216 | |||
| 217 | // 删除流程数据 | ||
| 218 | approvalFlowUtil.removeApproveByBizGuids(guids); | ||
| 219 | } | ||
| 220 | |||
| 221 | @Override | ||
| 222 | public void crossFlowCallBack(BizCallbackDTO dto) { | ||
| 223 | MfEnterpriseChangeApprove entity = mfEnterpriseChangeApproveService.getById(dto.getBizGuid()); | ||
| 224 | |||
| 225 | LambdaUpdateWrapper<MfEnterpriseChangeApprove> updateWrapper = new LambdaUpdateWrapper<>(); | ||
| 226 | updateWrapper.eq(MfEnterpriseChangeApprove::getApproveGuid,entity.getApproveGuid()); | ||
| 227 | updateWrapper.set(MfEnterpriseChangeApprove::getBizApproveState, dto.getApprovalState()); | ||
| 228 | updateWrapper.set(MfEnterpriseChangeApprove::getCrossPlatformApproveState, dto.getApprovalState()); | ||
| 229 | mfEnterpriseChangeApproveService.update(updateWrapper); | ||
| 230 | |||
| 231 | //审批不通过则将状态恢复到以前的Y | ||
| 232 | if(!dto.getApprovalState().equals(ApprovalStateEnum.PASSED.getValue())){ | ||
| 233 | MfEnterprise bean = mfEnterpriseService.getById(entity.getSourceGuid()); | ||
| 234 | bean.setBizApproveState("Y"); | ||
| 235 | bean.setCrossPlatformApproveState("Y"); | ||
| 236 | mfEnterpriseService.updateById(bean); | ||
| 237 | return; | ||
| 238 | } | ||
| 134 | //审批通过则执行更新 | 239 | //审批通过则执行更新 |
| 135 | EnterpriseRQVO vo = csbrBeanUtil.convert(entity,EnterpriseRQVO.class); | 240 | MfEnterprise vo = csbrBeanUtil.convert(entity,MfEnterprise.class); |
| 136 | vo.setGuid(entity.getSourceGuid()); | 241 | vo.setGuid(entity.getSourceGuid()); |
| 137 | vo.setBizApproveState("Y"); | 242 | vo.setBizApproveState("Y"); |
| 138 | 243 | vo.setCrossPlatformApproveState("Y"); | |
| 139 | LambdaUpdateWrapper<MfEnterprise> wrapper = new LambdaUpdateWrapper<>(); | 244 | mfEnterpriseService.updateById(vo); |
| 140 | wrapper.eq(MfEnterprise::getGuid, entity.getSourceGuid()); | ||
| 141 | wrapper.set(MfEnterprise::getBizApproveState, "Y"); | ||
| 142 | mfEnterpriseService.update(wrapper); | ||
| 143 | 245 | ||
| 144 | //同步更新会员表 | 246 | //同步更新会员表 |
| 145 | TenantRQVO tenantVO = csbrBeanUtil.convert(vo,TenantRQVO.class); | 247 | enterpriseService.updateTenant(vo); |
| 146 | tenantVO.setGuid(getTenantGuid(vo.getTenantName())); | ||
| 147 | tenantVO.setPersonIncharge(vo.getJuridicalPerson()); | ||
| 148 | personelFeign.updateTenant(tenantVO); | ||
| 149 | } | 248 | } |
| 150 | 249 | ||
| 151 | private String getTenantGuid(String name){ | 250 | @Override |
| 152 | Map<String,String> map = personelFeign.getAllTenantGuidNameMap().getData(); | 251 | @GlobalTransactional |
| 153 | for(String guid : map.keySet()){ | 252 | public void crossRemoveByBizGuid(List<String> zqBizGuids) { |
| 154 | if(map.get(guid).equals(name)){ | 253 | if (ObjectUtils.isEmpty(zqBizGuids)) { |
| 155 | return guid; | 254 | // W00012 = {0}:参数[{1}]不能为空! |
| 156 | } | 255 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", |
| 256 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | ||
| 257 | } | ||
| 258 | String zqBizGuid = zqBizGuids.get(0); | ||
| 259 | LambdaQueryWrapper<MfEnterpriseChangeApprove> queryWrapper = Wrappers.lambdaQuery(MfEnterpriseChangeApprove.class); | ||
| 260 | queryWrapper.eq(MfEnterpriseChangeApprove::getZqBizGuid, zqBizGuid); | ||
| 261 | queryWrapper.eq(MfEnterpriseChangeApprove::getDataType, 2).last(" limit 1 "); | ||
| 262 | MfEnterpriseChangeApprove enterpriseChangeApprove = mfEnterpriseChangeApproveService.getOne(queryWrapper); | ||
| 263 | if (ObjectUtils.isEmpty(enterpriseChangeApprove)) { | ||
| 264 | return; | ||
| 265 | } | ||
| 266 | |||
| 267 | LambdaUpdateWrapper<MfEnterpriseChangeApprove> removeWraaper = Wrappers.lambdaUpdate(MfEnterpriseChangeApprove.class); | ||
| 268 | removeWraaper.eq(MfEnterpriseChangeApprove::getZqBizGuid, zqBizGuid); | ||
| 269 | mfEnterpriseChangeApproveService.remove(removeWraaper); | ||
| 270 | |||
| 271 | // 删除流程数据 | ||
| 272 | approvalFlowUtil.removeApproveByBizGuids(Collections.singletonList(enterpriseChangeApprove.getGuid())); | ||
| 273 | } | ||
| 274 | |||
| 275 | /** | ||
| 276 | * 企业信息删除前置处理 | ||
| 277 | * @author xcq | ||
| 278 | * @date 2024-12-26 16:18 | ||
| 279 | * @param entity | ||
| 280 | * @return void | ||
| 281 | */ | ||
| 282 | private void beforeRemove(MfEnterpriseChangeApprove entity) { | ||
| 283 | if (entity == null) { | ||
| 284 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | ||
| 285 | } | ||
| 286 | if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) || | ||
| 287 | ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) { | ||
| 288 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, "审批中和审批通过的数据不能删除!"); | ||
| 157 | } | 289 | } |
| 158 | return null; | ||
| 159 | } | 290 | } |
| 160 | 291 | ||
| 161 | /** 转换数据 */ | 292 | /** 转换数据 */ | ... | ... |
| 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.alibaba.fastjson.JSON; |
| 4 | import com.alibaba.fastjson.JSONArray; | ||
| 5 | import com.alibaba.fastjson.JSONObject; | ||
| 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 6 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 5 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 7 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 8 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
| 6 | import com.csbr.cloud.common.enums.SystemError; | 9 | import com.csbr.cloud.common.enums.SystemError; |
| 7 | import com.csbr.cloud.common.enums.UserError; | ||
| 8 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; | 10 | import com.csbr.cloud.common.enums.WorkFlowBizEnum; |
| 9 | import com.csbr.cloud.common.exception.CsbrSystemException; | 11 | import com.csbr.cloud.common.exception.CsbrSystemException; |
| 10 | import com.csbr.cloud.common.exception.CsbrUserException; | ||
| 11 | import com.csbr.cloud.common.util.CommonUtil; | 12 | import com.csbr.cloud.common.util.CommonUtil; |
| 12 | import com.csbr.cloud.common.util.CsbrBeanUtil; | 13 | import com.csbr.cloud.common.util.CsbrBeanUtil; |
| 13 | import com.csbr.cloud.common.util.MessageSourceUtil; | 14 | import com.csbr.cloud.common.util.MessageSourceUtil; |
| 14 | import com.csbr.cloud.mq.service.KafkaStdService; | 15 | import com.csbr.cloud.distributelock.util.RedisUtil; |
| 15 | import com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO; | 16 | import com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO; |
| 16 | import com.csbr.cloud.workflow.domain.dto.appove.FlowUpdateStateDTO; | 17 | import com.csbr.cloud.workflow.domain.dto.appove.FlowQueryDTO; |
| 17 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; | 18 | import com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO; |
| 19 | import com.csbr.cloud.workflow.domain.vo.appove.ApproveVO; | ||
| 18 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; | 20 | import com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO; |
| 19 | import com.csbr.qingcloud.portal.feign.WorkflowFeign; | ||
| 20 | import com.csbr.cloud.workflow.util.ApprovalFlowUtil; | 21 | import com.csbr.cloud.workflow.util.ApprovalFlowUtil; |
| 21 | import com.csbr.cloud.workflow.util.FlowAbstractImpl; | 22 | import com.csbr.cloud.workflow.util.FlowAbstractImpl; |
| 22 | import com.csbr.qingcloud.portal.domain.vo.*; | 23 | import com.csbr.qingcloud.portal.domain.vo.*; |
| 24 | import com.csbr.qingcloud.portal.feign.ConfigureFeign; | ||
| 23 | import com.csbr.qingcloud.portal.feign.PersonelFeign; | 25 | import com.csbr.qingcloud.portal.feign.PersonelFeign; |
| 24 | import com.csbr.qingcloud.portal.feign.UserFeign; | 26 | import com.csbr.qingcloud.portal.feign.WorkflowFeign; |
| 25 | import com.csbr.qingcloud.portal.mybatis.entity.MfDemand; | 27 | import com.csbr.qingcloud.portal.mybatis.entity.MfDemand; |
| 26 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise; | 28 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise; |
| 27 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseChangeApprove; | 29 | import com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseChangeApprove; |
| ... | @@ -29,30 +31,25 @@ import com.csbr.qingcloud.portal.mybatis.service.MfDemandService; | ... | @@ -29,30 +31,25 @@ import com.csbr.qingcloud.portal.mybatis.service.MfDemandService; |
| 29 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseChangeApproveService; | 31 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseChangeApproveService; |
| 30 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseService; | 32 | import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseService; |
| 31 | import com.csbr.qingcloud.portal.service.EnterpriseService; | 33 | import com.csbr.qingcloud.portal.service.EnterpriseService; |
| 32 | import com.csbr.qingcloud.portal.util.ObjectUtil; | 34 | import com.csbr.qingcloud.portal.util.ChangeInfoUtil; |
| 35 | import com.csbr.qingcloud.portal.util.DateUtil; | ||
| 36 | import com.csbr.qingcloud.portal.util.InvokeUtil; | ||
| 37 | import com.csbr.qingcloud.portal.util.ZQConfig; | ||
| 33 | import csbr.cloud.entity.domain.base.vo.PageListVO; | 38 | import csbr.cloud.entity.domain.base.vo.PageListVO; |
| 34 | import csbr.cloud.entity.enums.ApprovalStateEnum; | 39 | import csbr.cloud.entity.enums.ApprovalStateEnum; |
| 35 | import io.seata.common.util.DateUtil; | ||
| 36 | import io.seata.spring.annotation.GlobalTransactional; | 40 | import io.seata.spring.annotation.GlobalTransactional; |
| 37 | import jakarta.annotation.Resource; | 41 | import jakarta.annotation.Resource; |
| 38 | import lombok.extern.slf4j.Slf4j; | 42 | import lombok.extern.slf4j.Slf4j; |
| 39 | import org.apache.commons.collections.CollectionUtils; | 43 | import org.apache.commons.collections.CollectionUtils; |
| 44 | import org.apache.commons.lang3.ObjectUtils; | ||
| 40 | import org.apache.commons.lang3.StringUtils; | 45 | import org.apache.commons.lang3.StringUtils; |
| 41 | import org.apache.kafka.clients.consumer.ConsumerRecord; | ||
| 42 | import org.springframework.beans.factory.annotation.Autowired; | 46 | import org.springframework.beans.factory.annotation.Autowired; |
| 43 | import org.springframework.kafka.annotation.KafkaListener; | ||
| 44 | import org.springframework.kafka.support.Acknowledgment; | ||
| 45 | import org.springframework.stereotype.Service; | 47 | import org.springframework.stereotype.Service; |
| 46 | import org.springframework.transaction.annotation.Transactional; | 48 | import org.springframework.transaction.annotation.Transactional; |
| 47 | import org.springframework.util.LinkedMultiValueMap; | ||
| 48 | import org.springframework.util.MultiValueMap; | ||
| 49 | import org.springframework.web.context.request.RequestContextHolder; | ||
| 50 | import org.springframework.web.context.request.ServletRequestAttributes; | ||
| 51 | 49 | ||
| 52 | import java.util.ArrayList; | 50 | import java.util.*; |
| 53 | import java.util.Date; | 51 | import java.util.function.Function; |
| 54 | import java.util.Enumeration; | 52 | import java.util.stream.Collectors; |
| 55 | import java.util.List; | ||
| 56 | 53 | ||
| 57 | /** | 54 | /** |
| 58 | * @program: D:/git/ms-data-circulation-portal-service | 55 | * @program: D:/git/ms-data-circulation-portal-service |
| ... | @@ -68,6 +65,14 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -68,6 +65,14 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 68 | * 功能名称 | 65 | * 功能名称 |
| 69 | */ | 66 | */ |
| 70 | private static final String FUNCTION_NAME = "企业信息"; | 67 | private static final String FUNCTION_NAME = "企业信息"; |
| 68 | |||
| 69 | private static final String SysFuncCode = "QYRZ"; | ||
| 70 | |||
| 71 | @Autowired | ||
| 72 | private ZQConfig zqConfig; | ||
| 73 | |||
| 74 | @Autowired | ||
| 75 | private InvokeUtil invokeUtil; | ||
| 71 | 76 | ||
| 72 | @Resource | 77 | @Resource |
| 73 | private MfEnterpriseService mfEnterpriseService; | 78 | private MfEnterpriseService mfEnterpriseService; |
| ... | @@ -85,19 +90,19 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -85,19 +90,19 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 85 | private PersonelFeign personelFeign; | 90 | private PersonelFeign personelFeign; |
| 86 | 91 | ||
| 87 | @Resource | 92 | @Resource |
| 88 | private MfEnterpriseChangeApproveService mfEnterpriseChangeApproveService; | 93 | private WorkflowFeign workflowFeign; |
| 89 | 94 | ||
| 90 | @Resource | 95 | @Resource |
| 91 | private MfDemandService mfDemandService; | 96 | private RedisUtil redisUtil; |
| 92 | 97 | ||
| 93 | @Resource | 98 | @Resource |
| 94 | private UserFeign userFeign; | 99 | private MfEnterpriseChangeApproveService mfEnterpriseChangeApproveService; |
| 95 | 100 | ||
| 96 | @Resource | 101 | @Resource |
| 97 | private WorkflowFeign workflowFeign; | 102 | private MfDemandService mfDemandService; |
| 98 | 103 | ||
| 99 | @Autowired(required = false) | 104 | @Resource |
| 100 | private KafkaStdService kafkaStdService; | 105 | private ConfigureFeign configureFeign; |
| 101 | 106 | ||
| 102 | /** | 107 | /** |
| 103 | * 企业信息分页查询 | 108 | * 企业信息分页查询 |
| ... | @@ -122,6 +127,54 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -122,6 +127,54 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 122 | return new PageListVO<>(0L,0L); | 127 | return new PageListVO<>(0L,0L); |
| 123 | } | 128 | } |
| 124 | 129 | ||
| 130 | @Override | ||
| 131 | public PageListVO<EnterpriseApproveRSVO> flowPageList(FlowQueryDTO dto) { | ||
| 132 | // 调用流程获取流程数据 | ||
| 133 | PageListVO<ApproveVO> pageListVO = workflowFeign.getFlowListCrossTenant(dto).getData(); | ||
| 134 | PageListVO<EnterpriseApproveRSVO> rsPageList = csbrBeanUtil.convert(pageListVO, PageListVO.class); | ||
| 135 | List<ApproveVO> approveVOList = pageListVO.getRecords(); | ||
| 136 | if (ObjectUtils.isNotEmpty(approveVOList)) { | ||
| 137 | // 根据业务guid查询认证表数据 | ||
| 138 | List<String> guids = approveVOList.stream().map(ApproveVO::getBizGuid).toList(); | ||
| 139 | List<MfEnterprise> mfEnterprises = mfEnterpriseService.listByIds(guids); | ||
| 140 | Map<String, MfEnterprise> mfEnterpriseMap = new HashMap<>(); | ||
| 141 | if (ObjectUtils.isNotEmpty(mfEnterprises)) { | ||
| 142 | mfEnterpriseMap = mfEnterprises.stream().collect(Collectors.toMap(MfEnterprise::getGuid, Function.identity())); | ||
| 143 | } | ||
| 144 | |||
| 145 | // 根据业务guid查询认证变更表数据 | ||
| 146 | List<MfEnterpriseChangeApprove> mfEnterpriseChangeApproves = mfEnterpriseChangeApproveService.listByIds(guids); | ||
| 147 | Map<String, MfEnterpriseChangeApprove> mfEnterpriseChangeApproveMap = new HashMap<>(); | ||
| 148 | if (ObjectUtils.isNotEmpty(mfEnterpriseChangeApproves)) { | ||
| 149 | mfEnterpriseChangeApproveMap = mfEnterpriseChangeApproves.stream().collect(Collectors.toMap(MfEnterpriseChangeApprove::getGuid, Function.identity())); | ||
| 150 | } | ||
| 151 | |||
| 152 | // 数据转换 | ||
| 153 | List<EnterpriseApproveRSVO> results = new ArrayList<>(); | ||
| 154 | for (ApproveVO approveVO : approveVOList) { | ||
| 155 | // 补跨服务审批状态数据 | ||
| 156 | EnterpriseApproveRSVO enterpriseApproveRSVO = csbrBeanUtil.convert(approveVO, EnterpriseApproveRSVO.class); | ||
| 157 | if (ObjectUtils.isNotEmpty(mfEnterpriseMap) && mfEnterpriseMap.containsKey(enterpriseApproveRSVO.getBizGuid())) { | ||
| 158 | MfEnterprise mfEnterprise = mfEnterpriseMap.get(enterpriseApproveRSVO.getBizGuid()); | ||
| 159 | enterpriseApproveRSVO.setCrossPlatformApproveState(mfEnterprise.getCrossPlatformApproveState()); | ||
| 160 | enterpriseApproveRSVO.setZqName(mfEnterprise.getZqName()); | ||
| 161 | enterpriseApproveRSVO.setTenantName(mfEnterprise.getTenantName()); | ||
| 162 | } | ||
| 163 | if (ObjectUtils.isNotEmpty(mfEnterpriseChangeApproveMap) && mfEnterpriseChangeApproveMap.containsKey(enterpriseApproveRSVO.getBizGuid())) { | ||
| 164 | MfEnterpriseChangeApprove mfEnterpriseChangeApprove = mfEnterpriseChangeApproveMap.get(enterpriseApproveRSVO.getBizGuid()); | ||
| 165 | enterpriseApproveRSVO.setCrossPlatformApproveState(mfEnterpriseChangeApprove.getCrossPlatformApproveState()); | ||
| 166 | enterpriseApproveRSVO.setZqName(mfEnterpriseChangeApprove.getZqName()); | ||
| 167 | enterpriseApproveRSVO.setTenantName(mfEnterpriseChangeApprove.getTenantName()); | ||
| 168 | } | ||
| 169 | results.add(enterpriseApproveRSVO); | ||
| 170 | } | ||
| 171 | |||
| 172 | rsPageList.setRecords(results); | ||
| 173 | } | ||
| 174 | |||
| 175 | return rsPageList; | ||
| 176 | } | ||
| 177 | |||
| 125 | /** | 178 | /** |
| 126 | * 企业信息获取详情数据 | 179 | * 企业信息获取详情数据 |
| 127 | * @author xcq | 180 | * @author xcq |
| ... | @@ -142,23 +195,29 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -142,23 +195,29 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 142 | } | 195 | } |
| 143 | EnterpriseRSVO vo = convertToVO(entity); | 196 | EnterpriseRSVO vo = convertToVO(entity); |
| 144 | //生成变更信息 | 197 | //生成变更信息 |
| 145 | vo.setChangeList(getChange(entity.getTenantName())); | 198 | vo.setChangeList(getChange(guid, entity.getCreateTime())); |
| 146 | return vo; | 199 | return vo; |
| 147 | } | 200 | } |
| 148 | 201 | ||
| 149 | /** 生成变更信息列表 */ | 202 | /** 生成变更信息列表 */ |
| 150 | @Override | 203 | @Override |
| 151 | public List<ChangeInfoVO> getChange(String tenantName){ | 204 | public List<ChangeInfoVO> getChange(String sourceGuid, Date createTime){ |
| 152 | LambdaQueryWrapper<MfEnterpriseChangeApprove> queryWrapper = new LambdaQueryWrapper<>(); | 205 | LambdaQueryWrapper<MfEnterpriseChangeApprove> queryWrapper = new LambdaQueryWrapper<>(); |
| 153 | queryWrapper.eq(MfEnterpriseChangeApprove::getTenantName,tenantName); | 206 | queryWrapper.eq(MfEnterpriseChangeApprove::getSourceGuid, sourceGuid); |
| 207 | queryWrapper.eq(MfEnterpriseChangeApprove::getBizApproveState, ApprovalStateEnum.PASSED.getValue()); | ||
| 208 | queryWrapper.le(MfEnterpriseChangeApprove::getCreateTime, createTime); | ||
| 154 | queryWrapper.orderByDesc(MfEnterpriseChangeApprove::getCreateTime); | 209 | queryWrapper.orderByDesc(MfEnterpriseChangeApprove::getCreateTime); |
| 210 | queryWrapper.last(" limit 2 "); | ||
| 155 | List<MfEnterpriseChangeApprove> approveList = mfEnterpriseChangeApproveService.list(queryWrapper); | 211 | List<MfEnterpriseChangeApprove> approveList = mfEnterpriseChangeApproveService.list(queryWrapper); |
| 156 | if(CollectionUtils.isEmpty(approveList)){ | 212 | if(CollectionUtils.isEmpty(approveList)){ |
| 157 | return new ArrayList<>(); | 213 | return new ArrayList<>(); |
| 158 | } | 214 | } |
| 159 | List<ChangeApproveBean> beanList = getChangeBeanList(approveList); | 215 | List<ChangeApproveBean> beanList = getChangeBeanList(approveList); |
| 160 | try { | 216 | try { |
| 161 | return getChangeList(beanList); | 217 | if(CollectionUtils.isEmpty(ChangeInfoUtil.areaList)){ |
| 218 | ChangeInfoUtil.areaList = configureFeign.getBoroughCodeName().getData(); | ||
| 219 | } | ||
| 220 | return ChangeInfoUtil.getChangeList(beanList); | ||
| 162 | } catch (IllegalAccessException e) { | 221 | } catch (IllegalAccessException e) { |
| 163 | e.printStackTrace(); | 222 | e.printStackTrace(); |
| 164 | } | 223 | } |
| ... | @@ -176,32 +235,6 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -176,32 +235,6 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 176 | return convertToVO(list.get(0)); | 235 | return convertToVO(list.get(0)); |
| 177 | } | 236 | } |
| 178 | 237 | ||
| 179 | public static void test(){ | ||
| 180 | List<ChangeApproveBean> beanList = new ArrayList<>(); | ||
| 181 | ChangeApproveBean bean = new ChangeApproveBean(); | ||
| 182 | |||
| 183 | MfEnterprise oldBean = new MfEnterprise(); | ||
| 184 | oldBean.setBankTaxNo("999"); | ||
| 185 | oldBean.setTenantName("武汉小米"); | ||
| 186 | oldBean.setCreateTime(new Date()); | ||
| 187 | |||
| 188 | MfEnterprise newBean = new MfEnterprise(); | ||
| 189 | newBean.setBankTaxNo("666"); | ||
| 190 | newBean.setTenantName("武汉大米"); | ||
| 191 | newBean.setCreateTime(new Date()); | ||
| 192 | |||
| 193 | bean.oldBean = oldBean; | ||
| 194 | bean.newBean = newBean; | ||
| 195 | beanList.add(bean); | ||
| 196 | List<ChangeInfoVO> list = new ArrayList<>(); | ||
| 197 | try { | ||
| 198 | list = getChangeList(beanList); | ||
| 199 | } catch (IllegalAccessException e) { | ||
| 200 | e.printStackTrace(); | ||
| 201 | } | ||
| 202 | log.info("变更内容:{}", JSON.toJSONString(list)); | ||
| 203 | } | ||
| 204 | |||
| 205 | /** 准备变更对比实体 */ | 238 | /** 准备变更对比实体 */ |
| 206 | private List<ChangeApproveBean> getChangeBeanList(List<MfEnterpriseChangeApprove> list){ | 239 | private List<ChangeApproveBean> getChangeBeanList(List<MfEnterpriseChangeApprove> list){ |
| 207 | List<ChangeApproveBean> beanList = new ArrayList<>(); | 240 | List<ChangeApproveBean> beanList = new ArrayList<>(); |
| ... | @@ -224,79 +257,6 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -224,79 +257,6 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 224 | public MfEnterprise newBean; | 257 | public MfEnterprise newBean; |
| 225 | } | 258 | } |
| 226 | 259 | ||
| 227 | /** 计算变更信息 */ | ||
| 228 | public static List<ChangeInfoVO> getChangeList(List<ChangeApproveBean> beanList) throws IllegalAccessException { | ||
| 229 | List<ChangeInfoVO> list = new ArrayList<>(); | ||
| 230 | //循环对比每组记录生来变更内容 | ||
| 231 | for(ChangeApproveBean item : beanList){ | ||
| 232 | List<CompareResult> diffList = ObjectUtil.getBeanDiff(item.oldBean,item.newBean); | ||
| 233 | getVenueResult(item,diffList); | ||
| 234 | getStartEndResult(item,diffList); | ||
| 235 | for(CompareResult diffItem : diffList){ | ||
| 236 | if(diffItem.getFieldComment().contains("审批状态") || diffItem.getFieldComment().contains("营业执照") | ||
| 237 | || diffItem.getFieldComment().contains("法人证件照") || diffItem.getFieldComment().contains("管理员证件照") | ||
| 238 | || diffItem.getFieldComment().contains("授权委托书") || diffItem.getFieldComment().contains("省") | ||
| 239 | || diffItem.getFieldComment().contains("市") || diffItem.getFieldComment().contains("区") | ||
| 240 | || diffItem.getFieldComment().contains("营业开始日期") || diffItem.getFieldComment().contains("营业结束日期")){ | ||
| 241 | continue; | ||
| 242 | } | ||
| 243 | ChangeInfoVO vo = new ChangeInfoVO(); | ||
| 244 | vo.setNameEn(diffItem.getFieldName()); | ||
| 245 | vo.setName(diffItem.getFieldComment()); | ||
| 246 | vo.setDate(DateUtil.formatDate(item.oldBean.getCreateTime(),"yyyy-MM-dd HH:mm:ss")); | ||
| 247 | vo.setBefore(diffItem.getOldValue().toString()); | ||
| 248 | vo.setAfter(diffItem.getNewValue().toString()); | ||
| 249 | vo.setGuid(CommonUtil.newGuid()); | ||
| 250 | list.add(vo); | ||
| 251 | } | ||
| 252 | } | ||
| 253 | return list; | ||
| 254 | } | ||
| 255 | |||
| 256 | private static void getVenueResult(ChangeApproveBean item, List<CompareResult> diffList) { | ||
| 257 | String oldVenue = getVenue(item.oldBean.getProvince(),item.oldBean.getCity(),item.oldBean.getDistrict()); | ||
| 258 | String newVenue = getVenue(item.newBean.getProvince(),item.newBean.getCity(),item.newBean.getDistrict()); | ||
| 259 | if(!oldVenue.equals(newVenue)){ | ||
| 260 | CompareResult result = new CompareResult(); | ||
| 261 | result.setFieldComment("注册地"); | ||
| 262 | result.setFieldName("venue"); | ||
| 263 | result.setOldValue(oldVenue); | ||
| 264 | result.setNewValue(newVenue); | ||
| 265 | diffList.add(result); | ||
| 266 | } | ||
| 267 | } | ||
| 268 | |||
| 269 | private static void getStartEndResult(ChangeApproveBean item, List<CompareResult> diffList) { | ||
| 270 | String oldValue = getStartEnd(item.oldBean.getBusinessLicenseTerm(),item.oldBean.getBusinessLicenseStartDate(),item.oldBean.getBusinessLicenseEndDate()); | ||
| 271 | String newValue = getStartEnd(item.newBean.getBusinessLicenseTerm(),item.newBean.getBusinessLicenseStartDate(),item.newBean.getBusinessLicenseEndDate()); | ||
| 272 | if(!oldValue.equals(newValue)){ | ||
| 273 | CompareResult result = new CompareResult(); | ||
| 274 | result.setFieldComment("营业日期范围"); | ||
| 275 | result.setFieldName("businessLicenseStartEnd"); | ||
| 276 | result.setOldValue(oldValue); | ||
| 277 | result.setNewValue(newValue); | ||
| 278 | diffList.add(result); | ||
| 279 | } | ||
| 280 | } | ||
| 281 | |||
| 282 | private static String getVenue(String province, String city, String district) { | ||
| 283 | if(StringUtils.isBlank(district)){ | ||
| 284 | return String.format("%s/%s",province,city); | ||
| 285 | } | ||
| 286 | else{ | ||
| 287 | return String.format("%s/%s/%s",province,city,district); | ||
| 288 | } | ||
| 289 | } | ||
| 290 | |||
| 291 | |||
| 292 | private static String getStartEnd(String businessLicenseTerm,Date businessLicenseStartDate, Date businessLicenseEndDate) { | ||
| 293 | if("1".equals(businessLicenseTerm)){ | ||
| 294 | return "长期有效"; | ||
| 295 | } | ||
| 296 | return String.format("%s至%s",businessLicenseStartDate,businessLicenseEndDate); | ||
| 297 | } | ||
| 298 | |||
| 299 | |||
| 300 | /** | 260 | /** |
| 301 | * 企业信息数据新增 | 261 | * 企业信息数据新增 |
| 302 | * @author xcq | 262 | * @author xcq |
| ... | @@ -312,7 +272,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -312,7 +272,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 312 | beforeSave(rqVO); | 272 | beforeSave(rqVO); |
| 313 | MfEnterprise entity = convertToEntity(rqVO); | 273 | MfEnterprise entity = convertToEntity(rqVO); |
| 314 | // 发起审批流程或保存草稿 | 274 | // 发起审批流程或保存草稿 |
| 315 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 275 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity, rqVO); |
| 316 | super.startWorkFlow(rqVO, approvalDTO, entity::setBizApproveState); | 276 | super.startWorkFlow(rqVO, approvalDTO, entity::setBizApproveState); |
| 317 | // 业务数据保存 | 277 | // 业务数据保存 |
| 318 | boolean flag = mfEnterpriseService.save(entity); | 278 | boolean flag = mfEnterpriseService.save(entity); |
| ... | @@ -339,7 +299,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -339,7 +299,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 339 | beforeUpdate(rqVO); | 299 | beforeUpdate(rqVO); |
| 340 | MfEnterprise entity = convertToEntity(rqVO); | 300 | MfEnterprise entity = convertToEntity(rqVO); |
| 341 | // 发起审批流程或保存草稿 | 301 | // 发起审批流程或保存草稿 |
| 342 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 302 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity, rqVO); |
| 343 | super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState); | 303 | super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState); |
| 344 | if (rqVO.getIsRestart()) { | 304 | if (rqVO.getIsRestart()) { |
| 345 | // 重新提交 | 305 | // 重新提交 |
| ... | @@ -365,9 +325,9 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -365,9 +325,9 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 365 | * @return void | 325 | * @return void |
| 366 | */ | 326 | */ |
| 367 | private void againSubmitFlow(MfEnterprise entity, EnterpriseRQVO rqVO, AddApprovalDTO approvalDTO) { | 327 | private void againSubmitFlow(MfEnterprise entity, EnterpriseRQVO rqVO, AddApprovalDTO approvalDTO) { |
| 368 | // 重新提交的数据重置相关字段 | ||
| 369 | entity.setGuid(CommonUtil.newGuid()); | 328 | entity.setGuid(CommonUtil.newGuid()); |
| 370 | mfEnterpriseService.csbrBaseEntity(entity); | 329 | mfEnterpriseService.csbrBaseEntity(entity); |
| 330 | entity.setBizApproveState("A"); | ||
| 371 | // 保存新数据 | 331 | // 保存新数据 |
| 372 | boolean flag = mfEnterpriseService.save(entity); | 332 | boolean flag = mfEnterpriseService.save(entity); |
| 373 | if (!flag) { | 333 | if (!flag) { |
| ... | @@ -375,6 +335,8 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -375,6 +335,8 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 375 | } | 335 | } |
| 376 | // 发起新的流程 | 336 | // 发起新的流程 |
| 377 | approvalDTO.setBizGuid(entity.getGuid()); | 337 | approvalDTO.setBizGuid(entity.getGuid()); |
| 338 | approvalDTO.setUrlParam(String.format("guid=%s&name=%s&tName=%s&fType=%s&bizGuid=%s&type=detail",entity.getGuid(), entity.getTenantName(), | ||
| 339 | entity.getTenantName(),WorkFlowBizEnum.ENTERPRISE_APPLY.getValue(),entity.getGuid())); | ||
| 378 | approvalFlowUtil.addApproval(approvalDTO); | 340 | approvalFlowUtil.addApproval(approvalDTO); |
| 379 | afterSave(entity, rqVO); | 341 | afterSave(entity, rqVO); |
| 380 | } | 342 | } |
| ... | @@ -394,6 +356,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -394,6 +356,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 394 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", | 356 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012", |
| 395 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); | 357 | String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识")); |
| 396 | } | 358 | } |
| 359 | String crossPlatformApproveState = ""; | ||
| 397 | for (String guid : guids) { | 360 | for (String guid : guids) { |
| 398 | MfEnterprise entity = mfEnterpriseService.getById(guid); | 361 | MfEnterprise entity = mfEnterpriseService.getById(guid); |
| 399 | beforeRemove(entity); | 362 | beforeRemove(entity); |
| ... | @@ -402,53 +365,20 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -402,53 +365,20 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 402 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); | 365 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.delMessage(FUNCTION_NAME)); |
| 403 | } | 366 | } |
| 404 | afterRemove(entity); | 367 | afterRemove(entity); |
| 368 | crossPlatformApproveState = entity.getCrossPlatformApproveState(); | ||
| 405 | } | 369 | } |
| 406 | // 删除流程数据 | ||
| 407 | approvalFlowUtil.removeApproveByBizGuids(guids); | ||
| 408 | } | ||
| 409 | |||
| 410 | /** ***企业认证*** */ | ||
| 411 | @GlobalTransactional | ||
| 412 | @Override | ||
| 413 | public Boolean lastApprove(FlowUpdateStateDTO dto) { | ||
| 414 | //如果是非认证会员认证审批通过了 则需要走kafka生成新会员 | ||
| 415 | dto.setBackEndInvoke(true); | ||
| 416 | KafkaApproveDTO approveDTO = new KafkaApproveDTO(); | ||
| 417 | approveDTO.setHeader(getHeader()); | ||
| 418 | approveDTO.setUpdateStateDTO(dto); | ||
| 419 | kafkaStdService.stdSendMsgWithPrefix("tenant.enterprise", JSON.toJSONString(approveDTO)); | ||
| 420 | return true; | ||
| 421 | } | ||
| 422 | 370 | ||
| 423 | private MultiValueMap<String, String> getHeader(){ | 371 | // 删除主平台数据 |
| 424 | ServletRequestAttributes servletRequestAttributes = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()); | 372 | if (!zqConfig.getIsMain() && StringUtils.isNotEmpty(crossPlatformApproveState)) { |
| 425 | Enumeration<String> headerNames = servletRequestAttributes.getRequest().getHeaderNames(); | 373 | JSONObject jsonObject = new JSONObject(); |
| 426 | MultiValueMap<String, String> headers = new LinkedMultiValueMap<>(); | 374 | jsonObject.put("zqSystemCode", SysFuncCode); |
| 427 | List<String> names = List.of("AUTHORIZATION", "X-USERINFO", "TENANT", "TOKEN"); | 375 | jsonObject.put("zqBizGuids", JSON.toJSONString(guids)); |
| 428 | while (null != headerNames && headerNames.hasMoreElements()) { | 376 | jsonObject.put("isCollection", true); |
| 429 | String name = headerNames.nextElement(); | 377 | invokeUtil.invokeMainDel(jsonObject, zqConfig.getAppKey(), zqConfig.getZqDelUrl()); |
| 430 | String value = servletRequestAttributes.getRequest().getHeader(name); | ||
| 431 | if (names.contains(name.toUpperCase())) { | ||
| 432 | headers.put(name, List.of(value)); | ||
| 433 | } | ||
| 434 | } | 378 | } |
| 435 | return headers; | ||
| 436 | } | ||
| 437 | 379 | ||
| 438 | @KafkaListener(containerFactory = "kafkaListenerContainerFactory", groupId = "scm.notify", topics = "${csbr.kafka.topic-prefix:}_"+"tenant.enterprise", | 380 | // 删除流程数据 |
| 439 | errorHandler = "consumerAwareErrorHandler") | 381 | approvalFlowUtil.removeApproveByBizGuids(guids); |
| 440 | public void addUserListener(List<ConsumerRecord<String, String>> records, Acknowledgment ack) { | ||
| 441 | ack.acknowledge(); | ||
| 442 | for (ConsumerRecord<String, String> record : records) { | ||
| 443 | try { | ||
| 444 | KafkaApproveDTO approveDTO = JSON.parseObject(record.value(),KafkaApproveDTO.class); | ||
| 445 | workflowFeign.allowFlowCore(approveDTO.getUpdateStateDTO(),approveDTO.getHeader()).getData(); | ||
| 446 | } catch (Exception e) { | ||
| 447 | log.error("企业认证出现异常: " + e.getMessage() + ";\nRecord Info: " + record.toString()); | ||
| 448 | e.printStackTrace(); | ||
| 449 | return; | ||
| 450 | } | ||
| 451 | } | ||
| 452 | } | 382 | } |
| 453 | 383 | ||
| 454 | /** | 384 | /** |
| ... | @@ -473,23 +403,98 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -473,23 +403,98 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 473 | if (!flag) { | 403 | if (!flag) { |
| 474 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); | 404 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); |
| 475 | } | 405 | } |
| 476 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { | 406 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState()) && !dto.getIsZqPlatformApprove() && StringUtils.isEmpty(entity.getZqName())) { |
| 477 | //删除原帐号并新增正式会员 | 407 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(entity.getTenantGuid()); |
| 478 | TenantRQVO vo = csbrBeanUtil.convert(entity,TenantRQVO.class); | 408 | if("非认证会员".equals(tenantName)){ |
| 479 | vo.setTenantType(null); | 409 | //删除原帐号并新增正式会员 |
| 480 | vo.setGuid(CommonUtil.newGuid()); | 410 | TenantRQVO vo = csbrBeanUtil.convert(entity,TenantRQVO.class); |
| 481 | vo.setPersonIncharge(entity.getJuridicalPerson()); | 411 | //新增会员时guid必须保证为空 |
| 482 | vo.setBizState("Y"); | 412 | vo.setGuid(null); |
| 483 | try{ | 413 | vo.setTenantType(null); |
| 484 | vo = personelFeign.authTenant(vo).getData(); | 414 | vo.setContactTel(entity.getContactTel()); |
| 485 | }catch (Exception e){ | 415 | vo.setBizGuid(dto.getBizGuid()); |
| 486 | if(!e.getMessage().contains("Read timed out")){ | 416 | vo.setPersonIncharge(entity.getJuridicalPerson()); |
| 487 | throw e; | 417 | vo.setBizState("Y"); |
| 488 | } | 418 | vo.setRegistrationDate(DateUtil.getDateToLocal(entity.getRegistrationDate())); |
| 419 | vo.setTenantLicList(getTenantLicList(entity.getBusinessLicenseJson())); | ||
| 420 | vo.setCompanyAddress(String.format("%s/%s/%s",entity.getProvince(),entity.getCity(),entity.getDistrict())); | ||
| 421 | vo.setProvince(null); | ||
| 422 | vo.setCity(null); | ||
| 423 | vo.setDistrict(null); | ||
| 424 | personelFeign.authTenant(vo).getData(); | ||
| 425 | } | ||
| 426 | else{ | ||
| 427 | updateTenant(entity); | ||
| 489 | } | 428 | } |
| 429 | } | ||
| 490 | 430 | ||
| 431 | } | ||
| 432 | |||
| 433 | @Override | ||
| 434 | public void crossFlowCallBack(BizCallbackDTO dto) { | ||
| 435 | MfEnterprise entity = mfEnterpriseService.getById(dto.getBizGuid()); | ||
| 436 | if (entity == null) { | ||
| 437 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); | ||
| 438 | } | ||
| 439 | // 同步更新审批状态 | ||
| 440 | LambdaUpdateWrapper<MfEnterprise> updateWrapper = new LambdaUpdateWrapper<>(); | ||
| 441 | updateWrapper.set(MfEnterprise::getBizApproveState, dto.getApprovalState()); | ||
| 442 | updateWrapper.set(MfEnterprise::getCrossPlatformApproveState, dto.getApprovalState()); | ||
| 443 | updateWrapper.eq(MfEnterprise::getGuid, dto.getBizGuid()); | ||
| 444 | boolean flag = mfEnterpriseService.update(updateWrapper); | ||
| 445 | if (!flag) { | ||
| 446 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, messageSourceUtil.updateMessage(String.format("%s的业务审批状态", FUNCTION_NAME))); | ||
| 491 | } | 447 | } |
| 448 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { | ||
| 449 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(entity.getTenantGuid()); | ||
| 450 | if("非认证会员".equals(tenantName)){ | ||
| 451 | //删除原帐号并新增正式会员 | ||
| 452 | TenantRQVO vo = csbrBeanUtil.convert(entity,TenantRQVO.class); | ||
| 453 | //新增会员时guid必须保证为空 | ||
| 454 | vo.setGuid(null); | ||
| 455 | vo.setTenantType(null); | ||
| 456 | vo.setContactTel(entity.getContactTel()); | ||
| 457 | vo.setBizGuid(dto.getBizGuid()); | ||
| 458 | vo.setPersonIncharge(entity.getJuridicalPerson()); | ||
| 459 | vo.setBizState("Y"); | ||
| 460 | vo.setRegistrationDate(DateUtil.getDateToLocal(entity.getRegistrationDate())); | ||
| 461 | vo.setTenantLicList(getTenantLicList(entity.getBusinessLicenseJson())); | ||
| 462 | vo.setCompanyAddress(String.format("%s/%s/%s",entity.getProvince(),entity.getCity(),entity.getDistrict())); | ||
| 463 | vo.setProvince(null); | ||
| 464 | vo.setCity(null); | ||
| 465 | vo.setDistrict(null); | ||
| 466 | personelFeign.authTenant(vo).getData(); | ||
| 467 | } | ||
| 468 | else{ | ||
| 469 | updateTenant(entity); | ||
| 470 | } | ||
| 471 | } | ||
| 472 | } | ||
| 492 | 473 | ||
| 474 | private List<TenantLicRQVO> getTenantLicList(String json) { | ||
| 475 | if(StringUtils.isBlank(json)){ | ||
| 476 | return null; | ||
| 477 | } | ||
| 478 | JSONArray array = JSON.parseArray(json); | ||
| 479 | if(array.size() == 0){ | ||
| 480 | return null; | ||
| 481 | } | ||
| 482 | JSONArray itemArray = new JSONArray(); | ||
| 483 | for(int i = 0; i < array.size(); i++){ | ||
| 484 | JSONObject obj = array.getJSONObject(i); | ||
| 485 | //格式转换 | ||
| 486 | JSONObject itemOjb = new JSONObject(); | ||
| 487 | itemOjb.put("name",obj.get("name")); | ||
| 488 | itemOjb.put("path",obj.get("url")); | ||
| 489 | itemArray.add(itemOjb); | ||
| 490 | } | ||
| 491 | TenantLicRQVO item = new TenantLicRQVO(); | ||
| 492 | item.setLicenseType("1"); | ||
| 493 | item.setPictContentJson(JSON.toJSONString(itemArray)); | ||
| 494 | |||
| 495 | List<TenantLicRQVO> list = new ArrayList<>(); | ||
| 496 | list.add(item); | ||
| 497 | return list; | ||
| 493 | } | 498 | } |
| 494 | 499 | ||
| 495 | /** 将此账号提交的数据需求迁移到新的企业 */ | 500 | /** 将此账号提交的数据需求迁移到新的企业 */ |
| ... | @@ -519,53 +524,126 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -519,53 +524,126 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 519 | mfDemandService.removeByIds(list); | 524 | mfDemandService.removeByIds(list); |
| 520 | } | 525 | } |
| 521 | 526 | ||
| 527 | /** 仅更新会员本表信息 */ | ||
| 522 | @Override | 528 | @Override |
| 523 | public Boolean check(EnterpriseRQVO vo) { | 529 | public void updateTenant(MfEnterprise vo) { |
| 524 | //防止管理员帐号发起认证 | 530 | //同步更新会员表 |
| 525 | if(StringUtils.isBlank(vo.getGuid())){ | 531 | TenantRQVO tenantVO = csbrBeanUtil.convert(vo,TenantRQVO.class); |
| 526 | checkUser(vo.getLogonUser()); | 532 | tenantVO.setGuid(vo.getTenantGuid()); |
| 533 | tenantVO.setPersonIncharge(vo.getJuridicalPerson()); | ||
| 534 | tenantVO.setTenantName(vo.getTenantName()); | ||
| 535 | tenantVO.setRegisteredCapital(vo.getRegisteredCapital()); | ||
| 536 | tenantVO.setRegistrationDate(DateUtil.getDateToLocal(vo.getRegistrationDate())); | ||
| 537 | tenantVO.setBankTaxNo(vo.getBankTaxNo()); | ||
| 538 | tenantVO.setBusinessLicenseScope(vo.getBusinessLicenseScope()); | ||
| 539 | tenantVO.setPersonIncharge(vo.getJuridicalPerson()); | ||
| 540 | tenantVO.setContacts(vo.getContacts()); | ||
| 541 | tenantVO.setContactTel(vo.getContactTel()); | ||
| 542 | tenantVO.setCompanyAddress(String.format("%s/%s/%s",vo.getProvince(),vo.getCity(),vo.getDistrict())); | ||
| 543 | tenantVO.setTenantLicList(getTenantLicList(vo.getBusinessLicenseJson())); | ||
| 544 | personelFeign.changeUpdate(tenantVO); | ||
| 545 | } | ||
| 546 | |||
| 547 | @Override | ||
| 548 | public EnterpriseRSVO getEnterpriseDetailByLogonUser(String logonUser) { | ||
| 549 | // 根据登陆人信息查询业务数据 | ||
| 550 | LambdaQueryWrapper<MfEnterprise> queryWrapper = Wrappers.lambdaQuery(MfEnterprise.class); | ||
| 551 | queryWrapper.eq(MfEnterprise::getLogonUser, logonUser); | ||
| 552 | queryWrapper.orderByDesc(MfEnterprise::getCreateTime); | ||
| 553 | List<MfEnterprise> mfEnterprises = mfEnterpriseService.list(queryWrapper); | ||
| 554 | if (ObjectUtils.isEmpty(mfEnterprises)) { | ||
| 555 | return null; | ||
| 527 | } | 556 | } |
| 528 | 557 | ||
| 529 | //检查会员名称等数据 | 558 | // 判断业务数据是否有通过 |
| 530 | TenantRQVO tenant = csbrBeanUtil.convert(vo,TenantRQVO.class); | 559 | Optional<MfEnterprise> enterpriseOptional = mfEnterprises.stream().filter(item -> |
| 531 | personelFeign.checkTenant(tenant); | 560 | ApprovalStateEnum.PASSED.getValue().equals(item.getBizApproveState()) || "B".equals(item.getBizApproveState()) || ApprovalStateEnum.CHECKING.getValue().equals(item.getBizApproveState())).findFirst(); |
| 532 | return true; | 561 | if (enterpriseOptional.isEmpty()) { |
| 533 | } | 562 | return null; |
| 563 | } | ||
| 564 | MfEnterprise mfEnterprise = enterpriseOptional.get(); | ||
| 565 | EnterpriseRSVO enterpriseRSVO = convertToVO(mfEnterprise); | ||
| 566 | |||
| 567 | // 查询变更历史 | ||
| 568 | LambdaQueryWrapper<MfEnterpriseChangeApprove> lambdaQueryWrapper = new LambdaQueryWrapper<>(); | ||
| 569 | lambdaQueryWrapper.eq(MfEnterpriseChangeApprove::getSourceGuid, mfEnterprise.getGuid()); | ||
| 570 | lambdaQueryWrapper.orderByDesc(MfEnterpriseChangeApprove::getCreateTime); | ||
| 571 | List<MfEnterpriseChangeApprove> approveList = mfEnterpriseChangeApproveService.list(lambdaQueryWrapper); | ||
| 572 | if(CollectionUtils.isEmpty(approveList)){ | ||
| 573 | return enterpriseRSVO; | ||
| 574 | } | ||
| 575 | |||
| 576 | // 判断最新变更数据是否是审批中 审批中显示最新数据 驳回或通过显示最新一次审批通过数据 | ||
| 577 | if ("B".equals(enterpriseRSVO.getBizApproveState())) { | ||
| 578 | Optional<MfEnterpriseChangeApprove> changeApproveOptFirst = approveList.stream().filter(item -> "2".equals(item.getDataType())).findFirst(); | ||
| 579 | if (changeApproveOptFirst.isPresent()) { | ||
| 580 | enterpriseRSVO = csbrBeanUtil.convert(changeApproveOptFirst.get(), EnterpriseRSVO.class); | ||
| 581 | enterpriseRSVO.setBizApproveState(mfEnterprise.getBizApproveState()); | ||
| 582 | } | ||
| 583 | } | ||
| 534 | 584 | ||
| 535 | private void checkUser(String logonUser){ | 585 | // 只显示审批通过的变更历史 |
| 536 | UserQueryDTO dto = new UserQueryDTO(); | 586 | List<MfEnterpriseChangeApprove> passChangeApproves = approveList.stream().filter(item -> ApprovalStateEnum.PASSED.getValue().equals(item.getBizApproveState())).toList(); |
| 537 | dto.setLogonUser(logonUser); | 587 | if (ObjectUtils.isNotEmpty(passChangeApproves)) { |
| 538 | List<UserVO> userList = userFeign.getUserSomeInfo(dto).getData().getRecords(); | 588 | List<ChangeApproveBean> beanList = getChangeBeanList(passChangeApproves); |
| 539 | if(CollectionUtils.isNotEmpty(userList)){ | 589 | try { |
| 540 | StaffRSVO staffVO = personelFeign.getByUserGuid(userList.get(0).getGuid()).getData(); | 590 | if(CollectionUtils.isEmpty(ChangeInfoUtil.areaList)){ |
| 541 | if(staffVO != null && StringUtils.isNotBlank(staffVO.getIsAdmin()) && "Y".equals(staffVO.getIsAdmin())){ | 591 | ChangeInfoUtil.areaList = configureFeign.getBoroughCodeName().getData(); |
| 542 | throw new CsbrUserException(UserError.VALIDATE_CODE_ERROR, "账号已存在!"); | 592 | } |
| 593 | enterpriseRSVO.setChangeList(ChangeInfoUtil.getChangeList(beanList)); | ||
| 594 | } catch (IllegalAccessException e) { | ||
| 595 | e.printStackTrace(); | ||
| 543 | } | 596 | } |
| 544 | } | 597 | } |
| 598 | |||
| 599 | return enterpriseRSVO; | ||
| 600 | } | ||
| 601 | |||
| 602 | @Override | ||
| 603 | public Boolean check(EnterpriseRQVO vo) { | ||
| 604 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(vo.getTenantGuid()); | ||
| 605 | TenantRQVO tenant = csbrBeanUtil.convert(vo,TenantRQVO.class); | ||
| 606 | if("非认证会员".equals(tenantName)){ | ||
| 607 | tenant.setGuid(null); | ||
| 608 | } | ||
| 609 | else{ | ||
| 610 | tenant.setGuid(vo.getTenantGuid()); | ||
| 611 | } | ||
| 612 | personelFeign.checkTenant(tenant); | ||
| 613 | return true; | ||
| 545 | } | 614 | } |
| 546 | 615 | ||
| 547 | /** | 616 | /** |
| 548 | * 获取发起流程参数 | 617 | * 获取发起流程参数 |
| 549 | * @author xcq | 618 | * |
| 550 | * @date 2024-12-26 16:18 | ||
| 551 | * @param entity | 619 | * @param entity |
| 620 | * @param rqVO | ||
| 552 | * @return com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO | 621 | * @return com.csbr.cloud.workflow.domain.dto.appove.AddApprovalDTO |
| 622 | * @author xcq | ||
| 623 | * @date 2024-12-26 16:18 | ||
| 553 | */ | 624 | */ |
| 554 | private AddApprovalDTO getAddApprovalDTO(MfEnterprise entity) { | 625 | private AddApprovalDTO getAddApprovalDTO(MfEnterprise entity, EnterpriseRQVO rqVO) { |
| 555 | AddApprovalDTO approvalDTO = new AddApprovalDTO(WorkFlowBizEnum.ENTERPRISE_APPLY.getValue(), entity.getGuid()); | 626 | AddApprovalDTO approvalDTO = new AddApprovalDTO(WorkFlowBizEnum.ENTERPRISE_APPLY.getValue(), entity.getGuid()); |
| 556 | // todo | 627 | approvalDTO.setFuncCode(SysFuncCode); |
| 557 | approvalDTO.setFuncCode("QYRZ"); | 628 | approvalDTO.setUrlParam(String.format("guid=%s&name=%s&tName=%s&fType=%s&bizGuid=%s&type=detail", entity.getGuid(), entity.getTenantName(), |
| 629 | entity.getTenantName(), WorkFlowBizEnum.ENTERPRISE_APPLY.getValue(), entity.getGuid())); | ||
| 558 | // 流程消息中的变量替换参数 | 630 | // 流程消息中的变量替换参数 |
| 559 | approvalDTO.setFlowMessageBody(null); | 631 | approvalDTO.setFlowMessageBody(entity.getTenantName()); |
| 560 | // 流程列表数据核心param参数处理 | 632 | // 流程列表数据核心param参数处理 |
| 561 | approvalDTO.setParam1(entity.getTenantName()); | 633 | approvalDTO.setParam1(entity.getTenantName()); |
| 562 | approvalDTO.setParam2(entity.getTenantType()); | 634 | approvalDTO.setParam2(entity.getTenantType()); |
| 563 | approvalDTO.setParam3(entity.getSocialCreditCode()); | 635 | approvalDTO.setParam3(entity.getSocialCreditCode()); |
| 564 | approvalDTO.setParam4(String.format("%s_%s_%s",entity.getJuridicalPerson(),entity.getContacts(),entity.getContactTel())); | 636 | approvalDTO.setParam4(String.format("%s_%s_%s",entity.getJuridicalPerson(),entity.getContacts(),entity.getContactTel())); |
| 565 | 637 | ||
| 638 | // 增加跨服务审批字段 | ||
| 639 | rqVO.setGuid(entity.getGuid()); | ||
| 640 | approvalDTO.setBizData(JSON.toJSONString(rqVO)); | ||
| 641 | |||
| 566 | return approvalDTO; | 642 | return approvalDTO; |
| 567 | } | 643 | } |
| 568 | 644 | ||
| 645 | |||
| 646 | |||
| 569 | /** | 647 | /** |
| 570 | * 企业信息新新增前置处理 | 648 | * 企业信息新新增前置处理 |
| 571 | * @author xcq | 649 | * @author xcq |
| ... | @@ -657,11 +735,11 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -657,11 +735,11 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 657 | //endregion 2.2.业务数据验证 | 735 | //endregion 2.2.业务数据验证 |
| 658 | 736 | ||
| 659 | //endregion 2.数据验证特殊处理 | 737 | //endregion 2.数据验证特殊处理 |
| 738 | rqVO.setBizApproveState(entity.getBizApproveState()); | ||
| 660 | 739 | ||
| 661 | //region 3.数据转换处理 | 740 | //region 3.数据转换处理 |
| 662 | 741 | ||
| 663 | //region 3.1.数据过程转换 | 742 | //region 3.1.数据过程转换 |
| 664 | rqVO.setBizApproveState(entity.getBizApproveState()); | ||
| 665 | //endregion 3.1.数据过程转换 | 743 | //endregion 3.1.数据过程转换 |
| 666 | 744 | ||
| 667 | //endregion 3.数据转换处理 | 745 | //endregion 3.数据转换处理 |
| ... | @@ -803,8 +881,11 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -803,8 +881,11 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 803 | EnterpriseRSVO vo = csbrBeanUtil.convert(entity, EnterpriseRSVO.class); | 881 | EnterpriseRSVO vo = csbrBeanUtil.convert(entity, EnterpriseRSVO.class); |
| 804 | //流程数据处理 | 882 | //流程数据处理 |
| 805 | vo.setApproveVO(approvalFlowUtil.getApprovalCrossTenantInfo(entity.getGuid())); | 883 | vo.setApproveVO(approvalFlowUtil.getApprovalCrossTenantInfo(entity.getGuid())); |
| 806 | vo.setVenue(getVenue(vo.getProvince(),vo.getCity(),vo.getDistrict())); | 884 | if(CollectionUtils.isEmpty(ChangeInfoUtil.areaList)){ |
| 807 | vo.setBusinessLicenseStartEnd(getStartEnd(vo.getBusinessLicenseTerm(),vo.getBusinessLicenseStartDate(),vo.getBusinessLicenseEndDate())); | 885 | ChangeInfoUtil.areaList = configureFeign.getBoroughCodeName().getData(); |
| 886 | } | ||
| 887 | vo.setVenue(ChangeInfoUtil.getVenue(vo.getProvince(),vo.getCity(),vo.getDistrict())); | ||
| 888 | vo.setBusinessLicenseStartEnd(ChangeInfoUtil.getStartEnd(vo.getBusinessLicenseTerm(),vo.getBusinessLicenseStartDate(),vo.getBusinessLicenseEndDate())); | ||
| 808 | return vo; | 889 | return vo; |
| 809 | } | 890 | } |
| 810 | 891 | ... | ... |
| ... | @@ -202,9 +202,9 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser | ... | @@ -202,9 +202,9 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser |
| 202 | * @return void | 202 | * @return void |
| 203 | */ | 203 | */ |
| 204 | private void againSubmitFlow(MfServicerMaintain entity, ServicerMaintainRQVO rqVO, AddApprovalDTO approvalDTO) { | 204 | private void againSubmitFlow(MfServicerMaintain entity, ServicerMaintainRQVO rqVO, AddApprovalDTO approvalDTO) { |
| 205 | // 重新提交的数据重置相关字段 | ||
| 206 | entity.setGuid(CommonUtil.newGuid()); | 205 | entity.setGuid(CommonUtil.newGuid()); |
| 207 | mfServicerMaintainService.csbrBaseEntity(entity); | 206 | mfServicerMaintainService.csbrBaseEntity(entity); |
| 207 | entity.setBizApproveState("A"); | ||
| 208 | // 保存新数据 | 208 | // 保存新数据 |
| 209 | boolean flag = mfServicerMaintainService.save(entity); | 209 | boolean flag = mfServicerMaintainService.save(entity); |
| 210 | if (!flag) { | 210 | if (!flag) { |
| ... | @@ -284,7 +284,7 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser | ... | @@ -284,7 +284,7 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser |
| 284 | // todo | 284 | // todo |
| 285 | approvalDTO.setFuncCode("FWSWH"); | 285 | approvalDTO.setFuncCode("FWSWH"); |
| 286 | // 流程消息中的变量替换参数 | 286 | // 流程消息中的变量替换参数 |
| 287 | approvalDTO.setFlowMessageBody(null); | 287 | approvalDTO.setFlowMessageBody(String.format("%s,%s",entity.getCreateUserName(),entity.getTenantName())); |
| 288 | // 流程列表数据核心param参数处理 | 288 | // 流程列表数据核心param参数处理 |
| 289 | approvalDTO.setParam1(null); | 289 | approvalDTO.setParam1(null); |
| 290 | approvalDTO.setParam2(null); | 290 | approvalDTO.setParam2(null); |
| ... | @@ -388,7 +388,6 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser | ... | @@ -388,7 +388,6 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser |
| 388 | //region 3.数据转换处理 | 388 | //region 3.数据转换处理 |
| 389 | 389 | ||
| 390 | //region 3.1.数据过程转换 | 390 | //region 3.1.数据过程转换 |
| 391 | rqVO.setBizApproveState(entity.getBizApproveState()); | ||
| 392 | //endregion 3.1.数据过程转换 | 391 | //endregion 3.1.数据过程转换 |
| 393 | 392 | ||
| 394 | //endregion 3.数据转换处理 | 393 | //endregion 3.数据转换处理 | ... | ... |
| 1 | package com.csbr.qingcloud.portal.util; | ||
| 2 | |||
| 3 | import com.csbr.cloud.common.util.CommonUtil; | ||
| 4 | import com.csbr.cloud.common.util.CsbrBeanUtil; | ||
| 5 | import com.csbr.qingcloud.portal.domain.vo.BoroughPOJO; | ||
| 6 | import com.csbr.qingcloud.portal.domain.vo.ChangeInfoVO; | ||
| 7 | import com.csbr.qingcloud.portal.domain.vo.CompareResult; | ||
| 8 | import com.csbr.qingcloud.portal.feign.ConfigureFeign; | ||
| 9 | import com.csbr.qingcloud.portal.service.impl.EnterpriseServiceImpl; | ||
| 10 | import jakarta.annotation.Resource; | ||
| 11 | import org.apache.commons.collections.CollectionUtils; | ||
| 12 | import org.apache.commons.lang3.StringUtils; | ||
| 13 | import org.springframework.stereotype.Component; | ||
| 14 | |||
| 15 | import java.math.BigDecimal; | ||
| 16 | import java.math.RoundingMode; | ||
| 17 | import java.util.ArrayList; | ||
| 18 | import java.util.Comparator; | ||
| 19 | import java.util.Date; | ||
| 20 | import java.util.List; | ||
| 21 | import java.util.stream.Collectors; | ||
| 22 | |||
| 23 | @Component | ||
| 24 | public class ChangeInfoUtil { | ||
| 25 | |||
| 26 | public static List<BoroughPOJO> areaList; | ||
| 27 | |||
| 28 | /** 计算变更信息 */ | ||
| 29 | public static List<ChangeInfoVO> getChangeList(List<EnterpriseServiceImpl.ChangeApproveBean> beanList) throws IllegalAccessException { | ||
| 30 | List<ChangeInfoVO> list = new ArrayList<>(); | ||
| 31 | //循环对比每组记录生来变更内容 | ||
| 32 | for(EnterpriseServiceImpl.ChangeApproveBean item : beanList){ | ||
| 33 | if(item.oldBean == null || item.newBean == null){ | ||
| 34 | continue; | ||
| 35 | } | ||
| 36 | List<CompareResult> diffList = ObjectUtil.getBeanDiff(item.oldBean,item.newBean); | ||
| 37 | getVenueResult(item,list); | ||
| 38 | getStartEndResult(item,list); | ||
| 39 | getRegistrationDateResult(item,list); | ||
| 40 | getRegisteredCapitalResult(item,list); | ||
| 41 | for(CompareResult diffItem : diffList){ | ||
| 42 | if(diffItem.getFieldComment().contains("审批状态") || diffItem.getFieldComment().contains("营业执照") | ||
| 43 | || diffItem.getFieldComment().contains("法人证件照") || diffItem.getFieldComment().contains("管理员证件照") | ||
| 44 | || diffItem.getFieldComment().contains("授权委托书") || diffItem.getFieldComment().contains("省") | ||
| 45 | || diffItem.getFieldComment().contains("市") || diffItem.getFieldComment().contains("区") | ||
| 46 | || diffItem.getFieldComment().contains("营业开始日期") || diffItem.getFieldComment().contains("营业结束日期") | ||
| 47 | || diffItem.getFieldComment().contains("注册日期") || diffItem.getFieldComment().contains("注册资本")){ | ||
| 48 | continue; | ||
| 49 | } | ||
| 50 | list.add(getChangeInfoVO(item,diffItem)); | ||
| 51 | } | ||
| 52 | } | ||
| 53 | list = list.stream().sorted(Comparator.comparing(ChangeInfoVO::getNameEn).thenComparing(ChangeInfoVO::getDate).reversed()).collect(Collectors.toList()); | ||
| 54 | return list; | ||
| 55 | } | ||
| 56 | |||
| 57 | private static ChangeInfoVO getChangeInfoVO(EnterpriseServiceImpl.ChangeApproveBean item,CompareResult diffItem){ | ||
| 58 | ChangeInfoVO vo = new ChangeInfoVO(); | ||
| 59 | vo.setNameEn(diffItem.getFieldName()); | ||
| 60 | vo.setName(diffItem.getFieldComment()); | ||
| 61 | vo.setDate(DateUtil.getDateToString(item.oldBean.getCreateTime())); | ||
| 62 | vo.setBefore(diffItem.getOldValue() == null ? "" : diffItem.getOldValue().toString()); | ||
| 63 | vo.setAfter(diffItem.getNewValue() == null ? "" : diffItem.getNewValue().toString()); | ||
| 64 | vo.setGuid(CommonUtil.newGuid()); | ||
| 65 | return vo; | ||
| 66 | } | ||
| 67 | |||
| 68 | private static void getRegisteredCapitalResult(EnterpriseServiceImpl.ChangeApproveBean item, List<ChangeInfoVO> list) { | ||
| 69 | String oldValue = getRegisteredCapital(item.oldBean.getRegisteredCapital()); | ||
| 70 | String newValue = getRegisteredCapital(item.newBean.getRegisteredCapital()); | ||
| 71 | if(!oldValue.equals(newValue)){ | ||
| 72 | list.add(getChangeInfoVO(item,getCompareResult("注册资本","registeredCapital",oldValue,newValue))); | ||
| 73 | } | ||
| 74 | } | ||
| 75 | |||
| 76 | private static String getRegisteredCapital(BigDecimal v) { | ||
| 77 | if(v == null){ | ||
| 78 | return ""; | ||
| 79 | } | ||
| 80 | return v.setScale(2, RoundingMode.HALF_DOWN).toString(); | ||
| 81 | } | ||
| 82 | |||
| 83 | public static void getVenueResult(EnterpriseServiceImpl.ChangeApproveBean item, List<ChangeInfoVO> list) { | ||
| 84 | String oldValue = getVenue(item.oldBean.getProvince(),item.oldBean.getCity(),item.oldBean.getDistrict()); | ||
| 85 | String newValue = getVenue(item.newBean.getProvince(),item.newBean.getCity(),item.newBean.getDistrict()); | ||
| 86 | if(!oldValue.equals(newValue)){ | ||
| 87 | list.add(getChangeInfoVO(item,getCompareResult("注册地","venue",oldValue,newValue))); | ||
| 88 | } | ||
| 89 | } | ||
| 90 | |||
| 91 | public static void getRegistrationDateResult(EnterpriseServiceImpl.ChangeApproveBean item, List<ChangeInfoVO> list) { | ||
| 92 | String oldValue = getRegistrationDate(item.oldBean.getRegistrationDate()); | ||
| 93 | String newValue = getRegistrationDate(item.newBean.getRegistrationDate()); | ||
| 94 | if(!oldValue.equals(newValue)){ | ||
| 95 | list.add(getChangeInfoVO(item,getCompareResult("注册日期","registrationDate",oldValue,newValue))); | ||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 99 | private static String getRegistrationDate(Date date) { | ||
| 100 | return DateUtil.getShortDateToString(date); | ||
| 101 | } | ||
| 102 | |||
| 103 | private static CompareResult getCompareResult(String comment,String name,String oldVenue,String newVenue){ | ||
| 104 | CompareResult result = new CompareResult(); | ||
| 105 | result.setFieldComment(comment); | ||
| 106 | result.setFieldName(name); | ||
| 107 | result.setOldValue(oldVenue); | ||
| 108 | result.setNewValue(newVenue); | ||
| 109 | return result; | ||
| 110 | } | ||
| 111 | |||
| 112 | public static void getStartEndResult(EnterpriseServiceImpl.ChangeApproveBean item, List<ChangeInfoVO> list) { | ||
| 113 | String oldValue = getStartEnd(item.oldBean.getBusinessLicenseTerm(),item.oldBean.getBusinessLicenseStartDate(),item.oldBean.getBusinessLicenseEndDate()); | ||
| 114 | String newValue = getStartEnd(item.newBean.getBusinessLicenseTerm(),item.newBean.getBusinessLicenseStartDate(),item.newBean.getBusinessLicenseEndDate()); | ||
| 115 | if(!oldValue.equals(newValue)){ | ||
| 116 | list.add(getChangeInfoVO(item,getCompareResult("营业期限","businessLicenseStartEnd",oldValue,newValue))); | ||
| 117 | } | ||
| 118 | } | ||
| 119 | |||
| 120 | public static String getVenue(String province, String city, String district) { | ||
| 121 | if(StringUtils.isBlank(district)){ | ||
| 122 | return String.format("%s/%s",getName(province),getName(city)); | ||
| 123 | } | ||
| 124 | else{ | ||
| 125 | return String.format("%s/%s/%s",getName(province),getName(city),getName(district)); | ||
| 126 | } | ||
| 127 | } | ||
| 128 | |||
| 129 | private static String getName(String code){ | ||
| 130 | List<String> names = areaList.stream().filter(x->x.getCode().equals(code)).map(BoroughPOJO::getName).collect(Collectors.toList()); | ||
| 131 | if(CollectionUtils.isEmpty(names)){ | ||
| 132 | return ""; | ||
| 133 | } | ||
| 134 | return names.get(0); | ||
| 135 | } | ||
| 136 | |||
| 137 | |||
| 138 | public static String getStartEnd(String businessLicenseTerm, Date businessLicenseStartDate, Date businessLicenseEndDate) { | ||
| 139 | if("1".equals(businessLicenseTerm)){ | ||
| 140 | return "长期有效"; | ||
| 141 | } | ||
| 142 | return String.format("%s至%s",DateUtil.getShortDateToString(businessLicenseStartDate),DateUtil.getShortDateToString(businessLicenseEndDate)); | ||
| 143 | } | ||
| 144 | |||
| 145 | } |
| 1 | package com.csbr.qingcloud.portal.util; | ||
| 2 | |||
| 3 | import java.text.SimpleDateFormat; | ||
| 4 | import java.time.LocalDateTime; | ||
| 5 | import java.time.ZoneId; | ||
| 6 | import java.util.Date; | ||
| 7 | |||
| 8 | public class DateUtil { | ||
| 9 | |||
| 10 | /** 时间相差多少天 无视小时 */ | ||
| 11 | public static int getDiffDay(Date one, Date two) { | ||
| 12 | if(one == null || two == null){ | ||
| 13 | return 0; | ||
| 14 | } | ||
| 15 | one = getDateByString(getShortDateToString(one)); | ||
| 16 | two = getDateByString(getShortDateToString(two)); | ||
| 17 | long difference = (one.getTime() - two.getTime()) / 86400000; | ||
| 18 | return (int) Math.abs(difference); | ||
| 19 | } | ||
| 20 | |||
| 21 | /** 字符串时间转日期 */ | ||
| 22 | public static Date getDateByString(String time){ | ||
| 23 | try { | ||
| 24 | return new SimpleDateFormat("yyyy-MM-dd").parse(time); | ||
| 25 | } catch (Exception e) { | ||
| 26 | return new Date(); | ||
| 27 | } | ||
| 28 | } | ||
| 29 | |||
| 30 | /** 时间转字符串 */ | ||
| 31 | public static String getDateToString(Date time){ | ||
| 32 | if(time == null) { | ||
| 33 | return ""; | ||
| 34 | } | ||
| 35 | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(time); | ||
| 36 | } | ||
| 37 | |||
| 38 | /** 时间转字符串 */ | ||
| 39 | public static String getShortDateToString(Date time){ | ||
| 40 | if(time == null) { | ||
| 41 | return ""; | ||
| 42 | } | ||
| 43 | return new SimpleDateFormat("yyyy-MM-dd").format(time); | ||
| 44 | } | ||
| 45 | |||
| 46 | /** 时间转本地时间 */ | ||
| 47 | public static LocalDateTime getDateToLocal(Date time){ | ||
| 48 | if(time == null) { | ||
| 49 | return null; | ||
| 50 | } | ||
| 51 | return time.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); | ||
| 52 | } | ||
| 53 | |||
| 54 | /** 字符串时间转日期 */ | ||
| 55 | public static Date getShortDate(Date time){ | ||
| 56 | if(time == null) { | ||
| 57 | return null; | ||
| 58 | } | ||
| 59 | try { | ||
| 60 | return new SimpleDateFormat("yyyy-MM-dd").parse(getShortDateToString(time)); | ||
| 61 | } catch (Exception e) { | ||
| 62 | return new Date(); | ||
| 63 | } | ||
| 64 | } | ||
| 65 | |||
| 66 | } |
| 1 | package com.csbr.qingcloud.portal.util; | ||
| 2 | |||
| 3 | import com.alibaba.fastjson.JSON; | ||
| 4 | import com.alibaba.fastjson.JSONObject; | ||
| 5 | import com.csbr.cloud.common.enums.SystemError; | ||
| 6 | import com.csbr.cloud.common.exception.CsbrSystemException; | ||
| 7 | import com.csbr.cloud.common.response.CommonRes; | ||
| 8 | import lombok.extern.slf4j.Slf4j; | ||
| 9 | import org.apache.hc.client5.http.config.RequestConfig; | ||
| 10 | import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; | ||
| 11 | import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; | ||
| 12 | import org.apache.hc.core5.util.Timeout; | ||
| 13 | import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | import org.springframework.http.HttpEntity; | ||
| 15 | import org.springframework.http.HttpHeaders; | ||
| 16 | import org.springframework.http.MediaType; | ||
| 17 | import org.springframework.http.client.ClientHttpRequestFactory; | ||
| 18 | import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; | ||
| 19 | import org.springframework.stereotype.Component; | ||
| 20 | import org.springframework.web.client.RestTemplate; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * @program: daop-projects | ||
| 24 | * @description: | ||
| 25 | * @author: xiaojie | ||
| 26 | * @create: 2025-03-13 14:52 | ||
| 27 | **/ | ||
| 28 | @Component | ||
| 29 | @Slf4j | ||
| 30 | public class InvokeUtil { | ||
| 31 | |||
| 32 | @Autowired | ||
| 33 | private RestTemplate restTemplate; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * open调用接口 | ||
| 37 | * @param jsonObject | ||
| 38 | * @param appKey | ||
| 39 | * @param zqDelUrl | ||
| 40 | */ | ||
| 41 | public void invokeMainDel(JSONObject jsonObject, String appKey, String zqDelUrl) { | ||
| 42 | HttpHeaders headers = new HttpHeaders(); | ||
| 43 | headers.setContentType(MediaType.APPLICATION_JSON); | ||
| 44 | headers.set("appKey", appKey); | ||
| 45 | HttpEntity<JSONObject> requestEntity = new HttpEntity<>(jsonObject, headers); | ||
| 46 | restTemplate.setRequestFactory(getFactory()); | ||
| 47 | CommonRes commonRes = restTemplate.postForObject(zqDelUrl, requestEntity, CommonRes.class); | ||
| 48 | if (!CommonRes.success().getCode().equals(commonRes.getCode())) { | ||
| 49 | throw new CsbrSystemException(SystemError.ERROR_CODE, commonRes.getMsg()); | ||
| 50 | } else { | ||
| 51 | CommonRes commonResData = JSON.parseObject(String.valueOf(commonRes.getData()), CommonRes.class); | ||
| 52 | if (!CommonRes.success().getCode().equals(commonResData.getCode())) { | ||
| 53 | throw new CsbrSystemException(SystemError.ERROR_CODE, commonResData.getMsg()); | ||
| 54 | } | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 58 | private ClientHttpRequestFactory getFactory() { | ||
| 59 | RequestConfig config = RequestConfig.custom() | ||
| 60 | .setConnectTimeout(Timeout.ofSeconds(5000)) // 连接超时 | ||
| 61 | .setConnectionRequestTimeout(Timeout.ofSeconds(5000)) // 从连接池获取连接的超时时间 | ||
| 62 | .setResponseTimeout(Timeout.ofSeconds(10000)) // 数据读取超时 | ||
| 63 | .build(); | ||
| 64 | |||
| 65 | CloseableHttpClient httpClient = HttpClientBuilder.create() | ||
| 66 | .setDefaultRequestConfig(config) | ||
| 67 | .build(); | ||
| 68 | |||
| 69 | return new HttpComponentsClientHttpRequestFactory(httpClient); | ||
| 70 | } | ||
| 71 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -58,8 +58,8 @@ public class ObjectUtil { | ... | @@ -58,8 +58,8 @@ public class ObjectUtil { |
| 58 | r.setFieldComment(""); | 58 | r.setFieldComment(""); |
| 59 | } | 59 | } |
| 60 | if (oldField.getType() == Date.class) { | 60 | if (oldField.getType() == Date.class) { |
| 61 | r.setOldValue(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format((Date) oldField.get(oldObj))); | 61 | r.setOldValue(DateUtil.getDateToString((Date)oldField.get(oldObj))); |
| 62 | r.setNewValue(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format((Date) newField.get(newObj))); | 62 | r.setNewValue(DateUtil.getDateToString((Date)oldField.get(newObj))); |
| 63 | } | 63 | } |
| 64 | return r; | 64 | return r; |
| 65 | } | 65 | } | ... | ... |
| 1 | package com.csbr.qingcloud.portal.util; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import org.springframework.boot.context.properties.ConfigurationProperties; | ||
| 5 | import org.springframework.stereotype.Component; | ||
| 6 | |||
| 7 | /** | ||
| 8 | * @program: daop-projects | ||
| 9 | * @description: | ||
| 10 | * @author: xiaojie | ||
| 11 | * @create: 2025-02-28 14:09 | ||
| 12 | **/ | ||
| 13 | @Data | ||
| 14 | @Component | ||
| 15 | @ConfigurationProperties(prefix = "csbr.zq") | ||
| 16 | public class ZQConfig { | ||
| 17 | |||
| 18 | private String appKey = "672c2c38e4b0cac8732a6106"; | ||
| 19 | |||
| 20 | private String zqName = ""; | ||
| 21 | |||
| 22 | private String zqDelUrl = ""; | ||
| 23 | |||
| 24 | private Boolean isMain = false; | ||
| 25 | |||
| 26 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -5,7 +5,7 @@ spring: | ... | @@ -5,7 +5,7 @@ spring: |
| 5 | nacos: | 5 | nacos: |
| 6 | #配置中心 | 6 | #配置中心 |
| 7 | config: | 7 | config: |
| 8 | server-addr: nacos-cluster-service-develop.nacos-cluster:8848 | 8 | server-addr: nacos-cluster-service.nacos-cluster:8848 |
| 9 | file-extension: yaml | 9 | file-extension: yaml |
| 10 | group: release | 10 | group: release |
| 11 | namespace: daop-master | 11 | namespace: daop-master |
| ... | @@ -16,7 +16,7 @@ spring: | ... | @@ -16,7 +16,7 @@ spring: |
| 16 | #注册中心 | 16 | #注册中心 |
| 17 | discovery: | 17 | discovery: |
| 18 | enabled: true | 18 | enabled: true |
| 19 | server-addr: nacos-cluster-service-develop.nacos-cluster:8848 | 19 | server-addr: nacos-cluster-service.nacos-cluster:8848 |
| 20 | group: release | 20 | group: release |
| 21 | namespace: daop-master | 21 | namespace: daop-master |
| 22 | metadata: | 22 | metadata: | ... | ... |
| ... | @@ -5,7 +5,7 @@ spring: | ... | @@ -5,7 +5,7 @@ spring: |
| 5 | nacos: | 5 | nacos: |
| 6 | #配置中心 | 6 | #配置中心 |
| 7 | config: | 7 | config: |
| 8 | server-addr: nacos-cluster-service-develop.nacos-cluster:8848 | 8 | server-addr: nacos-cluster-service.nacos-cluster:8848 |
| 9 | file-extension: yaml | 9 | file-extension: yaml |
| 10 | group: release | 10 | group: release |
| 11 | namespace: daop-lt | 11 | namespace: daop-lt |
| ... | @@ -16,7 +16,7 @@ spring: | ... | @@ -16,7 +16,7 @@ spring: |
| 16 | #注册中心 | 16 | #注册中心 |
| 17 | discovery: | 17 | discovery: |
| 18 | enabled: true | 18 | enabled: true |
| 19 | server-addr: nacos-cluster-service-develop.nacos-cluster:8848 | 19 | server-addr: nacos-cluster-service.nacos-cluster:8848 |
| 20 | group: release | 20 | group: release |
| 21 | namespace: daop-lt | 21 | namespace: daop-lt |
| 22 | metadata: | 22 | metadata: | ... | ... |
-
Please register or sign in to post a comment