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
3cf5fb39
Commit
3cf5fb39
authored
Jan 08, 2025
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动化需求开发 bug
parent
08dce405
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
241 additions
and
0 deletions
+241
-0
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+22
-0
IEquipmentSpecificSerivce.java
...eejoin/equipmanage/service/IEquipmentSpecificSerivce.java
+8
-0
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+211
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
3cf5fb39
...
@@ -365,4 +365,26 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
...
@@ -365,4 +365,26 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List
<
Map
<
String
,
String
>>
getIndexKeyByIotCode
(
@Param
(
"list"
)
Set
<
String
>
list
);
List
<
Map
<
String
,
String
>>
getIndexKeyByIotCode
(
@Param
(
"list"
)
Set
<
String
>
list
);
List
<
Map
<
String
,
String
>>
getIndexKeyByIotCodeWaterTank
(
@Param
(
"list"
)
Set
<
String
>
list
);
List
<
Map
<
String
,
String
>>
getIndexKeyByIotCodeWaterTank
(
@Param
(
"list"
)
Set
<
String
>
list
);
long
queryForFireEquipmentHistoryCount
(
@Param
(
"fireEquipmentName"
)
String
fireEquipmentName
,
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"equipmentCode"
)
String
equipmentCode
);
//查询 消防设备历史数据
List
<
Map
>
queryForFireEquipmentHistory
(
@Param
(
"fireEquipmentName"
)
String
fireEquipmentName
,
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"start"
)
long
start
,
@Param
(
"length"
)
int
length
,
@Param
(
"equipmentCode"
)
String
equipmentCode
);
List
<
Map
<
String
,
Object
>>
getPumpInfoList
();
List
<
Map
<
String
,
Object
>>
getFireInfoList
();
List
<
Map
<
String
,
Object
>>
getConInfoList
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificSerivce.java
View file @
3cf5fb39
...
@@ -16,6 +16,7 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex;
...
@@ -16,6 +16,7 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex;
import
com.yeejoin.equipmanage.common.entity.dto.EquipTypeAmountPageDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipTypeAmountPageDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.utils.CommonPageable
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -332,8 +333,15 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
...
@@ -332,8 +333,15 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
void
updateCarStatus
(
String
status
,
String
carId
);
void
updateCarStatus
(
String
status
,
String
carId
);
EquipTrendResultVo
operatingTrendIot
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
);
EquipTrendResultVo
operatingTrendIot
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
);
org
.
springframework
.
data
.
domain
.
Page
queryForFireEquipmentHistory
(
String
fireEquipmentName
,
String
equipmentName
,
String
startTime
,
String
endTime
,
CommonPageable
commonPageable
,
String
equipmentCode
);
EquipTrendResultVo
operatingTrendPressurePump
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
)
throws
ParseException
;
EquipTrendResultVo
operatingTrendPressurePump
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
)
throws
ParseException
;
EquipTrendResultVo
operatingTrendWater
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
)
throws
ParseException
;
EquipTrendResultVo
operatingTrendWater
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
)
throws
ParseException
;
List
<
Map
<
String
,
Object
>>
queryOperationMonitoring
();
}
}
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
3cf5fb39
...
@@ -2932,6 +2932,217 @@
...
@@ -2932,6 +2932,217 @@
</if>
</if>
</select>
</select>
<select
id=
"queryForFireEquipmentHistoryCount"
resultType=
"long"
>
SELECT
COUNT(1)
FROM
(
SELECT
det.`name` as fireEquipmentName,
spe.`code` as fireEquipmentCode,
(
SELECT
group_concat(DISTINCT f.`name`)
FROM
f_equipment_fire_equipment efe
JOIN f_equipment f ON efe.equipment_id = f.id
WHERE
efe.fire_equipment_id = ind.equipment_specific_id
) equipmentName,
ind.update_date
FROM
wl_equipment_specific_index as ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
WHERE ind.`value` IS NOT NULL AND ind.`value` != ''
<if
test=
"equipmentCode != null and equipmentCode != ''"
>
AND det.code LIKE concat(#{equipmentCode}, '%')
</if>
) d
<where>
<if
test=
"fireEquipmentName!=null"
>
AND d.fireEquipmentName LIKE '%${fireEquipmentName}%'
</if>
<if
test=
"equipmentName!=null"
>
AND d.equipmentName LIKE '%${equipmentName}%'
</if>
<if
test=
"startTime != null and startTime != ''"
>
AND d.update_date
>
= #{startTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
AND d.update_date
<
= #{endTime}
</if>
</where>
</select>
<select
id=
"queryForFireEquipmentHistory"
resultType=
"map"
>
SELECT
d.*
FROM
(
SELECT
det.`name` as fireEquipmentName,
spe.`code` as fireEquipmentCode,
ein.name as eq_point_name,
CASE ind.value WHEN 'true' THEN '是'
WHEN 'false' THEN '否'
ELSE FORMAT(IFNULL(ind.value, 0), 2) END 'e_value',
ein.unit as eq_point_unit,
CONCAT(IFNULL(str.full_name,''),' ',IFNULL(sto.description,'')) as source_name,
(
SELECT
group_concat(DISTINCT f.`name`)
FROM
f_equipment_fire_equipment efe
JOIN f_equipment f ON efe.equipment_id = f.id
WHERE
efe.fire_equipment_id = ind.equipment_specific_id
) equipmentName,
ind.update_date as create_date,
( SELECT
IFNULL(GROUP_CONCAT( temp.name SEPARATOR ','),'') AS systemName
FROM
( SELECT NAME FROM f_fire_fighting_system fs WHERE FIND_IN_SET( fs.id, spe.system_id ) ) temp
) AS systemName
FROM
wl_equipment_specific_index as ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment_index as ein on ind.equipment_index_id = ein.id
left join wl_stock_detail as sto on sto.equipment_specific_id = spe.id
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.source_id
WHERE ind.`value` IS NOT NULL AND ind.`value` != '' AND ein.is_iot = 1
<if
test=
"equipmentCode != null and equipmentCode != ''"
>
AND det.code LIKE concat(#{equipmentCode}, '%')
</if>
) d
<where>
<if
test=
"fireEquipmentName!=null"
>
AND d.fireEquipmentName LIKE '%${fireEquipmentName}%'
</if>
<if
test=
"equipmentName!=null"
>
AND d.equipmentName LIKE '%${equipmentName}%'
</if>
<if
test=
"startTime != null and startTime != ''"
>
AND d.create_date
>
= #{startTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
AND d.create_date
<
= #{endTime}
</if>
</where>
ORDER BY d.create_date desc
LIMIT ${start},${length}
</select>
<select
id=
"getPumpInfoList"
resultType=
"java.util.Map"
>
SELECT COALESCE
( a.id, '' ) AS id,
COALESCE ( a.iot_code, '' ) AS iotCode,
COALESCE ( a.code, '' ) AS code,
COALESCE ( a.name, '' ) AS name,
COALESCE ( a.warehouse_structure_id, '' ) AS buildId,
COALESCE ( b.name, '' ) AS buildName,
esi.equipment_index_key as equipmentIndexKey,
esi.`value` as indexValue
FROM
wl_equipment_specific a
LEFT JOIN wl_warehouse_structure b ON a.warehouse_structure_id = b.id
LEFT JOIN (
SELECT
equipment_specific_id,
equipment_index_key,
`value`,
update_date
FROM
(
SELECT
*,
ROW_NUMBER() OVER ( PARTITION BY equipment_specific_id ORDER BY update_date DESC ) AS rn
FROM
wl_equipment_specific_index
WHERE
( equipment_index_key IN ( 'FHS_PressurePump_Start', 'FHS_PressurePump_Stop' ) AND `value` = 'true' )
OR ( equipment_index_key = 'FHS_PressurePump_ManualAutomaticSignal' AND `value` IS NOT NULL AND `value` != '' )
) esi_with_rn
WHERE
esi_with_rn.rn = 1
) esi ON a.id = esi.equipment_specific_id
WHERE
a.equipment_code LIKE '92010800%'
</select>
<select
id=
"getFireInfoList"
resultType=
"java.util.Map"
>
SELECT COALESCE
( a.id, '' ) AS id,
COALESCE ( a.iot_code, '' ) AS iotCode,
COALESCE ( a.CODE, '' ) AS code,
COALESCE ( a.NAME, '' ) AS name,
COALESCE ( a.warehouse_structure_id, '' ) AS buildId,
COALESCE ( b.NAME, '' ) AS buildName,
ifnull( esi.equipment_index_key, 'FHS_FirePump_Stop' ) AS equipmentIndexKey,
'true' AS indexValue
FROM
wl_equipment_specific a
LEFT JOIN wl_warehouse_structure b ON a.warehouse_structure_id = b.id
LEFT JOIN (
SELECT
equipment_specific_id,
equipment_index_key,
`value`,
update_date
FROM
(
SELECT
*,
ROW_NUMBER() OVER ( PARTITION BY equipment_specific_id ORDER BY update_date DESC ) AS rn
FROM
wl_equipment_specific_index
WHERE
( equipment_index_key IN ( 'FHS_FirePump_Start', 'FHS_FirePump_Stop' ) AND `value` = 'true' )
) esi_with_rn
WHERE
esi_with_rn.rn = 1
) esi ON a.id = esi.equipment_specific_id
WHERE
a.equipment_code LIKE '920106007%'
</select>
<select
id=
"getConInfoList"
resultType=
"java.util.Map"
>
SELECT COALESCE
( a.id, '' ) AS id,
COALESCE ( a.iot_code, '' ) AS iotCode,
COALESCE ( a.code, '' ) AS code,
COALESCE ( a.name, '' ) AS name,
COALESCE ( a.warehouse_structure_id, '' ) AS buildId,
COALESCE ( b.name, '' ) AS buildName,
esi.equipment_index_key as equipmentIndexKey,
esi.`value` as indexValue
FROM
wl_equipment_specific a
LEFT JOIN wl_warehouse_structure b ON a.warehouse_structure_id = b.id
LEFT JOIN (
SELECT
equipment_specific_id,
equipment_index_key,
`value`,
update_date
FROM
(
SELECT
*,
ROW_NUMBER() OVER ( PARTITION BY equipment_specific_id ORDER BY update_date DESC ) AS rn
FROM
wl_equipment_specific_index
WHERE
equipment_index_key = 'FHS_PressurePump_ManualAutomaticSignal' AND `value` IS NOT NULL AND `value` != ''
) esi_with_rn
WHERE
esi_with_rn.rn = 1
) esi ON a.id = esi.equipment_specific_id
WHERE
a.equipment_code LIKE '92010500%'
</select>
<select
id=
"getFireEquipStatistic"
resultType=
"Map"
>
<select
id=
"getFireEquipStatistic"
resultType=
"Map"
>
SELECT
SELECT
a.`name` AS `name`,
a.`name` AS `name`,
...
...
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