实时报表添加小时报和日报接口
This commit is contained in:
@@ -67,7 +67,19 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
FROM (SELECT CFG_ID, SERVICE, SUM(SUM) SUM ,REPORT_TIME
|
FROM (SELECT CFG_ID, SERVICE, SUM(SUM) SUM ,REPORT_TIME
|
||||||
FROM NTC_PZ_REPORT
|
FROM
|
||||||
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_PZ_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 4 ">
|
||||||
|
NTC_PZ_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_PZ_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
|
||||||
<where>
|
<where>
|
||||||
<if test="searchCfgId != null and searchCfgId !=''">
|
<if test="searchCfgId != null and searchCfgId !=''">
|
||||||
<![CDATA[AND CFG_ID in (${searchCfgId})]]>
|
<![CDATA[AND CFG_ID in (${searchCfgId})]]>
|
||||||
@@ -82,16 +94,28 @@
|
|||||||
<![CDATA[AND REPORT_TIME < STR_TO_DATE(#{searchReportEndTime},'%Y-%m-%d %H:%i:%s')]]>
|
<![CDATA[AND REPORT_TIME < STR_TO_DATE(#{searchReportEndTime},'%Y-%m-%d %H:%i:%s')]]>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
<choose>
|
||||||
<if test="searchBusinessType != null and searchBusinessType ==1">
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 1 ">
|
||||||
GROUP BY CFG_ID,SERVICE
|
GROUP BY CFG_ID,SERVICE
|
||||||
)
|
)
|
||||||
</if>
|
</when>
|
||||||
<if test="searchBusinessType != null and searchBusinessType ==2">
|
<otherwise>
|
||||||
GROUP BY CFG_ID,SERVICE,REPORT_TIME
|
GROUP BY CFG_ID,SERVICE,REPORT_TIME
|
||||||
)
|
)
|
||||||
</if>
|
</otherwise>
|
||||||
NTC_PZ_REPORT
|
</choose>
|
||||||
|
|
||||||
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_PZ_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 4 ">
|
||||||
|
NTC_PZ_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_PZ_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
ORDER BY ${page.orderBy}
|
ORDER BY ${page.orderBy}
|
||||||
@@ -110,7 +134,19 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
FROM (SELECT SERVICE, SUM(SUM) SUM ,REPORT_TIME
|
FROM (SELECT SERVICE, SUM(SUM) SUM ,REPORT_TIME
|
||||||
FROM NTC_SERVICE_REPORT
|
FROM
|
||||||
|
|
||||||
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_SERVICE_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_SERVICE_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_SERVICE_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<where>
|
<where>
|
||||||
<if test="searchService != null and searchService !=''">
|
<if test="searchService != null and searchService !=''">
|
||||||
<![CDATA[AND SERVICE in (${searchService})]]>
|
<![CDATA[AND SERVICE in (${searchService})]]>
|
||||||
@@ -123,11 +159,20 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
<if test="searchBusinessType != null and searchBusinessType ==1">
|
|
||||||
GROUP BY SERVICE,REPORT_TIME
|
GROUP BY SERVICE,REPORT_TIME
|
||||||
)
|
)
|
||||||
</if>
|
|
||||||
NTC_SERVICE_REPORT
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_SERVICE_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_SERVICE_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_SERVICE_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
ORDER BY ${page.orderBy}
|
ORDER BY ${page.orderBy}
|
||||||
@@ -148,7 +193,19 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
FROM (SELECT SERVICE,TAG,SUM(SUM) SUM ,REPORT_TIME
|
FROM (SELECT SERVICE,TAG,SUM(SUM) SUM ,REPORT_TIME
|
||||||
FROM NTC_TAG_REPORT
|
FROM
|
||||||
|
|
||||||
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_TAG_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_TAG_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_TAG_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<where>
|
<where>
|
||||||
<if test="searchTag != null and searchTag !=''">
|
<if test="searchTag != null and searchTag !=''">
|
||||||
<![CDATA[AND TAG in (${searchTag})]]>
|
<![CDATA[AND TAG in (${searchTag})]]>
|
||||||
@@ -164,11 +221,19 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
<if test="searchBusinessType != null and searchBusinessType ==1">
|
|
||||||
GROUP BY SERVICE,TAG,REPORT_TIME
|
GROUP BY SERVICE,TAG,REPORT_TIME
|
||||||
)
|
)
|
||||||
</if>
|
<choose>
|
||||||
NTC_TAG_REPORT
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_TAG_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_TAG_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_TAG_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
ORDER BY ${page.orderBy}
|
ORDER BY ${page.orderBy}
|
||||||
@@ -189,7 +254,19 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
FROM (SELECT SERVICE,ATTR_TYPE, SUM(SUM) SUM ,REPORT_TIME
|
FROM (SELECT SERVICE,ATTR_TYPE, SUM(SUM) SUM ,REPORT_TIME
|
||||||
FROM NTC_ATTR_TYPE_REPORT
|
FROM
|
||||||
|
|
||||||
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_ATTR_TYPE_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_ATTR_TYPE_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_ATTR_TYPE_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<where>
|
<where>
|
||||||
<if test="searchAttrType != null and searchAttrType !=''">
|
<if test="searchAttrType != null and searchAttrType !=''">
|
||||||
<![CDATA[AND ATTR_TYPE in (${searchAttrType})]]>
|
<![CDATA[AND ATTR_TYPE in (${searchAttrType})]]>
|
||||||
@@ -205,11 +282,20 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
<if test="searchBusinessType != null and searchBusinessType ==1">
|
|
||||||
GROUP BY SERVICE,ATTR_TYPE,REPORT_TIME
|
GROUP BY SERVICE,ATTR_TYPE,REPORT_TIME
|
||||||
)
|
)
|
||||||
</if>
|
|
||||||
NTC_ATTR_TYPE_REPORT
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_ATTR_TYPE_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_ATTR_TYPE_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_ATTR_TYPE_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
ORDER BY ${page.orderBy}
|
ORDER BY ${page.orderBy}
|
||||||
@@ -230,7 +316,18 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
FROM (SELECT SERVICE,LWHH, SUM(SUM) SUM ,REPORT_TIME
|
FROM (SELECT SERVICE,LWHH, SUM(SUM) SUM ,REPORT_TIME
|
||||||
FROM NTC_LWHH_REPORT
|
FROM
|
||||||
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_LWHH_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_LWHH_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_LWHH_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<where>
|
<where>
|
||||||
<if test="searchLwhh != null and searchLwhh !=''">
|
<if test="searchLwhh != null and searchLwhh !=''">
|
||||||
<![CDATA[AND LWHH in (${searchLwhh})]]>
|
<![CDATA[AND LWHH in (${searchLwhh})]]>
|
||||||
@@ -246,11 +343,19 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
<if test="searchBusinessType != null and searchBusinessType ==1">
|
|
||||||
GROUP BY SERVICE,LWHH,REPORT_TIME
|
GROUP BY SERVICE,LWHH,REPORT_TIME
|
||||||
)
|
)
|
||||||
</if>
|
<choose>
|
||||||
NTC_LWHH_REPORT
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_LWHH_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_LWHH_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_LWHH_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
ORDER BY ${page.orderBy}
|
ORDER BY ${page.orderBy}
|
||||||
@@ -270,7 +375,18 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
FROM (SELECT SERVICE,SRC_PROVINCE,SRC_CITY, SUM(SUM) SUM ,REPORT_TIME
|
FROM (SELECT SERVICE,SRC_PROVINCE,SRC_CITY, SUM(SUM) SUM ,REPORT_TIME
|
||||||
FROM NTC_SRCIP_DOMESTIC_REPORT
|
FROM
|
||||||
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_SRCIP_DOMESTIC_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_SRCIP_DOMESTIC_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_SRCIP_DOMESTIC_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<where>
|
<where>
|
||||||
<if test="searchService != null and searchService !=''">
|
<if test="searchService != null and searchService !=''">
|
||||||
<![CDATA[AND SERVICE in (${searchService})]]>
|
<![CDATA[AND SERVICE in (${searchService})]]>
|
||||||
@@ -283,11 +399,19 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
<if test="searchBusinessType != null and searchBusinessType ==1">
|
|
||||||
GROUP BY SERVICE,SRC_PROVINCE,SRC_CITY,REPORT_TIME
|
GROUP BY SERVICE,SRC_PROVINCE,SRC_CITY,REPORT_TIME
|
||||||
)
|
)
|
||||||
</if>
|
<choose>
|
||||||
NTC_SRCIP_DOMESTIC_REPORT
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_SRCIP_DOMESTIC_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_SRCIP_DOMESTIC_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_SRCIP_DOMESTIC_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
ORDER BY ${page.orderBy}
|
ORDER BY ${page.orderBy}
|
||||||
@@ -308,7 +432,18 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
FROM (SELECT SERVICE,DEST_COUNTRY, SUM(SUM) SUM ,REPORT_TIME
|
FROM (SELECT SERVICE,DEST_COUNTRY, SUM(SUM) SUM ,REPORT_TIME
|
||||||
FROM NTC_DESTIP_COUNTRY_REPORT
|
FROM
|
||||||
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_DESTIP_COUNTRY_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_DESTIP_COUNTRY_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_DESTIP_COUNTRY_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<where>
|
<where>
|
||||||
<if test="searchService != null and searchService !=''">
|
<if test="searchService != null and searchService !=''">
|
||||||
<![CDATA[AND SERVICE in (${searchService})]]>
|
<![CDATA[AND SERVICE in (${searchService})]]>
|
||||||
@@ -321,11 +456,19 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
<if test="searchBusinessType != null and searchBusinessType ==1">
|
|
||||||
GROUP BY SERVICE,DEST_COUNTRY,REPORT_TIME
|
GROUP BY SERVICE,DEST_COUNTRY,REPORT_TIME
|
||||||
)
|
)
|
||||||
</if>
|
<choose>
|
||||||
NTC_DESTIP_COUNTRY_REPORT
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_DESTIP_COUNTRY_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_DESTIP_COUNTRY_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_DESTIP_COUNTRY_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
ORDER BY ${page.orderBy}
|
ORDER BY ${page.orderBy}
|
||||||
@@ -346,7 +489,18 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
FROM (SELECT SERVICE,ENTRANCE_ID, SUM(SUM) SUM ,REPORT_TIME
|
FROM (SELECT SERVICE,ENTRANCE_ID, SUM(SUM) SUM ,REPORT_TIME
|
||||||
FROM NTC_ENTRANCE_REPORT
|
FROM
|
||||||
|
<choose>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_ENTRANCE_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_ENTRANCE_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_ENTRANCE_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<where>
|
<where>
|
||||||
|
|
||||||
<if test="searchEntrance != null and searchEntrance !=''">
|
<if test="searchEntrance != null and searchEntrance !=''">
|
||||||
@@ -363,11 +517,19 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
<if test="searchBusinessType != null and searchBusinessType ==1">
|
|
||||||
GROUP BY SERVICE,ENTRANCE_ID,REPORT_TIME
|
GROUP BY SERVICE,ENTRANCE_ID,REPORT_TIME
|
||||||
)
|
)
|
||||||
</if>
|
<choose>
|
||||||
NTC_ENTRANCE_REPORT
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 ">
|
||||||
|
NTC_ENTRANCE_STAT_HOUR
|
||||||
|
</when>
|
||||||
|
<when test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
|
||||||
|
NTC_ENTRANCE_STAT_DAILY
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
NTC_ENTRANCE_REPORT
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||||
ORDER BY ${page.orderBy}
|
ORDER BY ${page.orderBy}
|
||||||
|
|||||||
@@ -50,10 +50,9 @@ public class NtcReportService extends BaseLogService {
|
|||||||
pageTotal.setCount(restList.size());
|
pageTotal.setCount(restList.size());
|
||||||
pageTotal.setList(restList);
|
pageTotal.setList(restList);
|
||||||
return pageTotal;
|
return pageTotal;
|
||||||
} else if ("2".equals(entity.getSearchBusinessType())) {
|
} else{
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user