Merge remote-tracking branch 'origin/master'

This commit is contained in:
李宇辰 2023-04-27 16:06:30 +08:00
commit 1e9dd8cda1
18 changed files with 116 additions and 30 deletions

View File

@ -71,4 +71,8 @@ public class CrawlInfo implements Serializable {
@TableField(exist = false)
private static final long serialVersionUID = 1L;
private String startDate;
private String endDate;
}

View File

@ -23,4 +23,8 @@ public class DataUpload extends EntityData{
private Date disasterTime;
private Long disasterId;
private String vordmId;
private String geometry;
}

View File

@ -107,6 +107,10 @@ public class EntityData implements Serializable {
*/
private Integer isDeleted;
/**
* 是否发布0未发布/1已发布
*/
private Integer isPublish;
/**
* 上传人姓名
@ -132,6 +136,12 @@ public class EntityData implements Serializable {
@TableField(exist = false)
private String msName;
/**
* 灾害区域地理字段
*/
@TableField(exist = false)
private String geometry;
@TableField(exist = false)
private static final long serialVersionUID = 1L;

View File

@ -76,10 +76,6 @@ public class Hotspot implements Serializable {
@ExcelIgnore
private Date reviewTime;
/**
* 是否删除 0未删除 1已删除
*/
private Integer isDeleted;
@ExcelIgnore
@TableField(exist = false)

View File

@ -18,9 +18,13 @@ public class OtherData{
private String type;
private String title;
private String remark;
private Long disasterId;
private Integer visualFlag;
private String sourceOrganization;
}

View File

@ -72,4 +72,7 @@ public class CallForHelpVo extends DisasterInfo {
* 受灾国家
*/
private String vordmId;
private Date reviewTime;
}

View File

@ -33,7 +33,6 @@ public class AdminManagerController {
*/
@GetMapping("/pages")
public R pages(Query query, @RequestParam Map<String,Object> params){
return R.data(guestManageDisasterRefService.queryPage(Condition.getPage(query),params));
}

View File

@ -61,5 +61,16 @@ public class EntityDataController {
entityData.setReviewTime(new Date());
return R.data(entityDataService.updateById(entityData));
}
/**
* 修改实体数据
* @param entityData
* @return
*/
@PostMapping("/updateEntityData")
public R updateEntityData(@RequestBody EntityData entityData) {
return R.data(entityDataService.updateById(entityData));
}
}

View File

@ -0,0 +1,35 @@
package com.kening.vordm.controller;
import com.kening.vordm.entity.MapServer;
import com.kening.vordm.service.MapServerService;
import com.kening.vordm.vo.UserVo;
import lombok.RequiredArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequiredArgsConstructor
@RequestMapping("/ui/mapServer")
public class MapServerController {
//邮箱发送服务
private final MapServerService mapServerService;
/**
* 新增基础地理数据
*
* @param mapServer
* @return
*/
// @PostMapping("/saveMapServer")
// public R saveMapServer(@RequestBody MapServer mapServer) {
// return mapServerService.saveMapServer(mapServer);
// }
}

View File

@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@ -31,6 +32,7 @@ public class WordCloudsController {
*/
@GetMapping("/wordCount")
public R<Map<String,List<WorldCharts>>> wordCount(@RequestParam Long disasterId){
return R.data(service.wordCount(disasterId));
Map<String, List<WorldCharts>> stringListMap = service.wordCount(disasterId);
return R.data(stringListMap);
}
}

View File

@ -21,6 +21,7 @@
di.disaster_keyword,
bdb.dict_value as disasterType,
di.id as disasterId,
di.vordm_id AS vordmId,
di.disaster_time as disasterTime,
di.disaster_country as disasterCountry
from entity_data ed
@ -28,6 +29,7 @@
left join disaster_info di on di.id = ed.disaster_id
left join blade_dict_biz bdb on di.disaster_type = dict_key
where ed.disaster_id is not null
AND di.disaster_keyword IS NOT NUll
group by di.id,bdb.dict_value
</select>

View File

@ -182,7 +182,7 @@
u.email,
u.research_field,
u.organization,
d.id,
d.id AS disasterId,
d.disaster_type,
d.disaster_time,
d.disaster_keyword,
@ -191,6 +191,7 @@
d.upload_time,
d.geometry,
d.respond_status,
ud.review_time AS reviewTime,
bdb.dict_value as dictValue
From
guest_manage_disaster_ref ud join
@ -369,7 +370,7 @@
</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 = '1123598816738675202' GROUP BY b.`name` ORDER BY val desc limit 10
where date_format(d.disaster_time,'%Y') = #{year} and b.role_id = '1123598816738675204' GROUP BY b.`name` ORDER BY val desc limit 10
</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

View File

@ -21,6 +21,9 @@
<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">
@ -29,19 +32,19 @@
ed.upload_time,ed.disaster_id,ed.visual_flag,
ed.visual_lon,ed.visual_lat,
ed.status,ed.uploader_id,ed.manager_id,
ed.review_time, ed.source_organization
ed.review_time, ed.source_organization,
ed.upload_type, ed.is_deleted, ed.is_publish
</sql>
<select id="getEntityDataList" resultType="com.kening.vordm.entity.EntityData">
select
<include refid="Base_Column_List"/>,
gi.username AS uploaderName,
ms.layer_name,
ms.vordm_id,
ms.name AS msName
di.vordm_id,
di.geometry
from entity_data ed
left join guest_info gi on gi.id = ed.uploader_id
left join map_server ms on ms.disaster_id = ed.disaster_id
LEFT JOIN disaster_info di on di.id = ed.disaster_id
<where>
<if test="entityData.disasterId != null and entityData.disasterId != ''">
ed.disaster_id = #{entityData.disasterId}

View File

@ -19,10 +19,12 @@
<select id="queryDisasterPage" resultType="com.kening.vordm.entity.DataUpload">
select
di.disaster_keyword,
di.vordm_id,
bdb.dict_value as disasterType,
di.id as disasterId,
di.disaster_time as disasterTime,
di.disaster_country as disasterCountry
di.disaster_country as disasterCountry,
di.geometry
from disaster_info di
left join blade_dict_biz bdb on di.disaster_type = dict_key
</select>
@ -35,7 +37,7 @@
ed.visual_lon,ed.visual_lat,
ed.status,ed.uploader_id,ed.manager_id,
ed.review_time, ed.source_organization,
ed.upload_type,
ed.upload_type, ed.is_publish,
bu.name as uploaderName
from entity_data ed
left join blade_user bu on bu.id = ed.uploader_id

View File

@ -21,6 +21,7 @@
di.disaster_keyword,
bdb.dict_value as disasterType,
di.id as disasterId,
di.vordm_id,
di.disaster_time as disasterTime,
di.disaster_country as disasterCountry
from disaster_info di

View File

@ -24,7 +24,7 @@
</sql>
<select id="wordCount" resultType="com.kening.vordm.entity.WorldCharts" parameterType="java.lang.Long">
select
DATE_FORMAT(create_time,'%Y-%m-%d') date,
date,
frequency value,
word name,
type
@ -35,5 +35,6 @@
and disaster_id = #{disasterId}
</if>
</where>
ORDER BY date DESC
</select>
</mapper>

View File

@ -102,12 +102,14 @@ public class OtherDataServiceImpl extends ServiceImpl<OtherDataMapper, EntityDat
entityData.setDisasterId(OtherData.getDisasterId());
entityData.setUploadTime(new Date());
entityData.setRemark(OtherData.getRemark());
entityData.setTitle(OtherData.getTitle());
entityData.setStatus(1);
entityData.setUploadType(2);
entityData.setUploaderId(AuthUtil.getUserId());
entityData.setManagerId(AuthUtil.getUserId());
entityData.setReviewTime(new Date());
entityData.setVisualFlag(OtherData.getVisualFlag());
entityData.setSourceOrganization(OtherData.getSourceOrganization());
return save(entityData);
}
}

View File

@ -33,6 +33,7 @@ implements PictureInfoService {
/**
* 修改图片信息
*
* @param pictureInfo
* @return
*/
@ -52,6 +53,7 @@ implements PictureInfoService {
/**
* 上传图片
*
* @param otherData
* @return
*/
@ -64,7 +66,11 @@ implements PictureInfoService {
PictureInfo pictureInfo = new PictureInfo();
pictureInfo.setLink(bladeFile.getLink());
pictureInfo.setDisasterId(otherData.getDisasterId());
pictureInfo.setName(bladeFile.getOriginalName());
if (otherData.getTitle() != null) {
pictureInfo.setName(otherData.getTitle());
} else {
pictureInfo.setName(bladeFile.getName());
}
pictureInfo.setSize(multipartFile.getSize());
pictureInfo.setType(multipartFile.getOriginalFilename().substring(multipartFile.getOriginalFilename().indexOf(".") + 1));
pictureInfo.setIsMain(otherData.getIsMain());