124 changed files with 6373 additions and 12 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,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,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,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,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; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,119 @@ |
|||||
|
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 IcPolicyRuleDetailDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 政策id |
||||
|
*/ |
||||
|
private String icPolicyId; |
||||
|
|
||||
|
/** |
||||
|
* 规则id |
||||
|
*/ |
||||
|
private String ruleId; |
||||
|
|
||||
|
/** |
||||
|
* 规则描述文字,例如:基础信息性别等于女 |
||||
|
*/ |
||||
|
private String ruleDesc; |
||||
|
|
||||
|
/** |
||||
|
* resi:人员信息,house:房屋信息,stat:统计信息 |
||||
|
*/ |
||||
|
private String groupType; |
||||
|
|
||||
|
/** |
||||
|
* 与上一条的关系;and、or |
||||
|
*/ |
||||
|
private String nextLogicalRel; |
||||
|
|
||||
|
/** |
||||
|
* 分组id;人员信息有值; |
||||
|
*/ |
||||
|
private String itemGroupId; |
||||
|
|
||||
|
/** |
||||
|
* 组件id;人员信息有值; |
||||
|
*/ |
||||
|
private String itemId; |
||||
|
|
||||
|
/** |
||||
|
* 查询类型:等于、不等于....;来源于字典表sql_query_type |
||||
|
*/ |
||||
|
private String queryType; |
||||
|
|
||||
|
/** |
||||
|
* 表名;人员信息有值; |
||||
|
*/ |
||||
|
private String colTable; |
||||
|
|
||||
|
/** |
||||
|
* 人员信息存储组件对应的列名;房屋信息存储ic_house表的列名;统计信息应该是定义到字典表,这里存储字典key就行吧 |
||||
|
*/ |
||||
|
private String colKey; |
||||
|
|
||||
|
/** |
||||
|
* 参数值 |
||||
|
*/ |
||||
|
private String colVal; |
||||
|
|
||||
|
/** |
||||
|
* 排序字段;同一group_type升序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,103 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
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 IcServiceFeedbackV2DTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 服务ID |
||||
|
*/ |
||||
|
private String serviceRecordId; |
||||
|
|
||||
|
/** |
||||
|
* 服务目标 |
||||
|
*/ |
||||
|
private String serviceGoal; |
||||
|
|
||||
|
/** |
||||
|
* 服务效果 |
||||
|
*/ |
||||
|
private String serviceEffect; |
||||
|
|
||||
|
/** |
||||
|
* 服务人数 |
||||
|
*/ |
||||
|
private Integer servicePeopleNumber; |
||||
|
|
||||
|
/** |
||||
|
* 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect |
||||
|
*/ |
||||
|
private String satisfaction; |
||||
|
|
||||
|
/** |
||||
|
* 地址经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 地址纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
private List<HeartAttachmentDTO> fileList; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,115 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
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 IcServiceRecordV2DTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织类型 |
||||
|
社区自组织:community_org, |
||||
|
志愿者:ic_user_volunteer, |
||||
|
联建单位:party_unit |
||||
|
*/ |
||||
|
private String serviceOrgType; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织ID |
||||
|
*/ |
||||
|
private String serviceOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 经办人姓名 |
||||
|
*/ |
||||
|
private String principalName; |
||||
|
|
||||
|
/** |
||||
|
* 联系方式 |
||||
|
*/ |
||||
|
private String principalContact; |
||||
|
|
||||
|
/** |
||||
|
* 服务时间 |
||||
|
*/ |
||||
|
private Date serviceTimeStart; |
||||
|
|
||||
|
/** |
||||
|
* 服务截止时间 |
||||
|
*/ |
||||
|
private Date serviceTimeEnd; |
||||
|
|
||||
|
/** |
||||
|
* in_service服务中;completed:已完成;cancel:取消 |
||||
|
*/ |
||||
|
private String serviceStatus; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 服务名称 |
||||
|
*/ |
||||
|
private String serviceName; |
||||
|
|
||||
|
/** |
||||
|
* 政策依据ID |
||||
|
*/ |
||||
|
private String policyId; |
||||
|
|
||||
|
private String serviceCategoryKey; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
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 IcServiceScopeV2DTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 服务记录的ID |
||||
|
*/ |
||||
|
private String serviceRecordId; |
||||
|
|
||||
|
/** |
||||
|
* agency单位;grid网格;neighborhood小区 |
||||
|
*/ |
||||
|
private String objectType; |
||||
|
|
||||
|
/** |
||||
|
* 选中的组织的ID |
||||
|
*/ |
||||
|
private String objectId; |
||||
|
|
||||
|
/** |
||||
|
* 发布范围的组织ID PATH |
||||
|
*/ |
||||
|
private String objectIdPath; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String objectName; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,96 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 服务记录反馈表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcServiceFeedbackV2AddFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 服务ID |
||||
|
*/ |
||||
|
@NotBlank(message = "服务Id不能为空", groups = {UpdateGroup.class}) |
||||
|
private String serviceRecordId; |
||||
|
/** |
||||
|
* 服务目标 |
||||
|
*/ |
||||
|
private String serviceGoal; |
||||
|
/** |
||||
|
* 服务效果 |
||||
|
*/ |
||||
|
private String serviceEffect; |
||||
|
/** |
||||
|
* 服务人数 |
||||
|
*/ |
||||
|
private Integer servicePeopleNumber; |
||||
|
/** |
||||
|
* 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect |
||||
|
*/ |
||||
|
private String satisfaction; |
||||
|
/** |
||||
|
* 服务状态[in_service服务中;completed:已完成;cancel:取消] |
||||
|
*/ |
||||
|
private String serviceStatus; |
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
/** |
||||
|
* 地址经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
/** |
||||
|
* 地址纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
/** |
||||
|
* 地址纬度 |
||||
|
*/ |
||||
|
private List<FileDTO> fileList; |
||||
|
|
||||
|
private String customerId; |
||||
|
private String userId; |
||||
|
|
||||
|
@Data |
||||
|
public static class FileDTO { |
||||
|
|
||||
|
/** |
||||
|
* 文件名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
/** |
||||
|
* url地址 |
||||
|
*/ |
||||
|
private String url; |
||||
|
/** |
||||
|
* 文件类型(图片 - image、 视频 - video、 语音 - voice、 文档 - doc) |
||||
|
*/ |
||||
|
private String type; |
||||
|
/** |
||||
|
* 后缀名 |
||||
|
*/ |
||||
|
private String format; |
||||
|
/** |
||||
|
* 文件大小 kb |
||||
|
*/ |
||||
|
private Integer size; |
||||
|
/** |
||||
|
* 语音或视频文件时长,单位秒 |
||||
|
*/ |
||||
|
private Integer duration; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
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 IcServiceRecordV2AddEditFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 服务Id |
||||
|
*/ |
||||
|
@NotBlank(message = "服务Id不能为空", groups = {UpdateGroup.class}) |
||||
|
private String serviceRecordId; |
||||
|
/** |
||||
|
* 服务名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "服务名称不能为空", groups = {AddGroup.class}) |
||||
|
private String serviceName; |
||||
|
/** |
||||
|
* 服务组织类型 社区自组织:community_org, 志愿者:ic_user_volunteer, 联建单位:party_unit |
||||
|
*/ |
||||
|
@NotBlank(message = "服务名称不能为空", groups = {AddGroup.class}) |
||||
|
private String serviceOrgType; |
||||
|
|
||||
|
@NotBlank(message = "serviceCategoryKey不能为空", groups = {AddGroup.class}) |
||||
|
private String serviceCategoryKey; |
||||
|
/** |
||||
|
* 服务组织Id |
||||
|
*/ |
||||
|
@NotBlank(message = "服务名称不能为空", groups = {AddGroup.class}) |
||||
|
private String serviceOrgId; |
||||
|
/** |
||||
|
* 服务范围集合 |
||||
|
*/ |
||||
|
private List<ObjList> objList; |
||||
|
/** |
||||
|
* 政策依据Id |
||||
|
*/ |
||||
|
private String policyId; |
||||
|
/** |
||||
|
* 经办人姓名 |
||||
|
*/ |
||||
|
private String principalName; |
||||
|
/** |
||||
|
* 联系方式 |
||||
|
*/ |
||||
|
private String principalContact; |
||||
|
/** |
||||
|
* 起始服务时间 |
||||
|
*/ |
||||
|
@NotNull(message = "起始服务时间不能为空", groups = {AddGroup.class}) |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
private Date serviceTimeStart; |
||||
|
/** |
||||
|
* 终止服务时间 |
||||
|
*/ |
||||
|
@NotNull(message = "终止服务时间不能为空", groups = {AddGroup.class}) |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
private Date serviceTimeEnd; |
||||
|
/** |
||||
|
* 备注信息 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
/** |
||||
|
* 反馈记录数据 |
||||
|
*/ |
||||
|
private IcServiceFeedbackV2AddFormDTO feedback; |
||||
|
|
||||
|
private String customerId; |
||||
|
private String userId; |
||||
|
|
||||
|
@Data |
||||
|
public static class ObjList { |
||||
|
private String objectType; |
||||
|
private String objectId; |
||||
|
private String objectName; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/7/19 16:34 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ServiceRecordV2DetailFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 476430342315532314L; |
||||
|
|
||||
|
public interface ServiceRecordV2DetailForm{} |
||||
|
|
||||
|
@NotBlank(message = "serviceRecordId不能为空",groups = ServiceRecordV2DetailForm.class) |
||||
|
private String serviceRecordId; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/7/19 10:10 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ServiceRecordV2ListFormDTO extends PageFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 88592831607216246L; |
||||
|
|
||||
|
public interface ServiceRecordV2ListForm{} |
||||
|
|
||||
|
/** |
||||
|
* 服务名称 |
||||
|
*/ |
||||
|
private String serviceName; |
||||
|
|
||||
|
@NotBlank(message = "serviceCategoryKey不能为空",groups = ServiceRecordV2ListForm.class) |
||||
|
private String serviceCategoryKey; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织ID |
||||
|
*/ |
||||
|
private String serviceOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 起始服务时间yyyy-MM-dd |
||||
|
*/ |
||||
|
private String serviceTimeStart; |
||||
|
|
||||
|
/** |
||||
|
* 终止服务时间yyyy-MM-dd |
||||
|
*/ |
||||
|
private String serviceTimeEnd; |
||||
|
|
||||
|
/** |
||||
|
* in_service服务中;completed:已完成;cancel:取消 |
||||
|
*/ |
||||
|
private String serviceStatus; |
||||
|
|
||||
|
/** |
||||
|
* 满意度 0:不满意,1:基本满意,2:非常满意 |
||||
|
*/ |
||||
|
private String satisfaction; |
||||
|
private String customerId; |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 当前工作人员所属组织ID |
||||
|
*/ |
||||
|
private String orgId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,101 @@ |
|||||
|
package com.epmet.dto.form.policy; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.FileCommonDTO; |
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import com.epmet.dto.IcPolicyCategoryDTO; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotEmpty; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/7/19 13:09 |
||||
|
*/ |
||||
|
|
||||
|
@Data |
||||
|
public class IcPolicyFormDTO implements Serializable { |
||||
|
public interface AddUserInternalGroup { |
||||
|
} |
||||
|
|
||||
|
public interface AddUserShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface UpdateUserInternalGroup { |
||||
|
} |
||||
|
@NotBlank(message = "政策id不能为空",groups = UpdateUserInternalGroup.class) |
||||
|
private String policyId; |
||||
|
/** |
||||
|
* 政策创建人,所属组织id |
||||
|
*/ |
||||
|
@NotBlank(message = "orgId不能为空",groups = UpdateUserInternalGroup.class) |
||||
|
private String orgId; |
||||
|
|
||||
|
// /**
|
||||
|
// * AGENCY_ID的全路径,含agency_id
|
||||
|
// */
|
||||
|
// @NotBlank(message = "orgIdPath不能为空",groups = UpdateUserInternalGroup.class)
|
||||
|
// private String orgIdPath;
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
@NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String customerId; |
||||
|
private String staffId; |
||||
|
|
||||
|
/** |
||||
|
* 政策级别,0市级;1区级;2街道级 |
||||
|
*/ |
||||
|
@NotBlank(message = "政策级别不能为空", groups = AddUserShowGroup.class) |
||||
|
private String policyLevel; |
||||
|
|
||||
|
/** |
||||
|
* 生效起止日期 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd") |
||||
|
@NotNull(message = "政策开始日期不能为空", groups = AddUserShowGroup.class) |
||||
|
private Date startDate; |
||||
|
|
||||
|
/** |
||||
|
* 截止日期 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd") |
||||
|
@NotNull(message = "政策截止日期不能为空", groups = AddUserShowGroup.class) |
||||
|
private Date endDate; |
||||
|
|
||||
|
/** |
||||
|
* 政策标题 |
||||
|
*/ |
||||
|
@NotBlank(message = "政策标题不能为空", groups = AddUserShowGroup.class) |
||||
|
@Length(max = 100, groups = AddUserShowGroup.class, message = "政策标题最多输入100字") |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 政策内容 |
||||
|
*/ |
||||
|
// @NotBlank(message = "政策内容不能为空", groups = AddUserShowGroup.class)
|
||||
|
@Length(max = 2000, groups = AddUserShowGroup.class, message = "政策内容最多输入2000字") |
||||
|
private String content; |
||||
|
|
||||
|
private List<IcPolicyCategoryDTO> categoryList; |
||||
|
|
||||
|
// @Valid
|
||||
|
private List<FileCommonDTO> attachmentList; |
||||
|
|
||||
|
@Valid |
||||
|
@NotEmpty(message = "政策细则不能为空",groups =AddUserShowGroup.class ) |
||||
|
private List<IcPolicyRuleFormDTO> ruleList; |
||||
|
|
||||
|
private String agencyId; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,38 @@ |
|||||
|
package com.epmet.dto.form.policy; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/7/19 15:36 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPolicyPageFormDTO extends PageFormDTO implements Serializable { |
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
private String staffId; |
||||
|
|
||||
|
/** |
||||
|
* 政策标题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 政策内容 |
||||
|
*/ |
||||
|
private String content; |
||||
|
|
||||
|
/** |
||||
|
* 是否过期;1:已过期;0:未过期 |
||||
|
*/ |
||||
|
private String expiredFlag; |
||||
|
private String agencyId; |
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,94 @@ |
|||||
|
package com.epmet.dto.form.policy; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/7/19 13:32 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPolicyRuleDetailDTO { |
||||
|
public interface ResiRulerShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface HouseRulerShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface StatRulerShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
/** |
||||
|
* 规则描述文字,例如:基础信息性别等于女 |
||||
|
*/ |
||||
|
private String ruleDesc; |
||||
|
|
||||
|
/** |
||||
|
* 与下一条的关系;and、or |
||||
|
* 如果没有条件的话,此列为空 |
||||
|
*/ |
||||
|
private String nextLogicalRel; |
||||
|
|
||||
|
/** |
||||
|
* 分组id;人员信息有值; |
||||
|
*/ |
||||
|
@NotBlank(message = "itemGroupId不能为空", groups = ResiRulerShowGroup.class) |
||||
|
private String itemGroupId; |
||||
|
|
||||
|
/** |
||||
|
* 表名;人员信息有值;房屋信息也有值 |
||||
|
*/ |
||||
|
@NotBlank(message = "itemId不能为空", groups = ResiRulerShowGroup.class) |
||||
|
private String itemId; |
||||
|
|
||||
|
/** |
||||
|
* 查询类型:等于、不等于....;来源于字典表sql_query_type |
||||
|
*/ |
||||
|
@NotBlank(message = "查询类型不能为空", groups = {ResiRulerShowGroup.class,HouseRulerShowGroup.class,StatRulerShowGroup.class}) |
||||
|
private String queryType; |
||||
|
|
||||
|
/** |
||||
|
* 表名;人员信息有值; |
||||
|
*/ |
||||
|
@NotBlank(message = "colTable不能为空", groups = {ResiRulerShowGroup.class,HouseRulerShowGroup.class}) |
||||
|
private String colTable; |
||||
|
|
||||
|
/** |
||||
|
* 人员信息存储组件对应的列名;房屋信息存储ic_house表的列名;统计信息应该是定义到字典表,这里存储字典key就行吧 |
||||
|
*/ |
||||
|
@NotBlank(message = "条件不能为空", groups = {ResiRulerShowGroup.class,HouseRulerShowGroup.class,StatRulerShowGroup.class}) |
||||
|
private String colKey; |
||||
|
|
||||
|
/** |
||||
|
* 参数值 |
||||
|
*/ |
||||
|
@NotBlank(message = "参数值不能为空", groups = {ResiRulerShowGroup.class,HouseRulerShowGroup.class,StatRulerShowGroup.class}) |
||||
|
private String colVal; |
||||
|
|
||||
|
/** |
||||
|
* 用于前端展示:基础信息、教育信息、房屋类型..... |
||||
|
*/ |
||||
|
private String itemGroupName; |
||||
|
/** |
||||
|
* 用于前端展示:姓名、手机号、...... |
||||
|
*/ |
||||
|
private String itemLabel; |
||||
|
|
||||
|
/** |
||||
|
* 用于前端展示:等于、不等于、大于、小于.... |
||||
|
*/ |
||||
|
private String queryTypeName; |
||||
|
|
||||
|
/** |
||||
|
* 用于前端展示:参数值显示值eg:男女 |
||||
|
*/ |
||||
|
private String colValLabel; |
||||
|
|
||||
|
/** |
||||
|
* 用于前端展示:逻辑:并且、或者 |
||||
|
*/ |
||||
|
private String nextLogicalRelName; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,45 @@ |
|||||
|
package com.epmet.dto.form.policy; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/7/19 13:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPolicyRuleFormDTO implements Serializable { |
||||
|
|
||||
|
/** |
||||
|
* 细则名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "细则名称不能为空", groups = IcPolicyFormDTO.AddUserShowGroup.class) |
||||
|
private String ruleName; |
||||
|
/** |
||||
|
* 人员信息 |
||||
|
*/ |
||||
|
@Valid |
||||
|
// @NotEmpty
|
||||
|
private List<IcPolicyRuleDetailDTO> resiRuleList; |
||||
|
/** |
||||
|
* 房屋信息 |
||||
|
*/ |
||||
|
@Valid |
||||
|
private List<IcPolicyRuleDetailDTO> houseRuleList; |
||||
|
/** |
||||
|
* 统计信息 |
||||
|
*/ |
||||
|
@Valid |
||||
|
private List<IcPolicyRuleDetailDTO> statRuleList; |
||||
|
|
||||
|
/** |
||||
|
* ruleId |
||||
|
*/ |
||||
|
private String id; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,73 @@ |
|||||
|
package com.epmet.dto.form.resi; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@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; |
||||
|
private Integer pageSize; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public static class RuleList { |
||||
|
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,71 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.epmet.dto.IcServiceFeedbackV2DTO; |
||||
|
import com.epmet.dto.IcServiceScopeV2DTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/7/19 16:34 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ServiceRecordV2DetailResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 3385425608362604836L; |
||||
|
|
||||
|
private String serviceRecordId; |
||||
|
|
||||
|
private String serviceName; |
||||
|
private String policyId; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织类型 |
||||
|
社区自组织:community_org, |
||||
|
志愿者:ic_user_volunteer, |
||||
|
联建单位:party_unit |
||||
|
*/ |
||||
|
private String serviceOrgType; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织ID |
||||
|
*/ |
||||
|
private String serviceOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 经办人姓名 |
||||
|
*/ |
||||
|
private String principalName; |
||||
|
|
||||
|
/** |
||||
|
* 联系方式 |
||||
|
*/ |
||||
|
private String principalContact; |
||||
|
|
||||
|
/** |
||||
|
* 服务时间 |
||||
|
*/ |
||||
|
private String serviceTimeStart; |
||||
|
|
||||
|
/** |
||||
|
* 服务截止时间 |
||||
|
*/ |
||||
|
private String serviceTimeEnd; |
||||
|
|
||||
|
/** |
||||
|
* in_service服务中;completed:已完成;cancel:取消 |
||||
|
*/ |
||||
|
private String serviceStatus; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
private List<IcServiceScopeV2DTO> gridIdList; |
||||
|
|
||||
|
private IcServiceFeedbackV2DTO feedback; |
||||
|
} |
||||
@ -0,0 +1,66 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/7/19 10:16 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ServiceRecordV2ListResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -7486208970876756573L; |
||||
|
|
||||
|
/** |
||||
|
* 服务ID |
||||
|
*/ |
||||
|
private String serviceRecordId; |
||||
|
|
||||
|
/** |
||||
|
* 政策ID |
||||
|
*/ |
||||
|
private String policyId; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织类别 |
||||
|
*/ |
||||
|
private String serviceOrgType; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织ID |
||||
|
*/ |
||||
|
private String serviceOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织名字 |
||||
|
*/ |
||||
|
private String serviceOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 服务名字 |
||||
|
*/ |
||||
|
private String serviceName; |
||||
|
|
||||
|
/** |
||||
|
* 起始服务时间yyyy-MM-dd |
||||
|
*/ |
||||
|
private String serviceTimeStart; |
||||
|
|
||||
|
/** |
||||
|
* 终止服务时间yyyy-MM-dd |
||||
|
*/ |
||||
|
private String serviceTimeEnd; |
||||
|
|
||||
|
/** |
||||
|
* 服务状态 |
||||
|
*/ |
||||
|
private String serviceStatus; |
||||
|
|
||||
|
/** |
||||
|
* 服务人数 |
||||
|
*/ |
||||
|
private Integer servicePeopleNumber; |
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPolicyItemResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* house:房屋信息,stat:统计信息 |
||||
|
*/ |
||||
|
private String groupType; |
||||
|
|
||||
|
/** |
||||
|
* 选项名;例如:房屋类型,房屋状态,人均收入 |
||||
|
*/ |
||||
|
private String label; |
||||
|
|
||||
|
/** |
||||
|
* 表名 |
||||
|
*/ |
||||
|
private String tableName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋信息存储列名;统计信息定义好key放在这里 |
||||
|
*/ |
||||
|
private String colKey; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String itemType; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 值来源;需要接口获取:remote。 |
||||
|
*/ |
||||
|
private String optionSourceType; |
||||
|
|
||||
|
/** |
||||
|
* 动态url; |
||||
|
*/ |
||||
|
private String optionSourceUrl; |
||||
|
|
||||
|
/** |
||||
|
* 动态url的入参;存储json串 |
||||
|
*/ |
||||
|
private String optionSourceParam; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.dto.result.resi; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class ResiByPolicyInfoResultDTO { |
||||
|
|
||||
|
private String icResiUserId; |
||||
|
private String name; |
||||
|
private String mobile; |
||||
|
private String idCard; |
||||
|
/** |
||||
|
* 小区全名,包含小区前面的属性,比如网格等 |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
private String neighborhoodId; |
||||
|
private String neighborHoodName; |
||||
|
private Integer age; |
||||
|
private Date birthday; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,70 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.HeartAttachmentDTO; |
||||
|
import com.epmet.service.HeartAttachmentService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* heart库附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("heartAttachment") |
||||
|
public class HeartAttachmentController { |
||||
|
|
||||
|
@Autowired |
||||
|
private HeartAttachmentService heartAttachmentService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<HeartAttachmentDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<HeartAttachmentDTO> page = heartAttachmentService.page(params); |
||||
|
return new Result<PageData<HeartAttachmentDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<HeartAttachmentDTO> get(@PathVariable("id") String id){ |
||||
|
HeartAttachmentDTO data = heartAttachmentService.get(id); |
||||
|
return new Result<HeartAttachmentDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody HeartAttachmentDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
heartAttachmentService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody HeartAttachmentDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
heartAttachmentService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
heartAttachmentService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,183 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dto.IcPolicyDTO; |
||||
|
import com.epmet.dto.IcPolicyItemResultDTO; |
||||
|
import com.epmet.dto.IcPolicyRuleDTO; |
||||
|
import com.epmet.dto.form.policy.IcPolicyFormDTO; |
||||
|
import com.epmet.dto.form.policy.IcPolicyPageFormDTO; |
||||
|
import com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO; |
||||
|
import com.epmet.dto.result.resi.ResiByPolicyInfoResultDTO; |
||||
|
import com.epmet.entity.IcPolicyRuleDetailEntity; |
||||
|
import com.epmet.service.IcPolicyService; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 政策表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("policy") |
||||
|
public class IcPolicyController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcPolicyService icPolicyService; |
||||
|
|
||||
|
/** |
||||
|
* 房屋信息、统计信息查询有哪些可选项 |
||||
|
* @param customerId |
||||
|
* @param groupType |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("item-list/{groupType}") |
||||
|
public Result<List<IcPolicyItemResultDTO>> itemList(@RequestHeader("customerId") String customerId, @PathVariable("groupType") String groupType) { |
||||
|
List<IcPolicyItemResultDTO> list = icPolicyService.itemList(customerId, groupType); |
||||
|
return new Result<List<IcPolicyItemResultDTO>>().ok(list); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 政策管理-新增/修改 |
||||
|
* |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("add") |
||||
|
public Result add(@LoginUser TokenDto tokenDto, @RequestBody IcPolicyFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDto.getUserId()); |
||||
|
ValidatorUtils.validateEntity(formDTO, IcPolicyFormDTO.AddUserShowGroup.class, IcPolicyFormDTO.AddUserInternalGroup.class); |
||||
|
icPolicyService.addOrUpdatePolicy(formDTO); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑政策 |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("update") |
||||
|
public Result update(@LoginUser TokenDto tokenDto, @RequestBody IcPolicyFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDto.getUserId()); |
||||
|
ValidatorUtils.validateEntity(formDTO, IcPolicyFormDTO.AddUserShowGroup.class, IcPolicyFormDTO.AddUserInternalGroup.class,IcPolicyFormDTO.UpdateUserInternalGroup.class); |
||||
|
icPolicyService.addOrUpdatePolicy(formDTO); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 政策列表 |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("list") |
||||
|
public Result<PageData<IcPolicyDTO>> policyList(@LoginUser TokenDto tokenDto, @RequestBody IcPolicyPageFormDTO formDTO){ |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDto.getUserId()); |
||||
|
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class,PageFormDTO.AddUserShowGroup.class); |
||||
|
PageData<IcPolicyDTO> page = icPolicyService.policyList(formDTO); |
||||
|
return new Result<PageData<IcPolicyDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc: 政策列表下拉选 |
||||
|
* @param tokenDto |
||||
|
* @author zxc |
||||
|
* @date 2022/7/21 09:48 |
||||
|
*/ |
||||
|
@PostMapping("policyListSelect") |
||||
|
public Result<List<IcPolicyDTO>> policyListSelect(@LoginUser TokenDto tokenDto){ |
||||
|
return new Result<List<IcPolicyDTO>>().ok(icPolicyService.policyListSelect(tokenDto.getUserId(),tokenDto.getCustomerId())); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 细则列表 |
||||
|
* @param customerId |
||||
|
* @param policyId |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("rulelist/{policyId}") |
||||
|
public Result<List<IcPolicyRuleDTO>> ruleList(@RequestHeader("customerId") String customerId,@PathVariable("policyId") String policyId) { |
||||
|
return new Result<List<IcPolicyRuleDTO>>().ok(icPolicyService.ruleList(customerId,policyId)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除政策 |
||||
|
* @param policyId |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("delete/{policyId}") |
||||
|
public Result deletePolicy(@PathVariable("policyId") String policyId) { |
||||
|
icPolicyService.deleteById(policyId); |
||||
|
return new Result<>(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("detail/{policyId}") |
||||
|
public Result<IcPolicyDTO> policyDetail(@LoginUser TokenDto tokenDto,@PathVariable("policyId") String policyId) { |
||||
|
return new Result<IcPolicyDTO>().ok(icPolicyService.policyDetail(tokenDto.getCustomerId(),policyId)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 为预览和导出提供规则列表查询 |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("rules4ResiListAndExport/{ruleId}") |
||||
|
public Result<ResisByPolicyRulesFormDTO.RuleList> listPolicyRules4QueryAndExport(@PathVariable("ruleId") String ruleId) { |
||||
|
Map<String, List<IcPolicyRuleDetailEntity>> ruleMap = icPolicyService.listPolicyRules4QueryAndExport(EpmetRequestHolder.getLoginUserCustomerId(), ruleId); |
||||
|
ResisByPolicyRulesFormDTO.RuleList data = new ResisByPolicyRulesFormDTO.RuleList(); |
||||
|
// resi规则
|
||||
|
List<IcPolicyRuleDetailEntity> originResiRules = ruleMap.get("resi"); |
||||
|
if (CollectionUtils.isNotEmpty(originResiRules)) { |
||||
|
List<ResisByPolicyRulesFormDTO.ResiRule> resiRules = originResiRules |
||||
|
.stream() |
||||
|
.map((r) -> new ResisByPolicyRulesFormDTO.ResiRule(r.getRuleDesc(), r.getNextLogicalRel(), r.getItemGroupId(), |
||||
|
r.getItemId(), r.getQueryType(), r.getColTable(), r.getColKey(), r.getColVal())) |
||||
|
.collect(Collectors.toList()); |
||||
|
|
||||
|
data.setResiRuleList(resiRules); |
||||
|
} |
||||
|
|
||||
|
// house规则
|
||||
|
List<IcPolicyRuleDetailEntity> originHouseRules = ruleMap.get("house"); |
||||
|
if (CollectionUtils.isNotEmpty(originHouseRules)) { |
||||
|
List<ResisByPolicyRulesFormDTO.HouseRule> houseRules = originHouseRules |
||||
|
.stream() |
||||
|
.map((r) -> new ResisByPolicyRulesFormDTO.HouseRule(r.getColTable(), r.getColKey(), r.getColVal(), |
||||
|
r.getRuleDesc(), r.getNextLogicalRel(), r.getQueryType())) |
||||
|
.collect(Collectors.toList()); |
||||
|
data.setHouseRuleList(houseRules); |
||||
|
} |
||||
|
|
||||
|
// stat规则
|
||||
|
List<IcPolicyRuleDetailEntity> originStatRules = ruleMap.get("stat"); |
||||
|
if (CollectionUtils.isNotEmpty(originStatRules)) { |
||||
|
List<ResisByPolicyRulesFormDTO.StatRule> statRules = originStatRules |
||||
|
.stream() |
||||
|
.map((r) -> new ResisByPolicyRulesFormDTO.StatRule(r.getColKey(), r.getColVal(), r.getNextLogicalRel(), |
||||
|
r.getRuleDesc(), r.getQueryType(), r.getColTable())) |
||||
|
.collect(Collectors.toList()); |
||||
|
|
||||
|
data.setStatRuleList(statRules); |
||||
|
} |
||||
|
|
||||
|
return new Result<ResisByPolicyRulesFormDTO.RuleList>().ok(data); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,74 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.IcServiceFeedbackV2DTO; |
||||
|
import com.epmet.dto.form.IcServiceFeedbackV2AddFormDTO; |
||||
|
import com.epmet.service.IcServiceFeedbackV2Service; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 服务记录反馈表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icServiceFeedbackV2") |
||||
|
public class IcServiceFeedbackV2Controller { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcServiceFeedbackV2Service icServiceFeedbackV2Service; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcServiceFeedbackV2DTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcServiceFeedbackV2DTO> page = icServiceFeedbackV2Service.page(params); |
||||
|
return new Result<PageData<IcServiceFeedbackV2DTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcServiceFeedbackV2DTO> get(@PathVariable("id") String id){ |
||||
|
IcServiceFeedbackV2DTO data = icServiceFeedbackV2Service.get(id); |
||||
|
return new Result<IcServiceFeedbackV2DTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("add") |
||||
|
public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcServiceFeedbackV2AddFormDTO formDTO) { |
||||
|
ValidatorUtils.validateEntity(formDTO, AddGroup.class); |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setUserId(tokenDto.getUserId()); |
||||
|
icServiceFeedbackV2Service.save(formDTO); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcServiceFeedbackV2DTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icServiceFeedbackV2Service.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icServiceFeedbackV2Service.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,112 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.IcServiceRecordV2DTO; |
||||
|
import com.epmet.dto.form.ServiceRecordV2DetailFormDTO; |
||||
|
import com.epmet.dto.form.IcServiceRecordV2AddEditFormDTO; |
||||
|
import com.epmet.dto.form.ServiceRecordV2ListFormDTO; |
||||
|
import com.epmet.dto.result.ServiceRecordV2DetailResultDTO; |
||||
|
import com.epmet.service.IcServiceRecordV2Service; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 服务记录表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icServiceRecordV2") |
||||
|
public class IcServiceRecordV2Controller { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcServiceRecordV2Service icServiceRecordV2Service; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcServiceRecordV2DTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcServiceRecordV2DTO> page = icServiceRecordV2Service.page(params); |
||||
|
return new Result<PageData<IcServiceRecordV2DTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcServiceRecordV2DTO> get(@PathVariable("id") String id){ |
||||
|
IcServiceRecordV2DTO data = icServiceRecordV2Service.get(id); |
||||
|
return new Result<IcServiceRecordV2DTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("add") |
||||
|
public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcServiceRecordV2AddEditFormDTO formDTO) { |
||||
|
ValidatorUtils.validateEntity(formDTO, AddGroup.class); |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setUserId(tokenDto.getUserId()); |
||||
|
icServiceRecordV2Service.save(formDTO); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("edit") |
||||
|
public Result update(@RequestBody IcServiceRecordV2AddEditFormDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icServiceRecordV2Service.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("cancel") |
||||
|
public Result cancel(@RequestBody IcServiceRecordV2AddEditFormDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icServiceRecordV2Service.cancel(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icServiceRecordV2Service.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc:【服务管理】列表 |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/7/19 10:24 |
||||
|
*/ |
||||
|
@PostMapping("list") |
||||
|
public Result<PageData> serviceRecordV2List(@LoginUser TokenDto tokenDto, @RequestBody ServiceRecordV2ListFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO, ServiceRecordV2ListFormDTO.ServiceRecordV2ListForm.class); |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setUserId(tokenDto.getUserId()); |
||||
|
return new Result<PageData>().ok(icServiceRecordV2Service.serviceRecordV2List(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc: 详情 |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/7/19 16:37 |
||||
|
*/ |
||||
|
@PostMapping("detail") |
||||
|
public Result<ServiceRecordV2DetailResultDTO> serviceRecordV2Detail(@RequestBody ServiceRecordV2DetailFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO,ServiceRecordV2DetailFormDTO.ServiceRecordV2DetailForm.class); |
||||
|
return new Result<ServiceRecordV2DetailResultDTO>().ok(icServiceRecordV2Service.serviceRecordV2Detail(formDTO)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,70 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.IcServiceScopeV2DTO; |
||||
|
import com.epmet.service.IcServiceScopeV2Service; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 服务范围表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icServiceScopeV2") |
||||
|
public class IcServiceScopeV2Controller { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcServiceScopeV2Service icServiceScopeV2Service; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcServiceScopeV2DTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcServiceScopeV2DTO> page = icServiceScopeV2Service.page(params); |
||||
|
return new Result<PageData<IcServiceScopeV2DTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcServiceScopeV2DTO> get(@PathVariable("id") String id){ |
||||
|
IcServiceScopeV2DTO data = icServiceScopeV2Service.get(id); |
||||
|
return new Result<IcServiceScopeV2DTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody IcServiceScopeV2DTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
icServiceScopeV2Service.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcServiceScopeV2DTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icServiceScopeV2Service.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icServiceScopeV2Service.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.HeartAttachmentEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* heart库附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface HeartAttachmentDao extends BaseDao<HeartAttachmentEntity> { |
||||
|
|
||||
|
int deleteByBusinessId(String businessId); |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcPolicyCategoryEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配资源类型 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcPolicyCategoryDao extends BaseDao<IcPolicyCategoryEntity> { |
||||
|
|
||||
|
int deleteByIcPolicyId(String icPolicyId); |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.IcPolicyDTO; |
||||
|
import com.epmet.dto.IcPolicyItemResultDTO; |
||||
|
import com.epmet.entity.IcPolicyEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 政策表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcPolicyDao extends BaseDao<IcPolicyEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 房屋信息、统计信息查询有哪些可选项 |
||||
|
* @param customerId |
||||
|
* @param groupType |
||||
|
* @return |
||||
|
*/ |
||||
|
List<IcPolicyItemResultDTO> selectItemList(@Param("customerId") String customerId, @Param("groupType") String groupType); |
||||
|
|
||||
|
List<IcPolicyDTO> policyList(@Param("customerId")String customerId, |
||||
|
@Param("agencyId")String agencyId, |
||||
|
@Param("title")String title, |
||||
|
@Param("content")String content, |
||||
|
@Param("expiredFlag")String expiredFlag); |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcPolicyRuleEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配规则 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcPolicyRuleDao extends BaseDao<IcPolicyRuleEntity> { |
||||
|
|
||||
|
int deleteByIcPolicyId(String policyId); |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcPolicyRuleDetailEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配规则明细 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcPolicyRuleDetailDao extends BaseDao<IcPolicyRuleDetailEntity> { |
||||
|
|
||||
|
int deleteByRuleId(String ruleId); |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.IcServiceFeedbackV2DTO; |
||||
|
import com.epmet.entity.IcServiceFeedbackV2Entity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* 服务记录反馈表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcServiceFeedbackV2Dao extends BaseDao<IcServiceFeedbackV2Entity> { |
||||
|
|
||||
|
IcServiceFeedbackV2DTO getFeedbackV2(@Param("serviceRecordId") String serviceRecordId); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.form.ServiceRecordV2ListFormDTO; |
||||
|
import com.epmet.dto.result.ServiceRecordV2ListResultDTO; |
||||
|
import com.epmet.entity.IcServiceRecordV2Entity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 服务记录表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcServiceRecordV2Dao extends BaseDao<IcServiceRecordV2Entity> { |
||||
|
|
||||
|
/** |
||||
|
* Desc:【服务管理】列表 |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/7/19 10:24 |
||||
|
*/ |
||||
|
List<ServiceRecordV2ListResultDTO> serviceRecordV2List(ServiceRecordV2ListFormDTO formDTO); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcServiceScopeV2Entity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 服务范围表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcServiceScopeV2Dao extends BaseDao<IcServiceScopeV2Entity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* heart库附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("heart_attachment") |
||||
|
public class HeartAttachmentEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户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,0 +1,44 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配资源类型 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_policy_category") |
||||
|
public class IcPolicyCategoryEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 政策id |
||||
|
*/ |
||||
|
private String icPolicyId; |
||||
|
|
||||
|
/** |
||||
|
* 分类编码 |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 分类全路径,包含CATEGORY_CODE,英文逗号隔开 |
||||
|
*/ |
||||
|
private String codePath; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,64 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 政策表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_policy") |
||||
|
public class IcPolicyEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 政策创建人,所属组织id |
||||
|
*/ |
||||
|
private String orgId; |
||||
|
|
||||
|
/** |
||||
|
* AGENCY_ID的全路径,含agency_id |
||||
|
*/ |
||||
|
private String orgIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 政策级别,0市级;1区级;2街道级 |
||||
|
*/ |
||||
|
private String policyLevel; |
||||
|
|
||||
|
/** |
||||
|
* 生效起止日期 |
||||
|
*/ |
||||
|
private Date startDate; |
||||
|
|
||||
|
/** |
||||
|
* 截止日期 |
||||
|
*/ |
||||
|
private Date endDate; |
||||
|
|
||||
|
/** |
||||
|
* 政策标题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 政策内容 |
||||
|
*/ |
||||
|
private String content; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,110 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
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 2022-07-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_policy_rule_detail") |
||||
|
public class IcPolicyRuleDetailEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 政策id |
||||
|
*/ |
||||
|
private String icPolicyId; |
||||
|
|
||||
|
/** |
||||
|
* 规则id |
||||
|
*/ |
||||
|
private String ruleId; |
||||
|
|
||||
|
/** |
||||
|
* 规则描述文字,例如:基础信息性别等于女 |
||||
|
*/ |
||||
|
private String ruleDesc; |
||||
|
|
||||
|
/** |
||||
|
* resi:人员信息,house:房屋信息,stat:统计信息 |
||||
|
*/ |
||||
|
private String groupType; |
||||
|
|
||||
|
/** |
||||
|
* 与下一条的关系;and、or |
||||
|
* 如果没有条件的话,此列为空 |
||||
|
*/ |
||||
|
private String nextLogicalRel; |
||||
|
|
||||
|
/** |
||||
|
* 分组id;人员信息有值; |
||||
|
*/ |
||||
|
private String itemGroupId; |
||||
|
|
||||
|
/** |
||||
|
* 组件id;人员信息有值; |
||||
|
*/ |
||||
|
private String itemId; |
||||
|
|
||||
|
/** |
||||
|
* 查询类型:等于、不等于....;来源于字典表sql_query_type |
||||
|
*/ |
||||
|
private String queryType; |
||||
|
|
||||
|
/** |
||||
|
* 表名;人员信息有值;房屋信息也有值 |
||||
|
*/ |
||||
|
private String colTable; |
||||
|
|
||||
|
/** |
||||
|
* 人员信息存储组件对应的列名;房屋信息存储ic_house表的列名;统计信息应该是定义到字典表,这里存储字典key就行吧 |
||||
|
*/ |
||||
|
private String colKey; |
||||
|
|
||||
|
/** |
||||
|
* 参数值 |
||||
|
*/ |
||||
|
private String colVal; |
||||
|
|
||||
|
/** |
||||
|
* 排序字段;同一group_type升序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 用于前端展示:基础信息、教育信息、房屋类型..... |
||||
|
*/ |
||||
|
private String itemGroupName; |
||||
|
/** |
||||
|
* 用于前端展示:姓名、手机号、...... |
||||
|
*/ |
||||
|
private String itemLabel; |
||||
|
|
||||
|
/** |
||||
|
* 用于前端展示:等于、不等于、大于、小于.... |
||||
|
*/ |
||||
|
private String queryTypeName; |
||||
|
|
||||
|
/** |
||||
|
* 用于前端展示:参数值显示值eg:男女 |
||||
|
*/ |
||||
|
private String colValLabel; |
||||
|
|
||||
|
/** |
||||
|
* 用于前端展示:逻辑:并且、或者 |
||||
|
*/ |
||||
|
private String nextLogicalRelName; |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配规则 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_policy_rule") |
||||
|
public class IcPolicyRuleEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 政策id |
||||
|
*/ |
||||
|
private String icPolicyId; |
||||
|
|
||||
|
/** |
||||
|
* 规则名称 |
||||
|
*/ |
||||
|
private String ruleName; |
||||
|
|
||||
|
/** |
||||
|
* 排序字段 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,66 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
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 2022-07-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_service_feedback_v2") |
||||
|
public class IcServiceFeedbackV2Entity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 服务ID |
||||
|
*/ |
||||
|
private String serviceRecordId; |
||||
|
|
||||
|
/** |
||||
|
* 服务目标 |
||||
|
*/ |
||||
|
private String serviceGoal; |
||||
|
|
||||
|
/** |
||||
|
* 服务效果 |
||||
|
*/ |
||||
|
private String serviceEffect; |
||||
|
|
||||
|
/** |
||||
|
* 服务人数 |
||||
|
*/ |
||||
|
private Integer servicePeopleNumber; |
||||
|
|
||||
|
/** |
||||
|
* 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect |
||||
|
*/ |
||||
|
private String satisfaction; |
||||
|
|
||||
|
/** |
||||
|
* 地址经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 地址纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 服务记录表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_service_record_v2") |
||||
|
public class IcServiceRecordV2Entity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织类型 |
||||
|
社区自组织:community_org, |
||||
|
志愿者:ic_user_volunteer, |
||||
|
联建单位:party_unit |
||||
|
*/ |
||||
|
private String serviceOrgType; |
||||
|
|
||||
|
/** |
||||
|
* 服务组织ID |
||||
|
*/ |
||||
|
private String serviceOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 经办人姓名 |
||||
|
*/ |
||||
|
private String principalName; |
||||
|
|
||||
|
/** |
||||
|
* 联系方式 |
||||
|
*/ |
||||
|
private String principalContact; |
||||
|
|
||||
|
/** |
||||
|
* 服务时间 |
||||
|
*/ |
||||
|
private Date serviceTimeStart; |
||||
|
|
||||
|
/** |
||||
|
* 服务截止时间 |
||||
|
*/ |
||||
|
private Date serviceTimeEnd; |
||||
|
|
||||
|
/** |
||||
|
* in_service服务中;completed:已完成;cancel:取消 |
||||
|
*/ |
||||
|
private String serviceStatus; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 服务名称 |
||||
|
*/ |
||||
|
private String serviceName; |
||||
|
|
||||
|
/** |
||||
|
* 政策依据ID |
||||
|
*/ |
||||
|
private String policyId; |
||||
|
|
||||
|
private String serviceCategoryKey; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,54 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 服务范围表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_service_scope_v2") |
||||
|
public class IcServiceScopeV2Entity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 服务记录的ID |
||||
|
*/ |
||||
|
private String serviceRecordId; |
||||
|
|
||||
|
/** |
||||
|
* agency单位;grid网格;neighborhood小区 |
||||
|
*/ |
||||
|
private String objectType; |
||||
|
|
||||
|
/** |
||||
|
* 选中的组织的ID |
||||
|
*/ |
||||
|
private String objectId; |
||||
|
|
||||
|
/** |
||||
|
* 发布范围的组织ID PATH |
||||
|
*/ |
||||
|
private String objectIdPath; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String objectName; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.HeartAttachmentDTO; |
||||
|
import com.epmet.entity.HeartAttachmentEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* heart库附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
public interface HeartAttachmentService extends BaseService<HeartAttachmentEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<HeartAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
PageData<HeartAttachmentDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<HeartAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
List<HeartAttachmentDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return HeartAttachmentDTO |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
HeartAttachmentDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void save(HeartAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void update(HeartAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcPolicyCategoryDTO; |
||||
|
import com.epmet.entity.IcPolicyCategoryEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配资源类型 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
public interface IcPolicyCategoryService extends BaseService<IcPolicyCategoryEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcPolicyCategoryDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
PageData<IcPolicyCategoryDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcPolicyCategoryDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
List<IcPolicyCategoryDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcPolicyCategoryDTO |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
IcPolicyCategoryDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void save(IcPolicyCategoryDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void update(IcPolicyCategoryDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcPolicyRuleDetailDTO; |
||||
|
import com.epmet.entity.IcPolicyRuleDetailEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配规则明细 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
public interface IcPolicyRuleDetailService extends BaseService<IcPolicyRuleDetailEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcPolicyRuleDetailDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
PageData<IcPolicyRuleDetailDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcPolicyRuleDetailDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
List<IcPolicyRuleDetailDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcPolicyRuleDetailDTO |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
IcPolicyRuleDetailDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void save(IcPolicyRuleDetailDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void update(IcPolicyRuleDetailDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcPolicyRuleDTO; |
||||
|
import com.epmet.entity.IcPolicyRuleEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配规则 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
public interface IcPolicyRuleService extends BaseService<IcPolicyRuleEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcPolicyRuleDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
PageData<IcPolicyRuleDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcPolicyRuleDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
List<IcPolicyRuleDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcPolicyRuleDTO |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
IcPolicyRuleDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void save(IcPolicyRuleDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void update(IcPolicyRuleDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,67 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcPolicyDTO; |
||||
|
import com.epmet.dto.IcPolicyItemResultDTO; |
||||
|
import com.epmet.dto.IcPolicyRuleDTO; |
||||
|
import com.epmet.dto.form.policy.IcPolicyFormDTO; |
||||
|
import com.epmet.dto.form.policy.IcPolicyPageFormDTO; |
||||
|
import com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO; |
||||
|
import com.epmet.dto.result.resi.ResiByPolicyInfoResultDTO; |
||||
|
import com.epmet.entity.IcPolicyEntity; |
||||
|
import com.epmet.entity.IcPolicyRuleDetailEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 政策表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
public interface IcPolicyService extends BaseService<IcPolicyEntity> { |
||||
|
/** |
||||
|
* 房屋信息、统计信息查询有哪些可选项 |
||||
|
* |
||||
|
* @param customerId |
||||
|
* @param groupType |
||||
|
* @return |
||||
|
*/ |
||||
|
List<IcPolicyItemResultDTO> itemList(String customerId, String groupType); |
||||
|
|
||||
|
/** |
||||
|
* 政策管理-新增/修改 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
*/ |
||||
|
void addOrUpdatePolicy(IcPolicyFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 列表查询 |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
PageData<IcPolicyDTO> policyList(IcPolicyPageFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* Desc: 政策列表下拉选 |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/7/21 09:48 |
||||
|
*/ |
||||
|
List<IcPolicyDTO> policyListSelect(String userId,String customerId); |
||||
|
|
||||
|
List<IcPolicyRuleDTO> ruleList(String customerId,String policyId); |
||||
|
|
||||
|
IcPolicyDTO policyDetail(String customerId,String policyId); |
||||
|
|
||||
|
/** |
||||
|
* 政策规则查询 |
||||
|
* @param customerId |
||||
|
* @param ruleId |
||||
|
* @return |
||||
|
*/ |
||||
|
Map<String, List<IcPolicyRuleDetailEntity>> listPolicyRules4QueryAndExport(String customerId, String ruleId); |
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcServiceFeedbackV2DTO; |
||||
|
import com.epmet.dto.form.IcServiceFeedbackV2AddFormDTO; |
||||
|
import com.epmet.entity.IcServiceFeedbackV2Entity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 服务记录反馈表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
public interface IcServiceFeedbackV2Service extends BaseService<IcServiceFeedbackV2Entity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcServiceFeedbackV2DTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
PageData<IcServiceFeedbackV2DTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcServiceFeedbackV2DTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
List<IcServiceFeedbackV2DTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcServiceFeedbackV2DTO |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
IcServiceFeedbackV2DTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void save(IcServiceFeedbackV2AddFormDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void update(IcServiceFeedbackV2DTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,100 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcServiceRecordV2DTO; |
||||
|
import com.epmet.dto.form.ServiceRecordV2DetailFormDTO; |
||||
|
import com.epmet.dto.form.IcServiceRecordV2AddEditFormDTO; |
||||
|
import com.epmet.dto.form.ServiceRecordV2ListFormDTO; |
||||
|
import com.epmet.dto.result.ServiceRecordV2DetailResultDTO; |
||||
|
import com.epmet.entity.IcServiceRecordV2Entity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 服务记录表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
public interface IcServiceRecordV2Service extends BaseService<IcServiceRecordV2Entity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcServiceRecordV2DTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
PageData<IcServiceRecordV2DTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcServiceRecordV2DTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
List<IcServiceRecordV2DTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcServiceRecordV2DTO |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
IcServiceRecordV2DTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void save(IcServiceRecordV2AddEditFormDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void update(IcServiceRecordV2AddEditFormDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* Desc:【服务管理】列表 |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/7/19 10:24 |
||||
|
*/ |
||||
|
PageData serviceRecordV2List(ServiceRecordV2ListFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* Desc: 详情 |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/7/19 16:37 |
||||
|
*/ |
||||
|
ServiceRecordV2DetailResultDTO serviceRecordV2Detail(ServiceRecordV2DetailFormDTO formDTO); |
||||
|
|
||||
|
void cancel(IcServiceRecordV2AddEditFormDTO dto); |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcServiceScopeV2DTO; |
||||
|
import com.epmet.entity.IcServiceScopeV2Entity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 服务范围表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
public interface IcServiceScopeV2Service extends BaseService<IcServiceScopeV2Entity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcServiceScopeV2DTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
PageData<IcServiceScopeV2DTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcServiceScopeV2DTO> |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
List<IcServiceScopeV2DTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcServiceScopeV2DTO |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
IcServiceScopeV2DTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void save(IcServiceScopeV2DTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void update(IcServiceScopeV2DTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-07-18 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.HeartAttachmentDao; |
||||
|
import com.epmet.dto.HeartAttachmentDTO; |
||||
|
import com.epmet.entity.HeartAttachmentEntity; |
||||
|
import com.epmet.service.HeartAttachmentService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* heart库附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class HeartAttachmentServiceImpl extends BaseServiceImpl<HeartAttachmentDao, HeartAttachmentEntity> implements HeartAttachmentService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<HeartAttachmentDTO> page(Map<String, Object> params) { |
||||
|
IPage<HeartAttachmentEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, HeartAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<HeartAttachmentDTO> list(Map<String, Object> params) { |
||||
|
List<HeartAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, HeartAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<HeartAttachmentEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<HeartAttachmentEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public HeartAttachmentDTO get(String id) { |
||||
|
HeartAttachmentEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, HeartAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(HeartAttachmentDTO dto) { |
||||
|
HeartAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, HeartAttachmentEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(HeartAttachmentDTO dto) { |
||||
|
HeartAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, HeartAttachmentEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.IcPolicyCategoryDao; |
||||
|
import com.epmet.dto.IcPolicyCategoryDTO; |
||||
|
import com.epmet.entity.IcPolicyCategoryEntity; |
||||
|
import com.epmet.service.IcPolicyCategoryService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配资源类型 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcPolicyCategoryServiceImpl extends BaseServiceImpl<IcPolicyCategoryDao, IcPolicyCategoryEntity> implements IcPolicyCategoryService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcPolicyCategoryDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcPolicyCategoryEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcPolicyCategoryDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcPolicyCategoryDTO> list(Map<String, Object> params) { |
||||
|
List<IcPolicyCategoryEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcPolicyCategoryDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcPolicyCategoryEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcPolicyCategoryEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcPolicyCategoryDTO get(String id) { |
||||
|
IcPolicyCategoryEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcPolicyCategoryDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcPolicyCategoryDTO dto) { |
||||
|
IcPolicyCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IcPolicyCategoryEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcPolicyCategoryDTO dto) { |
||||
|
IcPolicyCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IcPolicyCategoryEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,81 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.IcPolicyRuleDetailDao; |
||||
|
import com.epmet.dto.IcPolicyRuleDetailDTO; |
||||
|
import com.epmet.entity.IcPolicyRuleDetailEntity; |
||||
|
import com.epmet.service.IcPolicyRuleDetailService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配规则明细 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcPolicyRuleDetailServiceImpl extends BaseServiceImpl<IcPolicyRuleDetailDao, IcPolicyRuleDetailEntity> implements IcPolicyRuleDetailService { |
||||
|
@Override |
||||
|
public PageData<IcPolicyRuleDetailDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcPolicyRuleDetailEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcPolicyRuleDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcPolicyRuleDetailDTO> list(Map<String, Object> params) { |
||||
|
List<IcPolicyRuleDetailEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcPolicyRuleDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcPolicyRuleDetailEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcPolicyRuleDetailEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcPolicyRuleDetailDTO get(String id) { |
||||
|
IcPolicyRuleDetailEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcPolicyRuleDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcPolicyRuleDetailDTO dto) { |
||||
|
IcPolicyRuleDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcPolicyRuleDetailEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcPolicyRuleDetailDTO dto) { |
||||
|
IcPolicyRuleDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcPolicyRuleDetailEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.IcPolicyRuleDao; |
||||
|
import com.epmet.dto.IcPolicyRuleDTO; |
||||
|
import com.epmet.entity.IcPolicyRuleEntity; |
||||
|
import com.epmet.service.IcPolicyRuleService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 政策匹配规则 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcPolicyRuleServiceImpl extends BaseServiceImpl<IcPolicyRuleDao, IcPolicyRuleEntity> implements IcPolicyRuleService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcPolicyRuleDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcPolicyRuleEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcPolicyRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcPolicyRuleDTO> list(Map<String, Object> params) { |
||||
|
List<IcPolicyRuleEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcPolicyRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcPolicyRuleEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcPolicyRuleEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcPolicyRuleDTO get(String id) { |
||||
|
IcPolicyRuleEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcPolicyRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcPolicyRuleDTO dto) { |
||||
|
IcPolicyRuleEntity entity = ConvertUtils.sourceToTarget(dto, IcPolicyRuleEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcPolicyRuleDTO dto) { |
||||
|
IcPolicyRuleEntity entity = ConvertUtils.sourceToTarget(dto, IcPolicyRuleEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,343 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.Constant; |
||||
|
import com.epmet.commons.tools.constant.StrConstant; |
||||
|
import com.epmet.commons.tools.dto.form.FileCommonDTO; |
||||
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
||||
|
import com.epmet.commons.tools.enums.DictTypeEnum; |
||||
|
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.redis.common.CustomerStaffRedis; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dao.*; |
||||
|
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO; |
||||
|
import com.epmet.dataaggre.feign.DataAggregatorOpenFeignClient; |
||||
|
import com.epmet.dto.IcPolicyCategoryDTO; |
||||
|
import com.epmet.dto.IcPolicyDTO; |
||||
|
import com.epmet.dto.IcPolicyItemResultDTO; |
||||
|
import com.epmet.dto.IcPolicyRuleDTO; |
||||
|
import com.epmet.dto.form.policy.IcPolicyFormDTO; |
||||
|
import com.epmet.dto.form.policy.IcPolicyPageFormDTO; |
||||
|
import com.epmet.dto.form.policy.IcPolicyRuleDetailDTO; |
||||
|
import com.epmet.dto.form.policy.IcPolicyRuleFormDTO; |
||||
|
import com.epmet.entity.*; |
||||
|
import com.epmet.feign.EpmetAdminOpenFeignClient; |
||||
|
import com.epmet.service.IcPolicyService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.apache.commons.collections4.MapUtils; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 政策表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcPolicyServiceImpl extends BaseServiceImpl<IcPolicyDao, IcPolicyEntity> implements IcPolicyService, ResultDataResolver { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcPolicyRuleDetailDao policyRuleDetailDao; |
||||
|
|
||||
|
@Autowired |
||||
|
private DataAggregatorOpenFeignClient dataAggregatorOpenFeignClient; |
||||
|
@Autowired |
||||
|
private IcPolicyCategoryDao icPolicyCategoryDao; |
||||
|
@Autowired |
||||
|
private IcPolicyRuleDao icPolicyRuleDao; |
||||
|
@Autowired |
||||
|
private HeartAttachmentDao heartAttachmentDao; |
||||
|
@Autowired |
||||
|
private IcPolicyRuleDetailDao icPolicyRuleDetailDao; |
||||
|
@Autowired |
||||
|
private EpmetAdminOpenFeignClient adminOpenFeignClient; |
||||
|
|
||||
|
/** |
||||
|
* 房屋信息、统计信息查询有哪些可选项 |
||||
|
* |
||||
|
* @param customerId |
||||
|
* @param groupType |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<IcPolicyItemResultDTO> itemList(String customerId, String groupType) { |
||||
|
if (StringUtils.isBlank(groupType)) { |
||||
|
return new ArrayList<>(); |
||||
|
} |
||||
|
List<IcPolicyItemResultDTO> resultList = baseDao.selectItemList(customerId, groupType); |
||||
|
if (CollectionUtils.isEmpty(resultList)) { |
||||
|
return baseDao.selectItemList(Constant.DEFAULT_CUSTOMER, groupType); |
||||
|
} |
||||
|
return resultList; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 政策管理-新增/修改 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
*/ |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
@Override |
||||
|
public void addOrUpdatePolicy(IcPolicyFormDTO formDTO) { |
||||
|
// 设置所属组织
|
||||
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
||||
|
if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "工作人员缓存信息异常", "工作人员信息异常"); |
||||
|
} |
||||
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
||||
|
// 校验参数
|
||||
|
checkAddFormDTO(formDTO); |
||||
|
IcPolicyEntity icPolicyEntity = ConvertUtils.sourceToTarget(formDTO, IcPolicyEntity.class); |
||||
|
icPolicyEntity.setOrgId(staffInfo.getAgencyId()); |
||||
|
icPolicyEntity.setOrgIdPath(StringUtils.isNotBlank(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfo.getAgencyId()) : staffInfo.getAgencyId()); |
||||
|
if(StringUtils.isNotBlank(formDTO.getPolicyId())){ |
||||
|
icPolicyEntity.setId(formDTO.getPolicyId()); |
||||
|
baseDao.updateById(icPolicyEntity); |
||||
|
//删除规则、规则明细、分类、附件
|
||||
|
icPolicyRuleDao.deleteByIcPolicyId(icPolicyEntity.getId()); |
||||
|
icPolicyCategoryDao.deleteByIcPolicyId(icPolicyEntity.getId()); |
||||
|
heartAttachmentDao.deleteByBusinessId(icPolicyEntity.getId()); |
||||
|
}else{ |
||||
|
// 插入政策主表
|
||||
|
baseDao.insert(icPolicyEntity); |
||||
|
} |
||||
|
// 插入细则
|
||||
|
int ruleSort = 1; |
||||
|
for (IcPolicyRuleFormDTO rule : formDTO.getRuleList()) { |
||||
|
IcPolicyRuleEntity ruleEntity = new IcPolicyRuleEntity(); |
||||
|
ruleEntity.setCustomerId(formDTO.getCustomerId()); |
||||
|
ruleEntity.setIcPolicyId(icPolicyEntity.getId()); |
||||
|
ruleEntity.setRuleName(rule.getRuleName()); |
||||
|
ruleEntity.setSort(ruleSort); |
||||
|
icPolicyRuleDao.insert(ruleEntity); |
||||
|
//删除规则明细
|
||||
|
icPolicyRuleDetailDao.deleteByRuleId(ruleEntity.getId()); |
||||
|
|
||||
|
if (CollectionUtils.isNotEmpty(rule.getResiRuleList())) { |
||||
|
int resiRuleSort = 1; |
||||
|
for (IcPolicyRuleDetailDTO ruleDetailDTO : rule.getResiRuleList()) { |
||||
|
ValidatorUtils.validateEntity(ruleDetailDTO,IcPolicyRuleDetailDTO.ResiRulerShowGroup.class); |
||||
|
IcPolicyRuleDetailEntity icPolicyRuleDetailEntity = ConvertUtils.sourceToTarget(ruleDetailDTO, IcPolicyRuleDetailEntity.class); |
||||
|
icPolicyRuleDetailEntity.setCustomerId(formDTO.getCustomerId()); |
||||
|
icPolicyRuleDetailEntity.setIcPolicyId(icPolicyEntity.getId()); |
||||
|
icPolicyRuleDetailEntity.setRuleId(ruleEntity.getId()); |
||||
|
icPolicyRuleDetailEntity.setSort(resiRuleSort); |
||||
|
icPolicyRuleDetailEntity.setGroupType("resi"); |
||||
|
icPolicyRuleDetailDao.insert(icPolicyRuleDetailEntity); |
||||
|
resiRuleSort++; |
||||
|
} |
||||
|
} |
||||
|
if (CollectionUtils.isNotEmpty(rule.getHouseRuleList())) { |
||||
|
int houseRuleSort = 1; |
||||
|
for (IcPolicyRuleDetailDTO ruleDetailDTO : rule.getHouseRuleList()) { |
||||
|
ValidatorUtils.validateEntity(ruleDetailDTO,IcPolicyRuleDetailDTO.HouseRulerShowGroup.class); |
||||
|
IcPolicyRuleDetailEntity icPolicyRuleDetailEntity = ConvertUtils.sourceToTarget(ruleDetailDTO, IcPolicyRuleDetailEntity.class); |
||||
|
icPolicyRuleDetailEntity.setCustomerId(formDTO.getCustomerId()); |
||||
|
icPolicyRuleDetailEntity.setIcPolicyId(icPolicyEntity.getId()); |
||||
|
icPolicyRuleDetailEntity.setRuleId(ruleEntity.getId()); |
||||
|
icPolicyRuleDetailEntity.setSort(houseRuleSort); |
||||
|
icPolicyRuleDetailEntity.setGroupType("house"); |
||||
|
icPolicyRuleDetailDao.insert(icPolicyRuleDetailEntity); |
||||
|
houseRuleSort++; |
||||
|
} |
||||
|
} |
||||
|
if (CollectionUtils.isNotEmpty(rule.getStatRuleList())) { |
||||
|
int statRuleSort = 1; |
||||
|
for (IcPolicyRuleDetailDTO ruleDetailDTO : rule.getStatRuleList()) { |
||||
|
ValidatorUtils.validateEntity(ruleDetailDTO,IcPolicyRuleDetailDTO.StatRulerShowGroup.class); |
||||
|
IcPolicyRuleDetailEntity icPolicyRuleDetailEntity = ConvertUtils.sourceToTarget(ruleDetailDTO, IcPolicyRuleDetailEntity.class); |
||||
|
icPolicyRuleDetailEntity.setCustomerId(formDTO.getCustomerId()); |
||||
|
icPolicyRuleDetailEntity.setIcPolicyId(icPolicyEntity.getId()); |
||||
|
icPolicyRuleDetailEntity.setRuleId(ruleEntity.getId()); |
||||
|
icPolicyRuleDetailEntity.setSort(statRuleSort); |
||||
|
icPolicyRuleDetailEntity.setGroupType("stat"); |
||||
|
icPolicyRuleDetailDao.insert(icPolicyRuleDetailEntity); |
||||
|
statRuleSort++; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
// 插入分类
|
||||
|
if (CollectionUtils.isNotEmpty(formDTO.getCategoryList())) { |
||||
|
for (IcPolicyCategoryDTO categoryDTO : formDTO.getCategoryList()) { |
||||
|
IcPolicyCategoryEntity icPolicyCategoryEntity = new IcPolicyCategoryEntity(); |
||||
|
icPolicyCategoryEntity.setCustomerId(formDTO.getCustomerId()); |
||||
|
icPolicyCategoryEntity.setIcPolicyId(icPolicyEntity.getId()); |
||||
|
icPolicyCategoryEntity.setCategoryCode(categoryDTO.getCategoryCode()); |
||||
|
icPolicyCategoryEntity.setCodePath(categoryDTO.getCodePath()); |
||||
|
icPolicyCategoryDao.insert(icPolicyCategoryEntity); |
||||
|
} |
||||
|
} |
||||
|
// 插入附件
|
||||
|
if (CollectionUtils.isNotEmpty(formDTO.getAttachmentList())) { |
||||
|
int sort = 1; |
||||
|
for (FileCommonDTO fileCommonDTO : formDTO.getAttachmentList()) { |
||||
|
HeartAttachmentEntity heartAttachment = ConvertUtils.sourceToTarget(fileCommonDTO,HeartAttachmentEntity.class); |
||||
|
heartAttachment.setCustomerId(formDTO.getCustomerId()); |
||||
|
heartAttachment.setBusinessId(icPolicyEntity.getId()); |
||||
|
heartAttachment.setAttachTo("ic_policy"); |
||||
|
// heartAttachment.setName(fileCommonDTO.getName());
|
||||
|
// heartAttachment.setFormat(fileCommonDTO.getFormat());
|
||||
|
// heartAttachment.setType(fileCommonDTO.getType());
|
||||
|
// heartAttachment.setUrl(fileCommonDTO.getUrl());
|
||||
|
heartAttachment.setSort(sort); |
||||
|
heartAttachment.setStatus(Constant.AUTO_PASSED); |
||||
|
// heartAttachment.setDuration(fileCommonDTO.getDuration());
|
||||
|
heartAttachmentDao.insert(heartAttachment); |
||||
|
sort++; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private void checkAddFormDTO(IcPolicyFormDTO formDTO) { |
||||
|
//同组织下,政策标题唯一
|
||||
|
LambdaQueryWrapper<IcPolicyEntity> policyEntityLambdaQueryWrapper=new LambdaQueryWrapper<>(); |
||||
|
policyEntityLambdaQueryWrapper.eq(IcPolicyEntity::getTitle,formDTO.getTitle()) |
||||
|
.eq(IcPolicyEntity::getOrgId,formDTO.getAgencyId()); |
||||
|
policyEntityLambdaQueryWrapper.ne(StringUtils.isNotBlank(formDTO.getPolicyId()),IcPolicyEntity::getId,formDTO.getPolicyId()); |
||||
|
int count=baseDao.selectCount(policyEntityLambdaQueryWrapper); |
||||
|
if(count>0){ |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"当前组织内已经存在相同标题的政策","当前组织内已经存在相同标题的政策"); |
||||
|
} |
||||
|
List<IcPolicyRuleFormDTO> ruleList = formDTO.getRuleList(); |
||||
|
for (IcPolicyRuleFormDTO rule : ruleList) { |
||||
|
if (CollectionUtils.isEmpty(rule.getResiRuleList()) |
||||
|
&& CollectionUtils.isEmpty(rule.getHouseRuleList()) |
||||
|
&& CollectionUtils.isEmpty(rule.getStatRuleList())) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "人员信息、房屋信息、统计信息任意选择一项填写", "请填写细则明细"); |
||||
|
} |
||||
|
} |
||||
|
// 政策文件最多3个先不限制了吧,前端控制下
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 列表查询 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public PageData<IcPolicyDTO> policyList(IcPolicyPageFormDTO formDTO) { |
||||
|
// 设置所属组织
|
||||
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
||||
|
if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "工作人员缓存信息异常", "工作人员信息异常"); |
||||
|
} |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); |
||||
|
List<IcPolicyDTO> list = baseDao.policyList(formDTO.getCustomerId(),staffInfo.getAgencyId(),formDTO.getTitle(),formDTO.getContent(),formDTO.getExpiredFlag()); |
||||
|
if (CollectionUtils.isNotEmpty(list)) { |
||||
|
for (IcPolicyDTO icPolicyDTO : list) { |
||||
|
// 查询字典表
|
||||
|
Result<Map<String, String>> levelRes = adminOpenFeignClient.dictMap(DictTypeEnum.POLICY_LEVEL.getCode()); |
||||
|
Map<String, String> levelMap = levelRes.success() && MapUtils.isNotEmpty(levelRes.getData()) ? levelRes.getData() : new HashMap<>(); |
||||
|
icPolicyDTO.setPolicyLevelName(MapUtils.isNotEmpty(levelMap) && levelMap.containsKey(icPolicyDTO.getPolicyLevel()) ? levelMap.get(icPolicyDTO.getPolicyLevel()) : StrConstant.EPMETY_STR); |
||||
|
} |
||||
|
} |
||||
|
PageInfo<IcPolicyDTO> pageInfo = new PageInfo<>(list); |
||||
|
return new PageData<>(list, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcPolicyDTO> policyListSelect(String userId,String customerId) { |
||||
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); |
||||
|
if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "工作人员缓存信息异常", "工作人员信息异常"); |
||||
|
} |
||||
|
return baseDao.policyList(customerId, staffInfo.getAgencyId(), null,null,null); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcPolicyRuleDTO> ruleList(String customerId, String policyId) { |
||||
|
LambdaQueryWrapper<IcPolicyRuleEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(IcPolicyRuleEntity::getCustomerId, customerId) |
||||
|
.eq(IcPolicyRuleEntity::getIcPolicyId, policyId) |
||||
|
.orderByAsc(IcPolicyRuleEntity::getSort); |
||||
|
List<IcPolicyRuleEntity> list = icPolicyRuleDao.selectList(wrapper); |
||||
|
return ConvertUtils.sourceToTarget(list, IcPolicyRuleDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcPolicyDTO policyDetail(String customerId, String policyId) { |
||||
|
IcPolicyEntity policyEntity = baseDao.selectById(policyId); |
||||
|
IcPolicyDTO icPolicyDTO = ConvertUtils.sourceToTarget(policyEntity, IcPolicyDTO.class); |
||||
|
if (null != icPolicyDTO) { |
||||
|
icPolicyDTO.setPolicyId(policyId); |
||||
|
|
||||
|
LambdaQueryWrapper<HeartAttachmentEntity> attWrapper = new LambdaQueryWrapper<>(); |
||||
|
attWrapper.eq(HeartAttachmentEntity::getBusinessId, policyId) |
||||
|
.orderByAsc(HeartAttachmentEntity::getSort); |
||||
|
List<HeartAttachmentEntity> attList = heartAttachmentDao.selectList(attWrapper); |
||||
|
icPolicyDTO.setAttachmentList(CollectionUtils.isNotEmpty(attList) ? ConvertUtils.sourceToTarget(attList, FileCommonDTO.class) : new ArrayList<>()); |
||||
|
|
||||
|
LambdaQueryWrapper<IcPolicyCategoryEntity> cateWrapper = new LambdaQueryWrapper<>(); |
||||
|
cateWrapper.eq(IcPolicyCategoryEntity::getIcPolicyId, policyId); |
||||
|
List<IcPolicyCategoryEntity> cateList = icPolicyCategoryDao.selectList(cateWrapper); |
||||
|
icPolicyDTO.setCategoryList(CollectionUtils.isNotEmpty(cateList) ? ConvertUtils.sourceToTarget(cateList, IcPolicyCategoryDTO.class) : new ArrayList<>()); |
||||
|
|
||||
|
List<IcPolicyRuleDTO> ruleDTOList = ruleList(customerId, policyId); |
||||
|
List<IcPolicyRuleFormDTO> ruleList = new ArrayList<>(); |
||||
|
if (CollectionUtils.isNotEmpty(ruleDTOList)) { |
||||
|
ruleList = ConvertUtils.sourceToTarget(ruleDTOList, IcPolicyRuleFormDTO.class); |
||||
|
for (IcPolicyRuleFormDTO rule : ruleList) { |
||||
|
//人员信息
|
||||
|
LambdaQueryWrapper<IcPolicyRuleDetailEntity> ruleDetailWrapper = new LambdaQueryWrapper<>(); |
||||
|
ruleDetailWrapper.eq(IcPolicyRuleDetailEntity::getRuleId, rule.getId()) |
||||
|
.eq(IcPolicyRuleDetailEntity::getGroupType, "resi") |
||||
|
.orderByAsc(IcPolicyRuleDetailEntity::getSort); |
||||
|
List<IcPolicyRuleDetailEntity> resiList = icPolicyRuleDetailDao.selectList(ruleDetailWrapper); |
||||
|
List<IcPolicyRuleDetailDTO> resiRuleList = CollectionUtils.isNotEmpty(resiList) ? ConvertUtils.sourceToTarget(resiList, IcPolicyRuleDetailDTO.class) : new ArrayList<>(); |
||||
|
rule.setResiRuleList(resiRuleList); |
||||
|
|
||||
|
//房屋信息
|
||||
|
LambdaQueryWrapper<IcPolicyRuleDetailEntity> houseDetailWrapper = new LambdaQueryWrapper<>(); |
||||
|
houseDetailWrapper.eq(IcPolicyRuleDetailEntity::getRuleId, rule.getId()) |
||||
|
.eq(IcPolicyRuleDetailEntity::getGroupType, "house") |
||||
|
.orderByAsc(IcPolicyRuleDetailEntity::getSort); |
||||
|
List<IcPolicyRuleDetailEntity> houseList = icPolicyRuleDetailDao.selectList(houseDetailWrapper); |
||||
|
List<IcPolicyRuleDetailDTO> houseRuleList = CollectionUtils.isNotEmpty(houseList) ? ConvertUtils.sourceToTarget(houseList, IcPolicyRuleDetailDTO.class) : new ArrayList<>(); |
||||
|
rule.setHouseRuleList(houseRuleList); |
||||
|
|
||||
|
//统计信息
|
||||
|
LambdaQueryWrapper<IcPolicyRuleDetailEntity> statDetailWrapper = new LambdaQueryWrapper<>(); |
||||
|
statDetailWrapper.eq(IcPolicyRuleDetailEntity::getRuleId, rule.getId()) |
||||
|
.eq(IcPolicyRuleDetailEntity::getGroupType, "stat") |
||||
|
.orderByAsc(IcPolicyRuleDetailEntity::getSort); |
||||
|
List<IcPolicyRuleDetailEntity> statList = icPolicyRuleDetailDao.selectList(statDetailWrapper); |
||||
|
List<IcPolicyRuleDetailDTO> statRuleList = CollectionUtils.isNotEmpty(statList) ? ConvertUtils.sourceToTarget(statList, IcPolicyRuleDetailDTO.class) : new ArrayList<>(); |
||||
|
rule.setStatRuleList(statRuleList); |
||||
|
} |
||||
|
} |
||||
|
icPolicyDTO.setRuleList(ruleList); |
||||
|
} |
||||
|
return icPolicyDTO; |
||||
|
} |
||||
|
|
||||
|
public Map<String, List<IcPolicyRuleDetailEntity>> listPolicyRules4QueryAndExport(String customerId, String ruleId) { |
||||
|
ResisByPolicyRulesFormDTO form = new ResisByPolicyRulesFormDTO(); |
||||
|
LambdaQueryWrapper<IcPolicyRuleDetailEntity> query = new LambdaQueryWrapper(); |
||||
|
query.eq(IcPolicyRuleDetailEntity::getCustomerId, customerId); |
||||
|
query.eq(IcPolicyRuleDetailEntity::getRuleId, ruleId); |
||||
|
query.orderByAsc(IcPolicyRuleDetailEntity::getSort); |
||||
|
List<IcPolicyRuleDetailEntity> rules = policyRuleDetailDao.selectList(query); |
||||
|
|
||||
|
// 将查询出的数据转化成aggre服务能接受的格式
|
||||
|
return rules.stream().collect(Collectors.groupingBy(IcPolicyRuleDetailEntity::getGroupType, Collectors.toList())); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,142 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.IcServiceFeedbackV2Dao; |
||||
|
import com.epmet.dto.IcServiceFeedbackV2DTO; |
||||
|
import com.epmet.dto.form.IcServiceFeedbackV2AddFormDTO; |
||||
|
import com.epmet.entity.HeartAttachmentEntity; |
||||
|
import com.epmet.entity.IcServiceFeedbackV2Entity; |
||||
|
import com.epmet.entity.IcServiceOrgEntity; |
||||
|
import com.epmet.entity.IcServiceRecordV2Entity; |
||||
|
import com.epmet.service.HeartAttachmentService; |
||||
|
import com.epmet.service.IcServiceFeedbackV2Service; |
||||
|
import com.epmet.service.IcServiceRecordV2Service; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.util.CollectionUtils; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 服务记录反馈表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Slf4j |
||||
|
public class IcServiceFeedbackV2ServiceImpl extends BaseServiceImpl<IcServiceFeedbackV2Dao, IcServiceFeedbackV2Entity> implements IcServiceFeedbackV2Service { |
||||
|
@Autowired |
||||
|
private IcServiceRecordV2Service icServiceRecordV2Service; |
||||
|
@Autowired |
||||
|
private HeartAttachmentService heartAttachmentService; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcServiceFeedbackV2DTO> page(Map<String, Object> params) { |
||||
|
IPage<IcServiceFeedbackV2Entity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcServiceFeedbackV2DTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcServiceFeedbackV2DTO> list(Map<String, Object> params) { |
||||
|
List<IcServiceFeedbackV2Entity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcServiceFeedbackV2DTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcServiceFeedbackV2Entity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcServiceFeedbackV2Entity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcServiceFeedbackV2DTO get(String id) { |
||||
|
IcServiceFeedbackV2Entity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcServiceFeedbackV2DTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcServiceFeedbackV2AddFormDTO formDTO) { |
||||
|
//1.查询服务记录是否存在
|
||||
|
IcServiceRecordV2Entity recordV2Entity = icServiceRecordV2Service.selectById(formDTO.getServiceRecordId()); |
||||
|
if (null == recordV2Entity) { |
||||
|
log.error(String.format("新增服务反馈记录失败,未查询到服务记录,服务记录Id->%s", formDTO.getServiceRecordId())); |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "新增服务反馈记录失败,未查询到服务记录"); |
||||
|
} |
||||
|
if (!"in_service".equals(recordV2Entity.getServiceStatus())) { |
||||
|
String msg = "服务状态不是进行中的,不允许反馈"; |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); |
||||
|
} |
||||
|
|
||||
|
//2.校验是否已存在服务反馈
|
||||
|
LambdaQueryWrapper<IcServiceFeedbackV2Entity> tWrapper = new LambdaQueryWrapper<>(); |
||||
|
tWrapper.eq(IcServiceFeedbackV2Entity::getServiceRecordId, formDTO.getServiceRecordId()); |
||||
|
List<IcServiceFeedbackV2Entity> feedbackList = baseDao.selectList(tWrapper); |
||||
|
if (!CollectionUtils.isEmpty(feedbackList)) { |
||||
|
log.error(String.format("新增服务反馈记录失败,当前服务记录已存在反馈记录,服务记录Id->%s", formDTO.getServiceRecordId())); |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "新增服务反馈记录失败,当前服务记录已存在反馈记录"); |
||||
|
} |
||||
|
|
||||
|
//3.更新服务记录表数据状态
|
||||
|
recordV2Entity.setServiceStatus(formDTO.getServiceStatus()); |
||||
|
icServiceRecordV2Service.updateById(recordV2Entity); |
||||
|
|
||||
|
//4.新增服务反馈记录
|
||||
|
IcServiceFeedbackV2Entity feedback = ConvertUtils.sourceToTarget(formDTO, IcServiceFeedbackV2Entity.class); |
||||
|
feedback.setCustomerId(formDTO.getCustomerId()); |
||||
|
feedback.setServiceRecordId(formDTO.getServiceRecordId()); |
||||
|
baseDao.insert(feedback); |
||||
|
List<HeartAttachmentEntity> AttachmentList = new ArrayList<>(); |
||||
|
if (!CollectionUtils.isEmpty(formDTO.getFileList())) { |
||||
|
int sort = 0; |
||||
|
for (IcServiceFeedbackV2AddFormDTO.FileDTO file : formDTO.getFileList()) { |
||||
|
HeartAttachmentEntity attachment = ConvertUtils.sourceToTarget(file, HeartAttachmentEntity.class); |
||||
|
attachment.setCustomerId(formDTO.getCustomerId()); |
||||
|
attachment.setBusinessId(feedback.getId()); |
||||
|
attachment.setAttachTo("ic_service_record_v2"); |
||||
|
attachment.setSort(sort++); |
||||
|
attachment.setStatus("auto_passed"); |
||||
|
AttachmentList.add(attachment); |
||||
|
} |
||||
|
heartAttachmentService.insertBatch(AttachmentList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcServiceFeedbackV2DTO dto) { |
||||
|
IcServiceFeedbackV2Entity entity = ConvertUtils.sourceToTarget(dto, IcServiceFeedbackV2Entity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,250 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.utils.DateUtils; |
||||
|
import com.epmet.dao.IcServiceFeedbackV2Dao; |
||||
|
import com.epmet.dao.IcServiceRecordV2Dao; |
||||
|
import com.epmet.dao.IcServiceScopeDao; |
||||
|
import com.epmet.dao.IcServiceScopeV2Dao; |
||||
|
import com.epmet.dto.IcServiceFeedbackV2DTO; |
||||
|
import com.epmet.dto.IcServiceRecordV2DTO; |
||||
|
import com.epmet.dto.IcServiceScopeV2DTO; |
||||
|
import com.epmet.dto.form.IcServiceRecordV2AddEditFormDTO; |
||||
|
import com.epmet.dto.form.ServiceRecordV2DetailFormDTO; |
||||
|
import com.epmet.dto.form.ServiceRecordV2ListFormDTO; |
||||
|
import com.epmet.dto.result.ServiceRecordV2DetailResultDTO; |
||||
|
import com.epmet.dto.result.ServiceRecordV2ListResultDTO; |
||||
|
import com.epmet.entity.HeartAttachmentEntity; |
||||
|
import com.epmet.entity.IcServiceFeedbackV2Entity; |
||||
|
import com.epmet.entity.IcServiceRecordV2Entity; |
||||
|
import com.epmet.entity.IcServiceScopeV2Entity; |
||||
|
import com.epmet.redis.IcPartyUnitRedis; |
||||
|
import com.epmet.service.HeartAttachmentService; |
||||
|
import com.epmet.service.IcServiceFeedbackV2Service; |
||||
|
import com.epmet.service.IcServiceRecordV2Service; |
||||
|
import com.epmet.service.IcServiceScopeV2Service; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 服务记录表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Slf4j |
||||
|
public class IcServiceRecordV2ServiceImpl extends BaseServiceImpl<IcServiceRecordV2Dao, IcServiceRecordV2Entity> implements IcServiceRecordV2Service { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcPartyUnitRedis partyUnitRedis; |
||||
|
@Autowired |
||||
|
private IcServiceScopeV2Service icServiceScopeV2Service; |
||||
|
@Autowired |
||||
|
private IcServiceRecordServiceImpl icServiceRecordServiceImpl; |
||||
|
@Autowired |
||||
|
private IcServiceFeedbackV2Service icServiceFeedbackV2Service; |
||||
|
@Autowired |
||||
|
private HeartAttachmentService heartAttachmentService; |
||||
|
@Autowired |
||||
|
private IcServiceScopeDao serviceScopeDao; |
||||
|
@Autowired |
||||
|
private IcServiceFeedbackV2Dao serviceFeedbackV2Dao; |
||||
|
@Autowired |
||||
|
private IcServiceScopeV2Dao icServiceScopeV2Dao; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcServiceRecordV2DTO> page(Map<String, Object> params) { |
||||
|
IPage<IcServiceRecordV2Entity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcServiceRecordV2DTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcServiceRecordV2DTO> list(Map<String, Object> params) { |
||||
|
List<IcServiceRecordV2Entity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcServiceRecordV2DTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcServiceRecordV2Entity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcServiceRecordV2Entity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcServiceRecordV2DTO get(String id) { |
||||
|
IcServiceRecordV2Entity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcServiceRecordV2DTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcServiceRecordV2AddEditFormDTO formDTO) { |
||||
|
//1.服务记录数据
|
||||
|
IcServiceRecordV2Entity entity = ConvertUtils.sourceToTarget(formDTO, IcServiceRecordV2Entity.class); |
||||
|
entity.setId(IdWorker.getIdStr()); |
||||
|
entity.setServiceStatus("in_service"); |
||||
|
|
||||
|
//2.新增服务范围数据
|
||||
|
List<IcServiceScopeV2Entity> scopeList = new ArrayList<>(); |
||||
|
formDTO.getObjList().stream().forEach(s -> { |
||||
|
String[] scopeObjectIdPathAndName = icServiceRecordServiceImpl.getScopeObjectIdPath(s.getObjectType(), s.getObjectId()); |
||||
|
IcServiceScopeV2Entity scope = new IcServiceScopeV2Entity(); |
||||
|
scope.setCustomerId(formDTO.getCustomerId()); |
||||
|
scope.setServiceRecordId(entity.getId()); |
||||
|
scope.setObjectType(s.getObjectType()); |
||||
|
scope.setObjectId(s.getObjectId()); |
||||
|
scope.setObjectIdPath(scopeObjectIdPathAndName[0]); |
||||
|
scope.setObjectName(scopeObjectIdPathAndName[1]); |
||||
|
scopeList.add(scope); |
||||
|
}); |
||||
|
icServiceScopeV2Service.insertBatch(scopeList); |
||||
|
|
||||
|
//3.新增服务反馈数据feedback
|
||||
|
if(null != formDTO.getFeedback()){ |
||||
|
entity.setServiceStatus(formDTO.getFeedback().getServiceStatus()); |
||||
|
IcServiceFeedbackV2Entity feedback = ConvertUtils.sourceToTarget(formDTO.getFeedback(), IcServiceFeedbackV2Entity.class); |
||||
|
feedback.setCustomerId(formDTO.getCustomerId()); |
||||
|
feedback.setServiceRecordId(entity.getId()); |
||||
|
icServiceFeedbackV2Service.insert(feedback); |
||||
|
// 反馈附件列表
|
||||
|
if (CollectionUtils.isNotEmpty(formDTO.getFeedback().getFileList())) { |
||||
|
List<HeartAttachmentEntity> attachmentList = new ArrayList<>(); |
||||
|
int[] sort = {0}; |
||||
|
formDTO.getFeedback().getFileList().forEach(f->{ |
||||
|
HeartAttachmentEntity attachment = ConvertUtils.sourceToTarget(f, HeartAttachmentEntity.class); |
||||
|
attachment.setCustomerId(formDTO.getCustomerId()); |
||||
|
attachment.setBusinessId(feedback.getId()); |
||||
|
attachment.setAttachTo("ic_service_record_v2"); |
||||
|
attachment.setSort(sort[0]); |
||||
|
attachment.setStatus("auto_passed"); |
||||
|
sort[0]++; |
||||
|
attachmentList.add(attachment); |
||||
|
}); |
||||
|
heartAttachmentService.insertBatch(attachmentList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
insert(entity); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcServiceRecordV2AddEditFormDTO formDTO) { |
||||
|
//1.校验数据是否存在
|
||||
|
if (null == baseDao.selectById(formDTO.getServiceRecordId())) { |
||||
|
log.error(String.format("修改服务记录失败,未查询到服务记录,服务记录Id->%s", formDTO.getServiceRecordId())); |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "修改服务记录失败,未查询到服务记录"); |
||||
|
} |
||||
|
IcServiceRecordV2Entity entity = ConvertUtils.sourceToTarget(formDTO, IcServiceRecordV2Entity.class); |
||||
|
entity.setId(formDTO.getServiceRecordId()); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void cancel(IcServiceRecordV2AddEditFormDTO formDTO) { |
||||
|
//1.校验数据是否存在
|
||||
|
IcServiceRecordV2Entity entity = baseDao.selectById(formDTO.getServiceRecordId()); |
||||
|
if (null == entity) { |
||||
|
log.error(String.format("取消服务记录失败,未查询到服务记录,服务记录Id->%s", formDTO.getServiceRecordId())); |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "取消服务记录失败,未查询到服务记录"); |
||||
|
} |
||||
|
if (!"in_service".equals(entity.getServiceStatus())) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("服务状态:%s", entity.getServiceStatus()), "只有服务中的记录可以取消"); |
||||
|
} |
||||
|
//2.删除主表、字表数据【进行中数据不存在反馈记录】
|
||||
|
baseDao.deleteById(entity); |
||||
|
|
||||
|
LambdaQueryWrapper<IcServiceScopeV2Entity> tWrapper = new LambdaQueryWrapper<>(); |
||||
|
tWrapper.eq(IcServiceScopeV2Entity::getServiceRecordId, formDTO.getServiceRecordId()); |
||||
|
icServiceScopeV2Dao.delete(tWrapper); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc:【服务管理】列表 |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/7/19 10:24 |
||||
|
*/ |
||||
|
@Override |
||||
|
public PageData serviceRecordV2List(ServiceRecordV2ListFormDTO formDTO) { |
||||
|
PageData<ServiceRecordV2ListResultDTO> result = new PageData<>(new ArrayList<>(), NumConstant.ZERO_L); |
||||
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); |
||||
|
if (null == staffInfo){ |
||||
|
throw new EpmetException("未查询到工作人员信息+"+formDTO.getUserId()); |
||||
|
} |
||||
|
formDTO.setOrgId(staffInfo.getAgencyId()); |
||||
|
PageInfo<ServiceRecordV2ListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.serviceRecordV2List(formDTO)); |
||||
|
result.setList(pageInfo.getList()); |
||||
|
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); |
||||
|
if (CollectionUtils.isNotEmpty(result.getList())){ |
||||
|
result.getList().forEach(r -> { |
||||
|
r.setServiceOrgName(partyUnitRedis.getServiceOrgName(formDTO.getCustomerId(), r.getServiceOrgType(),r.getServiceOrgId())); |
||||
|
}); |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc: 详情 |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/7/19 16:37 |
||||
|
*/ |
||||
|
@Override |
||||
|
public ServiceRecordV2DetailResultDTO serviceRecordV2Detail(ServiceRecordV2DetailFormDTO formDTO) { |
||||
|
IcServiceRecordV2Entity entity = baseDao.selectById(formDTO.getServiceRecordId()); |
||||
|
if (null == entity){ |
||||
|
return new ServiceRecordV2DetailResultDTO(); |
||||
|
} |
||||
|
ServiceRecordV2DetailResultDTO result = ConvertUtils.sourceToTarget(entity, ServiceRecordV2DetailResultDTO.class); |
||||
|
result.setServiceTimeStart(DateUtils.format(entity.getServiceTimeStart(),DateUtils.DATE_PATTERN)); |
||||
|
result.setServiceTimeEnd(DateUtils.format(entity.getServiceTimeEnd(),DateUtils.DATE_PATTERN)); |
||||
|
result.setServiceRecordId(entity.getId()); |
||||
|
List<IcServiceScopeV2DTO> scopeV2DTOS = serviceScopeDao.selectListV2(formDTO.getServiceRecordId()); |
||||
|
result.setGridIdList(scopeV2DTOS); |
||||
|
IcServiceFeedbackV2DTO feedbackV2 = serviceFeedbackV2Dao.getFeedbackV2(formDTO.getServiceRecordId()); |
||||
|
result.setFeedback(feedbackV2); |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.IcServiceScopeV2Dao; |
||||
|
import com.epmet.dto.IcServiceScopeV2DTO; |
||||
|
import com.epmet.entity.IcServiceScopeV2Entity; |
||||
|
import com.epmet.service.IcServiceScopeV2Service; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 服务范围表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-07-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcServiceScopeV2ServiceImpl extends BaseServiceImpl<IcServiceScopeV2Dao, IcServiceScopeV2Entity> implements IcServiceScopeV2Service { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcServiceScopeV2DTO> page(Map<String, Object> params) { |
||||
|
IPage<IcServiceScopeV2Entity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcServiceScopeV2DTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcServiceScopeV2DTO> list(Map<String, Object> params) { |
||||
|
List<IcServiceScopeV2Entity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcServiceScopeV2DTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcServiceScopeV2Entity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcServiceScopeV2Entity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcServiceScopeV2DTO get(String id) { |
||||
|
IcServiceScopeV2Entity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcServiceScopeV2DTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcServiceScopeV2DTO dto) { |
||||
|
IcServiceScopeV2Entity entity = ConvertUtils.sourceToTarget(dto, IcServiceScopeV2Entity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcServiceScopeV2DTO dto) { |
||||
|
IcServiceScopeV2Entity entity = ConvertUtils.sourceToTarget(dto, IcServiceScopeV2Entity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,112 @@ |
|||||
|
CREATE TABLE `ic_policy` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
||||
|
`ORG_ID` varchar(64) NOT NULL COMMENT '政策创建人,所属组织id', |
||||
|
`ORG_ID_PATH` varchar(255) NOT NULL COMMENT 'AGENCY_ID的全路径,含agency_id', |
||||
|
`POLICY_LEVEL` varchar(1) NOT NULL COMMENT '政策级别,0市级;1区级;2街道级', |
||||
|
`START_DATE` date NOT NULL COMMENT '生效起止日期', |
||||
|
`END_DATE` date NOT NULL COMMENT '截止日期', |
||||
|
`TITLE` varchar(128) NOT NULL COMMENT '政策标题', |
||||
|
`CONTENT` varchar(2048) NOT NULL COMMENT '政策内容', |
||||
|
`DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='政策表'; |
||||
|
|
||||
|
|
||||
|
CREATE TABLE `ic_policy_category` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`IC_POLICY_ID` varchar(64) NOT NULL COMMENT '政策id', |
||||
|
`CATEGORY_CODE` varchar(64) NOT NULL COMMENT '分类编码', |
||||
|
`CODE_PATH` varchar(128) NOT NULL COMMENT '分类全路径,包含CATEGORY_CODE,英文逗号隔开', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='政策匹配资源类型'; |
||||
|
|
||||
|
CREATE TABLE `ic_policy_rule` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`IC_POLICY_ID` varchar(64) NOT NULL COMMENT '政策id', |
||||
|
`RULE_NAME` varchar(128) NOT NULL COMMENT '规则名称', |
||||
|
`SORT` int(1) NOT NULL COMMENT '排序字段', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='政策匹配规则'; |
||||
|
|
||||
|
|
||||
|
CREATE TABLE `ic_policy_rule_detail` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`IC_POLICY_ID` varchar(64) NOT NULL COMMENT '政策id', |
||||
|
`RULE_ID` varchar(32) NOT NULL COMMENT '规则id', |
||||
|
`RULE_DESC` varchar(512) DEFAULT NULL COMMENT '规则描述文字,例如:基础信息性别等于女', |
||||
|
`GROUP_TYPE` varchar(10) NOT NULL COMMENT 'resi:人员信息,house:房屋信息,stat:统计信息', |
||||
|
`NEXT_LOGICAL_REL` varchar(4) DEFAULT NULL COMMENT '与下一条的关系;and、or', |
||||
|
`ITEM_GROUP_ID` varchar(64) DEFAULT NULL COMMENT '分组id;人员信息有值;', |
||||
|
`ITEM_ID` varchar(64) DEFAULT NULL COMMENT '组件id;人员信息有值;', |
||||
|
`COL_TABLE` varchar(64) DEFAULT NULL COMMENT '表名;人员信息有值;房屋信息也有值', |
||||
|
`QUERY_TYPE` varchar(32) NOT NULL COMMENT '查询类型:等于、不等于....;来源于字典表sql_query_type', |
||||
|
`COL_KEY` varchar(32) NOT NULL COMMENT '人员信息存储组件对应的列名;房屋信息存储ic_house表的列名;统计信息应该是定义到字典表,这里存储字典key就行吧', |
||||
|
`COL_VAL` varchar(512) NOT NULL COMMENT '参数值', |
||||
|
`SORT` int(1) NOT NULL COMMENT '排序字段;同一group_type升序', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
`ITEM_GROUP_NAME` varchar(64) DEFAULT NULL COMMENT '用于前端展示:基础信息、教育信息、房屋类型.....', |
||||
|
`ITEM_LABEL` varchar(64) DEFAULT NULL COMMENT '用于前端展示:姓名、手机号、......', |
||||
|
`QUERY_TYPE_NAME` varchar(64) DEFAULT NULL COMMENT '用于前端展示:等于、不等于、大于、小于....', |
||||
|
`COL_VAL_LABEL` varchar(64) DEFAULT NULL COMMENT '用于前端展示:参数值显示值eg:男女', |
||||
|
`NEXT_LOGICAL_REL_NAME` varchar(32) DEFAULT NULL COMMENT '用于前端展示:逻辑:并且、或者', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='政策匹配规则明细'; |
||||
|
|
||||
|
|
||||
|
CREATE TABLE `ic_policy_item` ( |
||||
|
`ID` varchar(64) NOT NULL, |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL, |
||||
|
`GROUP_TYPE` varchar(10) NOT NULL COMMENT 'house:房屋信息,stat:统计信息', |
||||
|
`LABEL` varchar(255) NOT NULL COMMENT '选项名;例如:房屋类型,房屋状态,人均收入', |
||||
|
`COL_KEY` varchar(64) NOT NULL COMMENT '房屋信息存储列名;统计信息定义好key放在这里', |
||||
|
`ITEM_TYPE` varchar(64) NOT NULL, |
||||
|
`TABLE_NAME` varchar(64) DEFAULT NULL COMMENT '表名', |
||||
|
`SORT` int(11) NOT NULL COMMENT '排序', |
||||
|
`REMARK` varchar(255) DEFAULT NULL COMMENT '备注', |
||||
|
`OPTION_SOURCE_TYPE` varchar(10) DEFAULT NULL COMMENT '值来源;需要接口获取:remote。', |
||||
|
`OPTION_SOURCE_URL` varchar(128) DEFAULT NULL COMMENT '动态url;', |
||||
|
`OPTION_SOURCE_PARAM` varchar(255) DEFAULT NULL COMMENT '动态url的入参;存储json串', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='政策找人规则组件表'; |
||||
|
|
||||
|
|
||||
|
|
||||
|
INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', 'default', 'house', '房屋类型', 'HOUSE_TYPE', 'select', 'ic_house', 1, '从字典表获取', 'remote', '/sys/dict/data/dictlist', '{\"dictType\":\"house_type\"}', '0', 0, 'APP_USER', '2022-07-19 10:01:39', 'APP_USER', '2022-07-19 10:01:42'); |
||||
|
INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', 'default', 'house', '房屋用途', 'PURPOSE', 'select', 'ic_house', 2, '从字典表获取', 'remote', '/sys/dict/data/dictlist', '{\"dictType\":\"house_purpose\"}', '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); |
||||
|
INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3', 'default', 'house', '房屋状态', 'RENT_FLAG', 'select', 'ic_house', 3, '从字典表获取', 'remote', '/sys/dict/data/dictlist', '{\"dictType\":\"house_status\"}', '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); |
||||
|
INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('4', 'default', 'house', '创建时间', 'CREATED_TIME', 'date', 'ic_house', 4, '日期格式', NULL, NULL, NULL, '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); |
||||
|
INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5', 'default', 'house', '备注', 'REMARK', 'input', 'ic_house', 5, '文本域', NULL, NULL, NULL, '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); |
||||
|
INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('6', 'default', 'stat', '人均收入', 'AVG_YSR', 'inputNum', '', 1, '只能输入数字,可以是小数', NULL, NULL, NULL, '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); |
||||
|
INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('7', 'default', 'stat', '家庭人数', 'RESI_NUMBER', 'inputNum', '', 2, '只能输入数字', NULL, NULL, NULL, '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); |
||||
@ -0,0 +1,81 @@ |
|||||
|
CREATE TABLE `ic_service_record_v2` ( |
||||
|
`ID` varchar(64) NOT NULL, |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL, |
||||
|
`POLICY_ID` varchar(64) NOT NULL COMMENT '政策依据ID', |
||||
|
`SERVICE_NAME` varchar(32) NOT NULL COMMENT '服务名称', |
||||
|
`SERVICE_ORG_TYPE` varchar(64) NOT NULL COMMENT '服务组织类型\n社区自组织:community_org,\n志愿者:ic_user_volunteer,\n联建单位:party_unit', |
||||
|
`SERVICE_ORG_ID` varchar(64) NOT NULL COMMENT '服务组织ID', |
||||
|
`PRINCIPAL_NAME` varchar(32) DEFAULT NULL COMMENT '经办人姓名', |
||||
|
`PRINCIPAL_CONTACT` varchar(64) DEFAULT NULL COMMENT '联系方式', |
||||
|
`SERVICE_TIME_START` datetime NOT NULL COMMENT '服务时间', |
||||
|
`SERVICE_TIME_END` datetime NOT NULL COMMENT '服务截止时间', |
||||
|
`SERVICE_STATUS` varchar(32) NOT NULL COMMENT 'in_service服务中;completed:已完成;cancel:取消', |
||||
|
`REMARK` varchar(255) DEFAULT NULL COMMENT '备注', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务记录表'; |
||||
|
|
||||
|
CREATE TABLE `ic_service_feedback_v2` ( |
||||
|
`ID` varchar(64) NOT NULL, |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL, |
||||
|
`SERVICE_RECORD_ID` varchar(64) NOT NULL COMMENT '服务ID', |
||||
|
`SERVICE_GOAL` varchar(2000) DEFAULT NULL COMMENT '服务目标', |
||||
|
`SERVICE_EFFECT` varchar(2000) DEFAULT NULL COMMENT '服务效果', |
||||
|
`SERVICE_PEOPLE_NUMBER` int(10) DEFAULT NULL COMMENT '服务人数', |
||||
|
`SATISFACTION` varchar(30) DEFAULT NULL COMMENT '满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect', |
||||
|
`LONGITUDE` varchar(255) DEFAULT NULL COMMENT '地址经度', |
||||
|
`LATITUDE` varchar(255) DEFAULT NULL COMMENT '地址纬度', |
||||
|
`ADDRESS` varchar(64) DEFAULT NULL COMMENT '地址', |
||||
|
`DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务记录反馈表'; |
||||
|
|
||||
|
|
||||
|
CREATE TABLE `ic_service_scope_v2` ( |
||||
|
`ID` varchar(64) NOT NULL, |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL, |
||||
|
`SERVICE_RECORD_ID` varchar(64) NOT NULL COMMENT '服务记录的ID', |
||||
|
`OBJECT_TYPE` varchar(32) NOT NULL COMMENT 'agency单位;grid网格;neighborhood小区', |
||||
|
`OBJECT_ID` varchar(64) NOT NULL COMMENT '选中的组织的ID', |
||||
|
`OBJECT_ID_PATH` varchar(255) NOT NULL COMMENT '发布范围的组织ID【包含组织、网格、小区本身的全路径】', |
||||
|
`OBJECT_NAME` varchar(32) DEFAULT NULL, |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务范围表'; |
||||
|
|
||||
|
CREATE TABLE `heart_attachment` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`BUSINESS_ID` varchar(64) NOT NULL COMMENT '业务id', |
||||
|
`ATTACH_TO` varchar(32) DEFAULT NULL COMMENT '政策:ic_policy;服务:ic_service_record_v2', |
||||
|
`NAME` varchar(64) DEFAULT NULL COMMENT '附件名', |
||||
|
`FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', |
||||
|
`TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', |
||||
|
`URL` varchar(255) NOT NULL COMMENT '附件地址', |
||||
|
`SORT` int(1) NOT NULL COMMENT '排序字段', |
||||
|
`STATUS` varchar(32) NOT NULL DEFAULT 'auto_passed' COMMENT '附件状态(审核中:auditing; \r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;\r\nrejected:人工审核驳回;\r\napproved:人工审核通过)\r\n现在图片是同步审核的,所以图片只有auto_passed一种状态', |
||||
|
`REASON` varchar(255) DEFAULT NULL COMMENT '失败原因', |
||||
|
`DURATION` int(11) DEFAULT NULL COMMENT '语音或视频时长,秒', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='heart库附件表'; |
||||
@ -0,0 +1 @@ |
|||||
|
alter table ic_service_record_v2 add COLUMN SERVICE_CATEGORY_KEY VARCHAR(64) comment '服务类别KEY' AFTER remark; |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.HeartAttachmentDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.HeartAttachmentEntity" id="heartAttachmentMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="businessId" column="BUSINESS_ID"/> |
||||
|
<result property="attachTo" column="ATTACH_TO"/> |
||||
|
<result property="attachmentName" column="ATTACHMENT_NAME"/> |
||||
|
<result property="attachmentFormat" column="ATTACHMENT_FORMAT"/> |
||||
|
<result property="attachmentType" column="ATTACHMENT_TYPE"/> |
||||
|
<result property="attachmentUrl" column="ATTACHMENT_URL"/> |
||||
|
<result property="sort" column="SORT"/> |
||||
|
<result property="status" column="STATUS"/> |
||||
|
<result property="reason" column="REASON"/> |
||||
|
<result property="duration" column="DURATION"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<delete id="deleteByBusinessId" parameterType="java.lang.String"> |
||||
|
delete from heart_attachment where BUSINESS_ID=#{businessId} |
||||
|
</delete> |
||||
|
</mapper> |
||||
@ -0,0 +1,23 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.IcPolicyCategoryDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcPolicyCategoryEntity" id="icPolicyCategoryMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="icPolicyId" column="IC_POLICY_ID"/> |
||||
|
<result property="categoryCode" column="CATEGORY_CODE"/> |
||||
|
<result property="codePath" column="CODE_PATH"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<delete id="deleteByIcPolicyId" parameterType="java.lang.String"> |
||||
|
delete from ic_policy_category where IC_POLICY_ID=#{icPolicyId} |
||||
|
</delete> |
||||
|
</mapper> |
||||
@ -0,0 +1,83 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.IcPolicyDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcPolicyEntity" id="icPolicyMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="orgId" column="ORG_ID"/> |
||||
|
<result property="orgIdPath" column="ORG_ID_PATH"/> |
||||
|
<result property="policyLevel" column="POLICY_LEVEL"/> |
||||
|
<result property="startDate" column="START_DATE"/> |
||||
|
<result property="endDate" column="END_DATE"/> |
||||
|
<result property="title" column="TITLE"/> |
||||
|
<result property="content" column="CONTENT"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="selectItemList" parameterType="map" resultType="com.epmet.dto.IcPolicyItemResultDTO"> |
||||
|
SELECT |
||||
|
i.id, |
||||
|
i.GROUP_TYPE, |
||||
|
i.LABEL, |
||||
|
i.COL_KEY, |
||||
|
i.ITEM_TYPE, |
||||
|
IFNULL( i.TABLE_NAME, '' ) AS TABLE_NAME, |
||||
|
i.sort, |
||||
|
IFNULL(i.remark,'')as remark, |
||||
|
IFNULL(i.option_source_type,'') as option_source_type, |
||||
|
IFNULL(i.option_source_url,'') as option_source_url, |
||||
|
IFNULL(i.option_source_param ,'') as option_source_param |
||||
|
FROM |
||||
|
ic_policy_item i |
||||
|
WHERE |
||||
|
i.DEL_FLAG = '0' |
||||
|
and i.CUSTOMER_ID = #{customerId} |
||||
|
and i.GROUP_TYPE = #{groupType} |
||||
|
order by i.SORT asc |
||||
|
</select> |
||||
|
|
||||
|
<select id="policyList" parameterType="map" resultType="com.epmet.dto.IcPolicyDTO"> |
||||
|
SELECT |
||||
|
ip.id AS POLICY_ID, |
||||
|
ip.ORG_ID, |
||||
|
ip.POLICY_LEVEL, |
||||
|
ip.START_DATE, |
||||
|
ip.END_DATE, |
||||
|
ip.TITLE, |
||||
|
ip.CONTENT, |
||||
|
( |
||||
|
case when ip.END_DATE < DATE_FORMAT(now(),'%Y-%m-%d') then '1' |
||||
|
when ip.END_DATE >= DATE_FORMAT(now(),'%Y-%m-%d') then '0' |
||||
|
end |
||||
|
)as expiredFlag |
||||
|
FROM |
||||
|
ic_policy ip |
||||
|
WHERE |
||||
|
ip.DEL_FLAG = '0' |
||||
|
AND ip.CUSTOMER_ID = #{customerId} |
||||
|
AND ip.ORG_ID = #{agencyId} |
||||
|
<if test="null != title and title != '' "> |
||||
|
and ip.TITLE like concat('%',#{title},'%') |
||||
|
</if> |
||||
|
<if test="null != content and content != '' "> |
||||
|
and ip.CONTENT like concat('%',#{content},'%') |
||||
|
</if> |
||||
|
<if test="null != expiredFlag and expiredFlag != '' "> |
||||
|
and 1=1 |
||||
|
<if test="expiredFlag == 1"> |
||||
|
and ip.END_DATE < DATE_FORMAT(now(),'%Y-%m-%d') |
||||
|
</if> |
||||
|
<if test="expiredFlag == 0"> |
||||
|
and ip.END_DATE >= DATE_FORMAT(now(),'%Y-%m-%d') |
||||
|
</if> |
||||
|
</if> |
||||
|
order by ip.CREATED_TIME desc |
||||
|
</select> |
||||
|
</mapper> |
||||
@ -0,0 +1,23 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.IcPolicyRuleDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcPolicyRuleEntity" id="icPolicyRuleMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="icPolicyId" column="IC_POLICY_ID"/> |
||||
|
<result property="ruleName" column="RULE_NAME"/> |
||||
|
<result property="sort" column="SORT"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<delete id="deleteByIcPolicyId" parameterType="java.lang.String"> |
||||
|
delete from ic_policy_rule where IC_POLICY_ID = #{policyId} |
||||
|
</delete> |
||||
|
</mapper> |
||||
@ -0,0 +1,33 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.IcPolicyRuleDetailDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcPolicyRuleDetailEntity" id="icPolicyRuleDetailMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="icPolicyId" column="IC_POLICY_ID"/> |
||||
|
<result property="ruleId" column="RULE_ID"/> |
||||
|
<result property="ruleDesc" column="RULE_DESC"/> |
||||
|
<result property="groupType" column="GROUP_TYPE"/> |
||||
|
<result property="lastLogicalRel" column="LAST_LOGICAL_REL"/> |
||||
|
<result property="itemGroupId" column="ITEM_GROUP_ID"/> |
||||
|
<result property="itemId" column="ITEM_ID"/> |
||||
|
<result property="queryType" column="QUERY_TYPE"/> |
||||
|
<result property="colTable" column="COL_TABLE"/> |
||||
|
<result property="colKey" column="COL_KEY"/> |
||||
|
<result property="colVal" column="COL_VAL"/> |
||||
|
<result property="sort" column="SORT"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<delete id="deleteByRuleId" parameterType="java.lang.String"> |
||||
|
delete from ic_policy_rule_detail where RULE_ID=#{ruleId} |
||||
|
</delete> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,64 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.IcServiceFeedbackV2Dao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcServiceFeedbackV2Entity" id="icServiceFeedbackV2Map"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="serviceId" column="SERVICE_ID"/> |
||||
|
<result property="serviceGoal" column="SERVICE_GOAL"/> |
||||
|
<result property="serviceEffect" column="SERVICE_EFFECT"/> |
||||
|
<result property="servicePeopleNumber" column="SERVICE_PEOPLE_NUMBER"/> |
||||
|
<result property="satisfaction" column="SATISFACTION"/> |
||||
|
<result property="longitude" column="LONGITUDE"/> |
||||
|
<result property="latitude" column="LATITUDE"/> |
||||
|
<result property="address" column="address"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<resultMap id="getFeedbackV2Map" type="com.epmet.dto.IcServiceFeedbackV2DTO"> |
||||
|
<result column="serviceGoal" property="serviceGoal"/> |
||||
|
<result column="serviceEffect" property="serviceEffect"/> |
||||
|
<result column="servicePeopleNumber" property="servicePeopleNumber"/> |
||||
|
<result column="satisfaction" property="satisfaction"/> |
||||
|
<result column="address" property="address"/> |
||||
|
<result column="longitude" property="longitude"/> |
||||
|
<result column="latitude" property="latitude"/> |
||||
|
<collection property="fileList" ofType="com.epmet.dto.HeartAttachmentDTO"> |
||||
|
<result column="url" property="url"/> |
||||
|
<result column="name" property="name"/> |
||||
|
<result column="type" property="type"/> |
||||
|
<result column="format" property="format"/> |
||||
|
<result column="duration" property="duration"/> |
||||
|
<result column="id" property="id"/> |
||||
|
</collection> |
||||
|
</resultMap> |
||||
|
<select id="getFeedbackV2" resultMap="getFeedbackV2Map"> |
||||
|
SELECT |
||||
|
sf.SERVICE_GOAL AS serviceGoal, |
||||
|
sf.SERVICE_EFFECT AS serviceEffect, |
||||
|
sf.SERVICE_PEOPLE_NUMBER AS servicePeopleNumber, |
||||
|
sf.SATISFACTION AS satisfaction, |
||||
|
sf.ADDRESS AS address, |
||||
|
sf.LONGITUDE AS longitude, |
||||
|
sf.LATITUDE AS latitude, |
||||
|
ha.url AS url, |
||||
|
ha.NAME AS name, |
||||
|
ha.type AS type, |
||||
|
ha.format AS format, |
||||
|
ha.duration AS duration, |
||||
|
ha.id AS id |
||||
|
FROM ic_service_feedback_v2 sf |
||||
|
LEFT JOIN heart_attachment ha ON ha.business_id = sf.ID AND ha.del_flag = '0' |
||||
|
WHERE sf.SERVICE_RECORD_ID = #{serviceRecordId} |
||||
|
AND sf.del_flag = '0' |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue