464 changed files with 16551 additions and 589 deletions
@ -0,0 +1,5 @@ |
|||
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1556509011061993473', 'jmreport_category', '报表应用类别', '居民信息、房屋信息', 32, 0, 0, '1', '2022-08-08 13:14:01', '1', '2022-08-08 13:14:01'); |
|||
|
|||
|
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1556509175185108994', 1556509011061993473, '房屋信息', 'house_info', '0', '', 2, 0, 0, '1', '2022-08-08 13:14:41', '1', '2022-08-08 13:14:41'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1556509102015475714', 1556509011061993473, '居民信息', 'resi_info', '0', '', 1, 0, 0, '1', '2022-08-08 13:14:23', '1', '2022-08-08 13:14:23'); |
|||
@ -0,0 +1,24 @@ |
|||
<?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>epmet-commons</artifactId> |
|||
<groupId>com.epmet</groupId> |
|||
<version>2.0.0</version> |
|||
<!--<relativePath>../../pom.xml</relativePath>--> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<packaging>jar</packaging> |
|||
|
|||
<artifactId>epmet-commons-feignclient</artifactId> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-tools</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
</project> |
|||
@ -0,0 +1,22 @@ |
|||
package com.epmet.commons.feignclient.dtos; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 积木报表的返回值Page对象 |
|||
* @param <T> |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class JiMuPage<T> { |
|||
private int pageNo; |
|||
private int pageSize; |
|||
private int total; |
|||
private int pages; |
|||
private List<?> records; |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
package com.epmet.commons.feignclient.dtos; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
/** |
|||
* 积木报表的返回值Result对象 |
|||
* @param <T> |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class JiMuResult<T> { |
|||
private boolean success = true; |
|||
private String message = ""; |
|||
private Integer code = 0; |
|||
private T result; |
|||
private T data; |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package com.epmet.commons.feignclient.dtos.form; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/8/8 15:08 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class JiMuReportFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3590609549416867701L; |
|||
|
|||
/** |
|||
* 报表IDs |
|||
*/ |
|||
private List<String> reportIds; |
|||
|
|||
/** |
|||
* 类别 |
|||
*/ |
|||
private List<String> categoryKeys; |
|||
|
|||
private String id; |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.epmet.commons.feignclient.dtos.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 批量导出用的requst dto |
|||
*/ |
|||
@Data |
|||
public class JimuReportExportRequestDTO { |
|||
private String excelConfigId; |
|||
private ExportRequestQueryParam queryParam = new ExportRequestQueryParam(); |
|||
|
|||
/** |
|||
* 批量导出用的请求参数 |
|||
*/ |
|||
@Data |
|||
public static class ExportRequestQueryParam { |
|||
private String id; |
|||
private String token; |
|||
private String paramKey; |
|||
private String pageNo; |
|||
private Integer pageSize; |
|||
private String currentPageNo; |
|||
private Integer currentPageSize; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
package com.epmet.commons.feignclient.dtos.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Map; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class JiMuReportDetailResultDTO { |
|||
private String id; |
|||
private String code; |
|||
private String name; |
|||
private String note; |
|||
private String status; |
|||
private String type; |
|||
private String jsonStr; |
|||
private String apiUrl; |
|||
private String apiMethod; |
|||
private String apiCode; |
|||
private String thumb; |
|||
private Integer template; |
|||
private String createBy; |
|||
private Date createTime; |
|||
private String updateBy; |
|||
private Date updateTime; |
|||
private Map<String, Object> dataList; |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
package com.epmet.commons.feignclient.dtos.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/8/8 15:10 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class JiMuReportResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -4048477731892329569L; |
|||
|
|||
private String code; |
|||
|
|||
private String name; |
|||
|
|||
private String id; |
|||
private String reportId; |
|||
private String reportName; |
|||
|
|||
private Boolean isList = false; |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
package com.epmet.commons.feignclient.dtos.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class JimuReportDbDataResultDTO { |
|||
|
|||
private ReportDB reportDb; |
|||
|
|||
@Data |
|||
public static class ReportDB { |
|||
private String apiUrl; |
|||
private String apiMethod; |
|||
private String isList; |
|||
private String dbChName; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
package com.epmet.commons.feignclient.dtos.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 积木报表,报表字段列表 |
|||
*/ |
|||
@Data |
|||
public class JimuReportFieldTreeResultDTO { |
|||
|
|||
private Boolean expand; |
|||
private String code; |
|||
private List<Child> children; |
|||
private String dbId; |
|||
private String type; |
|||
private String isList; |
|||
|
|||
@Data |
|||
public static class Child { |
|||
private Boolean expand; |
|||
private String title; |
|||
private String fieldText; |
|||
} |
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
package com.epmet.commons.feignclient.feigns; |
|||
|
|||
import com.epmet.commons.feignclient.dtos.JiMuPage; |
|||
import com.epmet.commons.feignclient.dtos.JiMuResult; |
|||
import com.epmet.commons.feignclient.dtos.form.JimuReportExportRequestDTO; |
|||
import com.epmet.commons.feignclient.dtos.result.JiMuReportDetailResultDTO; |
|||
import com.epmet.commons.feignclient.dtos.result.JimuReportDbDataResultDTO; |
|||
import com.epmet.commons.feignclient.dtos.result.JimuReportFieldTreeResultDTO; |
|||
import com.epmet.commons.feignclient.feigns.fallback.JiMuReportOpenFeignClientFallbackFactory; |
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import feign.Response; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.util.MultiValueMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/8/8 13:52 |
|||
* @DESC |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPMET_JM_REPORT, fallbackFactory = JiMuReportOpenFeignClientFallbackFactory.class) |
|||
//@FeignClient(name = ServiceConstant.EPMET_JM_REPORT, fallbackFactory = JiMuReportOpenFeignClientFallbackFactory.class, url = "localhost:8118")
|
|||
public interface JiMuReportOpenFeignClient { |
|||
|
|||
@GetMapping(value = "jmreport/excelQuery") |
|||
JiMuResult<JiMuPage<JiMuReportDetailResultDTO>> getList(@RequestParam("pageNo") Integer pageNo, |
|||
@RequestParam("pageSize") Integer pageSize, |
|||
@RequestParam("name") String name, |
|||
@RequestParam("reportType") String reportType, |
|||
@RequestParam("token") String token, |
|||
@RequestHeader MultiValueMap<String, String> headers); |
|||
|
|||
@GetMapping("jmreport/show") |
|||
JiMuResult<Map<String,Object>> getReport(@RequestParam("id") String id,@RequestParam("apiUrl") String apiUrl,@RequestParam("params") String params,@RequestHeader MultiValueMap<String, String> headers); |
|||
|
|||
@GetMapping("/jmreport/field/tree/{report-id}") |
|||
JiMuResult<List<List<JimuReportFieldTreeResultDTO>>> fieldTree(@PathVariable("report-id") String reportId); |
|||
|
|||
@GetMapping("jmreport/loadDbData/{report-id}") |
|||
JiMuResult<JimuReportDbDataResultDTO> loadDbData(@PathVariable("report-id") String reportId); |
|||
|
|||
@PostMapping("jmreport/exportAllExcelStream") |
|||
Response exportAllExcelStream(JimuReportExportRequestDTO param); |
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
package com.epmet.commons.feignclient.feigns.fallback; |
|||
|
|||
import com.epmet.commons.feignclient.dtos.JiMuPage; |
|||
import com.epmet.commons.feignclient.dtos.JiMuResult; |
|||
import com.epmet.commons.feignclient.dtos.form.JimuReportExportRequestDTO; |
|||
import com.epmet.commons.feignclient.dtos.result.JiMuReportDetailResultDTO; |
|||
import com.epmet.commons.feignclient.dtos.result.JimuReportDbDataResultDTO; |
|||
import com.epmet.commons.feignclient.dtos.result.JimuReportFieldTreeResultDTO; |
|||
import com.epmet.commons.feignclient.feigns.JiMuReportOpenFeignClient; |
|||
import feign.Response; |
|||
import org.springframework.util.MultiValueMap; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/8/8 13:53 |
|||
* @DESC |
|||
*/ |
|||
public class JiMuReportOpenFeignClientFallback implements JiMuReportOpenFeignClient { |
|||
|
|||
@Override |
|||
public JiMuResult<JiMuPage<JiMuReportDetailResultDTO>> getList(Integer pageNo, Integer pageSize, String name, String reportType, String token, MultiValueMap<String, String> headers) { |
|||
JiMuResult<JiMuPage<JiMuReportDetailResultDTO>> rst = new JiMuResult<>(false, "请求失败", 200, null,null); |
|||
return rst; |
|||
} |
|||
|
|||
@Override |
|||
public JiMuResult<Map<String,Object>> getReport(String id,String apiUrl,String params,MultiValueMap<String, String> headers) { |
|||
JiMuResult<Map<String,Object>> rst = new JiMuResult<>(false, "请求失败", 200, null,null); |
|||
return rst; |
|||
} |
|||
|
|||
@Override |
|||
public JiMuResult<JimuReportDbDataResultDTO> loadDbData(String reportId) { |
|||
JiMuResult<JimuReportDbDataResultDTO> rst = new JiMuResult<>(false, "请求失败", 200, null,null); |
|||
return rst; |
|||
} |
|||
|
|||
@Override |
|||
public Response exportAllExcelStream(JimuReportExportRequestDTO param) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public JiMuResult<List<List<JimuReportFieldTreeResultDTO>>> fieldTree(String reportId) { |
|||
JiMuResult rst = new JiMuResult<>(false, "请求失败", 200, null,null); |
|||
return rst; |
|||
} |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
package com.epmet.commons.feignclient.feigns.fallback; |
|||
|
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import feign.hystrix.FallbackFactory; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/8/9 13:27 |
|||
* @DESC |
|||
*/ |
|||
@Slf4j |
|||
@Component |
|||
public class JiMuReportOpenFeignClientFallbackFactory implements FallbackFactory<JiMuReportOpenFeignClientFallback> { |
|||
|
|||
private JiMuReportOpenFeignClientFallback fallback = new JiMuReportOpenFeignClientFallback(); |
|||
|
|||
@Override |
|||
public JiMuReportOpenFeignClientFallback create(Throwable cause) { |
|||
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause))); |
|||
return fallback; |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
package com.epmet.commons.tools.annotation; |
|||
|
|||
import java.lang.annotation.*; |
|||
|
|||
/** |
|||
* 标记一个接口,它会被报表服务所调用 |
|||
*/ |
|||
@Target(ElementType.METHOD) |
|||
@Retention(RetentionPolicy.RUNTIME) |
|||
@Documented |
|||
public @interface ReportRequest { |
|||
|
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
package com.epmet.commons.tools.aspect; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.bean.copier.CopyOptions; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.aspectj.lang.JoinPoint; |
|||
import org.aspectj.lang.annotation.Aspect; |
|||
import org.aspectj.lang.annotation.Before; |
|||
import org.aspectj.lang.reflect.MethodSignature; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.core.annotation.Order; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.context.request.RequestAttributes; |
|||
import org.springframework.web.context.request.RequestContextHolder; |
|||
import org.springframework.web.context.request.ServletRequestAttributes; |
|||
|
|||
import java.lang.reflect.Parameter; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 需要被报表服务请求的api,需要加上这个注解 |
|||
* 1.该注解会取url中固定的key,去redis获取参数,给入参dto复制 |
|||
*/ |
|||
@Aspect |
|||
@Component |
|||
@Order(20) |
|||
@Slf4j |
|||
public class ReportRequestAspect { |
|||
|
|||
/** |
|||
* 从redis中取参数用 |
|||
*/ |
|||
public static final String REPORT_REDIS_KEY = "paramKey"; |
|||
|
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
@Before("@annotation(com.epmet.commons.tools.annotation.ReportRequest)") |
|||
public void before(JoinPoint point) { |
|||
RequestAttributes ra = RequestContextHolder.getRequestAttributes(); |
|||
ServletRequestAttributes sra = (ServletRequestAttributes) ra; |
|||
String paramKey = sra.getRequest().getParameter(REPORT_REDIS_KEY); |
|||
if (StringUtils.isBlank(paramKey)) { |
|||
// 没有携带key参数,直接跳过
|
|||
return; |
|||
} |
|||
|
|||
Map<String, Object> cachedParams = redisUtils.hGetAll(paramKey); |
|||
if (cachedParams == null || cachedParams.size() == 0) { |
|||
log.warn("【报表服务】根据paramKey:{}未获取到有效的参数缓存。", paramKey); |
|||
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "参数失效", "参数失效"); |
|||
// redis中没有此参数
|
|||
} |
|||
|
|||
// 使用方法签名获取出参数class列表
|
|||
Object[] args = point.getArgs(); |
|||
MethodSignature signature = (MethodSignature) point.getSignature(); |
|||
Parameter[] parameters = signature.getMethod().getParameters(); |
|||
fillArgsToRequestBody(args, cachedParams, parameters); |
|||
} |
|||
|
|||
/** |
|||
* 将redis中取出的参数,赋值到指定的入参dto上 |
|||
* @param args |
|||
* @param storedParams |
|||
*/ |
|||
private void fillArgsToRequestBody(Object[] args, Map<String, Object> storedParams, Parameter[] parameters) { |
|||
for (int i = 0; i < args.length; i++) { |
|||
Object arg = args[i]; |
|||
RequestBody requestBodyAnno = parameters[i].getAnnotation(RequestBody.class); |
|||
if (arg != null && requestBodyAnno != null) { |
|||
Object argBean = BeanUtil.mapToBean(storedParams, arg.getClass(), true); |
|||
|
|||
// "pageSize", "pageNo", "isPage"三个属性不从redis拷贝,而是取传递雇来的
|
|||
// redis里面的字段如果是null,则不会赋值给arg
|
|||
BeanUtil.copyProperties(argBean, arg, new CopyOptions(null, true, "pageSize", "pageNo", "isPage")); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -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,34 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
public enum CollectUrlEnum { |
|||
|
|||
|
|||
URL_PRE("subpages/points/pages/fangyi/xinxi/create/index", "小程序码跳转地址"), |
|||
GET_CODE_URL("https://api.weixin.qq.com/wxa/getwxacode?access_token=", "获取二维码的url"); |
|||
|
|||
|
|||
private String code; |
|||
private String name; |
|||
|
|||
|
|||
CollectUrlEnum(String code, String name) { |
|||
this.code = code; |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
} |
|||
@ -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,57 @@ |
|||
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", "特殊人群"), |
|||
IS_XJC("IS_XJC", "新阶层人士"); |
|||
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,59 @@ |
|||
package com.epmet.dataaggre.dto.datastats.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 数据统计页面查询-接口入参 |
|||
*/ |
|||
@Data |
|||
public class NowStatsDataFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6462094914874831738L; |
|||
|
|||
public interface CustomerDataManageForm{} |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = CustomerDataManageForm.class) |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
@NotBlank(message = "组织ID不能为空",groups = CustomerDataManageForm.class) |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 区间:Interval 截止:end |
|||
*/ |
|||
@NotBlank(message = "type不能为空",groups = CustomerDataManageForm.class) |
|||
private String type; |
|||
|
|||
/** |
|||
* 开始时间 精确到秒【yyyy-MM-dd HH:mm:ss】 |
|||
*/ |
|||
private String startTime; |
|||
|
|||
/** |
|||
* 结束时间 精确到秒【yyyy-MM-dd HH:mm:ss】 |
|||
*/ |
|||
@NotBlank(message = "结束时间不能为空",groups = CustomerDataManageForm.class) |
|||
private String endTime; |
|||
|
|||
|
|||
//组织或网格Id集合
|
|||
private List<String> idList; |
|||
//数据类型【组织agency 网格grid】
|
|||
private String dataType; |
|||
|
|||
/** |
|||
* desc:是否是导出 |
|||
*/ |
|||
private boolean export = false; |
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
package com.epmet.dataaggre.dto.datastats.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 数据统计页面查询-接口返参 |
|||
*/ |
|||
@Data |
|||
public class NowStatsDataResultDTO { |
|||
|
|||
//组织、网格Id
|
|||
private String orgId; |
|||
//组织、网格名称
|
|||
private String orgName; |
|||
//注册居民数
|
|||
private Integer resiUserCount = 0; |
|||
//注册党员数
|
|||
private Integer partyMemberCount = 0; |
|||
//事件总数
|
|||
private Integer icEventCount = 0; |
|||
//居民上报事件数【小程序端随手拍随时讲】
|
|||
private Integer resiEventCount = 0; |
|||
//平台录入事件数【数字平台录入的事件数】
|
|||
private Integer pcEventCount = 0; |
|||
//项目总数
|
|||
private Integer projectCount = 0; |
|||
//议题转项目数
|
|||
private Integer issueProjectCount = 0; |
|||
//事件立项数
|
|||
private Integer icEventProjectCount = 0; |
|||
//直接立项项目数
|
|||
private Integer agencyProjectCount = 0; |
|||
|
|||
|
|||
//组织的pids
|
|||
private String pids; |
|||
//事件来源,0代表居民点 其他代表数字平台
|
|||
private String sourceType; |
|||
//项目来源 issue议题 agency立项 ic_event事件
|
|||
private String origin; |
|||
|
|||
} |
|||
@ -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,31 @@ |
|||
/** |
|||
* 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.dao.resipartymember; |
|||
|
|||
import com.epmet.dataaggre.dto.datastats.form.NowStatsDataFormDTO; |
|||
import com.epmet.dataaggre.dto.datastats.result.NowStatsDataResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Mapper |
|||
public interface ResiPartymemberDao { |
|||
|
|||
List<NowStatsDataResultDTO> getNowPart(NowStatsDataFormDTO formDTO); |
|||
|
|||
} |
|||
@ -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,68 @@ |
|||
/** |
|||
* 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.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class NowStatsDataExcel { |
|||
|
|||
//组织、网格名称
|
|||
@ExcelProperty(value = "组织名称") |
|||
@ColumnWidth(25) |
|||
private String orgName; |
|||
//注册居民数
|
|||
@ExcelProperty(value = "注册居民数") |
|||
@ColumnWidth(20) |
|||
private Integer resiUserCount; |
|||
//注册党员数
|
|||
@ExcelProperty(value = "注册党员数") |
|||
@ColumnWidth(20) |
|||
private Integer partyMemberCount; |
|||
//事件总数
|
|||
@ExcelProperty(value = "事件总数") |
|||
@ColumnWidth(20) |
|||
private Integer icEventCount; |
|||
//居民上报事件数【小程序端随手拍随时讲】
|
|||
@ExcelProperty(value = "居民上报事件数") |
|||
@ColumnWidth(20) |
|||
private Integer resiEventCount; |
|||
//平台录入事件数【数字平台录入的事件数】
|
|||
@ExcelProperty(value = "平台录入事件数") |
|||
@ColumnWidth(20) |
|||
private Integer pcEventCount; |
|||
//项目总数
|
|||
@ExcelProperty(value = "项目总数") |
|||
@ColumnWidth(20) |
|||
private Integer projectCount; |
|||
//议题转项目数
|
|||
@ExcelProperty(value = "议题转项目数") |
|||
@ColumnWidth(20) |
|||
private Integer issueProjectCount; |
|||
//事件立项数
|
|||
@ExcelProperty(value = "事件立项数") |
|||
@ColumnWidth(20) |
|||
private Integer icEventProjectCount; |
|||
//直接立项项目数
|
|||
@ExcelProperty(value = "立项数") |
|||
@ColumnWidth(20) |
|||
private Integer agencyProjectCount; |
|||
|
|||
} |
|||
@ -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; |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
package com.epmet.dataaggre.service; |
|||
|
|||
import com.epmet.dataaggre.dto.datastats.form.NowStatsDataFormDTO; |
|||
import com.epmet.dataaggre.dto.datastats.result.NowStatsDataResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface PartymemberService { |
|||
|
|||
List<NowStatsDataResultDTO> getNowPart(NowStatsDataFormDTO formDTO); |
|||
|
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue