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
22d55049
Commit
22d55049
authored
Nov 21, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jyjc):检验检测业务管理
1.联调测试
parent
d7a6004d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
30 deletions
+91
-30
BizCommonConstant.java
...n/amos/boot/module/jyjc/api/common/BizCommonConstant.java
+11
-0
JyjcBizManageModel.java
...n/amos/boot/module/jyjc/api/model/JyjcBizManageModel.java
+5
-0
JyjcOpeningApplicationModel.java
...ot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
+4
-1
JyjcBizManageController.java
...t/module/jyjc/biz/controller/JyjcBizManageController.java
+18
-14
JyjcBizManageServiceImpl.java
...odule/jyjc/biz/service/impl/JyjcBizManageServiceImpl.java
+53
-15
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/common/BizCommonConstant.java
View file @
22d55049
...
...
@@ -132,4 +132,15 @@ public interface BizCommonConstant {
* 西安
*/
String
XA_ORG_CODE
=
"50*52"
;
/**
* 开通区域平台字典
*/
String
OPEN_REGION_CODE_DICT_KEY
=
"CITY_REGION_WITH_SPECIAL"
;
/**
* 检验机构分类
*/
String
JYJGFL_DICT_KEY
=
"JYJGFL"
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcBizManageModel.java
View file @
22d55049
...
...
@@ -16,4 +16,9 @@ public class JyjcBizManageModel extends JyjcOpeningApplicationModel {
* 公司code
*/
private
String
companyCode
;
/**
* 机构分类名称
*/
private
String
agencyClassifyName
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
View file @
22d55049
...
...
@@ -42,7 +42,10 @@ public class JyjcOpeningApplicationModel extends BaseModel {
@ApiModelProperty
(
value
=
"排除的区域编码"
)
private
List
<
String
>
exclusionRegion
;
@ApiModelProperty
(
value
=
"检测区域名称(冗余)"
)
@ApiModelProperty
(
value
=
"排除的区域名称"
)
private
String
exclusionRegionName
;
@ApiModelProperty
(
value
=
"检测区域名称"
)
private
String
detectionRegionName
;
@ApiModelProperty
(
value
=
"申请单号"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcBizManageController.java
View file @
22d55049
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
...
...
@@ -54,11 +55,12 @@ public class JyjcBizManageController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/{appSeq}/licence
-edit
"
)
@ApiOperation
(
httpMethod
=
"P
U
T"
,
value
=
"资质停起用-省局使用"
,
notes
=
"资质停起用-省局使用"
)
@PostMapping
(
value
=
"/{appSeq}/licence"
)
@ApiOperation
(
httpMethod
=
"P
OS
T"
,
value
=
"资质停起用-省局使用"
,
notes
=
"资质停起用-省局使用"
)
public
ResponseModel
<
Boolean
>
licenceEdit
(
@PathVariable
String
appSeq
,
@RequestBody
List
<
BaseUnitLicence
>
licences
)
{
return
ResponseHelper
.
buildResponse
(
jyjcBizManageService
.
licenceEdit
(
appSeq
,
licences
));
@RequestBody
Map
<
String
,
Object
>
updateDto
)
{
List
<
BaseUnitLicence
>
lis
=
JSONObject
.
parseArray
(
JSONObject
.
toJSONString
(
updateDto
.
get
(
"licences"
)),
BaseUnitLicence
.
class
);
return
ResponseHelper
.
buildResponse
(
jyjcBizManageService
.
licenceEdit
(
appSeq
,
lis
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
@@ -68,16 +70,9 @@ public class JyjcBizManageController extends BaseController {
return
ResponseHelper
.
buildResponse
(
jyjcBizManageService
.
getBasicInfo
(
appSeq
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{appSeq}/detail"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"开通详情"
,
notes
=
"开通详情"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getOne
(
@PathVariable
String
appSeq
)
{
return
ResponseHelper
.
buildResponse
(
jyjcBizManageService
.
licenceDetail
(
appSeq
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{appSeq}/licence
-detail
"
)
@GetMapping
(
value
=
"/{appSeq}/licence"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"资质详情-省局使用"
,
notes
=
"资质详情-省局使用"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
licenceDetail
(
@PathVariable
String
appSeq
)
{
return
ResponseHelper
.
buildResponse
(
jyjcBizManageService
.
licenceDetail
(
appSeq
));
...
...
@@ -85,7 +80,7 @@ public class JyjcBizManageController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{appSeq}/expireDate
Edit
"
)
@PutMapping
(
value
=
"/{appSeq}/expireDate"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"业务有效期维护-省局使用"
,
notes
=
"业务有效期维护-省局使用"
)
public
ResponseModel
<
Boolean
>
expireDateEdit
(
@PathVariable
String
appSeq
,
@RequestParam
String
newExpiryDate
)
{
...
...
@@ -93,7 +88,7 @@ public class JyjcBizManageController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{appSeq}/detectionRegion
Edit
"
)
@PutMapping
(
value
=
"/{appSeq}/detectionRegion"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"开通区域维护-省局使用"
,
notes
=
"开通区域维护-省局使用"
)
public
ResponseModel
<
Boolean
>
detectionRegionEdit
(
@PathVariable
String
appSeq
,
@RequestParam
String
newDetectionRegion
)
{
...
...
@@ -101,4 +96,13 @@ public class JyjcBizManageController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{appSeq}/detail"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"开通详情"
,
notes
=
"开通详情"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getOne
(
@PathVariable
String
appSeq
)
{
return
ResponseHelper
.
buildResponse
(
jyjcBizManageService
.
getOne
(
appSeq
));
}
}
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/JyjcBizManageServiceImpl.java
View file @
22d55049
...
...
@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.constant.TZSCommonConstant
;
import
com.yeejoin.amos.boot.module.common.api.dto.BaseEnterpriseCertDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.common.BizCommonConstant
;
...
...
@@ -19,6 +21,8 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import
com.yeejoin.amos.boot.module.ymt.api.entity.BaseUnitLicence
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.BaseUnitLicenceMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -32,6 +36,9 @@ import java.util.*;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
common
.
BizCommonConstant
.
JYJGFL_DICT_KEY
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
common
.
BizCommonConstant
.
OPEN_REGION_CODE_DICT_KEY
;
@Service
@RequiredArgsConstructor
@Slf4j
...
...
@@ -49,6 +56,9 @@ public class JyjcBizManageServiceImpl {
private
final
BaseUnitLicenceMapper
baseUnitLicenceMapper
;
private
final
DataDictionaryServiceImpl
dictionaryService
;
public
IPage
<?>
pageList
(
Page
<
JyjcBizManageModel
>
page
,
CompanyBo
company
,
JyjcOpeningApplicationModel
model
)
{
Page
<
JyjcOpeningApplication
>
pageApp
=
new
Page
<>(
page
.
getCurrent
(),
page
.
getSize
());
LambdaQueryWrapper
<
JyjcOpeningApplication
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -56,12 +66,18 @@ public class JyjcBizManageServiceImpl {
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
queryWrapper
.
like
(
StringUtils
.
isNotEmpty
(
model
.
getUnitCodeName
()),
JyjcOpeningApplication:
:
getUnitCodeName
,
model
.
getUnitCodeName
());
queryWrapper
.
eq
(
StringUtils
.
isNotEmpty
(
model
.
getOpenBizType
()),
JyjcOpeningApplication:
:
getOpenBizType
,
model
.
getOpenBizType
());
queryWrapper
.
orderByDesc
(
BaseEntity:
:
getSequenceNbr
);
IPage
<
JyjcOpeningApplication
>
res
=
openingApplicationService
.
page
(
pageApp
,
queryWrapper
);
Map
<
String
,
String
>
detectionRegionCodeNameMap
=
getDetectionRegionCodeNameMap
();
Map
<
String
,
String
>
agencyClassifyNameCodeNameMap
=
getAgencyClassifyNameCodeNameMap
();
List
<
JyjcBizManageModel
>
manageModels
=
res
.
getRecords
().
stream
().
map
(
r
->
{
JyjcBizManageModel
bizManageModel
=
BeanUtil
.
copyProperties
(
r
,
JyjcBizManageModel
.
class
);
setAreaStatusByIdentify
(
company
,
r
,
bizManageModel
);
bizManageModel
.
setCompanyCode
(
company
.
getCompanyCode
());
bizManageModel
.
setOpenBizTypeName
(
Optional
.
of
(
OpenBizTypeEnumV2
.
getOneByCode
(
bizManageModel
.
getOpenBizType
())).
map
(
OpenBizTypeEnumV2:
:
getDescription
).
orElse
(
""
));
bizManageModel
.
setDetectionRegionName
(
this
.
buildDetectionRegionName
(
detectionRegionCodeNameMap
,
r
.
getDetectionRegion
()));
bizManageModel
.
setExclusionRegionName
(
this
.
buildDetectionRegionName
(
detectionRegionCodeNameMap
,
r
.
getExclusionRegion
()));
bizManageModel
.
setAgencyClassifyName
(
agencyClassifyNameCodeNameMap
.
getOrDefault
(
bizManageModel
.
getAgencyClassify
(),
""
));
return
bizManageModel
;
}).
collect
(
Collectors
.
toList
());
page
.
setRecords
(
manageModels
);
...
...
@@ -69,6 +85,20 @@ public class JyjcBizManageServiceImpl {
return
page
;
}
private
Map
<
String
,
String
>
getAgencyClassifyNameCodeNameMap
()
{
List
<
DataDictionary
>
dict
=
dictionaryService
.
getByType
(
JYJGFL_DICT_KEY
);
return
dict
.
stream
().
collect
(
Collectors
.
toMap
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getName
));
}
private
static
Map
<
String
,
String
>
getDetectionRegionCodeNameMap
()
{
List
<
DictionarieValueModel
>
detectionRegions
=
Systemctl
.
dictionarieClient
.
dictValues
(
OPEN_REGION_CODE_DICT_KEY
).
getResult
();
return
detectionRegions
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
}
private
String
buildDetectionRegionName
(
Map
<
String
,
String
>
detectionRegionCodeNameMap
,
List
<
String
>
regionCodes
)
{
return
Optional
.
ofNullable
(
regionCodes
).
map
(
r
->
r
.
stream
().
map
(
detectionRegionCodeNameMap:
:
get
).
collect
(
Collectors
.
joining
(
","
))).
orElse
(
""
);
}
private
static
void
setAreaStatusByIdentify
(
CompanyBo
company
,
JyjcOpeningApplication
r
,
JyjcBizManageModel
bizManageModel
)
{
if
(
TZSCommonConstant
.
SHAN_XI_REGION_CODE
.
equals
(
company
.
getCompanyCode
()))
{
bizManageModel
.
setAreaStatus
(
QY
);
...
...
@@ -108,10 +138,9 @@ public class JyjcBizManageServiceImpl {
if
(
exclusionRegion
!=
null
)
{
exclusionRegion
.
remove
(
company
.
getCompanyCode
());
}
openingApplicationService
.
update
(
new
LambdaUpdateWrapper
<
JyjcOpeningApplication
>()
.
eq
(
BaseEntity:
:
getSequenceNbr
,
appSeq
)
.
set
(
JyjcOpeningApplication:
:
getDetectionRegion
,
detectionRegionSet
)
.
set
(
JyjcOpeningApplication:
:
getExclusionRegion
,
exclusionRegion
));
openingApplication
.
setDetectionRegion
(
new
ArrayList
<>(
detectionRegionSet
));
openingApplication
.
setExclusionRegion
(
exclusionRegion
);
openingApplicationService
.
saveOrUpdate
(
openingApplication
);
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"启用企业区域失败:{}"
,
e
.
getMessage
(),
e
);
...
...
@@ -139,12 +168,11 @@ public class JyjcBizManageServiceImpl {
detectionRegion
.
remove
(
company
.
getCompanyCode
());
}
List
<
String
>
exclusionRegion
=
openingApplication
.
getExclusionRegion
();
Set
<
String
>
exclusionRegionSet
=
new
HashSet
<>(
exclusionRegion
);
exclusionRegion
.
add
(
company
.
getCompanyCode
());
openingApplicationService
.
update
(
new
LambdaUpdateWrapper
<
JyjcOpeningApplication
>()
.
eq
(
BaseEntity:
:
getSequenceNbr
,
appSeq
)
.
set
(
JyjcOpeningApplication:
:
getDetectionRegion
,
detectionRegion
)
.
set
(
JyjcOpeningApplication:
:
getExclusionRegion
,
exclusionRegionSet
));
Set
<
String
>
exclusionRegionSet
=
Optional
.
ofNullable
(
exclusionRegion
).
map
(
HashSet:
:
new
).
orElse
(
new
HashSet
<>());
exclusionRegionSet
.
add
(
company
.
getCompanyCode
());
openingApplication
.
setDetectionRegion
(
detectionRegion
);
openingApplication
.
setExclusionRegion
(
new
ArrayList
<>(
exclusionRegionSet
));
openingApplicationService
.
saveOrUpdate
(
openingApplication
);
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"禁用企业区域失败:{}"
,
e
.
getMessage
(),
e
);
}
finally
{
...
...
@@ -185,7 +213,14 @@ public class JyjcBizManageServiceImpl {
}
});
}
res
.
put
(
"licences"
,
baseUnitLicences
);
List
<
Map
<
String
,
Object
>>
licences
=
baseUnitLicences
.
stream
().
map
(
e
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
BeanUtil
.
copyProperties
(
e
,
map
);
map
.
put
(
"licenceState"
,
String
.
valueOf
(
e
.
getLicenceState
()));
map
.
put
(
"qualificationCertificateAttachment"
,
JSONObject
.
parseArray
(
e
.
getQualificationCertificateAttachment
()));
return
map
;
}).
collect
(
Collectors
.
toList
());
res
.
put
(
"licences"
,
licences
);
return
res
;
}
...
...
@@ -198,10 +233,9 @@ public class JyjcBizManageServiceImpl {
}
public
Boolean
detectionRegionEdit
(
String
appSeq
,
String
newDetectionRegion
)
{
LambdaUpdateWrapper
<
JyjcOpeningApplication
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
appSeq
);
updateWrapper
.
set
(
JyjcOpeningApplication:
:
getDetectionRegion
,
newDetectionRegion
);
openingApplicationService
.
update
(
updateWrapper
);
JyjcOpeningApplication
openingApplication
=
openingApplicationService
.
getById
(
appSeq
);
openingApplication
.
setDetectionRegion
(
Arrays
.
stream
(
newDetectionRegion
.
split
(
","
)).
collect
(
Collectors
.
toList
()));
openingApplicationService
.
saveOrUpdate
(
openingApplication
);
return
Boolean
.
TRUE
;
}
...
...
@@ -209,4 +243,8 @@ public class JyjcBizManageServiceImpl {
JyjcOpeningApplication
openingApplication
=
openingApplicationService
.
getById
(
appSeq
);
return
BeanUtil
.
copyProperties
(
openingApplication
,
JyjcBizManageModel
.
class
);
}
public
Map
<
String
,
Object
>
getOne
(
String
appSeq
)
{
return
null
;
}
}
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