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
04cff5bc
Commit
04cff5bc
authored
Aug 26, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询已绑定排油阀的换流变信息
parent
54db3921
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
144 additions
and
0 deletions
+144
-0
KeyWordsInfoController.java
...eejoin/equipmanage/controller/KeyWordsInfoController.java
+44
-0
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+4
-0
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+2
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+51
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+43
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/KeyWordsInfoController.java
0 → 100644
View file @
04cff5bc
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author keyong
* @title: AlarmStatisticController
* <pre>
* @description: TODO
* </pre>
* @date 2024/7/31 19:33
*/
@RestController
@Api
(
tags
=
"关键数据相关API"
)
@RequestMapping
(
value
=
"/keyWordsInfo"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
class
KeyWordsInfoController
extends
AbstractBaseController
{
@Autowired
private
IFireFightingSystemService
iFireFightingSystemService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"查询已绑定排油阀的换流变信息"
,
notes
=
"查询已绑定排油阀的换流变信息"
)
@RequestMapping
(
value
=
"/getFEquipInfoList"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
getFEquipInfoList
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
iFireFightingSystemService
.
getFEquipInfoList
(
bizOrgCode
);
return
CommonResponseUtil
.
success
(
resultList
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
04cff5bc
...
@@ -771,4 +771,8 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -771,4 +771,8 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List
<
Map
<
String
,
Object
>>
getSystemAlarmNum
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
String
startDate
,
String
endDate
);
List
<
Map
<
String
,
Object
>>
getSystemAlarmNum
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
String
startDate
,
String
endDate
);
List
<
Map
<
String
,
Object
>>
getSystemTypes
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getSystemTypes
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getFEquipInfoList
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getEquipIndexList
(
@Param
(
"collect"
)
List
<
String
>
collect
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
04cff5bc
...
@@ -360,4 +360,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
...
@@ -360,4 +360,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
List
<
OrgMenuDto
>
getSystemEquipTree
(
String
systemCode
);
List
<
OrgMenuDto
>
getSystemEquipTree
(
String
systemCode
);
List
<
Map
<
String
,
Object
>>
getSystemAlarmNum
(
String
bizOrgCode
,
String
startDate
,
String
endDate
);
List
<
Map
<
String
,
Object
>>
getSystemAlarmNum
(
String
bizOrgCode
,
String
startDate
,
String
endDate
);
List
<
Map
<
String
,
Object
>>
getFEquipInfoList
(
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
04cff5bc
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
...
@@ -2924,4 +2927,52 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2924,4 +2927,52 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
});
});
return
result
;
return
result
;
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
getFEquipInfoList
(
String
bizOrgCode
)
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
baseMapper
.
getFEquipInfoList
(
bizOrgCode
);
ArrayList
<
String
>
strings
=
new
ArrayList
<>();
list
.
forEach
(
item
->
{
String
equipIds
=
item
.
get
(
"equipIds"
).
toString
();
strings
.
addAll
(
Arrays
.
asList
(
equipIds
.
split
(
","
)));
});
List
<
String
>
collect
=
strings
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
equipIndexList
=
this
.
baseMapper
.
getEquipIndexList
(
collect
);
Map
<
String
,
Map
<
String
,
Object
>>
equipmentSpecificId
=
equipIndexList
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
get
(
"equipmentSpecificId"
).
toString
(),
item
->
item
));
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
list
.
forEach
(
item
->
{
int
isOpen
=
0
;
Date
updateDate
=
null
;
String
equipIds
=
item
.
get
(
"equipIds"
).
toString
();
String
[]
equipIdList
=
equipIds
.
split
(
","
);
for
(
String
index
:
equipIdList
)
{
if
(
ObjectUtil
.
isNotEmpty
(
equipmentSpecificId
)
&&
equipmentSpecificId
.
containsKey
(
index
)
&&
equipmentSpecificId
.
get
(
index
).
containsKey
(
"equipmentIndexKey"
)
&&
equipmentSpecificId
.
get
(
index
).
get
(
"equipmentIndexKey"
).
toString
().
equals
(
"ONL_DrainOilValve_Open"
))
{
Map
<
String
,
Object
>
map
=
equipmentSpecificId
.
get
(
index
);
isOpen
=
1
;
if
(
updateDate
==
null
)
{
updateDate
=
DateUtil
.
parse
(
map
.
get
(
"updateDate"
).
toString
(),
DatePattern
.
UTC_SIMPLE_PATTERN
);
}
else
{
int
comparisonResult
=
DateUtil
.
compare
(
updateDate
,
DateUtil
.
parse
(
map
.
get
(
"updateDate"
).
toString
(),
DatePattern
.
UTC_SIMPLE_PATTERN
));
updateDate
=
comparisonResult
<
0
?
DateUtil
.
parse
(
map
.
get
(
"updateDate"
).
toString
(),
DatePattern
.
UTC_SIMPLE_PATTERN
)
:
updateDate
;
}
}
}
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
if
(
isOpen
==
1
)
{
resultMap
.
put
(
"startStatus"
,
item
.
get
(
"name"
).
toString
()
+
"开启"
);
resultMap
.
put
(
"drainDuration"
,
item
.
get
(
"drainDuration"
));
resultMap
.
put
(
"updateDate"
,
updateDate
);
resultList
.
add
(
resultMap
);
}
});
HashMap
<
String
,
Object
>
closeMap
=
new
HashMap
<>();
closeMap
.
put
(
"startStatus"
,
"关闭"
);
closeMap
.
put
(
"updateDate"
,
"--"
);
closeMap
.
put
(
"drainDuration"
,
""
);
List
<
Map
<
String
,
Object
>>
closeList
=
Collections
.
singletonList
(
closeMap
);
return
CollUtil
.
isNotEmpty
(
resultList
)
?
resultList
:
closeList
;
}
}
}
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
04cff5bc
...
@@ -7243,4 +7243,47 @@
...
@@ -7243,4 +7243,47 @@
GROUP BY
GROUP BY
t1.system_type_code
t1.system_type_code
</select>
</select>
<select
id=
"getFEquipInfoList"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.drain_duration AS drainDuration,
a.`code` AS `code`,
a.`name` AS `name`,
GROUP_CONCAT( c.id ) AS equipIds
FROM
f_equipment a
LEFT JOIN f_equipment_fire_equipment b ON b.equipment_id = a.id
LEFT JOIN wl_equipment_specific c ON b.fire_equipment_id = c.id and LEFT ( c.equipment_code, 8 ) = '92100400'
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND c.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
GROUP BY
a.id
HAVING
equipIds IS NOT NULL
AND equipIds != ''
</select>
<select
id=
"getEquipIndexList"
resultType=
"java.util.Map"
>
SELECT
equipment_specific_id AS equipmentSpecificId,
update_date AS updateDate,
equipment_index_key AS equipmentIndexKey
FROM
wl_equipment_specific_index
WHERE
equipment_index_key IN ( 'ONL_DrainOilValve_Open', 'ONL_DrainOilValve_Close' )
AND `value` = 'true'
AND equipment_specific_id in
<foreach
collection=
"collect"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
GROUP BY
equipment_specific_id
ORDER BY
update_date DESC
</select>
</mapper>
</mapper>
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