Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
bb4aaf83
Commit
bb4aaf83
authored
Jul 24, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refact(注册开通):流程调整
1.多次开通时,页面删除证书后,证书未删除 2.增加查询appId接口
parent
29b6ff5c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
9 deletions
+48
-9
BaseEnterpriseCertDto.java
...mos/boot/module/common/api/dto/BaseEnterpriseCertDto.java
+2
-1
BaseEnterpriseCert.java
...mos/boot/module/common/api/entity/BaseEnterpriseCert.java
+7
-0
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+10
-5
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+29
-3
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/BaseEnterpriseCertDto.java
View file @
bb4aaf83
...
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import
com.alibaba.fastjson.JSONArray
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.DataDictionaryDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.BaseEnterpriseCert
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -61,4 +60,6 @@ public class BaseEnterpriseCertDto extends BaseDto {
@ApiModelProperty
(
value
=
"机构类别"
)
private
String
agencyType
;
@ApiModelProperty
(
value
=
"分类-哪个身份创建的证书"
)
private
String
unitType
;
}
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/BaseEnterpriseCert.java
View file @
bb4aaf83
...
...
@@ -87,4 +87,11 @@ public class BaseEnterpriseCert extends BaseEntity {
*/
@TableField
(
"agency_type"
)
private
String
agencyType
;
/**
* 分类-哪个身份创建的证书
*/
@TableField
(
"unit_type"
)
private
String
unitType
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcOpeningApplicationController.java
View file @
bb4aaf83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.BaseEnterpriseCertDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel
;
...
...
@@ -67,7 +65,7 @@ public class JyjcOpeningApplicationController extends BaseController {
// 详情保存逻辑
BeanUtil
.
copyProperties
(
jsonObject
,
jyjcOpeningApplicationModel
);
}
if
(
jsonObject
.
containsKey
(
"buniessInfo"
)
&&
jsonObject
.
getJSONObject
(
"buniessInfo"
)
!=
null
)
{
if
(
jsonObject
.
containsKey
(
"buniessInfo"
)
&&
jsonObject
.
getJSONObject
(
"buniessInfo"
)
!=
null
)
{
JSONObject
businessInfo
=
jsonObject
.
getJSONObject
(
"buniessInfo"
);
List
<
BaseEnterpriseCertDto
>
baseUnitLicences
=
businessInfo
.
getJSONArray
(
"baseUnitLicences"
)
.
toJavaList
(
BaseEnterpriseCertDto
.
class
);
...
...
@@ -87,7 +85,7 @@ public class JyjcOpeningApplicationController extends BaseController {
}
else
{
BeanUtil
.
copyProperties
(
jsonObject
,
model
);
}
if
(
jsonObject
.
containsKey
(
"buniessInfo"
)
&&
jsonObject
.
getJSONObject
(
"buniessInfo"
)
!=
null
)
{
if
(
jsonObject
.
containsKey
(
"buniessInfo"
)
&&
jsonObject
.
getJSONObject
(
"buniessInfo"
)
!=
null
)
{
JSONObject
businessInfo
=
jsonObject
.
getJSONObject
(
"buniessInfo"
);
// 注意拼写修正
List
<
BaseEnterpriseCertDto
>
baseUnitLicences
=
businessInfo
.
getJSONArray
(
"baseUnitLicences"
)
.
toJavaList
(
BaseEnterpriseCertDto
.
class
);
...
...
@@ -280,7 +278,7 @@ public class JyjcOpeningApplicationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/v2/users"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人、指定人员类型的人员map结构"
,
notes
=
"查询当前登录人、指定人员类型的人员map结构,key为jyjcUserInfos代表检验检测人员,chargeUserInfos为检验检测区域负责人"
)
public
ResponseModel
<
Map
<
String
,
List
<
TzsUserInfoVo
>>>
getBizUserInfosByUnitCodeV2
(
@ApiParam
(
value
=
"人员类型"
,
allowableValues
=
"jy,jc,charge"
,
defaultValue
=
"jy,jc,charge"
)
@RequestParam
(
required
=
false
,
defaultValue
=
"jy,jc,charge"
)
String
personType
)
{
public
ResponseModel
<
Map
<
String
,
List
<
TzsUserInfoVo
>>>
getBizUserInfosByUnitCodeV2
(
@ApiParam
(
value
=
"人员类型"
,
allowableValues
=
"jy,jc,charge"
,
defaultValue
=
"jy,jc,charge"
)
@RequestParam
(
required
=
false
,
defaultValue
=
"jy,jc,charge"
)
String
personType
)
{
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
getUserListByUnitCodeAndPostV2
(
getCompanyCode
(),
personType
));
}
...
...
@@ -321,4 +319,11 @@ public class JyjcOpeningApplicationController extends BaseController {
jyjcOpeningApplicationServiceImpl
.
exportData
(
response
,
Arrays
.
asList
(
ids
.
split
(
","
)));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getAppId"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取appId"
,
notes
=
"获取appId"
)
public
ResponseModel
<
String
>
getAppId
(
@RequestParam
(
value
=
"relationId"
)
Long
seq
)
{
String
appId
=
jyjcOpeningApplicationServiceImpl
.
getAppIdBySeq
(
seq
);
return
ResponseHelper
.
buildResponse
(
appId
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
bb4aaf83
...
...
@@ -552,7 +552,12 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private
List
<
DataDictionaryDto
>
getBuildItemCode
(
Long
sequenceNbr
)
{
List
<
BaseUnitLicence
>
baseUnitLicences
=
baseUnitLicenceMapper
.
selectList
(
new
LambdaQueryWrapper
<
BaseUnitLicence
>()
.
eq
(
BaseUnitLicence:
:
getEnterpriseCertSeq
,
sequenceNbr
).
select
(
BaseUnitLicence:
:
getItemCode
,
BaseEntity:
:
getSequenceNbr
));
.
eq
(
BaseUnitLicence:
:
getEnterpriseCertSeq
,
sequenceNbr
)
.
select
(
BaseUnitLicence:
:
getItemCode
,
BaseEntity:
:
getSequenceNbr
,
BaseUnitLicence:
:
getItemCode
,
BaseUnitLicence:
:
getItemCodeName
,
BaseUnitLicence:
:
getDictSeq
));
return
baseUnitLicences
.
stream
().
map
(
l
->{
DataDictionaryDto
dto
=
new
DataDictionaryDto
();
dto
.
setCode
(
l
.
getItemCode
());
...
...
@@ -820,6 +825,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
messageModel
.
setRoutePath
(
msgDetailPath
);
messageModel
.
setCompanyType
(
companyType
);
messageModel
.
setIsRead
(
false
);
messageModel
.
setIsSendWeb
(
true
);
messageFeignClient
.
create
(
messageModel
);
}
...
...
@@ -833,6 +839,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
certDtos
.
forEach
(
e
->
{
BaseEnterpriseCert
cert
=
new
BaseEnterpriseCert
();
BeanUtils
.
copyProperties
(
e
,
cert
);
cert
.
setUnitType
(
Optional
.
ofNullable
(
OpenBizTypeEnumV2
.
getOneByCode
(
jyjcOpeningApplication
.
getOpenBizType
())).
map
(
OpenBizTypeEnumV2:
:
getUnitType
).
orElse
(
null
));
cert
.
setQualificationCertificateAttachment
(
e
.
getQualificationCertificateAttachment
().
toJSONString
());
cert
.
setUnitCode
(
jyjcOpeningApplication
.
getUnitCode
());
if
(
cert
.
getSequenceNbr
()
==
null
)
{
...
...
@@ -859,12 +866,25 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
});
certs
.
add
(
cert
);
});
if
(!
enterpriseCertSeqs
.
isEmpty
())
{
baseUnitLicenceMapper
.
delete
(
new
LambdaQueryWrapper
<
BaseUnitLicence
>().
in
(
BaseUnitLicence:
:
getEnterpriseCertSeq
,
enterpriseCertSeqs
));
// 没修改前所有的证书(维度单位编码+单位类型)
List
<
Long
>
allCertSeqs
=
enterpriseCertService
.
list
(
new
LambdaQueryWrapper
<
BaseEnterpriseCert
>()
.
eq
(
BaseEnterpriseCert:
:
getUnitCode
,
jyjcOpeningApplication
.
getUnitCode
())
.
eq
(
BaseEnterpriseCert:
:
getUnitType
,
Optional
.
ofNullable
(
OpenBizTypeEnumV2
.
getOneByCode
(
jyjcOpeningApplication
.
getOpenBizType
()))
.
map
(
OpenBizTypeEnumV2:
:
getUnitType
).
orElse
(
null
))).
stream
().
map
(
BaseEnterpriseCert:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
// 先删除证书下对应的资质
if
(!
allCertSeqs
.
isEmpty
())
{
baseUnitLicenceMapper
.
delete
(
new
LambdaQueryWrapper
<
BaseUnitLicence
>().
in
(
BaseUnitLicence:
:
getEnterpriseCertSeq
,
allCertSeqs
));
}
// 再删除掉页面已经删除的证书,保留未删除的
enterpriseCertService
.
remove
(
new
LambdaQueryWrapper
<
BaseEnterpriseCert
>()
.
notIn
(!
enterpriseCertSeqs
.
isEmpty
(),
BaseEntity:
:
getSequenceNbr
,
enterpriseCertSeqs
)
.
eq
(
BaseEnterpriseCert:
:
getUnitCode
,
jyjcOpeningApplication
.
getUnitCode
())
.
eq
(
BaseEnterpriseCert:
:
getUnitType
,
Optional
.
ofNullable
(
OpenBizTypeEnumV2
.
getOneByCode
(
jyjcOpeningApplication
.
getOpenBizType
())).
map
(
OpenBizTypeEnumV2:
:
getUnitType
).
orElse
(
null
)));
// 保存证书
if
(!
certs
.
isEmpty
())
{
enterpriseCertService
.
saveOrUpdateBatch
(
certs
);
}
// 保存资质
if
(!
licences
.
isEmpty
())
{
licences
.
parallelStream
().
forEach
(
licence
->
{
baseUnitLicenceMapper
.
insert
(
licence
);
...
...
@@ -1202,4 +1222,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
public
String
getAppIdBySeq
(
Long
seq
)
{
TzBaseEnterpriseInfo
baseEnterpriseInfo
=
tzBaseEnterpriseInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>().
eq
(
TzBaseEnterpriseInfo:
:
getSequenceNbr
,
seq
).
select
(
BaseEntity:
:
getSequenceNbr
,
TzBaseEnterpriseInfo:
:
getAppId
));
return
baseEnterpriseInfo
.
getAppId
();
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment