glj-代码提交
This commit is contained in:
parent
06a9c43c7f
commit
e75f984007
|
@ -25,7 +25,7 @@ public interface LauncherConstant {
|
||||||
* 39.103.203.80(公网)
|
* 39.103.203.80(公网)
|
||||||
* 172.29.144.23(私网)
|
* 172.29.144.23(私网)
|
||||||
*/
|
*/
|
||||||
String NACOS_DEV_ADDR = "8.142.41.215:8848";
|
String NACOS_DEV_ADDR = "192.168.31.16:8848";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nacos prod 地址
|
* nacos prod 地址
|
||||||
|
|
|
@ -204,6 +204,18 @@ public class RemoteSensingSourceData implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<String> satelliteCodeListNew;
|
private List<String> satelliteCodeListNew;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态集合
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String statusListNew;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态集合
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<String> statusList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卫星类型集合
|
* 卫星类型集合
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.kening.vordm.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApprovalManagementVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据自增列
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据名称
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据产品的大小(byte)
|
||||||
|
*/
|
||||||
|
private Long size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型(0-基础数据,1-减灾产品,2-制图产品)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据下载链接(网站上,对象存储路径)
|
||||||
|
*/
|
||||||
|
private String link;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源机构
|
||||||
|
*/
|
||||||
|
private String sourceOrganization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 未审核,1-审核已通过,2-审核未通过
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传人姓名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String uploaderName;
|
||||||
|
}
|
|
@ -1,13 +1,12 @@
|
||||||
package com.kening.vordm.vo;
|
package com.kening.vordm.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class CenterController {
|
||||||
public R<IPage<CenterDisasterInfo>> disasterInfoList(Query query, @RequestParam Map<String, String> params) {
|
public R<IPage<CenterDisasterInfo>> disasterInfoList(Query query, @RequestParam Map<String, String> params) {
|
||||||
return R.data(centerDisasterInfoService.page(Condition.getPage(query), Wrappers.<CenterDisasterInfo>lambdaQuery()
|
return R.data(centerDisasterInfoService.page(Condition.getPage(query), Wrappers.<CenterDisasterInfo>lambdaQuery()
|
||||||
.eq(CenterDisasterInfo::getRespondStatus,2)
|
.eq(CenterDisasterInfo::getRespondStatus,2)
|
||||||
|
.eq(CenterDisasterInfo::getStatus,1)
|
||||||
.eq(CenterDisasterInfo::getEmail,String.valueOf(params.get("email")))
|
.eq(CenterDisasterInfo::getEmail,String.valueOf(params.get("email")))
|
||||||
.orderByDesc(CenterDisasterInfo::getApplyTime)
|
.orderByDesc(CenterDisasterInfo::getApplyTime)
|
||||||
));
|
));
|
||||||
|
|
|
@ -72,5 +72,15 @@ public class EntityDataController {
|
||||||
public R updateEntityData(@RequestBody EntityData entityData) {
|
public R updateEntityData(@RequestBody EntityData entityData) {
|
||||||
return R.data(entityDataService.updateById(entityData));
|
return R.data(entityDataService.updateById(entityData));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计用户下所有提交实体数据统计
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getStatisticsByUserId")
|
||||||
|
public R getStatisticsByUserId(Long id, String year) {
|
||||||
|
return R.data(entityDataService.getStatisticsByUserId(id, year));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,5 +160,15 @@ public class ToolController{
|
||||||
public R statistics() {
|
public R statistics() {
|
||||||
return R.data(toolService.statistics());
|
return R.data(toolService.statistics());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计用户下所有提交实体数据统计
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getStatisticsByUserId")
|
||||||
|
public R getStatisticsByUserId(Long id, String year) {
|
||||||
|
return R.data(toolService.getStatisticsByUserId(id, year));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
di.id
|
di
|
||||||
|
.
|
||||||
|
id
|
||||||
,di.disaster_type,di.disaster_keyword,
|
,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,
|
||||||
|
@ -37,14 +39,17 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="Home_Disaster_Info">
|
<sql id="Home_Disaster_Info">
|
||||||
d.disaster_type
|
d
|
||||||
|
.
|
||||||
|
disaster_type
|
||||||
,d.disaster_time,d.disaster_country,
|
,d.disaster_time,d.disaster_country,
|
||||||
m.organization
|
m.organization
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="saveUserData">
|
<insert id="saveUserData">
|
||||||
insert into blade_user (tenant_id, password, email, status, is_deleted, role_id, code, name)
|
insert into blade_user (tenant_id, password, email, status, is_deleted, role_id, code, name)
|
||||||
values (#{userVo.tenantId}, #{userVo.password}, #{userVo.email}, 1, 0, #{userVo.roleId}, #{userVo.country}, #{userVo.name});
|
values (#{userVo.tenantId}, #{userVo.password}, #{userVo.email}, 1, 0, #{userVo.roleId}, #{userVo.country},
|
||||||
|
#{userVo.name});
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updataUserByEmail">
|
<update id="updataUserByEmail">
|
||||||
|
@ -128,16 +133,13 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLeft4Data" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getLeft4Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
SELECT
|
SELECT g.username AS `name`,
|
||||||
g.username AS `name`,
|
count(*) AS cnt,
|
||||||
count(*) AS cnt,
|
'sponsorOrganization' AS `type`
|
||||||
'sponsorOrganization' AS `type`
|
FROM disaster_info t
|
||||||
FROM
|
INNER JOIN guest_manage_disaster_ref gm ON gm.disaster_id = t.id
|
||||||
disaster_info t
|
INNER JOIN guest_info g ON g.id = gm.sponsor_id
|
||||||
INNER JOIN guest_manage_disaster_ref gm ON gm.disaster_id = t.id
|
WHERE gm.`status` != 2
|
||||||
INNER JOIN guest_info g ON g.id = gm.sponsor_id
|
|
||||||
WHERE
|
|
||||||
gm.`status` != 2
|
|
||||||
GROUP BY
|
GROUP BY
|
||||||
gm.sponsor_id
|
gm.sponsor_id
|
||||||
ORDER BY
|
ORDER BY
|
||||||
|
@ -166,7 +168,7 @@
|
||||||
INNER JOIN
|
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 limit 5) b on c.flagname = b.`name`
|
group by t.disaster_country limit 7) b on c.flagname = b.`name`
|
||||||
order by b.cnt desc
|
order by b.cnt desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -269,114 +271,201 @@
|
||||||
GROUP BY date
|
GROUP BY date
|
||||||
</select>
|
</select>
|
||||||
<select id="listGetByYear" resultType="com.kening.vordm.entity.DisasterInfo">
|
<select id="listGetByYear" resultType="com.kening.vordm.entity.DisasterInfo">
|
||||||
select * from disaster_info t where date_format(t.disaster_time,'%Y') = #{year}
|
select *
|
||||||
|
from disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y') = #{year}
|
||||||
</select>
|
</select>
|
||||||
<select id="visitAndDownLoad" resultType="java.util.Map">
|
<select id="visitAndDownLoad" resultType="java.util.Map">
|
||||||
SELECT d.dict_value, SUM(t.visit_count) as visit, SUM(t.download_count) as download FROM disaster_info t INNER JOIN blade_dict_biz d on t.disaster_type = d.dict_key
|
SELECT d.dict_value, SUM(t.visit_count) as visit, SUM(t.download_count) as download
|
||||||
where date_format(t.disaster_time,'%Y') = #{year} GROUP BY d.dict_value
|
FROM disaster_info t
|
||||||
|
INNER JOIN blade_dict_biz d on t.disaster_type = d.dict_key
|
||||||
|
where date_format(t.disaster_time, '%Y') = #{year}
|
||||||
|
GROUP BY d.dict_value
|
||||||
</select>
|
</select>
|
||||||
<select id="initiateAndResponseData" resultType="java.util.Map">
|
<select id="initiateAndResponseData" resultType="java.util.Map">
|
||||||
select d.`key`, sum(d.response) as response, SUM(d.initiate) as initiate from (
|
select d.`key`, sum(d.response) as response, SUM(d.initiate) as initiate
|
||||||
SELECT CONCAT(#{year},'-01' ) as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
from (
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-01')
|
SELECT CONCAT(#{year}, '-01') as `key`, 0 as response, count(1) as initiate
|
||||||
union ALL
|
FROM disaster_info t
|
||||||
SELECT CONCAT(#{year},'-02' ) as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-01')
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-02')
|
union ALL
|
||||||
union ALL
|
SELECT CONCAT(#{year}, '-02') as `key`, 0 as response, count(1) as initiate
|
||||||
SELECT CONCAT(#{year},'-03' ) as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
FROM disaster_info t
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-03')
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-02')
|
||||||
union ALL
|
union ALL
|
||||||
SELECT CONCAT(#{year},'-04' ) as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
SELECT CONCAT(#{year}, '-03') as `key`, 0 as response, count(1) as initiate
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-04' )
|
FROM disaster_info t
|
||||||
union ALL
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-03')
|
||||||
SELECT CONCAT(#{year},'-05') as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
union ALL
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-05' )
|
SELECT CONCAT(#{year}, '-04') as `key`, 0 as response, count(1) as initiate
|
||||||
union ALL
|
FROM disaster_info t
|
||||||
SELECT CONCAT(#{year},'-06') as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-04')
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-06')
|
union ALL
|
||||||
union ALL
|
SELECT CONCAT(#{year}, '-05') as `key`, 0 as response, count(1) as initiate
|
||||||
SELECT CONCAT(#{year},'-07') as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
FROM disaster_info t
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-07')
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-05')
|
||||||
union ALL
|
union ALL
|
||||||
SELECT CONCAT(#{year},'-08') as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
SELECT CONCAT(#{year}, '-06') as `key`, 0 as response, count(1) as initiate
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-08')
|
FROM disaster_info t
|
||||||
union ALL
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-06')
|
||||||
SELECT CONCAT(#{year},'-09') as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
union ALL
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-09')
|
SELECT CONCAT(#{year}, '-07') as `key`, 0 as response, count(1) as initiate
|
||||||
union ALL
|
FROM disaster_info t
|
||||||
SELECT CONCAT(#{year},'-10') as `key` , 0 as response,count(1) as initiate FROM disaster_info t
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-07')
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-10')
|
union ALL
|
||||||
union ALL
|
SELECT CONCAT(#{year}, '-08') as `key`, 0 as response, count(1) as initiate
|
||||||
SELECT CONCAT(#{year},'-11') as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
FROM disaster_info t
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-11')
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-08')
|
||||||
union ALL
|
union ALL
|
||||||
SELECT CONCAT(#{year},'-12') as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
SELECT CONCAT(#{year}, '-09') as `key`, 0 as response, count(1) as initiate
|
||||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-12')
|
FROM disaster_info t
|
||||||
union ALL
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-09')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-10') as `key`, 0 as response, count(1) as initiate
|
||||||
SELECT CONCAT(#{year},'-01') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
FROM disaster_info t
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-01')
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-10')
|
||||||
union ALL
|
union ALL
|
||||||
SELECT CONCAT(#{year},'-02') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
SELECT CONCAT(#{year}, '-11') as `key`, 0 as response, count(1) as initiate
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-02')
|
FROM disaster_info t
|
||||||
union ALL
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-11')
|
||||||
SELECT CONCAT(#{year},'-03') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
union ALL
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-03')
|
SELECT CONCAT(#{year}, '-12') as `key`, 0 as response, count(1) as initiate
|
||||||
union ALL
|
FROM disaster_info t
|
||||||
SELECT CONCAT(#{year},'-04') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-12')
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-04')
|
union ALL
|
||||||
union ALL
|
|
||||||
SELECT CONCAT(#{year},'-05') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-05')
|
|
||||||
union ALL
|
|
||||||
SELECT CONCAT(#{year},'-06') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-06')
|
|
||||||
union ALL
|
|
||||||
SELECT CONCAT(#{year},'-07') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-07')
|
|
||||||
union ALL
|
|
||||||
SELECT CONCAT(#{year},'-08') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-08')
|
|
||||||
union ALL
|
|
||||||
SELECT CONCAT(#{year},'-09') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-09')
|
|
||||||
union ALL
|
|
||||||
SELECT CONCAT(#{year},'-10') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-10')
|
|
||||||
union ALL
|
|
||||||
SELECT CONCAT(#{year},'-11') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-11')
|
|
||||||
union ALL
|
|
||||||
SELECT CONCAT(#{year},'-12') as `key`, count(1) as response ,0 as initiate FROM disaster_info t
|
|
||||||
where date_format(t.respond_time,'%Y-%m') = CONCAT(#{year},'-12') ) d
|
|
||||||
GROUP BY d.`key` ORDER BY d.`key`
|
|
||||||
|
|
||||||
|
|
||||||
|
SELECT CONCAT(#{year}, '-01') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-01')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-02') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-02')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-03') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-03')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-04') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-04')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-05') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-05')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-06') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-06')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-07') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-07')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-08') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-08')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-09') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-09')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-10') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-10')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-11') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-11')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-12') as `key`, count(1) as response, 0 as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.respond_time, '%Y-%m') = CONCAT(#{year}, '-12')) d
|
||||||
|
GROUP BY d.`key`
|
||||||
|
ORDER BY d.`key`
|
||||||
</select>
|
</select>
|
||||||
<select id="chiefData" resultType="java.util.Map">
|
<select id="chiefData" resultType="java.util.Map">
|
||||||
SELECT b.`name`, count(*) as val FROM disaster_info t INNER JOIN blade_user b on t.chief_id = b.id
|
SELECT b.`name`, count(*) as val
|
||||||
where date_format(t.disaster_time,'%Y') = #{year} and b.`name` != "超级管理员" GROUP BY b.`name` ORDER BY val desc limit 10
|
FROM disaster_info t
|
||||||
|
INNER JOIN blade_user b on t.chief_id = b.id
|
||||||
|
where date_format(t.disaster_time, '%Y') = #{year}
|
||||||
|
and b.`name` != "超级管理员"
|
||||||
|
GROUP BY b.`name`
|
||||||
|
ORDER BY val desc limit 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="adminData" resultType="java.util.Map">
|
<select id="adminData" resultType="java.util.Map">
|
||||||
SELECT b.`name`, count(*) as val FROM guest_manage_disaster_ref t INNER JOIN blade_user b on t.manager_id = b.id INNER JOIN disaster_info d on d.id = t.disaster_id
|
select d.`key` AS 'name', SUM(d.initiate) as val
|
||||||
where date_format(d.disaster_time,'%Y') = #{year} and b.role_id = '1123598816738675204' GROUP BY b.`name` ORDER BY val desc limit 10
|
from (
|
||||||
|
SELECT CONCAT(#{year}, '-01') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-01')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-02') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-02')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-03') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-03')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-04') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-04')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-05') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-05')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-06') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-06')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-07') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-07')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-08') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-08')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-09') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-09')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-10') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-10')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-11') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-11')
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-12') as `key`, count(1) as initiate
|
||||||
|
FROM disaster_info t
|
||||||
|
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-12')
|
||||||
|
) d
|
||||||
|
GROUP BY d.`key`
|
||||||
|
ORDER BY d.`key`
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="disasterNum" resultType="java.util.Map">
|
<select id="disasterNum" resultType="java.util.Map">
|
||||||
SELECT d.dict_value as `name`, count(1) as val FROM disaster_info t INNER JOIN blade_dict_biz d on t.disaster_type = d.dict_key
|
SELECT d.dict_value as `name`, count(1) as val
|
||||||
where date_format(t.disaster_time,'%Y') = #{year} GROUP BY d.dict_value
|
FROM disaster_info t
|
||||||
|
INNER JOIN blade_dict_biz d on t.disaster_type = d.dict_key
|
||||||
|
where date_format(t.disaster_time, '%Y') = #{year}
|
||||||
|
GROUP BY d.dict_value
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getByUserIdRole" resultType="com.kening.vordm.vo.CallForHelpVo">
|
<select id="getByUserIdRole" resultType="com.kening.vordm.vo.CallForHelpVo">
|
||||||
SELECT br.role_alias AS roleAlias,
|
SELECT br.role_alias AS roleAlias,
|
||||||
br.id AS roleId,
|
br.id AS roleId,
|
||||||
br.parent_id AS parentId,
|
br.parent_id AS parentId,
|
||||||
br.role_name AS roleName
|
br.role_name AS roleName
|
||||||
FROM blade_user bu
|
FROM blade_user bu
|
||||||
left JOIN blade_role br on bu.role_id = br.id
|
left JOIN blade_role br on bu.role_id = br.id
|
||||||
WHERE bu.id = #{chiefIdEquals}
|
WHERE bu.id = #{chiefIdEquals}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import com.kening.vordm.vo.UserTenantVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -23,4 +24,5 @@ public interface EntityDataMapper extends BaseMapper<EntityData> {
|
||||||
|
|
||||||
List<UserTenantVo> getEntityDataSourceOrganization(@Param("disasterId") Long disasterId);
|
List<UserTenantVo> getEntityDataSourceOrganization(@Param("disasterId") Long disasterId);
|
||||||
|
|
||||||
|
List<Map<String, Long>> getStatisticsByUserId(@Param("id") Long id,@Param("year") String year);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,33 +1,36 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.kening.vordm.mapper.EntityDataMapper">
|
<mapper namespace="com.kening.vordm.mapper.EntityDataMapper">
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.EntityData">
|
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.EntityData">
|
||||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||||
<result property="size" column="size" jdbcType="BIGINT"/>
|
<result property="size" column="size" jdbcType="BIGINT"/>
|
||||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||||
<result property="link" column="link" jdbcType="VARCHAR"/>
|
<result property="link" column="link" jdbcType="VARCHAR"/>
|
||||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
<result property="uploadTime" column="upload_time" jdbcType="TIMESTAMP"/>
|
<result property="uploadTime" column="upload_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
|
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
|
||||||
<result property="visualFlag" column="visual_flag" jdbcType="INTEGER"/>
|
<result property="visualFlag" column="visual_flag" jdbcType="INTEGER"/>
|
||||||
<result property="visualLon" column="visual_lon" jdbcType="DOUBLE"/>
|
<result property="visualLon" column="visual_lon" jdbcType="DOUBLE"/>
|
||||||
<result property="visualLat" column="visual_lat" jdbcType="DOUBLE"/>
|
<result property="visualLat" column="visual_lat" jdbcType="DOUBLE"/>
|
||||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
<result property="uploaderId" column="uploader_id" jdbcType="BIGINT"/>
|
<result property="uploaderId" column="uploader_id" jdbcType="BIGINT"/>
|
||||||
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
|
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
|
||||||
<result property="reviewTime" column="review_time" jdbcType="TIMESTAMP"/>
|
<result property="reviewTime" column="review_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="sourceOrganization" column="source_organization" jdbcType="TIMESTAMP"/>
|
<result property="sourceOrganization" column="source_organization" jdbcType="TIMESTAMP"/>
|
||||||
<result property="uploadType" column="upload_type" jdbcType="INTEGER"/>
|
<result property="uploadType" column="upload_type" jdbcType="INTEGER"/>
|
||||||
<result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/>
|
<result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/>
|
||||||
<result property="isPublish" column="is_publish" jdbcType="INTEGER"/>
|
<result property="isPublish" column="is_publish" jdbcType="INTEGER"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
ed.id,ed.title,ed.size,
|
ed
|
||||||
|
.
|
||||||
|
id
|
||||||
|
,ed.title,ed.size,
|
||||||
ed.type,ed.link,ed.remark,
|
ed.type,ed.link,ed.remark,
|
||||||
ed.upload_time,ed.disaster_id,ed.visual_flag,
|
ed.upload_time,ed.disaster_id,ed.visual_flag,
|
||||||
ed.visual_lon,ed.visual_lat,
|
ed.visual_lon,ed.visual_lat,
|
||||||
|
@ -39,9 +42,9 @@
|
||||||
<select id="getEntityDataList" resultType="com.kening.vordm.entity.EntityData">
|
<select id="getEntityDataList" resultType="com.kening.vordm.entity.EntityData">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List"/>,
|
<include refid="Base_Column_List"/>,
|
||||||
gi.username AS uploaderName,
|
gi.username AS uploaderName,
|
||||||
di.vordm_id,
|
di.vordm_id,
|
||||||
di.geometry
|
di.geometry
|
||||||
from entity_data ed
|
from entity_data ed
|
||||||
left join guest_info gi on gi.id = ed.uploader_id
|
left join guest_info gi on gi.id = ed.uploader_id
|
||||||
LEFT JOIN disaster_info di on di.id = ed.disaster_id
|
LEFT JOIN disaster_info di on di.id = ed.disaster_id
|
||||||
|
@ -49,6 +52,9 @@
|
||||||
<if test="entityData.disasterId != null and entityData.disasterId != ''">
|
<if test="entityData.disasterId != null and entityData.disasterId != ''">
|
||||||
ed.disaster_id = #{entityData.disasterId}
|
ed.disaster_id = #{entityData.disasterId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="entityData.status != null and entityData.status != ''">
|
||||||
|
and ed.status = #{entityData.status}
|
||||||
|
</if>
|
||||||
<if test="entityData.type != null and entityData.type != ''">
|
<if test="entityData.type != null and entityData.type != ''">
|
||||||
and ed.type = #{entityData.type}
|
and ed.type = #{entityData.type}
|
||||||
</if>
|
</if>
|
||||||
|
@ -59,7 +65,7 @@
|
||||||
and ed.title = concat('%',#{entityData.title},'%')
|
and ed.title = concat('%',#{entityData.title},'%')
|
||||||
</if>
|
</if>
|
||||||
AND ed.is_deleted = 0
|
AND ed.is_deleted = 0
|
||||||
and ed.status = 1
|
-- and ed.status = 1
|
||||||
</where>
|
</where>
|
||||||
ORDER BY ed.upload_time DESC
|
ORDER BY ed.upload_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
@ -74,4 +80,169 @@
|
||||||
</where>
|
</where>
|
||||||
GROUP BY ed.source_organization
|
GROUP BY ed.source_organization
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getStatisticsByUserId" resultType="java.util.Map">
|
||||||
|
select d.`key` AS 'name', SUM(d.initiate + d.initiateNew) as val
|
||||||
|
from (
|
||||||
|
SELECT CONCAT(#{year}, '-01') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-01')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-02') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-02')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-03') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-03')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-04') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-04')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-05') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-05')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-06') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-06')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-07') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-07')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-08') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-08')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-09') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-09')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-10') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-10')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-11') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-11')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-12') as `key`, count(1) as initiate, 0 AS initiateNew
|
||||||
|
FROM entity_data tt
|
||||||
|
where date_format(tt.upload_time, '%Y-%m') = CONCAT(#{year}, '-12')
|
||||||
|
and tt.status = 1
|
||||||
|
and tt.uploader_id = #{id}
|
||||||
|
union ALL
|
||||||
|
|
||||||
|
|
||||||
|
SELECT CONCAT(#{year}, '-01') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-01')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-02') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-02')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-03') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-03')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-04') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-04')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-05') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-05')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-06') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-06')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-07') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-07')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-08') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-08')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-09') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-09')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-10') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-10')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-11') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-11')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-12') as `key`, 0 as initiate, count(1) as initiateNew
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-12')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3)
|
||||||
|
and t.upload_id = #{id}
|
||||||
|
) d
|
||||||
|
GROUP BY d.`key`
|
||||||
|
ORDER BY d.`key`
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.kening.vordm.vo.GroupByUse;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -21,4 +22,6 @@ public interface RemoteSensingSourceDataMapper extends BaseMapper<RemoteSensingS
|
||||||
List<RemoteSensingSourceData> getRemoteSensingSourceData(@Param("disasterType") String disasterType,@Param("disasterCountry") String disasterCountry,@Param("disasterTime") String disasterTime);
|
List<RemoteSensingSourceData> getRemoteSensingSourceData(@Param("disasterType") String disasterType,@Param("disasterCountry") String disasterCountry,@Param("disasterTime") String disasterTime);
|
||||||
|
|
||||||
IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByCondition(@Param("remoteSensingSourceData") RemoteSensingSourceData remoteSensingSourceData, IPage<Object> page);
|
IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByCondition(@Param("remoteSensingSourceData") RemoteSensingSourceData remoteSensingSourceData, IPage<Object> page);
|
||||||
|
|
||||||
|
List<Map<String, Long>> getStatisticsByUserId(@Param("id") Long id,@Param("year") String year);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,47 +1,48 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.kening.vordm.mapper.RemoteSensingSourceDataMapper">
|
<mapper namespace="com.kening.vordm.mapper.RemoteSensingSourceDataMapper">
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.RemoteSensingSourceData">
|
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.RemoteSensingSourceData">
|
||||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
<result property="thumbnailLink" column="thumbnail_link" jdbcType="VARCHAR"/>
|
<result property="thumbnailLink" column="thumbnail_link" jdbcType="VARCHAR"/>
|
||||||
<result property="productLevel" column="product_level" jdbcType="VARCHAR"/>
|
<result property="productLevel" column="product_level" jdbcType="VARCHAR"/>
|
||||||
<result property="productSerialNum" column="product_serial_num" jdbcType="VARCHAR"/>
|
<result property="productSerialNum" column="product_serial_num" jdbcType="VARCHAR"/>
|
||||||
<result property="productTime" column="product_time" jdbcType="TIMESTAMP"/>
|
<result property="productTime" column="product_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="productBandsNum" column="product_bands_num" jdbcType="INTEGER"/>
|
<result property="productBandsNum" column="product_bands_num" jdbcType="INTEGER"/>
|
||||||
<result property="productResolution" column="product_resolution" jdbcType="DOUBLE"/>
|
<result property="productResolution" column="product_resolution" jdbcType="DOUBLE"/>
|
||||||
<result property="rawDataStripeNum" column="raw_data_stripe_num" jdbcType="INTEGER"/>
|
<result property="rawDataStripeNum" column="raw_data_stripe_num" jdbcType="INTEGER"/>
|
||||||
<result property="cloudCover" column="cloud_cover" jdbcType="INTEGER"/>
|
<result property="cloudCover" column="cloud_cover" jdbcType="INTEGER"/>
|
||||||
<result property="productSize" column="product_size" jdbcType="INTEGER"/>
|
<result property="productSize" column="product_size" jdbcType="INTEGER"/>
|
||||||
<result property="projectBandNum" column="project_band_num" jdbcType="INTEGER"/>
|
<result property="projectBandNum" column="project_band_num" jdbcType="INTEGER"/>
|
||||||
<result property="coverageArea" column="coverage_area" jdbcType="VARCHAR"/>
|
<result property="coverageArea" column="coverage_area" jdbcType="VARCHAR"/>
|
||||||
<result property="satelliteCode" column="satellite_code" jdbcType="VARCHAR"/>
|
<result property="satelliteCode" column="satellite_code" jdbcType="VARCHAR"/>
|
||||||
<result property="receivingTime" column="receiving_time" jdbcType="TIMESTAMP"/>
|
<result property="receivingTime" column="receiving_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="upperLeftLat" column="upper_left_lat" jdbcType="DOUBLE"/>
|
<result property="upperLeftLat" column="upper_left_lat" jdbcType="DOUBLE"/>
|
||||||
<result property="upperLeftLon" column="upper_left_lon" jdbcType="DOUBLE"/>
|
<result property="upperLeftLon" column="upper_left_lon" jdbcType="DOUBLE"/>
|
||||||
<result property="upperRightLat" column="upper_right_lat" jdbcType="DOUBLE"/>
|
<result property="upperRightLat" column="upper_right_lat" jdbcType="DOUBLE"/>
|
||||||
<result property="upperRightLon" column="upper_right_lon" jdbcType="DOUBLE"/>
|
<result property="upperRightLon" column="upper_right_lon" jdbcType="DOUBLE"/>
|
||||||
<result property="viewCenterLat" column="view_center_lat" jdbcType="DOUBLE"/>
|
<result property="viewCenterLat" column="view_center_lat" jdbcType="DOUBLE"/>
|
||||||
<result property="viewCenterLon" column="view_center_lon" jdbcType="DOUBLE"/>
|
<result property="viewCenterLon" column="view_center_lon" jdbcType="DOUBLE"/>
|
||||||
<result property="lowerRightLat" column="lower_right_lat" jdbcType="DOUBLE"/>
|
<result property="lowerRightLat" column="lower_right_lat" jdbcType="DOUBLE"/>
|
||||||
<result property="lowerRightLon" column="lower_right_lon" jdbcType="DOUBLE"/>
|
<result property="lowerRightLon" column="lower_right_lon" jdbcType="DOUBLE"/>
|
||||||
<result property="lowerLeftLat" column="lower_left_lat" jdbcType="DOUBLE"/>
|
<result property="lowerLeftLat" column="lower_left_lat" jdbcType="DOUBLE"/>
|
||||||
<result property="lowerLeftLon" column="lower_left_lon" jdbcType="DOUBLE"/>
|
<result property="lowerLeftLon" column="lower_left_lon" jdbcType="DOUBLE"/>
|
||||||
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
|
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
|
||||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="downloadUrl" column="download_url" jdbcType="VARCHAR"/>
|
<result property="downloadUrl" column="download_url" jdbcType="VARCHAR"/>
|
||||||
<result property="sourceOrganization" column="source_organization" jdbcType="VARCHAR"/>
|
<result property="sourceOrganization" column="source_organization" jdbcType="VARCHAR"/>
|
||||||
<result property="satelliteType" column="satellite_type" jdbcType="INTEGER"/>
|
<result property="satelliteType" column="satellite_type" jdbcType="INTEGER"/>
|
||||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
<result property="uploadId" column="upload_id" jdbcType="INTEGER"/>
|
<result property="uploadId" column="upload_id" jdbcType="INTEGER"/>
|
||||||
<result property="satelliteTypeSelect" column="satellite_type_select" jdbcType="INTEGER"/>
|
<result property="satelliteTypeSelect" column="satellite_type_select" jdbcType="INTEGER"/>
|
||||||
<result property="pictureName" column="picture_name" jdbcType="VARCHAR"/>
|
<result property="pictureName" column="picture_name" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id,thumbnail_link,product_level,
|
id
|
||||||
|
,thumbnail_link,product_level,
|
||||||
product_serial_num,product_time,product_bands_num,
|
product_serial_num,product_time,product_bands_num,
|
||||||
product_resolution,raw_data_stripe_num,cloud_cover,
|
product_resolution,raw_data_stripe_num,cloud_cover,
|
||||||
product_size,project_band_num,coverage_area,
|
product_size,project_band_num,coverage_area,
|
||||||
|
@ -53,16 +54,13 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="getRemoteSensingSourceData" resultMap="BaseResultMap">
|
<select id="getRemoteSensingSourceData" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT r.*,
|
||||||
r.*,
|
d.disaster_type,
|
||||||
d.disaster_type,
|
d.disaster_country,
|
||||||
d.disaster_country,
|
d.disaster_time
|
||||||
d.disaster_time
|
FROM remote_sensing_source_data AS r,
|
||||||
FROM
|
disaster_info AS d
|
||||||
remote_sensing_source_data AS r,
|
WHERE d.id = r.disaster_id
|
||||||
disaster_info AS d
|
|
||||||
WHERE
|
|
||||||
d.id = r.disaster_id
|
|
||||||
AND d.disaster_type = #{disasterType}
|
AND d.disaster_type = #{disasterType}
|
||||||
AND d.disaster_country = #{disasterCountry}
|
AND d.disaster_country = #{disasterCountry}
|
||||||
AND d.disaster_time = #{disasterTime}
|
AND d.disaster_time = #{disasterTime}
|
||||||
|
@ -80,7 +78,8 @@
|
||||||
and r.status = #{remoteSensingSourceData.status}
|
and r.status = #{remoteSensingSourceData.status}
|
||||||
</if>
|
</if>
|
||||||
<if test="remoteSensingSourceData.productResolutionMax != null and remoteSensingSourceData.productResolutionMin != null">
|
<if test="remoteSensingSourceData.productResolutionMax != null and remoteSensingSourceData.productResolutionMin != null">
|
||||||
and r.product_resolution >= #{remoteSensingSourceData.productResolutionMin} and r.product_resolution < #{remoteSensingSourceData.productResolutionMax}
|
and r.product_resolution >= #{remoteSensingSourceData.productResolutionMin} and r.product_resolution
|
||||||
|
< #{remoteSensingSourceData.productResolutionMax}
|
||||||
</if>
|
</if>
|
||||||
<if test="remoteSensingSourceData.productResolutionMax == null and remoteSensingSourceData.productResolutionMin != null">
|
<if test="remoteSensingSourceData.productResolutionMax == null and remoteSensingSourceData.productResolutionMin != null">
|
||||||
and r.product_resolution > #{remoteSensingSourceData.productResolutionMin}
|
and r.product_resolution > #{remoteSensingSourceData.productResolutionMin}
|
||||||
|
@ -91,6 +90,12 @@
|
||||||
open="(" separator="," close=")">#{AList}
|
open="(" separator="," close=")">#{AList}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="remoteSensingSourceData.statusList != null and remoteSensingSourceData.statusList != '' and remoteSensingSourceData.statusList.size() != 0">
|
||||||
|
and r.status in
|
||||||
|
<foreach item="AList" index="index" collection="remoteSensingSourceData.statusList"
|
||||||
|
open="(" separator="," close=")">#{AList}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="remoteSensingSourceData.beforeOrAfter == 1">
|
<if test="remoteSensingSourceData.beforeOrAfter == 1">
|
||||||
and r.product_time >= (select
|
and r.product_time >= (select
|
||||||
disaster_time
|
disaster_time
|
||||||
|
@ -104,4 +109,83 @@
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getStatisticsByUserId" resultType="java.util.Map">
|
||||||
|
select d.`key` AS 'name', SUM(d.initiate) as val
|
||||||
|
from (
|
||||||
|
SELECT CONCAT(#{year}, '-01') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-01')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-02') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-02')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-03') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-03')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-04') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-04')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-05') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-05')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-06') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-06')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-07') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-07')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-08') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-08')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-09') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-09')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-10') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-10')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-11') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-11')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-12') as `key`, count(1) as initiate
|
||||||
|
FROM remote_sensing_source_data t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-12')
|
||||||
|
and (t.status = 2
|
||||||
|
OR t.status = 3) and t.upload_id = #{id}
|
||||||
|
) d
|
||||||
|
GROUP BY d.`key`
|
||||||
|
ORDER BY d.`key`
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.kening.vordm.entity.Tool;
|
import com.kening.vordm.entity.Tool;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -18,4 +19,6 @@ public interface ToolMapper extends BaseMapper<Tool> {
|
||||||
List<Tool> toolRanking();
|
List<Tool> toolRanking();
|
||||||
|
|
||||||
Integer selectCountShowName();
|
Integer selectCountShowName();
|
||||||
|
|
||||||
|
List<Map<String, Long>> getStatisticsByUserId(Long id, String year);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,4 +44,71 @@
|
||||||
group by show_name
|
group by show_name
|
||||||
) t
|
) t
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getStatisticsByUserId" resultType="java.util.Map">
|
||||||
|
select d.`key` AS 'name', SUM(d.initiate) as val
|
||||||
|
from (
|
||||||
|
SELECT CONCAT(#{year}, '-01') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-01')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-02') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-02')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-03') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-03')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-04') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-04')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-05') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-05')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-06') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-06')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-07') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-07')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-08') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-08')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-09') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-09')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-10') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-10')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-11') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-11')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
union ALL
|
||||||
|
SELECT CONCAT(#{year}, '-12') as `key`, count(1) as initiate
|
||||||
|
FROM tool t
|
||||||
|
where date_format(t.create_time, '%Y-%m') = CONCAT(#{year}, '-12')
|
||||||
|
and t.review_time is not null and t.uploader = #{id}
|
||||||
|
) d
|
||||||
|
GROUP BY d.`key`
|
||||||
|
ORDER BY d.`key`
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.kening.vordm.vo.UserTenantVo;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -30,4 +31,11 @@ public interface EntityDataService extends IService<EntityData> {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
R saveEntityData(EntityDataUserVo entityDataUserVo);
|
R saveEntityData(EntityDataUserVo entityDataUserVo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计用户下所有提交实体数据统计
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Long>> getStatisticsByUserId(Long id, String year);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.kening.vordm.entity.Tool;
|
import com.kening.vordm.entity.Tool;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -16,4 +17,6 @@ public interface ToolService extends IService<Tool> {
|
||||||
List<Tool> toolRanking();
|
List<Tool> toolRanking();
|
||||||
|
|
||||||
Object statistics();
|
Object statistics();
|
||||||
|
|
||||||
|
List<Map<String, Long>> getStatisticsByUserId(Long id, String year);
|
||||||
}
|
}
|
||||||
|
|
|
@ -267,6 +267,8 @@ public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, Dis
|
||||||
List<Map<String,Long>> chiefMap = this.baseMapper.chiefData(year);
|
List<Map<String,Long>> chiefMap = this.baseMapper.chiefData(year);
|
||||||
//统计admin
|
//统计admin
|
||||||
List<Map<String,Long>> adminfMap = this.baseMapper.adminData(year);
|
List<Map<String,Long>> adminfMap = this.baseMapper.adminData(year);
|
||||||
|
|
||||||
|
|
||||||
//统计当年的灾害响应次数 按月查询
|
//统计当年的灾害响应次数 按月查询
|
||||||
//List<Map<String,Object>> responseMonth = getDisasterReponseByMouth(2,isAdmin);
|
//List<Map<String,Object>> responseMonth = getDisasterReponseByMouth(2,isAdmin);
|
||||||
resultMap.put("header",headMap);
|
resultMap.put("header",headMap);
|
||||||
|
|
|
@ -16,6 +16,7 @@ import com.kening.vordm.vo.EntityDataUserVo;
|
||||||
import com.kening.vordm.vo.UserTenantVo;
|
import com.kening.vordm.vo.UserTenantVo;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.hssf.record.DVALRecord;
|
||||||
import org.springblade.common.cache.CacheNames;
|
import org.springblade.common.cache.CacheNames;
|
||||||
import org.springblade.core.oss.MinioTemplate;
|
import org.springblade.core.oss.MinioTemplate;
|
||||||
import org.springblade.core.oss.model.BladeFile;
|
import org.springblade.core.oss.model.BladeFile;
|
||||||
|
@ -31,6 +32,7 @@ import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -146,4 +148,9 @@ public class EntityDataServiceImpl extends ServiceImpl<EntityDataMapper, EntityD
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Long>> getStatisticsByUserId(Long id, String year) {
|
||||||
|
return baseMapper.getStatisticsByUserId(id, year);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsMapper, News>
|
||||||
news.setCreateTime(new Date());
|
news.setCreateTime(new Date());
|
||||||
news.setDisasterId(disasterId);
|
news.setDisasterId(disasterId);
|
||||||
news.setType(typeData);
|
news.setType(typeData);
|
||||||
news.setStatus(1);
|
news.setStatus(0);
|
||||||
this.baseMapper.insert(news);
|
this.baseMapper.insert(news);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsMapper, News>
|
||||||
|
|
||||||
}
|
}
|
||||||
socialMedia.setTopic(topic);
|
socialMedia.setTopic(topic);
|
||||||
socialMedia.setStatus(1);
|
socialMedia.setStatus(0);
|
||||||
socialMediaMapper.insert(socialMedia);
|
socialMediaMapper.insert(socialMedia);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,10 @@ public class RemoteSensingSourceDataServiceImpl extends ServiceImpl<RemoteSensin
|
||||||
result = Arrays.asList(satelliteCodeList.split(","));
|
result = Arrays.asList(satelliteCodeList.split(","));
|
||||||
remoteSensingSourceData.setSatelliteCodeListNew(result);
|
remoteSensingSourceData.setSatelliteCodeListNew(result);
|
||||||
}
|
}
|
||||||
|
if (remoteSensingSourceData.getStatusListNew() != null) {
|
||||||
|
result = Arrays.asList(remoteSensingSourceData.getStatusListNew().split(","));
|
||||||
|
remoteSensingSourceData.setStatusList(result);
|
||||||
|
}
|
||||||
IPage<RemoteSensingSourceData> remoteSensingSourceDataByCondition = new Page<>();
|
IPage<RemoteSensingSourceData> remoteSensingSourceDataByCondition = new Page<>();
|
||||||
|
|
||||||
if (productResolutionVos != null && !productResolutionVos.isEmpty()) {
|
if (productResolutionVos != null && !productResolutionVos.isEmpty()) {
|
||||||
|
|
|
@ -56,4 +56,9 @@ implements ToolService {
|
||||||
map.put("toolVisitsByUserTop10",toolVisitsByUser);
|
map.put("toolVisitsByUserTop10",toolVisitsByUser);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Long>> getStatisticsByUserId(Long id, String year) {
|
||||||
|
return baseMapper.getStatisticsByUserId(id,year);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue