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
f4b258a3
Commit
f4b258a3
authored
Aug 25, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg): 添加查询错误生成的安全追溯问题数据功能
- 方法功能:查询错误生成的安全追溯问题数据,包括资质超期、维保超期、检验超期和许可超期的问题 - 返回结果包含四种问题类型的错误数据集合
parent
c31b5bf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
+41
-3
SafetyProblemTracingController.java
...ule/jg/biz/controller/SafetyProblemTracingController.java
+7
-0
SafetyProblemTracingGenServiceImpl.java
.../biz/service/impl/SafetyProblemTracingGenServiceImpl.java
+34
-3
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/controller/SafetyProblemTracingController.java
View file @
f4b258a3
...
...
@@ -321,4 +321,11 @@ public class SafetyProblemTracingController extends BaseController {
safetyProblemTracingGenService
.
executeOverDesignLifeCheck
();
return
ResponseHelper
.
buildResponse
(
"success"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询错误生成的安全追溯问题数据"
,
notes
=
"查询错误生成的安全追溯问题数据"
)
@GetMapping
(
value
=
"/wrong/overdueData"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
wrongOverdueData
()
{
return
ResponseHelper
.
buildResponse
(
safetyProblemTracingGenService
.
wrongOverdueData
());
}
}
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 @
f4b258a3
...
...
@@ -124,14 +124,45 @@ public class SafetyProblemTracingGenServiceImpl{
logger
.
info
(
"企业许可超期检查结束"
);
}
public
Map
<
String
,
Object
>
wrongOverdueData
()
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
// 查询当天资质超期的人员数据
Set
<
String
>
realOutOfCertificationRecord
=
commonMapper
.
queryOutOfCertificationRecord
().
stream
().
map
(
m
->
m
.
get
(
"problemSourceId"
).
toString
()).
collect
(
Collectors
.
toSet
());
// 查询当天许可超期的企业许可数据
Set
<
String
>
realOutOfQualificationRecords
=
commonMapper
.
queryOutOfQualificationRecord
().
stream
().
map
(
m
->
m
.
get
(
"problemSourceId"
).
toString
()).
collect
(
Collectors
.
toSet
());
// 查询当天维保超期的企业许可数据
Set
<
String
>
realOutOfMaintenanceRecord
=
commonMapper
.
queryOutOfMaintenanceRecord
().
stream
().
map
(
m
->
m
.
get
(
"RECORD"
).
toString
()).
collect
(
Collectors
.
toSet
());
// 查询当天检验超期的企业许可数据
Set
<
String
>
realOutOfInspectRecord
=
commonMapper
.
queryOutOfInspectionRecord
().
stream
().
map
(
m
->
m
.
get
(
"RECORD"
).
toString
()).
collect
(
Collectors
.
toSet
());
// 查询未关闭的问题
List
<
SafetyProblemTracing
>
problemList
=
safetyProblemTracingService
.
list
(
new
LambdaQueryWrapper
<
SafetyProblemTracing
>()
.
select
(
SafetyProblemTracing:
:
getSequenceNbr
,
SafetyProblemTracing:
:
getProblemTypeCode
,
SafetyProblemTracing:
:
getSourceId
,
SafetyProblemTracing:
:
getPrincipalUnitCode
)
.
eq
(
SafetyProblemTracing:
:
getProblemStatusCode
,
SafetyProblemStatusEnum
.
UNHANDLED
.
getCode
())
.
eq
(
SafetyProblemTracing:
:
getIsDelete
,
Boolean
.
FALSE
));
if
(!
ValidationUtil
.
isEmpty
(
problemList
))
{
Set
<
Long
>
set1
=
problemList
.
stream
().
filter
(
p
->
p
.
getProblemTypeCode
().
equals
(
SafetyProblemTypeEnum
.
ZZCQ
.
getProblemTypeCode
())
&&
!
realOutOfCertificationRecord
.
contains
(
p
.
getSourceId
())).
map
(
SafetyProblemTracing:
:
getSequenceNbr
).
collect
(
Collectors
.
toSet
());
Set
<
Long
>
set2
=
problemList
.
stream
().
filter
(
p
->
p
.
getProblemTypeCode
().
equals
(
SafetyProblemTypeEnum
.
WBCQ
.
getProblemTypeCode
())
&&
!
realOutOfMaintenanceRecord
.
contains
(
p
.
getSourceId
())).
map
(
SafetyProblemTracing:
:
getSequenceNbr
).
collect
(
Collectors
.
toSet
());
Set
<
Long
>
set3
=
problemList
.
stream
().
filter
(
p
->
p
.
getProblemTypeCode
().
equals
(
SafetyProblemTypeEnum
.
JYCQ
.
getProblemTypeCode
())
&&
!
realOutOfInspectRecord
.
contains
(
p
.
getSourceId
())).
map
(
SafetyProblemTracing:
:
getSequenceNbr
).
collect
(
Collectors
.
toSet
());
Set
<
Long
>
set4
=
problemList
.
stream
().
filter
(
p
->
p
.
getProblemTypeCode
().
equals
(
SafetyProblemTypeEnum
.
XKCQ
.
getProblemTypeCode
())
&&
!
realOutOfQualificationRecords
.
contains
(
p
.
getSourceId
())).
map
(
SafetyProblemTracing:
:
getSequenceNbr
).
collect
(
Collectors
.
toSet
());
result
.
put
(
"zzcq"
,
set1
);
result
.
put
(
"wbqc"
,
set2
);
result
.
put
(
"jyqc"
,
set3
);
result
.
put
(
"xkqc"
,
set4
);
}
return
result
;
}
public
void
repairPersonnelQualificationOverdueProblem
()
{
logger
.
info
(
"开始人员资质超期数据修正"
);
// 查询当天资质超期的人员数据
List
<
Map
<
String
,
Object
>>
outOf
QualificationRecords
=
commonMapper
.
queryOutOfCertificationRecord
();
if
(
ValidationUtil
.
isEmpty
(
outOf
QualificationRecords
))
{
List
<
Map
<
String
,
Object
>>
outOf
CertificationRecord
=
commonMapper
.
queryOutOfCertificationRecord
();
if
(
ValidationUtil
.
isEmpty
(
outOf
CertificationRecord
))
{
return
;
}
Set
<
String
>
realOutOfQualificationRecord
=
outOf
QualificationRecords
.
stream
().
map
(
m
->
m
.
get
(
"problemSourceId"
).
toString
()).
collect
(
Collectors
.
toSet
());
Set
<
String
>
realOutOfQualificationRecord
=
outOf
CertificationRecord
.
stream
().
map
(
m
->
m
.
get
(
"problemSourceId"
).
toString
()).
collect
(
Collectors
.
toSet
());
// 需要修正业务表的数据
List
<
String
>
correctData
=
Lists
.
newArrayList
();
List
<
SafetyProblemTracing
>
problemList
=
safetyProblemTracingService
.
list
(
new
LambdaQueryWrapper
<
SafetyProblemTracing
>()
...
...
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