247 changed files with 7552 additions and 317 deletions
@ -0,0 +1,23 @@ |
|||
package com.epmet.commons.tools.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/7/26 16:37 |
|||
*/ |
|||
@Data |
|||
public class ZhzlCategorySelectDTO implements Serializable { |
|||
private String label; |
|||
private String value; |
|||
|
|||
private String queryType; |
|||
private String tableName; |
|||
private String columnName; |
|||
private String columnValue; |
|||
private Integer sort; |
|||
} |
|||
|
@ -0,0 +1,55 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
/** |
|||
* 图层枚举 |
|||
*/ |
|||
public enum CoverageEnums { |
|||
|
|||
ZHZL("zhzl", "综合治理图层", 1), |
|||
YJCL("yjcl", "应急处置资源", 1), |
|||
AQSC("aqsc", "安全生产资源", 1), |
|||
CSGL("csgl", "城市管理资源", 1), |
|||
GGFW("ggfw", "公共服务资源", 1), |
|||
|
|||
DATA_TYPE_GOVERNED_TARGET("governedTarget", "被管理对象", 2), |
|||
DATA_TYPE_RESOURCES("resources", "资源", 2); |
|||
|
|||
private String key; |
|||
private String name; |
|||
/** |
|||
* 1:图层,2:数据类型 |
|||
*/ |
|||
private Integer type; |
|||
|
|||
CoverageEnums(String key, String name, Integer type) { |
|||
this.key = key; |
|||
this.name = name; |
|||
this.type = type; |
|||
} |
|||
|
|||
public static CoverageEnums getEnum(String key) { |
|||
CoverageEnums[] values = CoverageEnums.values(); |
|||
for (CoverageEnums value : values) { |
|||
if (value.getKey().equals(key)) { |
|||
return value; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public String getKey() { |
|||
return key; |
|||
} |
|||
|
|||
public String getCoverageName() { |
|||
return name; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public Integer getType() { |
|||
return type; |
|||
} |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
public enum ResiCategoryEnum { |
|||
IS_PARTY("IS_PARTY", "党员"), |
|||
IS_DBH("IS_DBH", "低保人员"), |
|||
IS_ENSURE_HOUSE("IS_ENSURE_HOUSE", "保障房人员"), |
|||
IS_UNEMPLOYED("IS_UNEMPLOYED", "失业人员"), |
|||
IS_YLFN("IS_YLFN", "育龄妇女"), |
|||
IS_VETERANS("IS_VETERANS", "退役军人"), |
|||
IS_UNITED_FRONT("IS_UNITED_FRONT", "统战人员"), |
|||
IS_XFRY("IS_XFRY", "信访人员"), |
|||
IS_VOLUNTEER("IS_VOLUNTEER", "志愿者"), |
|||
IS_OLD_PEOPLE("IS_OLD_PEOPLE", "老年人"), |
|||
IS_KC("IS_KC", "空巢"), |
|||
IS_SD("IS_SD", "失独人员"), |
|||
IS_SN("IS_SN", "失能"), |
|||
IS_SZ("IS_SZ", "失智"), |
|||
IS_CJ("IS_CJ", "残疾"), |
|||
IS_DB("IS_DB", "大病"), |
|||
IS_MB("IS_MB", "慢病"), |
|||
IS_SPECIAL("IS_SPECIAL", "特殊人群"); |
|||
private String colName; |
|||
private String label; |
|||
|
|||
|
|||
ResiCategoryEnum(String colName, String label) { |
|||
this.colName = colName; |
|||
this.label = label; |
|||
} |
|||
|
|||
/** |
|||
* 取枚举对象 |
|||
* @param columnName |
|||
* @return |
|||
*/ |
|||
public static ResiCategoryEnum getEnum(String columnName) { |
|||
for (ResiCategoryEnum enumObject : ResiCategoryEnum.values()) { |
|||
if (enumObject.getColName().equals(columnName)) { |
|||
return enumObject; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public String getColName() { |
|||
return colName; |
|||
} |
|||
|
|||
public String getLabel() { |
|||
return label; |
|||
} |
|||
|
|||
public void setLabel(String label) { |
|||
this.label = label; |
|||
} |
|||
} |
@ -0,0 +1,108 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
import com.epmet.commons.tools.dto.result.ZhzlCategorySelectDTO; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
public enum ZhzlResiCategoryEnum { |
|||
// resi_xfry 信访人员
|
|||
// anzhibangjiao 安置帮教
|
|||
// xiejiaorenyuan 邪教人员
|
|||
// buliangqingshaonian 不良青少年
|
|||
// shequjiaozheng 社区矫正
|
|||
// zhaoshizhaohuojingshenbing 肇事肇祸精神病
|
|||
// xidurenyuan 吸毒人员
|
|||
|
|||
resi_xfry("resi_xfry", "信访人员", "equal", "ic_resi_user", "IS_XFRY", "1", 1), |
|||
anzhibangjiao("anzhibangjiao", "安置帮教", "list_equal", "ic_special", "SPECIAL_RQLB", "anzhibangjiao", 2), |
|||
xiejiaorenyuan("xiejiaorenyuan", "邪教人员", "list_equal", "ic_special", "SPECIAL_RQLB", "xiejiaorenyuan", 3), |
|||
buliangqingshaonian("buliangqingshaonian", "不良青少年", "list_equal", "ic_special", "SPECIAL_RQLB", "buliangqingshaonian", 4), |
|||
shequjiaozheng("shequjiaozheng", "社区矫正", "list_equal", "ic_special", "SPECIAL_RQLB", "shequjiaozheng", 5), |
|||
zhaoshizhaohuojingshenbing("zhaoshizhaohuojingshenbing", "肇事肇祸精神病", "list_equal", "ic_special", "SPECIAL_RQLB", "zhaoshizhaohuojingshenbing", 6), |
|||
xidurenyuan("xidurenyuan", "吸毒人员", "list_equal", "ic_special", "SPECIAL_RQLB", "xidurenyuan", 7); |
|||
|
|||
private String code; |
|||
private String name; |
|||
private String queryType; |
|||
private String tableName; |
|||
private String columnName; |
|||
private String columnValue; |
|||
private Integer sort; |
|||
|
|||
|
|||
ZhzlResiCategoryEnum(String code, String name, String queryType, String tableName, String columnName, String columnValue, Integer sort) { |
|||
this.code = code; |
|||
this.name = name; |
|||
this.queryType = queryType; |
|||
this.tableName = tableName; |
|||
this.columnName = columnName; |
|||
this.columnValue = columnValue; |
|||
this.sort = sort; |
|||
} |
|||
|
|||
public static ZhzlResiCategoryEnum getEnum(String code) { |
|||
ZhzlResiCategoryEnum[] values = ZhzlResiCategoryEnum.values(); |
|||
for (ZhzlResiCategoryEnum value : values) { |
|||
if (value.getCode().equals(code)) { |
|||
return value; |
|||
} |
|||
} |
|||
return null; |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 转为数据 |
|||
* |
|||
* @return 枚举对象数组 |
|||
*/ |
|||
public static List<ZhzlCategorySelectDTO> toSelectList() { |
|||
List<ZhzlCategorySelectDTO> list = new ArrayList<>(); |
|||
for (ZhzlResiCategoryEnum item : ZhzlResiCategoryEnum.values()) { |
|||
ZhzlCategorySelectDTO selectDTO = new ZhzlCategorySelectDTO(); |
|||
selectDTO.setLabel(item.getName()); |
|||
selectDTO.setValue(item.getCode()); |
|||
selectDTO.setQueryType(item.getQueryType()); |
|||
selectDTO.setTableName(item.getTableName()); |
|||
selectDTO.setColumnName(item.getColumnName()); |
|||
selectDTO.setColumnValue(item.getColumnValue()); |
|||
selectDTO.setSort(item.getSort()); |
|||
list.add(selectDTO); |
|||
} |
|||
return list; |
|||
} |
|||
|
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
|
|||
public String getQueryType() { |
|||
return queryType; |
|||
} |
|||
|
|||
public String getTableName() { |
|||
return tableName; |
|||
} |
|||
|
|||
public String getColumnName() { |
|||
return columnName; |
|||
} |
|||
|
|||
public String getColumnValue() { |
|||
return columnValue; |
|||
} |
|||
|
|||
public Integer getSort() { |
|||
return sort; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.epmet.commons.tools.utils; |
|||
|
|||
import org.apache.commons.lang3.StringUtils; |
|||
|
|||
/** |
|||
* desc:utf8mb4转为utf8 |
|||
* |
|||
* @author: LiuJanJun |
|||
* @date: 2022/7/22 9:45 下午 |
|||
* @version: 1.0 |
|||
*/ |
|||
public class StrUtil { |
|||
|
|||
private static final int LAST_BMP = 0xFFFF; |
|||
|
|||
public static String filterEmoji(String source) { |
|||
if (StringUtils.isBlank(source)) { |
|||
return source; |
|||
} |
|||
StringBuilder sb = new StringBuilder(source.length()); |
|||
for (int i = 0; i < source.length(); i++) { |
|||
int codePoint = source.codePointAt(i); |
|||
if (codePoint < LAST_BMP) { |
|||
sb.appendCodePoint(codePoint); |
|||
} else { |
|||
i++; |
|||
} |
|||
} |
|||
return sb.toString(); |
|||
} |
|||
|
|||
|
|||
public static void main(String[] args) { |
|||
String x = StrUtil.filterEmoji("😀😁😆😅🥹🥹😇😗😀😂666"); |
|||
System.out.println(x); |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.dataaggre.constant; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
public interface TableConstant { |
|||
|
|||
String IC_DANGEROUS_CHEMICALS = "ic_dangerous_chemicals"; |
|||
|
|||
String IC_SUPERIOR_RESOURCE = "ic_superior_resource"; |
|||
|
|||
String IC_ENTERPRISE = "ic_enterprise"; |
|||
|
|||
String IC_COMMUNITY_SELF_ORGANIZATION = "ic_community_self_organization"; |
|||
|
|||
String IC_CITY_MANAGEMENT = "ic_city_management"; |
|||
|
|||
String IC_PUBLIC_SERVICE = "ic_public_service"; |
|||
|
|||
String IC_EVENT = "ic_event"; |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.dataaggre.dto.coverage; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 五大图层分析-被管理对象分类 |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class AnalysisGovernedTargetsResult { |
|||
|
|||
private String categoryKey; |
|||
private String categoryName; |
|||
private String coverageType; |
|||
private String placeType; |
|||
private String placeTypeName; |
|||
private Integer quantity = 0; |
|||
|
|||
private List<AnalysisGovernedTargetsResult> children; |
|||
} |
@ -0,0 +1,70 @@ |
|||
package com.epmet.dataaggre.dto.coverage; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.concurrent.atomic.AtomicInteger; |
|||
|
|||
/** |
|||
* 五大图层-可视化-右侧分类树列表 |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class AnalysisResourceCategoriesResult { |
|||
|
|||
/** |
|||
* 图层类型 |
|||
*/ |
|||
private String coverageType; |
|||
/** |
|||
* 图层名称 |
|||
*/ |
|||
private String coverageName; |
|||
/** |
|||
* 个数 |
|||
*/ |
|||
private AtomicInteger quantity = new AtomicInteger(0); |
|||
|
|||
/** |
|||
* 没有placeTypeInAnalysis,直接属于图层的 |
|||
*/ |
|||
private List<Category> categories = new ArrayList<>(); |
|||
|
|||
/** |
|||
* 场所类型,有placeTypeInAnalysis,不直接属于图层的 |
|||
*/ |
|||
private List<PlaceType> placeTypesInAnalysis = new ArrayList<>(); |
|||
|
|||
/** |
|||
* 分类 |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public static class Category { |
|||
private String categoryKey; |
|||
private String categoryName; |
|||
private String coverageType; |
|||
private String placeType; |
|||
private Integer quantity = 0; |
|||
} |
|||
|
|||
/** |
|||
* 场所类型 |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public static class PlaceType { |
|||
private String placeType; |
|||
private String placeTypeName; |
|||
private AtomicInteger quantity = new AtomicInteger(0); |
|||
private List<Category> categories; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.epmet.dataaggre.dto.govorg.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/7/28 11:09 |
|||
*/ |
|||
@Data |
|||
public class CoverageAnalisisDataListLeftFormDTO { |
|||
public interface ShowGroup extends CustomerClientShowGroup { |
|||
} |
|||
/** |
|||
* 目前都是组织id |
|||
*/ |
|||
@NotBlank(message = "组织不能为空", groups = ShowGroup.class) |
|||
private String orgId; |
|||
|
|||
/** |
|||
* agency |
|||
* grid |
|||
*/ |
|||
@NotBlank(message = "组织类型不能为空", groups = ShowGroup.class) |
|||
private String orgType; |
|||
/** |
|||
* 图层类型列表 |
|||
*/ |
|||
private List<String> coverageTypes; |
|||
|
|||
/** |
|||
* 分类key |
|||
*/ |
|||
private List<String> categoryKeys; |
|||
|
|||
private String customerId; |
|||
private String staffId; |
|||
|
|||
} |
|||
|
@ -0,0 +1,44 @@ |
|||
package com.epmet.dataaggre.dto.govorg.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/7/26 16:25 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class CoverageHomeSearchFormDTO extends PageFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3776954636762201010L; |
|||
|
|||
private String name; |
|||
|
|||
private String customerId; |
|||
|
|||
private String userId; |
|||
|
|||
private String orgId; |
|||
|
|||
private String pids; |
|||
|
|||
private String tableName; |
|||
|
|||
/** |
|||
* 搜索类型,居民:user;事件:event;资源:resource |
|||
*/ |
|||
private String searchType; |
|||
|
|||
/** |
|||
* 资源类型:社区自组织:community_org;优势资源:superior_resource;城市管理:city_management;重点危化企业:dangerous_chemicals;公共服务:public_service;企事业单位巡查:enterprise_patrol; |
|||
* searchType为resource时,此字段必填 |
|||
*/ |
|||
private String resourceType; |
|||
|
|||
private String resourceId; |
|||
private String icEventId; |
|||
private String icUserId; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.dataaggre.dto.govorg.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/7/29 10:38 |
|||
*/ |
|||
@Data |
|||
public class DataListLeftSubTotalFormDTO { |
|||
public interface AddUserInterGroup{} |
|||
@NotBlank(message = "orgId不能为空",groups = AddUserInterGroup.class) |
|||
private String orgId; |
|||
@NotBlank(message = "orgType不能为空",groups = AddUserInterGroup.class) |
|||
private String orgType; |
|||
|
|||
|
|||
private String coverageType; |
|||
|
|||
@NotBlank(message = "categoryKey不能为空",groups = AddUserInterGroup.class) |
|||
private String categoryKey; |
|||
|
|||
@NotBlank(message = "placeType不能为空",groups = AddUserInterGroup.class) |
|||
private String placeType; |
|||
|
|||
|
|||
private String customerId; |
|||
private String staffId; |
|||
} |
|||
|
@ -0,0 +1,39 @@ |
|||
package com.epmet.dataaggre.dto.govorg.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/7/29 08:48 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class SearchDetailFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3499320376768396157L; |
|||
|
|||
public interface SearchUserDetailForm{} |
|||
public interface SearchEventDetailForm{} |
|||
public interface SearchResourceDetailForm{} |
|||
|
|||
@NotBlank(message = "icUserId不能为空",groups = SearchUserDetailForm.class) |
|||
private String icUserId; |
|||
|
|||
@NotBlank(message = "icEventId不能为空",groups = SearchEventDetailForm.class) |
|||
private String icEventId; |
|||
|
|||
@NotBlank(message = "resourceId不能为空",groups = SearchResourceDetailForm.class) |
|||
private String resourceId; |
|||
|
|||
/** |
|||
* 资源类型:社区自组织:community_org;优势资源:superior_resource;城市管理:city_management;重点危化企业:dangerous_chemicals;公共服务:public_service;企事业单位巡查:enterprise_patrol; |
|||
*/ |
|||
@NotBlank(message = "resourceType不能为空",groups = SearchResourceDetailForm.class) |
|||
private String resourceType; |
|||
|
|||
private String customerId; |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/7/28 11:13 |
|||
*/ |
|||
@Data |
|||
public class CoverageAnalisisDataListResultDTOV2 { |
|||
/** |
|||
* 维度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
private List<CoverageAnalisisDataListResultDTO> dataList; |
|||
} |
|||
|
@ -0,0 +1,46 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/7/26 16:25 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class CoverageHomeSearchResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 8922820109004386708L; |
|||
|
|||
/** |
|||
* 居民信息 |
|||
*/ |
|||
private List<UserInfoResultDTO> userInfos; |
|||
private Long userInfosTotal; |
|||
|
|||
/** |
|||
* 事件信息 |
|||
*/ |
|||
private List<EventInfoResultDTO> eventInfos; |
|||
private Long eventInfoTotal; |
|||
|
|||
/** |
|||
* 资源信息 |
|||
*/ |
|||
private List<ResourceInfoResultDTO> resourceInfos; |
|||
private Long resourceInfoTotal; |
|||
|
|||
public CoverageHomeSearchResultDTO() { |
|||
this.userInfos = new ArrayList<>(); |
|||
this.userInfosTotal = NumConstant.ZERO_L; |
|||
this.eventInfos = new ArrayList<>(); |
|||
this.eventInfoTotal = NumConstant.ZERO_L; |
|||
this.resourceInfos = new ArrayList<>(); |
|||
this.resourceInfoTotal = NumConstant.ZERO_L; |
|||
} |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/7/29 10:45 |
|||
*/ |
|||
@Data |
|||
public class DataListLeftSubTotalResDTO { |
|||
private String orgId; |
|||
private String orgType; |
|||
private String orgName; |
|||
private String longitude; |
|||
private String latitude; |
|||
private Integer total=0; |
|||
} |
|||
|
@ -0,0 +1,59 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/7/26 16:52 |
|||
* @DESC 事件本组织及下级难点堵点: 社区治理-事件管理中标记的痛点堵点 |
|||
*/ |
|||
@Data |
|||
public class EventInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1645410018462094960L; |
|||
|
|||
/** |
|||
* 事件ID |
|||
*/ |
|||
private String eventId; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
@JsonIgnore |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 发生时间 yyyy-dd-mm hh:ii:ss |
|||
*/ |
|||
private String happenTime; |
|||
|
|||
/** |
|||
* 事件内容 |
|||
*/ |
|||
private String eventContent; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
public EventInfoResultDTO() { |
|||
this.eventId = ""; |
|||
this.gridName = ""; |
|||
this.happenTime = ""; |
|||
this.eventContent = ""; |
|||
this.longitude = ""; |
|||
this.latitude = ""; |
|||
} |
|||
} |
@ -0,0 +1,76 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/7/26 16:52 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class ResourceInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1645410018462094960L; |
|||
|
|||
private String resourceId; |
|||
private String resourceType; |
|||
|
|||
private String name; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 分类名称 |
|||
*/ |
|||
private String categoryName; |
|||
private String category; |
|||
|
|||
/** |
|||
* 占地面积 |
|||
*/ |
|||
private String areaCovered; |
|||
|
|||
/** |
|||
* 容纳人数 |
|||
*/ |
|||
private String capacity; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 联系人 |
|||
*/ |
|||
private String principal; |
|||
|
|||
public ResourceInfoResultDTO() { |
|||
this.resourceId = ""; |
|||
this.resourceType = ""; |
|||
this.name = ""; |
|||
this.longitude = ""; |
|||
this.latitude = ""; |
|||
this.categoryName = ""; |
|||
this.areaCovered = ""; |
|||
this.capacity = ""; |
|||
this.address = ""; |
|||
this.mobile = ""; |
|||
this.principal = ""; |
|||
} |
|||
} |
@ -0,0 +1,92 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/7/26 16:52 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class UserInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1645410018462094960L; |
|||
|
|||
private String icUserId; |
|||
|
|||
/** |
|||
* 名字 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
@JsonIgnore |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属房屋 |
|||
*/ |
|||
private String houseName; |
|||
|
|||
@JsonIgnore |
|||
private String homeId; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 工作单位 |
|||
*/ |
|||
private String gzdw; |
|||
|
|||
/** |
|||
* 人户情况 |
|||
*/ |
|||
private String rhqk; |
|||
|
|||
/** |
|||
* 人员分类 |
|||
*/ |
|||
private List<String> type; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
public UserInfoResultDTO() { |
|||
this.icUserId = ""; |
|||
this.name = ""; |
|||
this.gridName = ""; |
|||
this.houseName = ""; |
|||
this.homeId = ""; |
|||
this.mobile = ""; |
|||
this.idCard = ""; |
|||
this.gzdw = ""; |
|||
this.rhqk = ""; |
|||
this.type = new ArrayList<>(); |
|||
this.longitude = ""; |
|||
this.latitude = ""; |
|||
} |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.epmet.dataaggre.enums; |
|||
|
|||
import org.apache.commons.lang3.StringUtils; |
|||
|
|||
public enum MenusEnums { |
|||
|
|||
IC_DANGEROUS_CHEMICALS("shequzhili/tuceng/anquan/weihua/index","ic_dangerous_chemicals","重点危化品企业","govorg"), |
|||
IC_SUPERIOR_RESOURCE("shequzhili/tuceng/yingji/ziyuan/index","ic_superior_resource","优势资源管理","govorg"), |
|||
IC_ENTERPRISE("shequzhili/tuceng/anquan/xuncha/index","ic_enterprise","企事业单位巡查","govorg"), |
|||
IC_COMMUNITY_SELF_ORGANIZATION("communityService/sqzzz/index","ic_community_self_organization","社区自组织","heart"), |
|||
IC_CITY_MANAGEMENT("shequzhili/csgltc/csgl","ic_city_management","城市管理图层","govorg"), |
|||
IC_PUBLIC_SERVICE("shequzhili/ggfwtc/ggfw","ic_public_service","公共服务图层","govorg"), |
|||
IC_EVENT("shequzhili/event/eventList","ic_event","事件管理","govproject"); |
|||
|
|||
private String url; |
|||
private String value; |
|||
private String name; |
|||
private String db; |
|||
|
|||
MenusEnums(String url, String value, String name, String db) { |
|||
this.url = url; |
|||
this.value = value; |
|||
this.name = name; |
|||
this.db = db; |
|||
} |
|||
|
|||
public static MenusEnums get(String url) { |
|||
for (MenusEnums gm : MenusEnums.values()) { |
|||
if (gm.url.equals(url)) { |
|||
return gm; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public static String getValueByUrl(String url){ |
|||
if (StringUtils.isBlank(url)){ |
|||
return ""; |
|||
} |
|||
for (MenusEnums me : MenusEnums.values()) { |
|||
if (me.url.equals(url)) { |
|||
return me.getValue(); |
|||
} |
|||
} |
|||
return ""; |
|||
} |
|||
|
|||
public static String getDbByValue(String table){ |
|||
if (StringUtils.isBlank(table)){ |
|||
return ""; |
|||
} |
|||
for (MenusEnums me : MenusEnums.values()) { |
|||
if (me.value.equals(table)) { |
|||
return me.getDb(); |
|||
} |
|||
} |
|||
return ""; |
|||
} |
|||
|
|||
public String getUrl() { |
|||
return url; |
|||
} |
|||
|
|||
public String getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public String getDb() { |
|||
return db; |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
package com.epmet.dataaggre.dao.opercustomize; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dataaggre.entity.opercustomize.IcResiCategoryWarnConfigEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface IcResiCategoryWarnConfigDao extends BaseDao<IcResiCategoryWarnConfigEntity> { |
|||
} |
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.entity.opercustomize; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 居民类别预警配置表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-11-04 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_resi_category_warn_config") |
|||
public class IcResiCategoryWarnConfigEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 项标签 |
|||
*/ |
|||
private String label; |
|||
|
|||
/** |
|||
* 表名 |
|||
*/ |
|||
private String tableName; |
|||
|
|||
/** |
|||
* 列名 |
|||
*/ |
|||
private String columnName; |
|||
/** |
|||
* 是否预警 1 是 0 否 |
|||
*/ |
|||
private String warn; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 等级1阈值 |
|||
*/ |
|||
@TableField(value = "LEVEL_1") |
|||
private Integer level1; |
|||
|
|||
/** |
|||
* 等级2阈值 |
|||
*/ |
|||
@TableField(value = "LEVEL_2") |
|||
private Integer level2; |
|||
|
|||
/** |
|||
* 等级3阈值 |
|||
*/ |
|||
@TableField(value = "LEVEL_3") |
|||
private Integer level3; |
|||
|
|||
} |
@ -0,0 +1,109 @@ |
|||
package com.epmet.dataaggre.redis; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.redis.RedisKeys; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.GovMenuDTO; |
|||
import com.epmet.dto.form.GetCustomerMenuListFormDTO; |
|||
import com.epmet.feign.GovAccessFeignClient; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 客户菜单配置表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-03-16 |
|||
*/ |
|||
@Slf4j |
|||
@Component |
|||
public class GovCustomerMenuRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
@Autowired |
|||
private GovAccessFeignClient govAccessFeignClient; |
|||
|
|||
/** |
|||
* Desc: 保存客户菜单缓存 |
|||
* @param customerId |
|||
* @param type |
|||
* @param govMenuDTOS |
|||
* @author zxc |
|||
* @date 2022/7/27 13:45 |
|||
*/ |
|||
public void setCustomerMenuList(String customerId, Integer type, List<GovMenuDTO> govMenuDTOS) { |
|||
if (checkParam(customerId, type) && !CollectionUtils.isEmpty(govMenuDTOS) && StringUtils.isNotBlank(govMenuDTOS.get(NumConstant.ZERO).getName())) { |
|||
String key = RedisKeys.getCustomerMenuListFiveCoverage().concat(customerId); |
|||
govMenuDTOS.forEach(g -> { |
|||
Map<String, Object> map = BeanUtil.beanToMap(g, false, true); |
|||
redisUtils.listAdd(key,map); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Desc: 获取客户菜单缓存 |
|||
* @param customerId |
|||
* @param type |
|||
* @param tableName |
|||
* @author zxc |
|||
* @date 2022/7/27 13:45 |
|||
*/ |
|||
public List<GovMenuDTO> getCustomerMenuList(String customerId, Integer type, String tableName) { |
|||
if (checkParam(customerId, type)) { |
|||
String key = RedisKeys.getCustomerMenuListFiveCoverage().concat(customerId); |
|||
List<GovMenuDTO> result = new ArrayList<>(); |
|||
List<Map<String, Object>> maps = (List<Map<String, Object>>) redisUtils.listGetAll(key, NumConstant.ZERO, NumConstant.ONE_NEG); |
|||
for (Map<String, Object> map : maps) { |
|||
result.add(ConvertUtils.mapToEntity(map,GovMenuDTO.class)); |
|||
} |
|||
// result = (List<GovMenuDTO>) redisUtils.listGetAll(key, NumConstant.ZERO,NumConstant.ONE_NEG);
|
|||
if (CollectionUtils.isEmpty(result)){ |
|||
GetCustomerMenuListFormDTO formDTO = new GetCustomerMenuListFormDTO(); |
|||
formDTO.setCustomerId(customerId); |
|||
formDTO.setType(type); |
|||
formDTO.setTableName(tableName); |
|||
Result<List<GovMenuDTO>> customerMenuList = govAccessFeignClient.getCustomerMenuList(formDTO); |
|||
if (!customerMenuList.success()){ |
|||
throw new EpmetException("查询客户菜单失败"+ JSON.toJSONString(formDTO)); |
|||
} |
|||
result = customerMenuList.getData(); |
|||
setCustomerMenuList(customerId,type,customerMenuList.getData()); |
|||
} |
|||
return result; |
|||
} |
|||
return new ArrayList<>(); |
|||
} |
|||
|
|||
/** |
|||
* Desc: 删除客户菜单缓存 |
|||
* @param |
|||
* @author zxc |
|||
* @date 2022/7/27 13:47 |
|||
*/ |
|||
public void delAllCustomerMenu(String customerId) { |
|||
String key = RedisKeys.getCustomerMenuListFiveCoverage().concat(customerId); |
|||
redisUtils.deleteByPattern(key); |
|||
} |
|||
|
|||
private boolean checkParam(String customerId, Integer type) { |
|||
if (StringUtils.isBlank(customerId) || type == null){ |
|||
log.warn("checkParam fail, param is null"); |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,9 @@ |
|||
package com.epmet.dataaggre.service.opercustomize; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/7/27 17:20 |
|||
* @DESC |
|||
*/ |
|||
public interface IcResiCategoryStatsConfigService { |
|||
} |
@ -0,0 +1,9 @@ |
|||
package com.epmet.dataaggre.service.opercustomize; |
|||
|
|||
import com.epmet.dataaggre.entity.opercustomize.IcResiCategoryWarnConfigEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface IcResiCategoryWarnService { |
|||
List<IcResiCategoryWarnConfigEntity> listResiCategoriesNeed2Warn(String loginUserCustomerId); |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.dataaggre.service.opercustomize.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|||
import com.epmet.dataaggre.constant.DataSourceConstant; |
|||
import com.epmet.dataaggre.dao.opercustomize.IcResiCategoryWarnConfigDao; |
|||
import com.epmet.dataaggre.entity.opercustomize.IcResiCategoryWarnConfigEntity; |
|||
import com.epmet.dataaggre.service.opercustomize.IcResiCategoryWarnService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Service |
|||
@DataSource(DataSourceConstant.OPERCUSTOMIZE) |
|||
public class IcResiCategoryWarnServiceImpl implements IcResiCategoryWarnService { |
|||
|
|||
@Autowired |
|||
private IcResiCategoryWarnConfigDao icResiCategoryWarnConfigDao; |
|||
|
|||
@Override |
|||
public List<IcResiCategoryWarnConfigEntity> listResiCategoriesNeed2Warn(String customerId) { |
|||
LambdaQueryWrapper<IcResiCategoryWarnConfigEntity> query = new LambdaQueryWrapper<>(); |
|||
query.eq(IcResiCategoryWarnConfigEntity::getCustomerId, customerId); |
|||
query.eq(IcResiCategoryWarnConfigEntity::getWarn, "1"); |
|||
return icResiCategoryWarnConfigDao.selectList(query); |
|||
} |
|||
} |
@ -1,6 +1,30 @@ |
|||
<?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.epmet.dao.IcEventDao"> |
|||
<mapper namespace="com.epmet.dataaggre.dao.govproject.IcEventDao"> |
|||
|
|||
<select id="getEventInfos" resultType="com.epmet.dataaggre.dto.govorg.result.EventInfoResultDTO"> |
|||
SELECT |
|||
id AS eventId, |
|||
GRID_ID, |
|||
DATE_FORMAT(HAPPEN_TIME,'%Y-%m-%d %H:%i:%s') AS happenTime, |
|||
EVENT_CONTENT, |
|||
LONGITUDE, |
|||
LATITUDE |
|||
FROM ic_event |
|||
WHERE del_flag = '0' |
|||
AND DIFFICULT_POINT = '1' |
|||
<if test='customerId != null and customerId != ""'> |
|||
AND customer_id = #{customerId} |
|||
</if> |
|||
<if test='orgId != null and orgId != ""'> |
|||
AND GRID_PIDS LIKE CONCAT('%',#{orgId},'%') |
|||
</if> |
|||
<if test='icEventId != null and icEventId != ""'> |
|||
AND id = #{icEventId} |
|||
</if> |
|||
<if test=' name != null and name != "" '> |
|||
AND EVENT_CONTENT LIKE CONCAT('%',#{name},'%') |
|||
</if> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,5 @@ |
|||
<?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.epmet.dataaggre.dao.opercustomize.IcResiCategoryWarnConfigDao"> |
|||
</mapper> |
@ -0,0 +1,15 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/7/27 16:23 |
|||
*/ |
|||
@Data |
|||
public class ServerInfoDTO { |
|||
private String serviceName; |
|||
private String mobile; |
|||
} |
|||
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue