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
4b9f939d
Commit
4b9f939d
authored
Jul 24, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(safety): 修复追溯单重复生成问题
- 修改了检验检测超期和维保超期检查的逻辑 - 排除了追溯表中未处理的超期设备记录
parent
36bcb92d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+0
-1
SafetyProblemTracingGenServiceImpl.java
.../biz/service/impl/SafetyProblemTracingGenServiceImpl.java
+17
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
4b9f939d
...
...
@@ -1123,7 +1123,6 @@
) tt on tt."RECORD" = ui."RECORD"
WHERE si."ORG_BRANCH_CODE" like '50%'
AND oi."CLAIM_STATUS" not in ('草稿','已拒领','待认领')
AND (oi."STATUS" is null or oi."STATUS" = '1')
AND tt."NEXT_INSPECT_DATE" is not null
</select>
<select
id=
"countBizFinishedNumForDP"
resultType=
"java.lang.Long"
>
...
...
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/SafetyProblemTracingGenServiceImpl.java
View file @
4b9f939d
...
...
@@ -82,16 +82,33 @@ public class SafetyProblemTracingGenServiceImpl{
public
void
executeInspectionCheck
()
{
logger
.
info
(
"开始检验检测超期检查"
);
Set
<
String
>
outOfInspectionEquipIds
=
safetyProblemTracingService
.
getBaseMapper
().
selectList
(
new
LambdaQueryWrapper
<
SafetyProblemTracing
>()
.
select
(
SafetyProblemTracing:
:
getSourceId
)
.
eq
(
SafetyProblemTracing:
:
getProblemStatusCode
,
SafetyProblemStatusEnum
.
UNHANDLED
.
getCode
())
.
eq
(
SafetyProblemTracing:
:
getProblemTypeCode
,
SafetyProblemTypeEnum
.
JYCQ
.
getProblemTypeCode
()))
.
stream
().
map
(
SafetyProblemTracing:
:
getSourceId
).
collect
(
Collectors
.
toSet
());
// 查询当天检验超期的设备
List
<
Map
<
String
,
Object
>>
outOfInspectionRecords
=
commonMapper
.
queryOutOfInspectionRecord
();
// 追溯表里未处理的检验超期设备需要排除在外
outOfInspectionRecords
.
removeIf
(
item
->
outOfInspectionEquipIds
.
contains
(
String
.
valueOf
(
item
.
get
(
"RECORD"
))));
updateEquipAndSendMessage
(
outOfInspectionRecords
,
SafetyProblemTypeEnum
.
JYCQ
);
logger
.
info
(
"检验检测超期检查结束"
);
}
public
void
executeMaintenanceCheck
()
{
logger
.
info
(
"开始维保超期检查"
);
Set
<
String
>
outOfMaintenanceEquipIds
=
safetyProblemTracingService
.
getBaseMapper
().
selectList
(
new
LambdaQueryWrapper
<
SafetyProblemTracing
>()
.
select
(
SafetyProblemTracing:
:
getSourceId
)
.
eq
(
SafetyProblemTracing:
:
getProblemStatusCode
,
SafetyProblemStatusEnum
.
UNHANDLED
.
getCode
())
.
eq
(
SafetyProblemTracing:
:
getProblemTypeCode
,
SafetyProblemTypeEnum
.
WBCQ
.
getProblemTypeCode
()))
.
stream
().
map
(
SafetyProblemTracing:
:
getSourceId
).
collect
(
Collectors
.
toSet
());
// 查询当天维保超期的设备
List
<
Map
<
String
,
Object
>>
outOfMaintenanceRecords
=
commonMapper
.
queryOutOfMaintenanceRecord
();
// 追溯表里未处理的维保超期设备需要排除在外
outOfMaintenanceRecords
.
removeIf
(
item
->
outOfMaintenanceEquipIds
.
contains
(
String
.
valueOf
(
item
.
get
(
"RECORD"
))));
updateEquipAndSendMessage
(
outOfMaintenanceRecords
,
SafetyProblemTypeEnum
.
WBCQ
);
logger
.
info
(
"维保超期检查结束"
);
}
...
...
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