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
1a823227
Commit
1a823227
authored
Oct 12, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_plan6' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl_plan6
parents
edd4acf3
c211e018
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
196 additions
and
2 deletions
+196
-2
MarqueeData.java
...va/com/yeejoin/equipmanage/common/entity/MarqueeData.java
+33
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+2
-0
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+5
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+96
-0
wl-3.0.1.xml
...ot-system-equip/src/main/resources/changelog/wl-3.0.1.xml
+18
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+40
-0
powerReport.ftl
...oot-module-tdc-biz/src/main/resources/ftl/powerReport.ftl
+2
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/MarqueeData.java
0 → 100644
View file @
1a823227
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@TableName
(
"wl_marquee_data"
)
@ApiModel
(
value
=
"marquee_data对象"
,
description
=
""
)
public
class
MarqueeData
extends
BaseEntity
{
/**
* 类型
*/
private
String
type
;
/**
* 设备名称
*/
private
String
name
;
/**
* 位置
*/
private
String
position
;
/**
* 消息类型
*/
private
String
messageType
;
/**
* 是否已读【0:未读;1:已读】
*/
private
String
isRead
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
1a823227
...
@@ -144,6 +144,7 @@ public class WaterResourceController extends BaseController {
...
@@ -144,6 +144,7 @@ public class WaterResourceController extends BaseController {
waterResourceServiceImpl
.
createWithModel
(
model
);
waterResourceServiceImpl
.
createWithModel
(
model
);
WaterResourcePoolDto
waterResourcePoolDto
=
new
WaterResourcePoolDto
();
WaterResourcePoolDto
waterResourcePoolDto
=
new
WaterResourcePoolDto
();
BeanUtils
.
copyProperties
(
model
,
waterResourcePoolDto
);
BeanUtils
.
copyProperties
(
model
,
waterResourcePoolDto
);
// waterResourcePoolDto.setLevelDeviceId(String.join(",", model.getLevelDeviceId()));
waterResourcePoolDto
.
setSequenceNbr
(
null
);
waterResourcePoolDto
.
setSequenceNbr
(
null
);
waterResourcePoolDto
.
setResourceId
(
model
.
getSequenceNbr
());
waterResourcePoolDto
.
setResourceId
(
model
.
getSequenceNbr
());
waterResourcePoolService
.
createWithModel
(
waterResourcePoolDto
);
waterResourcePoolService
.
createWithModel
(
waterResourcePoolDto
);
...
@@ -412,6 +413,7 @@ public class WaterResourceController extends BaseController {
...
@@ -412,6 +413,7 @@ public class WaterResourceController extends BaseController {
waterResourcePoolService
.
getOne
(
new
QueryWrapper
<
WaterResourcePool
>().
eq
(
"resource_id"
,
waterResourcePoolService
.
getOne
(
new
QueryWrapper
<
WaterResourcePool
>().
eq
(
"resource_id"
,
sequenceNbr
));
sequenceNbr
));
BeanUtils
.
copyProperties
(
waterResourcePool
,
waterResourceDto
);
BeanUtils
.
copyProperties
(
waterResourcePool
,
waterResourceDto
);
// waterResourceDto.setLevelDeviceId(Arrays.asList(waterResourcePool.getLevelDeviceId().split(",")));
break
;
break
;
default
:
default
:
break
;
break
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
1a823227
...
@@ -604,4 +604,9 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -604,4 +604,9 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List
<
Map
<
String
,
Object
>>
queryStartAndStopBySpecificId
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
List
<
Map
<
String
,
Object
>>
queryStartAndStopBySpecificId
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
List
<
Map
<
String
,
Object
>>
queryStateBySpecificId
(
@Param
(
"id"
)
long
id
);
List
<
Map
<
String
,
Object
>>
queryStateBySpecificId
(
@Param
(
"id"
)
long
id
);
Map
<
String
,
Object
>
getFoamTankLevel
(
@Param
(
"equipSpeId"
)
Long
equipSpeId
);
Map
<
String
,
Object
>
getPipeNetwork
(
@Param
(
"equipSpeId"
)
Long
equipSpeId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
1a823227
...
@@ -39,6 +39,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -39,6 +39,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.lang.reflect.Array
;
import
java.lang.reflect.Array
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
...
@@ -89,6 +91,22 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -89,6 +91,22 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
@Autowired
@Autowired
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
/**
* 泡沫罐KEY
*/
private
final
static
String
CAFS_FoamTank_FoamTankLevel
=
"CAFS_FoamTank_FoamTankLevel"
;
/**
* 泡沫罐KEY
*/
private
final
static
String
FHS_PipePressureDetector_PipePressure
=
"FHS_PipePressureDetector_PipePressure"
;
/**
* 水池信息
*/
private
final
static
String
FHS_FirePoolDevice_WaterLevel
=
"FHS_FirePoolDevice_WaterLevel"
;
static
EquipmentSpecificMapper
equipmentSpecificMapper
;
static
EquipmentSpecificMapper
equipmentSpecificMapper
;
@Autowired
@Autowired
public
void
setEquipmentSpecificMapper
(
EquipmentSpecificMapper
equipmentSpecificMapper
){
public
void
setEquipmentSpecificMapper
(
EquipmentSpecificMapper
equipmentSpecificMapper
){
...
@@ -327,6 +345,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -327,6 +345,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if
(
equipmentSpecificIndex
.
getIsAlarm
()
!=
null
&&
1
==
equipmentSpecificIndex
.
getIsAlarm
())
{
if
(
equipmentSpecificIndex
.
getIsAlarm
()
!=
null
&&
1
==
equipmentSpecificIndex
.
getIsAlarm
())
{
equipmentSpecificAlarms
.
addAll
(
createIndexAlarmRecord
(
equipmentSpecificIndex
));
equipmentSpecificAlarms
.
addAll
(
createIndexAlarmRecord
(
equipmentSpecificIndex
));
}
}
if
(
iotDataVO
.
getKey
().
toLowerCase
().
equals
(
CAFS_FoamTank_FoamTankLevel
.
toLowerCase
())
||
FHS_PipePressureDetector_PipePressure
.
toLowerCase
().
equals
(
iotDataVO
.
getKey
().
toLowerCase
())
)
{
doFoamTankLevel
(
iotDataVO
,
equipmentSpecificIndex
);
}
}
}
}
}
});
});
...
@@ -379,6 +403,78 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -379,6 +403,78 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
});
});
}
}
/**
* 泡沫罐 或 者管网压力 消息发送
* @param iotDataVO iotDataVO
* @param equipmentSpecificIndex equipmentSpecificIndex
*/
private
void
doFoamTankLevel
(
IotDataVO
iotDataVO
,
EquipmentSpecificIndex
equipmentSpecificIndex
)
{
MessageModel
model
=
new
MessageModel
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
iotDataVO
.
getKey
().
toLowerCase
().
equals
(
CAFS_FoamTank_FoamTankLevel
.
toLowerCase
()))
{
map
=
fireFightingSystemMapper
.
getFoamTankLevel
(
equipmentSpecificIndex
.
getEquipmentSpecificId
());
}
else
{
map
=
fireFightingSystemMapper
.
getPipeNetwork
(
equipmentSpecificIndex
.
getEquipmentSpecificId
());
}
BigDecimal
minValue
=
getBigDecimal
(
map
.
get
(
"minValues"
));
BigDecimal
maxValue
=
getBigDecimal
(
map
.
get
(
"maxValues"
));
BigDecimal
nowValue
=
getBigDecimal
(
iotDataVO
.
getValue
());
if
(
nowValue
.
compareTo
(
minValue
)
<
0
||
nowValue
.
compareTo
(
maxValue
)
>
0
)
{
String
body
=
""
;
if
(
nowValue
.
compareTo
(
minValue
)
<
0
)
{
body
=
"当前数值 "
+
nowValue
+
" 低于最低报警阈值 "
+
minValue
;
}
else
if
(
nowValue
.
compareTo
(
maxValue
)
>
0
)
{
body
=
"当前数值 "
+
nowValue
+
" 超过最高报警阈值 "
+
maxValue
;
}
String
bodyMain
=
String
.
format
(
"名称:模拟量提醒,时间:%s,内容:%s,- 当前数值%s,%s ,请及时查看处理。"
,
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
new
Date
()),
equipmentSpecificIndex
.
getEquipmentSpecificName
()
+
"-"
+
equipmentSpecificIndex
.
getLocation
(),
nowValue
,
nowValue
.
compareTo
(
minValue
)
<
0
?
"低于最低报警阈值"
+
minValue
:
"超过最高报警阈值"
+
maxValue
);
model
.
setTitle
(
equipmentSpecificIndex
.
getEquipmentSpecificName
());
model
.
setBody
(
bodyMain
);
model
.
setMsgType
(
"FoamTankOrPipeNetwork"
);
model
.
setSendTime
(
new
Date
());
model
.
setIsSendWeb
(
true
);
model
.
setCategory
(
1
);
model
.
setRelationId
(
equipmentSpecificIndex
.
getEquipmentSpecificId
().
toString
());
model
.
setIsSendApp
(
false
);
model
.
setTerminal
(
"WEB"
);
model
.
setRecivers
(
Arrays
.
asList
(
"system"
));
Map
<
String
,
String
>
ext
=
new
HashMap
<>();
ext
.
put
(
"content"
,
body
);
ext
.
put
(
"type"
,
"模拟量超阈值提醒"
);
ext
.
put
(
"name"
,
equipmentSpecificIndex
.
getEquipmentSpecificName
());
ext
.
put
(
"time"
,
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
new
Date
()));
model
.
setExtras
(
ext
);
Token
token
=
remoteSecurityService
.
getServerToken
();
systemctlFeign
.
create
(
token
.
getAppKey
(),
token
.
getProduct
(),
token
.
getToke
(),
model
);
log
.
info
(
String
.
format
(
"调用平台消息服务成功:%s"
,
JSON
.
toJSONString
(
model
)));
}
}
private
BigDecimal
getBigDecimal
(
Object
value
)
{
BigDecimal
val
=
null
;
if
(
value
!=
null
)
{
if
(
value
instanceof
BigDecimal
)
{
val
=
(
BigDecimal
)
value
;
}
else
if
(
value
instanceof
String
)
{
val
=
new
BigDecimal
(
(
String
)
value
);
}
else
if
(
value
instanceof
BigInteger
)
{
val
=
new
BigDecimal
(
(
BigInteger
)
value
);
}
else
if
(
value
instanceof
Number
)
{
val
=
new
BigDecimal
(
((
Number
)
value
).
doubleValue
()
);
}
else
{
throw
new
ClassCastException
(
"Not possible to coerce ["
+
value
+
"] from class "
+
value
.
getClass
()+
" into a BigDecimal."
);
}
}
return
val
;
}
public
void
carRealTimeDate
(
List
<
IotDataVO
>
iotDatalist
,
List
<
CarProperty
>
carProperties
)
{
public
void
carRealTimeDate
(
List
<
IotDataVO
>
iotDatalist
,
List
<
CarProperty
>
carProperties
)
{
List
<
CarProperty
>
carIndexsList
=
new
ArrayList
<>();
List
<
CarProperty
>
carIndexsList
=
new
ArrayList
<>();
iotDatalist
.
forEach
(
iotDataVO
->
{
iotDatalist
.
forEach
(
iotDataVO
->
{
...
...
amos-boot-system-equip/src/main/resources/changelog/wl-3.0.1.xml
View file @
1a823227
...
@@ -3013,4 +3013,21 @@
...
@@ -3013,4 +3013,21 @@
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_date`;
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_date`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"tianyiming"
id=
"20221011tianyiming"
runAlways=
"true"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"wl_supervision_video"
/>
</not>
</preConditions>
<comment>
add wl_supervision_video
</comment>
<sql>
CREATE TABLE `wl_supervision_video` (
`id` bigint(20) NOT NULL,
`biz_org_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属公司',
`camera_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '摄像头id',
`create_date` datetime DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
1a823227
...
@@ -4947,4 +4947,44 @@
...
@@ -4947,4 +4947,44 @@
ORDER BY
ORDER BY
i.update_date DESC
i.update_date DESC
</select>
</select>
<select
id=
"getFoamTankLevel"
resultType=
"java.util.Map"
>
SELECT
IF
(
max( CASE WHEN fi.field_name = 'minLevel' THEN fi.field_value END ) = ''
OR max( CASE WHEN fi.field_name = 'minLevel' THEN fi.field_value END ) IS NULL,
0,
max( CASE WHEN fi.field_name = 'minLevel' THEN fi.field_value END )) AS minValues,
IF
(
max( CASE WHEN fi.field_name = 'maxLevel' THEN fi.field_value END ) = ''
OR max( CASE WHEN fi.field_name = 'maxLevel' THEN fi.field_value END ) IS NULL,
0,
max( CASE WHEN fi.field_name = 'maxLevel' THEN fi.field_value END )) AS maxValues
FROM
wl_form_instance fi
WHERE
fi.instance_id = #{equipSpeId}
</select>
<select
id=
"getPipeNetwork"
resultType=
"java.util.Map"
>
SELECT
IF
(
max( CASE WHEN fi.field_name = 'minPressure' THEN fi.field_value END ) = ''
OR max( CASE WHEN fi.field_name = 'minPressure' THEN fi.field_value END ) IS NULL,
0,
max( CASE WHEN fi.field_name = 'minPressure' THEN fi.field_value END )) AS minValues,
IF
(
max( CASE WHEN fi.field_name = 'maxPressure' THEN fi.field_value END ) = ''
OR max( CASE WHEN fi.field_name = 'maxPressure' THEN fi.field_value END ) IS NULL,
0,
max( CASE WHEN fi.field_name = 'maxPressure' THEN fi.field_value END )) AS maxValues
FROM
wl_form_instance fi
WHERE
fi.instance_id = #{equipSpeId}
</select>
</mapper>
</mapper>
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/resources/ftl/powerReport.ftl
View file @
1a823227
...
@@ -2257,7 +2257,7 @@
...
@@ -2257,7 +2257,7 @@
<w:sz-cs
w:val=
"28"
/>
<w:sz-cs
w:val=
"28"
/>
<w:lang
w:val=
"EN-US"
w:fareast=
"ZH-CN"
/>
<w:lang
w:val=
"EN-US"
w:fareast=
"ZH-CN"
/>
</w:rPr>
</w:rPr>
<w:t>
是否合格
</w:t>
<w:t>
检验结果
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -2291,7 +2291,7 @@
...
@@ -2291,7 +2291,7 @@
<w:sz-cs
w:val=
"28"
/>
<w:sz-cs
w:val=
"28"
/>
<w:lang
w:val=
"EN-US"
w:fareast=
"ZH-CN"
/>
<w:lang
w:val=
"EN-US"
w:fareast=
"ZH-CN"
/>
</w:rPr>
</w:rPr>
<w:t>
标准原文
</w:t>
<w:t>
规范标准值
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
...
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