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
eff9924d
Commit
eff9924d
authored
Aug 07, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_bugfix_0723' into develop_dl_bugfix_0723
parents
cff3c7d1
a983c80f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
53 deletions
+91
-53
SystemStatisticController.java
...oin/equipmanage/controller/SystemStatisticController.java
+24
-11
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+7
-4
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+60
-38
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SystemStatisticController.java
View file @
eff9924d
...
@@ -59,24 +59,37 @@ public class SystemStatisticController extends AbstractBaseController {
...
@@ -59,24 +59,37 @@ public class SystemStatisticController extends AbstractBaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/alarm/panel"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/system-types-num-stats"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统告警统计信息"
,
notes
=
"获取系统告警统计信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统类型数据统计"
,
notes
=
"获取系统类型数据统计"
)
public
ResponseModel
getAbnormalSystemInfo
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
getSystemTypesNumStats
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
List
<
Map
<
String
,
Object
>>
list
=
fireFightingSystemMapper
.
getAbnormalSystemInfo
(
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
list
=
fireFightingSystemMapper
.
getSystemTypesNumStats
(
bizOrgCode
);
return
CommonResponseUtil
.
success
(
list
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/system-types"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统类型列表"
,
notes
=
"获取系统类型列表"
)
public
ResponseModel
getSystemTypes
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
List
<
Map
<
String
,
Object
>>
list
=
fireFightingSystemMapper
.
getSystemTypes
(
bizOrgCode
);
return
CommonResponseUtil
.
success
(
list
);
return
CommonResponseUtil
.
success
(
list
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/page"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/page"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取水池信息"
,
notes
=
"获取水池信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统信息"
,
notes
=
"获取系统信息"
)
public
ResponseModel
getSystemPage
(
CommonPageable
commonPageable
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
,
public
ResponseModel
getSystemPage
(
CommonPageable
commonPageable
,
@RequestParam
(
required
=
false
)
String
systemType
,
@RequestParam
(
required
=
false
)
String
systemState
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
required
=
false
)
String
stateOrder
,
@RequestParam
(
required
=
false
)
String
alarmEquips
)
{
@RequestParam
(
required
=
false
)
String
systemType
,
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
@RequestParam
(
required
=
false
)
String
systemState
,
commonPageable
.
setPageNumber
(
1
);
@RequestParam
(
required
=
false
)
String
sorter
)
{
String
sortField
=
""
,
sortOrder
=
""
;
if
(
org
.
springframework
.
util
.
StringUtils
.
hasText
(
sorter
))
{
sortField
=
sorter
.
split
(
"@"
)[
0
];
sortOrder
=
sorter
.
split
(
"@"
)[
1
];
}
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
Page
<
Map
<
String
,
Object
>>
page1
=
fireFightingSystemMapper
.
getSystemInfoPage
(
page
,
bizOrgCode
,
systemType
,
systemState
,
s
tateOrder
,
alarmEquips
);
Page
<
Map
<
String
,
Object
>>
page1
=
fireFightingSystemMapper
.
getSystemInfoPage
(
page
,
bizOrgCode
,
systemType
,
systemState
,
s
ortField
,
sortOrder
);
return
CommonResponseUtil
.
success
(
page1
);
return
CommonResponseUtil
.
success
(
page1
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
eff9924d
...
@@ -754,13 +754,15 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -754,13 +754,15 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Map
<
String
,
Object
>
getCenterEquipState
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Map
<
String
,
Object
>
getCenterEquipState
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
get
AbnormalSystemInfo
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
get
SystemTypesNumStats
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
getSystemInfoPage
(
Page
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
Page
<
Map
<
String
,
Object
>>
getSystemInfoPage
(
Page
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"systemType"
)
String
systemType
,
@Param
(
"systemType"
)
String
systemType
,
@Param
(
"systemState"
)
String
systemState
,
@Param
(
"systemState"
)
String
systemState
,
@Param
(
"stateOrder"
)
String
stateOrder
,
@Param
(
"sortField"
)
String
sortField
,
@Param
(
"alarmEquips"
)
String
alarmEquips
);
@Param
(
"sortOrder"
)
String
sortOrder
);
Map
<
String
,
Object
>
getIotInfo
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Map
<
String
,
Object
>
getIotInfo
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
...
@@ -768,4 +770,5 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -768,4 +770,5 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List
<
Map
<
String
,
Object
>>
getSystemAlarmNum
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getSystemAlarmNum
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getSystemTypes
(
String
bizOrgCode
);
}
}
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
eff9924d
...
@@ -6911,30 +6911,32 @@
...
@@ -6911,30 +6911,32 @@
) d
) d
</select>
</select>
<select
id=
"get
AbnormalSystemInfo
"
resultType=
"Map"
>
<select
id=
"get
SystemTypesNumStats
"
resultType=
"Map"
>
SELECT
SELECT
d.id,
d.id,
d.`name`
,
d.system_type_code AS code
,
SUM(IF( d.VALUE > 0, 1, 0 )) AS sysNum
d.name,
FROM
SUM(IF( d.VALUE > 0, 1, 0 )) AS num
(
FROM
(
SELECT
SELECT
`fs`.`id` AS `id`
,
t1.id AS id
,
`fs`.`name` AS `name`
,
t2.name AS name
,
fs
.system_type_code,
t1
.system_type_code,
( SELECT count( 1 ) FROM `wl_equipment_specific_alarm_log` WHERE 0
<![CDATA[<>]]>
find_in_set( `fs`.`id`, `wl_equipment_specific_alarm_log`.`system_ids` ) ) AS `value`
(SELECT count(1) FROM wl_equipment_specific_alarm_log t WHERE 0
<![CDATA[<>]]>
find_in_set( t1.id, t.system_ids ) ) AS value
FROM
FROM
`f_fire_fighting_system` `fs`
f_fire_fighting_system t1
WHERE
LEFT JOIN wl_equipment_category t2 on t1.system_type = t2.id
fs.system_type_code IS NOT NULL
WHERE
AND LENGTH(
t1.system_type_code IS NOT NULL AND LENGTH(TRIM(t1.system_type_code)) != 0
trim( fs.system_type_code
)) != 0
AND t2.name IS NOT NULL AND LENGTH(TRIM(t2.name
)) != 0
<if
test=
"bizOrgCode!=null and bizOrgCode!=
''"
>
<if
test=
"bizOrgCode != null and bizOrgCode !=
''"
>
AND fs
.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
AND t1
.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
</if>
) d
) d
WHERE d.value != 0
WHERE
GROUP BY d.system_type_code
d.value != 0
GROUP BY
d.system_type_code
</select>
</select>
<select
id=
"getSystemInfoPage"
resultType=
"Map"
>
<select
id=
"getSystemInfoPage"
resultType=
"Map"
>
...
@@ -6968,25 +6970,27 @@
...
@@ -6968,25 +6970,27 @@
</if>
</if>
) d
) d
<where>
<where>
<if
test=
"systemState
!=null and systemState!='' and systemState =='1
'"
>
<if
test=
"systemState
== 'normal
'"
>
d.value
<![CDATA[>]]>
0
AND d.value =
0
</if>
</if>
<if
test=
"systemState
!=null and systemState!='' and systemState =='0
'"
>
<if
test=
"systemState
== 'abnormal
'"
>
d.value
<![CDATA[<
]]>
0
AND d.value
<![CDATA[>
]]>
0
</if>
</if>
</where>
</where>
<if
test=
"stateOrder!=null and stateOrder!='' and stateOrder==1"
>
ORDER BY
ORDER BY d.value DESC,
<if
test=
"sortField != null and sortField != ''"
>
</if>
<choose>
<if
test=
"stateOrder!=null and stateOrder!='' and stateOrder==0"
>
<when
test=
"sortOrder == 'ascend'"
>
ORDER BY d.value ASC,
${sortField} ASC
</if>
</when>
<if
test=
"alarmEquips!=null and alarmEquips!='' and alarmEquips==1"
>
<otherwise>
d.equips DESC
${sortField} DESC
</if>
</otherwise>
<if
test=
"alarmEquips!=null and alarmEquips!='' and alarmEquips==0"
>
</choose>
d.equips ASC
</if>
</if>
<if
test=
"sortField == null or sortField == ''"
>
d.equips DESC
</if>
</select>
</select>
<select
id=
"getIotInfo"
resultType=
"Map"
>
<select
id=
"getIotInfo"
resultType=
"Map"
>
...
@@ -7044,4 +7048,22 @@
...
@@ -7044,4 +7048,22 @@
GROUP BY fs.system_type_code
GROUP BY fs.system_type_code
</select>
</select>
<select
id=
"getSystemTypes"
resultType=
"Map"
>
SELECT
t1.system_type_code AS systemTypeCode,
t2.name AS name
FROM
f_fire_fighting_system t1
left join wl_equipment_category t2 on t1.system_type = t2.id
<where>
t1.system_type_code IS NOT NULL AND LENGTH(TRIM(t1.system_type_code)) != 0
AND t2.name IS NOT NULL AND LENGTH(TRIM(t2.name)) != 0
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND t1.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
</where>
GROUP BY
t1.system_type_code
</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