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
359d290c
Commit
359d290c
authored
Jun 02, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl
parents
35e3e6f3
b52ca6c3
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
198 additions
and
18 deletions
+198
-18
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
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+2
-2
dbTemplate_check.xml
...-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
+14
-14
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 @
359d290c
...
...
@@ -52,6 +52,15 @@ public class EmergencyController extends AbstractBaseController {
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-消防水箱信息
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EmergencyMapper.java
View file @
359d290c
...
...
@@ -58,6 +58,7 @@ public interface EmergencyMapper extends BaseMapper{
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
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEmergencyService.java
View file @
359d290c
...
...
@@ -18,6 +18,8 @@ public interface IEmergencyService {
*/
List
<
Map
<
String
,
Object
>>
getSystemState
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getSystemAlarmCount
(
String
bizOrgCode
,
String
status
);
/**
* @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 @
359d290c
...
...
@@ -84,6 +84,27 @@ public class EmergencyServiceImpl implements IEmergencyService {
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
public
List
<
Map
<
String
,
Object
>>
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 @
359d290c
...
...
@@ -83,6 +83,22 @@ public class SafetyPreCtrlController extends AbstractBaseController {
}
@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
=
"巡检情况统计"
)
@RequestMapping
(
value
=
"/countMonthNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
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 @
359d290c
...
...
@@ -79,6 +79,8 @@ public interface PointMapper extends BaseMapper {
List
<
HashMap
<
String
,
Object
>>
getSumPtForDeptNew
(
@Param
(
value
=
"orgCode"
)
String
loginOrgCode
);
List
<
HashMap
<
String
,
Object
>>
getSumPtForAdmin
(
@Param
(
value
=
"orgCode"
)
String
orgCode
);
Map
<
String
,
Object
>
countPointData
(
@Param
(
value
=
"orgCode"
)
String
orgCode
);
long
getCheckPointCount
(
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 @
359d290c
...
...
@@ -58,6 +58,7 @@ import javax.persistence.criteria.Predicate;
import
javax.persistence.criteria.Root
;
import
java.beans.PropertyDescriptor
;
import
java.math.BigInteger
;
import
java.text.NumberFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -1430,6 +1431,35 @@ public class PointServiceImpl implements IPointService {
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
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 @
359d290c
...
...
@@ -250,6 +250,7 @@ public interface IPointService {
List
<
HashMap
<
String
,
Object
>>
getSumPtByRole
(
HashMap
<
String
,
Object
>
paramMap
);
Map
<
String
,
Object
>
countPointData
(
String
orgCode
);
List
<
HashMap
<
String
,
Object
>>
getSumPtByRoleNew
(
String
orgCode
);
/**
* 导入导入巡检点数据
...
...
amos-boot-system-equip/src/main/resources/mapper/ConfirmAlarmMapper.xml
View file @
359d290c
...
...
@@ -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,
if(ala.clean_time is null, '未消除', '已消除') AS cleanStatus,
ala.clean_time,
ala.defect_batch_id
ala.defect_batch_id,
spe.biz_org_name AS bizOrgName
from
wl_equipment_specific_alarm_log as ala
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 @
359d290c
...
...
@@ -36,6 +36,43 @@
`fs`.`sort`
</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
wes.id AS specificId,
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
359d290c
...
...
@@ -211,7 +211,8 @@
where fefe.fire_equipment_id = wlesal.equipment_specific_id
) as equipmentName,
wlesal.equipment_specific_name as equipmentSpecificName,
wles.position
wles.position,
wles.biz_org_name as bizOrgName
FROM wl_equipment_specific_alarm_log wlesal
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
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
359d290c
...
...
@@ -5137,7 +5137,7 @@
(
max( CASE WHEN fi.field_name = 'maxLevel' THEN fi.field_value END ) = ''
OR max( CASE WHEN fi.field_name = 'maxLevel' THEN fi.field_value END ) IS NULL,
0,
100
0,
max( CASE WHEN fi.field_name = 'maxLevel' THEN fi.field_value END )) AS maxValues
FROM
wl_form_instance_equip fi
...
...
@@ -5158,7 +5158,7 @@
max( CASE WHEN fi.field_name = 'maxPressure' THEN fi.field_value END ) = ''
OR max( CASE WHEN fi.field_name = 'maxPressure' THEN fi.field_value END ) IS NULL
OR max( CASE WHEN fi.field_name = 'maxPressure' THEN fi.field_value END ) = 'null',
0,
100
0,
max( CASE WHEN fi.field_name = 'maxPressure' THEN fi.field_value END )) AS maxValues
FROM
wl_form_instance_equip fi
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
359d290c
...
...
@@ -212,7 +212,7 @@
a.id,
a.org_code,
a.point_id pointId,
b.name
point_name,
a.
point_name,
b.is_fixed,
b.point_no pointNo,
a.user_id,
...
...
@@ -249,7 +249,7 @@
END
) as is_ok,
a.score,
d.`name` AS
`route_name`,
a.
`route_name`,
(
CASE
WHEN a.check_mode = 'QR'
...
...
@@ -288,19 +288,19 @@
<if
test=
"beginDate!=null and beginDate!= ''"
>
and a.check_time >= #{beginDate}
</if>
<if
test=
"endDate!=null and endDate!= ''"
>
and #{endDate} >= a.check_time
</if>
<!-- <if test="endDate!=null"> and #{endDate} <![CDATA[>=]]> a.check_time </if> -->
<if
test=
"userName!=null"
>
and a.user_name like concat(concat("%",#{userName}),"%")
</if>
<if
test=
"pointName!=null"
>
and b.name like concat(concat("%",#{pointName}),"%")
</if>
<if
test=
"pointNo!=null"
>
and b.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"isFixed!=null"
>
and b.is_fixed = #{isFixed}
</if>
<if
test=
"userName!=null
and userName!=''
"
>
and a.user_name like concat(concat("%",#{userName}),"%")
</if>
<if
test=
"pointName!=null
and pointName!= ''
"
>
and b.name like concat(concat("%",#{pointName}),"%")
</if>
<if
test=
"pointNo!=null
and pointNo!=''
"
>
and b.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"isFixed!=null
and isFixed!=''
"
>
and b.is_fixed = #{isFixed}
</if>
<if
test=
"isOK!=null and isOK!=''"
>
and a.is_OK = #{isOK}
</if>
<if
test=
"planId!=null"
>
and a.plan_Id = #{planId}
</if>
<if
test=
"planTaskId!=null"
>
and a.plan_task_id = #{planTaskId}
</if>
<if
test=
"userId!=null"
>
and find_in_set(#{userId}, a.user_id) > 0
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"catalogId!=null"
>
and b.Catalog_Id = #{catalogId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"pointId!=null"
>
and a.point_id = #{pointId}
</if>
<if
test=
"checkTime!=null"
>
and TO_DAYS(a.check_time) = TO_DAYS('${checkTime}')
</if>
<if
test=
"planId!=null
and planId!=''
"
>
and a.plan_Id = #{planId}
</if>
<if
test=
"planTaskId!=null
and planTaskId!=''
"
>
and a.plan_task_id = #{planTaskId}
</if>
<if
test=
"userId!=null
and userId!=''
"
>
and find_in_set(#{userId}, a.user_id) > 0
</if>
<if
test=
"routeId!=null
and routeId!=''
"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"catalogId!=null
and catalogId!=''
"
>
and b.Catalog_Id = #{catalogId}
</if>
<if
test=
"orgCode!=null
and orgCode!=''
"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"pointId!=null
and pointId!=''
"
>
and a.point_id = #{pointId}
</if>
<if
test=
"checkTime!=null
and checkTime!=''
"
>
and TO_DAYS(a.check_time) = TO_DAYS('${checkTime}')
</if>
<if
test=
"departmentId!=null and departmentId!='-1'"
>
and find_in_set(#{departmentId}, a.dep_id) > 0
</if>
<if
test=
"checkType == '计划检查'"
>
and a.plan_task_id
>
0
</if>
<if
test=
"checkType == '无计划检查'"
>
and a.plan_task_id
<
= 0
</if>
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/pointMapper.xml
View file @
359d290c
...
...
@@ -490,6 +490,59 @@
) vp
) tt group by tt.RealTimeStatus,tt.status order by status
</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 RealTimeStatus as name,status,count(1) as value
...
...
amos-boot-utils/amos-boot-utils-message/src/main/resources/json/topic.json
View file @
359d290c
...
...
@@ -33,5 +33,10 @@
"code"
:
"risk"
,
"emqTopic"
:
"emq.risk.created"
,
"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