Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
ms-data-circulation-portal-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
656bd622
authored
2025-03-03 10:42:25 +0800
by
肖初晴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【DAOP-1.0】企业认证
【功能点】测试问题处理
1 parent
803e665b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
56 deletions
src/main/java/com/csbr/qingcloud/portal/domain/vo/EnterpriseRQVO.java
src/main/java/com/csbr/qingcloud/portal/domain/vo/EnterpriseRSVO.java
src/main/java/com/csbr/qingcloud/portal/feign/PersonelFeign.java
src/main/java/com/csbr/qingcloud/portal/mybatis/entity/MfEnterprise.java
src/main/java/com/csbr/qingcloud/portal/mybatis/entity/MfEnterpriseChangeApprove.java
src/main/java/com/csbr/qingcloud/portal/service/EnterpriseService.java
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseChangeApproveServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/domain/vo/EnterpriseRQVO.java
View file @
656bd62
...
...
@@ -16,7 +16,9 @@ import java.util.Date;
@Data
@Schema
(
title
=
"企业信息新增、修改参数"
)
public
class
EnterpriseRQVO
extends
FlowRQBaseVO
{
@Schema
(
description
=
"会员GUID"
)
private
String
tenantGuid
;
/**
* 公司名称
*/
...
...
src/main/java/com/csbr/qingcloud/portal/domain/vo/EnterpriseRSVO.java
View file @
656bd62
...
...
@@ -23,7 +23,10 @@ public class EnterpriseRSVO {
*/
@Schema
(
description
=
"系统唯一标识"
)
private
String
guid
;
@Schema
(
description
=
"会员GUID"
)
private
String
tenantGuid
;
/**
* 公司名称
*/
...
...
src/main/java/com/csbr/qingcloud/portal/feign/PersonelFeign.java
View file @
656bd62
...
...
@@ -21,7 +21,10 @@ public interface PersonelFeign {
CommonRes
<
TenantRQVO
>
authTenant
(
@RequestBody
TenantRQVO
vo
);
@PutMapping
(
value
=
"/tenant/update"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
CommonRes
<
Boolean
>
updateTenant
(
@RequestBody
TenantRQVO
vo
);
CommonRes
<
String
>
updateTenant
(
@RequestBody
TenantRQVO
vo
);
@PutMapping
(
value
=
"/tenant/change-update"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
CommonRes
<
Boolean
>
changeUpdate
(
@RequestBody
TenantRQVO
vo
);
@GetMapping
(
value
=
"/tenant/get-all-tenant-guid-name-map"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
CommonRes
<
Map
<
String
,
String
>>
getAllTenantGuidNameMap
();
...
...
src/main/java/com/csbr/qingcloud/portal/mybatis/entity/MfEnterprise.java
View file @
656bd62
...
...
@@ -21,7 +21,10 @@ import java.util.Date;
@Accessors
(
chain
=
true
)
@Name
(
"企业信息"
)
public
class
MfEnterprise
extends
BaseDO
{
@Name
(
"会员GUID"
)
private
String
tenantGuid
;
/**
* 公司名称
*/
...
...
src/main/java/com/csbr/qingcloud/portal/mybatis/entity/MfEnterpriseChangeApprove.java
View file @
656bd62
...
...
@@ -21,7 +21,10 @@ import java.util.Date;
@Accessors
(
chain
=
true
)
@Name
(
"企业信息变更审批"
)
public
class
MfEnterpriseChangeApprove
extends
BaseDO
{
@Name
(
"会员GUID"
)
private
String
tenantGuid
;
/**
* 公司名称
*/
...
...
src/main/java/com/csbr/qingcloud/portal/service/EnterpriseService.java
View file @
656bd62
...
...
@@ -2,6 +2,7 @@ package com.csbr.qingcloud.portal.service;
import
com.csbr.cloud.workflow.domain.dto.appove.FlowUpdateStateDTO
;
import
com.csbr.qingcloud.portal.domain.vo.*
;
import
com.csbr.qingcloud.portal.mybatis.entity.MfEnterprise
;
import
csbr.cloud.entity.domain.base.vo.PageListVO
;
import
com.csbr.cloud.workflow.domain.dto.callback.BizCallbackDTO
;
import
com.csbr.cloud.workflow.domain.vo.appove.FlowRQBaseVO
;
...
...
@@ -79,4 +80,6 @@ public interface EnterpriseService {
/** 将此账号提交的数据需求迁移到新的企业 */
void
moveOldData
(
TenantRQVO
vo
);
/** 更新会员信息 */
void
updateTenant
(
MfEnterprise
vo
);
}
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseChangeApproveServiceImpl.java
View file @
656bd62
...
...
@@ -139,29 +139,10 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
mfEnterpriseService
.
updateById
(
vo
);
//同步更新会员表
TenantRQVO
tenantVO
=
csbrBeanUtil
.
convert
(
vo
,
TenantRQVO
.
class
);
tenantVO
.
setGuid
(
getTenantGuid
(
vo
.
getTenantName
()));
tenantVO
.
setPersonIncharge
(
vo
.
getJuridicalPerson
());
tenantVO
.
setTenantName
(
vo
.
getTenantName
());
tenantVO
.
setRegisteredCapital
(
vo
.
getRegisteredCapital
());
tenantVO
.
setRegistrationDate
(
DateUtil
.
getDateToLocal
(
vo
.
getRegistrationDate
()));
tenantVO
.
setBankTaxNo
(
vo
.
getBankTaxNo
());
tenantVO
.
setBusinessLicenseScope
(
vo
.
getBusinessLicenseScope
());
tenantVO
.
setPersonIncharge
(
vo
.
getJuridicalPerson
());
tenantVO
.
setContacts
(
vo
.
getContacts
());
tenantVO
.
setContactTel
(
vo
.
getContactTel
());
personelFeign
.
updateTenant
(
tenantVO
);
enterpriseService
.
updateTenant
(
vo
);
}
private
String
getTenantGuid
(
String
name
){
Map
<
String
,
String
>
map
=
personelFeign
.
getAllTenantGuidNameMap
().
getData
();
for
(
String
guid
:
map
.
keySet
()){
if
(
map
.
get
(
guid
).
equals
(
name
)){
return
guid
;
}
}
return
null
;
}
/** 转换数据 */
private
String
convertToVO
(
MfEnterpriseChangeApprove
entity
){
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
View file @
656bd62
...
...
@@ -28,6 +28,7 @@ import com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseChangeApproveServic
import
com.csbr.qingcloud.portal.mybatis.service.MfEnterpriseService
;
import
com.csbr.qingcloud.portal.service.EnterpriseService
;
import
com.csbr.qingcloud.portal.util.ChangeInfoUtil
;
import
com.csbr.qingcloud.portal.util.DateUtil
;
import
csbr.cloud.entity.domain.base.vo.PageListVO
;
import
csbr.cloud.entity.domain.user.UserInfo
;
import
csbr.cloud.entity.enums.ApprovalStateEnum
;
...
...
@@ -42,6 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* @program: D:/git/ms-data-circulation-portal-service
...
...
@@ -320,13 +322,19 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
throw
new
CsbrSystemException
(
SystemError
.
DATA_UPDATE_ERROR
,
messageSourceUtil
.
updateMessage
(
String
.
format
(
"%s的业务审批状态"
,
FUNCTION_NAME
)));
}
if
(
ApprovalStateEnum
.
PASSED
.
getValue
().
equals
(
dto
.
getApprovalState
()))
{
//删除原帐号并新增正式会员
TenantRQVO
vo
=
csbrBeanUtil
.
convert
(
entity
,
TenantRQVO
.
class
);
vo
.
setTenantType
(
null
);
vo
.
setBizGuid
(
dto
.
getBizGuid
());
vo
.
setPersonIncharge
(
entity
.
getJuridicalPerson
());
vo
.
setBizState
(
"Y"
);
personelFeign
.
authTenant
(
vo
).
getData
();
String
tenantName
=
personelFeign
.
getAllTenantGuidNameMap
().
getData
().
get
(
entity
.
getTenantGuid
());
if
(
"非认证会员"
.
equals
(
tenantName
)){
//删除原帐号并新增正式会员
TenantRQVO
vo
=
csbrBeanUtil
.
convert
(
entity
,
TenantRQVO
.
class
);
vo
.
setTenantType
(
null
);
vo
.
setBizGuid
(
dto
.
getBizGuid
());
vo
.
setPersonIncharge
(
entity
.
getJuridicalPerson
());
vo
.
setBizState
(
"Y"
);
personelFeign
.
authTenant
(
vo
).
getData
();
}
else
{
updateTenant
(
entity
);
}
}
}
...
...
@@ -358,33 +366,36 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
mfDemandService
.
removeByIds
(
list
);
}
/** 仅更新会员本表信息 */
@Override
public
Boolean
check
(
EnterpriseRQVO
vo
)
{
//
非认证会员才需要检查会员名称等数据
StaffRSVO
staff
=
getCurStaff
(
);
if
(
"非认证会员"
.
equals
(
staff
.
getTenantName
())){
TenantRQVO
tenant
=
csbrBeanUtil
.
convert
(
vo
,
TenantRQVO
.
class
);
personelFeign
.
checkTenant
(
tenant
);
}
return
true
;
}
private
StaffRSVO
getCurStaff
(){
UserInfo
userInfo
=
UserContextHolder
.
get
(
);
StaffRSVO
staffVO
=
personelFeign
.
getByUserGuid
(
userInfo
.
getUserId
()).
getData
(
);
return
staffVO
;
public
void
updateTenant
(
MfEnterprise
vo
)
{
//
同步更新会员表
TenantRQVO
tenantVO
=
csbrBeanUtil
.
convert
(
vo
,
TenantRQVO
.
class
);
tenantVO
.
setGuid
(
vo
.
getTenantGuid
());
tenantVO
.
setPersonIncharge
(
vo
.
getJuridicalPerson
()
);
tenantVO
.
setTenantName
(
vo
.
getTenantName
()
);
tenantVO
.
setRegisteredCapital
(
vo
.
getRegisteredCapital
());
tenantVO
.
setRegistrationDate
(
DateUtil
.
getDateToLocal
(
vo
.
getRegistrationDate
()))
;
tenantVO
.
setBankTaxNo
(
vo
.
getBankTaxNo
());
tenantVO
.
setBusinessLicenseScope
(
vo
.
getBusinessLicenseScope
());
tenantVO
.
setPersonIncharge
(
vo
.
getJuridicalPerson
());
tenantVO
.
setContacts
(
vo
.
getContacts
()
);
tenantVO
.
setContactTel
(
vo
.
getContactTel
()
);
personelFeign
.
changeUpdate
(
tenantVO
)
;
}
private
void
checkUser
(
String
logonUser
){
UserQueryDTO
dto
=
new
UserQueryDTO
();
dto
.
setLogonUser
(
logonUser
);
List
<
UserVO
>
userList
=
userFeign
.
getUserSomeInfo
(
dto
).
getData
().
getRecords
(
);
if
(
CollectionUtils
.
isNotEmpty
(
userList
)){
StaffRSVO
staffVO
=
personelFeign
.
getByUserGuid
(
userList
.
get
(
0
).
getGuid
()).
getData
(
);
if
(
staffVO
!=
null
&&
StringUtils
.
isNotBlank
(
staffVO
.
getIsAdmin
())
&&
"Y"
.
equals
(
staffVO
.
getIsAdmin
())){
throw
new
CsbrUserException
(
UserError
.
VALIDATE_CODE_ERROR
,
"账号已存在!"
);
}
@Override
public
Boolean
check
(
EnterpriseRQVO
vo
)
{
String
tenantName
=
personelFeign
.
getAllTenantGuidNameMap
().
getData
().
get
(
vo
.
getTenantGuid
()
);
TenantRQVO
tenant
=
csbrBeanUtil
.
convert
(
vo
,
TenantRQVO
.
class
);
if
(
"非认证会员"
.
equals
(
tenantName
)){
tenant
.
setGuid
(
null
);
}
else
{
tenant
.
setGuid
(
vo
.
getTenantGuid
());
}
personelFeign
.
checkTenant
(
tenant
);
return
true
;
}
/**
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment