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
55aba069
Commit
55aba069
authored
Nov 13, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):大屏-监督管理-登记证下钻-查看登记证详情-查看关联设备详情,设备检验和维保均未过期,错误显示红码;
parent
2a12743f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
SafetyProblemTracingGenServiceImpl.java
.../biz/service/impl/SafetyProblemTracingGenServiceImpl.java
+16
-9
No files found.
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 @
55aba069
...
...
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.SafetyProblemTracing
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.SafetyProblemTracingMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo
;
import
net.javacrumbs.shedlock.spring.annotation.SchedulerLock
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
...
...
@@ -45,6 +47,9 @@ public class SafetyProblemTracingGenServiceImpl{
@Autowired
EmqKeeper
emqKeeper
;
@Autowired
private
SafetyProblemTracingServiceImpl
safetyProblemTracingService
;
@Scheduled
(
cron
=
"0 0 1 * * ?"
)
@SchedulerLock
(
name
=
"executeSafetyProblemCheck"
,
lockAtMostFor
=
"PT5H"
,
lockAtLeastFor
=
"PT10M"
)
public
void
executeSafetyProblemCheck
()
{
...
...
@@ -85,16 +90,18 @@ public class SafetyProblemTracingGenServiceImpl{
logger
.
info
(
"正常数据条数:{}"
,
realRecordsMain
.
size
());
List
<
String
>
errorRecord
=
oldAllRecords
.
stream
().
filter
(
item
->
!
realRecordsMain
.
contains
(
item
)).
collect
(
Collectors
.
toList
());
logger
.
info
(
"异常数据条数---------------:{}"
,
errorRecord
.
size
());
idxBizJgOtherInfoService
.
lambdaUpdate
()
.
in
(
IdxBizJgOtherInfo:
:
getRecord
,
errorRecord
)
.
set
(
IdxBizJgOtherInfo:
:
getStatus
,
null
)
.
update
();
List
<
ESEquipmentCategoryDto
>
esEquipmentCategoryDto
=
Lists
.
newArrayList
();
for
(
ESEquipmentCategoryDto
equipmentCategoryDto
:
esEquipmentCategory
.
findAllById
(
errorRecord
))
{
equipmentCategoryDto
.
setProblemStatus
(
null
);
esEquipmentCategoryDto
.
add
(
equipmentCategoryDto
);
safetyProblemTracingService
.
lambdaUpdate
()
.
set
(
SafetyProblemTracing:
:
getProblemStatusCode
,
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())
.
set
(
SafetyProblemTracing:
:
getProblemStatus
,
SafetyProblemStatusEnum
.
HANDLED
.
getName
())
.
in
(
SafetyProblemTracing:
:
getSourceId
,
errorRecord
)
.
eq
(
SafetyProblemTracing:
:
getProblemTypeCode
,
SafetyProblemTypeEnum
.
WBCQ
.
getCode
()).
update
();
idxBizJgOtherInfoService
.
lambdaUpdate
().
set
(
IdxBizJgOtherInfo:
:
getStatus
,
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())
.
in
(
IdxBizJgOtherInfo:
:
getRecord
,
errorRecord
).
update
();
Iterable
<
ESEquipmentCategoryDto
>
equipEsDtoIter
=
esEquipmentCategory
.
findAllById
(
errorRecord
);
for
(
ESEquipmentCategoryDto
equipEsDto
:
equipEsDtoIter
)
{
equipEsDto
.
setProblemStatus
(
SafetyProblemStatusEnum
.
HANDLED
.
getCode
());
}
esEquipmentCategory
.
saveAll
(
e
sEquipmentCategoryDto
);
esEquipmentCategory
.
saveAll
(
e
quipEsDtoIter
);
logger
.
info
(
"修改正数据条数:{}"
,
errorRecord
.
size
());
}
...
...
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