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
ff1fd875
Commit
ff1fd875
authored
Feb 17, 2023
by
高建强
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6_temp' into develop_dl_plan6_temp
parents
b0928098
0137ca0b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
38 deletions
+67
-38
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+43
-36
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+7
-0
EmergencyMapper.xml
...ystem-equip/src/main/resources/mapper/EmergencyMapper.xml
+2
-2
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+15
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
ff1fd875
...
...
@@ -386,48 +386,55 @@ public class SupervisionConfigureController extends AbstractBaseController {
Long
stop_time
=
0L
;
Date
startDate
=
null
;
Date
stopDate
=
null
;
if
(
ObjectUtils
.
isEmpty
(
item
.
get
(
"start"
))
&&
ObjectUtils
.
isEmpty
(
item
.
get
(
"stop"
)))
{
item
.
put
(
"equipment_index_name"
,
"无信号"
);
item
.
put
(
"update_time"
,
false
);
if
(!
ObjectUtils
.
isEmpty
(
item
.
get
(
"start"
)))
{
startTime
=
item
.
get
(
"start"
).
toString
().
substring
(
0
,
19
).
replace
(
"T"
,
" "
);
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
startTime
),
+
8
);
startTimeList
.
add
(
startDate
.
getTime
());
start_time
=
startDate
.
getTime
();
item
.
put
(
"startTime"
,
startDate
);
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
item
.
get
(
"start"
)))
{
startTime
=
item
.
get
(
"start"
).
toString
().
substring
(
0
,
19
).
replace
(
"T"
,
" "
);
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
startTime
),
+
8
);
startTimeList
.
add
(
startDate
.
getTime
());
start_time
=
startDate
.
getTime
();
item
.
put
(
"startTime"
,
startDate
);
}
else
{
item
.
put
(
"startTime"
,
0
);
}
if
(!
ObjectUtils
.
isEmpty
(
item
.
get
(
"stop"
)))
{
stopTime
=
item
.
get
(
"stop"
).
toString
().
substring
(
0
,
19
).
replace
(
"T"
,
" "
);
stopDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
stopTime
),
+
8
);
stopTimeList
.
add
(
stopDate
.
getTime
());
stop_time
=
stopDate
.
getTime
();
item
.
put
(
"stopTime"
,
stopDate
);
}
else
{
item
.
put
(
"stopTime"
,
0
);
item
.
put
(
"startTime"
,
0
);
}
if
(!
ObjectUtils
.
isEmpty
(
item
.
get
(
"stop"
)))
{
stopTime
=
item
.
get
(
"stop"
).
toString
().
substring
(
0
,
19
).
replace
(
"T"
,
" "
);
stopDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
stopTime
),
+
8
);
stopTimeList
.
add
(
stopDate
.
getTime
());
stop_time
=
stopDate
.
getTime
();
item
.
put
(
"stopTime"
,
stopDate
);
}
else
{
item
.
put
(
"stopTime"
,
0
);
}
Map
<
String
,
Object
>
stateMap
=
fireFightingSystemMapper
.
queryPressureNowSignalBySpecificId
((
Long
)
item
.
get
(
"id"
));
Long
update_date
=
0L
;
if
(!
ObjectUtils
.
isEmpty
(
stateMap
))
{
try
{
String
time1
=
stateMap
.
get
(
"update_date"
).
toString
().
replace
(
"T"
,
" "
);
update_date
=
sdf
.
parse
(
time1
).
getTime
();
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
e
);
}
if
(
start_time
-
stop_time
>
0
)
{
long
res
=
nowDateTime
-
start_time
;
long
diffMinute
=
res
/
1000
/
60
;
if
(
diffMinute
>
5
)
{
time
=
false
;
}
item
.
put
(
"upTime"
,
diffMinute
);
item
.
put
(
"equipment_index_name"
,
"启动"
);
item
.
put
(
"update_time"
,
startDate
);
}
else
{
item
.
put
(
"upTime"
,
0
);
item
.
put
(
"equipment_index_name"
,
"停止"
);
item
.
put
(
"update_time"
,
stopDate
);
}
if
(
start_time
-
stop_time
>
0
)
{
long
res
=
nowDateTime
-
start_time
;
long
diffMinute
=
res
/
1000
/
60
;
if
(
diffMinute
>
5
)
{
time
=
false
;
}
item
.
put
(
"upTime"
,
diffMinute
);
item
.
put
(
"equipment_index_name"
,
update_date
-
start_time
>
0
?
stateMap
.
get
(
"equipment_index_name"
)
:
"启动"
);
item
.
put
(
"update_time"
,
update_date
-
start_time
>
0
?
stateMap
.
get
(
"update_date"
)
:
startDate
);
}
else
if
(
start_time
-
stop_time
<
0
)
{
item
.
put
(
"equipment_index_name"
,
update_date
-
stop_time
>
0
?
stateMap
.
get
(
"equipment_index_name"
)
:
"停止"
);
item
.
put
(
"update_time"
,
update_date
-
stop_time
>
0
?
stateMap
.
get
(
"update_date"
)
:
stopDate
);
}
else
{
item
.
put
(
"equipment_index_name"
,
ObjectUtils
.
isEmpty
(
stateMap
)
?
"无信号"
:
stateMap
.
get
(
"equipment_index_name"
));
item
.
put
(
"update_time"
,
ObjectUtils
.
isEmpty
(
stateMap
)
?
false
:
stateMap
.
get
(
"update_date"
));
}
item
.
put
(
"stateDesc"
,
Integer
.
parseInt
(
String
.
valueOf
(
item
.
get
(
"isAlarm"
)))
==
0
&&
time
?
"正常"
:
"异常"
);
if
(
"正常"
.
equals
(
item
.
get
(
"stateDesc"
).
toString
()))
{
item
.
put
(
"sort"
,
0
);
if
(
"正常"
.
equals
(
item
.
get
(
"stateDesc"
).
toString
()))
{
item
.
put
(
"sort"
,
0
);
}
else
{
item
.
put
(
"sort"
,
1
);
item
.
put
(
"sort"
,
1
);
}
}
// List<Long> startCollect = startTimeList.stream().sorted(Comparator.reverseOrder()).limit(1).collect(Collectors.toList());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
ff1fd875
...
...
@@ -427,6 +427,13 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Map
<
String
,
String
>
queryPressureNowStateBySpecificId
(
@Param
(
"id"
)
Long
id
);
/**
* 根据装备ID查最新一条有信号的指标信息
* @param id
* @return
*/
Map
<
String
,
Object
>
queryPressureNowSignalBySpecificId
(
@Param
(
"id"
)
Long
id
);
/**
* 稳压泵信息-3小消防给水信息
* @param bizOrgCode
* @param systemCode
...
...
amos-boot-system-equip/src/main/resources/mapper/EmergencyMapper.xml
View file @
ff1fd875
...
...
@@ -606,7 +606,7 @@
FROM
wl_equipment_specific_alarm_log wespa
WHERE
wespa.equipment_specific_index_key LIKE concat('%', '
FireAlarm
')
wespa.equipment_specific_index_key LIKE concat('%', '
Alarm', '%
')
AND wespa.equipment_specific_index_value = 'true'
AND wespa.create_date BETWEEN #{startDate}
AND #{endDate}
...
...
@@ -790,7 +790,7 @@
FROM
wl_equipment_specific_alarm_log wespa
WHERE
wespa.equipment_specific_index_key LIKE concat('%', '
FireAlarm
')
wespa.equipment_specific_index_key LIKE concat('%', '
Alarm', '%
')
AND wespa.create_date LIKE concat(temp.date, '%')
AND wespa.equipment_specific_index_value = 'true'
<foreach
collection=
"list"
open=
"and ("
close=
")"
item=
"code"
index=
"index"
separator=
"or"
>
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
ff1fd875
...
...
@@ -2831,6 +2831,21 @@
LIMIT 1
</select>
<select
id=
"queryPressureNowSignalBySpecificId"
resultType=
"java.util.Map"
>
SELECT
DATE_FORMAT(i.update_date, '%Y-%m-%d %H:%i:%S') update_date,
i.equipment_index_name,
value
FROM
wl_equipment_specific_index i
WHERE
i.equipment_specific_id = #{id,jdbcType=VARCHAR}
AND value
<![CDATA[<>]]>
'' AND value IS NOT NULL
ORDER BY
i.update_date DESC
LIMIT 1
</select>
<select
id=
"getPressurePumpInfo3Small"
resultType=
"java.util.Map"
>
SELECT
ed.`name`,
...
...
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