glj-代码提交
This commit is contained in:
parent
06a9c43c7f
commit
e75f984007
|
@ -25,7 +25,7 @@ public interface LauncherConstant {
|
|||
* 39.103.203.80(公网)
|
||||
* 172.29.144.23(私网)
|
||||
*/
|
||||
String NACOS_DEV_ADDR = "8.142.41.215:8848";
|
||||
String NACOS_DEV_ADDR = "192.168.31.16:8848";
|
||||
|
||||
/**
|
||||
* nacos prod 地址
|
||||
|
|
|
@ -204,6 +204,18 @@ public class RemoteSensingSourceData implements Serializable {
|
|||
@TableField(exist = false)
|
||||
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;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
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) {
|
||||
return R.data(centerDisasterInfoService.page(Condition.getPage(query), Wrappers.<CenterDisasterInfo>lambdaQuery()
|
||||
.eq(CenterDisasterInfo::getRespondStatus,2)
|
||||
.eq(CenterDisasterInfo::getStatus,1)
|
||||
.eq(CenterDisasterInfo::getEmail,String.valueOf(params.get("email")))
|
||||
.orderByDesc(CenterDisasterInfo::getApplyTime)
|
||||
));
|
||||
|
|
|
@ -72,5 +72,15 @@ public class EntityDataController {
|
|||
public R updateEntityData(@RequestBody EntityData 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() {
|
||||
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>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
di.id
|
||||
di
|
||||
.
|
||||
id
|
||||
,di.disaster_type,di.disaster_keyword,
|
||||
di.disaster_time,di.upload_time,di.geometry,
|
||||
di.disaster_level,di.disaster_country,di.respond_status,
|
||||
|
@ -37,14 +39,17 @@
|
|||
</sql>
|
||||
|
||||
<sql id="Home_Disaster_Info">
|
||||
d.disaster_type
|
||||
d
|
||||
.
|
||||
disaster_type
|
||||
,d.disaster_time,d.disaster_country,
|
||||
m.organization
|
||||
</sql>
|
||||
|
||||
<insert id="saveUserData">
|
||||
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>
|
||||
|
||||
<update id="updataUserByEmail">
|
||||
|
@ -128,16 +133,13 @@
|
|||
</select>
|
||||
|
||||
<select id="getLeft4Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||
SELECT
|
||||
g.username AS `name`,
|
||||
SELECT g.username AS `name`,
|
||||
count(*) AS cnt,
|
||||
'sponsorOrganization' AS `type`
|
||||
FROM
|
||||
disaster_info t
|
||||
FROM disaster_info t
|
||||
INNER JOIN guest_manage_disaster_ref gm ON gm.disaster_id = t.id
|
||||
INNER JOIN guest_info g ON g.id = gm.sponsor_id
|
||||
WHERE
|
||||
gm.`status` != 2
|
||||
WHERE gm.`status` != 2
|
||||
GROUP BY
|
||||
gm.sponsor_id
|
||||
ORDER BY
|
||||
|
@ -166,7 +168,7 @@
|
|||
INNER JOIN
|
||||
(select t.disaster_country as name, count(*) as cnt, 'country' as `type`
|
||||
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
|
||||
</select>
|
||||
|
||||
|
@ -269,105 +271,192 @@
|
|||
GROUP BY date
|
||||
</select>
|
||||
<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 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
|
||||
where date_format(t.disaster_time,'%Y') = #{year} GROUP BY d.dict_value
|
||||
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
|
||||
where date_format(t.disaster_time, '%Y') = #{year}
|
||||
GROUP BY d.dict_value
|
||||
</select>
|
||||
<select id="initiateAndResponseData" resultType="java.util.Map">
|
||||
select d.`key`, sum(d.response) as response, SUM(d.initiate) as initiate from (
|
||||
SELECT CONCAT(#{year},'-01' ) as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-01')
|
||||
select d.`key`, sum(d.response) as response, SUM(d.initiate) as initiate
|
||||
from (
|
||||
SELECT CONCAT(#{year}, '-01') as `key`, 0 as response, 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`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-02')
|
||||
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}, '-02')
|
||||
union ALL
|
||||
SELECT CONCAT(#{year},'-03' ) as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-03')
|
||||
SELECT CONCAT(#{year}, '-03') as `key`, 0 as response, 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`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-04' )
|
||||
SELECT CONCAT(#{year}, '-04') as `key`, 0 as response, 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`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-05' )
|
||||
SELECT CONCAT(#{year}, '-05') as `key`, 0 as response, 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`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-06')
|
||||
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}, '-06')
|
||||
union ALL
|
||||
SELECT CONCAT(#{year},'-07') as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-07')
|
||||
SELECT CONCAT(#{year}, '-07') as `key`, 0 as response, 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`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-08')
|
||||
SELECT CONCAT(#{year}, '-08') as `key`, 0 as response, 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`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-09')
|
||||
SELECT CONCAT(#{year}, '-09') as `key`, 0 as response, 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` , 0 as response,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-10')
|
||||
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}, '-10')
|
||||
union ALL
|
||||
SELECT CONCAT(#{year},'-11') as `key`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-11')
|
||||
SELECT CONCAT(#{year}, '-11') as `key`, 0 as response, 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`, 0 as response ,count(1) as initiate FROM disaster_info t
|
||||
where date_format(t.disaster_time,'%Y-%m') = CONCAT(#{year},'-12')
|
||||
SELECT CONCAT(#{year}, '-12') as `key`, 0 as response, count(1) as initiate
|
||||
FROM disaster_info t
|
||||
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-12')
|
||||
union ALL
|
||||
|
||||
|
||||
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')
|
||||
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')
|
||||
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')
|
||||
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')
|
||||
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')
|
||||
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')
|
||||
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')
|
||||
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')
|
||||
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')
|
||||
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')
|
||||
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')
|
||||
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}, '-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 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
|
||||
where date_format(t.disaster_time,'%Y') = #{year} and b.`name` != "超级管理员" GROUP BY b.`name` ORDER BY val desc limit 10
|
||||
SELECT b.`name`, count(*) as val
|
||||
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 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
|
||||
where date_format(d.disaster_time,'%Y') = #{year} and b.role_id = '1123598816738675204' GROUP BY b.`name` ORDER BY val desc limit 10
|
||||
select d.`key` AS 'name', SUM(d.initiate) as val
|
||||
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 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
|
||||
where date_format(t.disaster_time,'%Y') = #{year} GROUP BY d.dict_value
|
||||
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
|
||||
where date_format(t.disaster_time, '%Y') = #{year}
|
||||
GROUP BY d.dict_value
|
||||
</select>
|
||||
|
||||
<select id="getByUserIdRole" resultType="com.kening.vordm.vo.CallForHelpVo">
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.kening.vordm.vo.UserTenantVo;
|
|||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author G1393
|
||||
|
@ -23,4 +24,5 @@ public interface EntityDataMapper extends BaseMapper<EntityData> {
|
|||
|
||||
List<UserTenantVo> getEntityDataSourceOrganization(@Param("disasterId") Long disasterId);
|
||||
|
||||
List<Map<String, Long>> getStatisticsByUserId(@Param("id") Long id,@Param("year") String year);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,10 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
ed.id,ed.title,ed.size,
|
||||
ed
|
||||
.
|
||||
id
|
||||
,ed.title,ed.size,
|
||||
ed.type,ed.link,ed.remark,
|
||||
ed.upload_time,ed.disaster_id,ed.visual_flag,
|
||||
ed.visual_lon,ed.visual_lat,
|
||||
|
@ -49,6 +52,9 @@
|
|||
<if test="entityData.disasterId != null and entityData.disasterId != ''">
|
||||
ed.disaster_id = #{entityData.disasterId}
|
||||
</if>
|
||||
<if test="entityData.status != null and entityData.status != ''">
|
||||
and ed.status = #{entityData.status}
|
||||
</if>
|
||||
<if test="entityData.type != null and entityData.type != ''">
|
||||
and ed.type = #{entityData.type}
|
||||
</if>
|
||||
|
@ -59,7 +65,7 @@
|
|||
and ed.title = concat('%',#{entityData.title},'%')
|
||||
</if>
|
||||
AND ed.is_deleted = 0
|
||||
and ed.status = 1
|
||||
-- and ed.status = 1
|
||||
</where>
|
||||
ORDER BY ed.upload_time DESC
|
||||
</select>
|
||||
|
@ -74,4 +80,169 @@
|
|||
</where>
|
||||
GROUP BY ed.source_organization
|
||||
</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>
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.kening.vordm.vo.GroupByUse;
|
|||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByCondition(@Param("remoteSensingSourceData") RemoteSensingSourceData remoteSensingSourceData, IPage<Object> page);
|
||||
|
||||
List<Map<String, Long>> getStatisticsByUserId(@Param("id") Long id,@Param("year") String year);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,thumbnail_link,product_level,
|
||||
id
|
||||
,thumbnail_link,product_level,
|
||||
product_serial_num,product_time,product_bands_num,
|
||||
product_resolution,raw_data_stripe_num,cloud_cover,
|
||||
product_size,project_band_num,coverage_area,
|
||||
|
@ -53,16 +54,13 @@
|
|||
</sql>
|
||||
|
||||
<select id="getRemoteSensingSourceData" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
r.*,
|
||||
SELECT r.*,
|
||||
d.disaster_type,
|
||||
d.disaster_country,
|
||||
d.disaster_time
|
||||
FROM
|
||||
remote_sensing_source_data AS r,
|
||||
FROM remote_sensing_source_data AS r,
|
||||
disaster_info AS d
|
||||
WHERE
|
||||
d.id = r.disaster_id
|
||||
WHERE d.id = r.disaster_id
|
||||
AND d.disaster_type = #{disasterType}
|
||||
AND d.disaster_country = #{disasterCountry}
|
||||
AND d.disaster_time = #{disasterTime}
|
||||
|
@ -80,7 +78,8 @@
|
|||
and r.status = #{remoteSensingSourceData.status}
|
||||
</if>
|
||||
<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 test="remoteSensingSourceData.productResolutionMax == null and remoteSensingSourceData.productResolutionMin != null">
|
||||
and r.product_resolution > #{remoteSensingSourceData.productResolutionMin}
|
||||
|
@ -91,6 +90,12 @@
|
|||
open="(" separator="," close=")">#{AList}
|
||||
</foreach>
|
||||
</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">
|
||||
and r.product_time >= (select
|
||||
disaster_time
|
||||
|
@ -104,4 +109,83 @@
|
|||
</where>
|
||||
</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>
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
import com.kening.vordm.entity.Tool;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author G1393
|
||||
|
@ -18,4 +19,6 @@ public interface ToolMapper extends BaseMapper<Tool> {
|
|||
List<Tool> toolRanking();
|
||||
|
||||
Integer selectCountShowName();
|
||||
|
||||
List<Map<String, Long>> getStatisticsByUserId(Long id, String year);
|
||||
}
|
||||
|
|
|
@ -44,4 +44,71 @@
|
|||
group by show_name
|
||||
) t
|
||||
</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>
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.kening.vordm.vo.UserTenantVo;
|
|||
import org.springblade.core.tool.api.R;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author G1393
|
||||
|
@ -30,4 +31,11 @@ public interface EntityDataService extends IService<EntityData> {
|
|||
* @return
|
||||
*/
|
||||
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 java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author G1393
|
||||
|
@ -16,4 +17,6 @@ public interface ToolService extends IService<Tool> {
|
|||
List<Tool> toolRanking();
|
||||
|
||||
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);
|
||||
//统计admin
|
||||
List<Map<String,Long>> adminfMap = this.baseMapper.adminData(year);
|
||||
|
||||
|
||||
//统计当年的灾害响应次数 按月查询
|
||||
//List<Map<String,Object>> responseMonth = getDisasterReponseByMouth(2,isAdmin);
|
||||
resultMap.put("header",headMap);
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.kening.vordm.vo.EntityDataUserVo;
|
|||
import com.kening.vordm.vo.UserTenantVo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.hssf.record.DVALRecord;
|
||||
import org.springblade.common.cache.CacheNames;
|
||||
import org.springblade.core.oss.MinioTemplate;
|
||||
import org.springblade.core.oss.model.BladeFile;
|
||||
|
@ -31,6 +32,7 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @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.setDisasterId(disasterId);
|
||||
news.setType(typeData);
|
||||
news.setStatus(1);
|
||||
news.setStatus(0);
|
||||
this.baseMapper.insert(news);
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsMapper, News>
|
|||
|
||||
}
|
||||
socialMedia.setTopic(topic);
|
||||
socialMedia.setStatus(1);
|
||||
socialMedia.setStatus(0);
|
||||
socialMediaMapper.insert(socialMedia);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,6 +69,10 @@ public class RemoteSensingSourceDataServiceImpl extends ServiceImpl<RemoteSensin
|
|||
result = Arrays.asList(satelliteCodeList.split(","));
|
||||
remoteSensingSourceData.setSatelliteCodeListNew(result);
|
||||
}
|
||||
if (remoteSensingSourceData.getStatusListNew() != null) {
|
||||
result = Arrays.asList(remoteSensingSourceData.getStatusListNew().split(","));
|
||||
remoteSensingSourceData.setStatusList(result);
|
||||
}
|
||||
IPage<RemoteSensingSourceData> remoteSensingSourceDataByCondition = new Page<>();
|
||||
|
||||
if (productResolutionVos != null && !productResolutionVos.isEmpty()) {
|
||||
|
|
|
@ -56,4 +56,9 @@ implements ToolService {
|
|||
map.put("toolVisitsByUserTop10",toolVisitsByUser);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Long>> getStatisticsByUserId(Long id, String year) {
|
||||
return baseMapper.getStatisticsByUserId(id,year);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue