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
ba61e59b
Commit
ba61e59b
authored
Dec 29, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_plan6_temp' of…
Merge branch 'develop_dl_plan6_temp' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl_plan6_temp
parents
c5f5b5d5
4a4d3ea5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
32 deletions
+36
-32
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+32
-30
EquipmentSpecificAlarmServiceImpl.java
...anage/service/impl/EquipmentSpecificAlarmServiceImpl.java
+1
-1
application-dev.properties
...ystem-equip/src/main/resources/application-dev.properties
+3
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+0
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ConfigureController.java
View file @
ba61e59b
...
@@ -367,39 +367,41 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -367,39 +367,41 @@ public class ConfigureController extends AbstractBaseController {
item
.
put
(
"startAndStopNum"
,
0
);
item
.
put
(
"startAndStopNum"
,
0
);
item
.
put
(
"update_time"
,
"--"
);
item
.
put
(
"update_time"
,
"--"
);
item
.
put
(
"equipment_index_name"
,
"--"
);
item
.
put
(
"equipment_index_name"
,
"--"
);
String
prefix
=
null
;
if
(
item
.
containsKey
(
"iot_code"
)
&&
StringUtil
.
isNotEmpty
(
item
.
get
(
"iot_code"
)))
{
String
suffix
=
null
;
String
prefix
=
null
;
String
iotCode
=
item
.
get
(
"iot_code"
).
toString
();
String
suffix
=
null
;
if
(
iotCode
.
length
()
>
8
)
{
String
iotCode
=
item
.
get
(
"iot_code"
).
toString
();
prefix
=
iotCode
.
substring
(
0
,
8
);
if
(
iotCode
.
length
()
>
8
)
{
suffix
=
iotCode
.
substring
(
8
);
prefix
=
iotCode
.
substring
(
0
,
8
);
}
else
{
suffix
=
iotCode
.
substring
(
8
);
throw
new
BadRequest
(
"装备物联编码错误,请确认!"
);
}
else
{
}
throw
new
BadRequest
(
"装备物联编码错误,请确认!"
);
}
String
nowStrLong
=
DateUtils
.
getNowStrLong
();
String
nowStrLong
=
DateUtils
.
getNowStrLong
();
Date
startDate
=
DateUtils
.
dateAddMinutes
(
null
,
-
4
);
Date
startDate
=
DateUtils
.
dateAddMinutes
(
null
,
-
4
);
String
startDateStr
=
DateUtils
.
convertDateToString
(
startDate
,
DateUtils
.
DATE_TIME_PATTERN
);
String
startDateStr
=
DateUtils
.
convertDateToString
(
startDate
,
DateUtils
.
DATE_TIME_PATTERN
);
ResponseModel
entity1
=
null
;
ResponseModel
entity1
=
null
;
ResponseModel
entity2
=
null
;
ResponseModel
entity2
=
null
;
try
{
try
{
entity1
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
startDateStr
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
entity1
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
startDateStr
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
entity2
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
startDateStr
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStop
);
entity2
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
startDateStr
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStop
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(
200
==
entity1
.
getStatus
()
&&
200
==
entity2
.
getStatus
())
{
if
(
200
==
entity1
.
getStatus
()
&&
200
==
entity2
.
getStatus
())
{
String
json1
=
JSON
.
toJSONString
(
entity1
.
getResult
());
String
json1
=
JSON
.
toJSONString
(
entity1
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
String
json2
=
JSON
.
toJSONString
(
entity2
.
getResult
());
String
json2
=
JSON
.
toJSONString
(
entity2
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject2
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json2
);
List
<
Map
<
String
,
String
>>
listObject2
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json2
);
listObject1
.
addAll
(
listObject2
);
listObject1
.
addAll
(
listObject2
);
List
<
Map
<
String
,
String
>>
collect
=
listObject1
.
stream
().
filter
(
t
->
(
t
.
containsKey
(
pressurePumpStart
)
&&
t
.
get
(
pressurePumpStart
).
equals
(
"true"
))
||
(
t
.
containsKey
(
pressurePumpStop
)
&&
t
.
get
(
pressurePumpStop
).
equals
(
"true"
))).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
collect
=
listObject1
.
stream
().
filter
(
t
->
(
t
.
containsKey
(
pressurePumpStart
)
&&
t
.
get
(
pressurePumpStart
).
equals
(
"true"
))
||
(
t
.
containsKey
(
pressurePumpStop
)
&&
t
.
get
(
pressurePumpStop
).
equals
(
"true"
))).
collect
(
Collectors
.
toList
());
int
num
=
collect
.
size
();
int
num
=
collect
.
size
();
item
.
put
(
"startAndStopNum"
,
num
);
item
.
put
(
"startAndStopNum"
,
num
);
}
}
}
resultMap
.
put
(
"normalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
&&
Integer
.
parseInt
(
String
.
valueOf
(
item
.
get
(
"isAlarm"
)))
==
0
?
(
resultMap
.
get
(
"normalNum"
)
+
1
)
:
resultMap
.
get
(
"normalNum"
));
resultMap
.
put
(
"normalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
&&
Integer
.
parseInt
(
String
.
valueOf
(
item
.
get
(
"isAlarm"
)))
==
0
?
(
resultMap
.
get
(
"normalNum"
)
+
1
)
:
resultMap
.
get
(
"normalNum"
));
resultMap
.
put
(
"unNormalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
>
1
||
Integer
.
parseInt
(
String
.
valueOf
(
item
.
get
(
"isAlarm"
)))
>
0
?
(
resultMap
.
get
(
"unNormalNum"
)
+
1
)
:
resultMap
.
get
(
"unNormalNum"
));
resultMap
.
put
(
"unNormalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
>
1
||
Integer
.
parseInt
(
String
.
valueOf
(
item
.
get
(
"isAlarm"
)))
>
0
?
(
resultMap
.
get
(
"unNormalNum"
)
+
1
)
:
resultMap
.
get
(
"unNormalNum"
));
return
item
;
return
item
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
return
CommonResponseUtil
.
success
(
resultMap
);
return
CommonResponseUtil
.
success
(
resultMap
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmServiceImpl.java
View file @
ba61e59b
...
@@ -728,7 +728,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
...
@@ -728,7 +728,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
String
key
=
entry
.
getKey
();
String
key
=
entry
.
getKey
();
List
<
EquipAlarmLineVo
>
collect
=
entry
.
getValue
().
stream
().
filter
(
x
->
indexName
.
equals
(
x
.
getIndexName
())).
collect
(
Collectors
.
toList
());
List
<
EquipAlarmLineVo
>
collect
=
entry
.
getValue
().
stream
().
filter
(
x
->
indexName
.
equals
(
x
.
getIndexName
())).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
yData
.
add
(
collect
.
get
(
0
).
getTotal
());
yData
.
add
(
collect
.
stream
().
mapToInt
(
EquipAlarmLineVo:
:
getTotal
).
sum
());
}
else
{
}
else
{
yData
.
add
(
0
);
yData
.
add
(
0
);
}
}
...
...
amos-boot-system-equip/src/main/resources/application-dev.properties
View file @
ba61e59b
...
@@ -103,6 +103,9 @@ equipment.plan.pump=92010600,92030600,92130400,92140200,92150300
...
@@ -103,6 +103,9 @@ equipment.plan.pump=92010600,92030600,92130400,92140200,92150300
#iot.code.prefix.have.used=20210003,20210004,20210005
#iot.code.prefix.have.used=20210003,20210004,20210005
# 电力使用
# 电力使用
iot.code.prefix.have.used
=
iot.code.prefix.have.used
=
#装备服务在接收到站端iot推送的装备数据后进行influxdb存库
#1.在装备接口消息处向influxdb/{productKey}/{deviceName} 消息地址推送数据,iot负责存库
#2.配置文件添加配置项开关,默认为关闭,该功能只使用于中心及系统
#是否向iot推送消息
#是否向iot推送消息
isSendIot
=
false
isSendIot
=
false
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
ba61e59b
...
@@ -2847,7 +2847,6 @@
...
@@ -2847,7 +2847,6 @@
LEFT JOIN wl_equipment_specific_alarm esa ON esa.equipment_specific_id = es.id
LEFT JOIN wl_equipment_specific_alarm esa ON esa.equipment_specific_id = es.id
WHERE
WHERE
ed.`code` LIKE '92010800%'
ed.`code` LIKE '92010800%'
AND es.iot_code IS NOT NULL
AND es.biz_org_code like concat(#{bizOrgCode}, '%')
AND es.biz_org_code like concat(#{bizOrgCode}, '%')
<if
test=
"systemCode!=null and systemCode!=''"
>
<if
test=
"systemCode!=null and systemCode!=''"
>
AND fs.code = #{systemCode,jdbcType=VARCHAR}
AND fs.code = #{systemCode,jdbcType=VARCHAR}
...
...
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