Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1e9dd8cda1
|
@ -71,4 +71,8 @@ public class CrawlInfo implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String startDate;
|
||||
private String endDate;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -23,4 +23,8 @@ public class DataUpload extends EntityData{
|
|||
private Date disasterTime;
|
||||
|
||||
private Long disasterId;
|
||||
|
||||
private String vordmId;
|
||||
|
||||
private String geometry;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -76,10 +76,6 @@ public class Hotspot implements Serializable {
|
|||
@ExcelIgnore
|
||||
private Date reviewTime;
|
||||
|
||||
/**
|
||||
* 是否删除 0未删除 1已删除
|
||||
*/
|
||||
private Integer isDeleted;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -72,4 +72,7 @@ public class CallForHelpVo extends DisasterInfo {
|
|||
* 受灾国家
|
||||
*/
|
||||
private String vordmId;
|
||||
|
||||
|
||||
private Date reviewTime;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,13 +21,15 @@
|
|||
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
|
||||
left join blade_user bu on bu.id = ed.uploader_id
|
||||
left join disaster_info di on di.id = ed.disaster_id
|
||||
left join blade_dict_biz bdb on di.disaster_type = dict_key
|
||||
left join blade_user bu on bu.id = ed.uploader_id
|
||||
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>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
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 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}
|
||||
|
|
|
@ -19,12 +19,14 @@
|
|||
<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
|
||||
left join blade_dict_biz bdb on di.disaster_type = dict_key
|
||||
</select>
|
||||
|
||||
<select id="queryPage" resultType="com.kening.vordm.entity.DataUpload">
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,15 +16,15 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author G1393
|
||||
* @description 针对表【picture_info(照片存储表)】的数据库操作Service实现
|
||||
* @createDate 2023-04-04 15:54:31
|
||||
*/
|
||||
* @author G1393
|
||||
* @description 针对表【picture_info(照片存储表)】的数据库操作Service实现
|
||||
* @createDate 2023-04-04 15:54:31
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class PictureInfoServiceImpl extends ServiceImpl<PictureInfoMapper, PictureInfo>
|
||||
implements PictureInfoService {
|
||||
implements PictureInfoService {
|
||||
|
||||
/**
|
||||
* 对象存储模块
|
||||
|
@ -33,6 +33,7 @@ implements PictureInfoService {
|
|||
|
||||
/**
|
||||
* 修改图片信息
|
||||
*
|
||||
* @param pictureInfo
|
||||
* @return
|
||||
*/
|
||||
|
@ -44,7 +45,7 @@ implements PictureInfoService {
|
|||
picture.setLink(bladeFile.getLink());
|
||||
picture.setName(bladeFile.getOriginalName());
|
||||
picture.setSize(multipartFile.getSize());
|
||||
picture.setType(multipartFile.getOriginalFilename().substring(multipartFile.getOriginalFilename().indexOf(".")+1));
|
||||
picture.setType(multipartFile.getOriginalFilename().substring(multipartFile.getOriginalFilename().indexOf(".") + 1));
|
||||
picture.setIsMain(pictureInfo.getIsMain());
|
||||
picture.setId(pictureInfo.getId());
|
||||
return updateById(picture);
|
||||
|
@ -52,21 +53,26 @@ implements PictureInfoService {
|
|||
|
||||
/**
|
||||
* 上传图片
|
||||
*
|
||||
* @param otherData
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean uploadData(OtherData otherData) {
|
||||
log.info("上传数据:{}",otherData);
|
||||
log.info("上传数据:{}", otherData);
|
||||
List<PictureInfo> pictureInfoList = new ArrayList<>();
|
||||
for (MultipartFile multipartFile : otherData.getFile()) {
|
||||
BladeFile bladeFile = minioTemplate.putFile(multipartFile);
|
||||
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.setType(multipartFile.getOriginalFilename().substring(multipartFile.getOriginalFilename().indexOf(".") + 1));
|
||||
pictureInfo.setIsMain(otherData.getIsMain());
|
||||
pictureInfoList.add(pictureInfo);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue