forked from rongchao/epmet-cloud-rizhao
384 changed files with 13988 additions and 485 deletions
@ -0,0 +1,34 @@ |
|||
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 ('1549241609500921857', 'house_purpose', '房屋用途', '', 31, 0, 0, '1', '2022-07-19 11:55:58', '1', '2022-07-19 11:55:58'); |
|||
|
|||
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 ('1549241262669729794', 'house_type', '房屋类型', '楼房、平房、别墅', 30, 0, 0, '1', '2022-07-19 11:54:35', '1', '2022-07-19 11:54:35'); |
|||
|
|||
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 ('1548958559042969601', 'policy_level', '政策级别', '政策级别;与服务项目的政策级别一致', 29, 0, 0, '1', '2022-07-18 17:11:13', '1', '2022-07-19 11:10:42'); |
|||
|
|||
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 ('1548956290117443586', 'sql_query_type', 'sql查询条件', '目前应用于政策找人规则查询条件', 28, 0, 0, '1', '2022-07-18 17:02:12', '1', '2022-07-19 11:10:36'); |
|||
|
|||
|
|||
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 ('1548956434175008770', 1548956290117443586, '等于', '=', '0', '等于', 1, 0, 0, '1', '2022-07-18 17:02:47', '1', '2022-07-18 17:02:47'); |
|||
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 ('1548956518434381826', 1548956290117443586, '不等于', '!=', '0', '不等于', 2, 0, 0, '1', '2022-07-18 17:03:07', '1', '2022-07-18 17:03:07'); |
|||
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 ('1548956603855577089', 1548956290117443586, '大于', '>', '0', '大于', 3, 0, 0, '1', '2022-07-18 17:03:27', '1', '2022-07-18 17:03:27'); |
|||
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 ('1548956681525698561', 1548956290117443586, '大于等于', '>=', '0', '大于等于', 4, 0, 0, '1', '2022-07-18 17:03:46', '1', '2022-07-18 17:03:46'); |
|||
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 ('1548956755412557826', 1548956290117443586, '小于', '<', '0', '小于', 5, 0, 0, '1', '2022-07-18 17:04:03', '1', '2022-07-18 17:04:03'); |
|||
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 ('1548956830482210818', 1548956290117443586, '小于等于', '<=', '0', '<=', 6, 0, 0, '1', '2022-07-18 17:04:21', '1', '2022-07-18 17:04:21'); |
|||
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 ('1548956956554600450', 1548956290117443586, '包含', 'like', '0', '包含', 7, 0, 0, '1', '2022-07-18 17:04:51', '1', '2022-07-18 17:04:51'); |
|||
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 ('1548957038305779714', 1548956290117443586, '不包含', 'not like', '0', '不包含', 8, 0, 0, '1', '2022-07-18 17:05:11', '1', '2022-07-18 17:05:11'); |
|||
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 ('1548958784704913410', 1548958559042969601, '市级', '0', '0', '市级;政策级别ic_policy.POLICY_LEVEL', 1, 0, 0, '1', '2022-07-18 17:12:07', '1', '2022-07-18 17:12:07'); |
|||
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 ('1548958823573528578', 1548958559042969601, '区级', '1', '0', '区级;政策级别ic_policy.POLICY_LEVEL', 2, 0, 0, '1', '2022-07-18 17:12:16', '1', '2022-07-18 17:12:16'); |
|||
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 ('1548958887222091777', 1548958559042969601, '街道级', '2', '0', '街道级;政策级别ic_policy.POLICY_LEVEL', 3, 0, 0, '1', '2022-07-18 17:12:32', '1', '2022-07-18 17:12:32'); |
|||
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 ('1549241348443246594', 1549241262669729794, '楼房', '1', '0', '房屋类型ic_house.houseType', 1, 0, 0, '1', '2022-07-19 11:54:56', '1', '2022-07-19 11:54:56'); |
|||
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 ('1549241378726121473', 1549241262669729794, '平房', '2', '0', '房屋类型ic_house.houseType', 2, 0, 0, '1', '2022-07-19 11:55:03', '1', '2022-07-19 11:55:03'); |
|||
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 ('1549241467490177025', 1549241262669729794, '别墅', '3', '0', '房屋类型ic_house.houseType', 3, 0, 0, '1', '2022-07-19 11:55:24', '1', '2022-07-19 11:55:24'); |
|||
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 ('1549241664320475137', 1549241609500921857, '住宅', '1', '0', '房屋用途ic_house.purpose', 1, 0, 0, '1', '2022-07-19 11:56:11', '1', '2022-07-19 11:56:11'); |
|||
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 ('1549241693034680321', 1549241609500921857, '商业', '2', '0', '房屋用途ic_house.purpose', 2, 0, 0, '1', '2022-07-19 11:56:18', '1', '2022-07-19 11:56:18'); |
|||
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 ('1549241720020832257', 1549241609500921857, '办公', '3', '0', '房屋用途ic_house.purpose', 3, 0, 0, '1', '2022-07-19 11:56:24', '1', '2022-07-19 11:56:24'); |
|||
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 ('1549241750299512833', 1549241609500921857, '工业', '4', '0', '房屋用途ic_house.purpose', 4, 0, 0, '1', '2022-07-19 11:56:31', '1', '2022-07-19 11:56:31'); |
|||
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 ('1549241808101216257', 1549241609500921857, '仓储', '5', '0', '房屋用途ic_house.purpose', 5, 0, 0, '1', '2022-07-19 11:56:45', '1', '2022-07-19 11:56:45'); |
|||
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 ('1549241873729490946', 1549241609500921857, '商住混用', '6', '0', '房屋用途ic_house.purpose', 6, 0, 0, '1', '2022-07-19 11:57:01', '1', '2022-07-19 11:57: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 ('1549241913411801089', 1549241609500921857, '其他', '7', '0', '房屋用途ic_house.purpose', 7, 0, 0, '1', '2022-07-19 11:57:10', '1', '2022-07-19 11:57:10'); |
@ -0,0 +1,48 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 选择组织,进入首页入参Dto |
|||
* @Author yinzuomei |
|||
* @Date 2020/4/20 13:03 |
|||
*/ |
|||
@Data |
|||
public class GovWxmpEnteOrgByAccountFormDTO implements Serializable { |
|||
public interface AddUserInternalGroup {} |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup {} |
|||
/** |
|||
* wxCode |
|||
*/ |
|||
@NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String wxCode; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "账号不能为空",groups = {AddUserShowGroup.class}) |
|||
private String userAccount; |
|||
|
|||
/** |
|||
* 选择的组织所属的id |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 选择的要进入的组织(根组织id) |
|||
*/ |
|||
@NotBlank(message = "组织id不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String rootAgencyId; |
|||
|
|||
/** |
|||
* desc:小程序appId |
|||
*/ |
|||
private String appId; |
|||
|
|||
} |
|||
|
@ -0,0 +1,43 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 手机验证码获取组织接口入参 |
|||
* @Author zhy |
|||
* @Date 2020/4/18 10:38 |
|||
*/ |
|||
@Data |
|||
public class StaffOrgByAccountFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4193133227120225342L; |
|||
/** |
|||
* 添加用户操作的用户可见异常分组 |
|||
* 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup |
|||
* 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 |
|||
*/ |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup { |
|||
} |
|||
|
|||
public interface GetMyOrgByPassWordGroup extends CustomerClientShowGroup { |
|||
} |
|||
public interface GetMyOrgByLoginWxmp extends CustomerClientShowGroup{} |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class}) |
|||
private String userAccount; |
|||
|
|||
/** |
|||
* 验证码 |
|||
*/ |
|||
@NotBlank(message="验证码不能为空", groups = {GetMyOrgByLoginWxmp.class}) |
|||
private String smsCode; |
|||
|
|||
@NotBlank(message = "密码不能为空",groups ={GetMyOrgByPassWordGroup.class}) |
|||
private String password; |
|||
} |
|||
|
@ -0,0 +1,48 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description appId、账号、验证码获取组织-接口入参 |
|||
* @Author zhy |
|||
*/ |
|||
@Data |
|||
public class ThirdStaffOrgByAccountFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4193133227120225342L; |
|||
/** |
|||
* 添加用户操作的用户可见异常分组 |
|||
* 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup |
|||
* 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 |
|||
*/ |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup { |
|||
} |
|||
|
|||
public interface GetMyOrgByPassWordGroup extends CustomerClientShowGroup { |
|||
} |
|||
public interface GetMyOrgByLoginWxmp extends CustomerClientShowGroup{} |
|||
/** |
|||
* 小程序appId |
|||
*/ |
|||
@NotBlank(message = "appId不能为空", groups = {AddUserShowGroup.class}) |
|||
private String appId; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "账号不能为空", groups = {AddUserShowGroup.class}) |
|||
private String userAccount; |
|||
|
|||
/** |
|||
* 验证码 |
|||
*/ |
|||
@NotBlank(message="验证码不能为空", groups = {GetMyOrgByLoginWxmp.class}) |
|||
private String smsCode; |
|||
|
|||
@NotBlank(message = "密码不能为空",groups ={GetMyOrgByPassWordGroup.class}) |
|||
private String password; |
|||
} |
|||
|
@ -0,0 +1,47 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 单客户-选择组织,进入首页入参Dto |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class ThirdWxmpEnteOrgByAccountFormDTO implements Serializable { |
|||
public interface AddUserInternalGroup {} |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup {} |
|||
/** |
|||
* wxCode |
|||
*/ |
|||
@NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String wxCode; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "账号不能为空",groups = {AddUserShowGroup.class}) |
|||
private String userAccount; |
|||
|
|||
/** |
|||
* 选择的组织所属的id |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 选择的要进入的组织(根组织id) |
|||
*/ |
|||
@NotBlank(message = "组织id不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String rootAgencyId; |
|||
|
|||
/** |
|||
* 客户appId(exJson文件中获取) |
|||
*/ |
|||
@NotBlank(message = "appId不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String appId; |
|||
} |
|||
|
@ -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,77 @@ |
|||
package com.epmet.dataaggre.dto.epmetuser.form; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.util.Comparator; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ResisByPolicyRulesFormDTO { |
|||
private String ruleId; |
|||
private String orgId; |
|||
private String orgType; |
|||
private String neighborHoodId; |
|||
private String buildingId; |
|||
private String unitId; |
|||
private String houseId; |
|||
private String name; |
|||
private String mobile; |
|||
private String idCard; |
|||
private RuleList ruleList = new RuleList(); |
|||
private Integer pageNo = 1; |
|||
private Integer pageSize = 20; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public static class RuleList { |
|||
private String ruleName; |
|||
private List<ResiRule> resiRuleList; |
|||
private List<HouseRule> houseRuleList; |
|||
private List<StatRule> statRuleList; |
|||
} |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public static class ResiRule { |
|||
private String ruleDesc; |
|||
private String nextLogicalRel; |
|||
private String itemGroupId; |
|||
private String itemId; |
|||
private String queryType; |
|||
private String colTable; |
|||
private String colKey; |
|||
private String colVal; |
|||
} |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public static class HouseRule { |
|||
private String colTable; |
|||
private String colKey; |
|||
private String colVal; |
|||
private String ruleDesc; |
|||
private String nextLogicalRel; |
|||
private String queryType; |
|||
} |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public static class StatRule { |
|||
private String colKey; |
|||
private String colVal; |
|||
private String nextLogicalRel; |
|||
private String ruleDesc; |
|||
private String queryType; |
|||
private String colTable; |
|||
} |
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.epmet.dataaggre.dto.epmetuser.result; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelIgnore; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ResiByPolicyInfoResultDTO { |
|||
|
|||
@ExcelIgnore |
|||
private String icResiUserId; |
|||
|
|||
@ExcelProperty(value = "姓名") |
|||
@ColumnWidth(10) |
|||
private String name; |
|||
|
|||
@ExcelProperty("手机号") |
|||
@ColumnWidth(20) |
|||
private String mobile; |
|||
|
|||
@ExcelProperty("身份证号") |
|||
@ColumnWidth(30) |
|||
private String idCard; |
|||
/** |
|||
* 小区全名,包含小区前面的属性,比如网格等 |
|||
*/ |
|||
@ExcelIgnore |
|||
private String gridId; |
|||
@ExcelIgnore |
|||
private String neighborhoodId; |
|||
@ExcelProperty("小区名称") |
|||
@ColumnWidth(30) |
|||
private String neighborHoodName; |
|||
@ExcelProperty("年龄") |
|||
@ColumnWidth(10) |
|||
private Integer age; |
|||
@ExcelIgnore |
|||
private String birthday; |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.dataaggre.dto.govorg.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/7/27 9:27 |
|||
*/ |
|||
@Data |
|||
public class OrgStatisticsFormDTO extends PageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -1043502365053945317L; |
|||
private String customerId; |
|||
private String agencyId; |
|||
private String orgId; |
|||
private String orgType; |
|||
private String type; |
|||
private String startDate; |
|||
private String endDate; |
|||
private List<String> agencyList; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/7/27 9:33 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class MemberProjectInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -4880909768378661921L; |
|||
private String staffId; |
|||
private String staffName; |
|||
private String orgId; |
|||
private String orgName; |
|||
private Integer projectCount = 0; |
|||
private Integer closedCount = 0; |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/7/27 14:56 |
|||
*/ |
|||
@Data |
|||
public class OrgCountDTO implements Serializable { |
|||
private static final long serialVersionUID = -1875812403619088015L; |
|||
private String orgId; |
|||
private Integer count; |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/7/27 9:32 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class OrgProjectDetailResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 6333117500929136144L; |
|||
private String orgId; |
|||
private String orgType; |
|||
private String orgName; |
|||
private Integer memberCount = 0; |
|||
private Integer projectCount = 0; |
|||
private Integer closedCount = 0; |
|||
private Integer projectAve = 0; |
|||
private Integer closedAve = 0; |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.epmet.dataaggre.dao.govorg; |
|||
|
|||
import com.epmet.commons.tools.redis.common.bean.BuildingInfoCache; |
|||
import com.epmet.dto.IcNeighborHoodDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Mapper |
|||
public interface IcNeighborhoodDao { |
|||
List<IcNeighborHoodDTO> neighborhoodsByIds(@Param("neighborhoodIds") List<String> neighborhoodIds); |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.epmet.dataaggre.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import com.alibaba.excel.annotation.write.style.HeadStyle; |
|||
import com.alibaba.excel.enums.poi.FillPatternTypeEnum; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 数字平台党员信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) |
|||
@Data |
|||
public class MemberProjectInfoExcel { |
|||
|
|||
@ColumnWidth(10) |
|||
@ExcelProperty(value = "序号",order = 1) |
|||
private Integer index; |
|||
|
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "网格员",order = 2) |
|||
private String staffName; |
|||
|
|||
@ColumnWidth(40) |
|||
@ExcelProperty(value = "所属组织",order = 3) |
|||
private String orgName; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "上报数量",order = 4) |
|||
private Integer projectCount = 0; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "办结数",order = 5) |
|||
private Integer closedCount = 0; |
|||
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.epmet.dataaggre.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import com.alibaba.excel.annotation.write.style.HeadStyle; |
|||
import com.alibaba.excel.enums.poi.FillPatternTypeEnum; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 数字平台党员信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) |
|||
@Data |
|||
public class OrgProjectDetailExcel { |
|||
|
|||
@ColumnWidth(10) |
|||
@ExcelProperty(value = "序号",order = 1) |
|||
private Integer index; |
|||
|
|||
@ColumnWidth(40) |
|||
@ExcelProperty(value = "所属组织",order = 2) |
|||
private String orgName; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "网格员数",order = 3) |
|||
private Integer memberCount = 0; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "上报数量",order = 4) |
|||
private Integer projectCount = 0; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "办结数",order = 5) |
|||
private Integer closedCount = 0; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "人均上报",order = 6) |
|||
private Integer projectAve = 0; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "人均办结",order = 7) |
|||
private Integer closedAve = 0; |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dataaggre.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class ResisByPolicyExcel { |
|||
@ExcelProperty("姓名") |
|||
private String name; |
|||
@ExcelProperty("手机号") |
|||
private String mobile; |
|||
@ExcelProperty("身份证号") |
|||
private String idCard; |
|||
/** |
|||
* 小区全名,包含小区前面的属性,比如网格等 |
|||
*/ |
|||
@ExcelProperty("小区名") |
|||
private String neighborHoodName; |
|||
@ExcelProperty("年龄") |
|||
private Integer age; |
|||
} |
@ -0,0 +1,50 @@ |
|||
package com.epmet.dataaggre.service; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO; |
|||
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO; |
|||
import com.github.pagehelper.PageInfo; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.IOException; |
|||
import java.util.List; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 居民的service |
|||
*/ |
|||
public interface ResiService { |
|||
|
|||
/** |
|||
* 政策人员预览 |
|||
* @param pageNo |
|||
* @param pageSize |
|||
* @param resiRule |
|||
* @param houseRule |
|||
*/ |
|||
PageData<ResiByPolicyInfoResultDTO> listByPolicyRules( |
|||
String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, |
|||
String houseId, String idCard, String name, Integer pageNo, Integer pageSize, |
|||
List<ResisByPolicyRulesFormDTO.ResiRule> resiRule, |
|||
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule, |
|||
List<ResisByPolicyRulesFormDTO.StatRule> statRule); |
|||
|
|||
/** |
|||
* 政策找居民导出 |
|||
* @param orgId |
|||
* @param orgType |
|||
* @param neighborHoodId |
|||
* @param buildingId |
|||
* @param unitId |
|||
* @param houseId |
|||
* @param idCard |
|||
* @param name |
|||
* @param ruleId |
|||
*/ |
|||
void exportResisByPolicy(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, |
|||
String houseId, String idCard, String name, |
|||
String ruleId, List<ResisByPolicyRulesFormDTO.ResiRule> resiRule, |
|||
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule, |
|||
List<ResisByPolicyRulesFormDTO.StatRule> statRule, |
|||
HttpServletResponse response) throws IOException; |
|||
} |
@ -0,0 +1,288 @@ |
|||
package com.epmet.dataaggre.service.impl; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.alibaba.excel.EasyExcel; |
|||
import com.alibaba.excel.ExcelWriter; |
|||
import com.alibaba.excel.support.ExcelTypeEnum; |
|||
import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder; |
|||
import com.alibaba.excel.write.metadata.WriteSheet; |
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.feign.ResultDataResolver; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO; |
|||
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO; |
|||
import com.epmet.dataaggre.dto.govorg.result.GridsInfoListResultDTO; |
|||
import com.epmet.dataaggre.entity.govorg.IcHouseEntity; |
|||
import com.epmet.dataaggre.excel.ResisByPolicyExcel; |
|||
import com.epmet.dataaggre.service.ResiService; |
|||
import com.epmet.dataaggre.service.epmetuser.EpmetUserService; |
|||
import com.epmet.dataaggre.service.govorg.GovOrgService; |
|||
import com.epmet.dto.IcNeighborHoodDTO; |
|||
import com.epmet.dto.form.LoginUserDetailsFormDTO; |
|||
import com.epmet.dto.result.LoginUserDetailsResultDTO; |
|||
import com.epmet.feign.EpmetHeartOpenFeignClient; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.github.pagehelper.PageInfo; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.web.servlet.resource.ResourceUrlEncodingFilter; |
|||
|
|||
import javax.servlet.ServletOutputStream; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.IOException; |
|||
import java.time.*; |
|||
import java.time.format.DateTimeFormatter; |
|||
import java.time.temporal.ChronoUnit; |
|||
import java.time.temporal.TemporalUnit; |
|||
import java.util.*; |
|||
import java.util.regex.Matcher; |
|||
import java.util.regex.Pattern; |
|||
import java.util.stream.Collectors; |
|||
|
|||
@Service |
|||
public class ResiServiceImpl implements ResiService, ResultDataResolver { |
|||
|
|||
@Autowired |
|||
private EpmetUserService epmetUserService; |
|||
|
|||
@Autowired |
|||
private GovOrgService govOrgService; |
|||
|
|||
@Autowired |
|||
private EpmetHeartOpenFeignClient heartOpenFeignClient; |
|||
|
|||
@Autowired |
|||
private EpmetUserOpenFeignClient userOpenFeignClient; |
|||
|
|||
public static final Pattern REG_DATE = Pattern.compile("^(\\d{4})-(\\d{2})-(\\d{2})"); |
|||
|
|||
@Override |
|||
public PageData<ResiByPolicyInfoResultDTO> listByPolicyRules(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, |
|||
String houseId, String idCard, String name, Integer pageNo, Integer pageSize, |
|||
List<ResisByPolicyRulesFormDTO.ResiRule> resiRule, |
|||
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule, |
|||
List<ResisByPolicyRulesFormDTO.StatRule> statRule) { |
|||
String userId = EpmetRequestHolder.getLoginUserId(); |
|||
String app = EpmetRequestHolder.getLoginUserApp(); |
|||
String client = EpmetRequestHolder.getLoginUserClient(); |
|||
String customerId = EpmetRequestHolder.getLoginUserCustomerId(); |
|||
|
|||
// 对特殊规则进行转换。
|
|||
specificRuleConvert(resiRule); |
|||
|
|||
// 查询当前组织及下级id路径
|
|||
LoginUserDetailsResultDTO userDetail = getResultDataOrThrowsException(userOpenFeignClient.getLoginUserDetails(new LoginUserDetailsFormDTO(app, client, userId)), |
|||
ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); |
|||
|
|||
String orgIdPath = userDetail.getOrgIdPath(); |
|||
|
|||
// 结果集
|
|||
List<ResiByPolicyInfoResultDTO> resultResis = new ArrayList<>(); |
|||
|
|||
// 1.用户没配置house和stat规则,直接按照居民规则查询
|
|||
if (CollectionUtils.isEmpty(houseRule) && CollectionUtils.isEmpty(statRule)) { |
|||
List<ResiByPolicyInfoResultDTO> resis = epmetUserService.listByPolicyRules(customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, |
|||
houseId, idCard, name, pageNo, pageSize, resiRule, null); |
|||
fillResisExtraInfoForPolicy(resis); |
|||
return new PageData<>(resis, new PageInfo(resis).getTotal()); |
|||
} |
|||
|
|||
// 2.用户至少配置了house和stat规则的一个,那么就先查询房屋出来,然后根据房屋去找居民
|
|||
int housePageNo = 1; |
|||
int total = 0; |
|||
|
|||
// 只能手动分页了
|
|||
int start = (pageNo - 1) * pageSize; |
|||
int end = pageNo * pageSize; // 不包含
|
|||
|
|||
do { |
|||
// 拿到房屋id列表,去查询居民列表
|
|||
List<String> houseIds = govOrgService.listHouseIdsByRules(customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, |
|||
houseId, houseRule, statRule, housePageNo, 50); |
|||
|
|||
if (houseIds.size() == 0) { |
|||
// 用户使用了房屋和统计相关的条件,但是没查到房屋,我看就没有走下去了的必要了吧..
|
|||
break; |
|||
} |
|||
|
|||
// 查询居民数量
|
|||
Integer count = epmetUserService.getTotalByPolicyRules( |
|||
customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, |
|||
houseId, idCard, name, resiRule, houseIds); |
|||
|
|||
total += count; |
|||
|
|||
// 查询居民,满了20个,不再查询数据,只查询数量
|
|||
if (resultResis.size() < end) { |
|||
List<ResiByPolicyInfoResultDTO> resis = epmetUserService.listByPolicyRules( |
|||
customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, |
|||
houseId, idCard, name, 1, end, resiRule, houseIds); |
|||
|
|||
resultResis.addAll(resis); |
|||
} |
|||
|
|||
housePageNo ++; |
|||
} while (true); |
|||
|
|||
// 查出来所有的数据都没够到这一页的起始条数,返回空
|
|||
if (resultResis.size() < start) { |
|||
return new PageData<>(new ArrayList<>(), total); |
|||
} |
|||
|
|||
resultResis = resultResis.subList(start, Math.min(end, resultResis.size())); |
|||
|
|||
// 补充额外信息
|
|||
fillResisExtraInfoForPolicy(resultResis); |
|||
return new PageData<>(resultResis, total); |
|||
} |
|||
|
|||
/** |
|||
* 为特定的规则进行转换 |
|||
* @param resiRule |
|||
*/ |
|||
private void specificRuleConvert(List<ResisByPolicyRulesFormDTO.ResiRule> resiRule) { |
|||
// 使用年龄计算出生日期
|
|||
if (resiRule != null) { |
|||
resiRule.stream().forEach((r) -> { |
|||
if ("BIRTHDAY".equals(r.getColKey())) { |
|||
LocalDate birthday = LocalDate.now().minus(Long.valueOf(r.getColVal()), ChronoUnit.YEARS); |
|||
r.setQueryType(revertQueryType(r.getQueryType())); |
|||
r.setColVal(birthday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 翻转逻辑操作符 |
|||
* @param oldRel |
|||
* @return |
|||
*/ |
|||
private String revertQueryType(String oldRel) { |
|||
if (">".equals(oldRel)) { |
|||
return "<"; |
|||
} |
|||
|
|||
if (">=".equals(oldRel)) { |
|||
return "<="; |
|||
} |
|||
|
|||
if ("<".equals(oldRel)) { |
|||
return ">"; |
|||
} |
|||
|
|||
if ("<=".equals(oldRel)) { |
|||
return ">="; |
|||
} |
|||
|
|||
return ""; |
|||
} |
|||
|
|||
/** |
|||
* 补充额外信息 |
|||
* @param resultResis |
|||
*/ |
|||
private void fillResisExtraInfoForPolicy(List<ResiByPolicyInfoResultDTO> resultResis) { |
|||
if (CollectionUtils.isEmpty(resultResis)) { |
|||
return; |
|||
} |
|||
|
|||
List<String> gridIds = new ArrayList<>(); |
|||
List<String> neighborhoodIds = new ArrayList<>(); |
|||
resultResis.stream().forEach((r) -> { |
|||
gridIds.add(r.getGridId()); |
|||
neighborhoodIds.add(r.getNeighborhoodId()); |
|||
}); |
|||
|
|||
// 统一收集网格和小区信息
|
|||
Map<String, String> gridIdAndName = govOrgService.gridListByIds(gridIds) |
|||
.stream() |
|||
.collect(Collectors.toMap(GridsInfoListResultDTO::getGridId, GridsInfoListResultDTO::getName)); |
|||
|
|||
Map<String, String> neighborhoodIdAndName = govOrgService.neighborhoodsByIds(neighborhoodIds) |
|||
.stream().collect(Collectors.toMap(IcNeighborHoodDTO::getId, IcNeighborHoodDTO::getNeighborHoodName)); |
|||
|
|||
resultResis.stream().forEach((r) -> { |
|||
// 小区名称
|
|||
r.setNeighborHoodName(gridIdAndName.get(r.getGridId()).concat("-").concat(neighborhoodIdAndName.get(r.getNeighborhoodId()))); |
|||
|
|||
// 出生日期 & 年龄
|
|||
if (r.getBirthday() != null) { |
|||
Integer age = null; |
|||
try { |
|||
Matcher matcher = REG_DATE.matcher(r.getBirthday()); |
|||
if (matcher.matches()) { |
|||
String year = matcher.group(1); |
|||
String month = matcher.group(2); |
|||
String day = matcher.group(3); |
|||
LocalDate birthdayLocalDate = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); |
|||
age = Period.between(birthdayLocalDate, LocalDate.now()).getYears(); |
|||
r.setAge(age); |
|||
} |
|||
} catch (DateTimeException e) { |
|||
logger.error(r.getIcResiUserId() + "居民生日计算错误"); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
|
|||
@Override |
|||
public void exportResisByPolicy(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, |
|||
String houseId, String idCard, String name, |
|||
String ruleId, List<ResisByPolicyRulesFormDTO.ResiRule> resiRule, |
|||
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule, |
|||
List<ResisByPolicyRulesFormDTO.StatRule> statRule, |
|||
HttpServletResponse response) throws IOException { |
|||
|
|||
if (StringUtils.isNotBlank(ruleId)) { |
|||
// 从heart取,覆盖形参
|
|||
com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO.RuleList ruleList = getResultDataOrThrowsException( |
|||
heartOpenFeignClient.listPolicyRules4QueryAndExport(ruleId), |
|||
ServiceConstant.EPMET_HEART_SERVER, |
|||
EpmetErrorCode.SERVER_ERROR.getCode(), |
|||
null, null); |
|||
|
|||
resiRule = ConvertUtils.sourceToTarget(ruleList.getResiRuleList(), ResisByPolicyRulesFormDTO.ResiRule.class); |
|||
houseRule = ConvertUtils.sourceToTarget(ruleList.getHouseRuleList(), ResisByPolicyRulesFormDTO.HouseRule.class); |
|||
statRule = ConvertUtils.sourceToTarget(ruleList.getStatRuleList(), ResisByPolicyRulesFormDTO.StatRule.class); |
|||
} |
|||
|
|||
// 模板导出
|
|||
ExcelWriter writer = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("政策人员预览信息导出.xlsx", response)) |
|||
//.withTemplate(inputStream)
|
|||
.build(); |
|||
|
|||
WriteSheet writeSheet = EasyExcel.writerSheet("政策人员列表") |
|||
.head(ResiByPolicyInfoResultDTO.class) |
|||
.build(); |
|||
|
|||
Integer pageSize = 500; |
|||
Integer pageNo = 1; |
|||
|
|||
try { |
|||
do { |
|||
PageData<ResiByPolicyInfoResultDTO> resis = this.listByPolicyRules(orgId, orgType, neighborHoodId, buildingId, unitId, |
|||
houseId, idCard, name, pageNo, pageSize, resiRule, houseRule, statRule); |
|||
List<ResiByPolicyInfoResultDTO> list = resis.getList(); |
|||
List<ResisByPolicyExcel> excelDatas = ConvertUtils.sourceToTarget(list, ResisByPolicyExcel.class); |
|||
if (CollectionUtils.isEmpty(excelDatas)) { |
|||
break; |
|||
} |
|||
|
|||
writer.write(resis.getList(), writeSheet); |
|||
pageNo++; |
|||
} while (true); |
|||
} finally { |
|||
writer.finish(); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
<?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.govorg.IcNeighborhoodDao"> |
|||
|
|||
<!--id批量查询小区列表--> |
|||
<select id="neighborhoodsByIds" resultType="com.epmet.dto.IcNeighborHoodDTO"> |
|||
select ID, NEIGHBOR_HOOD_NAME |
|||
from ic_neighbor_hood |
|||
where ID in |
|||
<foreach collection="neighborhoodIds" item="id" separator="," open="(" close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,13 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AreaCodeDetailFormDTO { |
|||
|
|||
private String areaCode; |
|||
/** |
|||
* 省级:province; 市级: city; 区县级: district ;乡(镇、街道)级:street ;社区级:community |
|||
*/ |
|||
private String level; |
|||
} |
@ -0,0 +1,76 @@ |
|||
/** |
|||
* 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.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 客户关系表(01.14 add) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-03 |
|||
*/ |
|||
@Data |
|||
public class CustomerTreeDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
|
|||
/** |
|||
* 当前客户级别(社区级:community, |
|||
乡(镇、街道)级:street, |
|||
区县级: district, |
|||
市级: city |
|||
省级:province) |
|||
*/ |
|||
private String level; |
|||
|
|||
/** |
|||
* 当前客户的地区编码,实际就是根组织的area_code |
|||
*/ |
|||
private String areaCode; |
|||
|
|||
/** |
|||
* 当前客户的地区名称 |
|||
*/ |
|||
private String areaName; |
|||
|
|||
/** |
|||
* 当前客户的父节点地区名称 |
|||
*/ |
|||
private String parentCode; |
|||
|
|||
/** |
|||
* 客户名称 |
|||
*/ |
|||
private String customerName; |
|||
|
|||
/** |
|||
* 下一级 |
|||
*/ |
|||
private List<CustomerTreeDTO> children; |
|||
} |
@ -0,0 +1,116 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* heart库附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-07-18 |
|||
*/ |
|||
@Data |
|||
public class HeartAttachmentDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 业务id |
|||
*/ |
|||
private String businessId; |
|||
|
|||
/** |
|||
* 政策:ic_policy;服务:ic_service_record_v2 |
|||
*/ |
|||
private String attachTo; |
|||
|
|||
/** |
|||
* 附件名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) |
|||
*/ |
|||
private String format; |
|||
|
|||
/** |
|||
* 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* 附件地址 |
|||
*/ |
|||
private String url; |
|||
|
|||
/** |
|||
* 排序字段 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 附件状态(审核中:auditing; |
|||
auto_passed: 自动通过; |
|||
review:结果不确定,需要人工审核; |
|||
block: 结果违规; |
|||
rejected:人工审核驳回; |
|||
approved:人工审核通过) |
|||
现在图片是同步审核的,所以图片只有auto_passed一种状态 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 失败原因 |
|||
*/ |
|||
private String reason; |
|||
|
|||
/** |
|||
* 语音或视频时长,秒 |
|||
*/ |
|||
private Integer duration; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,74 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 政策匹配资源类型 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-07-18 |
|||
*/ |
|||
@Data |
|||
public class IcPolicyCategoryDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 政策id |
|||
*/ |
|||
private String icPolicyId; |
|||
|
|||
/** |
|||
* 分类编码 |
|||
*/ |
|||
private String categoryCode; |
|||
|
|||
/** |
|||
* 分类全路径,包含CATEGORY_CODE,英文逗号隔开 |
|||
*/ |
|||
private String codePath; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import com.epmet.commons.tools.dto.form.FileCommonDTO; |
|||
import com.epmet.dto.form.policy.IcPolicyRuleFormDTO; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 政策表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-07-18 |
|||
*/ |
|||
@Data |
|||
public class IcPolicyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String policyId; |
|||
|
|||
/** |
|||
* 政策创建人,所属组织id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* AGENCY_ID的全路径,含agency_id |
|||
*/ |
|||
private String orgIdPath; |
|||
/** |
|||
* 政策级别,0市级;1区级;2街道级 |
|||
*/ |
|||
private String policyLevel; |
|||
|
|||
/** |
|||
* 政策级别,0市级;1区级;2街道级 |
|||
*/ |
|||
private String policyLevelName; |
|||
|
|||
/** |
|||
* 生效起止日期 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date startDate; |
|||
|
|||
/** |
|||
* 截止日期 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date endDate; |
|||
|
|||
/** |
|||
* 政策标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 政策内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 是否过期;1:已过期;0:未过期 |
|||
*/ |
|||
private String expiredFlag; |
|||
|
|||
//以下三个详情接口返回
|
|||
private List<IcPolicyCategoryDTO> categoryList; |
|||
private List<FileCommonDTO> attachmentList; |
|||
private List<IcPolicyRuleFormDTO> ruleList; |
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 政策匹配规则 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-07-18 |
|||
*/ |
|||
@Data |
|||
public class IcPolicyRuleDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 政策id |
|||
*/ |
|||
private String icPolicyId; |
|||
|
|||
/** |
|||
* 规则名称 |
|||
*/ |
|||
private String ruleName; |
|||
|
|||
/** |
|||
* 排序字段 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
@JsonIgnore |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
@JsonIgnore |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
@JsonIgnore |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
@JsonIgnore |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
@JsonIgnore |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
@JsonIgnore |
|||
private Date updatedTime; |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue