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
bdefb497
Commit
bdefb497
authored
Dec 31, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
99e8e9e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
175 additions
and
175 deletions
+175
-175
AlertCalledMapper.xml
...e-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
+174
-174
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
bdefb497
...
@@ -43,207 +43,207 @@
...
@@ -43,207 +43,207 @@
ELSE '' END responseLevelCode
ELSE '' END responseLevelCode
FROM jc_alert_called a
FROM jc_alert_called a
where a.is_delete=0
where a.is_delete=0
AND a.coordinate_x IS NOT NULL
<!--AND a.coordinate_x IS NOT NULL
AND a.coordinate_y IS NOT NULL
AND a.coordinate_y IS NOT NULL-->
<if
test=
'par.status==0'
>
<if
test=
'par.status==0'
>
and a.alert_status =0
and a.alert_status =0
</if>
<if
test=
'par.status==1'
>
and a.alert_status =1
</if>
<if
test=
'par.address!=null and par.address!="" '
>
and a.address like CONCAT('%',#{par.address},'%') || a.alert_type like CONCAT('%',#{par.address},'%')
</if>
<if
test=
'par.alertTypeCode!=null and par.alertTypeCode!="" '
>
and a.alert_type_code = #{par.alertTypeCode}
</if>
<if
test=
'par.alertId!=null'
>
and a.sequence_nbr =#{par.alertId}
</if>
<if
test=
'par.whether24!=false'
>
and a.call_time
>
= (NOW() - interval 24 hour)
</if>
<if
test=
'par.orderTime=="1"'
>
ORDER BY a.call_time DESC
</if>
<if
test=
'par.orderTime=="2"'
>
ORDER BY a.call_time
</if>
<if
test=
'par.orderTime==null'
>
ORDER BY a.call_time DESC
</if>
<if
test=
'pageNum!=null and pageSize !=null'
>
limit #{pageNum},#{pageSize}
</if>
</select>
<select
id=
"alertCalledListByAlertStatusCount"
resultType=
"Integer"
>
SELECT
COUNT(*)
FROM jc_alert_called a
where a.is_delete=0
AND a.coordinate_x IS NOT NULL
AND a.coordinate_y IS NOT NULL
<if
test=
'par.status==0'
>
and a.alert_status =0
</if>
<if
test=
'par.status==1'
>
and a.alert_status =1
</if>
<if
test=
'par.address!=null and par.address!="" '
>
and a.address like CONCAT('%',#{par.address},'%')
</if>
<if
test=
'par.alertTypeCode!=null and par.alertTypeCode!="" '
>
and a.alert_type_code = #{par.alertTypeCode}
</if>
<if
test=
'par.whether24!=false'
>
and a.call_time
>
= (NOW() - interval 24 hour)
</if>
</select>
<select
id=
"selectAllPage"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled"
>
SELECT
a.sequence_nbr,
a.alert_status,
a.type,
a.alert_stage,
a.alarm_type,
a.alarm_type_code,
a.call_record_id,
a.father_alert,
a.response_level_code,
a.contact_user,
a.contact_phone,
a.call_time,
a.call_time_num,
a.alert_source,
a.alert_source_code,
a.alert_type,
a.alert_type_code,
a.unit_involved,
a.trapped_num,
a.casualties_num,
a.address,
a.rescue_grid,
a.coordinate_x,
a.coordinate_y,
a.response_level,
a.system_source,
a.system_source_code
FROM
jc_alert_called a
<if
test=
"isFatherAlert!= null and isFatherAlert == 'true' "
>
, jc_power_transfer j
</if>
<where>
a.is_delete = 0
<if
test=
"alertStatus!= null "
>
and a.alert_status = #{alertStatus}
</if>
</if>
<if
test=
'par.status==1'
>
<if
test=
"startTime!= null and endTime != null and startTime!= '' and endTime != ''"
>
and a.
alert_status =1
and a.
call_time between #{startTime} and #{endTime}
</if>
</if>
<if
test=
'par.address!=null and par.address!="" '
>
<if
test=
"alertTypeCode!= null and alertTypeCode!= '' "
>
and a.a
ddress like CONCAT('%',#{par.address},'%') || a.alert_type like CONCAT('%',#{par.address},'%')
and a.a
larm_type_code = #{alertTypeCode}
</if>
</if>
<if
test=
"alertSourceCode!= null "
>
<if
test=
'par.alertTypeCode!=null and par.alertTypeCode!="" '
>
and a.alert_source_code = #{alertSourceCode}
and a.alert_type_code = #{par.alertTypeCode}
</if>
</if>
<if
test=
"systemSourceCode!= null "
>
<if
test=
'par.alertId!=null'
>
and a.system_source_code in (${systemSourceCode})
and a.sequence_nbr =#{par.alertId}
</if>
</if>
<if
test=
'par.whether24!=false'
>
<if
test=
"isFatherAlert != null and isFatherAlert == 'true' "
>
and a.call_time
>
= (NOW() - interval 24 hour)
and j.alert_called_id = a.sequence_nbr
GROUP BY a.sequence_nbr
</if>
</if>
<if
test=
'par.orderTime=="1"'
>
<if
test=
"data == 'address' and data != null and lift != null "
>
ORDER BY a.call_time DESC
order by CONVERT(address USING 'gbk') ${lift} limit #{current},#{size}
</if>
</if>
<if
test=
'par.orderTime=="2"'
>
<if
test=
"data != null and data != 'address' and lift != null "
>
ORDER BY a.call_time
order by ${data} ${lift} limit #{current},#{size}
</if>
</if>
<if
test=
'par.orderTime==null'
>
<if
test=
"data == null "
>
ORDER BY a.call_time DESC
order by a.call_time DESC limit #{current},#{size}
</if>
</if>
</where>
</select>
<if
test=
'pageNum!=null and pageSize !=null'
>
limit #{pageNum},#{pageSize}
<select
id=
"selectAllCount"
resultType=
"int"
>
</if>
SELECT
</select>
count(b.num)
FROM
(SELECT
<select
id=
"alertCalledListByAlertStatusCount"
resultType=
"Integer"
>
a.sequence_nbr as num
SELECT
FROM
COUNT(*)
jc_alert_called a
FROM jc_alert_called a
<if
test=
"isFatherAlert!= null and isFatherAlert == 'true' "
>
where a.is_delete=0
,jc_power_transfer j
AND a.coordinate_x IS NOT NULL
</if>
AND a.coordinate_y IS NOT NULL
<where>
a.is_delete = 0
<if
test=
'par.status==0'
>
<if
test=
"alertStatus!= null "
>
and a.alert_status =0
and a.alert_status = #{alertStatus}
</if>
<if
test=
'par.status==1'
>
and a.alert_status =1
</if>
</if>
<if
test=
'par.address!=null and par.address!="" '
>
<if
test=
"startTime!= null and endTime != null and startTime!= '' and endTime != ''"
>
and a.
address like CONCAT('%',#{par.address},'%')
and a.
call_time between #{startTime} and #{endTime}
</if>
</if>
<if
test=
'par.alertTypeCode!=null and par.alertTypeCode!="" '
>
<if
test=
"alertTypeCode!= null and alertTypeCode!= '' "
>
and
a.alert_type_code = #{par.
alertTypeCode}
and
a.alert_type_code = #{
alertTypeCode}
</if>
</if>
<if
test=
'par.whether24!=false'
>
<if
test=
"alertSourceCode!= null "
>
and a.
call_time
>
= (NOW() - interval 24 hour)
and a.
alert_source_code = #{alertSourceCode}
</if>
</if>
<if
test=
"systemSourceCode!= null "
>
</select>
and a.system_source_code in (${systemSourceCode})
<select
id=
"selectAllPage"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled"
>
SELECT
a.sequence_nbr,
a.alert_status,
a.type,
a.alert_stage,
a.alarm_type,
a.alarm_type_code,
a.call_record_id,
a.father_alert,
a.response_level_code,
a.contact_user,
a.contact_phone,
a.call_time,
a.call_time_num,
a.alert_source,
a.alert_source_code,
a.alert_type,
a.alert_type_code,
a.unit_involved,
a.trapped_num,
a.casualties_num,
a.address,
a.rescue_grid,
a.coordinate_x,
a.coordinate_y,
a.response_level,
a.system_source,
a.system_source_code
FROM
jc_alert_called a
<if
test=
"isFatherAlert!= null and isFatherAlert == 'true' "
>
, jc_power_transfer j
</if>
</if>
<where>
a.is_delete = 0
<if
test=
"alertStatus!= null "
>
and a.alert_status = #{alertStatus}
</if>
<if
test=
"startTime!= null and endTime != null and startTime!= '' and endTime != ''"
>
and a.call_time between #{startTime} and #{endTime}
</if>
<if
test=
"alertTypeCode!= null and alertTypeCode!= '' "
>
and a.alarm_type_code = #{alertTypeCode}
</if>
<if
test=
"alertSourceCode!= null "
>
and a.alert_source_code = #{alertSourceCode}
</if>
<if
test=
"systemSourceCode!= null "
>
and a.system_source_code in (${systemSourceCode})
</if>
<if
test=
"isFatherAlert != null and isFatherAlert == 'true' "
>
and j.alert_called_id = a.sequence_nbr
GROUP BY a.sequence_nbr
</if>
<if
test=
"data == 'address' and data != null and lift != null "
>
order by CONVERT(address USING 'gbk') ${lift} limit #{current},#{size}
</if>
<if
test=
"data != null and data != 'address' and lift != null "
>
order by ${data} ${lift} limit #{current},#{size}
</if>
<if
test=
"data == null "
>
order by a.call_time DESC limit #{current},#{size}
</if>
</where>
</select>
<select
id=
"selectAllCount"
resultType=
"int"
>
SELECT
count(b.num)
FROM
(SELECT
a.sequence_nbr as num
FROM
jc_alert_called a
<if
test=
"isFatherAlert!= null and isFatherAlert == 'true' "
>
<if
test=
"isFatherAlert!= null and isFatherAlert == 'true' "
>
,jc_power_transfer j
and j.alert_called_id = a.sequence_nbr
GROUP BY a.sequence_nbr
</if>
</if>
<where>
a.is_delete = 0
</where>
) b
<if
test=
"alertStatus!= null "
>
</select>
and a.alert_status = #{alertStatus}
</if>
<if
test=
"startTime!= null and endTime != null and startTime!= '' and endTime != ''"
>
and a.call_time between #{startTime} and #{endTime}
</if>
<if
test=
"alertTypeCode!= null and alertTypeCode!= '' "
>
and a.alert_type_code = #{alertTypeCode}
</if>
<if
test=
"alertSourceCode!= null "
>
and a.alert_source_code = #{alertSourceCode}
</if>
<if
test=
"systemSourceCode!= null "
>
and a.system_source_code in (${systemSourceCode})
</if>
<if
test=
"isFatherAlert!= null and isFatherAlert == 'true' "
>
and j.alert_called_id = a.sequence_nbr
GROUP BY a.sequence_nbr
</if>
</where>
) b
</select>
<select
id=
"AlertCalledcountTime"
resultType=
"Integer"
>
<select
id=
"AlertCalledcountTime"
resultType=
"Integer"
>
select COUNT(*) from jc_alert_called where is_delete=0
select COUNT(*) from jc_alert_called where is_delete=0
<if
test=
'type==1'
>
<if
test=
'type==1'
>
and YEAR(call_time)=YEAR(NOW())
and YEAR(call_time)=YEAR(NOW())
</if>
</if>
<if
test=
'type==2'
>
<if
test=
'type==2'
>
and DATE_FORMAT( call_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
and DATE_FORMAT( call_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
</if>
</if>
<if
test=
'type==3'
>
<if
test=
'type==3'
>
and to_days(call_time) = to_days(now());
and to_days(call_time) = to_days(now());
</if>
</if>
<if
test=
'type==4'
>
<if
test=
'type==4'
>
and TO_DAYS( NOW( ) ) - TO_DAYS( call_time) = 1
and TO_DAYS( NOW( ) ) - TO_DAYS( call_time) = 1
</if>
</if>
</select>
</select>
<select
id=
"getTodayAlertCalled"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto"
>
<select
id=
"getTodayAlertCalled"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto"
>
select jc_alert_called.alert_type alarmType,
select jc_alert_called.alert_type alarmType,
jc_alert_called.address,
jc_alert_called.address,
jc_alert_called.call_time callTime
jc_alert_called.call_time callTime
from jc_alert_called
from jc_alert_called
where is_delete = 0
where is_delete = 0
and to_days(call_time) = to_days(now())
and to_days(call_time) = to_days(now())
ORDER BY call_time DESC
ORDER BY call_time DESC
</select>
</select>
<!--统计未结束的警情数量-->
<!--统计未结束的警情数量-->
<select
id=
"AlertCalledcount"
resultType=
"Integer"
>
<select
id=
"AlertCalledcount"
resultType=
"Integer"
>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
bdefb497
...
@@ -629,7 +629,7 @@ public class CommandController extends BaseController {
...
@@ -629,7 +629,7 @@ public class CommandController extends BaseController {
String
time
=
DateUtil
.
formatDate
(
alertCalledZhDto
.
getCallTime
(),
"yyyy-MM-dd HH:mm:ss"
);
String
time
=
DateUtil
.
formatDate
(
alertCalledZhDto
.
getCallTime
(),
"yyyy-MM-dd HH:mm:ss"
);
st
.
append
(
"【"
).
append
(
alertCalledZhDto
.
getAlertType
()).
append
(
"】"
).
append
(
" "
).
append
(
time
).
append
(
" "
).
append
(
alertCalledZhDto
.
getAddress
());
st
.
append
(
"【"
).
append
(
alertCalledZhDto
.
getAlertType
()).
append
(
"】"
).
append
(
" "
).
append
(
time
).
append
(
" "
).
append
(
alertCalledZhDto
.
getAddress
()
!=
null
?
alertCalledZhDto
.
getAddress
():
""
);
SeismometeorologyDto
sto
=
new
SeismometeorologyDto
(
alertCalledZhDto
.
getSequenceNbr
(),
"1"
,
"警情通知"
,
null
,
alertCalledZhDto
.
getCallTime
(),
null
,
st
.
toString
());
SeismometeorologyDto
sto
=
new
SeismometeorologyDto
(
alertCalledZhDto
.
getSequenceNbr
(),
"1"
,
"警情通知"
,
null
,
alertCalledZhDto
.
getCallTime
(),
null
,
st
.
toString
());
li
.
add
(
sto
);
li
.
add
(
sto
);
...
...
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