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
b0f8c8d0
Commit
b0f8c8d0
authored
Nov 16, 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
d3439d39
fe71f339
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
215 additions
and
133 deletions
+215
-133
UserEmpowerInterceptor.java
...s/boot/module/hygf/api/config/UserEmpowerInterceptor.java
+1
-3
StdUserEmpower.java
...join/amos/boot/module/hygf/api/entity/StdUserEmpower.java
+2
-0
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+4
-1
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+1
-1
HouseholdContractController.java
...dule/hygf/biz/controller/HouseholdContractController.java
+5
-5
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+21
-7
QiyuesuoController.java
...s/boot/module/hygf/biz/controller/QiyuesuoController.java
+7
-7
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+1
-1
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+15
-10
application-dev.properties
...le-hygf-biz/src/main/resources/application-dev.properties
+1
-1
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+2
-2
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+27
-22
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+10
-10
FanHealthIndexDay.xml
...src/main/resources/mapper/tdengine2/FanHealthIndexDay.xml
+1
-1
PersonBasic.java
...eejoin/amos/boot/module/jxiop/api/entity/PersonBasic.java
+6
-0
PersonQrCodeController.java
...t/module/jxiop/biz/controller/PersonQrCodeController.java
+11
-4
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+19
-2
overviewGF.json
...iop-bigscreen-biz/src/main/resources/json/overviewGF.json
+1
-1
PersonYardMessage.java
...in/amos/boot/module/jxiop/biz/emqx/PersonYardMessage.java
+16
-7
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+64
-48
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/config/UserEmpowerInterceptor.java
View file @
b0f8c8d0
...
...
@@ -90,7 +90,7 @@ public class UserEmpowerInterceptor implements Interceptor {
}
}
}
else
{
throw
new
BadRequest
(
"权限认证失败!参数之间关系不能为空"
)
;
sqldata
=
" "
;
}
}
}
...
...
@@ -144,8 +144,6 @@ public class UserEmpowerInterceptor implements Interceptor {
sq
=
getCondition
(
filed
[
i
],
fileCondition
[
i
],
data
);
sql
.
add
(
sq
);
}
}
else
{
throw
new
BadRequest
(
"权限认证失败!"
);
}
return
sql
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/StdUserEmpower.java
View file @
b0f8c8d0
...
...
@@ -36,4 +36,6 @@ public class StdUserEmpower extends BaseEntity {
private
List
<
String
>
amosOrgCode
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
b0f8c8d0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DropDown
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
...
...
@@ -51,5 +53,6 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
Map
<
String
,
Object
>
getcount
(
JpStationDto
reviewDto
);
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
List
<
JpStationDto
>
queryForDealerReviewPagenew
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
@UserLimits
List
<
JpStationDto
>
queryForDealerReviewPagenew
(
@Param
(
"dto"
)
JpStationDto
reviewDto
,
Page
<
JpStationDto
>
pa
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
b0f8c8d0
...
...
@@ -504,7 +504,7 @@
`cumulative_income` cumulativeIncome,
`email`,
rated_power ratedPower,
ROUND(`real_time_power`/rated
P
ower,3) fullhour,
ROUND(`real_time_power`/rated
_p
ower,3) fullhour,
(select privilege_company.COMPANY_NAME from privilege_company where privilege_company.ORG_CODE=hygf_jp_station.regional_companies_code) regionalCompaniesName
from hygf_jp_station
<where>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HouseholdContractController.java
View file @
b0f8c8d0
...
...
@@ -182,7 +182,7 @@ public class HouseholdContractController extends BaseController {
//去签署
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"
post
"
,
value
=
"根据sequenceNbr发起"
,
notes
=
"根据sequenceNbr发起"
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"根据sequenceNbr发起"
,
notes
=
"根据sequenceNbr发起"
)
public
ResponseModel
<
HouseholdContractDto
>
qsBySequenceNbrHouseholdContract
(
@RequestBody
HouseholdContractDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
householdContractServiceImpl
.
updateWithModel
(
model
));
...
...
@@ -191,7 +191,7 @@ public class HouseholdContractController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/signing/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"P
ost
"
,
value
=
"签字"
,
notes
=
"签字"
)
@ApiOperation
(
httpMethod
=
"P
OST
"
,
value
=
"签字"
,
notes
=
"签字"
)
public
ResponseModel
<
Boolean
>
signing
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
HouseholdContract
householdContrac
=
householdContractServiceImpl
.
getById
(
sequenceNbr
);
...
...
@@ -207,7 +207,7 @@ public class HouseholdContractController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/stamp/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"P
ost
"
,
value
=
"盖章"
,
notes
=
"盖章"
)
@ApiOperation
(
httpMethod
=
"P
OST
"
,
value
=
"盖章"
,
notes
=
"盖章"
)
public
ResponseModel
<
Boolean
>
stamp
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
...
...
@@ -250,7 +250,7 @@ public class HouseholdContractController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/cancel/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"P
ost
"
,
value
=
"作废"
,
notes
=
"作废"
)
@ApiOperation
(
httpMethod
=
"P
OST
"
,
value
=
"作废"
,
notes
=
"作废"
)
public
ResponseModel
<
Boolean
>
cancel
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
this
.
canceldata
(
sequenceNbr
));
}
...
...
@@ -298,7 +298,7 @@ public class HouseholdContractController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/reissue"
)
@ApiOperation
(
httpMethod
=
"
post
"
,
value
=
"重新发起"
,
notes
=
"重新发起"
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"重新发起"
,
notes
=
"重新发起"
)
public
ResponseModel
<
HouseholdContract
>
reissue
(
@RequestBody
HouseholdContract
model
)
{
HouseholdContract
householdContract
=
householdContractServiceImpl
.
reissueinitiateHouseholdContract
(
model
);
return
ResponseHelper
.
buildResponse
(
householdContract
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
b0f8c8d0
...
...
@@ -374,11 +374,18 @@ public class JpStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限区域公司"
,
notes
=
"查询当前登录人权限区域公司"
)
@GetMapping
(
value
=
"/getRegion"
)
@UserLimits
public
ResponseModel
<
List
<
DropDown
>>
getRegion
()
{
public
ResponseModel
<
List
<
Map
<
String
,
String
>
>>
getRegion
()
{
List
<
DropDown
>
list
=
jpStationMapper
.
getRegion
();
return
ResponseHelper
.
buildResponse
(
list
);
List
<
Map
<
String
,
String
>>
result
=
new
ArrayList
<>();
list
.
forEach
(
dropDown
->
{
Map
<
String
,
String
>
item
=
new
HashMap
<>();
item
.
put
(
"text"
,
dropDown
.
getName
());
item
.
put
(
"value"
,
dropDown
.
getOrgCode
());
result
.
add
(
item
);
});
return
ResponseHelper
.
buildResponse
(
result
);
}
...
...
@@ -387,9 +394,16 @@ public class JpStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限经销商"
,
notes
=
"查询当前登录人权限经销商"
)
@GetMapping
(
value
=
"/getDealer"
)
@UserLimits
public
ResponseModel
<
List
<
DropDown
>>
getDealer
(
String
regionalCompaniesCode
)
{
public
ResponseModel
<
List
<
Map
<
String
,
String
>
>>
getDealer
(
String
regionalCompaniesCode
)
{
List
<
DropDown
>
list
=
jpStationMapper
.
getDealer
(
regionalCompaniesCode
);
return
ResponseHelper
.
buildResponse
(
list
);
List
<
Map
<
String
,
String
>>
result
=
new
ArrayList
<>();
list
.
forEach
(
dropDown
->
{
Map
<
String
,
String
>
item
=
new
HashMap
<>();
item
.
put
(
"text"
,
dropDown
.
getName
());
item
.
put
(
"value"
,
dropDown
.
getOrgCode
());
result
.
add
(
item
);
});
return
ResponseHelper
.
buildResponse
(
result
);
}
//电站发电量统计
...
...
@@ -616,8 +630,8 @@ public class JpStationController extends BaseController {
@GetMapping
(
value
=
"/test"
)
public
Object
getPowerqx
(
JpStationDto
reviewDto
)
{
return
jpStationMapper
.
getJpStation
(
null
)
;
List
<
JpStation
>
list
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
return
list
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/QiyuesuoController.java
View file @
b0f8c8d0
...
...
@@ -89,7 +89,7 @@ public class QiyuesuoController extends BaseController {
private
String
engineering
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"
post
"
,
value
=
"个人token"
,
notes
=
"个人token"
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"个人token"
,
notes
=
"个人token"
)
@PostMapping
(
value
=
"/getUserToken"
)
public
ResponseModel
<
Object
>
getSdkResponse
(
@RequestBody
UserAuthMiniappTicketRequest
request
)
{
...
...
@@ -99,7 +99,7 @@ public class QiyuesuoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"
post
"
,
value
=
"合同token"
,
notes
=
"合同token"
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"合同token"
,
notes
=
"合同token"
)
@PostMapping
(
value
=
"/getContractToken"
)
public
ResponseModel
<
Object
>
getContractSdkResponse
(
@RequestBody
ContractMiniappTicketRequest
request
)
{
...
...
@@ -108,7 +108,7 @@ public class QiyuesuoController extends BaseController {
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"
post
"
,
value
=
"合同token"
,
notes
=
"合同token"
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"合同token"
,
notes
=
"合同token"
)
@PostMapping
(
value
=
"/getContractTokengz/{sequenceNbr}"
)
public
ResponseModel
<
Object
>
getContractSdkResponseSequenceNbr
(
@RequestBody
ContractMiniappTicketRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
...
...
@@ -122,7 +122,7 @@ public class QiyuesuoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"
post
"
,
value
=
"创建合同"
,
notes
=
"创建合同"
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"创建合同"
,
notes
=
"创建合同"
)
@PostMapping
(
value
=
"/addContract"
)
public
ResponseModel
<
HouseholdContract
>
initiateHouseholdContract
(
@RequestBody
HouseholdContractDto
model
)
{
HouseholdContract
householdContract
=
householdContractServiceImpl
.
initiateHouseholdContract
(
model
);
...
...
@@ -132,7 +132,7 @@ public class QiyuesuoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"
post
"
,
value
=
"契约锁回调接口"
,
notes
=
"契约锁回调接口"
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"契约锁回调接口"
,
notes
=
"契约锁回调接口"
)
@PostMapping
(
value
=
"/callback"
)
public
String
callback
(
String
content
)
{
try
{
...
...
@@ -231,7 +231,7 @@ public class QiyuesuoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"
post
"
,
value
=
"获取经销商单位"
,
notes
=
"liebiao "
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"获取经销商单位"
,
notes
=
"liebiao "
)
@PostMapping
(
value
=
"/getUnit1000"
)
public
ResponseModel
<
ContractListResult
>
getUnit1000
(
@RequestBody
ContractListRequest
request
)
{
...
...
@@ -268,7 +268,7 @@ public class QiyuesuoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"
post
"
,
value
=
"创建合同"
,
notes
=
"创建合同"
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"创建合同"
,
notes
=
"创建合同"
)
@PostMapping
(
value
=
"/getUnit2000"
)
public
ResponseModel
<
SdkResponse
<
Object
>>
getUnit2000
(
@RequestBody
Map
<
String
,
String
>
map
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpInverterServiceImpl.java
View file @
b0f8c8d0
...
...
@@ -238,7 +238,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
for
(
int
i
=
0
;
i
<
jpInverterList
.
size
();
i
++)
{
JpInverter
jpInverter
=
jpInverterList
.
get
(
i
);
Map
<
String
,
String
>
item
=
new
HashMap
<>();
if
(
StringUtils
.
isNot
Empty
(
jpInverter
.
getSnCode
().
trim
()))
{
if
(
StringUtils
.
isNot
Blank
(
jpInverter
.
getSnCode
().
trim
()))
{
item
.
put
(
"name"
,
jpInverter
.
getSnCode
().
trim
());
item
.
put
(
"value"
,
jpInverter
.
getSnCode
().
trim
());
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpStationServiceImpl.java
View file @
b0f8c8d0
...
...
@@ -77,17 +77,22 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
/**
* 分页查询
*/
@UserLimits
public
Page
<
JpStationDto
>
queryForJpStationPagenew
(
int
pageNum
,
int
pageSize
,
JpStationDto
reviewDto
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
List
<
JpStationDto
>
list
=
jpStationMapper
.
queryForDealerReviewPagenew
(
reviewDto
);
PageInfo
<
JpStationDto
>
page
=
new
PageInfo
(
list
);
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JpStationDto
>
pagenew
=
new
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JpStationDto
>();
pagenew
.
setCurrent
(
pageNum
);
pagenew
.
setTotal
(
page
.
getTotal
());
pagenew
.
setSize
(
pageSize
);
pagenew
.
setRecords
(
page
.
getList
());
return
pagenew
;
Page
<
JpStationDto
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
JpStationDto
>
list
=
jpStationMapper
.
queryForDealerReviewPagenew
(
reviewDto
,
page
);
page
.
setRecords
(
list
);
// PageInfo<JpStationDto> page = new PageInfo(list);
// com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto>();
// pagenew.setCurrent(pageNum);
// pagenew.setTotal(page.getTotal());
// pagenew.setSize(pageSize);
// pagenew.setRecords(page.getList());
return
page
;
}
@Override
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev.properties
View file @
b0f8c8d0
## DB properties:
spring.datasource.dynamic.primary
=
mysql-service
spring.datasource.mysql-service.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.mysql-service.jdbc-url
=
jdbc:mysql://172.16.10.220:3306/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.mysql-service.jdbc-url
=
jdbc:mysql://172.16.10.220:3306/amos_project
_2023
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.mysql-service.username
=
root
spring.datasource.mysql-service.password
=
Yeejoin@2020
spring.datasource.mysql-service.type
=
com.zaxxer.hikari.HikariDataSource
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/BigScreenAnalyseController.java
View file @
b0f8c8d0
...
...
@@ -202,7 +202,7 @@ public class BigScreenAnalyseController extends BaseController {
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthInfoByArea
()
throws
Exception
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getHealthInfoByArea
();
Map
<
String
,
Integer
>
collect
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"area"
).
toString
(),
t
->
Integer
.
valueOf
(
t
.
get
(
"healthIndex"
).
toString
().
replace
(
".0"
,
""
)
)));
Map
<
String
,
Object
>
collect
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"area"
).
toString
(),
t
->
t
.
get
(
"healthIndex"
)));
// List<String> list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
List
<
String
>
list
=
new
ArrayList
<>();
...
...
@@ -220,7 +220,7 @@ public class BigScreenAnalyseController extends BaseController {
}
list
=
companyModels
.
stream
().
map
(
CompanyModel:
:
getCompanyName
).
collect
(
Collectors
.
toList
());
List
<
Object
>
seriesData
=
new
ArrayList
<>();
list
.
forEach
(
item
->
seriesData
.
add
(
collect
.
getOrDefault
(
item
,
100
)));
list
.
forEach
(
item
->
seriesData
.
add
(
collect
.
getOrDefault
(
item
,
100
.0
)));
resultMap
.
put
(
"axisData"
,
list
);
resultMap
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TDBigScreenAnalyseController.java
View file @
b0f8c8d0
...
...
@@ -4,6 +4,7 @@ import static com.yeejoin.amos.boot.biz.common.utils.DateUtils.DATE_TIME_PATTERN
import
java.io.UnsupportedEncodingException
;
import
java.sql.Timestamp
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -121,22 +122,23 @@ public class TDBigScreenAnalyseController extends BaseController {
@Autowired
private
IdxBizPvWarningRuleSetServiceImpl
idxBizPvWarningRuleSetService
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"#.0"
);
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 仪表盘"
,
notes
=
"场站设备健康状态指数与趋势 - 仪表盘"
)
@GetMapping
(
value
=
"/getHealthScoreInfo"
)
public
ResponseModel
<
Map
<
String
,
Integer
>>
getHealthScoreInfo
(
@RequestParam
(
required
=
false
)
String
areaCode
,
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthScoreInfo
(
@RequestParam
(
required
=
false
)
String
areaCode
,
@RequestParam
(
required
=
false
)
String
stationCode
,
@RequestParam
(
required
=
false
)
String
tableName
)
{
HashMap
<
String
,
Integer
>
stringBigDecimalHashMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
stringBigDecimalHashMap
=
new
HashMap
<>();
if
(
CharSequenceUtil
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
getFanGatewayId
();
stringBigDecimalHashMap
.
put
(
"value"
,
Integer
.
valueOf
(
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByStation
(
stationCode
,
tableName
)
.
toString
().
replace
(
".0"
,
""
))
);
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByStation
(
stationCode
,
tableName
));
return
ResponseHelper
.
buildResponse
(
stringBigDecimalHashMap
);
}
stringBigDecimalHashMap
.
put
(
"value"
,
Integer
.
valueOf
(
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByLatest
(
areaCode
,
stationCode
)
.
toString
().
replace
(
".0"
,
""
))
);
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByLatest
(
areaCode
,
stationCode
));
return
ResponseHelper
.
buildResponse
(
stringBigDecimalHashMap
);
}
...
...
@@ -144,16 +146,23 @@ public class TDBigScreenAnalyseController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 折线图"
,
notes
=
"场站设备健康状态指数与趋势 - 折线图"
)
@GetMapping
(
value
=
"/getHealthListInfo"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthListInfo
(
@RequestParam
(
required
=
false
)
String
areaCode
,
@RequestParam
(
required
=
false
)
String
stationCode
,
@RequestParam
(
required
=
false
)
String
analysisType
,
@RequestParam
(
required
=
false
)
String
stationCode
,
@RequestParam
(
required
=
false
)
String
area
,
@RequestParam
(
required
=
false
)
String
station
,
@RequestParam
(
required
=
false
)
String
analysisType
,
@RequestParam
(
required
=
false
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
Date
startTime
,
@RequestParam
(
required
=
false
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
Date
endTime
)
{
if
(
StrUtil
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
getFanGatewayId
();
}
else
if
(
StrUtil
.
isNotEmpty
(
station
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectOne
(
new
LambdaQueryWrapper
<
StationBasic
>()
.
like
(
StationBasic:
:
getStationName
,
station
.
substring
(
0
,
station
.
length
()
-
1
)));
stationCode
=
stationBasic
.
getFanGatewayId
();
}
if
(
StrUtil
.
isNotEmpty
(
areaCode
))
{
areaCode
=
"%"
+
areaCode
+
"%"
;
}
else
if
(
StrUtil
.
isNotEmpty
(
area
))
{
areaCode
=
"%"
+
area
+
"%"
;
}
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
...
...
@@ -293,12 +302,8 @@ public class TDBigScreenAnalyseController extends BaseController {
@GetMapping
(
value
=
"/getHealthInfoByArea"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthInfoByArea
()
throws
Exception
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
// List<Map<String, Object>> healthListInfo =
// idxBizFanHealthIndexMapper.getHealthInfoByArea();
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexDayMapper
.
getHealthInfoByArea
();
Map
<
String
,
Integer
>
collect
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"area"
).
toString
(),
t
->
Integer
.
valueOf
(
t
.
get
(
"healthIndex"
).
toString
().
replace
(
".0"
,
""
))));
// List<String> list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getHealthInfoByArea
();
Map
<
String
,
Object
>
collect
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"area"
).
toString
(),
t
->
t
.
get
(
"healthIndex"
)));
List
<
String
>
list
=
new
ArrayList
<>();
...
...
@@ -315,7 +320,7 @@ public class TDBigScreenAnalyseController extends BaseController {
}
list
=
companyModels
.
stream
().
map
(
CompanyModel:
:
getCompanyName
).
collect
(
Collectors
.
toList
());
List
<
Object
>
seriesData
=
new
ArrayList
<>();
list
.
forEach
(
item
->
seriesData
.
add
(
collect
.
getOrDefault
(
item
,
100
)));
list
.
forEach
(
item
->
seriesData
.
add
(
collect
.
getOrDefault
(
item
,
100
.0
)));
resultMap
.
put
(
"axisData"
,
list
);
resultMap
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
...
...
@@ -424,7 +429,7 @@ public class TDBigScreenAnalyseController extends BaseController {
List
<
Object
>
seriesData
=
new
ArrayList
<>();
healthListInfo
.
forEach
(
item
->
{
list
.
add
(
item
.
get
(
"station"
).
toString
());
seriesData
.
add
(
item
.
get
(
"healthIndex"
)
.
toString
().
replace
(
".0"
,
""
)
);
seriesData
.
add
(
item
.
get
(
"healthIndex"
));
});
resultMap
.
put
(
"axisData"
,
list
);
resultMap
.
put
(
"seriesData"
,
seriesData
);
...
...
@@ -563,8 +568,8 @@ public class TDBigScreenAnalyseController extends BaseController {
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getSubSystemInfo
(
equipmentName
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
Integer
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"subSystem"
),
t
->
Integer
.
valueOf
(
t
.
get
(
"healthIndex"
).
toString
().
replace
(
".0"
,
""
)
)));
Map
<
Object
,
Object
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"subSystem"
),
t
->
t
.
get
(
"healthIndex"
)));
List
<
Object
>
seriesData
=
new
ArrayList
<>();
List
<
Object
>
axisData
=
new
ArrayList
<>();
...
...
@@ -572,7 +577,7 @@ public class TDBigScreenAnalyseController extends BaseController {
List
<
Map
<
String
,
Object
>>
equipmentList
=
idxBizFanHealthIndexMapper
.
getSumSystemListByEquipment
(
stationBasic
.
getFanGatewayId
(),
equipmentName
);
equipmentList
.
forEach
(
item
->
{
Integer
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"subSystem"
),
10
0
);
Object
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"subSystem"
),
100.
0
);
seriesData
.
add
(
equipmentHealthScore
);
axisData
.
add
(
item
.
get
(
"subSystem"
));
});
...
...
@@ -671,7 +676,7 @@ public class TDBigScreenAnalyseController extends BaseController {
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getPvSubSystemInfo
(
subarray
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
Object
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"equipmentName"
),
t
->
t
.
get
(
"avgHealthIndex"
)
.
toString
().
replace
(
".0"
,
""
)
));
.
toMap
(
t
->
t
.
get
(
"equipmentName"
),
t
->
t
.
get
(
"avgHealthIndex"
)));
List
<
Object
>
seriesData
=
new
ArrayList
<>();
List
<
Object
>
axisData
=
new
ArrayList
<>();
...
...
@@ -679,7 +684,7 @@ public class TDBigScreenAnalyseController extends BaseController {
List
<
Map
<
String
,
Object
>>
equipmentList
=
idxBizFanHealthIndexMapper
.
getPvSumSystemListByEquipment
(
stationBasic
.
getFanGatewayId
(),
subarray
);
equipmentList
.
forEach
(
item
->
{
Object
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"equipmentName"
),
100
);
Object
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"equipmentName"
),
100
.0
);
seriesData
.
add
(
equipmentHealthScore
);
axisData
.
add
(
item
.
get
(
"equipmentName"
));
});
...
...
@@ -758,8 +763,8 @@ public class TDBigScreenAnalyseController extends BaseController {
}
catch
(
ParseException
e
)
{
}
time
.
add
(
date
);
String
value
=
CharSequenceUtil
.
isEmpty
(
item
.
get
(
"healthindex"
).
toString
()
.
replace
(
".0"
,
""
))
?
"10
0"
:
item
.
get
(
"healthindex"
).
toString
()
.
replace
(
".0"
,
""
)
;
String
value
=
CharSequenceUtil
.
isEmpty
(
item
.
get
(
"healthindex"
).
toString
()
)
?
"100.
0"
:
item
.
get
(
"healthindex"
).
toString
();
valueList
.
add
(
value
);
});
List
<
Map
<
String
,
Object
>>
arrayList
=
new
ArrayList
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
b0f8c8d0
...
...
@@ -119,7 +119,7 @@
</select>
<select
id=
"getHealthScoreInfoByStation"
resultType=
"java.math.BigDecimal"
>
SELECT
CEILING(IFNULL( HEALTH_INDEX , 100 )
) AS healthIndex
round(IFNULL( HEALTH_INDEX , 100 ), 1
) AS healthIndex
FROM
${tableName}
<where>
...
...
@@ -205,11 +205,11 @@
</select>
<select
id=
"getHealthInfoByArea"
resultType=
"java.util.Map"
>
SELECT ARAE as area,
CEILING(avg(a.avgHealthIndex)
) AS healthIndex
round(avg(a.avgHealthIndex), 1
) AS healthIndex
FROM (
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
ARAE
FROM
idx_biz_fan_health_index
FROM
fan_health_index_latest_data
WHERE ANALYSIS_OBJ_TYPE = '片区'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, "%Y-%m-%d") = CURRENT_DATE
...
...
@@ -218,7 +218,7 @@
(
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
ARAE
FROM
idx_biz_pv_health_index
FROM
pv_health_index_latest_data
WHERE ANALYSIS_OBJ_TYPE = '片区'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, "%Y-%m-%d") = CURRENT_DATE
...
...
@@ -267,14 +267,14 @@
<select
id=
"getHealthInfoByStation"
resultType=
"java.util.Map"
>
SELECT
a.STATION as station,
CEILING(avg( a.avgHealthIndex )
) AS healthIndex
round(avg( a.avgHealthIndex ), 1
) AS healthIndex
FROM
(
SELECT
IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
STATION
FROM
idx_biz_fan_health_index
fan_health_index_latest_data
<where>
ANALYSIS_OBJ_TYPE = '场站'
AND ANALYSIS_TYPE = '按天'
...
...
@@ -290,7 +290,7 @@
IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
STATION
FROM
idx_biz_pv_health_index
pv_health_index_latest_data
<where>
ANALYSIS_OBJ_TYPE = '场站'
AND ANALYSIS_TYPE = '按天'
...
...
@@ -434,7 +434,7 @@
</select>
<select
id=
"getSubSystemInfo"
resultType=
"java.util.Map"
>
SELECT
CEILING(IFNULL( HEALTH_INDEX, 100 )
) AS healthIndex,
round(IFNULL( HEALTH_INDEX, 100 ), 1
) AS healthIndex,
SUB_SYSTEM AS subSystem
FROM
fan_health_index_latest_data
...
...
@@ -599,7 +599,7 @@
</select>
<select
id=
"getPvSubSystemInfo"
resultType=
"java.util.Map"
>
SELECT
CEILING(IFNULL( AVG( HEALTH_INDEX ), 100 )
) AS avgHealthIndex,
round(IFNULL( AVG( HEALTH_INDEX ), 100 ), 1
) AS avgHealthIndex,
EQUIPMENT_NAME AS equipmentName
FROM
pv_health_index_latest_data
...
...
@@ -1538,7 +1538,7 @@
</select>
<select
id=
"getHealthScoreInfoByLatest"
resultType=
"java.math.BigDecimal"
>
SELECT
CEILING(avg( a.avgHealthIndex )
) AS healthIndex
round(avg( a.avgHealthIndex ), 1
) AS healthIndex
FROM
(
SELECT
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndexDay.xml
View file @
b0f8c8d0
...
...
@@ -4,7 +4,7 @@
<select
id=
"getHealthInfoByArea"
resultType=
"java.util.Map"
>
select area as area,
ceil(avg(a.avghealthindex)
) as healthIndex
avg(a.avghealthindex
) as healthIndex
from (
select avg(health_index) as avghealthindex,
area
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/entity/PersonBasic.java
View file @
b0f8c8d0
...
...
@@ -161,4 +161,10 @@ public class PersonBasic extends BaseEntity {
*/
@TableField
(
"qrcode_desc"
)
private
String
qrcodeDesc
;
/**
* 赋码颜色描述
*/
@TableField
(
"qrcode_date"
)
private
Date
qrcodeDate
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/PersonQrCodeController.java
View file @
b0f8c8d0
...
...
@@ -27,6 +27,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -284,8 +285,11 @@ public class PersonQrCodeController extends BaseController {
item
.
put
(
"name"
,
name
);
item
.
put
(
"faultInfo"
,
"该存在缺陷或者告警"
);
item
.
put
(
"faultLevel"
,
"严重"
);
if
(!
Objects
.
isNull
(
score
))
{
item
.
put
(
"mark"
,
new
BigDecimal
(
100
).
subtract
(
score
));
if
(!
Objects
.
isNull
(
score
)
&&
equipYardByPageCount
!=
0
)
{
BigDecimal
divide
=
new
BigDecimal
(
100
).
subtract
(
score
).
divide
(
BigDecimal
.
valueOf
(
equipYardByPageCount
),
10
,
2
);
BigDecimal
bigDecimal
=
divide
.
setScale
(
PersonBasicServiceImpl
.
getNonZeroDecimalPlaces
(
divide
),
RoundingMode
.
HALF_UP
);
item
.
put
(
"mark"
,
bigDecimal
);
}
});
resultList
.
setRecords
(
equipYardByPage
);
...
...
@@ -300,8 +304,11 @@ public class PersonQrCodeController extends BaseController {
item
.
put
(
"name"
,
name
);
item
.
put
(
"faultInfo"
,
"该任务超时"
);
item
.
put
(
"faultLevel"
,
"严重"
);
if
(!
Objects
.
isNull
(
score
))
{
item
.
put
(
"mark"
,
new
BigDecimal
(
100
).
subtract
(
score
));
if
(!
Objects
.
isNull
(
score
)
&&
jobYardByPageCount
!=
0
)
{
BigDecimal
divide
=
new
BigDecimal
(
100
).
subtract
(
score
).
divide
(
BigDecimal
.
valueOf
(
jobYardByPageCount
),
10
,
2
);
BigDecimal
bigDecimal
=
divide
.
setScale
(
PersonBasicServiceImpl
.
getNonZeroDecimalPlaces
(
divide
),
RoundingMode
.
HALF_UP
);
item
.
put
(
"mark"
,
bigDecimal
);
}
});
resultList
.
setRecords
(
jobYardByPage
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
b0f8c8d0
...
...
@@ -23,6 +23,7 @@ import org.typroject.tyboot.component.emq.EmqKeeper;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -128,8 +129,10 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
item
.
put
(
"name"
,
name
);
item
.
put
(
"faultInfo"
,
"证书不全或临期"
);
item
.
put
(
"faultLevel"
,
"严重"
);
if
(!
Objects
.
isNull
(
score
))
{
item
.
put
(
"mark"
,
new
BigDecimal
(
100
).
subtract
(
score
));
if
(!
Objects
.
isNull
(
score
)
&&
count
!=
0
)
{
BigDecimal
divide
=
new
BigDecimal
(
100
).
subtract
(
score
).
divide
(
BigDecimal
.
valueOf
(
count
),
10
,
2
);
BigDecimal
bigDecimal
=
divide
.
setScale
(
getNonZeroDecimalPlaces
(
divide
),
RoundingMode
.
HALF_UP
);
item
.
put
(
"mark"
,
bigDecimal
);
}
});
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
...
...
@@ -140,6 +143,20 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
return
mapPage
;
}
public
static
int
getNonZeroDecimalPlaces
(
BigDecimal
number
)
{
String
str
=
number
.
stripTrailingZeros
().
toPlainString
();
int
index
=
str
.
indexOf
(
"."
);
if
(
index
<
0
)
{
return
0
;
}
for
(
int
i
=
index
+
1
;
i
<
str
.
length
();
i
++)
{
if
(
str
.
charAt
(
i
)
!=
'0'
)
{
return
i
-
index
;
}
}
return
0
;
}
public
Map
<
String
,
Object
>
getPersonDetailInfoByObjectId
(
String
objectId
)
{
Map
<
String
,
Object
>
resultMap
=
personBasicMapper
.
getPersonDetailInfoByObjectId
(
objectId
);
return
resultMap
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/json/overviewGF.json
View file @
b0f8c8d0
...
...
@@ -2,7 +2,7 @@
{
"title"
:
"逆变器台数"
,
"title1"
:
"逆变器台数(台)"
,
"url"
:
"upload/jxiop/amos_studio/
EA3572E1BD31DC1E7D8DA162F09ECB
.png"
"url"
:
"upload/jxiop/amos_studio/
4C82F011332D3EE6E378B7DF2E2F483
.png"
},
{
"title"
:
"装机容量"
,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/emqx/PersonYardMessage.java
View file @
b0f8c8d0
...
...
@@ -14,6 +14,7 @@ import org.typroject.tyboot.component.emq.EmqKeeper;
import
org.typroject.tyboot.component.emq.EmqxListener
;
import
javax.annotation.PostConstruct
;
import
java.util.Date
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
...
...
@@ -68,19 +69,27 @@ public class PersonYardMessage extends EmqxListener {
};
public
void
jxIopUpdate
(
JSONObject
analysisResult
)
{
try
{
Thread
.
sleep
(
10000
);
// 等待3秒
log
.
info
(
"人员赋码数据:{}"
,
analysisResult
);
String
warningObjectCode
=
String
.
valueOf
(
analysisResult
.
get
(
"warningObjectCode"
));
String
codeColor
=
String
.
valueOf
(
analysisResult
.
get
(
"codeColor"
));
PersonBasic
personBasic
=
personBasicMapper
.
selectById
(
warningObjectCode
);
if
(
ObjectUtils
.
isEmpty
(
personBasic
))
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
"ryfm/warning/coding"
,
analysisResult
.
toJSONString
().
getBytes
(),
2
,
Boolean
.
FALSE
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
}
}
else
{
log
.
info
(
"人员基础信息:{}"
,
JSON
.
toJSONString
(
personBasic
));
// if (ObjectUtils.isEmpty(personBasic)) {
// try {
// emqKeeper.getMqttClient().publish("ryfm/warning/coding", analysisResult.toJSONString().getBytes(), 2, Boolean.FALSE);
// } catch (MqttException e) {
// e.printStackTrace();
// }
// } else {
personBasic
.
setQrcodeColor
(
codeColor
);
personBasic
.
setQrcodeDate
(
new
Date
());
personBasicMapper
.
updateById
(
personBasic
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
// }
}
}
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 @
b0f8c8d0
This diff is collapsed.
Click to expand it.
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