Commit a6a7207f authored by suhuiguang's avatar suhuiguang

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents ec917d6a 75c12bad
...@@ -26,16 +26,16 @@ ...@@ -26,16 +26,16 @@
<select id="queryNearlyCount" resultType="java.util.Map"> <select id="queryNearlyCount" resultType="java.util.Map">
SELECT SELECT
DATE_ADD(#{beginDate},INTERVAL -1 DAY) dateTime, DATE_ADD(#{beginDate},INTERVAL -7 DAY) dateTime,
sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM FROM
tz_alert_called tz_alert_called
WHERE 1 = 1 WHERE 1 = 1
<if test="beginDate != null and beginDate != ''"> <if test="beginDate != null and beginDate != ''">
and call_time >= DATE_ADD(#{beginDate},INTERVAL -1 DAY) and call_time >= DATE_ADD(#{beginDate},INTERVAL -7 DAY)
</if> </if>
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -1 DAY) and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -7 DAY)
</if> </if>
<if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" > <if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" >
and org_code= #{orgCode} and org_code= #{orgCode}
...@@ -43,16 +43,16 @@ ...@@ -43,16 +43,16 @@
</if> </if>
UNION ALL UNION ALL
SELECT SELECT
DATE_ADD(#{beginDate},INTERVAL -2 DAY) dateTime, DATE_ADD(#{beginDate},INTERVAL -6 DAY) dateTime,
sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM FROM
tz_alert_called tz_alert_called
WHERE 1 = 1 WHERE 1 = 1
<if test="beginDate != null and beginDate != ''"> <if test="beginDate != null and beginDate != ''">
and call_time >= DATE_ADD(#{beginDate},INTERVAL -2 DAY) and call_time >= DATE_ADD(#{beginDate},INTERVAL -6 DAY)
</if> </if>
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -2 DAY) and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -6 DAY)
</if> </if>
<if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" > <if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" >
and org_code= #{orgCode} and org_code= #{orgCode}
...@@ -60,16 +60,16 @@ ...@@ -60,16 +60,16 @@
</if> </if>
UNION ALL UNION ALL
SELECT SELECT
DATE_ADD(#{beginDate},INTERVAL -3 DAY) dateTime, DATE_ADD(#{beginDate},INTERVAL -5 DAY) dateTime,
sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM FROM
tz_alert_called tz_alert_called
WHERE 1 = 1 WHERE 1 = 1
<if test="beginDate != null and beginDate != ''"> <if test="beginDate != null and beginDate != ''">
and call_time >= DATE_ADD(#{beginDate},INTERVAL -3 DAY) and call_time >= DATE_ADD(#{beginDate},INTERVAL -5 DAY)
</if> </if>
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -3 DAY) and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -5 DAY)
</if> </if>
<if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" > <if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" >
and org_code= #{orgCode} and org_code= #{orgCode}
...@@ -94,16 +94,16 @@ ...@@ -94,16 +94,16 @@
</if> </if>
UNION ALL UNION ALL
SELECT SELECT
DATE_ADD(#{beginDate},INTERVAL -5 DAY) dateTime, DATE_ADD(#{beginDate},INTERVAL -3 DAY) dateTime,
sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM FROM
tz_alert_called tz_alert_called
WHERE 1 = 1 WHERE 1 = 1
<if test="beginDate != null and beginDate != ''"> <if test="beginDate != null and beginDate != ''">
and call_time >= DATE_ADD(#{beginDate},INTERVAL -5 DAY) and call_time >= DATE_ADD(#{beginDate},INTERVAL -3 DAY)
</if> </if>
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -5 DAY) and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -3 DAY)
</if> </if>
<if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" > <if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" >
and org_code= #{orgCode} and org_code= #{orgCode}
...@@ -111,16 +111,16 @@ ...@@ -111,16 +111,16 @@
</if> </if>
UNION ALL UNION ALL
SELECT SELECT
DATE_ADD(#{beginDate},INTERVAL -6 DAY) dateTime, DATE_ADD(#{beginDate},INTERVAL -2 DAY) dateTime,
sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM FROM
tz_alert_called tz_alert_called
WHERE 1 = 1 WHERE 1 = 1
<if test="beginDate != null and beginDate != ''"> <if test="beginDate != null and beginDate != ''">
and call_time >= DATE_ADD(#{beginDate},INTERVAL -6 DAY) and call_time >= DATE_ADD(#{beginDate},INTERVAL -2 DAY)
</if> </if>
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -6 DAY) and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -2 DAY)
</if> </if>
<if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" > <if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" >
and org_code= #{orgCode} and org_code= #{orgCode}
...@@ -128,16 +128,16 @@ ...@@ -128,16 +128,16 @@
</if> </if>
UNION ALL UNION ALL
SELECT SELECT
DATE_ADD(#{beginDate},INTERVAL -7 DAY) dateTime, DATE_ADD(#{beginDate},INTERVAL -1 DAY) dateTime,
sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount sum( CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM FROM
tz_alert_called tz_alert_called
WHERE 1 = 1 WHERE 1 = 1
<if test="beginDate != null and beginDate != ''"> <if test="beginDate != null and beginDate != ''">
and call_time >= DATE_ADD(#{beginDate},INTERVAL -7 DAY) and call_time >= DATE_ADD(#{beginDate},INTERVAL -1 DAY)
</if> </if>
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -7 DAY) and call_time <![CDATA[ <= ]]> DATE_ADD(#{endDate},INTERVAL -1 DAY)
</if> </if>
<if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" > <if test="orgCode != null and orgCode != '' and recUserId != null and recUserId != ''" >
and org_code= #{orgCode} and org_code= #{orgCode}
......
...@@ -258,7 +258,7 @@ public class AlertCalledController extends BaseController { ...@@ -258,7 +258,7 @@ public class AlertCalledController extends BaseController {
page = iAlertCalledService.page(pageBean, alertCalledQueryWrapper); page = iAlertCalledService.page(pageBean, alertCalledQueryWrapper);
IPage<AlertCalledDto> calledVoIPage = AlertBeanDtoVoUtils.alertCalledIPageDto(page); IPage<AlertCalledDto> calledVoIPage = AlertBeanDtoVoUtils.alertCalledIPageDto(page);
calledVoIPage.getRecords().stream().forEach(e->{ calledVoIPage.getRecords().stream().forEach(e->{
e.setAlertAddress(e.getAddress()); //e.setAlertAddress(e.getAddress());
}); });
return ResponseHelper.buildResponse(calledVoIPage); return ResponseHelper.buildResponse(calledVoIPage);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment