forked from rongchao/epmet-cloud-rizhao
69 changed files with 2864 additions and 88 deletions
@ -0,0 +1,38 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.commons.tools.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* epmet-user端调用gov-org端的入参 |
|||
* @author sun |
|||
*/ |
|||
@Data |
|||
public class IcHouseFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
private String customerId; |
|||
private String houseId; |
|||
|
|||
|
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
public enum PartyOrgTypeEnum { |
|||
|
|||
PROVINCIAL("0", "省委"), |
|||
MUNICIPAL("1", "市委"), |
|||
DISTRICT("2", "区委"), |
|||
WORKING("3", "党工委"), |
|||
PARTY("4", "党委"), |
|||
BRANCH("5", "支部"); |
|||
|
|||
|
|||
private String code; |
|||
private String name; |
|||
|
|||
|
|||
PartyOrgTypeEnum(String code, String name) { |
|||
this.code = code; |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
import java.util.Objects; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
*/ |
|||
public enum PartyPostEnum { |
|||
//党员职务
|
|||
PTDY("0", "普通党员"), |
|||
ZBSJ("1", "支部书记"), |
|||
ZBWY("2", "支部委员"), |
|||
DWWY("3", "党委委员"), |
|||
|
|||
UN_KNOWN("8", "未知"); |
|||
|
|||
private String code; |
|||
private String name; |
|||
|
|||
|
|||
PartyPostEnum(String code, String name) { |
|||
this.code = code; |
|||
this.name = name; |
|||
} |
|||
|
|||
public static String getName(String code) { |
|||
PartyPostEnum[] partyPostEnums = values(); |
|||
for (PartyPostEnum partyPostEnum : partyPostEnums) { |
|||
if (Objects.equals(partyPostEnum.getCode(), code)) { |
|||
return partyPostEnum.getName(); |
|||
} |
|||
} |
|||
return PartyPostEnum.UN_KNOWN.getName(); |
|||
} |
|||
|
|||
public static String getCode(String name) { |
|||
PartyPostEnum[] partyPostEnums = values(); |
|||
for (PartyPostEnum partyPostEnum : partyPostEnums) { |
|||
if (partyPostEnum.getName().equals(name)) { |
|||
return partyPostEnum.getCode(); |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
} |
@ -0,0 +1,92 @@ |
|||
package com.epmet.commons.tools.redis.common.bean; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 房屋信息缓存 |
|||
* @author Administrator |
|||
*/ |
|||
@Data |
|||
public class HouseInfoCache implements Serializable { |
|||
/** |
|||
* 所属家庭Id |
|||
*/ |
|||
private String homeId; |
|||
|
|||
/** |
|||
* 小区详细地址 |
|||
*/ |
|||
private String neighborAddress; |
|||
/** |
|||
* 小区id |
|||
*/ |
|||
private String neighborHoodId; |
|||
/** |
|||
* 小区名称 |
|||
*/ |
|||
private String neighborHoodName; |
|||
|
|||
|
|||
/** |
|||
* 所属楼栋id |
|||
*/ |
|||
private String buildingId; |
|||
/** |
|||
* 楼栋名称 |
|||
*/ |
|||
private String buildingName; |
|||
|
|||
|
|||
/** |
|||
* 所属单元id |
|||
*/ |
|||
private String buildingUnitId; |
|||
/** |
|||
* 单元名 |
|||
*/ |
|||
private String unitName; |
|||
|
|||
|
|||
/** |
|||
* 门牌号 |
|||
*/ |
|||
private String doorName; |
|||
|
|||
/** |
|||
* 房屋类型,1楼房,2平房,3别墅 |
|||
*/ |
|||
private String houseType; |
|||
|
|||
private String houseName; |
|||
|
|||
/** |
|||
* 楼的经度 |
|||
*/ |
|||
private String buildingLongitude; |
|||
/** |
|||
* 楼的纬度 |
|||
*/ |
|||
private String buildingLatitude; |
|||
|
|||
/** |
|||
* 小区名+楼栋名+单元名+房屋名 |
|||
*/ |
|||
private String allName; |
|||
|
|||
private String customerId; |
|||
|
|||
/** |
|||
* 小区所在的组织id |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* eg:市北区-阜新路街道-南宁社区 |
|||
*/ |
|||
private String agencyPathName; |
|||
/** |
|||
* 组织的area_code |
|||
*/ |
|||
private String areaCode; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyTypepercentFormDTO { |
|||
|
|||
private static final long serialVersionUID = -3833404131164761022L; |
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
@NotBlank(message = "组织id不能为空") |
|||
private String agencyId; |
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyUnitListbriefFormDTO extends PageFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -2776705671944626707L; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
@NotBlank(message = "组织id不能为空") |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 单位名称 |
|||
*/ |
|||
private String unitName; |
|||
|
|||
/** |
|||
* 服务事项 |
|||
*/ |
|||
private String serviceMatter; |
|||
|
|||
/** |
|||
* 分类 |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* 联系人 |
|||
*/ |
|||
private String contact; |
|||
|
|||
/** |
|||
* 联系人电话 |
|||
*/ |
|||
private String contactMobile; |
|||
|
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class PartyTypepercentResultDTO { |
|||
|
|||
private static final long serialVersionUID = -5256798094892121661L; |
|||
|
|||
/** |
|||
* 联建单位类型 |
|||
*/ |
|||
private String label; |
|||
|
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private Integer value; |
|||
|
|||
/** |
|||
* 联建单位编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 联建单位数量占比(%) |
|||
*/ |
|||
private String percent; |
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyUnitListbrieResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -300315089751537091L; |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 所属网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 分类 |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* 服务事项 |
|||
*/ |
|||
private String serviceMatter; |
|||
|
|||
/** |
|||
* 单位名称 |
|||
*/ |
|||
private String unitName; |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @program: epmet-cloud |
|||
* @description: |
|||
* @author: wangtong |
|||
* @create: 2022-05-18 16:46 |
|||
**/ |
|||
@Data |
|||
public class OrgTreeByUserAndTypeFormDTO implements Serializable { |
|||
|
|||
@NotNull(message ="组织id不可为空") |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 党组织类型 0省委,1市委,2区委,3党工委,4党委 |
|||
*/ |
|||
@NotNull(message ="组织类型不可为空") |
|||
private String orgType; |
|||
|
|||
|
|||
private List<String> orgTypeList; |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @program: epmet-cloud |
|||
* @description: |
|||
* @author: wangtong |
|||
* @create: 2022-05-18 16:48 |
|||
**/ |
|||
@Data |
|||
public class PartyOrgTreeResultDTO implements Serializable { |
|||
|
|||
/** |
|||
* 行政组织id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 行政组织pid |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 行政组织名称 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 行政组织等级 |
|||
*/ |
|||
private String level; |
|||
|
|||
/** |
|||
* 行政组织父ids |
|||
*/ |
|||
private String pids; |
|||
|
|||
private List<PartyOrgTreeResultDTO> children = new ArrayList<>(); |
|||
} |
@ -0,0 +1,91 @@ |
|||
package com.epmet.resi.partymember.dto.partyOrg.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyOrgTreeDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 党组织的上级ID,没有上级时为0(前端展示用) |
|||
*/ |
|||
private String pid; |
|||
|
|||
|
|||
/** |
|||
* 党组织的上级ID,没有上级时为0 |
|||
*/ |
|||
private String orgPid; |
|||
|
|||
/** |
|||
* 党组织的所有上级ID,没有上级时为0 |
|||
*/ |
|||
private String orgPids; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyPids; |
|||
|
|||
/** |
|||
* 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|||
*/ |
|||
private String partyOrgType; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String partyOrgName; |
|||
|
|||
/** |
|||
* 组织编码 |
|||
*/ |
|||
private String partyOrgCode; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 党组织介绍 |
|||
*/ |
|||
private String introduction; |
|||
|
|||
|
|||
private List<IcPartyOrgTreeDTO> children = new ArrayList<>(); |
|||
|
|||
|
|||
} |
@ -0,0 +1,84 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/5/18 16:03 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class IcPartyMemberFromDTO extends PageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -5751720367897462952L; |
|||
private String customerId; |
|||
/** |
|||
* 所属党组织 |
|||
*/ |
|||
private String partyOrgId; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 手机 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
/** |
|||
* 流动党员 |
|||
*/ |
|||
private String isLd; |
|||
/** |
|||
* 流动党员证号 |
|||
*/ |
|||
private String ldzh; |
|||
/** |
|||
* 职务 |
|||
*/ |
|||
private String partyZw; |
|||
/** |
|||
* 是否党员中心户 |
|||
*/ |
|||
private String isDyzxh; |
|||
/** |
|||
* 是否免学习 |
|||
*/ |
|||
private String isMxx; |
|||
/** |
|||
* 文化程度 |
|||
*/ |
|||
private String culture; |
|||
/** |
|||
* 是否缴费 |
|||
*/ |
|||
private String isPay; |
|||
/** |
|||
* 入党时间开始 |
|||
*/ |
|||
private String rdsjStartDate; |
|||
/** |
|||
* 入党时间结束 |
|||
*/ |
|||
private String rdsjEndDate; |
|||
/** |
|||
* 最后一次缴费时间开始 |
|||
*/ |
|||
private String payStatrDate; |
|||
/** |
|||
* 最后一次缴费时间结束 |
|||
*/ |
|||
private String payEndDate; |
|||
private String year; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.form; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class PartyMemberPointEchoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6999955563137801002L; |
|||
|
|||
/** |
|||
* 年份 |
|||
*/ |
|||
@NotBlank(message = "年份不能为空") |
|||
private String year; |
|||
|
|||
/** |
|||
* 季度 |
|||
*/ |
|||
@NotBlank(message = "季度不能为空") |
|||
private String quarter; |
|||
|
|||
/** |
|||
* 党员id |
|||
*/ |
|||
@NotBlank(message = "党员id不能为空") |
|||
private String partyMemberId; |
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/5/18 16:33 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class IcPartyMemberResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -4964061462850271428L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 入党时间 |
|||
*/ |
|||
private String rdsj; |
|||
/** |
|||
* 所属党组织 |
|||
*/ |
|||
private String sszb; |
|||
/** |
|||
* 流动党员 |
|||
*/ |
|||
private String isLd; |
|||
/** |
|||
* 流动党员证号 |
|||
*/ |
|||
private String ldzh; |
|||
/** |
|||
* 职务 |
|||
*/ |
|||
private String partyZw; |
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
/** |
|||
* 是否缴费 |
|||
*/ |
|||
private String isPay; |
|||
/** |
|||
* 最近一次缴纳党费时间 |
|||
*/ |
|||
private String payDate; |
|||
/** |
|||
* 文化程度 |
|||
*/ |
|||
private String culture; |
|||
/** |
|||
* 量化积分 |
|||
*/ |
|||
private String point; |
|||
/** |
|||
* 志愿者类别 |
|||
*/ |
|||
private String volunteerCategory; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyMemberPointEchoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 195601506560614702L; |
|||
|
|||
/** |
|||
* 基础积分分值 |
|||
*/ |
|||
private Integer basePoint; |
|||
|
|||
/** |
|||
* 基础积分选项 英文逗号隔开 |
|||
*/ |
|||
private String baseOptions; |
|||
|
|||
/** |
|||
* 民主评议积分分值 |
|||
*/ |
|||
private Integer reviewPoint; |
|||
|
|||
/** |
|||
* 民主评议积分选项 |
|||
*/ |
|||
private String reviewOptions; |
|||
|
|||
/** |
|||
* 激励积分分值 |
|||
*/ |
|||
private Integer inspirePoint; |
|||
|
|||
/** |
|||
* 激励积分选项 |
|||
*/ |
|||
private String inspireOptions; |
|||
|
|||
/** |
|||
* 警示扣分分值 |
|||
*/ |
|||
private Integer warnPoint; |
|||
|
|||
/** |
|||
* 警示扣分选项 |
|||
*/ |
|||
private String warnOptions; |
|||
|
|||
private String id; |
|||
} |
@ -0,0 +1,80 @@ |
|||
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-05-19 |
|||
*/ |
|||
@Data |
|||
public class IcVolunteerPolyCategoryDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id customer.id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 类别【字典表】 |
|||
*/ |
|||
private String volunteerCategory; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
} |
@ -0,0 +1,99 @@ |
|||
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-05-19 |
|||
*/ |
|||
@Data |
|||
public class IcVolunteerPolyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id customer.id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyPids; |
|||
|
|||
/** |
|||
* 居住成员1姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 性别 |
|||
*/ |
|||
private String gender; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class VolunteerPolyMapDataFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 341371496246696462L; |
|||
|
|||
/** |
|||
* 志愿者分类code |
|||
*/ |
|||
@NotBlank(message = "分类不能为空") |
|||
private String code; |
|||
private String customerId; |
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class VolunteerPolyMapDataResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6310126790215323874L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 名字 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属房屋 |
|||
*/ |
|||
private String houseName; |
|||
|
|||
/** |
|||
* 房屋id |
|||
*/ |
|||
private String homeId; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 工作单位 |
|||
*/ |
|||
private String gzdw; |
|||
|
|||
/** |
|||
* 人户状况 |
|||
*/ |
|||
private String rhzk; |
|||
} |
@ -0,0 +1,91 @@ |
|||
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.IcVolunteerPolyDTO; |
|||
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO; |
|||
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO; |
|||
import com.epmet.service.IcVolunteerPolyService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 志愿者信息聚合 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-19 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("icVolunteerPoly") |
|||
public class IcVolunteerPolyController { |
|||
|
|||
@Autowired |
|||
private IcVolunteerPolyService icVolunteerPolyService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcVolunteerPolyDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IcVolunteerPolyDTO> page = icVolunteerPolyService.page(params); |
|||
return new Result<PageData<IcVolunteerPolyDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<IcVolunteerPolyDTO> get(@PathVariable("id") String id){ |
|||
IcVolunteerPolyDTO data = icVolunteerPolyService.get(id); |
|||
return new Result<IcVolunteerPolyDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody IcVolunteerPolyDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
icVolunteerPolyService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcVolunteerPolyDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icVolunteerPolyService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icVolunteerPolyService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 【网格党建平面图】地图 |
|||
* |
|||
* @param form |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.VolunteerPolyMapDataResultDTO>> |
|||
* @author LZN |
|||
* @date 2022/5/19 13:54 |
|||
*/ |
|||
@PostMapping("/mapData") |
|||
public Result<List<VolunteerPolyMapDataResultDTO>> getMapData(@RequestBody VolunteerPolyMapDataFormDTO form, @LoginUser TokenDto tokenDto){ |
|||
form.setCustomerId(tokenDto.getCustomerId()); |
|||
ValidatorUtils.validateEntity(form); |
|||
List<VolunteerPolyMapDataResultDTO> dto = icVolunteerPolyService.getMapData(form); |
|||
return new Result<List<VolunteerPolyMapDataResultDTO>>().ok(dto); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.IcVolunteerPolyCategoryEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 志愿者信息聚合,志愿者类别表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-19 |
|||
*/ |
|||
@Mapper |
|||
public interface IcVolunteerPolyCategoryDao extends BaseDao<IcVolunteerPolyCategoryEntity> { |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO; |
|||
import com.epmet.entity.IcVolunteerPolyEntity; |
|||
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-05-19 |
|||
*/ |
|||
@Mapper |
|||
public interface IcVolunteerPolyDao extends BaseDao<IcVolunteerPolyEntity> { |
|||
|
|||
/** |
|||
* 【网格党建平面图】地图 |
|||
* @param code |
|||
*/ |
|||
List<VolunteerPolyMapDataResultDTO> getMapData(@Param("code") String code, |
|||
@Param("customerId") String customerId); |
|||
} |
@ -0,0 +1,46 @@ |
|||
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-05-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_volunteer_poly_category") |
|||
public class IcVolunteerPolyCategoryEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id customer.id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 类别【字典表】 |
|||
*/ |
|||
private String volunteerCategory; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
} |
@ -0,0 +1,69 @@ |
|||
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-05-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_volunteer_poly") |
|||
public class IcVolunteerPolyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id customer.id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyPids; |
|||
|
|||
/** |
|||
* 居住成员1姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 性别 |
|||
*/ |
|||
private String gender; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
} |
@ -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.IcVolunteerPolyCategoryDTO; |
|||
import com.epmet.entity.IcVolunteerPolyCategoryEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 志愿者信息聚合,志愿者类别表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-19 |
|||
*/ |
|||
public interface IcVolunteerPolyCategoryService extends BaseService<IcVolunteerPolyCategoryEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcVolunteerPolyCategoryDTO> |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
PageData<IcVolunteerPolyCategoryDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcVolunteerPolyCategoryDTO> |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
List<IcVolunteerPolyCategoryDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcVolunteerPolyCategoryDTO |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
IcVolunteerPolyCategoryDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
void save(IcVolunteerPolyCategoryDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
void update(IcVolunteerPolyCategoryDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,90 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.IcVolunteerPolyDTO; |
|||
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO; |
|||
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO; |
|||
import com.epmet.entity.IcVolunteerPolyEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 志愿者信息聚合 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-19 |
|||
*/ |
|||
public interface IcVolunteerPolyService extends BaseService<IcVolunteerPolyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcVolunteerPolyDTO> |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
PageData<IcVolunteerPolyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcVolunteerPolyDTO> |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
List<IcVolunteerPolyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcVolunteerPolyDTO |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
IcVolunteerPolyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
void save(IcVolunteerPolyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
void update(IcVolunteerPolyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-19 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 【网格党建平面图】地图 |
|||
* |
|||
* @param form |
|||
* @return java.util.List<com.epmet.dto.result.VolunteerPolyMapDataResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/19 13:55 |
|||
*/ |
|||
List<VolunteerPolyMapDataResultDTO> getMapData(VolunteerPolyMapDataFormDTO form); |
|||
} |
@ -0,0 +1,83 @@ |
|||
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.IcVolunteerPolyCategoryDao; |
|||
import com.epmet.dto.IcVolunteerPolyCategoryDTO; |
|||
import com.epmet.entity.IcVolunteerPolyCategoryEntity; |
|||
import com.epmet.service.IcVolunteerPolyCategoryService; |
|||
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-05-19 |
|||
*/ |
|||
@Service |
|||
public class IcVolunteerPolyCategoryServiceImpl extends BaseServiceImpl<IcVolunteerPolyCategoryDao, IcVolunteerPolyCategoryEntity> implements IcVolunteerPolyCategoryService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<IcVolunteerPolyCategoryDTO> page(Map<String, Object> params) { |
|||
IPage<IcVolunteerPolyCategoryEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcVolunteerPolyCategoryDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcVolunteerPolyCategoryDTO> list(Map<String, Object> params) { |
|||
List<IcVolunteerPolyCategoryEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcVolunteerPolyCategoryDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcVolunteerPolyCategoryEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcVolunteerPolyCategoryEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcVolunteerPolyCategoryDTO get(String id) { |
|||
IcVolunteerPolyCategoryEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcVolunteerPolyCategoryDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcVolunteerPolyCategoryDTO dto) { |
|||
IcVolunteerPolyCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IcVolunteerPolyCategoryEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcVolunteerPolyCategoryDTO dto) { |
|||
IcVolunteerPolyCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IcVolunteerPolyCategoryEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,121 @@ |
|||
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.page.PageData; |
|||
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; |
|||
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|||
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|||
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.dao.IcVolunteerPolyDao; |
|||
import com.epmet.dto.IcVolunteerPolyDTO; |
|||
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO; |
|||
import com.epmet.dto.result.PartyUnitListbrieResultDTO; |
|||
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO; |
|||
import com.epmet.entity.IcVolunteerPolyEntity; |
|||
import com.epmet.service.IcVolunteerPolyService; |
|||
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.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 志愿者信息聚合 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-19 |
|||
*/ |
|||
@Service |
|||
public class IcVolunteerPolyServiceImpl extends BaseServiceImpl<IcVolunteerPolyDao, IcVolunteerPolyEntity> implements IcVolunteerPolyService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<IcVolunteerPolyDTO> page(Map<String, Object> params) { |
|||
IPage<IcVolunteerPolyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcVolunteerPolyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcVolunteerPolyDTO> list(Map<String, Object> params) { |
|||
List<IcVolunteerPolyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcVolunteerPolyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcVolunteerPolyEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcVolunteerPolyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcVolunteerPolyDTO get(String id) { |
|||
IcVolunteerPolyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcVolunteerPolyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcVolunteerPolyDTO dto) { |
|||
IcVolunteerPolyEntity entity = ConvertUtils.sourceToTarget(dto, IcVolunteerPolyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcVolunteerPolyDTO dto) { |
|||
IcVolunteerPolyEntity entity = ConvertUtils.sourceToTarget(dto, IcVolunteerPolyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 【网格党建平面图】地图 |
|||
* |
|||
* @param form |
|||
* @return java.util.List<com.epmet.dto.result.VolunteerPolyMapDataResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/19 13:55 |
|||
*/ |
|||
@Override |
|||
public List<VolunteerPolyMapDataResultDTO> getMapData(VolunteerPolyMapDataFormDTO form) { |
|||
List<VolunteerPolyMapDataResultDTO> dto = baseDao.getMapData(form.getCode(),form.getCustomerId()); |
|||
// 获取gridName
|
|||
for (VolunteerPolyMapDataResultDTO item : dto) { |
|||
if (StringUtils.isNotEmpty(item.getGridId())) { |
|||
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId()); |
|||
if (null != gridInfo) { |
|||
item.setGridName(gridInfo.getGridName()); |
|||
} |
|||
} |
|||
// 获取houseName
|
|||
if(StringUtils.isNotEmpty(item.getHomeId())) { |
|||
HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(form.getCustomerId(), item.getHomeId()); |
|||
if(null != houseInfo) { |
|||
item.setHouseName(houseInfo.getHouseName()); |
|||
} |
|||
} |
|||
} |
|||
return dto; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
<?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.IcVolunteerPolyCategoryDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.IcVolunteerPolyCategoryEntity" id="icVolunteerPolyCategoryMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="idCard" column="ID_CARD"/> |
|||
<result property="volunteerCategory" column="VOLUNTEER_CATEGORY"/> |
|||
<result property="longitude" column="LONGITUDE"/> |
|||
<result property="latitude" column="LATITUDE"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,47 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.IcVolunteerPolyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.IcVolunteerPolyEntity" id="icVolunteerPolyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="agencyPids" column="AGENCY_PIDS"/> |
|||
<result property="name" column="NAME"/> |
|||
<result property="idCard" column="ID_CARD"/> |
|||
<result property="mobile" column="MOBILE"/> |
|||
<result property="gender" column="GENDER"/> |
|||
<result property="longitude" column="LONGITUDE"/> |
|||
<result property="latitude" column="LATITUDE"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
</resultMap> |
|||
<select id="getMapData" resultType="com.epmet.dto.result.VolunteerPolyMapDataResultDTO"> |
|||
SELECT |
|||
u.id, |
|||
u.NAME, |
|||
u.mobile, |
|||
u.ID_CARD, |
|||
u.gzdw, |
|||
u.rhzk, |
|||
u.GRID_ID, |
|||
u.HOME_ID |
|||
FROM |
|||
ic_volunteer p |
|||
LEFT JOIN ic_resi_user u ON p.IC_RESI_USER = u.id and u.del_flag = '0' |
|||
<where> |
|||
p.del_flag = '0' |
|||
AND CUSTOMER_ID = #{customerId} |
|||
<if test="code != null and code != ''"> |
|||
AND p.VOLUNTEER_CATEGORY = #{code} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue