Merge branch 'master' into yyhouc
# Conflicts: # kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/CrawlInfo.java
This commit is contained in:
commit
ce80f7fb7e
|
@ -56,5 +56,8 @@ public interface CommonConstant {
|
||||||
* 系统管理模块 application name
|
* 系统管理模块 application name
|
||||||
*/
|
*/
|
||||||
String KN_SYSTEM_MANAGER_MODULE_NAME = "system-manager";
|
String KN_SYSTEM_MANAGER_MODULE_NAME = "system-manager";
|
||||||
String KN_VORDM_SETTING = "kn-setting";
|
/**
|
||||||
|
* 爬虫代理模块 application name
|
||||||
|
*/
|
||||||
|
String VORDM_PROXY_CRAWL_MODULE_NAME = "vordm-crawl";
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.kening.vordm.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回页面管理员数据实体
|
* 返回页面管理员数据实体
|
||||||
* @author liyuchen
|
* @author liyuchen
|
||||||
|
@ -16,4 +18,12 @@ public class AdminManager extends DisasterInfo{
|
||||||
private Long managerId;
|
private Long managerId;
|
||||||
|
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
private String occupation;
|
||||||
|
|
||||||
|
private String researchField;
|
||||||
|
|
||||||
|
private Date reviewTime;
|
||||||
|
|
||||||
|
private Date applyTime;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package com.kening.vordm.entity;
|
package com.kening.vordm.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.protostuff.runtime.ArraySchemas;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springblade.core.mp.base.BaseEntity;
|
import org.springblade.core.mp.base.BaseEntity;
|
||||||
import org.springblade.core.secure.BladeUser;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
@ -26,6 +25,7 @@ public class Administrator extends BaseEntity {
|
||||||
|
|
||||||
private String account;
|
private String account;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
|
@ -16,6 +16,8 @@ import java.util.Date;
|
||||||
@TableName(value ="crawl_info")
|
@TableName(value ="crawl_info")
|
||||||
@Data
|
@Data
|
||||||
public class CrawlInfo implements Serializable {
|
public class CrawlInfo implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自增列
|
* 自增列
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.kening.vordm.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据上传实体类
|
* 数据上传实体类
|
||||||
* @author liyuchen
|
* @author liyuchen
|
||||||
|
@ -16,5 +18,10 @@ public class DataUpload extends EntityData{
|
||||||
|
|
||||||
private String disasterKeyword;
|
private String disasterKeyword;
|
||||||
|
|
||||||
|
private String disasterCountry;
|
||||||
|
|
||||||
|
private Date disasterTime;
|
||||||
|
|
||||||
private Long disasterId;
|
private Long disasterId;
|
||||||
|
private String geometry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.kening.vordm.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DisasterData {
|
||||||
|
private String type;
|
||||||
|
private Integer value;
|
||||||
|
private String date;
|
||||||
|
}
|
|
@ -116,6 +116,11 @@ public class DisasterInfo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String sponsorOrganization;
|
private String sponsorOrganization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害管理者id
|
||||||
|
*/
|
||||||
|
private Long chiefId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理用户
|
* 管理用户
|
||||||
*/
|
*/
|
||||||
|
@ -141,11 +146,22 @@ public class DisasterInfo implements Serializable {
|
||||||
private List<Websites> websitesList;
|
private List<Websites> websitesList;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态 0未审核 1审核通过 2审核不通过 3未认领
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String guestManageDisasterRefStatus;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private Long chiefId;
|
|
||||||
|
|
||||||
private String chiefName;
|
private String chiefName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private Date respondedTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,10 +71,6 @@ public class EntityData implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Double visualLat;
|
private Double visualLat;
|
||||||
|
|
||||||
/**
|
|
||||||
* 审核时间
|
|
||||||
*/
|
|
||||||
private Date examTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0 未审核,1-审核已通过,2-审核未通过
|
* 0 未审核,1-审核已通过,2-审核未通过
|
||||||
|
@ -111,6 +107,31 @@ public class EntityData implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer isDeleted;
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传人姓名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String uploaderName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图层名称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String layerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vordmId
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String vordmId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图层名称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String msName;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,16 @@ public class GuestInfo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String professionalTitle;
|
private String professionalTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓
|
||||||
|
*/
|
||||||
|
private String lastName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名字
|
||||||
|
*/
|
||||||
|
private String firstName;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 灾害响应表,每一个灾害可能有多个用户响应
|
* 灾害响应表,每一个灾害可能有多个用户响应
|
||||||
|
@ -25,11 +26,6 @@ public class GuestManageDisasterRef implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Long sponsorId;
|
private Long sponsorId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 响应用户
|
|
||||||
*/
|
|
||||||
private Long uploaderId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理人
|
* 管理人
|
||||||
*/
|
*/
|
||||||
|
@ -40,16 +36,21 @@ public class GuestManageDisasterRef implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Long disasterId;
|
private Long disasterId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 灾害id
|
|
||||||
*/
|
|
||||||
private String responseOrganization;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核状态 0未审核 1审核通过 2审核不通过
|
* 审核状态 0未审核 1审核通过 2审核不通过
|
||||||
*/
|
*/
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请时间
|
||||||
|
*/
|
||||||
|
private Date applyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过时间
|
||||||
|
*/
|
||||||
|
private Date reviewTime;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 其他数据实体类
|
* 其他数据实体类
|
||||||
* @extends 继承基础数据实体类
|
|
||||||
* @author liyuchen
|
* @author liyuchen
|
||||||
* @date 2023/04/12
|
* @date 2023/04/12
|
||||||
*/
|
*/
|
||||||
|
@ -22,4 +21,6 @@ public class OtherData{
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
private Long disasterId;
|
private Long disasterId;
|
||||||
|
|
||||||
|
private Integer visualFlag;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -66,6 +67,12 @@ public class PictureInfo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer isDeleted;
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片对象
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private MultipartFile file;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,12 @@ package com.kening.vordm.entity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.kening.vordm.vo.productResolutionVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 遥感影像源数据
|
* 遥感影像源数据
|
||||||
|
@ -81,6 +83,11 @@ public class RemoteSensingSourceData implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String satelliteCode;
|
private String satelliteCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卫星类型0-sentinel,1-landset,2-searchone
|
||||||
|
*/
|
||||||
|
private String satelliteType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接收时间
|
* 接收时间
|
||||||
*/
|
*/
|
||||||
|
@ -153,8 +160,45 @@ public class RemoteSensingSourceData implements Serializable {
|
||||||
* 来源机构
|
* 来源机构
|
||||||
*/
|
*/
|
||||||
private String sourceOrganization;
|
private String sourceOrganization;
|
||||||
|
/**
|
||||||
|
* 0-爬虫获取,1-未审核,2-,已审核,上传源数据未补充下载 链接,3-已审核上传源数据已补充下载链接
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分辨率集合最大值
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Double productResolutionMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分辨率集合最小值
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Double productResolutionMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卫星类型集合
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String satelliteCodeList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卫星类型集合
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<String> satelliteCodeListNew;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卫星类型集合
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<productResolutionVo> productResolutionVos;
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.kening.vordm.entity;
|
||||||
|
|
||||||
|
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.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName serial_number
|
||||||
|
*/
|
||||||
|
@TableName(value ="serial_number")
|
||||||
|
@Data
|
||||||
|
public class SerialNumber implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date operateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
|
@ -80,7 +80,14 @@ public class Tool implements Serializable {
|
||||||
* 上传人
|
* 上传人
|
||||||
*/
|
*/
|
||||||
private Long uploader;
|
private Long uploader;
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
|
private String show_name;
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
|
private String e_mail;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class WordCLouds implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 该词组归属的时间
|
* 该词组归属的时间
|
||||||
*/
|
*/
|
||||||
private Date time;
|
private Date date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 改词组的频次
|
* 改词组的频次
|
||||||
|
@ -68,6 +68,11 @@ public class WordCLouds implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer isDeleted;
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型,0-twitter ,1-weibo
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
|
@ -21,4 +21,8 @@ public class WorldCharts {
|
||||||
* 频次
|
* 频次
|
||||||
*/
|
*/
|
||||||
private Integer value;
|
private Integer value;
|
||||||
|
/**
|
||||||
|
* 频次
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,38 @@ public class CallForHelpVo extends DisasterInfo {
|
||||||
*/
|
*/
|
||||||
private String researchField;
|
private String researchField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害管理员id-查询条件
|
||||||
|
*/
|
||||||
|
private Long chiefIdEquals;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓
|
||||||
|
*/
|
||||||
|
private String lastName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名字
|
||||||
|
*/
|
||||||
|
private String firstName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职业
|
||||||
|
*/
|
||||||
|
private String occupation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 受灾国家
|
||||||
|
*/
|
||||||
|
private String disasterCountry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 受灾国家
|
||||||
|
*/
|
||||||
|
private String vordmId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,156 @@
|
||||||
|
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 java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName center_disaster_info
|
||||||
|
*/
|
||||||
|
@TableName(value ="center_disaster_info")
|
||||||
|
@Data
|
||||||
|
public class CenterDisasterInfo implements Serializable {
|
||||||
|
/**
|
||||||
|
* 唯一值
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害类型
|
||||||
|
*/
|
||||||
|
private String disasterType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害关键词
|
||||||
|
*/
|
||||||
|
private String disasterKeyword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害发生时间
|
||||||
|
*/
|
||||||
|
private Date disasterTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害发起时间
|
||||||
|
*/
|
||||||
|
private Date uploadTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害区域地理字段
|
||||||
|
*/
|
||||||
|
private String geometry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害强度或震级
|
||||||
|
*/
|
||||||
|
private String disasterLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 受灾国家
|
||||||
|
*/
|
||||||
|
private String disasterCountry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应状态,0未审批,1审批未通过。2审批通过并正在响应,3审批通过并且响应完成
|
||||||
|
*/
|
||||||
|
private Integer respondStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本灾害的用户访问次数
|
||||||
|
*/
|
||||||
|
private Integer visitCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本灾害的数据下载次数
|
||||||
|
*/
|
||||||
|
private Integer downloadCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 爬虫类型
|
||||||
|
*/
|
||||||
|
private Integer spiderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 爬虫起始时间
|
||||||
|
*/
|
||||||
|
private Date tempendTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 爬虫终止时间
|
||||||
|
*/
|
||||||
|
private Date tempStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据条目创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害id,审批通过后生成
|
||||||
|
*/
|
||||||
|
private String vordmId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害响应时间
|
||||||
|
*/
|
||||||
|
private Date respondTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 灾害申请组织
|
||||||
|
*/
|
||||||
|
private String sponsorOrganization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典名称
|
||||||
|
*/
|
||||||
|
private String dictValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据存储链接
|
||||||
|
*/
|
||||||
|
private String disasterImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String news;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态 0未审核 1审核通过 2审核不通过 3未认领
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请管理员时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime applyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批管理员时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime reviewTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户邮件
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
|
@ -125,6 +125,11 @@ public class DisasterInfoVo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String news;
|
private String news;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发起人昵称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
|
@ -144,6 +144,32 @@ public class EntityDataUserVo {
|
||||||
*/
|
*/
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品波段树
|
||||||
|
*/
|
||||||
|
private String productBandsNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卫星代号
|
||||||
|
*/
|
||||||
|
private String satelliteCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品分辨率
|
||||||
|
*/
|
||||||
|
private Double productResolution;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 云层覆盖量
|
||||||
|
*/
|
||||||
|
private Integer cloudCover;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产时间
|
||||||
|
*/
|
||||||
|
private Date productTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件信息
|
* 文件信息
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.kening.vordm.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserVo {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码1
|
||||||
|
*/
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码2
|
||||||
|
*/
|
||||||
|
private String password2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证码key
|
||||||
|
*/
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构Id
|
||||||
|
*/
|
||||||
|
private String tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户平台
|
||||||
|
*/
|
||||||
|
private String userType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账号
|
||||||
|
*/
|
||||||
|
private String account;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 真名
|
||||||
|
*/
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像
|
||||||
|
*/
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构
|
||||||
|
*/
|
||||||
|
private String organization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 研究范围
|
||||||
|
*/
|
||||||
|
private String researchField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职业
|
||||||
|
*/
|
||||||
|
private String occupation;
|
||||||
|
/**
|
||||||
|
* 职业
|
||||||
|
*/
|
||||||
|
private String roleId;
|
||||||
|
|
||||||
|
//国家
|
||||||
|
private String country;
|
||||||
|
|
||||||
|
private Integer byUserStatisticsOne;
|
||||||
|
private Integer byUserStatisticsTwo;
|
||||||
|
private Integer byUserStatisticsThree;
|
||||||
|
private Integer byUserStatisticsFour;
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.kening.vordm.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class productResolutionVo {
|
||||||
|
|
||||||
|
private Double productResolutionMin;
|
||||||
|
|
||||||
|
|
||||||
|
private Double productResolutionMax;
|
||||||
|
}
|
|
@ -1,23 +0,0 @@
|
||||||
<?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-api</artifactId>
|
|
||||||
<groupId>com.kening.platform</groupId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>kn-setting-api</artifactId>
|
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.kening.platform</groupId>
|
|
||||||
<artifactId>kn-common</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,133 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.cache;
|
|
||||||
|
|
||||||
import com.kening.setting.entity.DictBiz;
|
|
||||||
import com.kening.setting.enums.DictBizEnum;
|
|
||||||
import com.kening.setting.feign.IDictBizClient;
|
|
||||||
import org.springblade.core.cache.utils.CacheUtil;
|
|
||||||
import org.springblade.core.secure.utils.AuthUtil;
|
|
||||||
import org.springblade.core.tool.api.R;
|
|
||||||
import org.springblade.core.tool.utils.SpringUtil;
|
|
||||||
import org.springblade.core.tool.utils.StringPool;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 业务字典缓存工具类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
public class DictBizCache {
|
|
||||||
|
|
||||||
private static final String DICT_ID = "dictBiz:id";
|
|
||||||
private static final String DICT_VALUE = "dictBiz:value";
|
|
||||||
private static final String DICT_LIST = "dictBiz:list";
|
|
||||||
|
|
||||||
private static IDictBizClient dictClient;
|
|
||||||
|
|
||||||
private static IDictBizClient getDictClient() {
|
|
||||||
if (dictClient == null) {
|
|
||||||
dictClient = SpringUtil.getBean(IDictBizClient.class);
|
|
||||||
}
|
|
||||||
return dictClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典实体
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
* @return DictBiz
|
|
||||||
*/
|
|
||||||
public static DictBiz getById(Long id) {
|
|
||||||
String keyPrefix = DICT_ID.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
|
||||||
return CacheUtil.get(DICT_CACHE, keyPrefix, id, () -> {
|
|
||||||
R<DictBiz> result = getDictClient().getById(id);
|
|
||||||
return result.getData();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典值
|
|
||||||
*
|
|
||||||
* @param code 字典编号枚举
|
|
||||||
* @param dictKey Integer型字典键
|
|
||||||
* @return String
|
|
||||||
*/
|
|
||||||
public static String getValue(DictBizEnum code, Integer dictKey) {
|
|
||||||
return getValue(code.getName(), dictKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典值
|
|
||||||
*
|
|
||||||
* @param code 字典编号
|
|
||||||
* @param dictKey Integer型字典键
|
|
||||||
* @return String
|
|
||||||
*/
|
|
||||||
public static String getValue(String code, Integer dictKey) {
|
|
||||||
String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
|
||||||
return CacheUtil.get(DICT_CACHE, keyPrefix + code + StringPool.COLON, String.valueOf(dictKey), () -> {
|
|
||||||
R<String> result = getDictClient().getValue(code, String.valueOf(dictKey));
|
|
||||||
return result.getData();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典值
|
|
||||||
*
|
|
||||||
* @param code 字典编号枚举
|
|
||||||
* @param dictKey String型字典键
|
|
||||||
* @return String
|
|
||||||
*/
|
|
||||||
public static String getValue(DictBizEnum code, String dictKey) {
|
|
||||||
return getValue(code.getName(), dictKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典值
|
|
||||||
*
|
|
||||||
* @param code 字典编号
|
|
||||||
* @param dictKey String型字典键
|
|
||||||
* @return String
|
|
||||||
*/
|
|
||||||
public static String getValue(String code, String dictKey) {
|
|
||||||
String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
|
||||||
return CacheUtil.get(DICT_CACHE, keyPrefix + code + StringPool.COLON, dictKey, () -> {
|
|
||||||
R<String> result = getDictClient().getValue(code, dictKey);
|
|
||||||
return result.getData();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典集合
|
|
||||||
*
|
|
||||||
* @param code 字典编号
|
|
||||||
* @return List<DictBiz>
|
|
||||||
*/
|
|
||||||
public static List<DictBiz> getList(String code) {
|
|
||||||
String keyPrefix = DICT_LIST.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
|
||||||
return CacheUtil.get(DICT_CACHE, keyPrefix, code, () -> {
|
|
||||||
R<List<DictBiz>> result = getDictClient().getList(code);
|
|
||||||
return result.getData();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,109 +0,0 @@
|
||||||
package com.kening.setting.entity;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName("blade_dict_biz")
|
|
||||||
@ApiModel(value = "DictBiz对象", description = "DictBiz对象")
|
|
||||||
public class DictBiz implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
|
||||||
@ApiModelProperty(value = "主键")
|
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户ID
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "租户ID")
|
|
||||||
private String tenantId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 父主键
|
|
||||||
*/
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
|
||||||
@ApiModelProperty(value = "父主键")
|
|
||||||
private Long parentId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典码
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "字典码")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典值
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "字典值")
|
|
||||||
private String dictKey;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "字典名称")
|
|
||||||
private String dictValue;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 排序
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "排序")
|
|
||||||
private Integer sort;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典备注
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "字典备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否已封存
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "是否已封存")
|
|
||||||
private Integer isSealed;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否已删除
|
|
||||||
*/
|
|
||||||
@TableLogic
|
|
||||||
@ApiModelProperty(value = "是否已删除")
|
|
||||||
private Integer isDeleted;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.enums;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 业务字典枚举类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum DictBizEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 测试
|
|
||||||
*/
|
|
||||||
TEST("test"),
|
|
||||||
;
|
|
||||||
|
|
||||||
final String name;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,72 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.feign;
|
|
||||||
|
|
||||||
|
|
||||||
import com.kening.setting.entity.DictBiz;
|
|
||||||
import org.springblade.core.tool.api.R;
|
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Feign接口类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@FeignClient(
|
|
||||||
value = "kn-system-biz-dict",
|
|
||||||
fallback = com.kening.setting.feign.IDictBizClientFallback.class
|
|
||||||
)
|
|
||||||
public interface IDictBizClient {
|
|
||||||
|
|
||||||
String API_PREFIX = "/client";
|
|
||||||
String GET_BY_ID = API_PREFIX + "/dict-biz/get-by-id";
|
|
||||||
String GET_VALUE = API_PREFIX + "/dict-biz/get-value";
|
|
||||||
String GET_LIST = API_PREFIX + "/dict-biz/get-list";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典实体
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping(GET_BY_ID)
|
|
||||||
R<DictBiz> getById(@RequestParam("id") Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典表对应值
|
|
||||||
*
|
|
||||||
* @param code 字典编号
|
|
||||||
* @param dictKey 字典序号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping(GET_VALUE)
|
|
||||||
R<String> getValue(@RequestParam("code") String code, @RequestParam("dictKey") String dictKey);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典表
|
|
||||||
*
|
|
||||||
* @param code 字典编号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping(GET_LIST)
|
|
||||||
R<List<DictBiz>> getList(@RequestParam("code") String code);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.feign;
|
|
||||||
|
|
||||||
import com.kening.setting.entity.DictBiz;
|
|
||||||
import org.springblade.core.tool.api.R;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Feign失败配置
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
public class IDictBizClientFallback implements IDictBizClient {
|
|
||||||
@Override
|
|
||||||
public R<DictBiz> getById(Long id) {
|
|
||||||
return R.fail("获取数据失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public R<String> getValue(String code, String dictKey) {
|
|
||||||
return R.fail("获取数据失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public R<List<DictBiz>> getList(String code) {
|
|
||||||
return R.fail("获取数据失败");
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,71 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
||||||
import com.kening.setting.entity.DictBiz;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import org.springblade.core.tool.node.INode;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ApiModel(value = "DictBizVO对象", description = "DictBizVO对象")
|
|
||||||
public class DictBizVO extends DictBiz implements INode<DictBizVO> {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 父节点ID
|
|
||||||
*/
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
|
||||||
private Long parentId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 子孙节点
|
|
||||||
*/
|
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
||||||
private List<DictBizVO> children;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<DictBizVO> getChildren() {
|
|
||||||
if (this.children == null) {
|
|
||||||
this.children = new ArrayList<>();
|
|
||||||
}
|
|
||||||
return this.children;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上级字典
|
|
||||||
*/
|
|
||||||
private String parentName;
|
|
||||||
}
|
|
|
@ -14,7 +14,6 @@
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<modules>
|
<modules>
|
||||||
<module>biz-vordm-api</module>
|
<module>biz-vordm-api</module>
|
||||||
<module>kn-setting-api</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<description>微服务API集合</description>
|
<description>微服务API集合</description>
|
||||||
|
|
|
@ -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 8282
|
||||||
|
|
||||||
|
ADD ./target/biz-vordm.jar ./app.jar
|
||||||
|
|
||||||
|
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||||
|
|
||||||
|
CMD ["--spring.profiles.active=test"]
|
|
@ -17,6 +17,87 @@
|
||||||
<artifactId>biz-vordm-api</artifactId>
|
<artifactId>biz-vordm-api</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hdrhistogram</groupId>
|
||||||
|
<artifactId>HdrHistogram</artifactId>
|
||||||
|
<version>2.1.12</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.javassist</groupId>
|
||||||
|
<artifactId>javassist</artifactId>
|
||||||
|
<version>3.25.0-GA</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springblade</groupId>
|
||||||
|
<artifactId>blade-core-boot</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.oracle</groupId>
|
||||||
|
<artifactId>ojdbc7</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>HdrHistogram</artifactId>
|
||||||
|
<groupId>org.hdrhistogram</groupId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>javassist</artifactId>
|
||||||
|
<groupId>org.javassist</groupId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.microsoft.sqlserver</groupId>
|
||||||
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springblade</groupId>
|
||||||
|
<artifactId>blade-starter-oss</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>esdk-obs-java</artifactId>
|
||||||
|
<groupId>com.huaweicloud</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.minio</groupId>
|
||||||
|
<artifactId>minio</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-mock</artifactId>
|
||||||
|
<version>2.0.8</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springblade</groupId>
|
||||||
|
<artifactId>blade-starter-swagger</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springblade</groupId>
|
||||||
|
<artifactId>blade-starter-tenant</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!--邮件发送依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-mail</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!--thymeleaf-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,7 +11,6 @@ import org.springframework.cloud.client.SpringCloudApplication;
|
||||||
@SpringCloudApplication
|
@SpringCloudApplication
|
||||||
public class VoRdmApplication {
|
public class VoRdmApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
BladeApplication.run("yyhouc-"+CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
|
BladeApplication.run(CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
|
||||||
// BladeApplication.run("zqq-" + CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import org.springblade.core.mp.support.Query;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -32,6 +33,7 @@ public class AdminManagerController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/pages")
|
@GetMapping("/pages")
|
||||||
public R pages(Query query, @RequestParam Map<String,Object> params){
|
public R pages(Query query, @RequestParam Map<String,Object> params){
|
||||||
|
|
||||||
return R.data(guestManageDisasterRefService.queryPage(Condition.getPage(query),params));
|
return R.data(guestManageDisasterRefService.queryPage(Condition.getPage(query),params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +43,9 @@ public class AdminManagerController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/audit")
|
@PostMapping("/audit")
|
||||||
public R audit(@RequestBody List<GuestManageDisasterRef> guestManageDisasterRef){
|
public R audit(@RequestBody List<GuestManageDisasterRef> guestManageDisasterRef){
|
||||||
|
guestManageDisasterRef.stream().forEach(guestManageDisasterRef1 -> {
|
||||||
|
guestManageDisasterRef1.setReviewTime(new Date());
|
||||||
|
});
|
||||||
return R.status(guestManageDisasterRefService.updateBatchById(guestManageDisasterRef));
|
return R.status(guestManageDisasterRefService.updateBatchById(guestManageDisasterRef));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import org.springblade.core.mp.support.Query;
|
||||||
import org.springblade.core.secure.BladeUser;
|
import org.springblade.core.secure.BladeUser;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
import org.springblade.core.tool.utils.DigestUtil;
|
import org.springblade.core.tool.utils.DigestUtil;
|
||||||
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -49,13 +50,23 @@ public class AdministratorController {
|
||||||
return R.status(service.saveChiefAdmin(administrator));
|
return R.status(service.saveChiefAdmin(administrator));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新管理员信息
|
||||||
|
* @param administrator
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/update")
|
||||||
|
public R<Boolean> update(@RequestBody Administrator administrator){
|
||||||
|
return R.status(service.updateById(administrator));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除管理员用户
|
* 删除管理员用户
|
||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
public R<Boolean> delete(@RequestParam Long ids){
|
public R<Boolean> delete(@RequestParam String ids){
|
||||||
return R.status(service.removeById(ids));
|
return R.status(service.deleteLogic(Func.toLongList(ids)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
package com.kening.vordm.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.kening.vordm.entity.Tool;
|
||||||
|
import com.kening.vordm.service.CenterDisasterInfoService;
|
||||||
|
import com.kening.vordm.service.DisasterInfoVoService;
|
||||||
|
import com.kening.vordm.service.GuestInfoService;
|
||||||
|
import com.kening.vordm.service.ToolService;
|
||||||
|
import com.kening.vordm.vo.CenterDisasterInfo;
|
||||||
|
import com.kening.vordm.vo.DisasterInfoVo;
|
||||||
|
import com.kening.vordm.vo.UserVo;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
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.time.LocalDate;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RequestMapping("/ui/center")
|
||||||
|
public class CenterController {
|
||||||
|
private final CenterDisasterInfoService centerDisasterInfoService;
|
||||||
|
private final GuestInfoService guestInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中心 Responding列表
|
||||||
|
* 必传email
|
||||||
|
* @param query
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/respondingList")
|
||||||
|
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::getEmail,String.valueOf(params.get("email")))
|
||||||
|
.orderByDesc(CenterDisasterInfo::getApplyTime)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中心 Responded列表
|
||||||
|
* 必传email
|
||||||
|
* @param query
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/respondedList")
|
||||||
|
public R<IPage<CenterDisasterInfo>> respondedList(Query query, @RequestParam Map<String, String> params) {
|
||||||
|
return R.data(centerDisasterInfoService.page(Condition.getPage(query), Wrappers.<CenterDisasterInfo>lambdaQuery()
|
||||||
|
.eq(CenterDisasterInfo::getRespondStatus,3)
|
||||||
|
.eq(CenterDisasterInfo::getEmail,String.valueOf(params.get("email")))
|
||||||
|
.eq(CenterDisasterInfo::getStatus, 1)
|
||||||
|
.orderByDesc(CenterDisasterInfo::getVordmId)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
@PostMapping("/updatePassword")
|
||||||
|
public R<Boolean> updatePassword(@RequestBody Map<String, String> param) {
|
||||||
|
return R.data(guestInfoService.updatePassword(param.get("originalPassword"), param.get("password"), param.get("email")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/updateAccount")
|
||||||
|
public R<Boolean> updateAccount(@RequestBody UserVo userVo) {
|
||||||
|
return R.data(guestInfoService.updateAccount(userVo));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -20,30 +20,37 @@ import java.util.Arrays;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/ui/crawlInfo")
|
@RequestMapping("/ui/crawlInfo")
|
||||||
public class CrawlInfoController {
|
public class CrawlInfoController {
|
||||||
|
|
||||||
private CrawlInfoService crawlInfoService;
|
private CrawlInfoService crawlInfoService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperationSupport(order = 1)
|
@ApiOperationSupport(order = 1)
|
||||||
@ApiOperation(value = "分页", notes = "传入CrawlInfo")
|
@ApiOperation(value = "分页", notes = "传入CrawlInfo")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "current", value = "当前页", paramType = "query", dataType = "int"),
|
@ApiImplicitParam(name = "current", value = "当前页", paramType = "query", dataType = "int"),
|
||||||
@ApiImplicitParam(name = "size", value = "分页大小", paramType = "query", dataType = "int")
|
@ApiImplicitParam(name = "size", value = "分页大小", paramType = "query", dataType = "int")
|
||||||
})
|
})
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<IPage<CrawlInfo>> list(CrawlInfo crawlInfo, Query query) {
|
public R<IPage<CrawlInfo>> list(CrawlInfo crawlInfo, Query query) {
|
||||||
IPage<CrawlInfo> pages = crawlInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(crawlInfo));
|
IPage<CrawlInfo> pages = crawlInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(crawlInfo));
|
||||||
return R.data(pages);
|
return R.data(pages);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperationSupport(order = 2)
|
@ApiOperationSupport(order = 2)
|
||||||
@ApiOperation(value = "新增", notes = "传入CrawlInfo")
|
@ApiOperation(value = "新增", notes = "传入CrawlInfo")
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
public R save(@ApiParam(value = "CrawlInfo对象", required = true) @RequestBody CrawlInfo crawlInfo) {
|
public R save(@ApiParam(value = "CrawlInfo对象", required = true) @RequestBody CrawlInfo crawlInfo) {
|
||||||
return R.status(crawlInfoService.save(crawlInfo));
|
return R.status(crawlInfoService.save(crawlInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperationSupport(order = 3)
|
@ApiOperationSupport(order = 3)
|
||||||
@ApiOperation(value = "修改", notes = "传入CrawlInfo")
|
@ApiOperation(value = "修改", notes = "传入CrawlInfo")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public R update(@ApiParam(value = "CrawlInfo对象", required = true) @RequestBody CrawlInfo crawlInfo) {
|
public R update(@ApiParam(value = "CrawlInfo对象", required = true) @RequestBody CrawlInfo crawlInfo) {
|
||||||
return R.status(crawlInfoService.updateById(crawlInfo));
|
return R.status(crawlInfoService.updateById(crawlInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperationSupport(order = 4)
|
@ApiOperationSupport(order = 4)
|
||||||
@ApiOperation(value = "删除", notes = "传入id")
|
@ApiOperation(value = "删除", notes = "传入id")
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
|
|
|
@ -52,6 +52,23 @@ public class DisasterInfoController {
|
||||||
|
|
||||||
private final DisasterInfoVoService disasterInfoVoService;
|
private final DisasterInfoVoService disasterInfoVoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号生成
|
||||||
|
*/
|
||||||
|
private final SerialNumberService serialNumberService;
|
||||||
|
|
||||||
|
@GetMapping("/saveGuestManageDisasterRef")
|
||||||
|
public R saveGuestManageDisasterRef(Long disasterId, Long managerId) {
|
||||||
|
LambdaQueryWrapper<GuestManageDisasterRef> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(GuestManageDisasterRef::getDisasterId, disasterId);
|
||||||
|
GuestManageDisasterRef one = guestManageDisasterRefService.getOne(queryWrapper);
|
||||||
|
one.setManagerId(managerId);
|
||||||
|
one.setApplyTime(new Date());
|
||||||
|
one.setStatus(0);
|
||||||
|
return R.status(guestManageDisasterRefService.updateById(one));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperationSupport(order = 1)
|
@ApiOperationSupport(order = 1)
|
||||||
@ApiOperation(value = "分页", notes = "传入Tool")
|
@ApiOperation(value = "分页", notes = "传入Tool")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
|
@ -197,15 +214,9 @@ public class DisasterInfoController {
|
||||||
.ge(DisasterInfoVo::getDisasterTime, date)
|
.ge(DisasterInfoVo::getDisasterTime, date)
|
||||||
.le(DisasterInfoVo::getDisasterTime, LocalDate.now())
|
.le(DisasterInfoVo::getDisasterTime, LocalDate.now())
|
||||||
.eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))), DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType")))
|
.eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))), DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType")))
|
||||||
.and(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea")))
|
.like(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))), DisasterInfoVo::getDisasterCountry, String.valueOf(params.get("affectedArea")))
|
||||||
,Wrappers->Wrappers.like(DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))).or().like(DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("affectedArea"))))
|
.orderByDesc("DisasterTime".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getDisasterTime)
|
||||||
// .eq("type".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterType,String.valueOf(params.get("leftVal")))
|
.orderByDesc("RespondTime".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getRespondTime)
|
||||||
// .eq("country".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("leftVal")))
|
|
||||||
// .eq("sponsorOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("leftVal")))
|
|
||||||
// .inSql("responseOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getId,"select t.disaster_id from guest_manage_disaster_ref t " +
|
|
||||||
// " where t.response_organization = " + params.get("leftVal"))
|
|
||||||
.orderByDesc("Visits".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getVisitCount)
|
|
||||||
.orderByDesc("Downloads".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getDownloadCount)
|
|
||||||
.orderByDesc(DisasterInfoVo::getVordmId)
|
.orderByDesc(DisasterInfoVo::getVordmId)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -216,15 +227,9 @@ public class DisasterInfoController {
|
||||||
.ge(DisasterInfoVo::getDisasterTime, LocalDate.parse(String.valueOf(params.get("startTime"))))
|
.ge(DisasterInfoVo::getDisasterTime, LocalDate.parse(String.valueOf(params.get("startTime"))))
|
||||||
.le(DisasterInfoVo::getDisasterTime, LocalDate.parse(String.valueOf(params.get("endTime"))))
|
.le(DisasterInfoVo::getDisasterTime, LocalDate.parse(String.valueOf(params.get("endTime"))))
|
||||||
.eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))), DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType")))
|
.eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))), DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType")))
|
||||||
.and(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea")))
|
.like(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))), DisasterInfoVo::getDisasterCountry, String.valueOf(params.get("affectedArea")))
|
||||||
,Wrappers->Wrappers.like(DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))).or().like(DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("affectedArea"))))
|
.orderByDesc("DisasterTime".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getDisasterTime)
|
||||||
// .eq("type".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterType,String.valueOf(params.get("leftVal")))
|
.orderByDesc("RespondTime".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getRespondTime)
|
||||||
// .eq("country".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("leftVal")))
|
|
||||||
// .eq("sponsorOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("leftVal")))
|
|
||||||
// .inSql("responseOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getId,"select t.disaster_id from guest_manage_disaster_ref t " +
|
|
||||||
// " where t.response_organization = " + params.get("leftVal"))
|
|
||||||
.orderByDesc("Visits".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getVisitCount)
|
|
||||||
.orderByDesc("Downloads".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getDownloadCount)
|
|
||||||
.orderByDesc(DisasterInfoVo::getVordmId)
|
.orderByDesc(DisasterInfoVo::getVordmId)
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
|
@ -232,15 +237,9 @@ public class DisasterInfoController {
|
||||||
return R.data(disasterInfoVoService.page(Condition.getPage(query), Wrappers.<DisasterInfoVo>lambdaQuery()
|
return R.data(disasterInfoVoService.page(Condition.getPage(query), Wrappers.<DisasterInfoVo>lambdaQuery()
|
||||||
.eq(DisasterInfoVo::getRespondStatus, Integer.valueOf(params.get("respondStatus")))
|
.eq(DisasterInfoVo::getRespondStatus, Integer.valueOf(params.get("respondStatus")))
|
||||||
.eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))), DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType")))
|
.eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))), DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType")))
|
||||||
.and(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea")))
|
.like(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))), DisasterInfoVo::getDisasterCountry, String.valueOf(params.get("affectedArea")))
|
||||||
,Wrappers->Wrappers.like(DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))).or().like(DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("affectedArea"))))
|
.orderByDesc("DisasterTime".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getDisasterTime)
|
||||||
// .eq("type".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterType,String.valueOf(params.get("leftVal")))
|
.orderByDesc("RespondTime".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getRespondTime)
|
||||||
// .eq("country".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("leftVal")))
|
|
||||||
// .eq("sponsorOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("leftVal")))
|
|
||||||
// .inSql("responseOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getId,"select t.disaster_id from guest_manage_disaster_ref t " +
|
|
||||||
// " where t.response_organization = " + params.get("leftVal"))
|
|
||||||
.orderByDesc("Visits".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getVisitCount)
|
|
||||||
.orderByDesc("Downloads".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getDownloadCount)
|
|
||||||
.orderByDesc(DisasterInfoVo::getVordmId)
|
.orderByDesc(DisasterInfoVo::getVordmId)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -306,20 +305,33 @@ public class DisasterInfoController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("Call-for-help")
|
@PostMapping("Call-for-help")
|
||||||
public R<Boolean> insertRespondInfo(@RequestBody CallForHelpVo callForHelpVo) {
|
public R<Boolean> insertRespondInfo(@RequestBody CallForHelpVo callForHelpVo) {
|
||||||
|
LambdaQueryWrapper<GuestInfo> qw = new LambdaQueryWrapper<>();
|
||||||
|
qw.eq(GuestInfo::getEmail, callForHelpVo.getEmail());
|
||||||
|
GuestInfo one = guestInfoService.getOne(qw);
|
||||||
|
|
||||||
GuestInfo guestInfo = new GuestInfo();
|
GuestInfo guestInfo = new GuestInfo();
|
||||||
BeanUtil.copyProperties(callForHelpVo, guestInfo);
|
BeanUtil.copyProperties(callForHelpVo, guestInfo);
|
||||||
|
Boolean flag1 = false;
|
||||||
|
if (one == null) {
|
||||||
guestInfo.setId(IdWorker.getId());
|
guestInfo.setId(IdWorker.getId());
|
||||||
|
flag1 = guestInfoService.save(guestInfo);
|
||||||
|
} else {
|
||||||
|
guestInfo.setId(one.getId());
|
||||||
|
flag1 = guestInfoService.updateById(guestInfo);
|
||||||
|
}
|
||||||
|
|
||||||
DisasterInfo disasterInfo = new DisasterInfo();
|
DisasterInfo disasterInfo = new DisasterInfo();
|
||||||
BeanUtil.copyProperties(callForHelpVo, disasterInfo);
|
BeanUtil.copyProperties(callForHelpVo, disasterInfo);
|
||||||
disasterInfo.setId(IdWorker.getId());
|
|
||||||
disasterInfo.setUploadTime(new Date());
|
disasterInfo.setUploadTime(new Date());
|
||||||
GuestManageDisasterRef GuestManageDisasterRef = new GuestManageDisasterRef();
|
|
||||||
GuestManageDisasterRef.setId(IdWorker.getId());
|
|
||||||
GuestManageDisasterRef.setSponsorId(guestInfo.getId());
|
|
||||||
GuestManageDisasterRef.setDisasterId(disasterInfo.getId());
|
|
||||||
Boolean flag1 = guestInfoService.save(guestInfo);
|
|
||||||
Boolean flag2 = guestManageDisasterRefService.save(GuestManageDisasterRef);
|
|
||||||
Boolean flag3 = disasterInfoService.save(disasterInfo);
|
Boolean flag3 = disasterInfoService.save(disasterInfo);
|
||||||
|
|
||||||
|
|
||||||
|
GuestManageDisasterRef guestManageDisasterRef = new GuestManageDisasterRef();
|
||||||
|
guestManageDisasterRef.setSponsorId(guestInfo.getId());
|
||||||
|
guestManageDisasterRef.setDisasterId(disasterInfo.getId());
|
||||||
|
guestManageDisasterRef.setApplyTime(new Date());
|
||||||
|
Boolean flag2 = guestManageDisasterRefService.save(guestManageDisasterRef);
|
||||||
|
|
||||||
Boolean callForHelp = flag1 && flag2 && flag3;
|
Boolean callForHelp = flag1 && flag2 && flag3;
|
||||||
return R.data(callForHelp);
|
return R.data(callForHelp);
|
||||||
}
|
}
|
||||||
|
@ -327,13 +339,79 @@ public class DisasterInfoController {
|
||||||
|
|
||||||
@PostMapping("review")
|
@PostMapping("review")
|
||||||
public R<Boolean> review(@RequestBody DisasterInfo disasterInfo) {
|
public R<Boolean> review(@RequestBody DisasterInfo disasterInfo) {
|
||||||
|
|
||||||
|
//审批通过
|
||||||
|
if (disasterInfo.getRespondStatus() == 2) {
|
||||||
|
String numbering = serialNumberService.generateNumbering(disasterInfo.getDisasterType());
|
||||||
|
disasterInfo.setVordmId(numbering);
|
||||||
|
}
|
||||||
Boolean flag = disasterInfoService.updateById(disasterInfo);
|
Boolean flag = disasterInfoService.updateById(disasterInfo);
|
||||||
return R.data(flag);
|
return R.data(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperationSupport(order = 6)
|
@ApiOperationSupport(order = 6)
|
||||||
@ApiOperation(value = "提交", notes = "传入Tool")
|
@ApiOperation(value = "提交", notes = "传入Tool")
|
||||||
@PostMapping("/submit")
|
@PostMapping("/submit")
|
||||||
public R submit(@ApiParam(value = "Tool对象", required = true) @RequestBody DisasterInfo disasterInfo) {
|
public R submit(@ApiParam(value = "Tool对象", required = true) @RequestBody DisasterInfo disasterInfo) {
|
||||||
return R.status(disasterInfoService.saveOrUpdate(disasterInfo));
|
return R.status(disasterInfoService.saveOrUpdate(disasterInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 后台管理系统-控制台灾害各项统计
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/statistics")
|
||||||
|
public R statistics(String year) {
|
||||||
|
return R.data(disasterInfoService.statistics(year));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新灾害的chief管理者
|
||||||
|
*
|
||||||
|
* @param disasterInfoList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/updateBatch")
|
||||||
|
public R updateBatch(@RequestBody List<DisasterInfo> disasterInfoList) {
|
||||||
|
return R.status(disasterInfoService.updateBatchById(disasterInfoList));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新灾害的chief管理者
|
||||||
|
*
|
||||||
|
* @param disasterInfoList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/removeManage")
|
||||||
|
public R removeManage(@RequestBody List<DisasterInfo> disasterInfoList) {
|
||||||
|
return R.status(disasterInfoService.removeManage(disasterInfoList));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断用户是否管理当前灾害
|
||||||
|
*
|
||||||
|
* @param userId 用户Id
|
||||||
|
* @param disasterId 灾害Id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getByUserDisasterInfo")
|
||||||
|
public R getByUserDisasterInfo(Long userId, Long disasterId) {
|
||||||
|
return R.data(disasterInfoService.getByUserDisasterInfo(userId, disasterId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/responseEndedDisasterInfo")
|
||||||
|
public R responseEndedDisasterInfo(Long id) {
|
||||||
|
DisasterInfo disasterInfo = new DisasterInfo();
|
||||||
|
disasterInfo.setId(id);
|
||||||
|
disasterInfo.setRespondStatus(3);
|
||||||
|
disasterInfo.setRespondedTime(new Date());
|
||||||
|
return R.data(disasterInfoService.updateById(disasterInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getByUserDisasterInfoStatistics")
|
||||||
|
public R getByUserDisasterInfo(Long userId) {
|
||||||
|
return R.data(disasterInfoService.getByUserDisasterInfoStatistics(userId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.springblade.core.mp.support.Query;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -50,5 +51,15 @@ public class EntityDataController {
|
||||||
public R saveEntityData(EntityDataUserVo entityDataUserVo) {
|
public R saveEntityData(EntityDataUserVo entityDataUserVo) {
|
||||||
return R.data(entityDataService.saveEntityData(entityDataUserVo));
|
return R.data(entityDataService.saveEntityData(entityDataUserVo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/updateByIdEntityDataStatus")
|
||||||
|
public R updateByIdEntityDataStatus(Long id,Integer status,Long managerId) {
|
||||||
|
EntityData entityData = new EntityData();
|
||||||
|
entityData.setId(id);
|
||||||
|
entityData.setStatus(status);
|
||||||
|
entityData.setManagerId(managerId);
|
||||||
|
entityData.setReviewTime(new Date());
|
||||||
|
return R.data(entityDataService.updateById(entityData));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.kening.vordm.controller;
|
||||||
|
|
||||||
|
import com.kening.vordm.service.DisasterInfoService;
|
||||||
|
import com.kening.vordm.service.EmailService;
|
||||||
|
import com.kening.vordm.vo.UserVo;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springblade.core.tool.api.R;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.mail.MessagingException;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/ui/login")
|
||||||
|
public class LoginController {
|
||||||
|
|
||||||
|
|
||||||
|
//实体数据服务层
|
||||||
|
private final DisasterInfoService disasterInfoService;
|
||||||
|
|
||||||
|
|
||||||
|
//邮箱发送服务
|
||||||
|
private final EmailService emailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户信息
|
||||||
|
*
|
||||||
|
* @param userVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/saveUserData")
|
||||||
|
public R saveUserData(@RequestBody UserVo userVo) {
|
||||||
|
return disasterInfoService.saveUserData(userVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱发送
|
||||||
|
* @param userVo
|
||||||
|
* @return
|
||||||
|
* @throws MessagingException
|
||||||
|
*/
|
||||||
|
@PostMapping("/sendUserPasswordEmail")
|
||||||
|
public R sendUserPasswordEmail(@RequestBody UserVo userVo) throws MessagingException {
|
||||||
|
return emailService.sendUserPasswordEmail(userVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据邮箱获取用户信息-游客信息
|
||||||
|
* @param email 邮箱
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getUserByEmail")
|
||||||
|
public R getUserByEmail(String email) {
|
||||||
|
return R.data(disasterInfoService.getUserByEmail(email));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getBladeUserByEmail")
|
||||||
|
public R getBladeUserByEmail(String email) {
|
||||||
|
return R.data(disasterInfoService.getBladeUserByEmail(email));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,8 +1,10 @@
|
||||||
package com.kening.vordm.controller;
|
package com.kening.vordm.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.kening.vordm.entity.DataUpload;
|
import com.kening.vordm.entity.DataUpload;
|
||||||
import com.kening.vordm.entity.EntityData;
|
import com.kening.vordm.entity.EntityData;
|
||||||
|
import com.kening.vordm.entity.Hotspot;
|
||||||
import com.kening.vordm.entity.OtherData;
|
import com.kening.vordm.entity.OtherData;
|
||||||
import com.kening.vordm.service.DataUploadService;
|
import com.kening.vordm.service.DataUploadService;
|
||||||
import com.kening.vordm.service.OtherDataService;
|
import com.kening.vordm.service.OtherDataService;
|
||||||
|
@ -11,6 +13,7 @@ import org.springblade.core.mp.support.Condition;
|
||||||
import org.springblade.core.mp.support.Query;
|
import org.springblade.core.mp.support.Query;
|
||||||
import org.springblade.core.secure.utils.AuthUtil;
|
import org.springblade.core.secure.utils.AuthUtil;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -65,10 +68,7 @@ public class OtherDataController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@DeleteMapping("/remove")
|
@DeleteMapping("/remove")
|
||||||
public R remove(@RequestParam Long id){
|
public R remove(@RequestParam String id){
|
||||||
EntityData entityData = new EntityData();
|
return R.status(service.removeByIds(Func.toLongList(id)));
|
||||||
entityData.setId(id);
|
|
||||||
entityData.setIsDeleted(1);
|
|
||||||
return R.status(service.updateById(entityData));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package com.kening.vordm.controller;
|
package com.kening.vordm.controller;
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.kening.vordm.entity.*;
|
import com.kening.vordm.entity.*;
|
||||||
import com.kening.vordm.service.HotspotService;
|
import com.kening.vordm.service.HotspotService;
|
||||||
import com.kening.vordm.service.PictureInfoService;
|
import com.kening.vordm.service.PictureInfoService;
|
||||||
|
@ -11,8 +13,10 @@ import lombok.AllArgsConstructor;
|
||||||
import org.springblade.core.mp.support.Condition;
|
import org.springblade.core.mp.support.Condition;
|
||||||
import org.springblade.core.mp.support.Query;
|
import org.springblade.core.mp.support.Query;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,25 +42,39 @@ public class PictureInfoController {
|
||||||
return R.data(service.page(Condition.getPage(query),Condition.getQueryWrapper(params,PictureInfo.class)));
|
return R.data(service.page(Condition.getPage(query),Condition.getQueryWrapper(params,PictureInfo.class)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getPictureInfoByDisasterId")
|
||||||
|
public R<List<PictureInfo>> getPictureInfoByDisasterId(Long disasterId){
|
||||||
|
LambdaQueryWrapper<PictureInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(PictureInfo::getDisasterId,disasterId);
|
||||||
|
return R.data(service.list(queryWrapper));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量上传
|
* 批量上传
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/upload")
|
@PostMapping("/upload")
|
||||||
public R audit(OtherData OtherData){
|
public R upload(OtherData OtherData){
|
||||||
return R.status(service.uploadData(OtherData));
|
return R.status(service.uploadData(OtherData));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改图片信息
|
||||||
|
* @param pictureInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/update")
|
||||||
|
public R upadte(PictureInfo pictureInfo){
|
||||||
|
return R.status(service.updatePicture(pictureInfo));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 逻辑删除图片数据
|
* 逻辑删除图片数据
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@DeleteMapping("/remove")
|
@DeleteMapping("/remove")
|
||||||
public R remove(@RequestParam Long id){
|
public R remove(@RequestParam String id){
|
||||||
PictureInfo pictureInfo = new PictureInfo();
|
return R.status(service.removeByIds(Func.toLongList(id)));
|
||||||
pictureInfo.setId(id);
|
|
||||||
pictureInfo.setIsDeleted(1);
|
|
||||||
return R.status(service.updateById(pictureInfo));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package com.kening.vordm.controller;
|
package com.kening.vordm.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.kening.vordm.entity.DisasterInfo;
|
import com.kening.vordm.entity.*;
|
||||||
import com.kening.vordm.entity.EntityData;
|
|
||||||
import com.kening.vordm.entity.RemoteSensingSourceData;
|
|
||||||
import com.kening.vordm.service.DisasterInfoService;
|
import com.kening.vordm.service.DisasterInfoService;
|
||||||
import com.kening.vordm.service.RemoteSensingSourceDataService;
|
import com.kening.vordm.service.RemoteSensingSourceDataService;
|
||||||
import com.kening.vordm.vo.GroupByUse;
|
import com.kening.vordm.vo.GroupByUse;
|
||||||
|
@ -13,11 +12,10 @@ import org.springblade.core.mp.support.Condition;
|
||||||
import org.springblade.core.mp.support.Query;
|
import org.springblade.core.mp.support.Query;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
import org.springblade.core.tool.utils.DateUtil;
|
import org.springblade.core.tool.utils.DateUtil;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -30,6 +28,7 @@ public class RemoteSensingSourceDataController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据页码和灾害信息查出遥感影像源数据,可多个灾害
|
* 根据页码和灾害信息查出遥感影像源数据,可多个灾害
|
||||||
|
*
|
||||||
* @param disasterInfo
|
* @param disasterInfo
|
||||||
* @param query
|
* @param query
|
||||||
* @return
|
* @return
|
||||||
|
@ -45,23 +44,31 @@ public class RemoteSensingSourceDataController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实体数据列表信息
|
* 实体数据列表信息
|
||||||
* @param remoteSensingSourceData 实体数据条件信息
|
*
|
||||||
|
* @param optionsJson 实体数据条件信息
|
||||||
* @param query current当前页 size 每页数据量
|
* @param query current当前页 size 每页数据量
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/Condition")
|
@GetMapping("/Condition")
|
||||||
public R<IPage<RemoteSensingSourceData>> getRemoteSensingSourceDataByCondition(RemoteSensingSourceData remoteSensingSourceData, Query query) {
|
public R<IPage<RemoteSensingSourceData>> getRemoteSensingSourceDataByCondition(String optionsJson, Query query) {
|
||||||
|
RemoteSensingSourceData remoteSensingSourceData = new RemoteSensingSourceData();
|
||||||
|
if (optionsJson != null) {
|
||||||
|
remoteSensingSourceData = (RemoteSensingSourceData) JSON.parseObject(optionsJson, RemoteSensingSourceData.class);
|
||||||
|
}
|
||||||
return R.data(remoteSensingSourceDataService.getRemoteSensingSourceDataByCondition(Condition.getPage(query), remoteSensingSourceData));
|
return R.data(remoteSensingSourceDataService.getRemoteSensingSourceDataByCondition(Condition.getPage(query), remoteSensingSourceData));
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * 根据页码和灾害信息查出遥感影像源数据,可多个灾害
|
* 实体数据列表信息
|
||||||
// * @param remoteSensingSourceData
|
*
|
||||||
// * @param query
|
* @param disasterId
|
||||||
// * @return
|
* @param query
|
||||||
// */
|
* @return
|
||||||
// @GetMapping("/Condition1")
|
*/
|
||||||
// public R<IPage<RemoteSensingSourceData>> getRemoteSensingSourceDataByCondition(RemoteSensingSourceData remoteSensingSourceData, Query query){
|
@GetMapping("/PagesData")
|
||||||
// return R.data(remoteSensingSourceDataService.page(Condition.getPage(query),Condition.getQueryWrapper(remoteSensingSourceData)));
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.kening.vordm.controller;
|
package com.kening.vordm.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.kening.vordm.entity.*;
|
import com.kening.vordm.entity.*;
|
||||||
import com.kening.vordm.service.HotspotService;
|
import com.kening.vordm.service.HotspotService;
|
||||||
import com.kening.vordm.service.OtherDataService;
|
import com.kening.vordm.service.OtherDataService;
|
||||||
|
@ -10,6 +11,7 @@ import lombok.AllArgsConstructor;
|
||||||
import org.springblade.core.mp.support.Condition;
|
import org.springblade.core.mp.support.Condition;
|
||||||
import org.springblade.core.mp.support.Query;
|
import org.springblade.core.mp.support.Query;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
|
import org.springblade.core.tool.utils.Func;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -63,6 +65,27 @@ public class VisualDataController {
|
||||||
return R.data(hotspotService.page(Condition.getPage(query),Condition.getQueryWrapper(params,Hotspot.class)));
|
return R.data(hotspotService.page(Condition.getPage(query),Condition.getQueryWrapper(params,Hotspot.class)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新词云数据
|
||||||
|
* @param wordCLouds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/updateWordCloud")
|
||||||
|
public R updateWordCloud(@RequestBody WordCLouds wordCLouds){
|
||||||
|
return R.status(wordCloudsService.updateById(wordCLouds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新热点数据
|
||||||
|
* @param hotspot
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/updateHotspot")
|
||||||
|
public R updateHotspot(@RequestBody Hotspot hotspot){
|
||||||
|
return R.status(hotspotService.updateById(hotspot));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 移除词云或者热点数据
|
* 移除词云或者热点数据
|
||||||
* @param id
|
* @param id
|
||||||
|
@ -70,17 +93,11 @@ public class VisualDataController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@DeleteMapping("/remove")
|
@DeleteMapping("/remove")
|
||||||
public R remove(@RequestParam Long id,@RequestParam Integer type){
|
public R remove(@RequestParam String id,@RequestParam Integer type){
|
||||||
if(type == 1){
|
if(type == 1){
|
||||||
WordCLouds wordCLouds = new WordCLouds();
|
return R.status(wordCloudsService.removeByIds(Func.toLongList(id)));
|
||||||
wordCLouds.setId(id);
|
|
||||||
wordCLouds.setIsDeleted(1);
|
|
||||||
return R.status(wordCloudsService.updateById(wordCLouds));
|
|
||||||
}else {
|
}else {
|
||||||
Hotspot hotspot = new Hotspot();
|
return R.status(hotspotService.removeByIds(Func.toLongList(id)));
|
||||||
hotspot.setId(id);
|
|
||||||
hotspot.setIsDeleted(1);
|
|
||||||
return R.status(hotspotService.updateById(hotspot));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,11 @@ public interface AdministratorMapper extends BaseMapper<Administrator> {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Long getChiefRole(@Param("roleName") String roleName);
|
Long getChiefRole(@Param("roleName") String roleName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据租户名称查询租户id
|
||||||
|
* @param tenantName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String getChiefTenant(@Param("tenantName") String tenantName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,4 +15,16 @@
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getChiefTenant" resultType="java.lang.String">
|
||||||
|
select
|
||||||
|
tenant_id
|
||||||
|
from blade_tenant
|
||||||
|
<where>
|
||||||
|
and is_deleted = 0
|
||||||
|
<if test="tenantName!=null and tenantName!=''">
|
||||||
|
and tenant_name = #{tenantName}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.kening.vordm.mapper;
|
||||||
|
|
||||||
|
import com.kening.vordm.vo.CenterDisasterInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangns
|
||||||
|
* @description 针对表【center_disaster_info】的数据库操作Mapper
|
||||||
|
* @createDate 2023-04-19 11:46:32
|
||||||
|
* @Entity com.kening.vordm.vo.CenterDisasterInfo
|
||||||
|
*/
|
||||||
|
public interface CenterDisasterInfoMapper extends BaseMapper<CenterDisasterInfo> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?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">
|
||||||
|
<mapper namespace="com.kening.vordm.mapper.CenterDisasterInfoMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.kening.vordm.vo.CenterDisasterInfo">
|
||||||
|
<result property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="disasterType" column="disaster_type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="disasterKeyword" column="disaster_keyword" jdbcType="VARCHAR"/>
|
||||||
|
<result property="disasterTime" column="disaster_time" jdbcType="DATE"/>
|
||||||
|
<result property="uploadTime" column="upload_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="geometry" column="geometry" jdbcType="VARCHAR"/>
|
||||||
|
<result property="disasterLevel" column="disaster_level" jdbcType="VARCHAR"/>
|
||||||
|
<result property="disasterCountry" column="disaster_country" jdbcType="VARCHAR"/>
|
||||||
|
<result property="respondStatus" column="respond_status" jdbcType="SMALLINT"/>
|
||||||
|
<result property="visitCount" column="visit_count" jdbcType="INTEGER"/>
|
||||||
|
<result property="downloadCount" column="download_count" jdbcType="INTEGER"/>
|
||||||
|
<result property="spiderType" column="spider_type" jdbcType="INTEGER"/>
|
||||||
|
<result property="tempendTime" column="tempend_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="tempStartTime" column="temp_start_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="vordmId" column="vordm_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="respondTime" column="respond_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="sponsorOrganization" column="sponsor_organization" jdbcType="VARCHAR"/>
|
||||||
|
<result property="dictValue" column="dict_value" jdbcType="VARCHAR"/>
|
||||||
|
<result property="disasterImg" column="disaster_img" jdbcType="VARCHAR"/>
|
||||||
|
<result property="size" column="size" jdbcType="DECIMAL"/>
|
||||||
|
<result property="news" column="news" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
|
<result property="applyTime" column="apply_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="reviewTime" column="review_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,disaster_type,disaster_keyword,
|
||||||
|
disaster_time,upload_time,geometry,
|
||||||
|
disaster_level,disaster_country,respond_status,
|
||||||
|
visit_count,download_count,spider_type,
|
||||||
|
tempend_time,temp_start_time,create_time,
|
||||||
|
vordm_id,respond_time,sponsor_organization,
|
||||||
|
dict_value,disaster_img,size,
|
||||||
|
news,user_name,status,
|
||||||
|
apply_time,review_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
|
@ -1,7 +1,9 @@
|
||||||
package com.kening.vordm.mapper;
|
package com.kening.vordm.mapper;
|
||||||
|
|
||||||
import com.kening.vordm.entity.CrawlInfo;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.kening.vordm.entity.CrawlInfo;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||||
<result property="manageId" column="manage_id" jdbcType="BIGINT"/>
|
<result property="manageId" column="manage_id" jdbcType="BIGINT"/>
|
||||||
<result property="staus" column="staus" jdbcType="INTEGER"/>
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
|
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
|
||||||
<result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
|
<result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
|
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
|
||||||
|
@ -18,7 +18,8 @@
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id,type,manage_id,
|
id,type,manage_id,
|
||||||
staus,disaster_id,start_time,
|
status,disaster_id,start_time,
|
||||||
end_time,keywords,range
|
end_time,keywords,range
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -20,7 +20,9 @@
|
||||||
select
|
select
|
||||||
di.disaster_keyword,
|
di.disaster_keyword,
|
||||||
bdb.dict_value as disasterType,
|
bdb.dict_value as disasterType,
|
||||||
di.id as disasterId
|
di.id as disasterId,
|
||||||
|
di.disaster_time as disasterTime,
|
||||||
|
di.disaster_country as disasterCountry
|
||||||
from entity_data ed
|
from entity_data ed
|
||||||
left join blade_user bu on bu.id = ed.uploader_id
|
left join blade_user bu on bu.id = ed.uploader_id
|
||||||
left join disaster_info di on di.id = ed.disaster_id
|
left join disaster_info di on di.id = ed.disaster_id
|
||||||
|
|
|
@ -4,14 +4,13 @@ package com.kening.vordm.mapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.kening.vordm.entity.DisasterInfo;
|
import com.kening.vordm.entity.DisasterInfo;
|
||||||
import com.kening.vordm.vo.CallForHelpVo;
|
import com.kening.vordm.vo.*;
|
||||||
import com.kening.vordm.vo.DisasterMangerInfo;
|
|
||||||
import com.kening.vordm.vo.GroupByUse;
|
|
||||||
import com.kening.vordm.vo.UserTenantVo;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.springblade.core.secure.BladeUser;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -49,4 +48,36 @@ public interface DisasterInfoMapper extends BaseMapper<DisasterInfo> {
|
||||||
List<GroupByUse> getLeft2Data();
|
List<GroupByUse> getLeft2Data();
|
||||||
|
|
||||||
List<CallForHelpVo> page(IPage page,@Param("callForHelpVo" )CallForHelpVo callForHelpVo);
|
List<CallForHelpVo> page(IPage page,@Param("callForHelpVo" )CallForHelpVo callForHelpVo);
|
||||||
|
|
||||||
|
Integer getUserEmail(@Param("email") String email);
|
||||||
|
|
||||||
|
Integer saveUserData(@Param("userVo") UserVo userVo);
|
||||||
|
|
||||||
|
UserVo getUserByEmail(String email);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取灾害数据 关联字典项
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DisasterInfo> getAllData(@Param("chiefId") Long chiefId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询每个月响应的灾害
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> getDisasterInfoByMouth(@Param("start") String start,@Param("end") String end,@Param("type") Integer type,@Param("chiefId") Long chiefId);
|
||||||
|
|
||||||
|
void updataUserByEmail(@Param("email") String email,@Param("password") String password);
|
||||||
|
|
||||||
|
List<DisasterInfo> listGetByYear(String year);
|
||||||
|
|
||||||
|
List<Map<String, Long>> visitAndDownLoad(String year);
|
||||||
|
|
||||||
|
List<Map<String, Long>> initiateAndResponseData(String year);
|
||||||
|
|
||||||
|
List<Map<String, Long>> chiefData(String year);
|
||||||
|
|
||||||
|
List<Map<String, Long>> adminData(String year);
|
||||||
|
|
||||||
|
List<Map<String, Long>> disasterNum(String year);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,21 +23,39 @@
|
||||||
<result property="vordmId" column="vordm_id" jdbcType="VARCHAR"/>
|
<result property="vordmId" column="vordm_id" jdbcType="VARCHAR"/>
|
||||||
<result property="respondTime" column="respond_time" jdbcType="TIMESTAMP"/>
|
<result property="respondTime" column="respond_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="sponsorOrganization" column="sponsor_organization" jdbcType="TIMESTAMP"/>
|
<result property="sponsorOrganization" column="sponsor_organization" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="respondedTime" column="responded_time" jdbcType="TIMESTAMP"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
di.id,di.disaster_type,di.disaster_keyword,
|
di.id
|
||||||
|
,di.disaster_type,di.disaster_keyword,
|
||||||
di.disaster_time,di.upload_time,di.geometry,
|
di.disaster_time,di.upload_time,di.geometry,
|
||||||
di.disaster_level,di.disaster_country,di.respond_status,
|
di.disaster_level,di.disaster_country,di.respond_status,
|
||||||
di.visit_count,di.spider_type,di.tempend_time,
|
di.visit_count,di.spider_type,di.tempend_time,
|
||||||
di.temp_start_time,di.create_time,di.vordm_id,
|
di.temp_start_time,di.create_time,di.vordm_id,
|
||||||
di.respond_time,di.download_count,di.sponsor_organization
|
di.respond_time,di.download_count,di.sponsor_organization,di.responded_time
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="Home_Disaster_Info">
|
<sql id="Home_Disaster_Info">
|
||||||
d.disaster_type,d.disaster_time,d.disaster_country,
|
d.disaster_type
|
||||||
|
,d.disaster_time,d.disaster_country,
|
||||||
m.organization
|
m.organization
|
||||||
</sql>
|
</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});
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updataUserByEmail">
|
||||||
|
UPDATE blade_user SET password = #{password}
|
||||||
|
<where>
|
||||||
|
<if test="email !=null and email != ''">
|
||||||
|
email = #{email}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="getDisasterInfoDetail" resultType="com.kening.vordm.entity.DisasterInfo">
|
<select id="getDisasterInfoDetail" resultType="com.kening.vordm.entity.DisasterInfo">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List"/>,
|
<include refid="Base_Column_List"/>,
|
||||||
|
@ -45,7 +63,8 @@
|
||||||
gi.organization AS sponsorOrganization,
|
gi.organization AS sponsorOrganization,
|
||||||
bu.name AS managerName,
|
bu.name AS managerName,
|
||||||
bu.organization AS managerOrganization,
|
bu.organization AS managerOrganization,
|
||||||
bdb.dict_value AS dictValue
|
bdb.dict_value AS dictValue,
|
||||||
|
gmdr.status AS guestManageDisasterRefStatus
|
||||||
from disaster_info di
|
from disaster_info di
|
||||||
left join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
|
left join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
|
||||||
left join blade_dict_biz bdb on bdb.dict_key = di.disaster_type
|
left join blade_dict_biz bdb on bdb.dict_key = di.disaster_type
|
||||||
|
@ -99,22 +118,43 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLeft3Data" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getLeft3Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
select t.sponsor_organization as `name`, count(*) as cnt, 'sponsorOrganization' as `type`
|
select gi.username as `name`, count(*) as cnt, 'sponsorOrganization' as `type`
|
||||||
from disaster_info t where t.sponsor_organization != ''
|
from disaster_info t
|
||||||
GROUP BY t.sponsor_organization
|
left join guest_manage_disaster_ref gmdr on gmdr.disaster_id = t.id
|
||||||
ORDER BY cnt desc LIMIT 3
|
left join guest_info gi on gi.id = gmdr.sponsor_id
|
||||||
|
where gi.username != ''
|
||||||
|
GROUP BY gi.username
|
||||||
|
ORDER BY cnt desc LIMIT 5
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLeft4Data" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getLeft4Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
select t.response_organization as `name`, count(*) as cnt, 'responseOrganization' as `type`
|
SELECT
|
||||||
from guest_manage_disaster_ref t where t.response_organization != '' GROUP BY t.response_organization ORDER BY cnt desc LIMIT 3
|
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
|
||||||
|
cnt DESC
|
||||||
|
LIMIT 5
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLeft1Data" resultType="com.kening.vordm.vo.GroupByUse">
|
<select id="getLeft1Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||||
select b.dict_key, b.dict_value as name, count(t.disaster_type) as cnt, 'type' as `type`,
|
select b.dict_key,
|
||||||
|
b.dict_value as name,
|
||||||
|
count(t.disaster_type) as cnt,
|
||||||
|
'type' as `type`,
|
||||||
CONCAT('/icon_disastertype/icon-', b.dict_key, '.png') as icon
|
CONCAT('/icon_disastertype/icon-', b.dict_key, '.png') as icon
|
||||||
from blade_dict_biz b left join disaster_info t on b.dict_key = t.disaster_type
|
from blade_dict_biz b
|
||||||
where b.`code` = 'disaster' and b.parent_id != 0
|
left join disaster_info t on b.dict_key = t.disaster_type
|
||||||
|
where b.`code` = 'disaster'
|
||||||
|
and b.parent_id != 0
|
||||||
group by b.dict_key, b.dict_value
|
group by b.dict_key, b.dict_value
|
||||||
order by cnt desc
|
order by cnt desc
|
||||||
limit 7
|
limit 7
|
||||||
|
@ -126,13 +166,18 @@
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
(select t.disaster_country as name, count(*) as cnt, 'country' as `type`
|
(select t.disaster_country as name, count(*) as cnt, 'country' as `type`
|
||||||
from disaster_info t
|
from disaster_info t
|
||||||
group by t.disaster_country
|
group by t.disaster_country limit 5) b on c.flagname = b.`name`
|
||||||
order by cnt desc limit 7) b on c.flagname = b.`name`
|
order by b.cnt desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="page" parameterType="com.kening.vordm.vo.CallForHelpVo" resultType="com.kening.vordm.vo.CallForHelpVo">
|
<select id="page" parameterType="com.kening.vordm.vo.CallForHelpVo" resultType="com.kening.vordm.vo.CallForHelpVo">
|
||||||
SELECT
|
SELECT
|
||||||
|
d.chief_id,
|
||||||
|
d.chief_name,
|
||||||
|
d.vordm_id,
|
||||||
u.username ,
|
u.username ,
|
||||||
|
u.last_name AS lastName,
|
||||||
|
u.first_name AS firstName,
|
||||||
u.id as uid ,
|
u.id as uid ,
|
||||||
u.email,
|
u.email,
|
||||||
u.research_field,
|
u.research_field,
|
||||||
|
@ -141,17 +186,19 @@
|
||||||
d.disaster_type,
|
d.disaster_type,
|
||||||
d.disaster_time,
|
d.disaster_time,
|
||||||
d.disaster_keyword,
|
d.disaster_keyword,
|
||||||
|
d.disaster_country,
|
||||||
|
d.disaster_level,
|
||||||
d.upload_time,
|
d.upload_time,
|
||||||
d.geometry,
|
d.geometry,
|
||||||
d.respond_status,
|
d.respond_status,
|
||||||
d.chief_id,
|
bdb.dict_value as dictValue
|
||||||
d.chief_name
|
|
||||||
|
|
||||||
From
|
From
|
||||||
guest_manage_disaster_ref ud join
|
guest_manage_disaster_ref ud join
|
||||||
guest_info u on u.id = ud.sponsor_id JOIN
|
guest_info u on u.id = ud.sponsor_id JOIN
|
||||||
disaster_info d on d.id = ud.disaster_id
|
disaster_info d on d.id = ud.disaster_id
|
||||||
|
left join blade_dict_biz bdb on d.disaster_type = bdb.dict_key
|
||||||
<where>
|
<where>
|
||||||
|
<if test="callForHelpVo.respondStatus!=null">
|
||||||
<if test="callForHelpVo.respondStatus == 0 or callForHelpVo.respondStatus == '0'">
|
<if test="callForHelpVo.respondStatus == 0 or callForHelpVo.respondStatus == '0'">
|
||||||
d.respond_status = 1 or d.respond_status = 0
|
d.respond_status = 1 or d.respond_status = 0
|
||||||
</if>
|
</if>
|
||||||
|
@ -161,10 +208,174 @@
|
||||||
<if test="callForHelpVo.respondStatus == 3 or callForHelpVo.respondStatus == '3'">
|
<if test="callForHelpVo.respondStatus == 3 or callForHelpVo.respondStatus == '3'">
|
||||||
d.respond_status = 2 or d.respond_status = 3
|
d.respond_status = 2 or d.respond_status = 3
|
||||||
</if>
|
</if>
|
||||||
|
</if>
|
||||||
<if test="callForHelpVo.chiefId != null">
|
<if test="callForHelpVo.chiefId != null">
|
||||||
d.chief_id = #{callForHelpVo.chiefId}
|
and d.chief_id is null
|
||||||
|
</if>
|
||||||
|
<if test="callForHelpVo.chiefIdEquals != null">
|
||||||
|
and d.chief_id = #{callForHelpVo.chiefIdEquals}
|
||||||
|
</if>
|
||||||
|
<if test="callForHelpVo.disasterType != null and 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>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by d.upload_time desc
|
order by d.upload_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getUserEmail" resultType="java.lang.Integer">
|
||||||
|
select count(id) from blade_user
|
||||||
|
<where>
|
||||||
|
<if test="email != null and email != ''">
|
||||||
|
email = #{email}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getUserByEmail" resultType="com.kening.vordm.vo.UserVo">
|
||||||
|
select password from blade_user
|
||||||
|
<where>
|
||||||
|
<if test="email != null and email != ''">
|
||||||
|
email = #{email}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getAllData" resultType="com.kening.vordm.entity.DisasterInfo">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List"/>,
|
||||||
|
bdb.dict_value AS dictValue
|
||||||
|
from disaster_info di
|
||||||
|
left join blade_dict_biz bdb on bdb.dict_key = di.disaster_type
|
||||||
|
<where>
|
||||||
|
<if test="chiefId != null">
|
||||||
|
di.chief_id = #{chiefId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDisasterInfoByMouth" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
<if test="type == 1">
|
||||||
|
date_format(di.disaster_time,'%m') AS date,
|
||||||
|
</if>
|
||||||
|
<if test="type == 2">
|
||||||
|
date_format(di.respond_time,'%m') AS date,
|
||||||
|
</if>
|
||||||
|
COUNT(1) AS value
|
||||||
|
FROM
|
||||||
|
disaster_info di
|
||||||
|
WHERE
|
||||||
|
di.respond_time BETWEEN #{start} AND #{end}
|
||||||
|
<if test="type == 2">
|
||||||
|
AND di.respond_status > 1
|
||||||
|
</if>
|
||||||
|
<if test="chiefId != null">
|
||||||
|
and di.chief_id = #{chiefId}
|
||||||
|
</if>
|
||||||
|
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>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
<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} 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 = '1123598816738675202' 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
|
||||||
|
where date_format(t.disaster_time,'%Y') = #{year} GROUP BY d.dict_value
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
<result property="visualFlag" column="visual_flag" jdbcType="INTEGER"/>
|
<result property="visualFlag" column="visual_flag" jdbcType="INTEGER"/>
|
||||||
<result property="visualLon" column="visual_lon" jdbcType="DOUBLE"/>
|
<result property="visualLon" column="visual_lon" jdbcType="DOUBLE"/>
|
||||||
<result property="visualLat" column="visual_lat" jdbcType="DOUBLE"/>
|
<result property="visualLat" column="visual_lat" jdbcType="DOUBLE"/>
|
||||||
<result property="examTime" column="exam_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
<result property="uploaderId" column="uploader_id" jdbcType="BIGINT"/>
|
<result property="uploaderId" column="uploader_id" jdbcType="BIGINT"/>
|
||||||
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
|
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
|
||||||
|
@ -28,15 +27,21 @@
|
||||||
ed.id,ed.title,ed.size,
|
ed.id,ed.title,ed.size,
|
||||||
ed.type,ed.link,ed.remark,
|
ed.type,ed.link,ed.remark,
|
||||||
ed.upload_time,ed.disaster_id,ed.visual_flag,
|
ed.upload_time,ed.disaster_id,ed.visual_flag,
|
||||||
ed.visual_lon,ed.visual_lat,ed.exam_time,
|
ed.visual_lon,ed.visual_lat,
|
||||||
ed.status,ed.uploader_id,ed.manager_id,
|
ed.status,ed.uploader_id,ed.manager_id,
|
||||||
ed.review_time, ed.source_organization
|
ed.review_time, ed.source_organization
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="getEntityDataList" resultType="com.kening.vordm.entity.EntityData">
|
<select id="getEntityDataList" resultType="com.kening.vordm.entity.EntityData">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>,
|
||||||
|
gi.username AS uploaderName,
|
||||||
|
ms.layer_name,
|
||||||
|
ms.vordm_id,
|
||||||
|
ms.name AS msName
|
||||||
from entity_data ed
|
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
|
||||||
<where>
|
<where>
|
||||||
<if test="entityData.disasterId != null and entityData.disasterId != ''">
|
<if test="entityData.disasterId != null and entityData.disasterId != ''">
|
||||||
ed.disaster_id = #{entityData.disasterId}
|
ed.disaster_id = #{entityData.disasterId}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.kening.vordm.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.kening.vordm.entity.GuestInfo;
|
import com.kening.vordm.entity.GuestInfo;
|
||||||
|
import com.kening.vordm.vo.UserVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -13,4 +15,17 @@ import com.kening.vordm.entity.GuestInfo;
|
||||||
public interface GuestInfoMapper extends BaseMapper<GuestInfo> {
|
public interface GuestInfoMapper extends BaseMapper<GuestInfo> {
|
||||||
|
|
||||||
|
|
||||||
|
UserVo getBladeUserByEmail(@Param("email") String email);
|
||||||
|
|
||||||
|
int updatePassword(@Param("email") String email,@Param("password") String password);
|
||||||
|
|
||||||
|
int updateAccount(@Param("userVo") UserVo userVo);
|
||||||
|
|
||||||
|
int getByUserStatisticsOne(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
int getByUserStatisticsTwo(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
int getByUserStatisticsThree(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
int getByUserStatisticsFour(@Param("userId") Long userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,72 @@
|
||||||
<result property="isManage" column="is_manage" jdbcType="INTEGER"/>
|
<result property="isManage" column="is_manage" jdbcType="INTEGER"/>
|
||||||
<result property="occupation" column="occupation" jdbcType="VARCHAR"/>
|
<result property="occupation" column="occupation" jdbcType="VARCHAR"/>
|
||||||
<result property="professionalTitle" column="professional_title" jdbcType="VARCHAR"/>
|
<result property="professionalTitle" column="professional_title" jdbcType="VARCHAR"/>
|
||||||
|
<result property="lastName" column="last_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="firstName" column="first_name" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id ,username,email,
|
id ,username,email,
|
||||||
organization,research_field,create_time,
|
organization,research_field,create_time,
|
||||||
is_manage,occupation,professional_title
|
is_manage,occupation,professional_title,last_name,first_name
|
||||||
</sql>
|
</sql>
|
||||||
|
<update id="updatePassword">
|
||||||
|
update blade_user t set t.password = #{password} where t.email = #{email}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<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}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="getBladeUserByEmail" resultType="com.kening.vordm.vo.UserVo">
|
||||||
|
select * FROM blade_user
|
||||||
|
<where>
|
||||||
|
email = #{email}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByUserStatisticsOne" resultType="java.lang.Integer">
|
||||||
|
select count(di.id)
|
||||||
|
FROM disaster_info di
|
||||||
|
inner join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
|
||||||
|
inner join guest_info gi on gi.id = gmdr.sponsor_id
|
||||||
|
inner join blade_user bu on bu.email = gi.email
|
||||||
|
<where>
|
||||||
|
bu.id = #{userId}
|
||||||
|
and di.respond_status = 3
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByUserStatisticsTwo" resultType="java.lang.Integer">
|
||||||
|
select count(di.id)
|
||||||
|
FROM disaster_info di
|
||||||
|
inner join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
|
||||||
|
inner join guest_info gi on gi.id = gmdr.sponsor_id
|
||||||
|
inner join blade_user bu on bu.email = gi.email
|
||||||
|
<where>
|
||||||
|
bu.id = #{userId}
|
||||||
|
and di.respond_status = 2
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByUserStatisticsThree" resultType="java.lang.Integer">
|
||||||
|
select count(ed.id)
|
||||||
|
FROM entity_data ed
|
||||||
|
<where>
|
||||||
|
ed.manager_id = #{userId}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByUserStatisticsFour" resultType="java.lang.Integer">
|
||||||
|
select count(ed.id)
|
||||||
|
FROM entity_data ed
|
||||||
|
left join guest_manage_disaster_ref gmdr on gmdr.disaster_id = ed.disaster_id
|
||||||
|
<where>
|
||||||
|
gmdr.manager_id = #{userId}
|
||||||
|
and ed.manager_id = null
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -7,15 +7,14 @@
|
||||||
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.GuestManageDisasterRef">
|
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.GuestManageDisasterRef">
|
||||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
<result property="sponsorId" column="sponsor_id" jdbcType="BIGINT"/>
|
<result property="sponsorId" column="sponsor_id" jdbcType="BIGINT"/>
|
||||||
<result property="uploaderId" column="uploader_id" jdbcType="BIGINT"/>
|
|
||||||
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
|
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
|
||||||
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
|
<result property="disasterId" column="disaster_id" jdbcType="BIGINT"/>
|
||||||
<result property="responseOrganization" column="response_organization"/>
|
<result property="status" column="status"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id,sponsor_id,uploader_id,
|
id,sponsor_id,
|
||||||
manager_id,disaster_id,response_organization
|
manager_id,disaster_id,status
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="queryPage" resultType="com.kening.vordm.entity.AdminManager">
|
<select id="queryPage" resultType="com.kening.vordm.entity.AdminManager">
|
||||||
|
@ -24,9 +23,12 @@
|
||||||
gmdr.sponsor_id,
|
gmdr.sponsor_id,
|
||||||
gmdr.manager_id,
|
gmdr.manager_id,
|
||||||
gmdr.disaster_id,
|
gmdr.disaster_id,
|
||||||
gmdr.response_organization,
|
|
||||||
gmdr.status,
|
gmdr.status,
|
||||||
|
gmdr.review_time,
|
||||||
|
gmdr.apply_time,
|
||||||
bu.name as managerName,
|
bu.name as managerName,
|
||||||
|
bu.research_field as researchField,
|
||||||
|
bu.occupation,
|
||||||
bdb.dict_value as disasterType,
|
bdb.dict_value as disasterType,
|
||||||
di.disaster_keyword,
|
di.disaster_keyword,
|
||||||
di.disaster_time,
|
di.disaster_time,
|
||||||
|
@ -38,7 +40,12 @@
|
||||||
left join blade_user bu on gmdr.manager_id = bu.id
|
left join blade_user bu on gmdr.manager_id = bu.id
|
||||||
left join blade_dict_biz bdb on bdb.dict_key = di.disaster_type
|
left join blade_dict_biz bdb on bdb.dict_key = di.disaster_type
|
||||||
<where>
|
<where>
|
||||||
and gmdr.status = 0
|
<if test="params.status==null and params.status==''">
|
||||||
|
and gmdr.status = 0 or gmdr.status = 1
|
||||||
|
</if>
|
||||||
|
<if test="params.status!=null and params.status!=''">
|
||||||
|
and gmdr.status = #{params.status}
|
||||||
|
</if>
|
||||||
<if test="params.managerName!=null and params.managerName!=''">
|
<if test="params.managerName!=null and params.managerName!=''">
|
||||||
and bu.name like concat('%',#{params.managerName},'%')
|
and bu.name like concat('%',#{params.managerName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -20,7 +20,10 @@
|
||||||
select
|
select
|
||||||
di.disaster_keyword,
|
di.disaster_keyword,
|
||||||
bdb.dict_value as disasterType,
|
bdb.dict_value as disasterType,
|
||||||
di.id as disasterId
|
di.id as disasterId,
|
||||||
|
di.disaster_time as disasterTime,
|
||||||
|
di.disaster_country as disasterCountry,
|
||||||
|
di.geometry
|
||||||
from disaster_info di
|
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>
|
||||||
|
|
|
@ -21,5 +21,4 @@ public interface RemoteSensingSourceDataMapper extends BaseMapper<RemoteSensingS
|
||||||
List<RemoteSensingSourceData> getRemoteSensingSourceData(@Param("disasterType") String disasterType,@Param("disasterCountry") String disasterCountry,@Param("disasterTime") String disasterTime);
|
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);
|
IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByCondition(@Param("remoteSensingSourceData") RemoteSensingSourceData remoteSensingSourceData, IPage<Object> page);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,11 +71,17 @@
|
||||||
<if test="remoteSensingSourceData.disasterId != null and remoteSensingSourceData.disasterId != ''">
|
<if test="remoteSensingSourceData.disasterId != null and remoteSensingSourceData.disasterId != ''">
|
||||||
r.disaster_id = #{remoteSensingSourceData.disasterId}
|
r.disaster_id = #{remoteSensingSourceData.disasterId}
|
||||||
</if>
|
</if>
|
||||||
<if test="remoteSensingSourceData.productResolution != null and remoteSensingSourceData.productResolution != ''">
|
<if test="remoteSensingSourceData.productResolutionMax != null and remoteSensingSourceData.productResolutionMin != null">
|
||||||
and r.product_resolution = #{remoteSensingSourceData.productResolution}
|
and r.product_resolution >= #{remoteSensingSourceData.productResolutionMin} and r.product_resolution < #{remoteSensingSourceData.productResolutionMax}
|
||||||
</if>
|
</if>
|
||||||
<if test="remoteSensingSourceData.satelliteCode != null and remoteSensingSourceData.satelliteCode != ''">
|
<if test="remoteSensingSourceData.productResolutionMax == null and remoteSensingSourceData.productResolutionMin != null">
|
||||||
and r.satellite_code = #{remoteSensingSourceData.satelliteCode}
|
and r.product_resolution > #{remoteSensingSourceData.productResolutionMin}
|
||||||
|
</if>
|
||||||
|
<if test="remoteSensingSourceData.satelliteCodeListNew != null and remoteSensingSourceData.satelliteCodeListNew != '' and remoteSensingSourceData.satelliteCodeListNew.size() != 0">
|
||||||
|
and r.satellite_code in
|
||||||
|
<foreach item="AList" index="index" collection="remoteSensingSourceData.satelliteCodeListNew"
|
||||||
|
open="(" separator="," close=")">#{AList}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.kening.vordm.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.kening.vordm.entity.SerialNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author G1393
|
||||||
|
* @description 针对表【serial_number】的数据库操作Mapper
|
||||||
|
* @createDate 2023-04-21 11:22:19
|
||||||
|
* @Entity new.domain.SerialNumber
|
||||||
|
*/
|
||||||
|
public interface SerialNumberMapper extends BaseMapper<SerialNumber> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?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">
|
||||||
|
<mapper namespace="com.kening.vordm.mapper.SerialNumberMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.SerialNumber">
|
||||||
|
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="number" column="number" jdbcType="INTEGER"/>
|
||||||
|
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="operateTime" column="operate_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,number,type,
|
||||||
|
operate_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
|
@ -18,6 +18,8 @@
|
||||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||||
<result property="voluntaryFlag" column="voluntary_flag" jdbcType="INTEGER"/>
|
<result property="voluntaryFlag" column="voluntary_flag" jdbcType="INTEGER"/>
|
||||||
<result property="uploader" column="uploader" jdbcType="BIGINT"/>
|
<result property="uploader" column="uploader" jdbcType="BIGINT"/>
|
||||||
|
<result property="show_name" column="show_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="e_mail" column="e_mail" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
|
@ -25,6 +27,6 @@
|
||||||
Introduction,link,detail,
|
Introduction,link,detail,
|
||||||
create_time,upload_id,manager_id,
|
create_time,upload_id,manager_id,
|
||||||
review_time,type,voluntary_flag,
|
review_time,type,voluntary_flag,
|
||||||
uploader
|
uploader,show_name,e_mail
|
||||||
</sql>
|
</sql>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -20,7 +20,9 @@
|
||||||
select
|
select
|
||||||
di.disaster_keyword,
|
di.disaster_keyword,
|
||||||
bdb.dict_value as disasterType,
|
bdb.dict_value as disasterType,
|
||||||
di.id as disasterId
|
di.id as disasterId,
|
||||||
|
di.disaster_time as disasterTime,
|
||||||
|
di.disaster_country as disasterCountry
|
||||||
from disaster_info di
|
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>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.WordCLouds">
|
<resultMap id="BaseResultMap" type="com.kening.vordm.entity.WordCLouds">
|
||||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
<result property="time" column="time" jdbcType="TIMESTAMP"/>
|
<result property="date" column="date" jdbcType="TIMESTAMP"/>
|
||||||
<result property="frequency" column="frequency" jdbcType="INTEGER"/>
|
<result property="frequency" column="frequency" jdbcType="INTEGER"/>
|
||||||
<result property="word" column="word" jdbcType="VARCHAR"/>
|
<result property="word" column="word" jdbcType="VARCHAR"/>
|
||||||
<result property="disasterId" column="disaster_id" jdbcType="INTEGER"/>
|
<result property="disasterId" column="disaster_id" jdbcType="INTEGER"/>
|
||||||
|
@ -14,18 +14,20 @@
|
||||||
<result property="status" column="status" jdbcType="SMALLINT"/>
|
<result property="status" column="status" jdbcType="SMALLINT"/>
|
||||||
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
|
<result property="managerId" column="manager_id" jdbcType="BIGINT"/>
|
||||||
<result property="reviewTime" column="review_time" jdbcType="TIMESTAMP"/>
|
<result property="reviewTime" column="review_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="type" column="type" jdbcType="TIMESTAMP"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id,time,frequency,
|
id,date,frequency,
|
||||||
word,disaster_id,create_time,
|
word,disaster_id,create_time,
|
||||||
status,manager_id,review_time
|
status,manager_id,review_time
|
||||||
</sql>
|
</sql>
|
||||||
<select id="wordCount" resultType="com.kening.vordm.entity.WorldCharts" parameterType="java.lang.Long">
|
<select id="wordCount" resultType="com.kening.vordm.entity.WorldCharts" parameterType="java.lang.Long">
|
||||||
select
|
select
|
||||||
DATE_FORMAT(time,'%Y-%m-%d') date,
|
DATE_FORMAT(create_time,'%Y-%m-%d') date,
|
||||||
frequency value,
|
frequency value,
|
||||||
word name
|
word name,
|
||||||
|
type
|
||||||
from word_clouds
|
from word_clouds
|
||||||
<where>
|
<where>
|
||||||
and `status` = 1
|
and `status` = 1
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.kening.vordm.service;
|
||||||
|
|
||||||
|
import com.kening.vordm.vo.CenterDisasterInfo;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangns
|
||||||
|
* @description 针对表【center_disaster_info】的数据库操作Service
|
||||||
|
* @createDate 2023-04-19 11:46:32
|
||||||
|
*/
|
||||||
|
public interface CenterDisasterInfoService extends IService<CenterDisasterInfo> {
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,9 @@
|
||||||
package com.kening.vordm.service;
|
package com.kening.vordm.service;
|
||||||
|
|
||||||
import com.kening.vordm.entity.CrawlInfo;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.kening.vordm.entity.CrawlInfo;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
|
|
|
@ -4,12 +4,12 @@ package com.kening.vordm.service;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.kening.vordm.entity.DisasterInfo;
|
import com.kening.vordm.entity.DisasterInfo;
|
||||||
import com.kening.vordm.vo.CallForHelpVo;
|
import com.kening.vordm.entity.GuestInfo;
|
||||||
import com.kening.vordm.vo.DisasterMangerInfo;
|
import com.kening.vordm.vo.*;
|
||||||
import com.kening.vordm.vo.GroupByUse;
|
import org.springblade.core.tool.api.R;
|
||||||
import com.kening.vordm.vo.UserTenantVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -55,4 +55,21 @@ public interface DisasterInfoService extends IService<DisasterInfo> {
|
||||||
Boolean addVisitCount(Long id);
|
Boolean addVisitCount(Long id);
|
||||||
|
|
||||||
IPage<CallForHelpVo> page(IPage<CallForHelpVo> page, CallForHelpVo callForHelpVo);
|
IPage<CallForHelpVo> page(IPage<CallForHelpVo> page, CallForHelpVo callForHelpVo);
|
||||||
|
|
||||||
|
R saveUserData(UserVo userVo);
|
||||||
|
/**
|
||||||
|
* 后台管理系统-控制台灾害各项统计
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String,Object> statistics(String year);
|
||||||
|
|
||||||
|
boolean removeManage(List<DisasterInfo> disasterInfoList);
|
||||||
|
|
||||||
|
GuestInfo getUserByEmail(String email);
|
||||||
|
|
||||||
|
UserVo getBladeUserByEmail(String email);
|
||||||
|
|
||||||
|
Integer getByUserDisasterInfo(Long userId, Long disasterId);
|
||||||
|
|
||||||
|
UserVo getByUserDisasterInfoStatistics(Long userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.kening.vordm.service;
|
||||||
|
|
||||||
|
|
||||||
import com.kening.vordm.entity.Email;
|
import com.kening.vordm.entity.Email;
|
||||||
|
import com.kening.vordm.vo.UserVo;
|
||||||
|
import org.springblade.core.tool.api.R;
|
||||||
|
|
||||||
import javax.mail.MessagingException;
|
import javax.mail.MessagingException;
|
||||||
|
|
||||||
|
@ -14,4 +16,6 @@ public interface EmailService {
|
||||||
void sendMimeMessage(Email email) throws MessagingException;
|
void sendMimeMessage(Email email) throws MessagingException;
|
||||||
|
|
||||||
void sendTemplate(Email email) throws MessagingException;
|
void sendTemplate(Email email) throws MessagingException;
|
||||||
|
|
||||||
|
R sendUserPasswordEmail(UserVo userVo) throws MessagingException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.kening.vordm.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.kening.vordm.entity.GuestInfo;
|
import com.kening.vordm.entity.GuestInfo;
|
||||||
|
import com.kening.vordm.vo.UserVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -11,4 +12,7 @@ import com.kening.vordm.entity.GuestInfo;
|
||||||
*/
|
*/
|
||||||
public interface GuestInfoService extends IService<GuestInfo> {
|
public interface GuestInfoService extends IService<GuestInfo> {
|
||||||
|
|
||||||
|
Boolean updatePassword(String oldPassword, String password, String email);
|
||||||
|
|
||||||
|
Boolean updateAccount(UserVo userVo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,15 @@ public interface PictureInfoService extends IService<PictureInfo> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传图片信息数据
|
* 上传图片信息数据
|
||||||
|
* @param otherData
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean uploadData(OtherData otherData);
|
boolean uploadData(OtherData otherData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改图片信息
|
||||||
|
* @param pictureInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean updatePicture(PictureInfo pictureInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.kening.vordm.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.kening.vordm.entity.SerialNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author G1393
|
||||||
|
* @description 针对表【serial_number】的数据库操作Service
|
||||||
|
* @createDate 2023-04-21 11:22:19
|
||||||
|
*/
|
||||||
|
public interface SerialNumberService extends IService<SerialNumber> {
|
||||||
|
|
||||||
|
|
||||||
|
String generateNumbering(String disasterType);
|
||||||
|
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ import com.kening.vordm.mapper.AdministratorMapper;
|
||||||
import com.kening.vordm.service.AdministratorService;
|
import com.kening.vordm.service.AdministratorService;
|
||||||
import com.kening.vordm.service.EmailService;
|
import com.kening.vordm.service.EmailService;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||||
import org.springblade.core.tool.utils.DigestUtil;
|
import org.springblade.core.tool.utils.DigestUtil;
|
||||||
|
@ -25,10 +26,14 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class AdministratorServiceImpl extends BaseServiceImpl<AdministratorMapper,Administrator> implements AdministratorService {
|
public class AdministratorServiceImpl extends BaseServiceImpl<AdministratorMapper,Administrator> implements AdministratorService {
|
||||||
|
|
||||||
private EmailService emailService;
|
private final EmailService emailService;
|
||||||
|
|
||||||
|
|
||||||
|
@Value("${mail.home.link}")
|
||||||
|
private String link;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色名称获取角色id
|
* 根据角色名称获取角色id
|
||||||
|
@ -52,7 +57,8 @@ public class AdministratorServiceImpl extends BaseServiceImpl<AdministratorMappe
|
||||||
if(admin!=null){
|
if(admin!=null){
|
||||||
throw new RuntimeException("The account has been registered");
|
throw new RuntimeException("The account has been registered");
|
||||||
}
|
}
|
||||||
administrator.setTenantId("595035");
|
String tenantId = baseMapper.getChiefTenant("VORDM");
|
||||||
|
administrator.setTenantId(tenantId);
|
||||||
administrator.setUserType(1);
|
administrator.setUserType(1);
|
||||||
administrator.setRealName(administrator.getName());
|
administrator.setRealName(administrator.getName());
|
||||||
//密码默认为1234
|
//密码默认为1234
|
||||||
|
@ -60,22 +66,22 @@ public class AdministratorServiceImpl extends BaseServiceImpl<AdministratorMappe
|
||||||
//角色为chief
|
//角色为chief
|
||||||
Long roleId = baseMapper.getChiefRole("chief");
|
Long roleId = baseMapper.getChiefRole("chief");
|
||||||
administrator.setRoleId(String.valueOf(roleId));
|
administrator.setRoleId(String.valueOf(roleId));
|
||||||
|
//保存chief管理员信息
|
||||||
save(administrator);
|
save(administrator);
|
||||||
try{
|
try{
|
||||||
//设置标题
|
//设置标题
|
||||||
String subject = "Welcome to register";
|
String subject = "Welcome to register";
|
||||||
//设置要使用的模板
|
|
||||||
String emailTemplate = "email";
|
|
||||||
//设置要填充模板的参数
|
//设置要填充模板的参数
|
||||||
Map<String, Object> dataMap = new HashMap<>();
|
Map<String, Object> dataMap = new HashMap<>();
|
||||||
dataMap.put("account", administrator.getAccount());
|
dataMap.put("account", administrator.getAccount());
|
||||||
|
//默认密码 1234
|
||||||
dataMap.put("password", "1234");
|
dataMap.put("password", "1234");
|
||||||
|
dataMap.put("link",link);
|
||||||
dataMap.put("time", LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy/MM/dd")));
|
dataMap.put("time", LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy/MM/dd")));
|
||||||
Email email = new Email();
|
Email email = new Email();
|
||||||
email.setSubject(subject);
|
email.setSubject(subject);
|
||||||
email.setDataMap(dataMap);
|
email.setDataMap(dataMap);
|
||||||
email.setTos(new String[]{administrator.getEmail()});
|
email.setTos(new String[]{administrator.getEmail()});
|
||||||
email.setForm("15806764589@163.com");
|
|
||||||
emailService.sendTemplate(email);
|
emailService.sendTemplate(email);
|
||||||
log.info("邮件发送成功");
|
log.info("邮件发送成功");
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.kening.vordm.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.kening.vordm.vo.CenterDisasterInfo;
|
||||||
|
import com.kening.vordm.service.CenterDisasterInfoService;
|
||||||
|
import com.kening.vordm.mapper.CenterDisasterInfoMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangns
|
||||||
|
* @description 针对表【center_disaster_info】的数据库操作Service实现
|
||||||
|
* @createDate 2023-04-19 11:46:32
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CenterDisasterInfoServiceImpl extends ServiceImpl<CenterDisasterInfoMapper, CenterDisasterInfo>
|
||||||
|
implements CenterDisasterInfoService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,11 @@ package com.kening.vordm.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.kening.vordm.entity.CrawlInfo;
|
import com.kening.vordm.entity.CrawlInfo;
|
||||||
import com.kening.vordm.service.CrawlInfoService;
|
|
||||||
import com.kening.vordm.mapper.CrawlInfoMapper;
|
import com.kening.vordm.mapper.CrawlInfoMapper;
|
||||||
|
import com.kening.vordm.service.CrawlInfoService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
* @description 针对表【crawl_info】的数据库操作Service实现
|
* @description 针对表【crawl_info】的数据库操作Service实现
|
||||||
|
@ -15,6 +16,8 @@ import org.springframework.stereotype.Service;
|
||||||
public class CrawlInfoServiceImpl extends ServiceImpl<CrawlInfoMapper, CrawlInfo>
|
public class CrawlInfoServiceImpl extends ServiceImpl<CrawlInfoMapper, CrawlInfo>
|
||||||
implements CrawlInfoService{
|
implements CrawlInfoService{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,37 @@
|
||||||
package com.kening.vordm.service.impl;
|
package com.kening.vordm.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import com.kening.vordm.entity.DisasterData;
|
||||||
import com.kening.vordm.entity.DisasterInfo;
|
import com.kening.vordm.entity.DisasterInfo;
|
||||||
|
import com.kening.vordm.entity.GuestInfo;
|
||||||
|
import com.kening.vordm.entity.GuestManageDisasterRef;
|
||||||
import com.kening.vordm.mapper.DisasterInfoMapper;
|
import com.kening.vordm.mapper.DisasterInfoMapper;
|
||||||
|
import com.kening.vordm.mapper.GuestInfoMapper;
|
||||||
import com.kening.vordm.service.DisasterInfoService;
|
import com.kening.vordm.service.DisasterInfoService;
|
||||||
import com.kening.vordm.vo.CallForHelpVo;
|
import com.kening.vordm.service.GuestManageDisasterRefService;
|
||||||
import com.kening.vordm.vo.DisasterMangerInfo;
|
import com.kening.vordm.vo.*;
|
||||||
import com.kening.vordm.vo.GroupByUse;
|
|
||||||
import com.kening.vordm.vo.UserTenantVo;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springblade.common.cache.CacheNames;
|
||||||
|
import org.springblade.core.redis.cache.BladeRedis;
|
||||||
|
import org.springblade.core.secure.utils.AuthUtil;
|
||||||
|
import org.springblade.core.tool.api.R;
|
||||||
|
import org.springblade.core.tool.constant.BladeConstant;
|
||||||
|
import org.springblade.core.tool.utils.DigestUtil;
|
||||||
|
import org.springblade.core.tool.utils.StringUtil;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -27,8 +43,15 @@ import java.util.List;
|
||||||
public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, DisasterInfo>
|
public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, DisasterInfo>
|
||||||
implements DisasterInfoService {
|
implements DisasterInfoService {
|
||||||
|
|
||||||
|
private final BladeRedis bladeRedis;
|
||||||
|
|
||||||
|
private final GuestInfoMapper guestInfoMapper;
|
||||||
|
|
||||||
|
private final GuestManageDisasterRefService guestManageDisasterRefService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回指定的灾害条目
|
* 返回指定的灾害条目
|
||||||
|
*
|
||||||
* @param type
|
* @param type
|
||||||
* @param country
|
* @param country
|
||||||
* @param time
|
* @param time
|
||||||
|
@ -42,6 +65,7 @@ implements DisasterInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于获取灾害id类型
|
* 用于获取灾害id类型
|
||||||
|
*
|
||||||
* @param disasterInfo
|
* @param disasterInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -69,6 +93,7 @@ implements DisasterInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取债害详情信息
|
* 获取债害详情信息
|
||||||
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -79,6 +104,7 @@ implements DisasterInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进行灾害信息的统计,国家,类型
|
* 进行灾害信息的统计,国家,类型
|
||||||
|
*
|
||||||
* @param name
|
* @param name
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -131,5 +157,233 @@ implements DisasterInfoService {
|
||||||
return page.setRecords(this.baseMapper.page(page, callForHelpVo));
|
return page.setRecords(this.baseMapper.page(page, callForHelpVo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R saveUserData(UserVo userVo) {
|
||||||
|
//通过邮箱判断当前用户是否存在
|
||||||
|
Integer userEmail = this.baseMapper.getUserEmail(userVo.getEmail());
|
||||||
|
if (userEmail > 0) {
|
||||||
|
return R.data(1405, "The current email is already bound to a user");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取验证码
|
||||||
|
String redisCode = bladeRedis.get(CacheNames.CAPTCHA_KEY + userVo.getKey());
|
||||||
|
// 判断验证码
|
||||||
|
if (userVo.getCode() == null || !StringUtil.equalsIgnoreCase(redisCode, userVo.getCode())) {
|
||||||
|
return R.data(1404, "Verification code error");
|
||||||
|
}
|
||||||
|
|
||||||
|
//密码
|
||||||
|
userVo.setPassword(DigestUtil.hex(userVo.getPassword()));
|
||||||
|
|
||||||
|
String emailPrefix = userVo.getEmail().substring(0, userVo.getEmail().indexOf("@"));
|
||||||
|
|
||||||
|
userVo.setName(emailPrefix);
|
||||||
|
Integer integer = this.baseMapper.saveUserData(userVo);
|
||||||
|
return R.status(integer > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移除管理灾害权限
|
||||||
|
* @param disasterInfoList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean removeManage(List<DisasterInfo> disasterInfoList) {
|
||||||
|
for (DisasterInfo disasterInfo : disasterInfoList) {
|
||||||
|
update(Wrappers.<DisasterInfo>lambdaUpdate()
|
||||||
|
.eq(DisasterInfo::getId, disasterInfo.getId())
|
||||||
|
.set(DisasterInfo::getChiefId, null));
|
||||||
|
}
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GuestInfo getUserByEmail(String email) {
|
||||||
|
LambdaQueryWrapper<GuestInfo> qw = new LambdaQueryWrapper<>();
|
||||||
|
qw.eq(GuestInfo::getEmail,email);
|
||||||
|
return guestInfoMapper.selectOne(qw);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserVo getBladeUserByEmail(String email) {
|
||||||
|
return guestInfoMapper.getBladeUserByEmail(email);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getByUserDisasterInfo(Long userId, Long disasterId) {
|
||||||
|
LambdaQueryWrapper<GuestManageDisasterRef> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(GuestManageDisasterRef::getDisasterId,disasterId);
|
||||||
|
queryWrapper.eq(GuestManageDisasterRef::getStatus,1);
|
||||||
|
queryWrapper.eq(GuestManageDisasterRef::getManagerId,userId);
|
||||||
|
return guestManageDisasterRefService.count(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserVo getByUserDisasterInfoStatistics(Long userId) {
|
||||||
|
//已响应
|
||||||
|
int byUserStatisticsOne = guestInfoMapper.getByUserStatisticsOne(userId);
|
||||||
|
//正在响应
|
||||||
|
int byUserStatisticsTwo = guestInfoMapper.getByUserStatisticsTwo(userId);
|
||||||
|
//已审核数据数量
|
||||||
|
int byUserStatisticsThree = guestInfoMapper.getByUserStatisticsThree(userId);
|
||||||
|
//待审核数据数量
|
||||||
|
int byUserStatisticsFour = guestInfoMapper.getByUserStatisticsFour(userId);
|
||||||
|
UserVo userVo = new UserVo();
|
||||||
|
userVo.setByUserStatisticsOne(byUserStatisticsOne);
|
||||||
|
userVo.setByUserStatisticsTwo(byUserStatisticsTwo);
|
||||||
|
userVo.setByUserStatisticsThree(byUserStatisticsThree);
|
||||||
|
userVo.setByUserStatisticsFour(byUserStatisticsFour);
|
||||||
|
return userVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 后台管理系统-控制台灾害各项统计
|
||||||
|
* @description 暂时没有条件查询 所有统计都暂时写在一个查询里面
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> statistics(String year) {
|
||||||
|
Map<String,Object> resultMap = Maps.newHashMap();
|
||||||
|
//boolean isAdmin = AuthUtil.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? true : false;
|
||||||
|
//查询灾害表数据
|
||||||
|
List<DisasterInfo> disasterInfoList = this.baseMapper.listGetByYear(year);
|
||||||
|
//统计head头部的数据
|
||||||
|
Map<String,Object> headMap = headData(disasterInfoList);
|
||||||
|
//访问量和下载量
|
||||||
|
List<Map<String,Long>> visitAndDownLoadData = this.baseMapper.visitAndDownLoad(year);
|
||||||
|
//响应量和发起量
|
||||||
|
List<Map<String,Long>> initiateAndResponseData = this.baseMapper.initiateAndResponseData(year);
|
||||||
|
//统计灾害发生区域占比
|
||||||
|
Map<String,Long> countryData = disasterCountryProportion(disasterInfoList);
|
||||||
|
//统计当年的灾害申请次数 按月查询
|
||||||
|
//List<Map<String,Object>> applyMonth = getDisasterReponseByMouth(1,isAdmin);
|
||||||
|
//统计灾害数量占比 那个饼图
|
||||||
|
List<Map<String,Long>> disasterNum = this.baseMapper.disasterNum(year);
|
||||||
|
//统计chief
|
||||||
|
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);
|
||||||
|
//响应量
|
||||||
|
resultMap.put("line",initiateAndResponseData);
|
||||||
|
//下载量
|
||||||
|
resultMap.put("vandd",visitAndDownLoadData);
|
||||||
|
//admin
|
||||||
|
resultMap.put("admin",adminfMap);
|
||||||
|
//chief
|
||||||
|
resultMap.put("chief",chiefMap);
|
||||||
|
//国家
|
||||||
|
resultMap.put("country",countryData);
|
||||||
|
//灾害类型分类
|
||||||
|
resultMap.put("disasterNum",disasterNum);
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public Map<String, Object> statistics(String year) {
|
||||||
|
// Map<String,Object> resultMap = Maps.newHashMap();
|
||||||
|
// boolean isAdmin = AuthUtil.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? true : false;
|
||||||
|
// //查询灾害表数据
|
||||||
|
// List<DisasterInfo> disasterInfoList = isAdmin ? list():list(Wrappers.<DisasterInfo>lambdaQuery().eq(DisasterInfo::getChiefId,AuthUtil.getUserId()));
|
||||||
|
// //统计head头部的数据
|
||||||
|
// Map<String,Object> headMap = headData(disasterInfoList);
|
||||||
|
// //统计灾害发生区域占比
|
||||||
|
// Map<String,Long> countryData = disasterCountryProportion(disasterInfoList);
|
||||||
|
// //统计当年的灾害申请次数 按月查询
|
||||||
|
// List<Map<String,Object>> applyMonth = getDisasterReponseByMouth(1,isAdmin);
|
||||||
|
// //统计灾害数量占比
|
||||||
|
// Map<String,Long> disasterNum = disasterNumProportion(isAdmin);
|
||||||
|
// //统计当年的灾害响应次数 按月查询
|
||||||
|
// List<Map<String,Object>> responseMonth = getDisasterReponseByMouth(2,isAdmin);
|
||||||
|
// resultMap.put("header",headMap);
|
||||||
|
// resultMap.put("country",countryData);
|
||||||
|
// resultMap.put("disasterNum",disasterNum);
|
||||||
|
// resultMap.put("responseMonth",responseMonth);
|
||||||
|
// resultMap.put("applyMonth",applyMonth);
|
||||||
|
// return resultMap;
|
||||||
|
// }
|
||||||
|
/**
|
||||||
|
* 统计head头部信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Map<String,Object> headData(List<DisasterInfo> disasterInfoList){
|
||||||
|
Map<String,Object> headMap = Maps.newHashMap();
|
||||||
|
//用户访问量
|
||||||
|
Integer visitCount = disasterInfoList.stream().map(DisasterInfo::getVisitCount).reduce(Integer::sum).orElse(0);
|
||||||
|
//数据下载量
|
||||||
|
Integer downloadCount = disasterInfoList.stream().map(DisasterInfo::getDownloadCount).reduce(Integer::sum).orElse(0);
|
||||||
|
//灾害响应申请次数
|
||||||
|
Integer size = disasterInfoList.size();
|
||||||
|
//灾害响应实际次数
|
||||||
|
Long actResponseNum = disasterInfoList.stream().filter(data-> data.getRespondStatus() > 1).count();
|
||||||
|
//灾害响应百分比
|
||||||
|
headMap.put("visitCount",visitCount);
|
||||||
|
headMap.put("downloadCount",downloadCount);
|
||||||
|
headMap.put("applyCount",size);
|
||||||
|
headMap.put("actResponseNum",actResponseNum);
|
||||||
|
return headMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*计算每个国家的灾害占比
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Map<String,Long> disasterCountryProportion(List<DisasterInfo> disasterInfoList){
|
||||||
|
Map<String,Long> proportionMap = new LinkedHashMap<>();
|
||||||
|
//根据国家分组统计次数以及总灾害的占比
|
||||||
|
disasterInfoList.stream().filter(data->
|
||||||
|
data.getDisasterCountry()!=null
|
||||||
|
).collect(Collectors.groupingBy(DisasterInfo::getDisasterCountry,Collectors.counting()))
|
||||||
|
.entrySet().stream().sorted(Map.Entry.<String,Long>comparingByValue().reversed()).limit(15).forEachOrdered(e -> proportionMap.put(e.getKey(), e.getValue()));
|
||||||
|
return proportionMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算每个灾害发生的次数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Map<String,Long> disasterNumProportion(boolean type){
|
||||||
|
List<DisasterInfo> disasterInfoList = baseMapper.getAllData(type ? null:AuthUtil.getUserId());
|
||||||
|
Map<String,Long> proportionMap = disasterInfoList.stream().filter(data->data.getDictValue()!=null).collect(Collectors.groupingBy(DisasterInfo::getDictValue,Collectors.counting()));
|
||||||
|
return proportionMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按月统计当年每个月的响应或者申请量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<Map<String, Object>> getDisasterReponseByMouth(Integer type,boolean isAdmin){
|
||||||
|
//统计每个月的个数
|
||||||
|
final String[] MONTH = new String[]{"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"};
|
||||||
|
int year = LocalDate.now().getYear();
|
||||||
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||||
|
//查询开始时间
|
||||||
|
String start = year + "-01-01 00:00:00";
|
||||||
|
//查询结束时间
|
||||||
|
String end = year + 1 + "-01-01 00:00:00";
|
||||||
|
List<Map<String, Object>> mapList = baseMapper.getDisasterInfoByMouth(start,end,type,isAdmin ? null:AuthUtil.getUserId());
|
||||||
|
List<DisasterData> disasterList = mapList.stream().map((map) -> {
|
||||||
|
return cn.hutool.core.bean.BeanUtil.mapToBean(map, DisasterData.class, true);
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
int size = MONTH.length;
|
||||||
|
Map<String, List<DisasterData>> collect = disasterList.stream().collect(Collectors.groupingBy(DisasterData::getDate));
|
||||||
|
for (int i = 0; i < size; ++i) {
|
||||||
|
Map<String, Object> result = Maps.newLinkedHashMap();
|
||||||
|
String month = MONTH[i];
|
||||||
|
List<DisasterData> disasterData = collect.get(month);
|
||||||
|
if (disasterData!=null&&!disasterData.isEmpty()){
|
||||||
|
DisasterData disasterData1 = disasterData.get(0);
|
||||||
|
result.put(year+"-"+month,disasterData1);
|
||||||
|
}else {
|
||||||
|
result.put(year+"-"+month,null);
|
||||||
|
}
|
||||||
|
resultList.add(result);
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
package com.kening.vordm.service.impl;
|
package com.kening.vordm.service.impl;
|
||||||
|
|
||||||
import com.kening.vordm.entity.Email;
|
import com.kening.vordm.entity.Email;
|
||||||
|
import com.kening.vordm.mapper.DisasterInfoMapper;
|
||||||
|
import com.kening.vordm.service.DisasterInfoService;
|
||||||
import com.kening.vordm.service.EmailService;
|
import com.kening.vordm.service.EmailService;
|
||||||
|
import com.kening.vordm.vo.UserVo;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springblade.core.secure.BladeUser;
|
||||||
|
import org.springblade.core.tool.api.R;
|
||||||
|
import org.springblade.core.tool.utils.DigestUtil;
|
||||||
import org.springblade.core.tool.utils.StringUtil;
|
import org.springblade.core.tool.utils.StringUtil;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.mail.javamail.JavaMailSender;
|
import org.springframework.mail.javamail.JavaMailSender;
|
||||||
|
@ -30,6 +36,8 @@ public class EmailServiceImpl implements EmailService {
|
||||||
|
|
||||||
private final TemplateEngine templateEngine;
|
private final TemplateEngine templateEngine;
|
||||||
|
|
||||||
|
private final DisasterInfoMapper disasterInfoMapper;
|
||||||
|
|
||||||
@Value("${spring.mail.username}")
|
@Value("${spring.mail.username}")
|
||||||
private String from;
|
private String from;
|
||||||
|
|
||||||
|
@ -44,6 +52,24 @@ public class EmailServiceImpl implements EmailService {
|
||||||
javaMailSender.send(buildTemplateMail(email));
|
javaMailSender.send(buildTemplateMail(email));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R sendUserPasswordEmail(UserVo userVo) throws MessagingException {
|
||||||
|
//通过邮箱判断当前用户是否存在
|
||||||
|
UserVo bladeUser = disasterInfoMapper.getUserByEmail(userVo.getEmail());
|
||||||
|
if (bladeUser == null || bladeUser.getPassword()==null){
|
||||||
|
return R.data(1405, "There are currently no bound users for this email");
|
||||||
|
}
|
||||||
|
disasterInfoMapper.updataUserByEmail(userVo.getEmail(),"1790ae2beb8e6c6a4c6744667e11c4ba26abeb09");
|
||||||
|
Email email = new Email();
|
||||||
|
email.setSubject("您的登录密码");
|
||||||
|
String encrypt = DigestUtil.encrypt(bladeUser.getPassword());
|
||||||
|
email.setText("Your login password has been updated to:“admin@#”");
|
||||||
|
email.setHtmlText(false);
|
||||||
|
email.setTos(userVo.getEmail().split(","));
|
||||||
|
javaMailSender.send(buildMimeMessage(email));
|
||||||
|
return R.status(true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建模板邮件
|
* 构建模板邮件
|
||||||
* @param email
|
* @param email
|
||||||
|
|
|
@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.kening.vordm.entity.EntityData;
|
import com.kening.vordm.entity.EntityData;
|
||||||
import com.kening.vordm.entity.GuestInfo;
|
import com.kening.vordm.entity.GuestInfo;
|
||||||
|
import com.kening.vordm.entity.RemoteSensingSourceData;
|
||||||
import com.kening.vordm.mapper.EntityDataMapper;
|
import com.kening.vordm.mapper.EntityDataMapper;
|
||||||
import com.kening.vordm.mapper.GuestInfoMapper;
|
import com.kening.vordm.mapper.GuestInfoMapper;
|
||||||
|
import com.kening.vordm.mapper.RemoteSensingSourceDataMapper;
|
||||||
import com.kening.vordm.service.EntityDataService;
|
import com.kening.vordm.service.EntityDataService;
|
||||||
import com.kening.vordm.vo.EntityDataUserVo;
|
import com.kening.vordm.vo.EntityDataUserVo;
|
||||||
import com.kening.vordm.vo.UserTenantVo;
|
import com.kening.vordm.vo.UserTenantVo;
|
||||||
|
@ -40,6 +42,7 @@ public class EntityDataServiceImpl extends ServiceImpl<EntityDataMapper, EntityD
|
||||||
|
|
||||||
private GuestInfoMapper guestInfoMapper;
|
private GuestInfoMapper guestInfoMapper;
|
||||||
|
|
||||||
|
private RemoteSensingSourceDataMapper remoteSensingSourceDataMapper;
|
||||||
/**
|
/**
|
||||||
* 验证码
|
* 验证码
|
||||||
*/
|
*/
|
||||||
|
@ -71,19 +74,6 @@ public class EntityDataServiceImpl extends ServiceImpl<EntityDataMapper, EntityD
|
||||||
public R saveEntityData(EntityDataUserVo entityDataUserVo) {
|
public R saveEntityData(EntityDataUserVo entityDataUserVo) {
|
||||||
//创建实体数据
|
//创建实体数据
|
||||||
EntityData entityData = new EntityData();
|
EntityData entityData = new EntityData();
|
||||||
//路径拼接
|
|
||||||
List<String> link = new ArrayList<>();
|
|
||||||
//文件大小
|
|
||||||
List<Long> size = new ArrayList<>();
|
|
||||||
//文件数据
|
|
||||||
List<MultipartFile> filesArray = entityDataUserVo.getFilesArray();
|
|
||||||
filesArray.stream().forEach(files->{
|
|
||||||
BladeFile bladeFile = minioTemplate.putFile(files);
|
|
||||||
//获取文件大小
|
|
||||||
Long fileSize = files.getSize();
|
|
||||||
link.add(bladeFile.getLink());
|
|
||||||
size.add(fileSize);
|
|
||||||
});
|
|
||||||
|
|
||||||
//判断上传用户是否存在
|
//判断上传用户是否存在
|
||||||
LambdaQueryWrapper<GuestInfo> qw = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<GuestInfo> qw = new LambdaQueryWrapper<>();
|
||||||
|
@ -105,6 +95,33 @@ public class EntityDataServiceImpl extends ServiceImpl<EntityDataMapper, EntityD
|
||||||
entityData.setUploaderId(guestInfo1.getId());
|
entityData.setUploaderId(guestInfo1.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entityDataUserVo.getType().equals("4")) {
|
||||||
|
RemoteSensingSourceData remoteSensingSourceData = new RemoteSensingSourceData();
|
||||||
|
remoteSensingSourceData.setDisasterId(entityDataUserVo.getDisasterId());
|
||||||
|
remoteSensingSourceData.setSourceOrganization(entityDataUserVo.getOrganization());
|
||||||
|
remoteSensingSourceData.setSatelliteCode(entityDataUserVo.getSatelliteCode());
|
||||||
|
remoteSensingSourceData.setProductResolution(entityDataUserVo.getProductResolution());
|
||||||
|
remoteSensingSourceData.setCloudCover(entityDataUserVo.getCloudCover());
|
||||||
|
remoteSensingSourceData.setProductTime(entityDataUserVo.getProductTime());
|
||||||
|
remoteSensingSourceData.setProductBandsNum(entityDataUserVo.getProductBandsNum());
|
||||||
|
remoteSensingSourceData.setStatus(1);
|
||||||
|
return R.status(remoteSensingSourceDataMapper.insert(remoteSensingSourceData) > 0);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
//路径拼接
|
||||||
|
List<String> link = new ArrayList<>();
|
||||||
|
//文件大小
|
||||||
|
List<Long> size = new ArrayList<>();
|
||||||
|
//文件数据
|
||||||
|
List<MultipartFile> filesArray = entityDataUserVo.getFilesArray();
|
||||||
|
filesArray.stream().forEach(files -> {
|
||||||
|
BladeFile bladeFile = minioTemplate.putFile(files);
|
||||||
|
//获取文件大小
|
||||||
|
Long fileSize = files.getSize();
|
||||||
|
link.add(bladeFile.getLink());
|
||||||
|
size.add(fileSize);
|
||||||
|
});
|
||||||
|
|
||||||
Long sum = size.stream().reduce(Long::sum).orElse(0L);
|
Long sum = size.stream().reduce(Long::sum).orElse(0L);
|
||||||
//实体数据
|
//实体数据
|
||||||
entityData.setTitle(entityDataUserVo.getTitle());
|
entityData.setTitle(entityDataUserVo.getTitle());
|
||||||
|
@ -114,8 +131,11 @@ public class EntityDataServiceImpl extends ServiceImpl<EntityDataMapper, EntityD
|
||||||
entityData.setUploadTime(new Date());
|
entityData.setUploadTime(new Date());
|
||||||
entityData.setRemark(entityDataUserVo.getRemark());
|
entityData.setRemark(entityDataUserVo.getRemark());
|
||||||
entityData.setSourceOrganization(entityDataUserVo.getOrganization());
|
entityData.setSourceOrganization(entityDataUserVo.getOrganization());
|
||||||
|
entityData.setType(entityDataUserVo.getType());
|
||||||
|
entityData.setTitle(entityDataUserVo.getTitle());
|
||||||
return R.status(this.baseMapper.insert(entityData) > 0);
|
return R.status(this.baseMapper.insert(entityData) > 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,49 @@
|
||||||
package com.kening.vordm.service.impl;
|
package com.kening.vordm.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.kening.vordm.entity.GuestInfo;
|
import com.kening.vordm.entity.GuestInfo;
|
||||||
import com.kening.vordm.mapper.GuestInfoMapper;
|
import com.kening.vordm.mapper.GuestInfoMapper;
|
||||||
import com.kening.vordm.service.GuestInfoService;
|
import com.kening.vordm.service.GuestInfoService;
|
||||||
|
import com.kening.vordm.vo.UserVo;
|
||||||
|
import org.springblade.core.cache.utils.CacheUtil;
|
||||||
|
import org.springblade.core.redis.cache.BladeRedis;
|
||||||
|
import org.springblade.core.tool.utils.DigestUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import static org.springblade.core.cache.constant.CacheConstant.USER_CACHE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
* @description 针对表【guest_info(游客信息表/志愿者)】的数据库操作Service实现
|
* @description 针对表【guest_info(游客信息表/志愿者)】的数据库操作Service实现
|
||||||
* @createDate 2023-04-04 15:54:30
|
* @createDate 2023-04-04 15:54:30
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
|
||||||
public class GuestInfoServiceImpl extends ServiceImpl<GuestInfoMapper, GuestInfo>
|
public class GuestInfoServiceImpl extends ServiceImpl<GuestInfoMapper, GuestInfo>
|
||||||
implements GuestInfoService {
|
implements GuestInfoService {
|
||||||
|
@Autowired
|
||||||
|
private BladeRedis bladeRedis;
|
||||||
|
@Override
|
||||||
|
public Boolean updatePassword(String oldPassword, String password, String email) {
|
||||||
|
String op = DigestUtil.encrypt(oldPassword);
|
||||||
|
UserVo user = this.baseMapper.getBladeUserByEmail(email);
|
||||||
|
int i = 0;
|
||||||
|
if(op.equals(user.getPassword())){
|
||||||
|
i = this.baseMapper.updatePassword(email, DigestUtil.encrypt(password));
|
||||||
|
CacheUtil.clear(USER_CACHE);
|
||||||
|
return i>0;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean updateAccount(UserVo userVo) {
|
||||||
|
int i = this.baseMapper.updateAccount(userVo);
|
||||||
|
CacheUtil.clear(USER_CACHE);
|
||||||
|
return i>0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.kening.vordm.entity.EntityData;
|
import com.kening.vordm.entity.EntityData;
|
||||||
import com.kening.vordm.entity.OtherData;
|
import com.kening.vordm.entity.OtherData;
|
||||||
import com.kening.vordm.mapper.DataUploadMapper;
|
|
||||||
import com.kening.vordm.mapper.OtherDataMapper;
|
import com.kening.vordm.mapper.OtherDataMapper;
|
||||||
import com.kening.vordm.service.DataUploadService;
|
|
||||||
import com.kening.vordm.service.OtherDataService;
|
import com.kening.vordm.service.OtherDataService;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -25,6 +23,7 @@ import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理员用户实现类
|
* 管理员用户实现类
|
||||||
|
*
|
||||||
* @author liyuchen
|
* @author liyuchen
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@ -51,6 +50,7 @@ public class OtherDataServiceImpl extends ServiceImpl<OtherDataMapper, EntityDat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @param params
|
* @param params
|
||||||
* @return
|
* @return
|
||||||
|
@ -63,6 +63,7 @@ public class OtherDataServiceImpl extends ServiceImpl<OtherDataMapper, EntityDat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色名称获取角色id
|
* 根据角色名称获取角色id
|
||||||
|
*
|
||||||
* @param roleName
|
* @param roleName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -73,13 +74,13 @@ public class OtherDataServiceImpl extends ServiceImpl<OtherDataMapper, EntityDat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传数据
|
* 上传数据
|
||||||
|
*
|
||||||
* @param OtherData
|
* @param OtherData
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean uploadData(OtherData OtherData) {
|
public boolean uploadData(OtherData OtherData) {
|
||||||
log.info("上传数据:{}",OtherData);
|
|
||||||
//路径拼接
|
//路径拼接
|
||||||
List<String> link = new ArrayList<>();
|
List<String> link = new ArrayList<>();
|
||||||
//文件大小
|
//文件大小
|
||||||
|
@ -106,6 +107,7 @@ public class OtherDataServiceImpl extends ServiceImpl<OtherDataMapper, EntityDat
|
||||||
entityData.setUploaderId(AuthUtil.getUserId());
|
entityData.setUploaderId(AuthUtil.getUserId());
|
||||||
entityData.setManagerId(AuthUtil.getUserId());
|
entityData.setManagerId(AuthUtil.getUserId());
|
||||||
entityData.setReviewTime(new Date());
|
entityData.setReviewTime(new Date());
|
||||||
|
entityData.setVisualFlag(OtherData.getVisualFlag());
|
||||||
return save(entityData);
|
return save(entityData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package com.kening.vordm.service.impl;
|
package com.kening.vordm.service.impl;
|
||||||
|
|
||||||
import com.alibaba.nacos.common.utils.StringUtils;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.kening.vordm.entity.EntityData;
|
|
||||||
import com.kening.vordm.entity.OtherData;
|
import com.kening.vordm.entity.OtherData;
|
||||||
import com.kening.vordm.entity.PictureInfo;
|
import com.kening.vordm.entity.PictureInfo;
|
||||||
import com.kening.vordm.mapper.PictureInfoMapper;
|
import com.kening.vordm.mapper.PictureInfoMapper;
|
||||||
|
@ -11,12 +9,10 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springblade.core.oss.MinioTemplate;
|
import org.springblade.core.oss.MinioTemplate;
|
||||||
import org.springblade.core.oss.model.BladeFile;
|
import org.springblade.core.oss.model.BladeFile;
|
||||||
import org.springblade.core.secure.utils.AuthUtil;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,6 +31,25 @@ implements PictureInfoService {
|
||||||
*/
|
*/
|
||||||
private MinioTemplate minioTemplate;
|
private MinioTemplate minioTemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改图片信息
|
||||||
|
* @param pictureInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean updatePicture(PictureInfo pictureInfo) {
|
||||||
|
MultipartFile multipartFile = pictureInfo.getFile();
|
||||||
|
BladeFile bladeFile = minioTemplate.putFile(multipartFile);
|
||||||
|
PictureInfo picture = new PictureInfo();
|
||||||
|
picture.setLink(bladeFile.getLink());
|
||||||
|
picture.setName(bladeFile.getOriginalName());
|
||||||
|
picture.setSize(multipartFile.getSize());
|
||||||
|
picture.setType(multipartFile.getOriginalFilename().substring(multipartFile.getOriginalFilename().indexOf(".")+1));
|
||||||
|
picture.setIsMain(pictureInfo.getIsMain());
|
||||||
|
picture.setId(pictureInfo.getId());
|
||||||
|
return updateById(picture);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传图片
|
* 上传图片
|
||||||
* @param otherData
|
* @param otherData
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
package com.kening.vordm.service.impl;
|
package com.kening.vordm.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.kening.vordm.entity.EntityData;
|
|
||||||
import com.kening.vordm.entity.RemoteSensingSourceData;
|
import com.kening.vordm.entity.RemoteSensingSourceData;
|
||||||
import com.kening.vordm.mapper.RemoteSensingSourceDataMapper;
|
import com.kening.vordm.mapper.RemoteSensingSourceDataMapper;
|
||||||
import com.kening.vordm.service.RemoteSensingSourceDataService;
|
import com.kening.vordm.service.RemoteSensingSourceDataService;
|
||||||
import com.kening.vordm.vo.GroupByUse;
|
import com.kening.vordm.vo.productResolutionVo;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author G1393
|
* @author G1393
|
||||||
|
@ -27,6 +31,35 @@ implements RemoteSensingSourceDataService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByCondition(IPage<Object> page, RemoteSensingSourceData remoteSensingSourceData) {
|
public IPage<RemoteSensingSourceData> getRemoteSensingSourceDataByCondition(IPage<Object> page, RemoteSensingSourceData remoteSensingSourceData) {
|
||||||
return this.baseMapper.getRemoteSensingSourceDataByCondition(remoteSensingSourceData, page);
|
List<productResolutionVo> productResolutionVos = remoteSensingSourceData.getProductResolutionVos();
|
||||||
|
String satelliteCodeList = remoteSensingSourceData.getSatelliteCodeList();
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
if (satelliteCodeList!=null) {
|
||||||
|
result = Arrays.asList(satelliteCodeList.split(","));
|
||||||
|
remoteSensingSourceData.setSatelliteCodeListNew(result);
|
||||||
|
}
|
||||||
|
IPage<RemoteSensingSourceData> remoteSensingSourceDataByCondition = new Page<>();
|
||||||
|
|
||||||
|
if (productResolutionVos != null && !productResolutionVos.isEmpty()){
|
||||||
|
List<RemoteSensingSourceData> remoteSensingSourceData1 = new ArrayList<>();
|
||||||
|
|
||||||
|
productResolutionVos.stream().forEach(productResolutionVo -> {
|
||||||
|
if (Objects.equals(productResolutionVo.getProductResolutionMax(), new Double("1000"))){
|
||||||
|
remoteSensingSourceData.setProductResolutionMax(null);
|
||||||
|
remoteSensingSourceData.setProductResolutionMin(productResolutionVo.getProductResolutionMin());
|
||||||
|
}else {
|
||||||
|
remoteSensingSourceData.setProductResolutionMin(productResolutionVo.getProductResolutionMin());
|
||||||
|
remoteSensingSourceData.setProductResolutionMax(productResolutionVo.getProductResolutionMax());
|
||||||
|
}
|
||||||
|
IPage<RemoteSensingSourceData> remoteSensingSourceDataByConditionNew = this.baseMapper.getRemoteSensingSourceDataByCondition(remoteSensingSourceData, page);
|
||||||
|
remoteSensingSourceData1.addAll(remoteSensingSourceDataByConditionNew.getRecords());
|
||||||
|
});
|
||||||
|
|
||||||
|
remoteSensingSourceDataByCondition.setRecords(remoteSensingSourceData1);
|
||||||
|
remoteSensingSourceDataByCondition.setTotal(remoteSensingSourceData1.size());
|
||||||
|
}else {
|
||||||
|
remoteSensingSourceDataByCondition = this.baseMapper.getRemoteSensingSourceDataByCondition(remoteSensingSourceData, page);
|
||||||
|
}
|
||||||
|
return remoteSensingSourceDataByCondition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.kening.vordm.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.kening.vordm.entity.SerialNumber;
|
||||||
|
import com.kening.vordm.mapper.SerialNumberMapper;
|
||||||
|
import com.kening.vordm.service.SerialNumberService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author G1393
|
||||||
|
* @description 针对表【serial_number】的数据库操作Service实现
|
||||||
|
* @createDate 2023-04-21 11:22:19
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SerialNumberServiceImpl extends ServiceImpl<SerialNumberMapper, SerialNumber>
|
||||||
|
implements SerialNumberService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String generateNumbering(String disasterType) {
|
||||||
|
LambdaQueryWrapper<SerialNumber> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(SerialNumber::getType,disasterType);
|
||||||
|
SerialNumber serialNumber = this.baseMapper.selectOne(queryWrapper);
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
//获取当前年
|
||||||
|
int year = calendar.get(Calendar.YEAR);
|
||||||
|
String num = "";
|
||||||
|
if (serialNumber.getNumber()<10){
|
||||||
|
num = year + disasterType +"000" + serialNumber.getNumber();
|
||||||
|
}else if(serialNumber.getNumber() < 100 && serialNumber.getNumber() > 10 ){
|
||||||
|
num = year + disasterType + "00" + serialNumber.getNumber();
|
||||||
|
}else if(serialNumber.getNumber() < 1000 && serialNumber.getNumber() > 99 ){
|
||||||
|
num = year + disasterType + "0" + serialNumber.getNumber();
|
||||||
|
}else if(serialNumber.getNumber() > 999){
|
||||||
|
num = year + disasterType + serialNumber.getNumber();
|
||||||
|
}
|
||||||
|
serialNumber.setNumber(serialNumber.getNumber()+1);
|
||||||
|
this.baseMapper.updateById(serialNumber);
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -11,3 +11,7 @@ mybatis-plus:
|
||||||
swagger:
|
swagger:
|
||||||
base-packages:
|
base-packages:
|
||||||
- com.kening.vordm
|
- com.kening.vordm
|
||||||
|
|
||||||
|
mail:
|
||||||
|
home:
|
||||||
|
link: http://192.168.31.77:8888
|
||||||
|
|
|
@ -66,23 +66,17 @@
|
||||||
<!--您好,感谢您的注册,这是一封验证邮件,请点击下面的链接完成注册,感谢您的支持!
|
<!--您好,感谢您的注册,这是一封验证邮件,请点击下面的链接完成注册,感谢您的支持!
|
||||||
<a href="#" th:href="@{http://www.baidu.com/register/{id}(id=${id})}">激活账号</a>-->
|
<a href="#" th:href="@{http://www.baidu.com/register/{id}(id=${id})}">激活账号</a>-->
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- <div class="header">
|
|
||||||
<h1>欢迎加入宠物之家!</h1>
|
|
||||||
</div>-->
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h2>Hello, thank you for your registration</h2>
|
<h2>Hello, thank you for your registration</h2>
|
||||||
<p>Your account number:<b><span th:text="${account}"></span></b></p>
|
<p>Your account number:<b><span th:text="${account}"></span></b></p>
|
||||||
<p>Your password:<b><span th:text="${password}"></span></b></p>
|
<p>Your password:<b><span th:text="${password}"></span></b></p>
|
||||||
<p>The date you registered:<b><span th:text="${time}"></span></b></p>
|
<p>The date you registered:<b><span th:text="${time}"></span></b></p>
|
||||||
<P><b>Please click login:<a href="http://192.168.31.77:8888">Point-me jump</a></b></P>
|
<P><b>Please click login:<a th:href="${link}">Point-me jump</a></b></P>
|
||||||
<p></p>
|
<p></p>
|
||||||
<!-- <p>当您在使用本网站时,务必要遵守法律法规</p>
|
|
||||||
<p>如果您有什么疑问可以联系管理员,Email: <b>r1624603357@126.com</b></p>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<p>This is system mail, please do not reply</p>
|
<p>This is system mail, please do not reply</p>
|
||||||
<p>Please take good care of your information to avoid misappropriation</p>
|
<p>Please take good care of your information to avoid misappropriation</p>
|
||||||
<!-- <p>©Rk</p>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
<?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>kn-setting</artifactId>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.kening.platform</groupId>
|
|
||||||
<artifactId>kn-setting-api</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.kening.setting;
|
|
||||||
|
|
||||||
import org.springblade.common.constant.CommonConstant;
|
|
||||||
import org.springblade.core.launch.BladeApplication;
|
|
||||||
import org.springframework.cloud.client.SpringCloudApplication;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author wanghongqing
|
|
||||||
* @date 2023/3/21 14:24
|
|
||||||
**/
|
|
||||||
@SpringCloudApplication
|
|
||||||
public class SettingApplication {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
BladeApplication.run(CommonConstant.KN_VORDM_SETTING, SettingApplication.class, args);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.kening.setting.config;
|
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author wanghongqing
|
|
||||||
* @date 2023/3/21 14:32
|
|
||||||
**/
|
|
||||||
@Configuration
|
|
||||||
@ComponentScan({"org.springblade", "com.kening.setting"})
|
|
||||||
@MapperScan({"org.springblade.**.mapper.**", "com.kening.**.mapper.**"})
|
|
||||||
public class VoRdmConfig {
|
|
||||||
}
|
|
|
@ -1,179 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.controller;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import com.kening.setting.entity.DictBiz;
|
|
||||||
import com.kening.setting.service.IDictBizService;
|
|
||||||
import com.kening.setting.vo.DictBizVO;
|
|
||||||
import com.kening.setting.wrapper.DictBizWrapper;
|
|
||||||
import io.swagger.annotations.*;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springblade.core.boot.ctrl.BladeController;
|
|
||||||
import org.springblade.core.cache.utils.CacheUtil;
|
|
||||||
import org.springblade.core.mp.support.Condition;
|
|
||||||
import org.springblade.core.mp.support.Query;
|
|
||||||
import org.springblade.core.tenant.annotation.NonDS;
|
|
||||||
import org.springblade.core.tool.api.R;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 控制器
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@NonDS
|
|
||||||
@RestController
|
|
||||||
@AllArgsConstructor
|
|
||||||
@RequestMapping("/dict-biz")
|
|
||||||
@Api(value = "业务字典", tags = "业务字典")
|
|
||||||
public class DictBizController extends BladeController {
|
|
||||||
|
|
||||||
private final IDictBizService dictService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
@GetMapping("/detail")
|
|
||||||
@ApiOperationSupport(order = 1)
|
|
||||||
@ApiOperation(value = "详情", notes = "传入dict")
|
|
||||||
public R<DictBizVO> detail(DictBiz dict) {
|
|
||||||
DictBiz detail = dictService.getOne(Condition.getQueryWrapper(dict));
|
|
||||||
return R.data(DictBizWrapper.build().entityVO(detail));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/list")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"),
|
|
||||||
@ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string")
|
|
||||||
})
|
|
||||||
@ApiOperationSupport(order = 2)
|
|
||||||
@ApiOperation(value = "列表", notes = "传入dict")
|
|
||||||
public R<List<DictBizVO>> list(@ApiIgnore @RequestParam Map<String, Object> dict) {
|
|
||||||
List<DictBiz> list = dictService.list(Condition.getQueryWrapper(dict, DictBiz.class).lambda().orderByAsc(DictBiz::getSort));
|
|
||||||
return R.data(DictBizWrapper.build().listNodeVO(list));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 顶级列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/parent-list")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"),
|
|
||||||
@ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string")
|
|
||||||
})
|
|
||||||
@ApiOperationSupport(order = 3)
|
|
||||||
@ApiOperation(value = "列表", notes = "传入dict")
|
|
||||||
public R<IPage<DictBizVO>> parentList(@ApiIgnore @RequestParam Map<String, Object> dict, Query query) {
|
|
||||||
return R.data(dictService.parentList(dict, query));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 子列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/child-list")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"),
|
|
||||||
@ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string"),
|
|
||||||
@ApiImplicitParam(name = "parentId", value = "字典名称", paramType = "query", dataType = "string")
|
|
||||||
})
|
|
||||||
@ApiOperationSupport(order = 4)
|
|
||||||
@ApiOperation(value = "列表", notes = "传入dict")
|
|
||||||
public R<List<DictBizVO>> childList(@ApiIgnore @RequestParam Map<String, Object> dict, @RequestParam(required = false, defaultValue = "-1") Long parentId) {
|
|
||||||
return R.data(dictService.childList(dict, parentId));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典树形结构
|
|
||||||
*/
|
|
||||||
@GetMapping("/tree")
|
|
||||||
@ApiOperationSupport(order = 5)
|
|
||||||
@ApiOperation(value = "树形结构", notes = "树形结构")
|
|
||||||
public R<List<DictBizVO>> tree() {
|
|
||||||
List<DictBizVO> tree = dictService.tree();
|
|
||||||
return R.data(tree);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典树形结构
|
|
||||||
*/
|
|
||||||
@GetMapping("/parent-tree")
|
|
||||||
@ApiOperationSupport(order = 5)
|
|
||||||
@ApiOperation(value = "树形结构", notes = "树形结构")
|
|
||||||
public R<List<DictBizVO>> parentTree() {
|
|
||||||
List<DictBizVO> tree = dictService.parentTree();
|
|
||||||
return R.data(tree);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增或修改
|
|
||||||
*/
|
|
||||||
@PostMapping("/submit")
|
|
||||||
@ApiOperationSupport(order = 6)
|
|
||||||
@ApiOperation(value = "新增或修改", notes = "传入dict")
|
|
||||||
public R submit(@Valid @RequestBody DictBiz dict) {
|
|
||||||
CacheUtil.clear(DICT_CACHE);
|
|
||||||
return R.status(dictService.submit(dict));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
*/
|
|
||||||
@PostMapping("/remove")
|
|
||||||
@ApiOperationSupport(order = 7)
|
|
||||||
@ApiOperation(value = "删除", notes = "传入ids")
|
|
||||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
|
||||||
CacheUtil.clear(DICT_CACHE);
|
|
||||||
return R.status(dictService.removeDict(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典
|
|
||||||
*/
|
|
||||||
@GetMapping("/dictionary")
|
|
||||||
@ApiOperationSupport(order = 8)
|
|
||||||
@ApiOperation(value = "获取字典", notes = "获取字典")
|
|
||||||
public R<List<DictBiz>> dictionary(String code) {
|
|
||||||
List<DictBiz> tree = dictService.getList(code);
|
|
||||||
return R.data(tree);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典树
|
|
||||||
*/
|
|
||||||
@GetMapping("/dictionary-tree")
|
|
||||||
@ApiOperationSupport(order = 9)
|
|
||||||
@ApiOperation(value = "获取字典树", notes = "获取字典树")
|
|
||||||
public R<List<DictBizVO>> dictionaryTree(String code) {
|
|
||||||
List<DictBiz> tree = dictService.getList(code);
|
|
||||||
return R.data(DictBizWrapper.build().listNodeVO(tree));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.mapper;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.kening.setting.entity.DictBiz;
|
|
||||||
import com.kening.setting.vo.DictBizVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mapper 接口
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
public interface DictBizMapper extends BaseMapper<DictBiz> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典表对应中文
|
|
||||||
*
|
|
||||||
* @param code 字典编号
|
|
||||||
* @param dictKey 字典序号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String getValue(String code, String dictKey);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典表
|
|
||||||
*
|
|
||||||
* @param code 字典编号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<DictBiz> getList(String code);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取树形节点
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<DictBizVO> tree();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取树形节点
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<DictBizVO> parentTree();
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
<?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">
|
|
||||||
<mapper namespace="com.kening.setting.mapper.DictBizMapper">
|
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
|
||||||
<resultMap id="dictResultMap" type="com.kening.setting.entity.DictBiz">
|
|
||||||
<id column="id" property="id"/>
|
|
||||||
<result column="tenant_id" property="tenantId"/>
|
|
||||||
<result column="parent_id" property="parentId"/>
|
|
||||||
<result column="code" property="code"/>
|
|
||||||
<result column="dict_key" property="dictKey"/>
|
|
||||||
<result column="dict_value" property="dictValue"/>
|
|
||||||
<result column="sort" property="sort"/>
|
|
||||||
<result column="remark" property="remark"/>
|
|
||||||
<result column="is_deleted" property="isDeleted"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
|
|
||||||
<id column="id" property="id"/>
|
|
||||||
<result column="parent_id" property="parentId"/>
|
|
||||||
<result column="title" property="title"/>
|
|
||||||
<result column="value" property="value"/>
|
|
||||||
<result column="key" property="key"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<select id="getValue" resultType="java.lang.String">
|
|
||||||
select
|
|
||||||
dict_value
|
|
||||||
from blade_dict_biz where code = #{param1} and dict_key = #{param2} and is_deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- oracle 版本 -->
|
|
||||||
<!--<select id="getValue" resultType="java.lang.String">
|
|
||||||
select
|
|
||||||
dict_value
|
|
||||||
from blade_dict_biz where code = #{param1, jdbcType=VARCHAR} and dict_key = #{param2} and dict_key >= 0 rownum 1
|
|
||||||
</select>-->
|
|
||||||
|
|
||||||
<select id="getList" resultMap="dictResultMap">
|
|
||||||
select id, parent_id, code, dict_key, dict_value, sort, remark from blade_dict_biz where code = #{param1} and parent_id > 0 and is_sealed = 0 and is_deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="tree" resultMap="treeNodeResultMap">
|
|
||||||
select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict_biz where is_deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="parentTree" resultMap="treeNodeResultMap">
|
|
||||||
select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict_biz where is_deleted = 0 and parent_id = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
|
@ -1,101 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.service;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.kening.setting.entity.DictBiz;
|
|
||||||
import com.kening.setting.vo.DictBizVO;
|
|
||||||
import org.springblade.core.mp.support.Query;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 服务类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
public interface IDictBizService extends IService<DictBiz> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 树形结构
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<DictBizVO> tree();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 树形结构
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<DictBizVO> parentTree();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典表对应中文
|
|
||||||
*
|
|
||||||
* @param code 字典编号
|
|
||||||
* @param dictKey 字典序号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String getValue(String code, String dictKey);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取字典表
|
|
||||||
*
|
|
||||||
* @param code 字典编号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<DictBiz> getList(String code);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增或修改
|
|
||||||
*
|
|
||||||
* @param dict
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
boolean submit(DictBiz dict);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除字典
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
boolean removeDict(String ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 顶级列表
|
|
||||||
*
|
|
||||||
* @param dict
|
|
||||||
* @param query
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
IPage<DictBizVO> parentList(Map<String, Object> dict, Query query);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 子列表
|
|
||||||
*
|
|
||||||
* @param dict
|
|
||||||
* @param parentId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<DictBizVO> childList(Map<String, Object> dict, Long parentId);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,121 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.kening.setting.cache.DictBizCache;
|
|
||||||
import com.kening.setting.entity.DictBiz;
|
|
||||||
import com.kening.setting.mapper.DictBizMapper;
|
|
||||||
import com.kening.setting.service.IDictBizService;
|
|
||||||
import com.kening.setting.vo.DictBizVO;
|
|
||||||
import com.kening.setting.wrapper.DictBizWrapper;
|
|
||||||
import org.springblade.common.constant.CommonConstant;
|
|
||||||
import org.springblade.core.cache.utils.CacheUtil;
|
|
||||||
import org.springblade.core.log.exception.ServiceException;
|
|
||||||
import org.springblade.core.mp.support.Condition;
|
|
||||||
import org.springblade.core.mp.support.Query;
|
|
||||||
import org.springblade.core.tool.constant.BladeConstant;
|
|
||||||
import org.springblade.core.tool.node.ForestNodeMerger;
|
|
||||||
import org.springblade.core.tool.utils.Func;
|
|
||||||
import org.springblade.core.tool.utils.StringPool;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 服务实现类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class DictBizServiceImpl extends ServiceImpl<DictBizMapper, DictBiz> implements IDictBizService {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<DictBizVO> tree() {
|
|
||||||
return ForestNodeMerger.merge(baseMapper.tree());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<DictBizVO> parentTree() {
|
|
||||||
return ForestNodeMerger.merge(baseMapper.parentTree());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getValue(String code, String dictKey) {
|
|
||||||
return Func.toStr(baseMapper.getValue(code, dictKey), StringPool.EMPTY);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<DictBiz> getList(String code) {
|
|
||||||
return baseMapper.getList(code);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean submit(DictBiz dict) {
|
|
||||||
LambdaQueryWrapper<DictBiz> lqw = Wrappers.<DictBiz>query().lambda().eq(DictBiz::getCode, dict.getCode()).eq(DictBiz::getDictKey, dict.getDictKey());
|
|
||||||
Integer cnt = baseMapper.selectCount((Func.isEmpty(dict.getId())) ? lqw : lqw.notIn(DictBiz::getId, dict.getId()));
|
|
||||||
if (cnt > 0) {
|
|
||||||
throw new ServiceException("当前字典键值已存在!");
|
|
||||||
}
|
|
||||||
// 修改顶级字典后同步更新下属字典的编号
|
|
||||||
if (Func.isNotEmpty(dict.getId()) && dict.getParentId().longValue() == BladeConstant.TOP_PARENT_ID) {
|
|
||||||
DictBiz parent = DictBizCache.getById(dict.getId());
|
|
||||||
this.update(Wrappers.<DictBiz>update().lambda().set(DictBiz::getCode, dict.getCode()).eq(DictBiz::getCode, parent.getCode()).ne(DictBiz::getParentId, BladeConstant.TOP_PARENT_ID));
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(dict.getParentId())) {
|
|
||||||
dict.setParentId(BladeConstant.TOP_PARENT_ID);
|
|
||||||
}
|
|
||||||
dict.setIsDeleted(BladeConstant.DB_NOT_DELETED);
|
|
||||||
CacheUtil.clear(DICT_CACHE);
|
|
||||||
return saveOrUpdate(dict);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean removeDict(String ids) {
|
|
||||||
Integer cnt = baseMapper.selectCount(Wrappers.<DictBiz>query().lambda().in(DictBiz::getParentId, Func.toLongList(ids)));
|
|
||||||
if (cnt > 0) {
|
|
||||||
throw new ServiceException("请先删除子节点!");
|
|
||||||
}
|
|
||||||
return removeByIds(Func.toLongList(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IPage<DictBizVO> parentList(Map<String, Object> dict, Query query) {
|
|
||||||
IPage<DictBiz> page = this.page(Condition.getPage(query), Condition.getQueryWrapper(dict, DictBiz.class).lambda().eq(DictBiz::getParentId, CommonConstant.TOP_PARENT_ID).orderByAsc(DictBiz::getSort));
|
|
||||||
return DictBizWrapper.build().pageVO(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<DictBizVO> childList(Map<String, Object> dict, Long parentId) {
|
|
||||||
if (parentId < 0) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
dict.remove("parentId");
|
|
||||||
DictBiz parentDict = DictBizCache.getById(parentId);
|
|
||||||
List<DictBiz> list = this.list(Condition.getQueryWrapper(dict, DictBiz.class).lambda().ne(DictBiz::getId, parentId).eq(DictBiz::getCode, parentDict.getCode()).orderByAsc(DictBiz::getSort));
|
|
||||||
return DictBizWrapper.build().listNodeVO(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,61 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the dreamlu.net developer nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived from
|
|
||||||
* this software without specific prior written permission.
|
|
||||||
* Author: Chill 庄骞 (smallchill@163.com)
|
|
||||||
*/
|
|
||||||
package com.kening.setting.wrapper;
|
|
||||||
|
|
||||||
import com.kening.setting.cache.DictBizCache;
|
|
||||||
import com.kening.setting.entity.DictBiz;
|
|
||||||
import com.kening.setting.vo.DictBizVO;
|
|
||||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
|
||||||
import org.springblade.core.tool.constant.BladeConstant;
|
|
||||||
import org.springblade.core.tool.node.ForestNodeMerger;
|
|
||||||
import org.springblade.core.tool.utils.BeanUtil;
|
|
||||||
import org.springblade.core.tool.utils.Func;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 包装类,返回视图层所需的字段
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
public class DictBizWrapper extends BaseEntityWrapper<DictBiz, DictBizVO> {
|
|
||||||
|
|
||||||
public static DictBizWrapper build() {
|
|
||||||
return new DictBizWrapper();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DictBizVO entityVO(DictBiz dict) {
|
|
||||||
DictBizVO dictVO = Objects.requireNonNull(BeanUtil.copy(dict, DictBizVO.class));
|
|
||||||
if (Func.equals(dict.getParentId(), BladeConstant.TOP_PARENT_ID)) {
|
|
||||||
dictVO.setParentName(BladeConstant.TOP_PARENT_NAME);
|
|
||||||
} else {
|
|
||||||
DictBiz parent = DictBizCache.getById(dict.getParentId());
|
|
||||||
dictVO.setParentName(parent.getDictValue());
|
|
||||||
}
|
|
||||||
return dictVO;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<DictBizVO> listNodeVO(List<DictBiz> list) {
|
|
||||||
List<DictBizVO> collect = list.stream().map(dict -> BeanUtil.copy(dict, DictBizVO.class)).collect(Collectors.toList());
|
|
||||||
return ForestNodeMerger.merge(collect);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
spring:
|
|
||||||
datasource:
|
|
||||||
url: ${kn.datasource.vordm.url}
|
|
||||||
username: ${kn.datasource.vordm.username}
|
|
||||||
password: ${kn.datasource.vordm.password}
|
|
|
@ -1,5 +0,0 @@
|
||||||
spring:
|
|
||||||
datasource:
|
|
||||||
url: ${kn.datasource.vordm.url}
|
|
||||||
username: ${kn.datasource.vordm.username}
|
|
||||||
password: ${kn.datasource.vordm.password}
|
|
|
@ -1,5 +0,0 @@
|
||||||
spring:
|
|
||||||
datasource:
|
|
||||||
url: ${kn.datasource.vordm.url}
|
|
||||||
username: ${kn.datasource.vordm.username}
|
|
||||||
password: ${kn.datasource.vordm.password}
|
|
|
@ -1,13 +0,0 @@
|
||||||
server:
|
|
||||||
port: 8106
|
|
||||||
|
|
||||||
#mybatis-plus配置
|
|
||||||
mybatis-plus:
|
|
||||||
mapper-locations: classpath:com/kening/**/mapper/*Mapper.xml
|
|
||||||
#实体扫描,多个package用逗号或者分号分隔
|
|
||||||
typeAliasesPackage: com.kening.**.entity
|
|
||||||
|
|
||||||
#swagger扫描路径配置
|
|
||||||
swagger:
|
|
||||||
base-packages:
|
|
||||||
- com.kening.setting
|
|
|
@ -5,6 +5,8 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<modules>
|
<modules>
|
||||||
<module>biz-vordm</module>
|
<module>biz-vordm</module>
|
||||||
|
<module>vordm-crawl</module>
|
||||||
|
<module>vordm-twitter</module>
|
||||||
<!-- <module>kn-setting</module>-->
|
<!-- <module>kn-setting</module>-->
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
@ -21,91 +23,10 @@
|
||||||
<description>微服务集合</description>
|
<description>微服务集合</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>org.hdrhistogram</groupId>
|
|
||||||
<artifactId>HdrHistogram</artifactId>
|
|
||||||
<version>2.1.12</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.javassist</groupId>
|
|
||||||
<artifactId>javassist</artifactId>
|
|
||||||
<version>3.25.0-GA</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.kening.platform</groupId>
|
<groupId>com.kening.platform</groupId>
|
||||||
<artifactId>kn-launcher</artifactId>
|
<artifactId>kn-launcher</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.springblade</groupId>
|
|
||||||
<artifactId>blade-core-boot</artifactId>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.oracle</groupId>
|
|
||||||
<artifactId>ojdbc7</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>HdrHistogram</artifactId>
|
|
||||||
<groupId>org.hdrhistogram</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>javassist</artifactId>
|
|
||||||
<groupId>org.javassist</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.microsoft.sqlserver</groupId>
|
|
||||||
<artifactId>mssql-jdbc</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.postgresql</groupId>
|
|
||||||
<artifactId>postgresql</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springblade</groupId>
|
|
||||||
<artifactId>blade-starter-oss</artifactId>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>esdk-obs-java</artifactId>
|
|
||||||
<groupId>com.huaweicloud</groupId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.minio</groupId>
|
|
||||||
<artifactId>minio</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-mock</artifactId>
|
|
||||||
<version>2.0.8</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springblade</groupId>
|
|
||||||
<artifactId>blade-starter-swagger</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springblade</groupId>
|
|
||||||
<artifactId>blade-starter-tenant</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!--邮件发送依赖-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-mail</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!--thymeleaf-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue