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
098bb25c
Commit
098bb25c
authored
Nov 25, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jyjc):检验检测业务管理
1.按照要求进行调整
parent
e0bbb0a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
6 deletions
+62
-6
JyjcBizManageController.java
...t/module/jyjc/biz/controller/JyjcBizManageController.java
+13
-5
JyjcBizManageServiceImpl.java
...odule/jyjc/biz/service/impl/JyjcBizManageServiceImpl.java
+48
-0
logback-dev.xml
...s-boot-module-jyjc-biz/src/main/resources/logback-dev.xml
+1
-1
No files found.
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 @
098bb25c
...
...
@@ -100,11 +100,19 @@ public class JyjcBizManageController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{appSeq}/detectionRegion"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"开通区域维护-省局使用"
,
notes
=
"开通区域维护-省局使用"
)
public
ResponseModel
<
Boolean
>
detectionRegionEdit
(
@PathVariable
String
appSeq
,
@RequestParam
String
newDetectionRegion
)
{
return
ResponseHelper
.
buildResponse
(
jyjcBizManageService
.
detectionRegionEdit
(
appSeq
,
newDetectionRegion
));
@GetMapping
(
value
=
"/region/{appSeq}/detail"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"启用停用区域详情-省局使用"
,
notes
=
"启用停用区域详情-省局使用"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
regionDetail
(
@PathVariable
String
appSeq
)
{
return
ResponseHelper
.
buildResponse
(
jyjcBizManageService
.
regionDetail
(
appSeq
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/region/{appSeq}/status"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"启用停用区域维护-省局使用"
,
notes
=
"启用停用区域维护-省局使用"
)
@RestEventTrigger
(
value
=
"operateLogRestEventHandler"
)
public
ResponseModel
<
Boolean
>
regionStatusEdit
(
@PathVariable
String
appSeq
,
@RequestBody
Map
<
String
,
Object
>
data
)
{
return
ResponseHelper
.
buildResponse
(
jyjcBizManageService
.
regionStatusEdit
(
appSeq
,
data
));
}
...
...
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 @
098bb25c
...
...
@@ -9,6 +9,7 @@ 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.enums.LicenceStateEnum
;
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
;
...
...
@@ -58,6 +59,8 @@ public class JyjcBizManageServiceImpl {
private
final
DataDictionaryServiceImpl
dictionaryService
;
private
static
final
String
REGION_LIST_KEY
=
"regions"
;
public
IPage
<?>
pageList
(
Page
<
JyjcBizManageModel
>
page
,
CompanyBo
company
,
JyjcOpeningApplicationModel
model
)
{
Page
<
JyjcOpeningApplication
>
pageApp
=
new
Page
<>(
page
.
getCurrent
(),
page
.
getSize
());
...
...
@@ -311,4 +314,49 @@ public class JyjcBizManageServiceImpl {
return
map
;
}).
collect
(
Collectors
.
toList
());
}
public
Map
<
String
,
Object
>
regionDetail
(
String
appSeq
)
{
Map
<
String
,
Object
>
res
=
new
HashMap
<>();
JyjcOpeningApplication
openingApplication
=
openingApplicationService
.
getById
(
appSeq
);
Map
<
String
,
String
>
detectionRegionCodeNameMap
=
getDetectionRegionCodeNameMap
();
List
<
Map
<
String
,
Object
>>
regions
=
openingApplication
.
getDetectionRegion
().
stream
().
map
(
r
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"regionCode"
,
r
);
map
.
put
(
"regionName"
,
detectionRegionCodeNameMap
.
getOrDefault
(
r
,
""
));
map
.
put
(
"status"
,
Optional
.
ofNullable
(
openingApplication
.
getExclusionRegion
()).
orElse
(
new
ArrayList
<>()).
contains
(
r
)
?
String
.
valueOf
(
LicenceStateEnum
.
disabled
.
getValue
())
:
String
.
valueOf
(
LicenceStateEnum
.
enabled
.
getValue
()));
return
map
;
}).
collect
(
Collectors
.
toList
());
res
.
put
(
REGION_LIST_KEY
,
regions
);
return
res
;
}
public
Boolean
regionStatusEdit
(
String
appSeq
,
Map
<
String
,
Object
>
data
)
{
log
.
info
(
"省局企业区域调整权限, appSeq: {}, data: {}"
,
appSeq
,
data
);
String
lockKey
=
"app:region:lock:"
+
appSeq
;
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
try
{
boolean
isLocked
=
lock
.
tryLock
(
0
,
180
,
TimeUnit
.
SECONDS
);
// 解决并发问题:解决并发问题:多个人同时操作一个单据
if
(!
isLocked
)
{
throw
new
BadRequest
(
"其他机构同时在操作该业务,请稍后重试!"
);
}
JyjcOpeningApplication
openingApplication
=
openingApplicationService
.
getById
(
appSeq
);
List
<
JSONObject
>
regions
=
JSONObject
.
parseArray
(
JSONObject
.
toJSONString
(
data
.
get
(
REGION_LIST_KEY
)),
JSONObject
.
class
);
Set
<
String
>
exclusionRegion
=
new
HashSet
<>();
regions
.
forEach
(
r
->
{
if
(
LicenceStateEnum
.
disabled
.
getValue
()
==
r
.
getInteger
(
"status"
))
{
exclusionRegion
.
add
(
r
.
getString
(
"regionCode"
));
}
});
openingApplication
.
setExclusionRegion
(
new
ArrayList
<>(
exclusionRegion
));
openingApplicationService
.
saveOrUpdate
(
openingApplication
);
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"禁用企业区域失败:{}"
,
e
.
getMessage
(),
e
);
}
finally
{
if
(
lock
.
isLocked
()
&&
lock
.
isHeldByCurrentThread
())
{
lock
.
unlock
();
}
}
return
Boolean
.
TRUE
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/logback-dev.xml
View file @
098bb25c
...
...
@@ -50,7 +50,7 @@
<logger
name=
"com.yeejoin"
level=
"INFO"
/>
<!-- 日志输出级别 -->
<root
level=
"
INFO
"
>
<root
level=
"
ERROR
"
>
<!-- <appender-ref ref="FILE" /> -->
<appender-ref
ref=
"STDOUT"
/>
<!-- <appender-ref ref="ELK" />-->
...
...
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