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
016c8278
Commit
016c8278
authored
Dec 05, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_3.7.1.0' into develop_dl
parents
e2156808
73c14c38
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
170 additions
and
19 deletions
+170
-19
AppAlarmExtVo.java
...yeejoin/equipmanage/common/datasync/vo/AppAlarmExtVo.java
+7
-0
AppAlarmRportVo.java
...ejoin/equipmanage/common/datasync/vo/AppAlarmRportVo.java
+6
-0
AppAlarmVo.java
...om/yeejoin/equipmanage/common/datasync/vo/AppAlarmVo.java
+7
-0
PointTreeVo.java
...com/yeejoin/equipmanage/common/entity/vo/PointTreeVo.java
+5
-0
EquipmentDetailController.java
...oin/equipmanage/controller/EquipmentDetailController.java
+7
-3
EquipmentSpecificAlarmLogMapper.java
...n/equipmanage/mapper/EquipmentSpecificAlarmLogMapper.java
+4
-0
EquipmentSpecificAlarmLogServiceImpl.java
...ge/service/impl/EquipmentSpecificAlarmLogServiceImpl.java
+20
-4
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+9
-3
SyncDataServiceImpl.java
...yeejoin/equipmanage/service/impl/SyncDataServiceImpl.java
+25
-6
application-dev.properties
...ystem-equip/src/main/resources/application-dev.properties
+4
-2
EquipmentSpecificAlarmLogMapper.xml
...main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
+73
-0
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+2
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/datasync/vo/AppAlarmExtVo.java
View file @
016c8278
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
vo
;
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -64,4 +65,9 @@ public class AppAlarmExtVo {
...
@@ -64,4 +65,9 @@ public class AppAlarmExtVo {
@ApiModelProperty
(
value
=
"是否拥有简报"
)
@ApiModelProperty
(
value
=
"是否拥有简报"
)
private
Boolean
isreport
=
false
;
private
Boolean
isreport
=
false
;
@JsonProperty
(
"client_id"
)
@ApiModelProperty
(
value
=
"客户端id"
)
private
String
clientId
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/datasync/vo/AppAlarmRportVo.java
View file @
016c8278
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
vo
;
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -44,4 +45,8 @@ public class AppAlarmRportVo {
...
@@ -44,4 +45,8 @@ public class AppAlarmRportVo {
@ApiModelProperty
(
value
=
"相关报告"
)
@ApiModelProperty
(
value
=
"相关报告"
)
private
String
analysisreport
=
""
;
private
String
analysisreport
=
""
;
@JsonProperty
(
"client_id"
)
@ApiModelProperty
(
value
=
"客户端id"
)
private
String
client_id
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/datasync/vo/AppAlarmVo.java
View file @
016c8278
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
vo
;
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -58,4 +59,9 @@ public class AppAlarmVo {
...
@@ -58,4 +59,9 @@ public class AppAlarmVo {
@ApiModelProperty
(
value
=
"是否拥有简报"
)
@ApiModelProperty
(
value
=
"是否拥有简报"
)
private
Boolean
isreport
=
false
;
private
Boolean
isreport
=
false
;
@JsonProperty
(
"client_id"
)
@ApiModelProperty
(
value
=
"客户端id"
)
private
String
client_id
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/PointTreeVo.java
View file @
016c8278
...
@@ -151,4 +151,9 @@ public class PointTreeVo {
...
@@ -151,4 +151,9 @@ public class PointTreeVo {
private
String
code
;
private
String
code
;
//建筑类型
//建筑类型
private
String
groupType
;
private
String
groupType
;
/**
* 画布id
*/
private
String
bizOrgCode
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentDetailController.java
View file @
016c8278
...
@@ -49,6 +49,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -49,6 +49,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
/**
/**
...
@@ -236,10 +237,13 @@ public class EquipmentDetailController extends AbstractBaseController {
...
@@ -236,10 +237,13 @@ public class EquipmentDetailController extends AbstractBaseController {
}
}
FireFightingSystemEntity
fightingSystemEntity
=
new
FireFightingSystemEntity
();
FireFightingSystemEntity
fightingSystemEntity
=
new
FireFightingSystemEntity
();
if
(!
ObjectUtils
.
isEmpty
(
equipmentSpecific
.
getSystemId
())){
if
(!
ObjectUtils
.
isEmpty
(
equipmentSpecific
.
getSystemId
())){
fightingSystemEntity
=
fireFightingSystemService
.
getOneById
(
Long
.
valueOf
(
equipmentSpecific
.
getSystemId
()));
String
ids
=
equipmentSpecific
.
getSystemId
();
equipmentSpecific
.
setSystemId
(
fightingSystemEntity
.
getName
());
String
[]
idArray
=
ids
.
split
(
","
);
AtomicReference
<
String
>
name
=
new
AtomicReference
<>(
""
);
fireFightingSystemService
.
listByIds
(
Arrays
.
asList
(
idArray
)).
forEach
(
x
->
name
.
set
(
name
.
get
()
+
x
.
getName
()
+
","
));
fightingSystemEntity
.
setName
(
name
.
get
().
substring
(
0
,
name
.
get
().
length
()
-
1
));
}
else
{
}
else
{
equipmentSpecific
.
setSystem
Id
(
""
);
equipmentSpecific
.
setSystem
Name
(
""
);
}
}
equipmentSpecific
.
setSystemId
(
fightingSystemEntity
.
getName
());
equipmentSpecific
.
setSystemId
(
fightingSystemEntity
.
getName
());
equipmentSpecific
.
setFullqrCode
(
"01#"
+
equipmentSpecific
.
getQrCode
());
equipmentSpecific
.
setFullqrCode
(
"01#"
+
equipmentSpecific
.
getQrCode
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificAlarmLogMapper.java
View file @
016c8278
...
@@ -28,8 +28,12 @@ public interface EquipmentSpecificAlarmLogMapper extends BaseMapper<EquipmentSpe
...
@@ -28,8 +28,12 @@ public interface EquipmentSpecificAlarmLogMapper extends BaseMapper<EquipmentSpe
List
<
AppAlarmExtVo
>
findByIdList
(
@Param
(
"list"
)
List
<
Long
>
idList
);
List
<
AppAlarmExtVo
>
findByIdList
(
@Param
(
"list"
)
List
<
Long
>
idList
);
List
<
AppAlarmExtVo
>
findByIdListForNRKJ
(
@Param
(
"list"
)
List
<
Long
>
idList
);
List
<
AppAlarmExtVo
>
findByIdListNoBuildId
(
@Param
(
"list"
)
List
<
Long
>
idBNullList
);
List
<
AppAlarmExtVo
>
findByIdListNoBuildId
(
@Param
(
"list"
)
List
<
Long
>
idBNullList
);
List
<
AppAlarmExtVo
>
findByIdListNoBuildIdForNRKJ
(
@Param
(
"list"
)
List
<
Long
>
idBNullList
);
List
<
EquipmentSpecificAlarmLog
>
getIsConfirmByAlarmId
(
@Param
(
"equipmentSpecificId"
)
Long
equipmentSpecificId
List
<
EquipmentSpecificAlarmLog
>
getIsConfirmByAlarmId
(
@Param
(
"equipmentSpecificId"
)
Long
equipmentSpecificId
,
@Param
(
"equipmentSpecificIndexKey"
)
String
equipmentSpecificIndexKey
,
@Param
(
"equipmentSpecificIndexKey"
)
String
equipmentSpecificIndexKey
,
@Param
(
"isConfirm"
)
String
isConfirm
);
,
@Param
(
"isConfirm"
)
String
isConfirm
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmLogServiceImpl.java
View file @
016c8278
...
@@ -103,7 +103,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
...
@@ -103,7 +103,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
if
(
"0"
.
equals
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"sumNum"
)))
if
(
"0"
.
equals
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"sumNum"
)))
||
"0"
.
equals
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"hbSumNum"
)))
||
"0"
.
equals
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"hbSumNum"
)))
||
0
>
(
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"sumNum"
)))
-
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"hbSumNum"
)))))
{
||
0
>
(
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"sumNum"
)))
-
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"hbSumNum"
)))))
{
alarmEquipDayLink
.
put
(
"hbRate"
,
bigDecimal
+
"%"
);
if
(
"0"
.
equals
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"hbSumNum"
)))
&&
!
"0"
.
equals
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"sumNum"
))))
{
alarmEquipDayLink
.
put
(
"hbRate"
,
"100%"
);
}
else
{
alarmEquipDayLink
.
put
(
"hbRate"
,
bigDecimal
+
"%"
);
}
}
else
{
}
else
{
BigDecimal
rate
=
nowDaySum
.
subtract
(
lastDaySum
).
divide
(
lastDaySum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
rate
=
nowDaySum
.
subtract
(
lastDaySum
).
divide
(
lastDaySum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
alarmEquipDayLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
alarmEquipDayLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
...
@@ -116,7 +120,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
...
@@ -116,7 +120,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
if
(
"0"
.
equals
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"sumNum"
)))
if
(
"0"
.
equals
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"sumNum"
)))
||
"0"
.
equals
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"hbSumNum"
)))
||
"0"
.
equals
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"hbSumNum"
)))
||
0
>
(
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"sumNum"
)))
-
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"hbSumNum"
)))))
{
||
0
>
(
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"sumNum"
)))
-
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"hbSumNum"
)))))
{
alarmEquipMonthLink
.
put
(
"hbRate"
,
bigDecimal
+
"%"
);
if
(
"0"
.
equals
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"hbSumNum"
)))
&&
!
"0"
.
equals
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"sumNum"
))))
{
alarmEquipMonthLink
.
put
(
"hbRate"
,
"100%"
);
}
else
{
alarmEquipMonthLink
.
put
(
"hbRate"
,
bigDecimal
+
"%"
);
}
}
else
{
}
else
{
BigDecimal
rate
=
nowMonthSum
.
subtract
(
lastMonthSum
).
divide
(
lastMonthSum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
rate
=
nowMonthSum
.
subtract
(
lastMonthSum
).
divide
(
lastMonthSum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
alarmEquipMonthLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
alarmEquipMonthLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
...
@@ -128,7 +136,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
...
@@ -128,7 +136,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
if
(
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"sumNum"
)))
if
(
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"sumNum"
)))
||
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"hbSumNum"
)))
||
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"hbSumNum"
)))
||
0
>
(
Integer
.
valueOf
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"sumNum"
)))
-
Integer
.
valueOf
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"hbSumNum"
)))))
{
||
0
>
(
Integer
.
valueOf
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"sumNum"
)))
-
Integer
.
valueOf
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"hbSumNum"
)))))
{
unCleanAlarmEquipDayLink
.
put
(
"hbRate"
,
bigDecimal
+
"%"
);
if
(
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"hbSumNum"
)))
&&
!
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"sumNum"
))))
{
unCleanAlarmEquipDayLink
.
put
(
"hbRate"
,
"100%"
);
}
else
{
unCleanAlarmEquipDayLink
.
put
(
"hbRate"
,
bigDecimal
+
"%"
);
}
}
else
{
}
else
{
BigDecimal
rate
=
nowUncleanDaySum
.
subtract
(
lastUncleanDaySum
).
divide
(
lastUncleanDaySum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
rate
=
nowUncleanDaySum
.
subtract
(
lastUncleanDaySum
).
divide
(
lastUncleanDaySum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
unCleanAlarmEquipDayLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
unCleanAlarmEquipDayLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
...
@@ -141,7 +153,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
...
@@ -141,7 +153,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
if
(
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"sumNum"
)))
if
(
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"sumNum"
)))
||
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"hbSumNum"
)))
||
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"hbSumNum"
)))
||
0
>
(
Integer
.
valueOf
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"sumNum"
)))
-
Integer
.
valueOf
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"hbSumNum"
)))))
{
||
0
>
(
Integer
.
valueOf
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"sumNum"
)))
-
Integer
.
valueOf
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"hbSumNum"
)))))
{
unCleanAlarmEquipMonthLink
.
put
(
"hbRate"
,
bigDecimal
+
"%"
);
if
(
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"hbSumNum"
)))
&&
!
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"sumNum"
))))
{
unCleanAlarmEquipMonthLink
.
put
(
"hbRate"
,
"100%"
);
}
else
{
unCleanAlarmEquipMonthLink
.
put
(
"hbRate"
,
bigDecimal
+
"%"
);
}
}
else
{
}
else
{
BigDecimal
rate
=
nowUncleanMonthSum
.
subtract
(
lastUncleanMonthSum
).
divide
(
lastUncleanMonthSum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
rate
=
nowUncleanMonthSum
.
subtract
(
lastUncleanMonthSum
).
divide
(
lastUncleanMonthSum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
unCleanAlarmEquipMonthLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
unCleanAlarmEquipMonthLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
016c8278
...
@@ -1656,8 +1656,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1656,8 +1656,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
sys
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
sys
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
String
startTime
=
StringUtil
.
isNotEmpty
(
startDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
startDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
;
String
endTime
=
StringUtil
.
isNotEmpty
(
endDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
endDate
).
substring
(
0
,
10
)
+
" 23:59:59"
:
null
;
// 附件告警数据
// 附件告警数据
List
<
Map
<
String
,
Object
>>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
start
Date
,
endDat
e
,
Long
.
valueOf
(
String
.
valueOf
(
sys
.
get
(
"id"
))));
List
<
Map
<
String
,
Object
>>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
start
Time
,
endTim
e
,
Long
.
valueOf
(
String
.
valueOf
(
sys
.
get
(
"id"
))));
attachAlarmList
.
addAll
(
sysAlarmList
);
attachAlarmList
.
addAll
(
sysAlarmList
);
// 系统名称
// 系统名称
...
@@ -1854,8 +1856,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1854,8 +1856,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
system
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
system
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
String
startTime
=
StringUtil
.
isNotEmpty
(
startDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
startDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
;
String
endTime
=
StringUtil
.
isNotEmpty
(
endDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
endDate
).
substring
(
0
,
10
)
+
" 23:59:59"
:
null
;
// 附件告警数据
// 附件告警数据
List
<
Map
<
String
,
Object
>>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
start
Date
,
endDat
e
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
List
<
Map
<
String
,
Object
>>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
start
Time
,
endTim
e
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
attachAlarmList
.
addAll
(
sysAlarmList
);
attachAlarmList
.
addAll
(
sysAlarmList
);
// 系统名称
// 系统名称
...
@@ -2054,8 +2058,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2054,8 +2058,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
system
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
system
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
String
startTime
=
StringUtil
.
isNotEmpty
(
startDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
startDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
;
String
endTime
=
StringUtil
.
isNotEmpty
(
endDate
)
?
org
.
apache
.
commons
.
lang3
.
StringUtils
.
trimToNull
(
endDate
).
substring
(
0
,
10
)
+
" 23:59:59"
:
null
;
// 附件告警数据
// 附件告警数据
List
<
Map
<
String
,
Object
>>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
start
Date
,
endDat
e
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
List
<
Map
<
String
,
Object
>>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
start
Time
,
endTim
e
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
attachAlarmList
.
addAll
(
sysAlarmList
);
attachAlarmList
.
addAll
(
sysAlarmList
);
// 系统名称
// 系统名称
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SyncDataServiceImpl.java
View file @
016c8278
...
@@ -17,6 +17,7 @@ import com.yeejoin.equipmanage.common.entity.FormInstance;
...
@@ -17,6 +17,7 @@ import com.yeejoin.equipmanage.common.entity.FormInstance;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.utils.HttpContentTypeUtil
;
import
com.yeejoin.equipmanage.common.utils.HttpContentTypeUtil
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmLogMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmLogMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
...
@@ -38,6 +39,7 @@ import org.springframework.stereotype.Service;
...
@@ -38,6 +39,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -65,6 +67,9 @@ public class SyncDataServiceImpl implements ISyncDataService {
...
@@ -65,6 +67,9 @@ public class SyncDataServiceImpl implements ISyncDataService {
@Value
(
"${dcs.x.hw.appKey}"
)
@Value
(
"${dcs.x.hw.appKey}"
)
private
String
xHwAppKey
;
private
String
xHwAppKey
;
@Value
(
"${dcs.NRKJ.use}"
)
private
Boolean
NRKJUse
;
@Autowired
@Autowired
private
DcsUtil
dcsUtil
;
private
DcsUtil
dcsUtil
;
...
@@ -427,6 +432,7 @@ public class SyncDataServiceImpl implements ISyncDataService {
...
@@ -427,6 +432,7 @@ public class SyncDataServiceImpl implements ISyncDataService {
private
AppAlarmRportVo
getAppAlarmRportVo
(
AppAlarmExtVo
vo
)
{
private
AppAlarmRportVo
getAppAlarmRportVo
(
AppAlarmExtVo
vo
)
{
AppAlarmRportVo
alarmRportVo
=
new
AppAlarmRportVo
();
AppAlarmRportVo
alarmRportVo
=
new
AppAlarmRportVo
();
alarmRportVo
.
setClient_id
(
clientId
);
alarmRportVo
.
setTime
(
vo
.
getConfirmtime
());
alarmRportVo
.
setTime
(
vo
.
getConfirmtime
());
alarmRportVo
.
setEventdesc
(
vo
.
getEventdesc
());
alarmRportVo
.
setEventdesc
(
vo
.
getEventdesc
());
alarmRportVo
.
setEventreason
(
vo
.
getEventreason
());
alarmRportVo
.
setEventreason
(
vo
.
getEventreason
());
...
@@ -451,11 +457,20 @@ public class SyncDataServiceImpl implements ISyncDataService {
...
@@ -451,11 +457,20 @@ public class SyncDataServiceImpl implements ISyncDataService {
if
(
CollectionUtils
.
isNotEmpty
(
idList
)
||
CollectionUtils
.
isNotEmpty
(
idBNullList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
idList
)
||
CollectionUtils
.
isNotEmpty
(
idBNullList
))
{
List
<
AppAlarmExtVo
>
appAlarmVoList
=
new
ArrayList
<>();
List
<
AppAlarmExtVo
>
appAlarmVoList
=
new
ArrayList
<>();
List
<
AppAlarmExtVo
>
appAlarmVoList1
=
new
ArrayList
<>();
List
<
AppAlarmExtVo
>
appAlarmVoList1
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
idList
))
{
if
(
NRKJUse
)
{
appAlarmVoList
=
equipmentSpecificAlarmLogMapper
.
findByIdList
(
idList
);
if
(
CollectionUtils
.
isNotEmpty
(
idList
))
{
}
appAlarmVoList
=
equipmentSpecificAlarmLogMapper
.
findByIdListForNRKJ
(
idList
);
if
(
CollectionUtils
.
isNotEmpty
(
idBNullList
))
{
}
appAlarmVoList1
=
equipmentSpecificAlarmLogMapper
.
findByIdListNoBuildId
(
idBNullList
);
if
(
CollectionUtils
.
isNotEmpty
(
idBNullList
))
{
appAlarmVoList1
=
equipmentSpecificAlarmLogMapper
.
findByIdListNoBuildIdForNRKJ
(
idBNullList
);
}
}
else
{
if
(
CollectionUtils
.
isNotEmpty
(
idList
))
{
appAlarmVoList
=
equipmentSpecificAlarmLogMapper
.
findByIdList
(
idList
);
}
if
(
CollectionUtils
.
isNotEmpty
(
idBNullList
))
{
appAlarmVoList1
=
equipmentSpecificAlarmLogMapper
.
findByIdListNoBuildId
(
idBNullList
);
}
}
}
appAlarmVoList
.
addAll
(
appAlarmVoList1
);
appAlarmVoList
.
addAll
(
appAlarmVoList1
);
if
(
CollectionUtils
.
isNotEmpty
(
appAlarmVoList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
appAlarmVoList
))
{
...
@@ -479,11 +494,15 @@ public class SyncDataServiceImpl implements ISyncDataService {
...
@@ -479,11 +494,15 @@ public class SyncDataServiceImpl implements ISyncDataService {
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
AppAlarmVo
appAlarmVo
=
new
AppAlarmVo
();
AppAlarmVo
appAlarmVo
=
new
AppAlarmVo
();
BeanUtils
.
copyProperties
(
alarmVo
,
appAlarmVo
);
BeanUtils
.
copyProperties
(
alarmVo
,
appAlarmVo
);
appAlarmVo
.
setClient_id
(
clientId
);
map
.
put
(
"alarm"
,
appAlarmVo
);
map
.
put
(
"alarm"
,
appAlarmVo
);
if
(
isreport
)
{
if
(
isreport
)
{
map
.
put
(
"report"
,
getAppAlarmRportVo
(
alarmVo
));
map
.
put
(
"report"
,
getAppAlarmRportVo
(
alarmVo
));
}
else
{
}
else
{
map
.
put
(
"report"
,
new
AppAlarmRportVo
());
AppAlarmRportVo
vo
=
new
AppAlarmRportVo
();
vo
.
setTime
(
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
new
Date
()));
vo
.
setClient_id
(
clientId
);
map
.
put
(
"report"
,
vo
);
}
}
alarmList
.
add
(
map
);
alarmList
.
add
(
map
);
}
}
...
...
amos-boot-system-equip/src/main/resources/application-dev.properties
View file @
016c8278
...
@@ -81,8 +81,10 @@ dcs.token-key=dcs_token_key
...
@@ -81,8 +81,10 @@ dcs.token-key=dcs_token_key
dcs.client.secret
=
fire_system
dcs.client.secret
=
fire_system
dcs.x.hw.id
=
io.cs
dcs.x.hw.id
=
io.cs
dcs.x.hw.appKey
=
i!YmnHgJ=Ysz8V+O@ZG237inQKfixkQ.-#-P3IlR8fO%.#F!g%35Z#@tp$6G+52v
dcs.x.hw.appKey
=
i!YmnHgJ=Ysz8V+O@ZG237inQKfixkQ.-#-P3IlR8fO%.#F!g%35Z#@tp$6G+52v
dcs.url.token
=
http://198.87.103.158:8001/auth-service/oauth/token
# \u7531\u4E8E\u76EE\u524D\u6709\u4E0D\u6B62\u4E00\u4E2A\u6570\u5B57\u7AD9\u5E73\u53F0\u5BF9\u5E94\u63A5\u53E3\u89C4\u8303\u4E0D\u4E00\u81F4\uFF0C\u6240\u4EE5\u6B64\u5904\u589E\u52A0\u914D\u7F6E\uFF0Ctrue\u8868\u793A\u9002\u7528\u4E8E\u5357\u745E\u79D1\u6280\u7684\u63A5\u53E3\u89C4\u8303
dcs.url.sendalarm
=
http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
dcs.NRKJ.use
=
false
dcs.url.token
=
http://172.21.101.123/udaap-ddis/v1/cs/auth-service/oauth/token
dcs.url.sendalarm
=
http://172.21.101.101/v1/cs/alarm-service/appalarm/sendalarm
#dcs.url.token=https://192.168.4.89/v1/cs/auth-service/oauth/token
#dcs.url.token=https://192.168.4.89/v1/cs/auth-service/oauth/token
#dcs.url.sendalarm=https://192.168.4.89/v1/cs/alarm-service/appalarm/sendalarm
#dcs.url.sendalarm=https://192.168.4.89/v1/cs/alarm-service/appalarm/sendalarm
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
View file @
016c8278
...
@@ -55,6 +55,43 @@
...
@@ -55,6 +55,43 @@
GROUP BY
GROUP BY
sal.id
sal.id
</select>
</select>
<select
id=
"findByIdListForNRKJ"
resultType=
"com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo"
>
SELECT
'fire_system' AS clientId,
CONCAT(sal.create_date) AS time,
IFNULL(a.`code`,' ') AS areaid,
IFNULL(a.`name`,' ') AS areaname,
sal.station_code AS stationid,
sal.station_name AS stationname,
s.`code` AS deviceid,
s.`name` AS devicename,
sal.equipment_specific_code AS partid,
sal.equipment_specific_name AS partname,
s.`system_type_code` AS type,
IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
CONCAT(IF(a.`name` IS NOT NULL, CONCAT('位于', a.`name`, '的'), ''), sal.equipment_specific_name, '在', sal.create_date, '发生', sal.equipment_specific_index_name, '事件,请相关人员进行核实确认现场情况!') AS eventdesc,
sal.equipment_specific_index_name AS eventaction,
IF
( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport,
CONCAT(sal.confirm_date) AS confirmtime,
sal.alarm_reason AS eventreason
FROM
wl_equipment_specific_alarm_log sal
LEFT JOIN wl_form_instance i ON sal.build_id = i.instance_id
LEFT JOIN wl_area a ON a.id = i.field_value
LEFT JOIN f_fire_fighting_system s ON FIND_IN_SET(s.id, sal.system_ids)
WHERE
i.field_name = "belongAreaId"
<if
test=
"list != null and list.size() >0"
>
AND sal.id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
GROUP BY
sal.id
</select>
<select
id=
"findByIdListNoBuildId"
resultType=
"com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo"
>
<select
id=
"findByIdListNoBuildId"
resultType=
"com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo"
>
SELECT
SELECT
CONCAT(sal.create_date) AS time,
CONCAT(sal.create_date) AS time,
...
@@ -69,6 +106,42 @@
...
@@ -69,6 +106,42 @@
s.`system_type_code` AS type,
s.`system_type_code` AS type,
IF
IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
CONCAT(sal.equipment_specific_name, '在', sal.create_date, '发生', sal.equipment_specific_index_name, '事件,请相关人员进行核实确认现场情况!') AS eventdesc,
sal.equipment_specific_index_name AS eventaction,
IF
( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport ,
CONCAT(sal.confirm_date) AS confirmtime,
sal.alarm_reason AS eventreason
FROM
wl_equipment_specific_alarm_log sal
LEFT JOIN f_fire_fighting_system s ON FIND_IN_SET(s.id, sal.system_ids),
f_station_info f
<where>
<if
test=
"list != null and list.size() >0"
>
AND sal.id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
GROUP BY
sal.id
</select>
<select
id=
"findByIdListNoBuildIdForNRKJ"
resultType=
"com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo"
>
SELECT
'fire_system' AS clientId,
CONCAT(sal.create_date) AS time,
' ' AS areaid,
' ' AS areaname,
f.`code` AS stationid,
f.`name` AS stationname,
s.`code` AS deviceid,
s.`name` AS devicename,
sal.equipment_specific_code AS partid,
sal.equipment_specific_name AS partname,
s.`system_type_code` AS type,
IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
-- CONCAT( sal.equipment_specific_name, ' ', sal.equipment_specific_index_name ) AS eventdesc,
-- CONCAT( sal.equipment_specific_name, ' ', sal.equipment_specific_index_name ) AS eventdesc,
CONCAT(sal.equipment_specific_name, '在', sal.create_date, '发生', sal.equipment_specific_index_name, '事件,请相关人员进行核实确认现场情况!') AS eventdesc,
CONCAT(sal.equipment_specific_name, '在', sal.create_date, '发生', sal.equipment_specific_index_name, '事件,请相关人员进行核实确认现场情况!') AS eventdesc,
sal.equipment_specific_index_name AS eventaction,
sal.equipment_specific_index_name AS eventaction,
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
016c8278
...
@@ -1619,5 +1619,6 @@
...
@@ -1619,5 +1619,6 @@
AND find_in_set(#{sysId}, wlesa.system_ids)
AND find_in_set(#{sysId}, wlesa.system_ids)
</if>
</if>
</where>
</where>
ORDER BY wlesa.create_date DESC
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
016c8278
...
@@ -5164,7 +5164,7 @@
...
@@ -5164,7 +5164,7 @@
(
(
CONCAT(IFNULL( max( CASE WHEN ei.equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' THEN ei.`value` END ), '--' ), '') = '--',
CONCAT(IFNULL( max( CASE WHEN ei.equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' THEN ei.`value` END ), '--' ), '') = '--',
'--',
'--',
TRUNCATE
(max( CASE WHEN ei.equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' THEN ei.`value` END ), 2)) AS nowInfluentFlow,
ROUND
(max( CASE WHEN ei.equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' THEN ei.`value` END ), 2)) AS nowInfluentFlow,
IF
IF
((
((
max( CASE WHEN ei.equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' THEN ei.`value` END ) IS NOT NULL
max( CASE WHEN ei.equipment_index_key = 'FHS_FirePoolDevice_InfluentFlow' THEN ei.`value` END ) IS NOT NULL
...
...
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