174 changed files with 5724 additions and 227 deletions
@ -0,0 +1,36 @@ |
|||||
|
package com.epmet.dto.form.work; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 爱心互助列表入参DTO |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActPageFormDTO extends PageFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 6473824879249274683L; |
||||
|
/** |
||||
|
* 活动标题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
/** |
||||
|
* 活动预计开始时间 |
||||
|
*/ |
||||
|
private String actStartTime; |
||||
|
/** |
||||
|
* 活动预计结束时间 |
||||
|
*/ |
||||
|
private String actEndTime; |
||||
|
/** |
||||
|
* 状态: 已发布/报名中:published; 已取消:canceled; 已结束:finished) |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* tokenDto获取 |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
private String userId; |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.epmet.dto.form.work; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/6/30 19:22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class FinishActFormDTO extends SaveActualTimeFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -4352058593501077516L; |
||||
|
@NotNull(message = "分值不能为空",groups =AddUserInternalGroup.class ) |
||||
|
private Integer reward; |
||||
|
private List<GrantPointsFormDTO> userList; |
||||
|
} |
||||
|
|
@ -0,0 +1,183 @@ |
|||||
|
package com.epmet.dto.result.work; |
||||
|
|
||||
|
import com.epmet.dto.result.resi.ResiActSummaryResultDTO; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/6/30 16:47 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActDetailResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 4235569576711312094L; |
||||
|
|
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 活动标题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 封面图 |
||||
|
*/ |
||||
|
private String coverPic; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点 |
||||
|
*/ |
||||
|
private String actAddress; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点-经度 |
||||
|
*/ |
||||
|
private BigDecimal actLongitude; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点-纬度 |
||||
|
*/ |
||||
|
private BigDecimal actLatitude; |
||||
|
|
||||
|
/** |
||||
|
* 活动预计开始时间yyyy-MM-dd HH:mm |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date actStartTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动预计结束时间yyyy-MM-dd HH:mm |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date actEndTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动人数 |
||||
|
*/ |
||||
|
private Integer actQuota; |
||||
|
|
||||
|
/** |
||||
|
* 活动积分 |
||||
|
*/ |
||||
|
private Integer reward; |
||||
|
|
||||
|
/** |
||||
|
* 报名审核:true:只有志愿者才可以参加活动,false: 只要是居民就可以参加活动 |
||||
|
*/ |
||||
|
private Boolean volunteerLimit; |
||||
|
|
||||
|
/** |
||||
|
* 报名审核: true: 需人工审核 false: 无需审核 |
||||
|
*/ |
||||
|
private Boolean auditSwitch; |
||||
|
|
||||
|
/** |
||||
|
* 报名截止时间:yyyy-MM-dd HH:mm |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date signUpEndTime; |
||||
|
|
||||
|
/** |
||||
|
* 报名条件 |
||||
|
*/ |
||||
|
private String requirement; |
||||
|
|
||||
|
/** |
||||
|
* 签到开始时间:yyyy-MM-dd HH:mm |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date signInStartTime; |
||||
|
|
||||
|
/** |
||||
|
* 签到结束时间: yyyy-MM-dd HH:mm |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date signInEndTime; |
||||
|
|
||||
|
/** |
||||
|
* 签到地址 |
||||
|
*/ |
||||
|
private String signInAddress; |
||||
|
|
||||
|
/** |
||||
|
* 签到地址-纬度 |
||||
|
*/ |
||||
|
private BigDecimal signInLatitude; |
||||
|
|
||||
|
/** |
||||
|
* 签到地址-经度 |
||||
|
*/ |
||||
|
private BigDecimal signInLongitude; |
||||
|
|
||||
|
/** |
||||
|
* 签到有效范围(米) |
||||
|
*/ |
||||
|
private Integer signInRadius; |
||||
|
|
||||
|
/** |
||||
|
* 主办方id |
||||
|
*/ |
||||
|
private String sponsorId; |
||||
|
|
||||
|
/** |
||||
|
* 主办方全路径包含自身id |
||||
|
*/ |
||||
|
private String sponsorPath; |
||||
|
|
||||
|
/** |
||||
|
* 主办方类型:以网格名义:grid , 以机关名义: agency |
||||
|
*/ |
||||
|
private String sponsorType; |
||||
|
|
||||
|
/** |
||||
|
* 主办方名称 |
||||
|
*/ |
||||
|
private String sponsorName; |
||||
|
|
||||
|
/** |
||||
|
* 联系人 |
||||
|
*/ |
||||
|
private String sponsorContacts; |
||||
|
|
||||
|
/** |
||||
|
* 联系电话 |
||||
|
*/ |
||||
|
private String sponsorTel; |
||||
|
|
||||
|
/** |
||||
|
* 活动类型爱心活动heart 联建活动party |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String actType; |
||||
|
@JsonIgnore |
||||
|
private String createdBy; |
||||
|
/** |
||||
|
* true:富文本;false: 原来小程序那种发布内容 |
||||
|
*/ |
||||
|
private Boolean richTextFlag; |
||||
|
|
||||
|
/** |
||||
|
* true,我发布的,false,其他人发布的 |
||||
|
*/ |
||||
|
private Boolean isMyPublish; |
||||
|
|
||||
|
private List<ActPreviewContentResultDTO> actContent; |
||||
|
|
||||
|
/** |
||||
|
* 1已经总结0未总结 |
||||
|
*/ |
||||
|
private Boolean summaryFlag; |
||||
|
|
||||
|
/** |
||||
|
* 只有填写了总结的才有内容 |
||||
|
*/ |
||||
|
List<ResiActSummaryResultDTO> summaryContent; |
||||
|
} |
||||
|
|
@ -0,0 +1,106 @@ |
|||||
|
package com.epmet.dto.result.work; |
||||
|
|
||||
|
import com.epmet.dto.form.work.PublishActInfoFormDTO; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/6/30 14:15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActPageResDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 5330377961022020364L; |
||||
|
/** |
||||
|
*活动id |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
*活动标题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点 |
||||
|
*/ |
||||
|
private String actAddress; |
||||
|
|
||||
|
/** |
||||
|
* 活动预计开始时间yyyy-MM-dd HH:mm |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date actStartTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动预计结束时间yyyy-MM-dd HH:mm |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date actEndTime; |
||||
|
/** |
||||
|
* 报名截止时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date signUpEndTime; |
||||
|
|
||||
|
/** |
||||
|
* 报名开始时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date signUpStartTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough |
||||
|
*/ |
||||
|
private String status=""; |
||||
|
|
||||
|
/** |
||||
|
* true:富文本;false: 原来小程序那种发布内容 |
||||
|
*/ |
||||
|
private Boolean richTextFlag; |
||||
|
|
||||
|
/** |
||||
|
* true,我发布的,false,其他人发布的 |
||||
|
*/ |
||||
|
private Boolean isMyPublish; |
||||
|
|
||||
|
/** |
||||
|
* true:固定名额 false: 不限制名额 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private Boolean actQuotaCategory; |
||||
|
/** |
||||
|
* 活动名额人数 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private Integer actQuota; |
||||
|
|
||||
|
/** |
||||
|
* 已报名人数 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private Integer signedUp; |
||||
|
|
||||
|
/** |
||||
|
* 1已经总结0未总结 |
||||
|
*/ |
||||
|
private Boolean summaryFlag; |
||||
|
|
||||
|
/** |
||||
|
* 活动积分 |
||||
|
*/ |
||||
|
private Integer reward; |
||||
|
|
||||
|
/** |
||||
|
* 报名审核: true: 需人工审核 false: 无需审核 |
||||
|
*/ |
||||
|
@NotNull(message = "报名审核方式不能为空", groups = {PublishActInfoFormDTO.AddUserInternalGroup.class}) |
||||
|
private Boolean auditSwitch; |
||||
|
} |
||||
|
|
@ -0,0 +1,108 @@ |
|||||
|
package com.epmet.dto.result.work; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/6/30 17:58 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActUserResDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 7621004224467504031L; |
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String actUserRelationId; |
||||
|
|
||||
|
/** |
||||
|
* 活动id |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 用户id |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String realName; |
||||
|
|
||||
|
/** |
||||
|
* 昵称 |
||||
|
*/ |
||||
|
private String nickName; |
||||
|
|
||||
|
/** |
||||
|
* 联系方式 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 身份证号 |
||||
|
*/ |
||||
|
private String idNum; |
||||
|
|
||||
|
/** |
||||
|
* 报名时间yyyy-MM-dd HH:mm:ss |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private Date signUpTime; |
||||
|
|
||||
|
/** |
||||
|
* true: 是志愿者 false : 不是志愿者 |
||||
|
*/ |
||||
|
private Boolean volunteerFlag; |
||||
|
|
||||
|
/** |
||||
|
* 实际参加活动个数 |
||||
|
*/ |
||||
|
private Integer signInActNum; |
||||
|
/** |
||||
|
* 报名活动个数 |
||||
|
*/ |
||||
|
private Integer signUpActNum; |
||||
|
/** |
||||
|
* 获得积分活动个数 |
||||
|
*/ |
||||
|
private Integer obtainPointsActNum; |
||||
|
|
||||
|
/** |
||||
|
* 已处理: handled; 默认"",重新处理时reward_flag置为空字符串 |
||||
|
*/ |
||||
|
private String processFlag; |
||||
|
|
||||
|
/** |
||||
|
* 已签到:signed_in; 默认"" |
||||
|
*/ |
||||
|
private String signInFlag; |
||||
|
|
||||
|
/** |
||||
|
* 已给分:agree, 不给分:deny 默认"" |
||||
|
*/ |
||||
|
private String rewardFlag; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 当前状态(已报名/待审核auditing, |
||||
|
审核通过passed, |
||||
|
审核不通过refused |
||||
|
取消报名canceled, |
||||
|
) |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
|
||||
|
public ActUserResDTO(){ |
||||
|
this.signInActNum=0; |
||||
|
this.signUpActNum=0; |
||||
|
this.obtainPointsActNum=0; |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
alter table act_content MODIFY COLUMN CONTENT_TYPE varchar(32) NOT NULL COMMENT '内容类型 图片:img;文字:text;富文本:rich_text'; |
||||
|
alter table act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容'; |
||||
|
alter table act_info add COLUMN RICH_TEXT_FLAG TINYINT(1) not null DEFAULT '0' COMMENT '1:富文本;0:不是' AFTER SUMMARY_FLAG; |
||||
|
alter table latest_act_info add COLUMN RICH_TEXT_FLAG TINYINT(1) not null DEFAULT '0' COMMENT '1:富文本;0:不是' AFTER AUDIT_SWITCH; |
||||
|
alter table latest_act_content MODIFY COLUMN CONTENT_TYPE varchar(32) NOT NULL COMMENT '内容类型 图片:img;文字:text;富文本:rich_text'; |
||||
|
alter table latest_act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容'; |
||||
|
|
||||
|
alter table act_summary MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '总结内容'; |
||||
|
alter table act_summary MODIFY CONTENT_TYPE VARCHAR(32)not null COMMENT '内容类型 图片:img;文字:text;富文本:rich_text'; |
||||
|
|
||||
|
alter table act_info add COLUMN SPONSOR_PATH VARCHAR(512) comment '主办方全路径包含自身id' AFTER SPONSOR_ID; |
||||
|
alter table latest_act_info add COLUMN SPONSOR_PATH VARCHAR(512) comment '主办方全路径包含自身id' AFTER SPONSOR_ID; |
@ -0,0 +1,4 @@ |
|||||
|
alter table act_info MODIFY COLUMN |
||||
|
`SPONSOR_TEL` varchar(64) NOT NULL COMMENT '联系电话' AFTER SPONSOR_CONTACTS; |
||||
|
|
||||
|
alter table latest_act_info MODIFY COLUMN `SPONSOR_TEL` varchar(64)COMMENT '联系电话' AFTER SPONSOR_CONTACTS; |
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 小区/楼栋/房屋编码辅助表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcOrganizationCodeInfoDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 社区id |
||||
|
*/ |
||||
|
private String communityId; |
||||
|
|
||||
|
/** |
||||
|
* 该社区下最大的小区编码序列号 |
||||
|
*/ |
||||
|
private String neighborMaxNum; |
||||
|
|
||||
|
/** |
||||
|
* 该社区下最大的楼栋编码序列号 |
||||
|
*/ |
||||
|
private String buildingMaxNum; |
||||
|
|
||||
|
/** |
||||
|
* 该社区下最大的房屋编码序列号 |
||||
|
*/ |
||||
|
private String houseMaxNum; |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:06 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HouseInformationFormDTO extends PageFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 2348447479132364176L; |
||||
|
private String customerId; |
||||
|
private String staffId; |
||||
|
private String communityId; |
||||
|
private String gridId; |
||||
|
private String neighborHoodId; |
||||
|
private String buildingId; |
||||
|
private String unitId; |
||||
|
private String name; |
||||
|
private String sort = "1"; |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:49 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class BuildingCountResultDTO { |
||||
|
private String buildingId; |
||||
|
private String buildingName; |
||||
|
private String buildingType; |
||||
|
private Integer unitCount = 0; |
||||
|
private Integer houseCount = 0; |
||||
|
private Integer personCount = 0; |
||||
|
private Integer unitRealCount = 0; |
||||
|
private Integer houseRealCount = 0; |
||||
|
private Integer personRealCount = 0; |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:45 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class BuildingListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -1423424057500044373L; |
||||
|
private String id; |
||||
|
private String name; |
||||
|
private Integer unitCoun = 0; |
||||
|
private Integer houseCount = 0; |
||||
|
private Integer personCount = 0; |
||||
|
private Integer differHouseCount = 0; |
||||
|
private Integer differPersonCount = 0; |
||||
|
private Integer houseRealCount = 0; |
||||
|
private Integer personRealCount = 0; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:24 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class CommunityCountResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -1677303397440121269L; |
||||
|
private String id; |
||||
|
private String name; |
||||
|
private Integer buildingCount = 0; |
||||
|
private Integer houseCount = 0; |
||||
|
private Integer personCount = 0; |
||||
|
private Integer buildingRealCount = 0; |
||||
|
private Integer houseRealCount = 0; |
||||
|
private Integer personRealCount = 0; |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:35 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class GridCountListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -7938740461257344347L; |
||||
|
private String id; |
||||
|
private String name; |
||||
|
private Integer buildingCount = 0; |
||||
|
private Integer houseCount = 0; |
||||
|
private Integer personCount = 0; |
||||
|
private Integer differBuildingCount = 0; |
||||
|
private Integer differHouseCount = 0; |
||||
|
private Integer differPersonCount = 0; |
||||
|
private Integer buildingRealCount = 0; |
||||
|
private Integer houseRealCount = 0; |
||||
|
private Integer personRealCount = 0; |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:37 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class GridStatisticsResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -2022337690871957027L; |
||||
|
private String gridId; |
||||
|
private String gridName; |
||||
|
private Integer buildingCount = 0; |
||||
|
private Integer houseCount = 0; |
||||
|
private Integer personCount = 0; |
||||
|
private Integer buildingRealCount = 0; |
||||
|
private Integer houseRealCount = 0; |
||||
|
private Integer personRealCount = 0; |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 17:00 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class HomeListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -1098032063828430218L; |
||||
|
private String id; |
||||
|
private String name; |
||||
|
private Integer personCount = 0; |
||||
|
private String houseType; |
||||
|
private String houseCode; |
||||
|
} |
@ -0,0 +1,120 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
public class IcBulidingDetailDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
private String buildingId; |
||||
|
|
||||
|
/** |
||||
|
* 组织id |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 小区id |
||||
|
*/ |
||||
|
private String neighborHoodId; |
||||
|
|
||||
|
/** |
||||
|
* 楼栋名称 |
||||
|
*/ |
||||
|
private String buildingName; |
||||
|
|
||||
|
/** |
||||
|
* 楼栋类型 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private BigDecimal sort; |
||||
|
|
||||
|
/** |
||||
|
* 总单元数 |
||||
|
*/ |
||||
|
private Integer totalUnitNum; |
||||
|
|
||||
|
/** |
||||
|
* 总楼层总数 |
||||
|
*/ |
||||
|
private Integer totalFloorNum; |
||||
|
|
||||
|
/** |
||||
|
* 总户数 |
||||
|
*/ |
||||
|
private Integer totalHouseNum; |
||||
|
/** |
||||
|
* 坐标位置 |
||||
|
*/ |
||||
|
|
||||
|
private String coordinatePosition; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 中心点位:经度 |
||||
|
*/ |
||||
|
|
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:纬度 |
||||
|
*/ |
||||
|
|
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 楼长姓名 |
||||
|
*/ |
||||
|
private String buildingLeaderName; |
||||
|
|
||||
|
/** |
||||
|
* 楼长电话 |
||||
|
*/ |
||||
|
private String buildingLeaderMobile; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 楼栋编码 |
||||
|
*/ |
||||
|
private String coding; |
||||
|
|
||||
|
/** |
||||
|
* 实有人口数 |
||||
|
*/ |
||||
|
private Integer realPerson; |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:41 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class NeighborHoodCountResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 4148009467129407023L; |
||||
|
private String neighborHoodId; |
||||
|
private String neighborHoodName; |
||||
|
private Integer buildingCount = 0; |
||||
|
private Integer houseCount = 0; |
||||
|
private Integer personCount = 0; |
||||
|
private Integer buildingRealCount = 0; |
||||
|
private Integer houseRealCount = 0; |
||||
|
private Integer personRealCount = 0; |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:21 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class NeighborHoodListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -5333918463141094854L; |
||||
|
private String id; |
||||
|
private String name; |
||||
|
private Integer buildingCount = 0; |
||||
|
private Integer houseCount = 0; |
||||
|
private Integer personCount = 0; |
||||
|
private Integer differBuildingCount = 0; |
||||
|
private Integer differHouseCount = 0; |
||||
|
private Integer differPersonCount = 0; |
||||
|
private Integer buildingRealCount = 0; |
||||
|
private Integer houseRealCount = 0; |
||||
|
private Integer personRealCount = 0; |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @program: epmet-cloud |
||||
|
* @description:小区-楼栋-房屋编码 |
||||
|
* @author: wangtong |
||||
|
* @create: 2022-06-29 09:51 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class OrganizationCodeResultDTO implements Serializable { |
||||
|
|
||||
|
/** |
||||
|
* 可编辑的楼栋编码 |
||||
|
*/ |
||||
|
private String coding; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 不可编辑的楼栋编码 |
||||
|
*/ |
||||
|
private String sysCoding; |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @program: epmet-cloud |
||||
|
* @description: |
||||
|
* @author: wangtong |
||||
|
* @create: 2022-06-29 10:13 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class OrganizationCommunityDTO implements Serializable { |
||||
|
|
||||
|
private String communityId; |
||||
|
|
||||
|
private String areaCode; |
||||
|
|
||||
|
private String coding; |
||||
|
|
||||
|
private String sysCoding; |
||||
|
|
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:56 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class UnitCountResultDTO { |
||||
|
private String unitId; |
||||
|
private String unitName; |
||||
|
private Integer houseCount = 0; |
||||
|
private Integer personCount = 0; |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:53 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class UnitListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -8750897881106004416L; |
||||
|
private String id; |
||||
|
private String name; |
||||
|
private Integer houseCount = 0; |
||||
|
private Integer personCount = 0; |
||||
|
private Integer differHouseCount = 0; |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.enums; |
||||
|
|
||||
|
public enum OrganizationTypeEnums { |
||||
|
COMM("community","社区"), |
||||
|
NEI("neighbor","小区"), |
||||
|
BUI("building","楼栋"), |
||||
|
UNIT("unit","单元"); |
||||
|
|
||||
|
private String code; |
||||
|
private String name; |
||||
|
|
||||
|
OrganizationTypeEnums(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,291 @@ |
|||||
|
/** |
||||
|
* 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.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
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.dto.form.HouseInformationFormDTO; |
||||
|
import com.epmet.dto.result.*; |
||||
|
import com.epmet.entity.IcNeighborHoodEntity; |
||||
|
import com.epmet.service.*; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 双实信息相关 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-25 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("houseInformation") |
||||
|
public class HouseInformationController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcNeighborHoodService icNeighborHoodService; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcBuildingService icBuildingService; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcBuildingUnitService icBuildingUnitService; |
||||
|
|
||||
|
@Resource |
||||
|
private HouseInformationService houseInformationService; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcOrganizationCodeInfoService icOrganizationCodeInfoService; |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】小区详情 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/28 10:48 |
||||
|
* @params [neighborhoodId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcNeighborHoodDTO> |
||||
|
*/ |
||||
|
@PostMapping("neighborhoodDetail/{neighborhoodId}") |
||||
|
public Result<IcNeighborHoodEntity> neighborhoodDetail(@PathVariable("neighborhoodId") String neighborhoodId){ |
||||
|
return icNeighborHoodService.neighborhoodDetail(neighborhoodId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】楼栋详情 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/28 14:30 |
||||
|
* @params [buildingId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcBuildingDTO> |
||||
|
*/ |
||||
|
@PostMapping("getBuildingDetail/{buildingId}") |
||||
|
public Result<IcBulidingDetailDTO> getBuildingDetail(@PathVariable("buildingId") String buildingId){ |
||||
|
return icBuildingService.getBuildingDetail(buildingId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】单元详情 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/28 15:00 |
||||
|
* @params [unitId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcBuildingUnitDTO> |
||||
|
*/ |
||||
|
@PostMapping("getUnitDetail/{unitId}") |
||||
|
public Result<HouseInfoResultDTO> getUnitDetail(@PathVariable("unitId") String unitId){ |
||||
|
return icBuildingUnitService.getUnitDetail(unitId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】社区录入数据统计 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<CommunityCountResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:32 |
||||
|
*/ |
||||
|
@PostMapping("getCommunityCount") |
||||
|
public Result<CommunityCountResultDTO> getCommunityCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<CommunityCountResultDTO>().ok(houseInformationService.getCommunityCount(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】社区-网格列表 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<PageData<GridCountListResultDTO>>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:42 |
||||
|
*/ |
||||
|
@PostMapping("getGridList") |
||||
|
public Result<PageData<GridCountListResultDTO>> getGridList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<PageData<GridCountListResultDTO>>().ok(houseInformationService.getGridList(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】网格录入数据统计 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<GridStatisticsResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:42 |
||||
|
*/ |
||||
|
@PostMapping("getGridCount") |
||||
|
public Result<GridStatisticsResultDTO> getGridCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<GridStatisticsResultDTO>().ok(houseInformationService.getGridCount(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】网格-小区列表 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<PageData<NeighborHoodListResultDTO>>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:23 |
||||
|
*/ |
||||
|
@PostMapping("getNeighborHoodList") |
||||
|
public Result<PageData<NeighborHoodListResultDTO>> getNeighborHoodList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<PageData<NeighborHoodListResultDTO>>().ok(houseInformationService.getNeighborHoodList(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】小区录入数据统计 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<NeighborHoodCountResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:44 |
||||
|
*/ |
||||
|
@PostMapping("getNeighborHoodCount") |
||||
|
public Result<NeighborHoodCountResultDTO> getNeighborHoodCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<NeighborHoodCountResultDTO>().ok(houseInformationService.getNeighborHoodCount(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】小区-楼栋列表 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<PageData<BuildingListResultDTO>>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:47 |
||||
|
*/ |
||||
|
@PostMapping("getBuildingList") |
||||
|
public Result<PageData<BuildingListResultDTO>> getBuildingList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<PageData<BuildingListResultDTO>>().ok(houseInformationService.getBuildingList(formDTO)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】楼栋录入数据统计 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<BuildingCountResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:51 |
||||
|
*/ |
||||
|
@PostMapping("getBuildingCount") |
||||
|
public Result<BuildingCountResultDTO> getBuildingCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<BuildingCountResultDTO>().ok(houseInformationService.getBuildingCount(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】楼栋-单元列表 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<PageData<UnitListResultDTO>>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:55 |
||||
|
*/ |
||||
|
@PostMapping("getUnitList") |
||||
|
public Result<PageData<UnitListResultDTO>> getUnitList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<PageData<UnitListResultDTO>>().ok(houseInformationService.getUnitList(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】单元录入数据统计 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<UnitCountResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:57 |
||||
|
*/ |
||||
|
@PostMapping("getUnitCount") |
||||
|
public Result<UnitCountResultDTO> getUnitCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<UnitCountResultDTO>().ok(houseInformationService.getUnitCount(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】单元-房屋列表 |
||||
|
* |
||||
|
* @Param tokenDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<PageData<HomeListResultDTO>>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 17:02 |
||||
|
*/ |
||||
|
@PostMapping("getHouseList") |
||||
|
public Result<PageData<HomeListResultDTO>> getHouseList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDTO.getUserId()); |
||||
|
return new Result<PageData<HomeListResultDTO>>().ok(houseInformationService.getHouseList(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】获取小区编码 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/29 9:59 |
||||
|
* @params [tokenDTO, gridId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO> |
||||
|
*/ |
||||
|
@PostMapping("getNeighborHoodCoding/{gridId}") |
||||
|
public Result<OrganizationCodeResultDTO> getNeighborHoodCoding(@LoginUser TokenDto tokenDTO, @PathVariable("gridId") String gridId) { |
||||
|
return icOrganizationCodeInfoService.getNeighborHoodCoding(tokenDTO.getCustomerId(),gridId,false); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】获取楼栋编码 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/29 9:59 |
||||
|
* @params [tokenDTO, neighborhoodId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO> |
||||
|
*/ |
||||
|
@PostMapping("getBuildingCoding/{neighborhoodId}") |
||||
|
public Result<OrganizationCodeResultDTO> getBuildingCoding(@LoginUser TokenDto tokenDTO, @PathVariable("neighborhoodId") String neighborhoodId) { |
||||
|
return icOrganizationCodeInfoService.getBuildingCoding(tokenDTO.getCustomerId(),neighborhoodId,false); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】获取房屋编码 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/29 9:59 |
||||
|
* @params [tokenDTO, unitId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO> |
||||
|
*/ |
||||
|
@PostMapping("getHouseCoding/{unitId}") |
||||
|
public Result<OrganizationCodeResultDTO> getHouseCoding(@LoginUser TokenDto tokenDTO, @PathVariable("unitId") String unitId) { |
||||
|
return icOrganizationCodeInfoService.getHouseCoding(tokenDTO.getCustomerId(),unitId,false); |
||||
|
} |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
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.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.dto.IcOrganizationCodeInfoDTO; |
||||
|
import com.epmet.excel.IcOrganizationCodeInfoExcel; |
||||
|
import com.epmet.service.IcOrganizationCodeInfoService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 小区/楼栋/房屋编码辅助表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-27 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icOrganizationCodeInfo") |
||||
|
public class IcOrganizationCodeInfoController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcOrganizationCodeInfoService icOrganizationCodeInfoService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcOrganizationCodeInfoDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcOrganizationCodeInfoDTO> page = icOrganizationCodeInfoService.page(params); |
||||
|
return new Result<PageData<IcOrganizationCodeInfoDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcOrganizationCodeInfoDTO> get(@PathVariable("id") String id){ |
||||
|
IcOrganizationCodeInfoDTO data = icOrganizationCodeInfoService.get(id); |
||||
|
return new Result<IcOrganizationCodeInfoDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody IcOrganizationCodeInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
icOrganizationCodeInfoService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcOrganizationCodeInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icOrganizationCodeInfoService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icOrganizationCodeInfoService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<IcOrganizationCodeInfoDTO> list = icOrganizationCodeInfoService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, IcOrganizationCodeInfoExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,63 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcOrganizationCodeInfoEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* 小区/楼栋/房屋编码辅助表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-27 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcOrganizationCodeInfoDao extends BaseDao<IcOrganizationCodeInfoEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @describe: 通过客户id和社区id查询 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/29 10:24 |
||||
|
* @params [customerId, communityId] |
||||
|
* @return com.epmet.entity.IcOrganizationCodeInfoEntity |
||||
|
*/ |
||||
|
IcOrganizationCodeInfoEntity selectByIdAndType(@Param("customerId") String customerId, |
||||
|
@Param("sysId") String sysId, |
||||
|
@Param("sysType") String sysType); |
||||
|
|
||||
|
/** |
||||
|
* @describe: 根据客户id和社区id更新小区编号 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/29 10:53 |
||||
|
* @params [communEntity] |
||||
|
* @return void |
||||
|
*/ |
||||
|
void updateMaxNumByIdAndType(IcOrganizationCodeInfoEntity communEntity); |
||||
|
|
||||
|
// /**
|
||||
|
// * @describe: 根据客户id和社区id更新楼栋编号
|
||||
|
// * @author wangtong
|
||||
|
// * @date 2022/6/29 14:51
|
||||
|
// * @params [buildingEntity]
|
||||
|
// * @return void
|
||||
|
// */
|
||||
|
// void updateBuildingByCuIdAndCoId(IcOrganizationCodeInfoEntity buildingEntity);
|
||||
|
//
|
||||
|
// /**
|
||||
|
// * @describe: 根据客户id和社区id更新单元编号
|
||||
|
// * @author wangtong
|
||||
|
// * @date 2022/6/29 15:01
|
||||
|
// * @params [unitEntity]
|
||||
|
// * @return void
|
||||
|
// */
|
||||
|
// void updateUnitByCuIdAndCoId(IcOrganizationCodeInfoEntity unitEntity);
|
||||
|
//
|
||||
|
// /**
|
||||
|
// * @describe: 根据客户id和社区id更新房屋编号
|
||||
|
// * @author wangtong
|
||||
|
// * @date 2022/6/29 15:25
|
||||
|
// * @params [houseEntity]
|
||||
|
// * @return void
|
||||
|
// */
|
||||
|
// void updateHouseByCuIdAndCoId(IcOrganizationCodeInfoEntity houseEntity);
|
||||
|
} |
@ -0,0 +1,45 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* 小区/楼栋/房屋编码辅助表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_organization_code_info") |
||||
|
public class IcOrganizationCodeInfoEntity{ |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 社区/小区/楼栋/单元id |
||||
|
*/ |
||||
|
private String sysId; |
||||
|
|
||||
|
/** |
||||
|
* 类型: |
||||
|
* 社区community |
||||
|
* 小区neighbor |
||||
|
* 楼栋building |
||||
|
* 单元unit |
||||
|
*/ |
||||
|
private String sysType; |
||||
|
|
||||
|
/** |
||||
|
* 最大数 |
||||
|
*/ |
||||
|
private String maxNum; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 小区/楼栋/房屋编码辅助表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcOrganizationCodeInfoExcel { |
||||
|
|
||||
|
@Excel(name = "客户id") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "社区id") |
||||
|
private String communityId; |
||||
|
|
||||
|
@Excel(name = "该社区下最大的小区编码序列号") |
||||
|
private String neighborMaxNum; |
||||
|
|
||||
|
@Excel(name = "该社区下最大的楼栋编码序列号") |
||||
|
private String buildingMaxNum; |
||||
|
|
||||
|
@Excel(name = "该社区下最大的房屋编码序列号") |
||||
|
private String houseMaxNum; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 小区/楼栋/房屋编码辅助表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-27 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class IcOrganizationCodeInfoRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,112 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.form.HouseInformationFormDTO; |
||||
|
import com.epmet.dto.result.*; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:14 |
||||
|
*/ |
||||
|
public interface HouseInformationService { |
||||
|
/** |
||||
|
* 【双实录入】社区录入数据统计 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link CommunityCountResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:31 |
||||
|
*/ |
||||
|
CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】社区-网格列表 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<GridCountListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:41 |
||||
|
*/ |
||||
|
PageData<GridCountListResultDTO> getGridList(HouseInformationFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】网格录入数据统计 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link GridStatisticsResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:41 |
||||
|
*/ |
||||
|
GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】网格-小区列表 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<NeighborHoodListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:24 |
||||
|
*/ |
||||
|
PageData<NeighborHoodListResultDTO> getNeighborHoodList(HouseInformationFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】小区录入数据统计 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link NeighborHoodCountResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:43 |
||||
|
*/ |
||||
|
NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】小区-楼栋列表 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<BuildingListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:47 |
||||
|
*/ |
||||
|
PageData<BuildingListResultDTO> getBuildingList(HouseInformationFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】楼栋录入数据统计 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link BuildingCountResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:50 |
||||
|
*/ |
||||
|
BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】楼栋-单元列表 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<UnitListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:54 |
||||
|
*/ |
||||
|
PageData<UnitListResultDTO> getUnitList(HouseInformationFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】单元录入数据统计 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link UnitCountResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:57 |
||||
|
*/ |
||||
|
UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】单元-房屋列表 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<HomeListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 17:01 |
||||
|
*/ |
||||
|
PageData<HomeListResultDTO> getHouseList(HouseInformationFormDTO formDTO); |
||||
|
} |
@ -0,0 +1,116 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.IcOrganizationCodeInfoDTO; |
||||
|
import com.epmet.dto.result.OrganizationCodeResultDTO; |
||||
|
import com.epmet.entity.IcOrganizationCodeInfoEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 小区/楼栋/房屋编码辅助表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-06-27 |
||||
|
*/ |
||||
|
public interface IcOrganizationCodeInfoService extends BaseService<IcOrganizationCodeInfoEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcOrganizationCodeInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-06-27 |
||||
|
*/ |
||||
|
PageData<IcOrganizationCodeInfoDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcOrganizationCodeInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-06-27 |
||||
|
*/ |
||||
|
List<IcOrganizationCodeInfoDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcOrganizationCodeInfoDTO |
||||
|
* @author generator |
||||
|
* @date 2022-06-27 |
||||
|
*/ |
||||
|
IcOrganizationCodeInfoDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-27 |
||||
|
*/ |
||||
|
void save(IcOrganizationCodeInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-27 |
||||
|
*/ |
||||
|
void update(IcOrganizationCodeInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-06-27 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】获取小区编码 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/29 9:59 |
||||
|
* @params [tokenDTO, gridId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO> |
||||
|
*/ |
||||
|
Result<OrganizationCodeResultDTO> getNeighborHoodCoding(String customerId, String gridId,Boolean updateFlag); |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】获取楼栋编码 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/29 9:59 |
||||
|
* @params [tokenDTO, neighborhoodId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO> |
||||
|
*/ |
||||
|
Result<OrganizationCodeResultDTO> getBuildingCoding(String customerId, String neighborhoodId,Boolean updateFlag); |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】获取单元编码 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/29 9:59 |
||||
|
* @params [tokenDTO, neighborhoodId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO> |
||||
|
*/ |
||||
|
Result<OrganizationCodeResultDTO> getUnitCoding(String customerId, String buildingId,Boolean updateFlag); |
||||
|
|
||||
|
/** |
||||
|
* @describe: 【双实录入】获取房屋编码 |
||||
|
* @author wangtong |
||||
|
* @date 2022/6/29 9:59 |
||||
|
* @params [tokenDTO, unitId] |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO> |
||||
|
*/ |
||||
|
Result<OrganizationCodeResultDTO> getHouseCoding(String customerId, String unitId,Boolean updateFlag); |
||||
|
} |
@ -0,0 +1,405 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
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.Result; |
||||
|
import com.epmet.dao.CustomerAgencyDao; |
||||
|
import com.epmet.dao.IcNeighborHoodDao; |
||||
|
import com.epmet.dto.form.HouseInformationFormDTO; |
||||
|
import com.epmet.dto.form.IcUserCountFormDTO; |
||||
|
import com.epmet.dto.result.*; |
||||
|
import com.epmet.entity.CustomerAgencyEntity; |
||||
|
import com.epmet.enums.BuildingTypeEnums; |
||||
|
import com.epmet.enums.HouseRentFlagEnums; |
||||
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
||||
|
import com.epmet.service.HouseInformationService; |
||||
|
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.stereotype.Service; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.Collections; |
||||
|
import java.util.Comparator; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:14 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class HouseInformationServiceImpl implements HouseInformationService { |
||||
|
|
||||
|
@Resource |
||||
|
private IcNeighborHoodDao icNeighborHoodDao; |
||||
|
@Resource |
||||
|
private CustomerAgencyDao customerAgencyDao; |
||||
|
@Resource |
||||
|
private EpmetUserOpenFeignClient userOpenFeignClient; |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】社区录入数据统计 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link CommunityCountResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:31 |
||||
|
*/ |
||||
|
@Override |
||||
|
public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) { |
||||
|
if (StringUtils.isEmpty(formDTO.getCommunityId())) { |
||||
|
//获取工作人员所属组织
|
||||
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
||||
|
if(null == staffInfo) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败"); |
||||
|
} |
||||
|
formDTO.setCommunityId(staffInfo.getAgencyId()); |
||||
|
} |
||||
|
String orgName; |
||||
|
CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId()); |
||||
|
if (null == agency) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在"); |
||||
|
} |
||||
|
CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid()); |
||||
|
if (null == parentAgency) { |
||||
|
orgName = agency.getOrganizationName(); |
||||
|
} else { |
||||
|
orgName = parentAgency.getOrganizationName() + agency.getOrganizationName(); |
||||
|
} |
||||
|
//获取工作人员信息
|
||||
|
CommunityCountResultDTO result = icNeighborHoodDao.getCommunityCount(formDTO); |
||||
|
result.setId(agency.getId()); |
||||
|
result.setName(orgName); |
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.ZERO_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getCommunityId()); |
||||
|
countFormDTO.setType(NumConstant.ZERO_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
if (map.containsKey(formDTO.getCommunityId())) { |
||||
|
result.setPersonCount(map.get(formDTO.getCommunityId())); |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】社区-网格列表 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<GridCountListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:41 |
||||
|
*/ |
||||
|
@Override |
||||
|
public PageData<GridCountListResultDTO> getGridList(HouseInformationFormDTO formDTO) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
List<GridCountListResultDTO> list = icNeighborHoodDao.getGridList(formDTO); |
||||
|
PageInfo<GridCountListResultDTO> pageInfo = new PageInfo<>(list); |
||||
|
if (CollectionUtils.isNotEmpty(list)) { |
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.ZERO_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getCommunityId()); |
||||
|
countFormDTO.setType(NumConstant.ONE_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
|
||||
|
list.forEach(item -> { |
||||
|
if (map.containsKey(item.getId())) { |
||||
|
item.setPersonCount(map.get(item.getId())); |
||||
|
} |
||||
|
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); |
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
return new PageData<>(list, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】网格录入数据统计 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link GridStatisticsResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 15:41 |
||||
|
*/ |
||||
|
@Override |
||||
|
public GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO) { |
||||
|
GridStatisticsResultDTO result = icNeighborHoodDao.getGridCount(formDTO); |
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.ONE_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getGridId()); |
||||
|
countFormDTO.setType(NumConstant.ZERO_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
if (map.containsKey(formDTO.getGridId())) { |
||||
|
result.setPersonCount(map.get(formDTO.getGridId())); |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】网格-小区列表 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<NeighborHoodListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:24 |
||||
|
*/ |
||||
|
@Override |
||||
|
public PageData<NeighborHoodListResultDTO> getNeighborHoodList(HouseInformationFormDTO formDTO) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
List<NeighborHoodListResultDTO> list = icNeighborHoodDao.getNeighborHoodList(formDTO); |
||||
|
PageInfo<NeighborHoodListResultDTO> pageInfo = new PageInfo<>(list); |
||||
|
if (CollectionUtils.isNotEmpty(list)) { |
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.ONE_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getGridId()); |
||||
|
countFormDTO.setType(NumConstant.ONE_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
list.forEach(item -> { |
||||
|
if (map.containsKey(item.getId())) { |
||||
|
item.setPersonCount(map.get(item.getId())); |
||||
|
} |
||||
|
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); |
||||
|
}); |
||||
|
} |
||||
|
return new PageData<>(list, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】小区录入数据统计 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link NeighborHoodCountResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:43 |
||||
|
*/ |
||||
|
@Override |
||||
|
public NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO) { |
||||
|
NeighborHoodCountResultDTO result = icNeighborHoodDao.getNeighborHoodCount(formDTO); |
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.TWO_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getNeighborHoodId()); |
||||
|
countFormDTO.setType(NumConstant.ZERO_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
if (map.containsKey(formDTO.getNeighborHoodId())) { |
||||
|
result.setPersonCount(map.get(formDTO.getNeighborHoodId())); |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】小区-楼栋列表 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<BuildingListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:47 |
||||
|
*/ |
||||
|
@Override |
||||
|
public PageData<BuildingListResultDTO> getBuildingList(HouseInformationFormDTO formDTO) { |
||||
|
List<BuildingListResultDTO> list; |
||||
|
long total = 0; |
||||
|
|
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.TWO_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getNeighborHoodId()); |
||||
|
countFormDTO.setType(NumConstant.ONE_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
|
||||
|
if (!NumConstant.FIVE_STR.equals(formDTO.getSort())) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
list = icNeighborHoodDao.getBuildingList(formDTO); |
||||
|
PageInfo<BuildingListResultDTO> pageInfo = new PageInfo<>(list); |
||||
|
total = pageInfo.getTotal(); |
||||
|
|
||||
|
if (CollectionUtils.isNotEmpty(list)) { |
||||
|
list.forEach(item -> { |
||||
|
if (map.containsKey(item.getId())) { |
||||
|
item.setPersonCount(map.get(item.getId())); |
||||
|
} |
||||
|
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); |
||||
|
}); |
||||
|
} |
||||
|
} else { |
||||
|
list = icNeighborHoodDao.getBuildingList(formDTO); |
||||
|
if (CollectionUtils.isNotEmpty(list)) { |
||||
|
total = list.size(); |
||||
|
list.forEach(item -> { |
||||
|
if (map.containsKey(item.getId())) { |
||||
|
item.setPersonCount(map.get(item.getId())); |
||||
|
} |
||||
|
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); |
||||
|
}); |
||||
|
|
||||
|
//排序
|
||||
|
list = list.stream().sorted(Comparator.comparing(BuildingListResultDTO::getDifferPersonCount).reversed()).collect(Collectors.toList()); |
||||
|
//分页
|
||||
|
list = list.stream().skip((long)(formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
return new PageData<>(list, total); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】楼栋录入数据统计 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link BuildingCountResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:50 |
||||
|
*/ |
||||
|
@Override |
||||
|
public BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO) { |
||||
|
BuildingCountResultDTO result = icNeighborHoodDao.getBuildingCount(formDTO); |
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.THREE_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getBuildingId()); |
||||
|
countFormDTO.setType(NumConstant.ZERO_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
if (map.containsKey(formDTO.getBuildingId())) { |
||||
|
result.setPersonCount(map.get(formDTO.getBuildingId())); |
||||
|
} |
||||
|
result.setBuildingType(BuildingTypeEnums.getTypeValue(result.getBuildingType())); |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】楼栋-单元列表 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<UnitListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:54 |
||||
|
*/ |
||||
|
@Override |
||||
|
public PageData<UnitListResultDTO> getUnitList(HouseInformationFormDTO formDTO) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
List<UnitListResultDTO> list = icNeighborHoodDao.getUnitList(formDTO); |
||||
|
PageInfo<UnitListResultDTO> pageInfo = new PageInfo<>(list); |
||||
|
if (CollectionUtils.isNotEmpty(list)) { |
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.THREE_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getBuildingId()); |
||||
|
countFormDTO.setType(NumConstant.ONE_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
list.forEach(item -> { |
||||
|
if (map.containsKey(item.getId())) { |
||||
|
item.setPersonCount(map.get(item.getId())); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
return new PageData<>(list, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】单元录入数据统计 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link UnitCountResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 16:57 |
||||
|
*/ |
||||
|
@Override |
||||
|
public UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO) { |
||||
|
UnitCountResultDTO result = icNeighborHoodDao.getUnitCount(formDTO); |
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.FOUR_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getUnitId()); |
||||
|
countFormDTO.setType(NumConstant.ZERO_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
if (map.containsKey(formDTO.getUnitId())) { |
||||
|
result.setPersonCount(map.get(formDTO.getUnitId())); |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【双实录入】单元-房屋列表 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @Param formDTO |
||||
|
* @Return {@link PageData<HomeListResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/6/28 17:01 |
||||
|
*/ |
||||
|
@Override |
||||
|
public PageData<HomeListResultDTO> getHouseList(HouseInformationFormDTO formDTO) { |
||||
|
List<HomeListResultDTO> list = null; |
||||
|
long total = 0; |
||||
|
//获取录入人口数
|
||||
|
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); |
||||
|
countFormDTO.setOrgType(NumConstant.FOUR_STR); |
||||
|
countFormDTO.setOrgId(formDTO.getUnitId()); |
||||
|
countFormDTO.setType(NumConstant.ONE_STR); |
||||
|
Map<String, Integer> map = getMapResult(countFormDTO); |
||||
|
|
||||
|
if (!NumConstant.TWO_STR.equals(formDTO.getSort())) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
list = icNeighborHoodDao.getHouseList(formDTO); |
||||
|
PageInfo<HomeListResultDTO> pageInfo = new PageInfo<>(list); |
||||
|
total = pageInfo.getTotal(); |
||||
|
if (CollectionUtils.isNotEmpty(list)) { |
||||
|
list.forEach(item -> { |
||||
|
item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); |
||||
|
if (map.containsKey(item.getId())) { |
||||
|
item.setPersonCount(map.get(item.getId())); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} else { |
||||
|
list = icNeighborHoodDao.getHouseList(formDTO); |
||||
|
if (CollectionUtils.isNotEmpty(list)) { |
||||
|
total = list.size(); |
||||
|
list.forEach(item -> { |
||||
|
item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); |
||||
|
if (map.containsKey(item.getId())) { |
||||
|
item.setPersonCount(map.get(item.getId())); |
||||
|
} |
||||
|
}); |
||||
|
//排序
|
||||
|
list = list.stream().sorted(Comparator.comparing(HomeListResultDTO::getPersonCount).reversed()).collect(Collectors.toList()); |
||||
|
//分页
|
||||
|
list = list.stream().skip((long)(formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return new PageData<>(list, total); |
||||
|
} |
||||
|
|
||||
|
private Map<String, Integer> getMapResult(IcUserCountFormDTO countFormDTO) { |
||||
|
Result<Map<String, Integer>> result = userOpenFeignClient.getIcUserCount(countFormDTO); |
||||
|
if (!result.success()) { |
||||
|
log.warn("查询录入人数失败"); |
||||
|
return Collections.emptyMap(); |
||||
|
} |
||||
|
return result.getData(); |
||||
|
} |
||||
|
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue