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
73c14c38
Commit
73c14c38
authored
Dec 05, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改站端3.7.1.1版本bug
parent
46d8c8cf
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
56 additions
and
12 deletions
+56
-12
AppAlarmExtVo.java
...yeejoin/equipmanage/common/datasync/vo/AppAlarmExtVo.java
+5
-1
AppAlarmRportVo.java
...ejoin/equipmanage/common/datasync/vo/AppAlarmRportVo.java
+2
-0
AppAlarmVo.java
...om/yeejoin/equipmanage/common/datasync/vo/AppAlarmVo.java
+7
-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
+8
-2
EquipmentSpecificAlarmLogMapper.xml
...main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
+2
-1
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 @
73c14c38
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -65,6 +66,8 @@ public class AppAlarmExtVo {
@ApiModelProperty
(
value
=
"是否拥有简报"
)
private
Boolean
isreport
=
false
;
@JsonProperty
(
"client_id"
)
@ApiModelProperty
(
value
=
"客户端id"
)
private
String
client_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 @
73c14c38
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -44,6 +45,7 @@ public class AppAlarmRportVo {
@ApiModelProperty
(
value
=
"相关报告"
)
private
String
analysisreport
=
""
;
@JsonProperty
(
"client_id"
)
@ApiModelProperty
(
value
=
"客户端id"
)
private
String
client_id
;
...
...
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 @
73c14c38
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -58,4 +59,9 @@ public class AppAlarmVo {
@ApiModelProperty
(
value
=
"是否拥有简报"
)
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-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmLogServiceImpl.java
View file @
73c14c38
...
...
@@ -103,7 +103,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
if
(
"0"
.
equals
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"sumNum"
)))
||
"0"
.
equals
(
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
{
BigDecimal
rate
=
nowDaySum
.
subtract
(
lastDaySum
).
divide
(
lastDaySum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
alarmEquipDayLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
...
...
@@ -116,7 +120,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
if
(
"0"
.
equals
(
String
.
valueOf
(
alarmEquipMonthLink
.
get
(
"sumNum"
)))
||
"0"
.
equals
(
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
{
BigDecimal
rate
=
nowMonthSum
.
subtract
(
lastMonthSum
).
divide
(
lastMonthSum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
alarmEquipMonthLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
...
...
@@ -128,7 +136,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
if
(
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipDayLink
.
get
(
"sumNum"
)))
||
"0"
.
equals
(
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
{
BigDecimal
rate
=
nowUncleanDaySum
.
subtract
(
lastUncleanDaySum
).
divide
(
lastUncleanDaySum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
unCleanAlarmEquipDayLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
...
...
@@ -141,7 +153,11 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
if
(
"0"
.
equals
(
String
.
valueOf
(
unCleanAlarmEquipMonthLink
.
get
(
"sumNum"
)))
||
"0"
.
equals
(
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
{
BigDecimal
rate
=
nowUncleanMonthSum
.
subtract
(
lastUncleanMonthSum
).
divide
(
lastUncleanMonthSum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
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 @
73c14c38
...
...
@@ -1619,8 +1619,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
sys
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
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
);
// 系统名称
...
...
@@ -1819,8 +1821,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
system
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
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
);
// 系统名称
...
...
@@ -2021,8 +2025,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
system
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
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
);
// 系统名称
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SyncDataServiceImpl.java
View file @
73c14c38
...
...
@@ -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.EquipmentIndexVO
;
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.mapper.EquipmentSpecificAlarmLogMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
...
...
@@ -38,6 +39,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -65,7 +67,7 @@ public class SyncDataServiceImpl implements ISyncDataService {
@Value
(
"${dcs.x.hw.appKey}"
)
private
String
xHwAppKey
;
@Value
(
"
dcs.NRKJ.use
"
)
@Value
(
"
${dcs.NRKJ.use}
"
)
private
Boolean
NRKJUse
;
@Autowired
...
...
@@ -492,11 +494,15 @@ public class SyncDataServiceImpl implements ISyncDataService {
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
AppAlarmVo
appAlarmVo
=
new
AppAlarmVo
();
BeanUtils
.
copyProperties
(
alarmVo
,
appAlarmVo
);
appAlarmVo
.
setClient_id
(
clientId
);
map
.
put
(
"alarm"
,
appAlarmVo
);
if
(
isreport
)
{
map
.
put
(
"report"
,
getAppAlarmRportVo
(
alarmVo
));
}
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
);
}
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
View file @
73c14c38
...
...
@@ -57,7 +57,7 @@
</select>
<select
id=
"findByIdListForNRKJ"
resultType=
"com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo"
>
SELECT
'fire_system' AS client
_i
d,
'fire_system' AS client
I
d,
CONCAT(sal.create_date) AS time,
IFNULL(a.`code`,' ') AS areaid,
IFNULL(a.`name`,' ') AS areaname,
...
...
@@ -129,6 +129,7 @@
</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,
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
73c14c38
...
...
@@ -1618,5 +1618,6 @@
AND find_in_set(#{sysId}, wlesa.system_ids)
</if>
</where>
ORDER BY wlesa.create_date DESC
</select>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
73c14c38
...
...
@@ -5045,7 +5045,7 @@
(
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
((
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