diff --git a/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/EntityDataAll.java b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/EntityDataAll.java new file mode 100644 index 0000000..29decc5 --- /dev/null +++ b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/EntityDataAll.java @@ -0,0 +1,367 @@ +package com.kening.vordm.entity; + +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 java.io.Serializable; +import java.util.Date; +import java.util.List; + +import lombok.Data; + +/** + * 其他上传的实体数据 + * @TableName entity_data_all + */ +@TableName(value ="entity_data_all") +@Data +public class EntityDataAll implements Serializable { + /** + * 数据自增列 + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 数据名称 + */ + private String title; + + /** + * 数据产品的大小(byte) + */ + private Long size; + + /** + * 数据类型( +0-基础数据(Basic data), +1-减灾产品(Responded report), +2-制图产品(Cartographic product) +3-Social media 社会化媒体 +4遥感数据(Remote sensing data)) +5-Other data 其他数据 + */ + private String type; + + /** + * 数据下载链接(网站上,对象存储路径) + */ + private String link; + + /** + * 数据备注 + */ + private String remark; + + /** + * 上传时间 + */ + private Date uploadTime; + + /** + * 灾害id + */ + private Long disasterId; + + /** + * 可视化可视化标志0-不可可视化;1-表示可以可视化 + */ + private Integer visualFlag; + + /** + * 可视化跳转中心经度 + */ + private Double visualLon; + + /** + * 可视化跳转中心纬度 + */ + private Double visualLat; + + /** + * 审核状态(0-B2管理添加未审核/1-B2管理发起审核/2-B1管理发起审核或审核完B2管理的状态/3审核未通过) + */ + private Integer status; + + /** + * 上传人 + */ + private Long uploaderId; + + /** + * 管理人/审核人 + */ + private Long managerId; + + /** + * 审核时间 + */ + private Date reviewTime; + + /** + * 来源机构 + */ + private String sourceOrganization; + + /** + * 上传类型 1.guest上传 2.manager上传(用来区分uploader_id字段) + */ + private Integer uploadType; + + /** + * 是否删除 0未删除 1已删除 + */ + private Integer isDeleted; + + /** + * 是否发布(0未发布/1已发布) + */ + private Integer isPublish; + + /** + * 是否下载(0 未下载/1已下载) + */ + private Integer isDownload; + + /** + * 账号 + */ + private String account; + + /** + * 密码 + */ + private String password; + + /** + * 信息来源 + */ + private String sourceLink; + + /** + * 1-Optical satellite, 2-Night light satellite, 3-Video satellite, 4-Hyperspectral satellite, 5-Radar satellite + */ + private Integer satelliteTypeSelect; + + /** + * 卫星代号 + */ + private String satelliteCode; + + /** + * 产品序列号 + */ + private String productSerialNum; + + /** + * 产品分辨率 + */ + private String productResolution; + + /** + * 云层覆盖量 + */ + private Integer cloudCover; + + /** + * 生产时间 + */ + private Date productTime; + + /** + * 产品波段树 + */ + private String productBandsNum; + + /** + * 审核失败原因 + */ + private String reason; + + /** + * Personal/Other 信息来源 + */ + private String source; + + /** + * 1-Optical, 2-Radar , 3-Luminous 传感器类型 + */ + private String sensorType; + + /** + * 下载地址 + */ + private String downloadLink; + + /** + * 产品级别 + */ + private String productLevel; + + /** + * 原始数据条带号 + */ + private Integer rawDataStripeNum; + + /** + * 投影带号 + */ + private Integer projectBandNum; + + /** + * 覆盖区域 + */ + private String coverageArea; + + /** + * + */ + private Date receivingTime; + + /** + * + */ + private String upperLeftLat; + + /** + * + */ + private String upperLeftLon; + + /** + * + */ + private String upperRightLat; + + /** + * + */ + private String upperRightLon; + + /** + * + */ + private String viewCenterLat; + + /** + * + */ + private String viewCenterLon; + + /** + * + */ + private String lowerRightLat; + + /** + * + */ + private String lowerRightLon; + + /** + * + */ + private String lowerLeftLat; + + /** + * + */ + private String lowerLeftLon; + + /** + * + */ + private Date createTime; + + /** + * 0-sentinel,1-landsat,2-searchone + */ + private String satelliteType; + + /** + * 影像缩略图名称 用户批量添加缩略图区分 + */ + private String pictureName; + + /** + * 是否是管理(0不是/1是) + */ + private Integer isAdministration; + + /** + * 查询枚举 + */ + @TableField(exist = false) + private List typeList; + + /** + * 审核状态(0-B2管理添加未审核/1-B2管理发起审核/2-B1管理发起审核或审核完B2管理的状态/3审核未通过) + */ + @TableField(exist = false) + private String stateListNew; + + /** + * 查询枚举 + */ + @TableField(exist = false) + private List stateList; + + //标志灾前灾后字段 0-灾前,1-灾后 + @TableField(exist = false) + private Integer beforeOrAfter; + + + + /** + * 用户邮件 + */ + @TableField(exist = false) + private String email; + + /** + * 用户组织机构 + */ + @TableField(exist = false) + private String organization; + + /** + * 研究范围 + */ + @TableField(exist = false) + private String researchField; + + /** + * 职业 + */ + @TableField(exist = false) + private String occupation; + + /** + * 职称 + */ + @TableField(exist = false) + private String professionalTitle; + + /** + * 来源机构 + */ + @TableField(exist = false) + private String sourceOrganizationUser; + + /** + * 用户名称 + */ + @TableField(exist = false) + private String username; + + /** + * 国家 + */ + @TableField(exist = false) + private String country; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; + +} diff --git a/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/GuestApplyDisasterRef.java b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/GuestApplyDisasterRef.java new file mode 100644 index 0000000..8a11144 --- /dev/null +++ b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/GuestApplyDisasterRef.java @@ -0,0 +1,93 @@ +package com.kening.vordm.entity; + +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 java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 灾害响应表,每一个灾害可能有多个用户响应-申请 + * @TableName guest_apply_disaster_ref + */ +@TableName(value ="guest_apply_disaster_ref") +@Data +public class GuestApplyDisasterRef implements Serializable { + /** + * 主键 + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 灾害id + */ + private Long disasterId; + + /** + * 用户状态(0-B1/1-B2) + */ + private Integer userStatus; + + /** + * 申请管理员时间 + */ + private Date applyTime; + + /** + * B2_管理人 balde_user_id + */ + private Long adminId; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + GuestApplyDisasterRef other = (GuestApplyDisasterRef) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getDisasterId() == null ? other.getDisasterId() == null : this.getDisasterId().equals(other.getDisasterId())) + && (this.getUserStatus() == null ? other.getUserStatus() == null : this.getUserStatus().equals(other.getUserStatus())) + && (this.getApplyTime() == null ? other.getApplyTime() == null : this.getApplyTime().equals(other.getApplyTime())) + && (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getDisasterId() == null) ? 0 : getDisasterId().hashCode()); + result = prime * result + ((getUserStatus() == null) ? 0 : getUserStatus().hashCode()); + result = prime * result + ((getApplyTime() == null) ? 0 : getApplyTime().hashCode()); + result = prime * result + ((getAdminId() == null) ? 0 : getAdminId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", disasterId=").append(disasterId); + sb.append(", userStatus=").append(userStatus); + sb.append(", applyTime=").append(applyTime); + sb.append(", adminId=").append(adminId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DataUploadController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DataUploadController.java index a3d87eb..f44889e 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DataUploadController.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DataUploadController.java @@ -29,16 +29,6 @@ public class DataUploadController { private DataUploadService service; - /** - * 灾害分页列表查询 - * @param query - * @param params - * @return - */ - @GetMapping("/queryDisasterPage") - public R> queryDisasterPage(Query query, @RequestParam Map params){ - return R.data(service.queryDisasterPage(Condition.getPage(query),params)); - } /** * 分页列表查询 diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/EntityDataAllController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/EntityDataAllController.java new file mode 100644 index 0000000..8071460 --- /dev/null +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/EntityDataAllController.java @@ -0,0 +1,122 @@ +package com.kening.vordm.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.kening.vordm.entity.EntityDataAll; +import com.kening.vordm.service.EntityDataAllService; +import com.kening.vordm.vo.UserTenantVo; +import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +@RestController +@AllArgsConstructor +@RequestMapping("/ui/EntityDataAll") +public class EntityDataAllController { + + + //实体数据服务层 + private final EntityDataAllService entityDataAllService; + + /** + * 实体数据列表信息 + * @param entityData 实体数据条件信息 + * @param query current当前页 size 每页数据量 + * @return + */ + @GetMapping("/getList") + public R> getEntityDataList(EntityDataAll entityData, Query query) { + return R.data(entityDataAllService.getEntityDataList(Condition.getPage(query), entityData)); + } + + /** + * 获取所有实体信息下机构信息 + * @return + */ + @GetMapping("/getEntityDataSourceOrganization") + public R> getEntityDataSourceOrganization(Long disasterId) { + return R.data(entityDataAllService.getEntityDataSourceOrganization(disasterId)); + } + + /** + * Resource upload 上传实体信息 + * @return + */ + @PostMapping("/saveEntityData") + public R saveEntityData(EntityDataAll entityData) { + return entityDataAllService.saveEntityData(entityData); + } + + + @GetMapping("/updateByIdEntityDataStatus") + public R updateByIdEntityDataStatus(Long id,Integer status,Long managerId) { + EntityDataAll entityData = new EntityDataAll(); + entityData.setId(id); + entityData.setStatus(status); + entityData.setManagerId(managerId); + entityData.setReviewTime(new Date()); + return R.data(entityDataAllService.updateById(entityData)); + } + + //批量修改 + @GetMapping("/updateByIdEntityDataStatusBatch") + public R updateByIdEntityDataStatusBatch(Integer status,String ids) { + List strings = Arrays.asList(ids.split(",")); + strings.stream().forEach(id->{ + EntityDataAll entityData = new EntityDataAll(); + entityData.setId(Long.parseLong(id)); + entityData.setStatus(status); + entityData.setReviewTime(new Date()); + entityDataAllService.updateById(entityData); + }); + return R.data(true); + } + + //批量删除 + @GetMapping("/deleteByIdEntityDataBatch") + public R deleteByIdEntityDataBatch(String ids) { + List strings = Arrays.asList(ids.split(",")); + return R.data(entityDataAllService.removeByIds(strings)); + } + + /** + * 修改实体数据 + * @param entityData + * @return + */ + @PostMapping("/updateEntityData") + public R updateEntityData(EntityDataAll entityData) { + return R.data(entityDataAllService.updateById(entityData)); + } + + + /** + * 删除 + * @param id + * @return + */ + @GetMapping("/removeByIdEntityData") + public R removeByIdEntityData(Long id) { + return R.data(entityDataAllService.removeById(id)); + } + + + /** + * 上传信息 + * @param fileDataOne + * @param fileDataTwo + * @param type + * @param disasterId + * @return + */ + @PostMapping({"/importTemplate"}) + public R fileExcelUpload(@RequestParam("fileDataOne") MultipartFile fileDataOne, @RequestParam("fileDataTwo") MultipartFile fileDataTwo, @RequestParam("type") Integer type, @RequestParam("disasterId") Long disasterId) { + return R.data(null); + } +} diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/GuestApplyDisasterRefController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/GuestApplyDisasterRefController.java new file mode 100644 index 0000000..1a1be4a --- /dev/null +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/GuestApplyDisasterRefController.java @@ -0,0 +1,66 @@ +package com.kening.vordm.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.kening.vordm.entity.GuestApplyDisasterRef; +import com.kening.vordm.service.GuestApplyDisasterRefService; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; + +@RestController +@AllArgsConstructor +@RequestMapping("/ui/guestApply") +public class GuestApplyDisasterRefController { + + private final GuestApplyDisasterRefService guestApplyDisasterRefService; + + @GetMapping("/list") + public R> list(GuestApplyDisasterRef guestApplyDisasterRef, Query query) { + IPage pages = guestApplyDisasterRefService.page(Condition.getPage(query), Condition.getQueryWrapper(guestApplyDisasterRef)); + return R.data(pages); + } + + @ApiOperationSupport(order = 2) + @ApiOperation(value = "新增", notes = "传入Influence") + @PostMapping("/save") + public R save(@ApiParam(value = "Influence对象", required = true) @RequestBody GuestApplyDisasterRef guestApplyDisasterRef) { + return R.status(guestApplyDisasterRefService.save(guestApplyDisasterRef)); + } + + @ApiOperationSupport(order = 3) + @ApiOperation(value = "修改", notes = "传入Influence") + @PostMapping("/update") + public R update(@ApiParam(value = "Influence对象", required = true) @RequestBody GuestApplyDisasterRef guestApplyDisasterRef) { + return R.status(guestApplyDisasterRefService.updateById(guestApplyDisasterRef)); + } + + @ApiOperationSupport(order = 4) + @ApiOperation(value = "删除", notes = "传入id") + @PostMapping("/remove") + public R remove(@ApiParam(value = "主键", required = true) @RequestParam String ids) { + return R.status(guestApplyDisasterRefService.removeByIds(Arrays.asList(ids.split(",")))); + } + @ApiOperationSupport(order = 5) + @ApiOperation(value = "详情", notes = "传入id") + @GetMapping("/detail") + public R detail(@ApiParam(value = "主键", required = true) @RequestParam String id) { + GuestApplyDisasterRef detail = guestApplyDisasterRefService.getById(id); + return R.data(detail); + } + + @GetMapping("/detailByDisasterInfoId") + public R detailByDisasterInfoId(@ApiParam(value = "主键", required = true) @RequestParam String id) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(GuestApplyDisasterRef::getDisasterId,id); + GuestApplyDisasterRef detail = guestApplyDisasterRefService.getOne(queryWrapper); + return R.data(detail); + } +} diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/OtherDataController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/OtherDataController.java index cbf5e9b..74cdece 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/OtherDataController.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/OtherDataController.java @@ -24,17 +24,6 @@ public class OtherDataController { private OtherDataService service; - /** - * 灾害分页列表查询 - * @param query - * @param params - * @return - */ - @GetMapping("/queryDisasterPage") - public R> queryDisasterPage(Query query, @RequestParam Map params){ - return R.data(service.queryDisasterPage(Condition.getPage(query),params)); - } - /** * 分页列表查询 * @param query diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/VisualDataController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/VisualDataController.java index f4e87d3..9c154bf 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/VisualDataController.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/VisualDataController.java @@ -29,17 +29,6 @@ public class VisualDataController { private HotspotService hotspotService; - /** - * 灾害分页列表查询 - * @param query - * @param params - * @return - */ - @GetMapping("/queryDisasterPage") - public R> queryDisasterPage(Query query, @RequestParam Map params){ - return R.data(service.queryDisasterPage(Condition.getPage(query),params)); - } - /** * 词云分页列表查询 diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DataUploadMapper.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DataUploadMapper.java index decdf9b..61c537c 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DataUploadMapper.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DataUploadMapper.java @@ -16,14 +16,6 @@ import java.util.Map; */ public interface DataUploadMapper extends BaseMapper { - /** - * 灾害分页列表查询 - * @param page - * @param params - * @return - */ - List queryDisasterPage(IPage page,@Param("params") Map params); - /** * 分页列表查询 * @param page diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DataUploadMapper.xml b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DataUploadMapper.xml index 8459d2a..c701cb8 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DataUploadMapper.xml +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DataUploadMapper.xml @@ -16,23 +16,6 @@ - - + select + , + bu.name AS uploaderName, + bu.email AS email, + di.vordm_id, + di.geometry + from entity_data_all ed + left join blade_user bu on bu.id = ed.uploader_id + LEFT JOIN disaster_info di on di.id = ed.disaster_id + + + ed.disaster_id = #{entityData.disasterId} + + + and ed.source_organization = #{entityData.sourceOrganization} + + + and ed.satellite_type_select = #{entityData.satelliteTypeSelect} + + + and ed.title like concat('%',#{entityData.title},'%') + + + and ed.product_resolution like concat('%',#{entityData.productResolution},'%') + + + and ed.type IN + + #{item} + + + + and ed.status IN + + #{item} + + + /*灾前还是灾后*/ + + + and r.product_time >= (select + disaster_time + from disaster_info where id = #{entityData.disasterId}) + + + and r.product_time < (select + disaster_time + from disaster_info where id = #{entityData.disasterId}) + + + AND ed.is_deleted = 0 + + ORDER BY ed.upload_time DESC + + + + diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/GuestApplyDisasterRefMapper.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/GuestApplyDisasterRefMapper.java new file mode 100644 index 0000000..4cfc929 --- /dev/null +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/GuestApplyDisasterRefMapper.java @@ -0,0 +1,18 @@ +package com.kening.vordm.mapper; + +import com.kening.vordm.entity.GuestApplyDisasterRef; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author G +* @description 针对表【guest_apply_disaster_ref(灾害响应表,每一个灾害可能有多个用户响应-申请)】的数据库操作Mapper +* @createDate 2024-07-09 14:26:25 +* @Entity com.kening.vordm.entity.GuestApplyDisasterRef +*/ +public interface GuestApplyDisasterRefMapper extends BaseMapper { + +} + + + + diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/GuestApplyDisasterRefMapper.xml b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/GuestApplyDisasterRefMapper.xml new file mode 100644 index 0000000..5a8183e --- /dev/null +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/GuestApplyDisasterRefMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + id,disaster_id,user_status, + apply_time,admin_id + + diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/OtherDataMapper.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/OtherDataMapper.java index dd1a4bb..351c5dc 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/OtherDataMapper.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/OtherDataMapper.java @@ -15,14 +15,6 @@ import java.util.Map; */ public interface OtherDataMapper extends BaseMapper { - /** - * 灾害分页列表查询 - * @param page - * @param params - * @return - */ - List queryDisasterPage(IPage page,@Param("params") Map params); - /** * 分页列表查询 * @param page diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/OtherDataMapper.xml b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/OtherDataMapper.xml index 7d5429a..d0ea7f6 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/OtherDataMapper.xml +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/OtherDataMapper.xml @@ -16,18 +16,6 @@ - -