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
8ec4cb71
Commit
8ec4cb71
authored
Dec 06, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员赋码携带具体信息
parent
4a509e7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
22 deletions
+78
-22
BizMessage.java
...om/yeejoin/amos/boot/module/jxiop/api/dto/BizMessage.java
+1
-0
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+77
-22
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/BizMessage.java
View file @
8ec4cb71
...
...
@@ -23,4 +23,5 @@ public class BizMessage {
*/
String
dataSource
;
private
String
traceId2
;
private
String
extAttr2
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
8ec4cb71
...
...
@@ -203,22 +203,48 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
Integer
isOver
=
0
;
CertificationInfo
personCertificate
=
model
.
getPersonCertificate
();
// 过期的证书
List
<
String
>
overCertificateList
=
new
ArrayList
<>();
// 临期证书
List
<
String
>
inMonthCertificateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
personCertificate
.
getCertificationInfo
()))
{
for
(
PersonCertificate
item
:
personCertificate
.
getCertificationInfo
())
{
int
validPeriod
=
StringUtils
.
isEmpty
(
item
.
getValidPeriod
())
?
3
:
Integer
.
parseInt
(
item
.
getValidPeriod
());
Date
date
=
DateUtils
.
dateAddYears
(
item
.
getCertificateTime
(),
validPeriod
);
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
-
1
)
{
isOver
=
1
;
}
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateBetweenIncludeToday
(
new
Date
(),
date
)
<
Integer
.
valueOf
(
certificatesMap
.
get
(
item
.
getCertificateName
()))
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
1
)
{
isInMonth
=
1
;
if
(
StringUtils
.
isNotEmpty
(
item
.
getValidPeriod
())
&&
!
Objects
.
isNull
(
item
.
getCertificateTime
()))
{
int
validPeriod
=
StringUtils
.
isEmpty
(
item
.
getValidPeriod
())
?
3
:
Integer
.
parseInt
(
item
.
getValidPeriod
());
Date
date
=
DateUtils
.
dateAddYears
(
item
.
getCertificateTime
(),
validPeriod
);
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
-
1
)
{
isOver
=
1
;
overCertificateList
.
add
(
item
.
getCertificateName
());
}
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateBetweenIncludeToday
(
new
Date
(),
date
)
<
Integer
.
valueOf
(
certificatesMap
.
get
(
item
.
getCertificateName
()))
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
1
)
{
isInMonth
=
1
;
inMonthCertificateList
.
add
(
item
.
getCertificateName
());
}
}
list
.
remove
(
item
.
getCertificateName
());
}
}
// 缺证
List
<
String
>
noCertificateList
=
new
ArrayList
<>(
list
);
List
<
String
>
strings
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
overCertificateList
))
{
strings
.
add
(
"过期证书:"
+
String
.
join
(
","
,
overCertificateList
));
}
if
(
CollectionUtils
.
isNotEmpty
(
inMonthCertificateList
))
{
strings
.
add
(
"临期证书:"
+
String
.
join
(
","
,
inMonthCertificateList
));
}
if
(
CollectionUtils
.
isNotEmpty
(
noCertificateList
))
{
strings
.
add
(
"缺少证书:"
+
String
.
join
(
","
,
noCertificateList
));
}
String
join
=
""
;
if
(
CollectionUtils
.
isNotEmpty
(
strings
))
{
join
=
"("
+
String
.
join
(
";"
,
strings
)
+
")"
;
}
if
(
CollectionUtils
.
isEmpty
(
list
)
&&
isInMonth
==
0
&&
isOver
==
0
)
{
personBasic
.
setQrcodeColor
(
QrcodeColorEnum
.
GREEN
.
getCode
());
personBasic
.
setQrcodeDesc
(
"证书齐全"
);
...
...
@@ -252,6 +278,7 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
RiskBizInfoVo
riskBizInfoVo
=
fetchData
(
personBasic
,
personAccount
);
bizMessage
.
setBizInfo
(
riskBizInfoVo
);
bizMessage
.
setTraceId
(
String
.
valueOf
(
personBasic
.
getSequenceNbr
()));
bizMessage
.
setExtAttr2
(
join
);
try
{
emqKeeper
.
getMqttClient
().
publish
(
RYFM_DATA_MQTT_TOPIC
,
JSON
.
toJSONString
(
bizMessage
).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
...
...
@@ -397,24 +424,51 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
//人员资质信息
Integer
isInMonth
=
0
;
Integer
isOver
=
0
;
// 过期的证书
List
<
String
>
overCertificateList
=
new
ArrayList
<>();
// 临期证书
List
<
String
>
inMonthCertificateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
personCertificate
.
getCertificationInfo
()))
{
for
(
PersonCertificate
item
:
personCertificate
.
getCertificationInfo
())
{
int
validPeriod
=
StringUtils
.
isEmpty
(
item
.
getValidPeriod
())
?
3
:
Integer
.
parseInt
(
item
.
getValidPeriod
());
Date
date
=
DateUtils
.
dateAddYears
(
item
.
getCertificateTime
(),
validPeriod
);
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
-
1
)
{
isOver
=
1
;
if
(
StringUtils
.
isNotEmpty
(
item
.
getValidPeriod
())
&&
!
Objects
.
isNull
(
item
.
getCertificateTime
()))
{
int
validPeriod
=
StringUtils
.
isEmpty
(
item
.
getValidPeriod
())
?
3
:
Integer
.
parseInt
(
item
.
getValidPeriod
());
Date
date
=
DateUtils
.
dateAddYears
(
item
.
getCertificateTime
(),
validPeriod
);
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
-
1
)
{
isOver
=
1
;
overCertificateList
.
add
(
item
.
getCertificateName
());
}
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateBetweenIncludeToday
(
new
Date
(),
date
)
<
Integer
.
valueOf
(
certificatesMap
.
get
(
item
.
getCertificateName
()))
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
1
)
{
isInMonth
=
1
;
inMonthCertificateList
.
add
(
item
.
getCertificateName
());
}
item
.
setPersonId
(
personBasic
.
getSequenceNbr
());
personCertificateService
.
save
(
item
);
}
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateBetweenIncludeToday
(
new
Date
(),
date
)
<
Integer
.
valueOf
(
certificatesMap
.
get
(
item
.
getCertificateName
()))
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
1
)
{
isInMonth
=
1
;
}
item
.
setPersonId
(
personBasic
.
getSequenceNbr
());
personCertificateService
.
save
(
item
);
list
.
remove
(
item
.
getCertificateName
());
}
}
// 缺证
List
<
String
>
noCertificateList
=
new
ArrayList
<>(
list
);
List
<
String
>
strings
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
overCertificateList
))
{
strings
.
add
(
"过期证书:"
+
String
.
join
(
","
,
overCertificateList
));
}
if
(
CollectionUtils
.
isNotEmpty
(
inMonthCertificateList
))
{
strings
.
add
(
"临期证书:"
+
String
.
join
(
","
,
inMonthCertificateList
));
}
if
(
CollectionUtils
.
isNotEmpty
(
noCertificateList
))
{
strings
.
add
(
"缺少证书:"
+
String
.
join
(
","
,
noCertificateList
));
}
String
join
=
""
;
if
(
CollectionUtils
.
isNotEmpty
(
strings
))
{
join
=
"("
+
String
.
join
(
";"
,
strings
)
+
")"
;
}
CompanyModel
companyModel
=
new
CompanyModel
();
//单位
companyModel
=
this
.
getCompanyModel
(
personAccount
.
getProjectId
());
...
...
@@ -508,6 +562,7 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
RiskBizInfoVo
riskBizInfoVo
=
fetchData
(
personBasic
,
personAccount
);
bizMessage
.
setBizInfo
(
riskBizInfoVo
);
bizMessage
.
setDataSource
(
"人员赋码"
);
bizMessage
.
setExtAttr2
(
join
);
try
{
emqKeeper
.
getMqttClient
().
publish
(
PersonBasicServiceImpl
.
RYFM_DATA_MQTT_TOPIC
,
JSON
.
toJSONString
(
bizMessage
).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
...
...
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