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
57583781
Commit
57583781
authored
Dec 06, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://36.40.66.175:5000/moa/amos-boot-biz
into developer
parents
5f93fb15
8ec4cb71
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
150 additions
and
42 deletions
+150
-42
JpInverterMapper.java
...i/householdapi/face/orm/mapper/hygf/JpInverterMapper.java
+3
-0
ImasterDataServiceImpl.java
...ouseholdapi/face/service/impl/ImasterDataServiceImpl.java
+3
-0
PersonnelBusinessServiceImpl.java
...e/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
+39
-7
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+16
-10
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+11
-3
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-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/mapper/hygf/JpInverterMapper.java
View file @
57583781
...
...
@@ -2,6 +2,9 @@ package com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpInverter
;
import
org.apache.ibatis.annotations.Select
;
public
interface
JpInverterMapper
extends
BaseMapper
<
JpInverter
>
{
@Select
(
"SELECT sum(current_power) FROM hygf_jp_inverter WHERE third_code='HW'"
)
Double
getHuaWeiStationCurrentPower
();
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/ImasterDataServiceImpl.java
View file @
57583781
...
...
@@ -269,6 +269,9 @@ public class ImasterDataServiceImpl implements ImasterDataService {
for
(
ImasterInverterListDetails
imasterInverterListDetails
:
result4
)
{
active_power
=
active_power
+
(
imasterInverterListDetails
.
getActive_power
()
!=
null
?
imasterInverterListDetails
.
getActive_power
()
:
0.0
);
}
if
(
active_power
<=
0
){
active_power
=
jpInverterMapper
.
getHuaWeiStationCurrentPower
();
}
jpStation
.
setRealTimePower
(
active_power
);
jpStation
.
setAccumulatedPower
(
imasterStationDetail
.
getTotal_power
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
View file @
57583781
...
...
@@ -286,9 +286,17 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
uo
);
lisk
.
add
(
publicAgencyUser
.
getAmosOrgCode
());
lisk
.
add
(
re
.
getRegionalCompaniesCode
());
stdUserEmpower
.
setAmosUserId
(
publicAgencyUser
.
getAmosUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
if
(
stdUserEmpower
!=
null
){
stdUserEmpower
.
setAmosUserId
(
publicAgencyUser
.
getAmosUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
}
else
{
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
.
setAmosUserId
(
publicAgencyUser
.
getAmosUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
}
...
...
@@ -362,14 +370,38 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
uo
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
publicAgencyUsex
.
getAmosUserId
());
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
uo
);
li
=
stdUserEmpower
.
getAmosOrgCode
();
stdUserEmpower
.
setAmosOrgCode
(
null
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
if
(
stdUserEmpower
!=
null
){
stdUserEmpower
.
setAmosOrgCode
(
null
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
}
else
{
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
.
setAmosOrgCode
(
null
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
}
//新管理员新增
LambdaQueryWrapper
<
StdUserEmpower
>
uo1
=
new
LambdaQueryWrapper
();
uo1
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
publicAgencyUse
.
getAmosUserId
());
StdUserEmpower
stdUserEmpower1
=
userEmpowerMapper
.
selectOne
(
uo1
);
stdUserEmpower1
.
setAmosOrgCode
(
li
);
userEmpowerMapper
.
updateById
(
stdUserEmpower1
);
if
(
stdUserEmpower1
!=
null
){
stdUserEmpower1
.
setAmosOrgCode
(
li
);
userEmpowerMapper
.
updateById
(
stdUserEmpower1
);
}
else
{
stdUserEmpower1
=
new
StdUserEmpower
();
stdUserEmpower1
.
setAmosOrgCode
(
li
);
userEmpowerMapper
.
insert
(
stdUserEmpower1
);
}
UserMessage
userMessage
=
new
UserMessage
(
TaskTypeStationEnum
.
设置管理员
.
getCode
(),
personnelBusines
.
getSequenceNbr
()
,
publicAgencyUse
.
getAmosUserId
(),
new
Date
(),
"您已成为单位管理员。"
,
personnelBusines
.
getAmosUnitOrgCode
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
57583781
...
...
@@ -396,18 +396,24 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
try
{
Map
<
String
,
Object
>
flowLoggerMap
=
workflowFeignClient
.
getFlowLogger
(
processInstanceId
).
getResult
();
List
<
LinkedHashMap
>
flowLogger
=
(
List
<
LinkedHashMap
>)
flowLoggerMap
.
get
(
"flowLogger"
);
flowLogger
=
flowLogger
.
stream
().
map
(
i
->
{
i
.
put
(
"approvalStatue"
,
i
.
get
(
"approvalStatue"
).
toString
().
equals
(
"0"
)?
"通过"
:
"驳回"
);
//审核意见
List
<
LinkedHashMap
>
approvalSuggestion
=
(
List
<
LinkedHashMap
>)
i
.
get
(
"approvalSuggestion"
);
if
(
approvalSuggestion
!=
null
&&!
approvalSuggestion
.
isEmpty
()){
i
.
put
(
"approvalSuggestion"
,
approvalSuggestion
.
get
(
0
).
get
(
"message"
));
List
<
LinkedHashMap
>
flowLoggernew
=
new
ArrayList
<>();
for
(
LinkedHashMap
linkedHashMap
:
flowLogger
)
{
if
(
linkedHashMap
.
get
(
"operateDate"
)!=
null
&&!
linkedHashMap
.
get
(
"operateDate"
).
toString
().
isEmpty
()){
LinkedHashMap
linke
=
new
LinkedHashMap
();
linke
.
put
(
"approvalStatue"
,
linkedHashMap
.
get
(
"approvalStatue"
).
toString
().
equals
(
"0"
)?
"通过"
:
"驳回"
);
//审核意见
List
<
LinkedHashMap
>
approvalSuggestion
=
(
List
<
LinkedHashMap
>)
linkedHashMap
.
get
(
"approvalSuggestion"
);
if
(
approvalSuggestion
!=
null
&&!
approvalSuggestion
.
isEmpty
()){
linke
.
put
(
"approvalSuggestion"
,
approvalSuggestion
.
get
(
0
).
get
(
"message"
));
}
linke
.
put
(
"taskName"
,
linkedHashMap
.
get
(
"taskName"
).
toString
());
linke
.
put
(
"operator"
,
linkedHashMap
.
get
(
"operator"
).
toString
());
linke
.
put
(
"operateDate"
,
linkedHashMap
.
get
(
"operateDate"
).
toString
());
flowLoggernew
.
add
(
linke
);
}
}
return
i
;
}).
collect
(
Collectors
.
toList
());
LoggerDto
loggerDto
=
new
LoggerDto
();
loggerDto
.
setLogger
(
flowLogger
);
loggerDto
.
setLogger
(
flowLogger
new
);
surveyInfoAllDto
.
setOrderTracking
(
loggerDto
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
View file @
57583781
...
...
@@ -760,9 +760,17 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
uo
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
unitInfo
.
getAdminUserId
());
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
uo
);
lisk
.
add
(
unitInfo
.
getAmosCompanyCode
());
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
if
(
stdUserEmpower
!=
null
){
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
userEmpowerMapper
.
updateById
(
stdUserEmpower
);
}
else
{
stdUserEmpower
=
new
StdUserEmpower
();
stdUserEmpower
.
setAmosUserId
(
unitInfo
.
getAdminUserId
());
stdUserEmpower
.
setAmosOrgCode
(
lisk
);
userEmpowerMapper
.
insert
(
stdUserEmpower
);
}
return
true
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/BizMessage.java
View file @
57583781
...
...
@@ -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 @
57583781
...
...
@@ -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