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
df796ef5
Commit
df796ef5
authored
Dec 08, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_3.7.1.0' into develop_dl_3.7.1.0
parents
2941497c
1086dccc
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
251 additions
and
113 deletions
+251
-113
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
SShanMessage.java
.../java/com/yeejoin/equipmanage/common/vo/SShanMessage.java
+1
-0
EquipmentIotMqttReceiveConfig.java
...oin/equipmanage/config/EquipmentIotMqttReceiveConfig.java
+2
-2
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
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+3
-1
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+9
-3
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+17
-3
SyncDataServiceImpl.java
...yeejoin/equipmanage/service/impl/SyncDataServiceImpl.java
+29
-7
BeanUtil.java
...src/main/java/com/yeejoin/equipmanage/utils/BeanUtil.java
+12
-0
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+0
-6
application-dev.properties
...ystem-equip/src/main/resources/application-dev.properties
+10
-4
EquipmentSpecificAlarmLogMapper.xml
...main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
+80
-8
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+2
-0
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+1
-1
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+2
-2
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+27
-69
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 @
df796ef5
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
;
...
...
@@ -64,4 +65,9 @@ public class AppAlarmExtVo {
@ApiModelProperty
(
value
=
"是否拥有简报"
)
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 @
df796ef5
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,4 +45,8 @@ public class AppAlarmRportVo {
@ApiModelProperty
(
value
=
"相关报告"
)
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 @
df796ef5
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-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/PointTreeVo.java
View file @
df796ef5
...
...
@@ -151,4 +151,9 @@ public class PointTreeVo {
private
String
code
;
//建筑类型
private
String
groupType
;
/**
* 机构编码
*/
private
String
bizOrgCode
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/SShanMessage.java
View file @
df796ef5
...
...
@@ -18,4 +18,5 @@ public class SShanMessage {
private
String
pointId
;
private
String
time
;
private
String
deviceId
;
private
String
eventstatus
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/config/EquipmentIotMqttReceiveConfig.java
View file @
df796ef5
...
...
@@ -150,9 +150,9 @@ public class EquipmentIotMqttReceiveConfig {
mqttReceiveService
.
handlerMqttIncrementMessage
(
topic
,
msg
);
}
else
if
(
dataType
.
equals
(
"event"
)
&&
StringUtil
.
isNotEmpty
(
msg
))
{
mqttEventReceiveService
.
handlerMqttIncrementMessage
(
topic
,
msg
);
}
else
if
(
dataType
.
equals
(
"transmit"
)
&&
StringUtil
.
isNotEmpty
(
msg
)){
}
else
if
(
dataType
.
equals
(
"transmit"
)
&&
StringUtil
.
isNotEmpty
(
msg
)){
// 遥信遥测信号
mqttReceiveService
.
handlerMqttRomaMessage
(
topic
,
msg
);
}
else
if
(
dataType
.
equals
(
"shaoshan"
)
&&
StringUtil
.
isNotEmpty
(
msg
)){
}
else
if
(
dataType
.
equals
(
"shaoshan"
)
&&
StringUtil
.
isNotEmpty
(
msg
)){
// 告警信号
mqttReceiveService
.
handlerMqttStationMessage
(
topic
,
msg
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentDetailController.java
View file @
df796ef5
...
...
@@ -53,6 +53,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
/**
...
...
@@ -256,10 +257,13 @@ public class EquipmentDetailController extends AbstractBaseController {
}
FireFightingSystemEntity
fightingSystemEntity
=
new
FireFightingSystemEntity
();
if
(!
ObjectUtils
.
isEmpty
(
equipmentSpecific
.
getSystemId
())){
fightingSystemEntity
=
fireFightingSystemService
.
getOneById
(
Long
.
valueOf
(
equipmentSpecific
.
getSystemId
()));
equipmentSpecific
.
setSystemId
(
fightingSystemEntity
.
getName
());
String
ids
=
equipmentSpecific
.
getSystemId
();
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
{
equipmentSpecific
.
setSystem
Id
(
""
);
equipmentSpecific
.
setSystem
Name
(
""
);
}
equipmentSpecific
.
setSystemId
(
fightingSystemEntity
.
getName
());
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 @
df796ef5
...
...
@@ -27,8 +27,12 @@ public interface EquipmentSpecificAlarmLogMapper extends BaseMapper<EquipmentSpe
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
>
findByIdListNoBuildIdForNRKJ
(
@Param
(
"list"
)
List
<
Long
>
idBNullList
);
List
<
EquipmentSpecificAlarmLog
>
getIsConfirmByAlarmId
(
@Param
(
"equipmentSpecificId"
)
Long
equipmentSpecificId
,
@Param
(
"equipmentSpecificIndexKey"
)
String
equipmentSpecificIndexKey
,
@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 @
df796ef5
...
...
@@ -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
,
4
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
"0.0000"
.
equals
(
String
.
valueOf
(
rate
)))
{
...
...
@@ -122,7 +126,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
+
"%"
);
...
...
@@ -134,7 +142,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
+
"%"
);
...
...
@@ -147,7 +159,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/EquipmentSpecificSerivceImpl.java
View file @
df796ef5
...
...
@@ -53,6 +53,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.nio.charset.StandardCharsets
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
...
...
@@ -1943,7 +1944,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
iotIndexInfoVo
.
setNumber
(
deviceName
);
if
(
equipmentSpecificIndex
.
getIsTrend
()
==
1
)
{
iotIndexInfoVo
.
setContent
(
equipmentSpecificIndex
.
getIndexName
()
+
entry
.
getValue
()
+
equipmentSpecificIndex
.
getIndexUnitName
());
BigDecimal
val
=
new
BigDecimal
(
String
.
valueOf
(
entry
.
getValue
()));
iotIndexInfoVo
.
setContent
(
equipmentSpecificIndex
.
getIndexName
()
+
(
val
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
))
+
equipmentSpecificIndex
.
getIndexUnitName
());
}
else
{
if
(
pressurePumpStart
.
equals
(
equipmentSpecificIndex
.
getNameKey
()))
{
iotIndexInfoVo
.
setContent
(
TrueOrFalseEnum
.
real
.
value
.
equals
(
entry
.
getValue
())
?
equipmentSpecificIndex
.
getEquipmentIndexName
()
:
PressurePumpRelateEnum
.
STOP
.
getDesc
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
df796ef5
...
...
@@ -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/MqttReceiveServiceImpl.java
View file @
df796ef5
...
...
@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.component.influxdb.InfluxDbConnection
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentDefectAlarm
;
...
...
@@ -48,7 +47,6 @@ import org.springframework.util.CollectionUtils;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -198,6 +196,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
private
Resource
systemStateIndex
;
@Value
(
"${dcs.send.message}"
)
private
Boolean
NRMsgSend
;
@Value
(
"${message.alarm.char}"
)
private
String
specialChars
;
public
static
List
<
EquipmentSpecificAlarmLog
>
upAlarmLogStatus
(
String
iotCode
,
String
equipmentSpecificIndexKey
,
String
traceId
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
,
...
...
@@ -591,6 +591,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
action
.
setAlamContent
(
action
.
getEquipmentSpecificName
()
+
action
.
getEquipmentSpecificIndexName
());
}
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
bool
=
Boolean
.
FALSE
;
}
else
{
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
equipmentSpecificAlarmLogService
,
false
,
""
));
...
...
@@ -692,7 +693,14 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
SShanStationMessage
sShanStationMessage
=
JSON
.
parseObject
(
String
.
valueOf
(
message
),
SShanStationMessage
.
class
);
Map
<
Object
,
Object
>
equipmentIndexKeyMap
=
redisUtils
.
hmget
(
RedisKey
.
EQUIP_INDEX_ADDRESS_KEY_STATION
);
sShanStationMessage
.
getWarns
().
forEach
(
m
->
{
String
value
=
m
.
getEventTextL1
().
contains
(
"出现"
)
?
TRUE
:
FALSE
;
String
value
;
if
(
message
.
contains
(
"eventtextL1"
))
{
// 此通道目前专供韶山告警消息value赋值,没必要用配置文件多字段进行逐个判断,所以暂时不修改
value
=
m
.
getEventTextL1
().
contains
(
"出现"
)
?
TRUE
:
FALSE
;
}
else
{
value
=
String
.
valueOf
(
BeanUtil
.
judgePropertyContainsChar
(
m
.
getEventstatus
(),
specialChars
));
}
if
(
equipmentIndexKeyMap
.
get
(
m
.
getPointId
())
!=
null
)
{
EquipmentSpecificIndex
equipmentSpeIndex
=
equipmentSpecificIndexService
.
getEquipmentSpeIndexByAddress
(
null
,
m
.
getPointId
(),
null
);
if
(
equipmentSpeIndex
==
null
)
{
...
...
@@ -845,6 +853,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
action
.
setAlamContent
(
action
.
getEquipmentSpecificName
()
+
action
.
getEquipmentSpecificIndexName
());
}
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
bool
=
Boolean
.
FALSE
;
}
else
{
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
equipmentSpecificAlarmLogService
,
false
,
""
));
...
...
@@ -931,6 +940,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
});
}
/**
* 物联数据处理
*
...
...
@@ -1134,6 +1144,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
action
.
setAlamContent
(
action
.
getEquipmentSpecificName
()
+
action
.
getEquipmentSpecificIndexName
());
}
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
bool
=
Boolean
.
FALSE
;
}
else
{
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
equipmentSpecificAlarmLogService
,
false
,
""
));
...
...
@@ -1499,6 +1510,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
model
.
setExtras
(
equipMap
);
}
model
.
setRelationId
(
String
.
valueOf
(
equipmentSpecificAlarmLog
.
getId
()));
List
<
String
>
receive
=
new
ArrayList
<>();
receive
.
add
(
"system"
);
model
.
setRecivers
(
receive
);
Token
token
=
remoteSecurityService
.
getServerToken
();
systemctlFeign
.
create
(
token
.
getAppKey
(),
token
.
getProduct
(),
token
.
getToke
(),
model
);
log
.
info
(
String
.
format
(
"调用平台消息服务成功:%s"
,
JSON
.
toJSONString
(
model
)));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SyncDataServiceImpl.java
View file @
df796ef5
...
...
@@ -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
;
...
...
@@ -25,7 +26,6 @@ import com.yeejoin.equipmanage.utils.DcsUtil;
import
com.yeejoin.equipmanage.utils.SyncDataUtil
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.nio.client.HttpAsyncClient
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -38,6 +38,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,6 +66,12 @@ public class SyncDataServiceImpl implements ISyncDataService {
@Value
(
"${dcs.x.hw.appKey}"
)
private
String
xHwAppKey
;
@Value
(
"${dcs.NRKJ.use}"
)
private
Boolean
NRKJUse
;
@Value
(
"${dcs.source.type}"
)
private
String
sourceType
;
@Autowired
private
DcsUtil
dcsUtil
;
...
...
@@ -427,6 +434,7 @@ public class SyncDataServiceImpl implements ISyncDataService {
private
AppAlarmRportVo
getAppAlarmRportVo
(
AppAlarmExtVo
vo
)
{
AppAlarmRportVo
alarmRportVo
=
new
AppAlarmRportVo
();
alarmRportVo
.
setClient_id
(
clientId
);
alarmRportVo
.
setTime
(
vo
.
getConfirmtime
());
alarmRportVo
.
setEventdesc
(
vo
.
getEventdesc
());
alarmRportVo
.
setEventreason
(
vo
.
getEventreason
());
...
...
@@ -451,11 +459,20 @@ public class SyncDataServiceImpl implements ISyncDataService {
if
(
CollectionUtils
.
isNotEmpty
(
idList
)
||
CollectionUtils
.
isNotEmpty
(
idBNullList
))
{
List
<
AppAlarmExtVo
>
appAlarmVoList
=
new
ArrayList
<>();
List
<
AppAlarmExtVo
>
appAlarmVoList1
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
idList
))
{
appAlarmVoList
=
equipmentSpecificAlarmLogMapper
.
findByIdList
(
idList
);
}
if
(
CollectionUtils
.
isNotEmpty
(
idBNullList
))
{
appAlarmVoList1
=
equipmentSpecificAlarmLogMapper
.
findByIdListNoBuildId
(
idBNullList
);
if
(
NRKJUse
)
{
if
(
CollectionUtils
.
isNotEmpty
(
idList
))
{
appAlarmVoList
=
equipmentSpecificAlarmLogMapper
.
findByIdListForNRKJ
(
idList
);
}
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
);
if
(
CollectionUtils
.
isNotEmpty
(
appAlarmVoList
))
{
...
...
@@ -479,11 +496,16 @@ public class SyncDataServiceImpl implements ISyncDataService {
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
AppAlarmVo
appAlarmVo
=
new
AppAlarmVo
();
BeanUtils
.
copyProperties
(
alarmVo
,
appAlarmVo
);
appAlarmVo
.
setClient_id
(
clientId
);
appAlarmVo
.
setType
(
sourceType
);
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-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/utils/BeanUtil.java
View file @
df796ef5
...
...
@@ -30,4 +30,16 @@ public class BeanUtil {
public
static
void
copyPropertiesIgnoreNull
(
Object
src
,
Object
target
){
BeanUtils
.
copyProperties
(
src
,
target
,
getNullPropertyNames
(
src
));
}
public
static
boolean
judgePropertyContainsChar
(
String
sourceStr
,
String
specialStr
)
{
boolean
bool
=
Boolean
.
FALSE
;
String
[]
strings
=
specialStr
.
split
(
","
);
for
(
String
code
:
strings
)
{
if
(
sourceStr
.
contains
(
code
))
{
bool
=
Boolean
.
TRUE
;
break
;
}
}
return
bool
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
df796ef5
...
...
@@ -263,12 +263,6 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override
public
Page
<
HashMap
<
String
,
Object
>>
getPlanTaskInfoNew
(
PlanTaskPageParam
params
)
{
if
(
StringUtils
.
isEmpty
(
params
.
getBeginDate
()))
{
params
.
setBeginDate
(
""
);
}
if
(
StringUtils
.
isEmpty
(
params
.
getEndDate
()))
{
params
.
setEndDate
(
""
);
}
long
total
=
planTaskMapper
.
countPlanTask
(
params
);
List
<
HashMap
<
String
,
Object
>>
content
=
planTaskMapper
.
getPlanTaskInfo
(
params
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
params
,
total
);
...
...
amos-boot-system-equip/src/main/resources/application-dev.properties
View file @
df796ef5
...
...
@@ -78,8 +78,11 @@ dcs.token-key=dcs_token_key
dcs.client.secret
=
fire_system
dcs.x.hw.id
=
io.cs
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
dcs.url.sendalarm
=
http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
# \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.NRKJ.use
=
false
dcs.source.type
=
\u
9ad8
\u
7ea7
\u
5e94
\u7528
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.sendalarm=https://192.168.4.89/v1/cs/alarm-service/appalarm/sendalarm
...
...
@@ -150,4 +153,7 @@ spring.influx.database=iot_platform
spring.influx.retention_policy
=
default
spring.influx.retention_policy_time
=
30d
spring.influx.actions
=
10000
spring.influx.bufferLimit
=
20000
\ No newline at end of file
spring.influx.bufferLimit
=
20000
# message\u670D\u52A1\u8F6C\u53D1\u544A\u8B66\u4FE1\u53F7\u7279\u6B8A\u5224\u65AD\u5B57\u7B26\u96C6
message.alarm.char
=
\u
51FA
\u
73B0
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
View file @
df796ef5
...
...
@@ -23,17 +23,17 @@
CONCAT(sal.create_date) AS time,
IFNULL(a.`code`,' ') AS areaid,
IFNULL(a.`name`,' ') AS areaname,
f.`code`
AS stationid,
f.`name`
AS stationname,
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,
'高级应用'
AS type,
IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
-- CONCAT( sal.equipment_specific_name, ' ', sal.equipment_specific_index_name ) AS eventdesc,
CONCAT(
'位于', a.`name`, '的', sal.equipment_specific_name, '(', sal.equipment_specific_code, ')在', sal.create_date, '发生', sal.equipment_specific_index_name, '
,请相关人员进行核实确认现场情况!') AS eventdesc,
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,
...
...
@@ -43,8 +43,44 @@
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),
f_station_info f
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=
"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,
'高级应用' 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"
>
...
...
@@ -67,11 +103,47 @@
s.`name` AS devicename,
sal.equipment_specific_code AS partid,
sal.equipment_specific_name AS partname,
s.`system_type_code` AS type,
'高级应用' AS type,
IF
( 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,
'高级应用' 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_code, ')在', 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,
IF
( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport ,
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
df796ef5
...
...
@@ -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/EquipmentSpecificMapper.xml
View file @
df796ef5
...
...
@@ -1869,7 +1869,7 @@
WHEN 'false' THEN
'关'
ELSE
si.`value`
IF(si.`value` IS NOT NULL AND si.`value` != '', ROUND(si.`value`, 2), '')
END
)
ELSE
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
df796ef5
...
...
@@ -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
...
...
@@ -5599,7 +5599,7 @@
</select>
<select
id=
"selectAllPressurePumpInfo"
resultType=
"java.util.Map"
>
SELECT
e
d
.`name`,
e
s
.`name`,
concat_ws( '-', ws.full_name, ed.area ) area,
es.iot_code,
es.id,
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
df796ef5
...
...
@@ -13,44 +13,24 @@
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
<!-- AND-->
<!-- ((<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{beginDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{endDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- )-->
<if
test=
"beginDate!=null and endDate!=null and endDate != '' and beginDate != ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate=='' and endDate != null and endDate != ''"
>
AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate!=null and beginDate != '' and endDate == ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"beginDate=='' and beginDate != null and endDate == ''"
>
AND a.begin_Time
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"endDate=='' and endDate != null and beginDate == ''"
>
AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"searchDay!=null and searchDay != '' and searchDay == 1"
>
and a.`check_date` = curdate()
</if>
<if
test=
"beginDate != null and endDate != null and endDate != '' and beginDate != ''"
>
AND a.begin_time
<![CDATA[>=]]>
#{beginDate} AND a.end_time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"(beginDate == null or beginDate == '') and endDate != null and endDate != ''"
>
AND a.end_time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate != null and beginDate != '' and (endDate == null or endDate == '')"
>
and a.begin_time
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"searchDay!=null and searchDay != '' and searchDay == 1"
>
and a.`check_date` = curdate()
</if>
</where>
order by b.id) t
</select>
...
...
@@ -99,37 +79,15 @@
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
<!-- AND-->
<!-- ((<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{beginDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{endDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- )-->
<if
test=
"beginDate!=null and endDate!=null and endDate != '' and beginDate != ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate=='' and endDate != null and endDate != ''"
>
AND a.end_Time
<![CDATA[<=]]>
#{endDate}
<if
test=
"beginDate != null and endDate != null and beginDate != '' and endDate != '' "
>
AND a.begin_time
<![CDATA[>=]]>
#{beginDate} AND a.end_time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate!=null and beginDate != '' and endDate == ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate}
<if
test=
"(beginDate == null or beginDate == '') and endDate != null and endDate != ''"
>
AND a.end_time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate=='' and beginDate != null and endDate != ''"
>
AND a.begin_Time
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"endDate=='' and endDate != null"
>
AND a.end_Time
<![CDATA[<=]]>
#{endDate}
<if
test=
"beginDate != null and beginDate != '' and (endDate == null or endDate == '')"
>
and a.begin_time
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
...
...
@@ -141,7 +99,7 @@
and a.`check_date` = curdate()
</if>
</where>
order by b.id
order by b.id
desc
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
...
...
@@ -276,7 +234,7 @@
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
) a
<include
refid=
"plan-task-app-where"
/>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
...
...
@@ -527,7 +485,7 @@
ptd.route_id routeId,
ptd.plan_id planId,
ptd.user_id AS userId,
ptd.end_time AS endTime,
pptd.id as planTaskDetailId,
(select p_plan.dept_id from p_plan where p_plan.id=ptd.plan_id) depId
...
...
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