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
b52ca6c3
Commit
b52ca6c3
authored
Jun 02, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
04b3f871
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
182 additions
and
2 deletions
+182
-2
EmergencyController.java
...m/yeejoin/equipmanage/controller/EmergencyController.java
+9
-0
EmergencyMapper.java
.../java/com/yeejoin/equipmanage/mapper/EmergencyMapper.java
+1
-0
IEmergencyService.java
...va/com/yeejoin/equipmanage/service/IEmergencyService.java
+2
-0
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+21
-0
SafetyPreCtrlController.java
...s/patrol/business/controller/SafetyPreCtrlController.java
+16
-0
PointMapper.java
.../yeejoin/amos/patrol/business/dao/mapper/PointMapper.java
+2
-0
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+30
-0
IPointService.java
...oin/amos/patrol/business/service/intfc/IPointService.java
+1
-0
ConfirmAlarmMapper.xml
...em-equip/src/main/resources/mapper/ConfirmAlarmMapper.xml
+2
-1
EmergencyMapper.xml
...ystem-equip/src/main/resources/mapper/EmergencyMapper.xml
+37
-0
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+2
-1
pointMapper.xml
...ystem-patrol/src/main/resources/db/mapper/pointMapper.xml
+53
-0
topic.json
...mos-boot-utils-message/src/main/resources/json/topic.json
+6
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EmergencyController.java
View file @
b52ca6c3
...
@@ -52,6 +52,15 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -52,6 +52,15 @@ public class EmergencyController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iEmergencyService
.
getSystemState
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iEmergencyService
.
getSystemState
(
bizOrgCode
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"系统告警统计"
)
@GetMapping
(
value
=
"/system/alarm"
)
public
ResponseModel
getSystemAlarmCount
(
@RequestParam
(
required
=
false
)
String
status
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
return
CommonResponseUtil
.
success
(
iEmergencyService
.
getSystemAlarmCount
(
bizOrgCode
,
status
));
}
/**
/**
* CAFS-消防水箱信息
* CAFS-消防水箱信息
*/
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EmergencyMapper.java
View file @
b52ca6c3
...
@@ -58,6 +58,7 @@ public interface EmergencyMapper extends BaseMapper{
...
@@ -58,6 +58,7 @@ public interface EmergencyMapper extends BaseMapper{
List
<
Map
<
String
,
Object
>>
getSystemState
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getSystemState
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getSystemAlarmCount
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"status"
)
String
status
);
List
<
Map
<
String
,
Object
>>
getCAFSWaterTankInfo
();
List
<
Map
<
String
,
Object
>>
getCAFSWaterTankInfo
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEmergencyService.java
View file @
b52ca6c3
...
@@ -18,6 +18,8 @@ public interface IEmergencyService {
...
@@ -18,6 +18,8 @@ public interface IEmergencyService {
*/
*/
List
<
Map
<
String
,
Object
>>
getSystemState
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getSystemState
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getSystemAlarmCount
(
String
bizOrgCode
,
String
status
);
/**
/**
* @return
* @return
*/
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
b52ca6c3
...
@@ -84,6 +84,27 @@ public class EmergencyServiceImpl implements IEmergencyService {
...
@@ -84,6 +84,27 @@ public class EmergencyServiceImpl implements IEmergencyService {
return
list
;
return
list
;
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
getSystemAlarmCount
(
String
bizOrgCode
,
String
status
)
{
List
<
Map
<
String
,
Object
>>
list
=
emergencyMapper
.
getSystemAlarmCount
(
bizOrgCode
,
status
);
if
(
0
<
list
.
size
())
{
list
.
forEach
(
x
->
{
List
<
Map
<
String
,
Object
>>
list1
=
new
ArrayList
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
x
.
get
(
"status"
));
if
(
"正常"
.
equals
(
String
.
valueOf
(
x
.
get
(
"status"
))))
{
map
.
put
(
"level"
,
"success"
);
}
else
{
map
.
put
(
"level"
,
"warning"
);
}
list1
.
add
(
map
);
x
.
put
(
"status"
,
list1
);
});
}
return
list
;
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getCAFSWaterTankInfo
()
{
public
List
<
Map
<
String
,
Object
>>
getCAFSWaterTankInfo
()
{
List
<
Map
<
String
,
Object
>>
list
=
emergencyMapper
.
getCAFSWaterTankInfo
();
List
<
Map
<
String
,
Object
>>
list
=
emergencyMapper
.
getCAFSWaterTankInfo
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/SafetyPreCtrlController.java
View file @
b52ca6c3
...
@@ -83,6 +83,22 @@ public class SafetyPreCtrlController extends AbstractBaseController {
...
@@ -83,6 +83,22 @@ public class SafetyPreCtrlController extends AbstractBaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检点统计"
,
notes
=
"巡检点统计"
)
@RequestMapping
(
value
=
"/countPointData"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
HashMap
<
String
,
Object
>
countPointData
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
Map
<
String
,
Object
>
List
=
pointService
.
countPointData
(
loginOrgCode
);
HashMap
<
String
,
Object
>
temph
=
new
HashMap
<>();
temph
.
put
(
"result"
,
List
);
temph
.
put
(
"status"
,
200
);
temph
.
put
(
"message"
,
""
);
return
temph
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检情况统计"
,
notes
=
"巡检情况统计"
)
@ApiOperation
(
value
=
"巡检情况统计"
,
notes
=
"巡检情况统计"
)
@RequestMapping
(
value
=
"/countMonthNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/countMonthNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
HashMap
<
String
,
Object
>
countMonthCheckByIdNew
()
{
public
HashMap
<
String
,
Object
>
countMonthCheckByIdNew
()
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PointMapper.java
View file @
b52ca6c3
...
@@ -79,6 +79,8 @@ public interface PointMapper extends BaseMapper {
...
@@ -79,6 +79,8 @@ public interface PointMapper extends BaseMapper {
List
<
HashMap
<
String
,
Object
>>
getSumPtForDeptNew
(
@Param
(
value
=
"orgCode"
)
String
loginOrgCode
);
List
<
HashMap
<
String
,
Object
>>
getSumPtForDeptNew
(
@Param
(
value
=
"orgCode"
)
String
loginOrgCode
);
List
<
HashMap
<
String
,
Object
>>
getSumPtForAdmin
(
@Param
(
value
=
"orgCode"
)
String
orgCode
);
List
<
HashMap
<
String
,
Object
>>
getSumPtForAdmin
(
@Param
(
value
=
"orgCode"
)
String
orgCode
);
Map
<
String
,
Object
>
countPointData
(
@Param
(
value
=
"orgCode"
)
String
orgCode
);
long
getCheckPointCount
(
CheckPtListPageParam
param
);
long
getCheckPointCount
(
CheckPtListPageParam
param
);
long
getCheckPointCountNew
(
CheckPtListPageParam
param
);
long
getCheckPointCountNew
(
CheckPtListPageParam
param
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
b52ca6c3
...
@@ -58,6 +58,7 @@ import javax.persistence.criteria.Predicate;
...
@@ -58,6 +58,7 @@ import javax.persistence.criteria.Predicate;
import
javax.persistence.criteria.Root
;
import
javax.persistence.criteria.Root
;
import
java.beans.PropertyDescriptor
;
import
java.beans.PropertyDescriptor
;
import
java.math.BigInteger
;
import
java.math.BigInteger
;
import
java.text.NumberFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -1430,6 +1431,35 @@ public class PointServiceImpl implements IPointService {
...
@@ -1430,6 +1431,35 @@ public class PointServiceImpl implements IPointService {
return
rContent
;
return
rContent
;
}
}
@Override
public
Map
<
String
,
Object
>
countPointData
(
String
orgCode
)
{
Map
<
String
,
Object
>
maps
=
pointMapper
.
countPointData
(
orgCode
);
int
over_num
=
Integer
.
parseInt
(
maps
.
get
(
"over_num"
).
toString
());
int
today_num
=
Integer
.
parseInt
(
maps
.
get
(
"today_num"
).
toString
());
int
miss_num
=
Integer
.
parseInt
(
maps
.
get
(
"miss_num"
).
toString
());
String
passRate
=
""
;
if
(
over_num
==
0
)
{
passRate
=
0
+
""
;
}
else
{
passRate
=
getPercent
(
over_num
,
today_num
);
}
today_num
=
miss_num
+
today_num
;
String
passMiss
=
getPercent
(
miss_num
,
today_num
);
maps
.
put
(
"passRate"
,
passRate
);
maps
.
put
(
"passMiss"
,
passMiss
);
return
maps
;
}
public
String
getPercent
(
int
x
,
int
y
)
{
double
d1
=
x
*
1.0
;
double
d2
=
y
*
1.0
;
NumberFormat
percentInstance
=
NumberFormat
.
getPercentInstance
();
// 设置保留几位小数,这里设置的是保留两位小数
percentInstance
.
setMinimumFractionDigits
(
2
);
return
percentInstance
.
format
(
d1
/
d2
);
}
@Override
@Override
public
List
<
HashMap
<
String
,
Object
>>
getSumPtByRoleNew
(
String
orgcode
)
{
public
List
<
HashMap
<
String
,
Object
>>
getSumPtByRoleNew
(
String
orgcode
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPointService.java
View file @
b52ca6c3
...
@@ -250,6 +250,7 @@ public interface IPointService {
...
@@ -250,6 +250,7 @@ public interface IPointService {
List
<
HashMap
<
String
,
Object
>>
getSumPtByRole
(
HashMap
<
String
,
Object
>
paramMap
);
List
<
HashMap
<
String
,
Object
>>
getSumPtByRole
(
HashMap
<
String
,
Object
>
paramMap
);
Map
<
String
,
Object
>
countPointData
(
String
orgCode
);
List
<
HashMap
<
String
,
Object
>>
getSumPtByRoleNew
(
String
orgCode
);
List
<
HashMap
<
String
,
Object
>>
getSumPtByRoleNew
(
String
orgCode
);
/**
/**
* 导入导入巡检点数据
* 导入导入巡检点数据
...
...
amos-boot-system-equip/src/main/resources/mapper/ConfirmAlarmMapper.xml
View file @
b52ca6c3
...
@@ -52,7 +52,8 @@
...
@@ -52,7 +52,8 @@
(SELECT GROUP_CONCAT(fem.name) FROM `f_fire_fighting_system` fem WHERE find_in_set(fem.id,spe.system_id)) as systemName,
(SELECT GROUP_CONCAT(fem.name) FROM `f_fire_fighting_system` fem WHERE find_in_set(fem.id,spe.system_id)) as systemName,
if(ala.clean_time is null, '未消除', '已消除') AS cleanStatus,
if(ala.clean_time is null, '未消除', '已消除') AS cleanStatus,
ala.clean_time,
ala.clean_time,
ala.defect_batch_id
ala.defect_batch_id,
spe.biz_org_name AS bizOrgName
from
from
wl_equipment_specific_alarm_log as ala
wl_equipment_specific_alarm_log as ala
left join wl_equipment_specific as spe on spe.id = ala.equipment_specific_id
left join wl_equipment_specific as spe on spe.id = ala.equipment_specific_id
...
...
amos-boot-system-equip/src/main/resources/mapper/EmergencyMapper.xml
View file @
b52ca6c3
...
@@ -36,6 +36,43 @@
...
@@ -36,6 +36,43 @@
`fs`.`sort`
`fs`.`sort`
</select>
</select>
<select
id=
"getSystemAlarmCount"
resultType=
"Map"
>
SELECT * FROM
(SELECT
`fs`.`id` AS `key`,
`fs`.`name` AS `name`,
`fs`.system_type_code AS systemTypeCode,
`fs`.`code` AS code,
( select count(*) FROM (select id FROM wl_equipment_specific_alarm_log WHERE system_codes = fs.code and clean_time is null GROUP BY equipment_specific_id) b) as alarmNum ,
IF
(((
SELECT
count( `wesa`.`equipment_specific_id` )
FROM
`wl_equipment_specific_alarm` `wesa`
WHERE
( 0
<![CDATA[<>]]>
find_in_set( `fs`.`id`, `wesa`.`system_ids` ) AND `wesa`.`status` = 1)) > 0),
'异常',
'正常'
) AS `status`
FROM
`f_fire_fighting_system` `fs`
where
fs.system_type_code IS NOT NULL AND LENGTH(TRIM(fs.system_type_code)) > 0 AND fs.system_type_code != 'otherSys'
AND fs.biz_org_code like concat('LSHLZ1yOrS3WfXqzjn', '%')
GROUP BY
`fs`.`id`
ORDER BY
`fs`.`sort`) sys
<where>
<if
test=
"status != null and status != ''"
>
sys.status = #{status}
</if>
</where>
</select>
<select
id=
"getCAFSWaterTankInfo"
resultType=
"Map"
>
<select
id=
"getCAFSWaterTankInfo"
resultType=
"Map"
>
SELECT
SELECT
wes.id AS specificId,
wes.id AS specificId,
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
b52ca6c3
...
@@ -211,7 +211,8 @@
...
@@ -211,7 +211,8 @@
where fefe.fire_equipment_id = wlesal.equipment_specific_id
where fefe.fire_equipment_id = wlesal.equipment_specific_id
) as equipmentName,
) as equipmentName,
wlesal.equipment_specific_name as equipmentSpecificName,
wlesal.equipment_specific_name as equipmentSpecificName,
wles.position
wles.position,
wles.biz_org_name as bizOrgName
FROM wl_equipment_specific_alarm_log wlesal
FROM wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id
LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/pointMapper.xml
View file @
b52ca6c3
...
@@ -490,6 +490,59 @@
...
@@ -490,6 +490,59 @@
) vp
) vp
) tt group by tt.RealTimeStatus,tt.status order by status
) tt group by tt.RealTimeStatus,tt.status order by status
</select>
</select>
<select
id=
"countPointData"
resultType=
"java.util.HashMap"
>
SELECT
(
SELECT
IFNULL( count( * ), 0 )
FROM
`p_check`
WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
<if
test=
"orgCode!=null"
>
and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</if>
AND is_ok = 1
) AS `over_num`,
(
SELECT
IFNULL( count( * ), 0 )
FROM
`p_check`
WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
<if
test=
"orgCode!=null"
>
and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</if>
AND is_ok = 2
) AS `unfinish_num`,
(
SELECT
IFNULL( count( * ), 0 )
FROM
`p_check`
WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
<if
test=
"orgCode!=null"
>
and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</if>
AND is_ok = 3
) AS `miss_num`,
(
SELECT
IFNULL( count( * ), 0 )
FROM
`p_check`
WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
AND is_ok != 3
<if
test=
"orgCode!=null"
>
and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</if>
) AS `today_num`
</select>
<!-- 巡检点统计 -->
<!-- 巡检点统计 -->
<select
id=
"getSumPtForDept"
resultType=
"java.util.HashMap"
>
<select
id=
"getSumPtForDept"
resultType=
"java.util.HashMap"
>
SELECT RealTimeStatus as name,status,count(1) as value
SELECT RealTimeStatus as name,status,count(1) as value
...
...
amos-boot-utils/amos-boot-utils-message/src/main/resources/json/topic.json
View file @
b52ca6c3
...
@@ -33,5 +33,10 @@
...
@@ -33,5 +33,10 @@
"code"
:
"risk"
,
"code"
:
"risk"
,
"emqTopic"
:
"emq.risk.created"
,
"emqTopic"
:
"emq.risk.created"
,
"akkaTopic"
:
"JKXT2BP-RISK-Topic"
"akkaTopic"
:
"JKXT2BP-RISK-Topic"
},
{
"code"
:
"patrol"
,
"emqTopic"
:
"emq.patrol.created"
,
"akkaTopic"
:
"JKXT2BP-RISK-Topic"
}
}
]
]
\ No newline at end of file
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