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
aba7510b
Commit
aba7510b
authored
Apr 03, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改工单
parent
6a36113d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
MaintenanceResultHandlerMessage.java
...module/hygf/biz/emqx/MaintenanceResultHandlerMessage.java
+8
-0
HYGFMaintenanceTicketsServiceImpl.java
...f/biz/service/impl/HYGFMaintenanceTicketsServiceImpl.java
+16
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/emqx/MaintenanceResultHandlerMessage.java
View file @
aba7510b
...
...
@@ -116,11 +116,19 @@ public class MaintenanceResultHandlerMessage extends EmqxListener {
hygfMaintenanceTickets
.
setStationContact
(
jpStation
.
getStationContact
());
//业主姓名
hygfMaintenanceTickets
.
setOwnerName
(
jpStation
.
getUserName
());
if
(
ObjectUtil
.
isEmpty
(
hygfMaintenanceTickets
.
getStationContact
()))
{
hygfMaintenanceTickets
.
setStationContact
(
jpStation
.
getUserName
());
}
}
hygfMaintenanceTickets
.
setInverterSn
(
sncode
);
if
(
specialMap
.
containsKey
(
"creatorUserId"
)){
hygfMaintenanceTickets
.
setCreatorUserId
(
specialMap
.
get
(
"creatorUserId"
).
toString
());
}
if
(
specialMap
.
containsKey
(
"warningLevel"
)){
hygfMaintenanceTickets
.
setWarningLevel
(
specialMap
.
get
(
"warningLevel"
).
toString
());
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HYGFMaintenanceTicketsServiceImpl.java
View file @
aba7510b
...
...
@@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil;
import
cn.hutool.core.io.unit.DataUnit
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -16,6 +17,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.HYGFMaintenanceTicketsMapper
import
com.yeejoin.amos.boot.module.hygf.api.service.IHYGFMaintenanceTicketsService
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInverterWarnMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
...
...
@@ -71,6 +73,13 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
}
public
void
sendMeassageToMcb
(
HYGFMaintenanceTicketsDto
hygfMaintenanceTicketsDto
)
{
if
(
hygfMaintenanceTicketsDto
.
getWarningId
()==
null
){
HYGFMaintenanceTickets
fMaintenanceTickets
=
new
HYGFMaintenanceTickets
();
BeanUtils
.
copyProperties
(
hygfMaintenanceTicketsDto
,
fMaintenanceTickets
);
this
.
save
(
fMaintenanceTickets
);
}
else
{
HashMap
<
String
,
Object
>
messageMain
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
rawData
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
bizInfo
=
new
HashMap
<>();
...
...
@@ -87,6 +96,10 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
specialMap
.
put
(
"warningId"
,
hygfMaintenanceTicketsDto
.
getWarningId
());
specialMap
.
put
(
"taskStartTime"
,
hygfMaintenanceTicketsDto
.
getTaskStartTime
());
specialMap
.
put
(
"taskEndTime"
,
hygfMaintenanceTicketsDto
.
getTaskEndTime
());
specialMap
.
put
(
"creatorUserId"
,
hygfMaintenanceTicketsDto
.
getCreatorUserId
());
if
(
ObjectUtil
.
isNotEmpty
(
hygfMaintenanceTicketsDto
.
getWarningId
()))
{
//告警内容
specialMap
.
put
(
"warningContent"
,
hygfMaintenanceTicketsDto
.
getWarningContent
());
...
...
@@ -119,6 +132,8 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
bizInfo
.
put
(
"warningTime"
,
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
));
bizInfo
.
put
(
"warningObjectName"
,
hygfMaintenanceTicketsDto
.
getStationName
());
rawData
.
put
(
"traceId"
,
hygfMaintenanceTicketsDto
.
getInverterSn
());
rawData
.
put
(
"bizInfo"
,
bizInfo
);
rawData
.
put
(
"indexKey"
,
hygfMaintenanceTicketsDto
.
getInverterSn
());
...
...
@@ -172,6 +187,7 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
();
}
}
}
public
HYGFMaintenanceTicketsDto
updateHYGFMaintenanceTicketsDto
(
HYGFMaintenanceTicketsDto
hygfMaintenanceTicketsDto
)
{
...
...
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