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
0208da4c
Commit
0208da4c
authored
Oct 10, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
156094ac
b1dbc050
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
10 deletions
+54
-10
EquipAlarmEventDto.java
...in/amos/boot/module/jxiop/biz/dto/EquipAlarmEventDto.java
+9
-0
EquipAlarmEventMapper.java
.../boot/module/jxiop/biz/mapper2/EquipAlarmEventMapper.java
+9
-4
EquipAlarmEventServiceImpl.java
...le/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
+11
-6
AlarmEventMapper.xml
...iz/src/main/resources/mapper/cluster/AlarmEventMapper.xml
+1
-0
EquipAlarmEventMapper.xml
...c/main/resources/mapper/cluster/EquipAlarmEventMapper.xml
+24
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/EquipAlarmEventDto.java
View file @
0208da4c
...
@@ -5,6 +5,8 @@ import lombok.experimental.Accessors;
...
@@ -5,6 +5,8 @@ import lombok.experimental.Accessors;
import
java.util.Date
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.TableField
;
@Data
@Data
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
public
class
EquipAlarmEventDto
{
public
class
EquipAlarmEventDto
{
...
@@ -14,5 +16,12 @@ public class EquipAlarmEventDto {
...
@@ -14,5 +16,12 @@ public class EquipAlarmEventDto {
private
String
alarmDesc
;
private
String
alarmDesc
;
private
String
equipName
;
private
String
equipName
;
private
long
sort
;
private
long
sort
;
/**
* 分类 逆变器、箱变、汇流箱
*/
@TableField
(
"frontModule"
)
private
String
frontModule
;
@TableField
(
"value"
)
private
String
value
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/EquipAlarmEventMapper.java
View file @
0208da4c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
java.util.Date
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.EquipAlarmEventDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipAlarmEvent
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipAlarmEvent
;
import
java.util.List
;
public
interface
EquipAlarmEventMapper
extends
BaseMapper
<
EquipAlarmEvent
>
{
public
interface
EquipAlarmEventMapper
extends
BaseMapper
<
EquipAlarmEvent
>
{
String
getLastDataBySort
(
String
gatewayId
);
String
getLastDataBySort
(
String
gatewayId
);
List
<
EquipAlarmEvent
>
getOldDataBySort
(
String
sort
,
String
gatewayId
);
List
<
EquipAlarmEvent
>
getOldDataBySort
(
String
sort
,
String
gatewayId
);
List
<
EquipAlarmEventDto
>
getAlarmEventList
(
String
gatewayId
,
String
equipIndex
,
String
frontModule
,
long
current
,
long
size
,
Date
time
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
View file @
0208da4c
...
@@ -18,6 +18,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -18,6 +18,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.List
;
@Service
@Service
...
@@ -29,7 +30,7 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
...
@@ -29,7 +30,7 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
StationBasicMapper
stationBasicMapper
;
StationBasicMapper
stationBasicMapper
;
public
ResultsData
getEventByEquipIndex
(
String
gatewayId
,
int
current
,
int
size
,
String
equipIndex
,
String
frontModule
)
{
public
ResultsData
getEventByEquipIndex
(
String
gatewayId
,
int
current
,
int
size
,
String
equipIndex
,
String
frontModule
)
{
List
<
EquipAlarmEvent
>
equipAlarmEvents
=
new
ArrayList
<>();
List
<
EquipAlarmEvent
Dto
>
equipAlarmEvents
=
new
ArrayList
<>();
LambdaQueryWrapper
<
EquipAlarmEvent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
EquipAlarmEvent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
equipIndex
!=
null
)
if
(
equipIndex
!=
null
)
{
{
...
@@ -40,11 +41,15 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
...
@@ -40,11 +41,15 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
{
{
queryWrapper
.
eq
(
EquipAlarmEvent:
:
getFrontModule
,
frontModule
);
queryWrapper
.
eq
(
EquipAlarmEvent:
:
getFrontModule
,
frontModule
);
}
}
queryWrapper
.
orderByDesc
(
EquipAlarmEvent:
:
getCreatedTime
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
7
);
queryWrapper
.
gt
(
EquipAlarmEvent:
:
getCreatedTime
,
calendar
.
getTime
());
int
count
=
equipAlarmEventMapper
.
selectCount
(
queryWrapper
);
IPage
<
EquipAlarmEvent
>
p
=
new
Page
<>(
current
,
size
);
IPage
<
EquipAlarmEvent
>
p
=
new
Page
<>(
current
,
size
);
IPage
<
EquipAlarmEvent
>
page
=
equipAlarmEventMapper
.
selectPage
(
p
,
queryWrapper
);
equipAlarmEvents
=
equipAlarmEventMapper
.
getAlarmEventList
(
gatewayId
,
equipIndex
,
frontModule
,
(
p
.
getCurrent
()-
1
)*
p
.
getSize
(),
p
.
getSize
(),
calendar
.
getTime
()
);
//
equipAlarmEvents = equipAlarmEventMapper.selectList(queryWrapper);
//
equipAlarmEvents = equipAlarmEventMapper.selectList(queryWrapper);
equipAlarmEvents
=
page
.
getRecords
();
//
equipAlarmEvents=page.getRecords();
equipAlarmEvents
.
forEach
(
i
->{
equipAlarmEvents
.
forEach
(
i
->{
if
(
"true"
.
equals
(
i
))
if
(
"true"
.
equals
(
i
))
{
{
...
@@ -54,7 +59,7 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
...
@@ -54,7 +59,7 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
i
.
setValue
(
"分"
);
i
.
setValue
(
"分"
);
}
}
});
});
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
equipAlarmEvents
.
size
(),
false
,
current
,
equipAlarmEvents
.
subList
((
current
-
1
)
*
size
,
current
*
size
)
);
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
count
,
false
,
current
,
equipAlarmEvents
);
ColModel
colModelEventMovement
=
new
ColModel
(
"equipName"
,
"equipName"
,
"设备名"
,
"设备名"
,
"dataGrid"
,
"equipName"
);
ColModel
colModelEventMovement
=
new
ColModel
(
"equipName"
,
"equipName"
,
"设备名"
,
"设备名"
,
"dataGrid"
,
"equipName"
);
ColModel
colModelStationName
=
new
ColModel
(
"alarmDesc"
,
"alarmDesc"
,
"事件描述"
,
"事件描述"
,
"dataGrid"
,
"alarmDesc"
);
ColModel
colModelStationName
=
new
ColModel
(
"alarmDesc"
,
"alarmDesc"
,
"事件描述"
,
"事件描述"
,
"dataGrid"
,
"alarmDesc"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"createdTime"
,
"createdTime"
,
"告警时间"
,
"告警时间"
,
"dataGrid"
,
"createdTime"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"createdTime"
,
"createdTime"
,
"告警时间"
,
"告警时间"
,
"dataGrid"
,
"createdTime"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/AlarmEventMapper.xml
View file @
0208da4c
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
<if
test=
"stationId != null and stationId != ''"
>
<if
test=
"stationId != null and stationId != ''"
>
station_id = #{stationId}
station_id = #{stationId}
</if>
</if>
AND DATE_SUB(CURDATE(), INTERVAL 6 DAY)
<
= event_time
</where>
</where>
order by event_time desc
order by event_time desc
</select>
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/EquipAlarmEventMapper.xml
View file @
0208da4c
...
@@ -2,6 +2,30 @@
...
@@ -2,6 +2,30 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.EquipAlarmEventMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.EquipAlarmEventMapper"
>
<select
id=
"getAlarmEventList"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.dto.EquipAlarmEventDto"
>
SELECT
*
FROM
equip_alarm_event a
JOIN ( SELECT sequence_nbr FROM equip_alarm_event
<where>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND gateway_id = #{gatewayId}
</if>
<if
test=
"equipIndex!= null and equipIndex != ''"
>
AND equip_index = #{equipIndex}
</if>
<if
test=
"frontModule!= null and frontModule != ''"
>
AND front_module = #{frontModule}
</if>
AND #{time}
<
= created_time
</where>
ORDER BY created_time DESC LIMIT #{current}, #{size} ) b ON a.sequence_nbr = b.sequence_nbr
</select>
<select
id=
"getLastDataBySort"
resultType=
"java.lang.String"
>
<select
id=
"getLastDataBySort"
resultType=
"java.lang.String"
>
select
select
sort
sort
...
...
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