This commit is contained in:
why 2023-04-26 10:48:58 +08:00
commit d14e10d936
25 changed files with 213 additions and 49 deletions

View File

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

View File

@ -107,6 +107,10 @@ public class EntityData implements Serializable {
*/
private Integer isDeleted;
/**
* 是否发布0未发布/1已发布
*/
private Integer isPublish;
/**
* 上传人姓名

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,6 +18,8 @@ public class OtherData{
private String type;
private String title;
private String remark;
private Long disasterId;

View File

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

View File

@ -11,6 +11,6 @@ import org.springframework.cloud.client.SpringCloudApplication;
@SpringCloudApplication
public class VoRdmApplication {
public static void main(String[] args) {
BladeApplication.run("gljNew-"+CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
BladeApplication.run(CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
}
}

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

@ -28,6 +28,7 @@ public class RemoteSensingSourceDataController {
/**
* 根据页码和灾害信息查出遥感影像源数据可多个灾害
*
* @param disasterInfo
* @param query
* @return
@ -43,6 +44,7 @@ public class RemoteSensingSourceDataController {
/**
* 实体数据列表信息
*
* @param optionsJson 实体数据条件信息
* @param query current当前页 size 每页数据量
* @return
@ -58,12 +60,15 @@ public class RemoteSensingSourceDataController {
/**
* 实体数据列表信息
* @param params
*
* @param disasterId
* @param query
* @return
*/
@GetMapping("/PagesData")
public R<IPage<RemoteSensingSourceData>> Pages(@RequestParam Map<String,Object> params, Query query){
return R.data(remoteSensingSourceDataService.page(Condition.getPage(query),Condition.getQueryWrapper(params,RemoteSensingSourceData.class)));
public R<IPage<RemoteSensingSourceData>> pages(Query query, String disasterId) {
QueryWrapper<RemoteSensingSourceData> qw = new QueryWrapper<>();
qw.eq("disaster_id", disasterId);
return R.data(remoteSensingSourceDataService.page(Condition.getPage(query), qw));
}
}

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

@ -37,9 +37,7 @@
</sql>
<sql id="Home_Disaster_Info">
d
.
disaster_type
d.disaster_type
,d.disaster_time,d.disaster_country,
m.organization
</sql>
@ -130,15 +128,18 @@
</select>
<select id="getLeft4Data" resultType="com.kening.vordm.vo.GroupByUse">
SELECT bu.name AS `name`,
SELECT
g.username AS `name`,
count(*) AS cnt,
'responseOrganization' AS `type`
FROM guest_manage_disaster_ref t
INNER JOIN blade_user bu ON bu.id = t.manager_id
WHERE bu.name != ''
AND t.`status` = '1'
'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
bu.name
gm.sponsor_id
ORDER BY
cnt DESC
LIMIT 5
@ -173,6 +174,7 @@
SELECT
d.chief_id,
d.chief_name,
d.vordm_id,
u.username ,
u.last_name AS lastName,
u.first_name AS firstName,
@ -189,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
@ -214,7 +217,10 @@
and d.chief_id = #{callForHelpVo.chiefIdEquals}
</if>
<if test="callForHelpVo.disasterType != null and callForHelpVo.disasterType != ''">
and bdb.dict_value like concat('%', #{callForHelpVo.disasterType},'%')
and d.disaster_type = #{callForHelpVo.disasterType}
</if>
<if test="callForHelpVo.disasterCountry != null and callForHelpVo.disasterCountry != ''">
and d.disaster_country like concat('%', #{callForHelpVo.disasterCountry},'%')
</if>
</where>
order by d.upload_time desc

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,7 +32,8 @@
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">
@ -40,8 +44,8 @@
ms.vordm_id,
ms.name AS msName
from entity_data ed
inner join guest_info gi on gi.id = ed.uploader_id
inner join map_server ms on ms.disaster_id = ed.disaster_id
left join guest_info gi on gi.id = ed.uploader_id
left join map_server ms on ms.disaster_id = ed.disaster_id
<where>
<if test="entityData.disasterId != null and entityData.disasterId != ''">
ed.disaster_id = #{entityData.disasterId}

View File

@ -26,8 +26,8 @@
<update id="updatePassword">
update blade_user t set t.password = #{password} where t.email = #{email}
</update>
<update id="updateAccount">
<update id="updateAccount">
update blade_user t set t.name = #{name}, t.real_name = #{realName}, t.organization = #{organization},
t.research_field = #{researchField}, t.occupation = #{occupation}, t.code = #{country}
where t.id = #{id}
@ -39,6 +39,7 @@
email = #{email}
</where>
</select>
<select id="getByUserStatisticsOne" resultType="java.lang.Integer">
select count(di.id)
FROM disaster_info di

View File

@ -34,7 +34,7 @@
di.disaster_time,
di.disaster_level,
di.disaster_country,
di.sponsor_organization
di.sponsor_organization,
from guest_manage_disaster_ref gmdr
left join disaster_info di on gmdr.disaster_id = di.id
left join blade_user bu on gmdr.manager_id = bu.id

View File

@ -19,6 +19,7 @@
<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,
@ -35,7 +36,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

@ -102,6 +102,7 @@ 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());

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

View File

@ -6,6 +6,7 @@
<modules>
<module>biz-vordm</module>
<module>vordm-crawl</module>
<module>vordm-twitter</module>
<!-- <module>kn-setting</module>-->
</modules>

View File

@ -0,0 +1,15 @@
FROM bladex/alpine-java:openjdk8-openj9_cn_slim
LABEL maintainer=whq<460794335@qq.com>
RUN mkdir -p /kn/vordm
WORKDIR /kn/vordm
EXPOSE 8980
ADD ./target/vordm-twitter.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"]

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>kn-service</artifactId>
<groupId>com.kening.platform</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>vordm-twitter</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.kening.platform</groupId>
<artifactId>kn-launcher</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</exclusion>
<exclusion>
<artifactId>wildfly-common</artifactId>
<groupId>org.wildfly.common</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.itmuch</groupId>
<artifactId>spring-cloud-wii</artifactId>
<version>2.2.6.RELEASE</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>
<!--Hystrix-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<artifactId>HdrHistogram</artifactId>
<groupId>org.hdrhistogram</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,13 @@
package com.kening.crawl.twitter;
import org.springblade.core.launch.BladeApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringCloudApplication
@ComponentScan({"org.springblade", "com.kening.crawl.twitter"})
public class TwitterApplication {
public static void main(String[] args) {
BladeApplication.run("vordm-twitter", TwitterApplication.class, args);
}
}

View File

@ -0,0 +1,12 @@
server:
port: 8980
spring:
cloud:
gateway:
discovery:
locator:
enabled: true
loadbalancer:
retry:
enabled: true