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
540c0de4
Commit
540c0de4
authored
Nov 23, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6
parents
cf7aaf55
2bcb9e96
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
171 additions
and
43 deletions
+171
-43
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+16
-2
DCenterController.java
...com/yeejoin/equipmanage/controller/DCenterController.java
+20
-0
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+7
-9
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+2
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+36
-26
application-dev.properties
...ystem-equip/src/main/resources/application-dev.properties
+5
-2
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+1
-2
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+78
-0
TdcDrawingController.java
.../boot/module/tdc/biz/controller/TdcDrawingController.java
+6
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
540c0de4
...
...
@@ -87,7 +87,14 @@
order by u.rec_date desc
)a where a.sequenceNbr is not null
<if
test=
"map.fieldsValue != null"
>
<foreach
collection=
"map.fieldsValue.keys"
item=
"item"
>
AND a.${item} = #{map.fieldsValue[${item}]}
</foreach>
<foreach
collection=
"map.fieldsValue.keys"
item=
"item"
>
<if
test=
"item != 'bizOrgName'"
>
AND a.${item} = #{map.fieldsValue[${item}]}
</if>
</foreach>
</if>
</select>
...
...
@@ -164,7 +171,14 @@
order by u.rec_date desc
)a where a.sequenceNbr is not null
<if
test=
"map.fieldsValue != null"
>
<foreach
collection=
"map.fieldsValue.keys"
item=
"item"
>
AND a.${item} = #{map.fieldsValue[${item}]}
</foreach>
<foreach
collection=
"map.fieldsValue.keys"
item=
"item"
>
<if
test=
"item != 'bizOrgName'"
>
AND a.${item} = #{map.fieldsValue[${item}]}
</if>
</foreach>
</if>
LIMIT #{map.pageNum}, #{map.pageSize}
</select>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/DCenterController.java
View file @
540c0de4
...
...
@@ -3,6 +3,8 @@ package com.yeejoin.equipmanage.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.config.PersonIdentify
;
import
com.yeejoin.equipmanage.mapper.FireFightingSystemMapper
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
...
...
@@ -38,6 +40,9 @@ public class DCenterController extends AbstractBaseController {
private
IEquipmentSpecificAlarmService
equipmentSpecificAlarmService
;
@Autowired
private
FireFightingSystemMapper
fireFightingSystemMapper
;
@Autowired
IFireFightingSystemService
fireFightingSystemService
;
@Autowired
...
...
@@ -110,5 +115,20 @@ public class DCenterController extends AbstractBaseController {
public
ResponseModel
getEquipmentStatisticsInfo
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
)
throws
Exception
{
return
CommonResponseUtil
.
success
(
specificService
.
getEquipmentStatisticsInfo
(
bizOrgCode
));
}
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"消防水池液位"
)
@GetMapping
(
"/equip/water/info"
)
public
ResponseModel
getWaterInfo
(
CommonPageable
commonPageable
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
return
CommonResponseUtil
.
success
(
fireFightingSystemMapper
.
getCenterWaterInfo
(
page
,
bizOrgCode
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
540c0de4
...
...
@@ -213,12 +213,10 @@ public class SupervisionConfigureController extends AbstractBaseController {
request8
.
setName
(
"specificIndexKey"
);
request8
.
setValue
(
StringUtil
.
isNotEmpty
(
typeCode
)
?
StringUtils
.
trimToNull
(
typeCode
)
:
null
);
queryRequests
.
add
(
request8
);
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
()))
{
CommonRequest
request13
=
new
CommonRequest
();
request13
.
setName
(
"bizOrgCode"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request13
);
}
CommonRequest
request13
=
new
CommonRequest
();
request13
.
setName
(
"bizOrgCode"
);
request13
.
setValue
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
bizOrgCode
);
queryRequests
.
add
(
request13
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
return
CommonResponseUtil
.
success
(
equipmentSpecificAlarmService
.
fireAlarmLogPage
(
param
));
}
...
...
@@ -240,11 +238,11 @@ public class SupervisionConfigureController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"概览稳压泵信息"
)
@GetMapping
(
"/getPressurePumpInfo"
)
public
ResponseModel
getPressurePumpInfo
(
CommonPageable
commonPageable
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
getPressurePumpInfo
(
CommonPageable
commonPageable
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
))
{
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
...
...
@@ -335,7 +333,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
boolean
time
=
false
;
if
(!
ObjectUtils
.
isEmpty
(
stateMap
)
&&
stateMap
.
containsKey
(
"update_date"
)
&&
stateMap
.
containsKey
(
"equipment_index_name"
))
{
item
.
put
(
"update_time"
,
String
.
valueOf
(
stateMap
.
get
(
"update_date"
)).
replaceAll
(
"T"
,
" "
));
if
(!
ObjectUtils
.
isEmpty
(
stateMap
.
get
(
"value"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
stateMap
.
get
(
"value"
)))
{
item
.
put
(
"equipment_index_name"
,
stateMap
.
get
(
"equipment_index_name"
));
}
else
{
item
.
put
(
"equipment_index_name"
,
"无信号"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
540c0de4
...
...
@@ -623,4 +623,6 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Map
<
String
,
Object
>
getSystemRunningInfoList
();
List
<
Map
<
String
,
Object
>>
getFireCarInfoByYJYA
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
getCenterWaterInfo
(
Page
page
,
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
540c0de4
...
...
@@ -214,6 +214,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
@Value
(
"${isSendIot:false}"
)
private
Boolean
isSendIot
;
@Value
(
"${is.open.telemetering:false}"
)
private
Boolean
isOpenTelemetering
;
private
static
Boolean
jcsSwitch
;
@Value
(
"${systemctl.jcs.switch}"
)
public
void
setJcsSwitch
(
Boolean
jcsSwitch
){
...
...
@@ -392,36 +395,43 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
// 遥测遥信数据推送云端kafka
JSONObject
jsonObjectXf
=
new
JSONObject
();
jsonObjectXf
.
put
(
"data_class"
,
"realdata"
);
// 遥测
if
(
equipmentSpeIndex
.
getIsTrend
()
==
1
)
{
jsonObjectXf
.
put
(
"data_type"
,
"analog"
);
}
else
{
String
date
=
DateUtils
.
date2LongStr
(
new
Date
());
jsonObjectXf
.
put
(
"op_type"
,
"subscribe_emergency"
);
JSONObject
jsonObjectCondition
=
new
JSONObject
();
jsonObjectCondition
.
put
(
"station_psr_id"
,
stationCode
);
jsonObjectCondition
.
put
(
"station_name"
,
stationName
);
jsonObjectCondition
.
put
(
"data_upload_time"
,
date
);
jsonObjectXf
.
put
(
"condition"
,
jsonObjectCondition
);
JSONObject
jsonObjectData
=
new
JSONObject
();
jsonObjectData
.
put
(
"psrId"
,
stationCode
);
jsonObjectData
.
put
(
"astId"
,
equipmentSpecificIndex
.
getSpecificCode
());
jsonObjectData
.
put
(
"equipType"
,
equipmentSpecificIndex
.
getEquipmentCode
());
jsonObjectData
.
put
(
"name"
,
equipmentSpecificIndex
.
getEquipmentSpecificName
()+
"-"
+
equipmentSpecificIndex
.
getEquipmentSpecificIndexName
());
if
(
value
.
equals
(
"true"
))
{
jsonObjectData
.
put
(
"value"
,
"1"
);
}
else
if
(
value
.
equals
(
"false"
))
{
jsonObjectData
.
put
(
"value"
,
"0"
);
}
else
{
jsonObjectData
.
put
(
"value"
,
value
);
}
jsonObjectData
.
put
(
"measurementType"
,
equipmentSpecificIndex
.
getEquipmentIndexKey
());
jsonObjectData
.
put
(
"dateTime"
,
date
);
jsonObjectData
.
put
(
"quality"
,
"0"
);
// 量测质量码:0 有效,1 无效
List
<
JSONObject
>
jsonObjects
=
Arrays
.
asList
(
jsonObjectData
);
jsonObjectXf
.
put
(
"data_type"
,
"state"
);
}
jsonObjectXf
.
put
(
"data"
,
jsonObjects
);
String
date
=
DateUtils
.
date2LongStr
(
new
Date
());
jsonObjectXf
.
put
(
"op_type"
,
"subscribe_emergency"
);
JSONObject
jsonObjectCondition
=
new
JSONObject
();
jsonObjectCondition
.
put
(
"station_psr_id"
,
stationCode
);
jsonObjectCondition
.
put
(
"station_name"
,
stationName
);
jsonObjectCondition
.
put
(
"data_upload_time"
,
date
);
jsonObjectXf
.
put
(
"condition"
,
jsonObjectCondition
);
JSONObject
jsonObjectData
=
new
JSONObject
();
jsonObjectData
.
put
(
"psrId"
,
stationCode
);
jsonObjectData
.
put
(
"astId"
,
equipmentSpecificIndex
.
getSpecificCode
());
jsonObjectData
.
put
(
"equipType"
,
equipmentSpecificIndex
.
getEquipmentCode
());
jsonObjectData
.
put
(
"name"
,
equipmentSpecificIndex
.
getEquipmentSpecificName
()+
"-"
+
equipmentSpecificIndex
.
getEquipmentSpecificIndexName
());
if
(
value
.
equals
(
"true"
))
{
jsonObjectData
.
put
(
"value"
,
"1"
);
}
else
if
(
value
.
equals
(
"false"
))
{
jsonObjectData
.
put
(
"value"
,
"0"
);
}
else
{
jsonObjectData
.
put
(
"value"
,
value
);
}
jsonObjectData
.
put
(
"measurementType"
,
equipmentSpecificIndex
.
getEquipmentIndexKey
());
jsonObjectData
.
put
(
"dateTime"
,
date
);
jsonObjectData
.
put
(
"quality"
,
"0"
);
// 量测质量码:0 有效,1 无效
List
<
JSONObject
>
jsonObjects
=
Arrays
.
asList
(
jsonObjectData
);
jsonObjectXf
.
put
(
"data"
,
jsonObjects
);
// 遥测
if
(!
isOpenTelemetering
&&
equipmentSpeIndex
.
getIsTrend
()
==
1
)
{
}
else
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
"emq.xf.created"
,
jsonObjectXf
.
toString
().
getBytes
(),
1
,
false
);
log
.
info
(
"遥测遥信数据推送云端kafka成功"
);
...
...
amos-boot-system-equip/src/main/resources/application-dev.properties
View file @
540c0de4
...
...
@@ -114,4 +114,7 @@ equipment.pressurepump.stop=FHS_PressurePump_Stop
# 站端标识
state.code
=
JP
state.name
=
NAME
\ No newline at end of file
state.name
=
NAME
# 是否开启遥测数据上报
is.open.telemetering
=
false
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
540c0de4
...
...
@@ -1367,7 +1367,6 @@
SELECT
`wlesal`.id as alarmLogId,
equipment_specific_index_name,
wles.biz_org_name,
equipment_specific_name,
DATE_FORMAT(`wlesal`.`create_date`,'%m-%d %H:%i:%s') alarm_time,
location,
...
...
@@ -1385,7 +1384,7 @@
AND wlesal.type = #{param.fireEquipmentSpecificIndexKey}
</if>
<if
test=
"param.bizOrgCode != null and param.bizOrgCode != ''"
>
AND wles.biz_org_code like concat (#{param.bizOrgCode},'%')
AND wles
al
.biz_org_code like concat (#{param.bizOrgCode},'%')
</if>
</where>
ORDER BY
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
540c0de4
...
...
@@ -5287,4 +5287,82 @@
GROUP BY
`wc`.`id`
</select>
<select
id=
"getCenterWaterInfo"
resultType=
"java.util.Map"
>
SELECT
a.`name`,
(
CASE
WHEN a.nowLevel IS NULL THEN
'--'
WHEN a.nowLevel >= IFNULL( a.minLevel, 0 )
AND a.maxLevel IS NULL THEN
'100'
WHEN IFNULL( a.minLevel, 0 ) > a.nowLevel
AND a.maxLevel IS NULL THEN
'--' ELSE IFNULL((
FORMAT(
abs(
IFNULL(
a.nowLevel,
IFNULL( a.minLevel, 0 )) /
IF
(
IFNULL( a.maxLevel, 0 ) = 0,
1,
IFNULL( a.maxLevel, 0 ))) * 100,
2
)
),
0
)
END
) AS levelAbs,
IFNULL( a.nowLevel, '--' ) nowLevel,
(
CASE
WHEN a.nowLevel IS NULL
OR a.minLevel IS NULL THEN
'--'
WHEN IFNULL( a.minLevel, 0 ) > IFNULL(
a.nowLevel,
IFNULL( a.minLevel, 0 )) THEN
'缺水' ELSE '正常'
END
) AS levelStatus
FROM
(
SELECT
r.`name`,
IFNULL( rp.min_water_level, 0 ) AS minLevel,
IFNULL( rp.max_water_level, 0 ) AS maxLevel,
(
SELECT
FORMAT( avg( IFNULL( ei.`value`, 0 )), 2 )
FROM
wl_equipment_specific_index ei
WHERE
( ei.equipment_index_key = 'FHS_FirePoolDevice_WaterLevel' OR ei.equipment_index_key = 'FHS_WirelessliquidDetector_WaterLevel' )
AND FIND_IN_SET( ei.equipment_specific_id, rp.level_device_id ) > 0
) AS nowLevel,
rp.level_device_id
FROM
cb_water_resource r
LEFT JOIN cb_water_resource_pool rp ON rp.resource_id = r.sequence_nbr
WHERE
r.resource_type IN ( 'pool', 'industryPool' )
AND r.is_delete = 1
AND r.`biz_org_code` IS NOT NULL
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
AND r.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
GROUP BY
r.sequence_nbr
) a ORDER BY
levelStatus DESC
</select>
</mapper>
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/controller/TdcDrawingController.java
View file @
540c0de4
...
...
@@ -47,6 +47,7 @@ public class TdcDrawingController extends BaseController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
boolean
saveTdcDrawing
(
HttpServletRequest
request
,
@RequestBody
TdcDrawing
tdcDrawing
)
{
...
...
@@ -59,10 +60,11 @@ public class TdcDrawingController extends BaseController {
* @param id
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
return
iTdcDrawingService
.
removeById
(
id
);
public
ResponseModel
<
Boolean
>
deleteById
(
HttpServletRequest
request
,
@PathVariable
List
<
Long
>
id
)
{
return
ResponseHelper
.
buildResponse
(
iTdcDrawingService
.
removeByIds
(
id
)
);
}
...
...
@@ -71,6 +73,7 @@ public class TdcDrawingController extends BaseController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改"
,
notes
=
"修改"
)
public
boolean
updateByIdTdcDrawing
(
HttpServletRequest
request
,
@RequestBody
TdcDrawing
tdcDrawing
)
{
...
...
@@ -84,6 +87,7 @@ public class TdcDrawingController extends BaseController {
* @param id
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
TdcDrawing
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
...
...
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