Merge branch 'glj' of http://47.92.168.204:3000/VoRDM/vordm-backend into glj
This commit is contained in:
commit
a9831c97ee
|
@ -32,4 +32,10 @@ public class GroupByUse {
|
||||||
* 类型
|
* 类型
|
||||||
*/
|
*/
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典value
|
||||||
|
*/
|
||||||
|
private String dictValue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ public interface DisasterInfoMapper extends BaseMapper<DisasterInfo> {
|
||||||
@Param("disaster_time") String disaster_time,
|
@Param("disaster_time") String disaster_time,
|
||||||
@Param("name") String name);
|
@Param("name") String name);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取债害详情信息
|
* 获取债害详情信息
|
||||||
* @param id
|
* @param id
|
||||||
|
|
|
@ -26,7 +26,10 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
di.id ,di.disaster_type,di.disaster_keyword,
|
di
|
||||||
|
.
|
||||||
|
id
|
||||||
|
,di.disaster_type,di.disaster_keyword,
|
||||||
di.disaster_time,di.upload_time,di.geometry,
|
di.disaster_time,di.upload_time,di.geometry,
|
||||||
di.disaster_level,di.disaster_country,di.respond_status,
|
di.disaster_level,di.disaster_country,di.respond_status,
|
||||||
di.visit_count,di.spider_type,di.tempend_time,
|
di.visit_count,di.spider_type,di.tempend_time,
|
||||||
|
@ -34,7 +37,10 @@
|
||||||
di.respond_time,di.download_count,di.sponsor_organization
|
di.respond_time,di.download_count,di.sponsor_organization
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Home_Disaster_Info">
|
<sql id="Home_Disaster_Info">
|
||||||
d.disaster_type,d.disaster_time,d.disaster_country,
|
d
|
||||||
|
.
|
||||||
|
disaster_type
|
||||||
|
,d.disaster_time,d.disaster_country,
|
||||||
m.organization
|
m.organization
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
@ -60,64 +66,77 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getSelectCondition" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getSelectCondition" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
select distinct ${name} as name
|
select distinct ${name} AS name , bdb.dict_value AS dictValue
|
||||||
from disaster_info
|
from disaster_info
|
||||||
<if test="disaster_type!=null or disaster_country!=null or disaster_time!=null"> where </if>
|
left join blade_dict_biz bdb on bdb.dict_key = disaster_info.disaster_type
|
||||||
|
<where>
|
||||||
<if test="disaster_type!=null"> disaster_type like concat('%',#{disaster_type},'%') </if>
|
<if test="disaster_type !=null and disaster_type!=''">
|
||||||
<if test="disaster_type!=null and (disaster_country!=null or disaster_time!=null)"> and </if>
|
disaster_type = #{disaster_type}
|
||||||
<if test="disaster_country!=null"> disaster_country like concat('%',#{disaster_country},'%') </if>
|
</if>
|
||||||
<if test="disaster_time!=null and disaster_country!=null and disaster_time!=null"> and </if>
|
<if test="disaster_country !=null and disaster_country!=''">
|
||||||
<if test="disaster_time!=null"> disaster_time like concat('%',#{disaster_time},'%')</if>
|
and disaster_country like concat('%',#{disaster_country},'%')
|
||||||
|
</if>
|
||||||
|
<if test="disaster_time!=null and disaster_time!=''">
|
||||||
|
and disaster_time like concat('%',#{disaster_time},'%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDisasterStatistics" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getDisasterStatistics" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
select ${name} as name,count(*) as cnt
|
select ${name} as name, count(*) as cnt
|
||||||
from disaster_info
|
from disaster_info
|
||||||
group by ${name}
|
group by ${name}
|
||||||
order by cnt desc
|
order by cnt desc limit 0,7
|
||||||
limit 0,7
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getHomeDisaster" resultType="com.kening.vordm.vo.DisasterMangerInfo">
|
<select id="getHomeDisaster" resultType="com.kening.vordm.vo.DisasterMangerInfo">
|
||||||
select *
|
select *
|
||||||
from (select distinct manager_id,disaster_id from guest_mamanager_info
|
from (select distinct manager_id, disaster_id
|
||||||
on g.manager_id=m.id and g.disaster_id=d.id
|
from guest_mamanager_info on g.manager_id=m.id and g.disaster_id=d.id
|
||||||
where d.respond_status=#{respondStatus}
|
where d.respond_status=#{respondStatus}
|
||||||
order by d.disaster_time desc
|
order by d.disaster_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getAllUser" resultType="com.kening.vordm.vo.UserTenantVo">
|
<select id="getAllUser" resultType="com.kening.vordm.vo.UserTenantVo">
|
||||||
SELECT
|
SELECT bu.organization AS organizationId,
|
||||||
bu.organization AS organizationId,
|
|
||||||
bt.tenant_name AS organizationName
|
bt.tenant_name AS organizationName
|
||||||
FROM
|
FROM blade_user bu
|
||||||
blade_user bu
|
|
||||||
LEFT JOIN blade_tenant bt ON bt.id = bu.organization
|
LEFT JOIN blade_tenant bt ON bt.id = bu.organization
|
||||||
GROUP BY bu.organization
|
GROUP BY bu.organization
|
||||||
</select>
|
</select>
|
||||||
<select id="getLeft3Data" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getLeft3Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
select t.sponsor_organization as `name`, count(*) as cnt , 'sponsorOrganization' as `type` from disaster_info t GROUP BY t.sponsor_organization ORDER BY cnt desc LIMIT 3
|
select t.sponsor_organization as `name`, count(*) as cnt, 'sponsorOrganization' as `type`
|
||||||
|
from disaster_info t
|
||||||
|
GROUP BY t.sponsor_organization
|
||||||
|
ORDER BY cnt desc LIMIT 3
|
||||||
</select>
|
</select>
|
||||||
<select id="getLeft4Data" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getLeft4Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
select t.response_organization as `name`, count(*) as cnt, 'responseOrganization' as `type` from guest_manage_disaster_ref t GROUP BY t.response_organization ORDER BY cnt desc LIMIT 3
|
select t.response_organization as `name`, count(*) as cnt, 'responseOrganization' as `type`
|
||||||
|
from guest_manage_disaster_ref t
|
||||||
|
GROUP BY t.response_organization
|
||||||
|
ORDER BY cnt desc LIMIT 3
|
||||||
</select>
|
</select>
|
||||||
<select id="getLeft1Data" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getLeft1Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
select b.dict_key, b.dict_value as name, count(t.disaster_type) as cnt, 'type' as `type`,
|
select b.dict_key,
|
||||||
CONCAT('/icon_disastertype/icon-',b.dict_key,'.png') as icon
|
b.dict_value as name,
|
||||||
from blade_dict_biz b left join disaster_info t on b.dict_key = t.disaster_type
|
count(t.disaster_type) as cnt,
|
||||||
where b.`code` = 'disaster' and b.dict_key is not null
|
'type' as `type`,
|
||||||
|
CONCAT('/icon_disastertype/icon-', b.dict_key, '.png') as icon
|
||||||
|
from blade_dict_biz b
|
||||||
|
left join disaster_info t on b.dict_key = t.disaster_type
|
||||||
|
where b.`code` = 'disaster'
|
||||||
|
and b.dict_key is not null
|
||||||
group by b.dict_key, b.dict_value
|
group by b.dict_key, b.dict_value
|
||||||
order by cnt desc
|
order by cnt desc limit 7
|
||||||
limit 7
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getLeft2Data" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getLeft2Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
SELECT b.*, c.img as icon from country_icon c INNER JOIN
|
SELECT b.*, c.img as icon
|
||||||
|
from country_icon c
|
||||||
|
INNER JOIN
|
||||||
(select t.disaster_country as name, count(*) as cnt, 'country' as `type`
|
(select t.disaster_country as name, count(*) as cnt, 'country' as `type`
|
||||||
from disaster_info t
|
from disaster_info t
|
||||||
group by t.disaster_country
|
group by t.disaster_country
|
||||||
order by cnt desc
|
order by cnt desc limit 7) b on c.flagname = b.`name`
|
||||||
limit 7) b on c.flagname = b.`name`
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue