glj-代码提交

This commit is contained in:
glj 2023-11-14 14:07:16 +08:00
parent 06a9c43c7f
commit e75f984007
21 changed files with 718 additions and 182 deletions

View File

@ -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 地址

View File

@ -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;
/**
* 卫星类型集合

View File

@ -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;
}

View File

@ -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;
/**
*

View File

@ -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)
));

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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`,
count(*) AS cnt,
'sponsorOrganization' AS `type`
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
SELECT g.username AS `name`,
count(*) AS cnt,
'sponsorOrganization' AS `type`
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
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,114 +271,201 @@
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')
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')
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')
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' )
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' )
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')
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')
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')
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')
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')
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')
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')
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')
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 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')
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')
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')
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')
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')
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')
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')
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')
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')
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')
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')
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')
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 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">
SELECT br.role_alias AS roleAlias,
br.id AS roleId,
br.parent_id AS parentId,
br.role_name AS roleName
SELECT br.role_alias AS roleAlias,
br.id AS roleId,
br.parent_id AS parentId,
br.role_name AS roleName
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}
</select>

View File

@ -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);
}

View File

@ -1,33 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.kening.vordm.mapper.EntityDataMapper">
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.EntityData">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="title" column="title" jdbcType="VARCHAR"/>
<result property="size" column="size" jdbcType="BIGINT"/>
<result property="type" column="type" jdbcType="VARCHAR"/>
<result property="link" column="link" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="uploadTime" column="upload_time" jdbcType="TIMESTAMP"/>
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
<result property="visualFlag" column="visual_flag" jdbcType="INTEGER"/>
<result property="visualLon" column="visual_lon" jdbcType="DOUBLE"/>
<result property="visualLat" column="visual_lat" jdbcType="DOUBLE"/>
<result property="status" column="status" jdbcType="INTEGER"/>
<result property="uploaderId" column="uploader_id" jdbcType="BIGINT"/>
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
<result property="reviewTime" column="review_time" jdbcType="TIMESTAMP"/>
<result property="sourceOrganization" column="source_organization" jdbcType="TIMESTAMP"/>
<result property="uploadType" column="upload_type" jdbcType="INTEGER"/>
<result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/>
<result property="isPublish" column="is_publish" jdbcType="INTEGER"/>
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="title" column="title" jdbcType="VARCHAR"/>
<result property="size" column="size" jdbcType="BIGINT"/>
<result property="type" column="type" jdbcType="VARCHAR"/>
<result property="link" column="link" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="uploadTime" column="upload_time" jdbcType="TIMESTAMP"/>
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
<result property="visualFlag" column="visual_flag" jdbcType="INTEGER"/>
<result property="visualLon" column="visual_lon" jdbcType="DOUBLE"/>
<result property="visualLat" column="visual_lat" jdbcType="DOUBLE"/>
<result property="status" column="status" jdbcType="INTEGER"/>
<result property="uploaderId" column="uploader_id" jdbcType="BIGINT"/>
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
<result property="reviewTime" column="review_time" jdbcType="TIMESTAMP"/>
<result property="sourceOrganization" column="source_organization" jdbcType="TIMESTAMP"/>
<result property="uploadType" column="upload_type" jdbcType="INTEGER"/>
<result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/>
<result property="isPublish" column="is_publish" jdbcType="INTEGER"/>
</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,
@ -39,9 +42,9 @@
<select id="getEntityDataList" resultType="com.kening.vordm.entity.EntityData">
select
<include refid="Base_Column_List"/>,
gi.username AS uploaderName,
di.vordm_id,
di.geometry
gi.username AS uploaderName,
di.vordm_id,
di.geometry
from entity_data ed
left join guest_info gi on gi.id = ed.uploader_id
LEFT JOIN disaster_info di on di.id = ed.disaster_id
@ -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>

View File

@ -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);
}

View File

@ -1,47 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.kening.vordm.mapper.RemoteSensingSourceDataMapper">
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.RemoteSensingSourceData">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="thumbnailLink" column="thumbnail_link" jdbcType="VARCHAR"/>
<result property="productLevel" column="product_level" jdbcType="VARCHAR"/>
<result property="productSerialNum" column="product_serial_num" jdbcType="VARCHAR"/>
<result property="productTime" column="product_time" jdbcType="TIMESTAMP"/>
<result property="productBandsNum" column="product_bands_num" jdbcType="INTEGER"/>
<result property="productResolution" column="product_resolution" jdbcType="DOUBLE"/>
<result property="rawDataStripeNum" column="raw_data_stripe_num" jdbcType="INTEGER"/>
<result property="cloudCover" column="cloud_cover" jdbcType="INTEGER"/>
<result property="productSize" column="product_size" jdbcType="INTEGER"/>
<result property="projectBandNum" column="project_band_num" jdbcType="INTEGER"/>
<result property="coverageArea" column="coverage_area" jdbcType="VARCHAR"/>
<result property="satelliteCode" column="satellite_code" jdbcType="VARCHAR"/>
<result property="receivingTime" column="receiving_time" jdbcType="TIMESTAMP"/>
<result property="upperLeftLat" column="upper_left_lat" jdbcType="DOUBLE"/>
<result property="upperLeftLon" column="upper_left_lon" jdbcType="DOUBLE"/>
<result property="upperRightLat" column="upper_right_lat" jdbcType="DOUBLE"/>
<result property="upperRightLon" column="upper_right_lon" jdbcType="DOUBLE"/>
<result property="viewCenterLat" column="view_center_lat" jdbcType="DOUBLE"/>
<result property="viewCenterLon" column="view_center_lon" jdbcType="DOUBLE"/>
<result property="lowerRightLat" column="lower_right_lat" jdbcType="DOUBLE"/>
<result property="lowerRightLon" column="lower_right_lon" jdbcType="DOUBLE"/>
<result property="lowerLeftLat" column="lower_left_lat" jdbcType="DOUBLE"/>
<result property="lowerLeftLon" column="lower_left_lon" jdbcType="DOUBLE"/>
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="downloadUrl" column="download_url" jdbcType="VARCHAR"/>
<result property="sourceOrganization" column="source_organization" jdbcType="VARCHAR"/>
<result property="satelliteType" column="satellite_type" jdbcType="INTEGER"/>
<result property="status" column="status" jdbcType="INTEGER"/>
<result property="uploadId" column="upload_id" jdbcType="INTEGER"/>
<result property="satelliteTypeSelect" column="satellite_type_select" jdbcType="INTEGER"/>
<result property="pictureName" column="picture_name" jdbcType="VARCHAR"/>
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="thumbnailLink" column="thumbnail_link" jdbcType="VARCHAR"/>
<result property="productLevel" column="product_level" jdbcType="VARCHAR"/>
<result property="productSerialNum" column="product_serial_num" jdbcType="VARCHAR"/>
<result property="productTime" column="product_time" jdbcType="TIMESTAMP"/>
<result property="productBandsNum" column="product_bands_num" jdbcType="INTEGER"/>
<result property="productResolution" column="product_resolution" jdbcType="DOUBLE"/>
<result property="rawDataStripeNum" column="raw_data_stripe_num" jdbcType="INTEGER"/>
<result property="cloudCover" column="cloud_cover" jdbcType="INTEGER"/>
<result property="productSize" column="product_size" jdbcType="INTEGER"/>
<result property="projectBandNum" column="project_band_num" jdbcType="INTEGER"/>
<result property="coverageArea" column="coverage_area" jdbcType="VARCHAR"/>
<result property="satelliteCode" column="satellite_code" jdbcType="VARCHAR"/>
<result property="receivingTime" column="receiving_time" jdbcType="TIMESTAMP"/>
<result property="upperLeftLat" column="upper_left_lat" jdbcType="DOUBLE"/>
<result property="upperLeftLon" column="upper_left_lon" jdbcType="DOUBLE"/>
<result property="upperRightLat" column="upper_right_lat" jdbcType="DOUBLE"/>
<result property="upperRightLon" column="upper_right_lon" jdbcType="DOUBLE"/>
<result property="viewCenterLat" column="view_center_lat" jdbcType="DOUBLE"/>
<result property="viewCenterLon" column="view_center_lon" jdbcType="DOUBLE"/>
<result property="lowerRightLat" column="lower_right_lat" jdbcType="DOUBLE"/>
<result property="lowerRightLon" column="lower_right_lon" jdbcType="DOUBLE"/>
<result property="lowerLeftLat" column="lower_left_lat" jdbcType="DOUBLE"/>
<result property="lowerLeftLon" column="lower_left_lon" jdbcType="DOUBLE"/>
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="downloadUrl" column="download_url" jdbcType="VARCHAR"/>
<result property="sourceOrganization" column="source_organization" jdbcType="VARCHAR"/>
<result property="satelliteType" column="satellite_type" jdbcType="INTEGER"/>
<result property="status" column="status" jdbcType="INTEGER"/>
<result property="uploadId" column="upload_id" jdbcType="INTEGER"/>
<result property="satelliteTypeSelect" column="satellite_type_select" jdbcType="INTEGER"/>
<result property="pictureName" column="picture_name" jdbcType="VARCHAR"/>
</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.*,
d.disaster_type,
d.disaster_country,
d.disaster_time
FROM
remote_sensing_source_data AS r,
disaster_info AS d
WHERE
d.id = r.disaster_id
SELECT r.*,
d.disaster_type,
d.disaster_country,
d.disaster_time
FROM remote_sensing_source_data AS r,
disaster_info AS d
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 &gt;= #{remoteSensingSourceData.productResolutionMin} and r.product_resolution &lt; #{remoteSensingSourceData.productResolutionMax}
and r.product_resolution &gt;= #{remoteSensingSourceData.productResolutionMin} and r.product_resolution
&lt; #{remoteSensingSourceData.productResolutionMax}
</if>
<if test="remoteSensingSourceData.productResolutionMax == null and remoteSensingSourceData.productResolutionMin != null">
and r.product_resolution &gt; #{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 &gt;= (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>

View File

@ -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);
}

View File

@ -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>

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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()) {

View File

@ -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);
}
}