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
505579ff
Commit
505579ff
authored
Mar 27, 2026
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg): 修复气瓶合规性检查服务调用问题
- 移除查询条件中的 IS_INTO_MANAGEMENT 筛选条件 - 在查询使用登记证管理数据时增加逻辑删除过滤和按日期降序排序 - 修改合规性检查方法的错误处理逻辑 - 统一错误消息格式为 errorMsg 字段 - 添加对远程服务调用异常的捕获和处理 - 增加服务调用失败时的详细日志记录
parent
76f2e70b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
TmCylinderInfoService.java
.../amos/api/openapi/face/service/TmCylinderInfoService.java
+20
-7
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+2
-2
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TmCylinderInfoService.java
View file @
505579ff
...
...
@@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -130,14 +131,26 @@ public class TmCylinderInfoService extends MyBaseServiceImpl<TmCylinderInfoModel
* @return 合规性检查结果
*/
public
Object
complianceCheck
(
Map
<
String
,
List
<
String
>>
sequenceCodes
)
{
if
(!
ValidationUtil
.
isEmpty
(
sequenceCodes
)
&&
!
ValidationUtil
.
isEmpty
(
sequenceCodes
.
get
(
"sequenceCodes"
)))
{
List
<
String
>
sequenceCodeList
=
sequenceCodes
.
get
(
"sequenceCodes"
);
if
(
sequenceCodeList
.
size
()
>
100
)
{
return
new
HashMap
<
String
,
Object
>()
{{
put
(
"result"
,
"请不要一次性提交超过100个气瓶."
);
}};
try
{
if
(!
ValidationUtil
.
isEmpty
(
sequenceCodes
)
&&
!
ValidationUtil
.
isEmpty
(
sequenceCodes
.
get
(
"sequenceCodes"
)))
{
List
<
String
>
sequenceCodeList
=
sequenceCodes
.
get
(
"sequenceCodes"
);
if
(
sequenceCodeList
.
size
()
>
100
)
{
return
new
HashMap
<
String
,
Object
>()
{{
put
(
"errorMsg"
,
"请不要一次性提交超过 100 个气瓶."
);
}};
}
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
response
=
jgServiceFeignClient
.
cylinderComplianceCheck
(
sequenceCodeList
);
if
(
response
==
null
||
response
.
getResult
()
==
null
)
{
log
.
error
(
"气瓶合规性检查服务调用失败,返回结果为空。请查看监管服务详细日志"
);
return
new
HashMap
<
String
,
Object
>()
{{
put
(
"errorMsg"
,
"气瓶合规性检查服务暂时不可用,请稍后重试"
);
}};
}
return
response
.
getResult
();
}
return
jgServiceFeignClient
.
cylinderComplianceCheck
(
sequenceCodeList
).
getResult
();
}
catch
(
Exception
e
)
{
log
.
error
(
"气瓶合规性检查服务调用失败"
,
e
);
throw
new
BadRequest
(
"气瓶合规性检查服务暂时不可用,请稍后重试"
);
}
return
Lists
.
newArrayList
();
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
505579ff
...
...
@@ -3404,7 +3404,6 @@ public class CommonServiceImpl implements ICommonService {
List
<
Map
<
String
,
Object
>>
result
=
Lists
.
newArrayList
();
try
{
BoolQueryBuilder
boolQuery
=
QueryBuilders
.
boolQuery
();
boolQuery
.
must
(
QueryBuilders
.
termQuery
(
"IS_INTO_MANAGEMENT"
,
true
));
for
(
String
sequenceCode
:
sequenceCodes
)
{
String
[]
keys
=
sequenceCode
.
split
(
"-"
,
2
);
BoolQueryBuilder
combinationQuery
=
QueryBuilders
.
boolQuery
()
...
...
@@ -3464,12 +3463,13 @@ public class CommonServiceImpl implements ICommonService {
}
}
});
log
.
info
(
"查询的气瓶对应使用登记证号集合:{}"
,
useRegistrationList
);
// 查询合规气瓶使用登记证的发证登记机关
useRegistrationList
=
useRegistrationList
.
stream
().
filter
(
code
->
!
ValidationUtil
.
isEmpty
(
code
)).
collect
(
Collectors
.
toSet
());
if
(
ValidationUtil
.
isEmpty
(
useRegistrationList
))
{
return
result
;
}
List
<
JgUseRegistrationManage
>
manageList
=
jgUseRegistrationManageMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>().
in
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useRegistrationList
));
List
<
JgUseRegistrationManage
>
manageList
=
jgUseRegistrationManageMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>().
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
false
).
in
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useRegistrationList
).
orderByDesc
(
JgUseRegistrationManage:
:
getRecDate
));
if
(!
ValidationUtil
.
isEmpty
(
manageList
))
{
result
.
forEach
(
map
->
{
manageList
.
stream
().
filter
(
i
->
i
.
getUseRegistrationCode
().
equals
(
map
.
get
(
"useRegistrationCode"
))).
findFirst
().
ifPresent
(
i
->
map
.
put
(
"registrationAuthority"
,
i
.
getReceiveOrgName
()));
...
...
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