Merge remote-tracking branch 'origin/test' into test
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventVisitingTasksApi.java
# springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
# springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventVisitingTasksServiceImpl.java
| | |
| | | return item.getCode(); |
| | | } |
| | | } |
| | | return -1; |
| | | return 0; |
| | | } |
| | | |
| | | public static String getCnDescByName(Integer code) { |
| | |
| | | if(StringUtils.isNotEmpty(oneData.get(27))){ |
| | | vo.setHouseHold(oneData.get(27).trim()); |
| | | } |
| | | for (int i = 28; i < headSize; i++) { |
| | | if(StringUtils.isEmpty(oneData.get(28))){ |
| | | vo.setIsResidence(0); |
| | | }else{ |
| | | vo.setIsResidence(PopulIsOkEnum.getCodeByName(oneData.get(28).trim())); |
| | | } |
| | | for (int i = 29; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0,headData.get(i).indexOf("("))); |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author xyh |
| | | * @date 2021/6/28 16:30 |
| | | */ |
| | | @ApiModel("id参数") |
| | | public class IdDTO { |
| | | |
| | | @NotNull(message = "id不能为空") |
| | | @ApiModelProperty("id") |
| | | private String id; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value="查询结束时间") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value="发布类型 1 图文 2 投票") |
| | | @ApiModelProperty(value="活动状态 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消") |
| | | private Integer type; |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 向房屋添加人员请求参数 |
| | | * |
| | | * @author lyq |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("向房屋添加人员请求参数") |
| | | public class AddComMngHousePopulationDTO { |
| | | |
| | | @ApiModelProperty(value = "房屋id",required = true) |
| | | private Long houseId; |
| | | |
| | | @ApiModelProperty(value = "人员id集合",required = true) |
| | | private List<Long> populationIds; |
| | | |
| | | @ApiModelProperty(value = "添加类型(1.户主 2.住户)",required = true) |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 添加类型(1.户主 2.住户) |
| | | */ |
| | | public interface type{ |
| | | int hz = 1; |
| | | int zh = 2; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import com.google.common.base.CaseFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.Pattern; |
| | | |
| | | /** |
| | | * 小区列表-请求参数 |
| | | * |
| | | * @author lyq |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("小区列表-请求参数") |
| | | public class ComMngVillageListAppDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "小区名称") |
| | | private String name; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "社区id", hidden = true, example = "1") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "排序字段, 默认 创建时间:createAt(在住居民数:userSum,楼栋数:buildSum,总户数:houseNum,户籍人口:registerNum)", example = "createAt") |
| | | private String sortAttr="createAt"; |
| | | |
| | | @ApiModelProperty(value = "排序方式: asc/desc(默认)", example = "desc") |
| | | @Pattern(regexp = "asc|desc|ASC|DESC") |
| | | private String sortType="desc"; |
| | | |
| | | public String getSortColumns(){ |
| | | // String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr); |
| | | return sortAttr; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 向房屋删除人员请求参数 |
| | | * |
| | | * @author lyq |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("向房屋删除人员请求参数") |
| | | public class DelComMngHousePopulationDTO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "房屋人员关联id",required = true) |
| | | private Long housePopulationId; |
| | | |
| | | @ApiModelProperty(value = "添加类型(1.户主 2.住户)",required = true) |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 添加类型(1.户主 2.住户) |
| | | */ |
| | | public interface type{ |
| | | int hz = 1; |
| | | int zh = 2; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 分页查询表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("查询人员列表请求参数") |
| | | public class PageComMngPopulationDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | |
| | | /** |
| | | * 小区楼栋下房屋列表-请求参数 |
| | | * |
| | | * @author lyq |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("小区楼栋下房屋列表-请求参数") |
| | | public class PageComMngVillageBuildHouseAppDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "小区id",required = true) |
| | | private Long villageId; |
| | | |
| | | @ApiModelProperty(value = "楼栋号",required = true) |
| | | private String floor; |
| | | |
| | | @ApiModelProperty(value = "单元号",required = true) |
| | | private String unitNo; |
| | | |
| | | @ApiModelProperty(value = "户室号") |
| | | private String houseNo; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid.admin; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | |
| | | /** |
| | | * 居民列表-请求参数 |
| | | * |
| | | * @author lyq |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("居民列表-请求参数") |
| | | public class ComMngPopulationListDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "走访状态(1待走访2已走访3待验证5已撤销)") |
| | | private Integer eventStatus; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "人员标签", hidden = false, example = "") |
| | | private String label; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "性别 1.男 2.女", hidden = false, example = "1") |
| | | private Integer sex; |
| | | |
| | | @Max(10) |
| | | @ApiModelProperty("政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)") |
| | | private Integer politicalOutlook; |
| | | |
| | | @Max(2) |
| | | @ApiModelProperty("关联实有房屋(1.是 2.否)") |
| | | private Integer isHouse; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "关键词", hidden = false, example = "") |
| | | private String keyWord; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "社区id", hidden = true, example = "1") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | } |
| | |
| | | private Integer eventStatus; |
| | | |
| | | @ApiModelProperty("人员标签") |
| | | private Integer tag; |
| | | private String tag; |
| | | |
| | | @ApiModelProperty("是否异常") |
| | | private Integer isExp; |
| | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("人员标签") |
| | | private Integer tag; |
| | | private String tag; |
| | | |
| | | @ApiModelProperty("性别") |
| | | private Integer sex; |
| | |
| | | */ |
| | | private List<String> userTagStr = Lists.newArrayList(); |
| | | |
| | | private Long houseId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 小区下楼栋单元房间详情返回参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("小区下楼栋单元房间详情返回参数") |
| | | public class ComMngVillageBuildingHouseDetailVO { |
| | | |
| | | @ApiModelProperty("房屋id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("小区名称") |
| | | private String villageName; |
| | | |
| | | @ApiModelProperty("楼栋号") |
| | | private String floor; |
| | | |
| | | @ApiModelProperty("单元号") |
| | | private String unitNo; |
| | | |
| | | @ApiModelProperty("楼层数") |
| | | private String buildingNum; |
| | | |
| | | @ApiModelProperty("户室号") |
| | | private String houseNo; |
| | | |
| | | @ApiModelProperty("房屋地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("房屋状态(1.自住 2.租住 3.其他)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lng; |
| | | |
| | | @ApiModelProperty("户主列表") |
| | | private List<PopulationListVO> householderList; |
| | | |
| | | @ApiModelProperty("居民列表") |
| | | private List<PopulationListVO> populationList; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 小区下楼栋单元列表返回参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("小区下楼栋单元房间列表返回参数") |
| | | public class ComMngVillageBuildingHouseVO { |
| | | |
| | | @ApiModelProperty("房屋id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("户室号") |
| | | private String houseNo; |
| | | |
| | | @ApiModelProperty("房屋状态(1.自住 2.租住 3.其他)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("在住居民数") |
| | | private Integer userNum; |
| | | |
| | | @ApiModelProperty("楼层数") |
| | | private String buildingNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 小区下楼栋单元列表返回参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("小区下楼栋单元列表返回参数") |
| | | public class ComMngVillageBuildingVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | private Long villageId; |
| | | |
| | | @ApiModelProperty("楼栋号") |
| | | private String floor; |
| | | |
| | | @ApiModelProperty("单元号") |
| | | private String unitNo; |
| | | |
| | | @ApiModelProperty("拼接好楼栋号") |
| | | private String floorString; |
| | | |
| | | @ApiModelProperty("拼接好单元号") |
| | | private String unitNoString; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 居民管理-列表返回参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("居民管理列表返回参数") |
| | | @EncryptDecryptClass |
| | | public class PageComMngVillageVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long villageId; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("楼栋数") |
| | | private Integer buildSum; |
| | | |
| | | @ApiModelProperty("地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("用户数") |
| | | private Integer userSum; |
| | | |
| | | @ApiModelProperty("房屋数") |
| | | private Integer houseNum; |
| | | |
| | | @ApiModelProperty("户籍人口数") |
| | | private Integer registerNum; |
| | | |
| | | @ApiModelProperty("租户数量") |
| | | private Integer rentNum; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lng; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "性别(1.男 2.女)") |
| | | private String sex; |
| | | |
| | | @ApiModelProperty(value = "时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "房屋人口关联id") |
| | | private Long housePopulationId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid.admin; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 居民管理-列表返回参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("居民管理列表返回参数") |
| | | @EncryptDecryptClass |
| | | public class ComMngPopulationListVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("标签") |
| | | private String label; |
| | | |
| | | @ApiModelProperty("走访时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "身份证号码") |
| | | @EncryptDecryptField |
| | | private String cardNo; |
| | | |
| | | @ApiModelProperty(value = "性别(1.男 2.女)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "现居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)") |
| | | private Integer politicalOutlook; |
| | | |
| | | @ApiModelProperty("联系方式") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("关联实有房屋(0.否 1.是)") |
| | | private String isHouse; |
| | | |
| | | @ApiModelProperty(value = "走访状态(1待走访2已走访3待验证5已撤销)") |
| | | private Integer eventStatus; |
| | | |
| | | @ApiModelProperty(value = "户口所在地") |
| | | private String censusRegister; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "是否是户主(1.是 2.否)") |
| | | private Integer isRelation; |
| | | |
| | | @ApiModelProperty(value = "居住地房屋id") |
| | | private Long houseId; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.screen; |
| | | |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty("实有人口文化程度统计") |
| | | private List<ComActPopulationCultureVO> cultureGroup; |
| | | |
| | | @ApiModelProperty("大屏网格数据") |
| | | private List<EventGridStatisticsVO> gridStatisticsList; |
| | | |
| | | @ApiModelProperty("小区列表数据") |
| | | private List<CivilVillageStatisticsVO> villageStatisticsList; |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.visit; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.enums.EventTasksStatusEnum; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | |
| | | private static final long serialVersionUID = -5758072851661612412L; |
| | | |
| | | @ApiModelProperty("id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("需走访人id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long visiterId; |
| | | |
| | | @ApiModelProperty("需走访人姓名") |
| | | private String visiterName; |
| | | |
| | | @ApiModelProperty("网格员id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMember; |
| | | |
| | | @ApiModelProperty("网格员") |
| | | private String gridMemberName; |
| | | |
| | | @ApiModelProperty("处理人id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long dellUserId; |
| | | |
| | | @ApiModelProperty("处理人") |
| | |
| | | package com.panzhihua.common.model.vos.visit; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.enums.EventTasksStatusEnum; |
| | | import com.panzhihua.common.enums.EventTasksVisitorTypeEnum; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | public class EventVisitListVO { |
| | | |
| | | @ApiModelProperty("id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("真实姓名") |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.model.dtos.EventResourceDTO; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | |
| | | public class EventVisitingTasksDetailsVO { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "网格员所处的街道") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMemberStreet; |
| | | |
| | | @ApiModelProperty(value = "网格员所处社区") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMemberCommunity; |
| | | |
| | | @ApiModelProperty(value = "网格员") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMember; |
| | | |
| | | @ApiModelProperty(value = "网格员名字") |
| | |
| | | private String gridMenberTele; |
| | | |
| | | @ApiModelProperty(value = "需走访人ID") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long visiterId; |
| | | |
| | | @ApiModelProperty(value = "需走访人名字") |
| | |
| | | private Integer dellType; |
| | | |
| | | @ApiModelProperty(value = "处理人ID") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long dellUserId; |
| | | |
| | | @ApiModelProperty(value = "处理人名称") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date dellDate; |
| | | |
| | | @ApiModelProperty(value = "解决人针对解决事件的处理描述") |
| | | @ApiModelProperty(value = "异常描述") |
| | | private String dellDesc; |
| | | |
| | | @ApiModelProperty(value = "是否有效") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date submitDate; |
| | | |
| | | @ApiModelProperty(value = "是否异常行为") |
| | | @ApiModelProperty(value = "是否异常行为:0否,1是") |
| | | private Boolean exception; |
| | | |
| | | @ApiModelProperty(value = "走访内容根据重点人员类型输入项不同,录入全部的表单内容数据") |
| | | private JSONObject tableContentJson; |
| | | |
| | | @ApiModelProperty(value = "创建人") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "创建事件") |
| | |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "修改人") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | |
| | | @ApiModelProperty(value = "视频列表") |
| | | List<EventResourceDTO> videoList; |
| | | |
| | | @ApiModelProperty(value = "家庭联系方式") |
| | | private String familyPhone; |
| | | |
| | | @ApiModelProperty(value = "生活来源") |
| | | private String familySource; |
| | | |
| | | @ApiModelProperty(value = "地址备注") |
| | | private String addressRemark; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("异常选择") |
| | | private String option; |
| | | |
| | | @ApiModelProperty("走访后的经纬度(,隔开)") |
| | | private String latLng; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.visit; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.enums.EventTasksStatusEnum; |
| | | import com.panzhihua.common.enums.EventTasksVisitorTypeEnum; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | |
| | | * */ |
| | | @Data |
| | | @ApiModel("重点人群走访记录返回参数") |
| | | @ExcelIgnoreUnannotated |
| | | @EncryptDecryptClass |
| | | public class EventVisitingTasksVO { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ExcelProperty(value = "序号",index = 0) |
| | | private Integer rowNum; |
| | | // @ExcelProperty(value = "序号",index = 0) |
| | | // private Integer rowNum; |
| | | |
| | | @ExcelProperty(value = "创建时间",index = 1) |
| | | @ExcelProperty(value = "创建时间",index = 0) |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ExcelProperty(value = "创建人",index = 2) |
| | | @ExcelProperty(value = "创建人",index = 1) |
| | | @ApiModelProperty(value = "创建人") |
| | | private String creator; |
| | | |
| | | @ExcelProperty(value = "走访对象",index = 3) |
| | | @ExcelProperty(value = "走访对象",index = 2) |
| | | @ApiModelProperty(value = "需走访人名字") |
| | | private String visiterName; |
| | | |
| | | |
| | | @ExcelProperty(value = "身份证号码",index = 4) |
| | | @ExcelProperty(value = "身份证号码",index = 3) |
| | | @ApiModelProperty(value = "身份证号码") |
| | | private String cardNoStr; |
| | | |
| | | @ExcelProperty(value = "走访地址",index = 5) |
| | | @ExcelProperty(value = "走访地址",index = 4) |
| | | @ApiModelProperty(value = "走访地址") |
| | | private String visiterAddress; |
| | | |
| | | @ExcelProperty(value = "人员标签",index = 6) |
| | | @ExcelProperty(value = "人员标签",index = 5) |
| | | @ApiModelProperty(value = "人员标签") |
| | | private String visiterTypeName; |
| | | |
| | | @ExcelProperty(value = "走访人",index = 7) |
| | | @ExcelProperty(value = "走访人",index = 6) |
| | | @ApiModelProperty(value = "走访人") |
| | | private String dellUserName; |
| | | |
| | | @ExcelProperty(value = "完成走访时间",index = 8) |
| | | @ExcelProperty(value = "完成走访时间",index = 7) |
| | | @ApiModelProperty(value = "完成走访时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date submitDate; |
| | | |
| | | @ExcelProperty(value = "撤销时间",index = 9) |
| | | @ExcelProperty(value = "撤销时间",index = 8) |
| | | @ApiModelProperty(value = "撤销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date cancelTime; |
| | | |
| | | @ExcelProperty(value = "状态",index = 10) |
| | | @ExcelProperty(value = "状态",index = 9) |
| | | @ApiModelProperty(value = "状态") |
| | | private String eventStatusName; |
| | | |
| | | |
| | | |
| | | @ExcelIgnore |
| | | @ApiModelProperty(value = "需走访人ID") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long visiterId; |
| | | |
| | | @ApiModelProperty(value = "网格员所处的街道") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMemberStreet; |
| | | |
| | | @ApiModelProperty(value = "网格员所处社区") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMemberCommunity; |
| | | |
| | | @ApiModelProperty(value = "网格员") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMember; |
| | | |
| | | @ApiModelProperty(value = "网格员名字") |
| | |
| | | private String visiterTele; |
| | | |
| | | |
| | | @ExcelIgnore |
| | | private Integer visiterType; |
| | | |
| | | @ApiModelProperty(value = "事件标题") |
| | |
| | | |
| | | @ApiModelProperty(value = "发生的精度纬度信息(逗号隔开)") |
| | | private String happentLatLng; |
| | | // |
| | | @ExcelIgnore |
| | | private Integer eventStatus; |
| | | |
| | | public String getEventStatusName() { |
| | |
| | | private Integer dellType; |
| | | |
| | | @ApiModelProperty(value = "处理人ID") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long dellUserId; |
| | | |
| | | |
| | |
| | | private String tableContentJson; |
| | | |
| | | @ApiModelProperty(value = "创建人id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long createBy; |
| | | |
| | | |
| | | @ApiModelProperty(value = "修改人") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.dtos.shop.*; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | |
| | | */ |
| | | @PostMapping("/wallet/get/ranking") |
| | | R getWalletRanking(@RequestBody PageComActWalletTradeDTO walletTradeDTO); |
| | | |
| | | /** |
| | | * 综治后台-居民列表 |
| | | * @param populationListDTO 请求参数 |
| | | * @return 居民列表 |
| | | */ |
| | | @PostMapping("/population/grid/list") |
| | | R getGridPopulationList(@RequestBody ComMngPopulationListDTO populationListDTO); |
| | | |
| | | /** |
| | | * 综治后台-删除居民 |
| | | * @param ids 居民id集合 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/population/grid/del") |
| | | R delGridPopulation(@RequestBody List<Long> ids); |
| | | |
| | | /** |
| | | * 综治后台-居民详情 |
| | | * @param populationId 居民id |
| | | * @return 居民详情 |
| | | */ |
| | | @GetMapping("/population/grid/get") |
| | | R getGridPopulationDetail(@RequestParam("populationId")Long populationId); |
| | | |
| | | /** |
| | | * 综治app-小区列表 |
| | | * @param villageListAppDTO 请求参数 |
| | | * @return 小区列表 |
| | | */ |
| | | @PostMapping("/village/grid/list") |
| | | R getGridVillageList(@RequestBody ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | /** |
| | | * 综治app-根据小区id查询小区下楼栋列表 |
| | | * @param villageId 小区id |
| | | * @return 楼栋列表 |
| | | */ |
| | | @PostMapping("/village/grid/building/list") |
| | | R getGridVillageBuildingList(@RequestParam("villageId")Long villageId); |
| | | |
| | | /** |
| | | * 小区楼栋下房屋列表 |
| | | * @param buildHouseAppDTO 请求参数 |
| | | * @return 房屋列表 |
| | | */ |
| | | @PostMapping("/village/grid/building/house/list") |
| | | R getGridVillageBuildingHouseList(@RequestBody PageComMngVillageBuildHouseAppDTO buildHouseAppDTO); |
| | | |
| | | /** |
| | | * 小区楼栋下房屋信息 |
| | | * @param houseId 房屋id |
| | | * @return 房屋信息 |
| | | */ |
| | | @PostMapping("/village/grid/building/house/detail") |
| | | R getGridVillageBuildingHouseDetail(@RequestParam("houseId")Long houseId); |
| | | |
| | | /** |
| | | * 查询平台人口列表 |
| | | * @param populationDTO 请求参数 |
| | | * @return 人口列表 |
| | | */ |
| | | @PostMapping("/village/grid/building/house/population/list") |
| | | R getBuildingHousePopulationList(@RequestBody PageComMngPopulationDTO populationDTO); |
| | | |
| | | /** |
| | | * 批量向房屋新增人员 |
| | | * @param housePopulationDTO 请求参数 |
| | | * @return 添加结果 |
| | | */ |
| | | @PostMapping("/village/grid/building/house/add/population") |
| | | R addBuildingHousePopulation(@RequestBody AddComMngHousePopulationDTO housePopulationDTO); |
| | | |
| | | /** |
| | | * 批量删除房屋内人员 |
| | | * @param housePopulationDTO 请求参数 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/village/grid/building/house/del/population") |
| | | R delBuildingHousePopulation(@RequestBody DelComMngHousePopulationDTO housePopulationDTO); |
| | | } |
| | |
| | | package com.panzhihua.common.service.grid; |
| | | |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.event.ScreenEventListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | |
| | | /** |
| | | * 删除走访任务 |
| | | * |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/delete") |
| | | R delete(@RequestParam("ids") String ids, @RequestParam("communityId") Long communityId); |
| | | R delete(@RequestBody IdDTO idDTO, @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 被走访人员列表 |
| | |
| | | /** |
| | | * 撤销走访 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/cancel/{id}") |
| | | R cancel(@PathVariable("id") Long id); |
| | | @PostMapping("/eventvisitingtasks/cancel") |
| | | R cancel(@RequestBody IdDTO idDTO); |
| | | |
| | | /** |
| | | * 恢复走访 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/reset/{id}") |
| | | R reset(@PathVariable("id") Long id); |
| | | @PostMapping("/eventvisitingtasks/reset") |
| | | R reset(@RequestBody IdDTO idDTO); |
| | | |
| | | /** |
| | | * 新增走访 |
| | | * |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/add") |
| | | R addVisitingTask(@RequestParam("ids") String ids, @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId); |
| | | R addVisitingTask(@RequestBody IdDTO idDTO, @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 开始走访 |
| | |
| | | @ApiOperation(value = "实有人口-下载模板") |
| | | @GetMapping("/export") |
| | | public R exportPopulation() { |
| | | //获取登陆用户 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | //获取登陆用户绑定社区id |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | Long communityId = 2L;//this.getCommunityId(); |
| | | //生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "实有人口导入模板.xlsx"; |
| | |
| | | List<String> head2 = new ArrayList<String>(); |
| | | head2.add("民族"); |
| | | List<String> head3 = new ArrayList<String>(); |
| | | head3.add("政治面貌(群众/中共党员/共青团员)"); |
| | | head3.add("政治面貌(中共党员/中共预备党员/共青团员/民革党员/台盟盟员/群众)"); |
| | | List<String> head4 = new ArrayList<String>(); |
| | | head4.add("是否租住(是/否)"); |
| | | List<String> head5 = new ArrayList<String>(); |
| | | head5.add("与户主关系(户主/配偶/子女/孙女/父母/其他)"); |
| | | head5.add("与户主关系(户主/本人/配偶/夫/妻/子/女/孙女/孙子/兄弟姐妹/父母/其他)"); |
| | | List<String> head6 = new ArrayList<String>(); |
| | | head6.add("*街/路/巷(必填)"); |
| | | List<String> head7 = new ArrayList<String>(); |
| | | head7.add("*小区号(必填,政府对于每个小区都有特定编号)"); |
| | | List<String> head8 = new ArrayList<String>(); |
| | | head8.add("*楼排号(必填)"); |
| | | List<String> head9 = new ArrayList<String>(); |
| | | head9.add("*单元号(必填)"); |
| | | List<String> head10 = new ArrayList<String>(); |
| | | head10.add("*单元号(必填)"); |
| | | head10.add("*户室(必填,四位数表示。前两位楼层,后两位户号)"); |
| | | List<String> head11 = new ArrayList<String>(); |
| | | head11.add("*户室(必填,四位数表示。前两位楼层,后两位户号)"); |
| | | head11.add("建筑用途"); |
| | | List<String> head12 = new ArrayList<String>(); |
| | | head12.add("联系方式"); |
| | | head12.add("房屋面积"); |
| | | List<String> head13 = new ArrayList<String>(); |
| | | head13.add("籍贯"); |
| | | head13.add("房屋状态(自住/租住/其他)"); |
| | | List<String> head14 = new ArrayList<String>(); |
| | | head14.add("文化程度(小学/初中/高中/中专/大专/本科/硕士/博士/其他)"); |
| | | head14.add("房屋用途(住宅/公寓/宿舍/仓库/其他)"); |
| | | List<String> head15 = new ArrayList<String>(); |
| | | head15.add("婚姻状况(未婚/已婚/离异/丧偶/分居/其他)"); |
| | | head15.add("管控状态(常规/关注/管控)"); |
| | | |
| | | List<String> head16 = new ArrayList<String>(); |
| | | head16.add("健康状况"); |
| | | head16.add("联系方式"); |
| | | List<String> head17 = new ArrayList<String>(); |
| | | head17.add("工作单位"); |
| | | head17.add("籍贯"); |
| | | List<String> head18 = new ArrayList<String>(); |
| | | head18.add("备注"); |
| | | head18.add("文化程度(小学/初中/高中/中专/大专/本科/硕士/博士/其他)"); |
| | | List<String> head19 = new ArrayList<String>(); |
| | | head19.add("户口所在地"); |
| | | head19.add("婚姻状况(未婚/已婚/初婚/再婚/复婚/丧偶/离婚/分居/其他)"); |
| | | List<String> head20 = new ArrayList<String>(); |
| | | head20.add("本地外地(本地/外地)"); |
| | | head20.add("健康状况"); |
| | | List<String> head21 = new ArrayList<String>(); |
| | | head21.add("房屋状态(自住/租住/其他)"); |
| | | head21.add("工作单位"); |
| | | List<String> head22 = new ArrayList<String>(); |
| | | head22.add("房屋用途(住宅/公寓/宿舍/仓库/其他)"); |
| | | head22.add("本地外地(本地/外地)"); |
| | | List<String> head23 = new ArrayList<String>(); |
| | | head23.add("管控状态(常规/关注/管控)"); |
| | | head23.add("户口所在地"); |
| | | List<String> head24 = new ArrayList<String>(); |
| | | head24.add("是否为居住地(是/否)"); |
| | | head24.add("备注"); |
| | | List<String> head25 = new ArrayList<String>(); |
| | | head25.add("证件照(人面像)照片"); |
| | | List<String> head26 = new ArrayList<String>(); |
| | | head26.add("证件照(国徽面)照片"); |
| | | List<String> head27 = new ArrayList<String>(); |
| | | head27.add("户口本照片"); |
| | | List<String> head28 = new ArrayList<String>(); |
| | | head28.add("是否为居住地(是/否)"); |
| | | |
| | | |
| | | list.add(head0); |
| | |
| | | list.add(head6); |
| | | list.add(head7); |
| | | list.add(head8); |
| | | list.add(head9); |
| | | list.add(head10); |
| | | list.add(head11); |
| | | list.add(head12); |
| | |
| | | list.add(head22); |
| | | list.add(head23); |
| | | list.add(head24); |
| | | list.add(head25); |
| | | list.add(head26); |
| | | list.add(head27); |
| | | list.add(head28); |
| | | return list; |
| | | } |
| | | |
| | |
| | | data.add("汉族"); |
| | | data.add("群众"); |
| | | data.add("是"); |
| | | data.add("户主"); |
| | | data.add("本人"); |
| | | data.add("樱花街"); |
| | | data.add("115"); |
| | | data.add("15栋"); |
| | | data.add("1单元"); |
| | | data.add("1"); |
| | | data.add("1001"); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add("13768548521"); |
| | | data.add("中国"); |
| | | data.add("硕士"); |
| | | data.add("未婚"); |
| | | data.add(""); |
| | | data.add("阿里巴巴"); |
| | | data.add(""); |
| | | data.add("四川成都"); |
| | | data.add("本地"); |
| | | data.add("自住"); |
| | | data.add("公寓"); |
| | | data.add("常规"); |
| | | data.add("否"); |
| | | data.add("四川成都"); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add("是"); |
| | | return data; |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.grid_app.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"小区模块"}) |
| | | @RestController |
| | | @RequestMapping("/village/") |
| | | public class VillageApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "小区列表@lyq",response = PageComMngVillageVO.class) |
| | | @PostMapping("/list") |
| | | public R list(@RequestBody ComMngVillageListAppDTO villageListAppDTO){ |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | villageListAppDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return communityService.getGridVillageList(villageListAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "小区楼栋列表@lyq",response = ComMngVillageBuildingVO.class) |
| | | @PostMapping("/building/list") |
| | | public R buildingList(@RequestParam("villageId")Long villageId){ |
| | | return communityService.getGridVillageBuildingList(villageId); |
| | | } |
| | | |
| | | @ApiOperation(value = "小区楼栋下房屋列表@lyq",response = ComMngVillageBuildingHouseVO.class) |
| | | @PostMapping("/building/house/list") |
| | | public R buildingHouseList(@RequestBody PageComMngVillageBuildHouseAppDTO buildHouseAppDTO){ |
| | | return communityService.getGridVillageBuildingHouseList(buildHouseAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "房屋详情@lyq",response = ComMngVillageBuildingHouseDetailVO.class) |
| | | @PostMapping("/building/house/detail") |
| | | public R buildingHouseDetail(@RequestParam("houseId")Long houseId){ |
| | | return communityService.getGridVillageBuildingHouseDetail(houseId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询人口列表", response = EventSpecialPopulationVO.class) |
| | | @PostMapping("/building/house/population/list") |
| | | public R getBuildingHousePopulationList(@RequestBody PageComMngPopulationDTO populationDTO){ |
| | | return communityService.getBuildingHousePopulationList(populationDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "房屋添加人员") |
| | | @PostMapping("/building/house/add/population") |
| | | public R addBuildingHousePopulation(@RequestBody AddComMngHousePopulationDTO housePopulationDTO){ |
| | | return communityService.addBuildingHousePopulation(housePopulationDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "房屋删除人员") |
| | | @PostMapping("/building/house/del/population") |
| | | public R delBuildingHousePopulation(@RequestBody DelComMngHousePopulationDTO housePopulationDTO){ |
| | | return communityService.delBuildingHousePopulation(housePopulationDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | if(userInfoVO == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | if(easyAppDTO.getCommunityId() == null){ |
| | | easyAppDTO.setCommunityId(userInfoVO.getCommunityId()); |
| | | } |
| | | // if(easyAppDTO.getCommunityId() == null){ |
| | | // easyAppDTO.setCommunityId(userInfoVO.getCommunityId()); |
| | | // } |
| | | return gridService.easyListByAdmin(easyAppDTO); |
| | | } |
| | | |
| | |
| | | eventBatchRevokeDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | eventBatchRevokeDTO.setUserName(loginUserInfoVO.getName()); |
| | | eventBatchRevokeDTO.setCommunityName(loginUserInfoVO.getCommunityName()); |
| | | eventBatchRevokeDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | // eventBatchRevokeDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | eventBatchRevokeDTO.setRevokeType(2); |
| | | eventBatchRevokeDTO.setRevokeId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.batchMarkEventInvalid(eventBatchRevokeDTO); |
| | |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | if(loginUserInfo.getCommunityId() != 0){ |
| | | memberRelationDTO.setGridCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | // if(loginUserInfo.getCommunityId() != 0){ |
| | | // memberRelationDTO.setGridCommunityId(loginUserInfo.getCommunityId()); |
| | | // } |
| | | return userService.getGridMemberList(memberRelationDTO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/event/list") |
| | | public R getGridDataList(@Validated @RequestBody PageEventGridDataAdminDTO eventGridDataDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridDataDTO); |
| | | Long communityId = this.getCommunityId(); |
| | | if(communityId == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | eventGridDataDTO.setGridCommunityId(communityId); |
| | | // Long communityId = this.getCommunityId(); |
| | | // if(communityId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // eventGridDataDTO.setGridCommunityId(communityId); |
| | | return gridService.getGridDataList(eventGridDataDTO); |
| | | } |
| | | |
| | |
| | | ClazzUtils.setIfStringIsEmpty(pageEventManageDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pageEventManageDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pageEventManageDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | // pageEventManageDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | pageEventManageDTO.setRevokeType(1); |
| | | return gridService.queryEventToManage(pageEventManageDTO); |
| | | } |
| | |
| | | commonEventDealDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventDealDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | commonEventDealDTO.setOperateType(1); |
| | | commonEventDealDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | // commonEventDealDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | commonEventDealDTO.setCommunityName(loginUserInfoVO.getCommunityName()); |
| | | return gridService.dealEvent(commonEventDealDTO); |
| | | } |
| | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksAddDTO; |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | import com.panzhihua.common.model.vos.IPageVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.visit.AppVisitTasksVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitCountVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitListVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitingTasksVO; |
| | | import com.panzhihua.common.model.vos.visit.*; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.Date; |
| | |
| | | */ |
| | | @PostMapping("/delete") |
| | | @ApiOperation(value = "删除走访任务") |
| | | public R delete(@RequestParam("ids") String ids){ |
| | | return gridService.delete(ids,this.getCommunityId()); |
| | | public R delete(@RequestBody @Valid IdDTO idDTO){ |
| | | return gridService.delete(idDTO,this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 走访任务导出 |
| | | * @return |
| | | */ |
| | | @GetMapping("/export") |
| | | @GetMapping("/noToken/export") |
| | | @ApiOperation(value = "导出走访任务") |
| | | public void export(HttpServletResponse response,EventTasksQuery query){ |
| | | // query.setCommunityId(this.getCommunityId()); |
| | |
| | | List<EventVisitingTasksVO> list = gridService.exportTaskList(query); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = "走访任务-"+ DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); |
| | | String fileName = "走访任务-"+ DateUtil.format(new Date(),"yyyyMMddHHmmss"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20") + ".xlsx"); |
| | | // 如果不用模板的方式导出的话,是doWrite |
| | | EasyExcel.write(response.getOutputStream(), EventVisitingTasksVO.class).sheet(fileName).doWrite(list); |
| | | EasyExcel.write(os, EventVisitingTasksVO.class).sheet(fileName).doWrite(list); |
| | | os.flush(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | }finally { |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/detail/{id}") |
| | | @ApiOperation(value = "待走访人员详情") |
| | | @ApiOperation(value = "待走访人员详情",response = EventVisitingTasksDetailsVO.class) |
| | | public R detail(@PathVariable("id") Long id){ |
| | | return gridService.detail(id); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "新增走访任务") |
| | | public R add(@RequestParam("ids") String ids){ |
| | | return gridService.addVisitingTask(ids,this.getCommunityId(),this.getUserId()); |
| | | public R add(@RequestBody @Valid IdDTO idDTO){ |
| | | return gridService.addVisitingTask(idDTO,this.getCommunityId(),this.getUserId()); |
| | | } |
| | | |
| | | /** |
| | | * 撤销走访任务 |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/cancel") |
| | | @ApiOperation(value = "撤销走访任务") |
| | | public R cancel(@RequestParam("id") Long id){ |
| | | return gridService.cancel(id); |
| | | public R cancel(@RequestBody @Valid IdDTO idDTO){ |
| | | return gridService.cancel(idDTO); |
| | | } |
| | | |
| | | /** |
| | | * 恢复走访任务 |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/reset") |
| | | @ApiOperation(value = "新增走访任务") |
| | | public R reset(@RequestParam("id") Long id){ |
| | | return gridService.reset(id); |
| | | public R reset(@RequestBody @Valid IdDTO idDTO){ |
| | | return gridService.reset(idDTO); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.panzhihua.grid_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.PopulationDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.admin.ComMngPopulationListVO; |
| | | import com.panzhihua.common.model.vos.screen.ComActPopulationScreenVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"居民模块"}) |
| | | @RestController |
| | | @RequestMapping("/population/") |
| | | public class PopulationApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "居民列表@lyq",response = ComMngPopulationListVO.class) |
| | | @PostMapping("/list") |
| | | public R list(@RequestBody ComMngPopulationListDTO populationListDTO){ |
| | | // LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | // populationListDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return communityService.getGridPopulationList(populationListDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "居民删除@lyq") |
| | | @PostMapping("/del") |
| | | public R del(@RequestBody List<Long> ids){ |
| | | return communityService.delGridPopulation(ids); |
| | | } |
| | | |
| | | @ApiOperation(value = "居民查看@lyq",response = PopulationDetailVO.class) |
| | | @GetMapping("/get") |
| | | public R get(@RequestParam("populationId")Long populationId){ |
| | | return communityService.getGridPopulationDetail(populationId); |
| | | } |
| | | } |
| | |
| | | ClazzUtils.setIfStringIsEmpty(pagePublicityEventDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pagePublicityEventDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pagePublicityEventDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | // pagePublicityEventDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | pagePublicityEventDTO.setRevokeType(2); |
| | | return gridService.queryPublicityCommunity(pagePublicityEventDTO); |
| | | } |
| | |
| | | if(loginUserInfoVO == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | if(statisticsAdminDTO.getCommunityId() == null){ |
| | | statisticsAdminDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | } |
| | | // if(statisticsAdminDTO.getCommunityId() == null){ |
| | | // statisticsAdminDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | // } |
| | | return gridService.gridMemberStatistics(statisticsAdminDTO); |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.grid_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.user.ComMngUserTagVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author xyh |
| | | * @date 2021/6/29 14:45 |
| | | */ |
| | | @Api(tags = {"系统管理"}) |
| | | @Slf4j |
| | | @RequestMapping("/system") |
| | | @RestController |
| | | public class SystemApi extends BaseController { |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @ApiOperation(value = "获取用户标签",response = ComMngUserTagVO.class) |
| | | @GetMapping("/tags") |
| | | public R config(){ |
| | | return userService.listComMngUserTag(this.getCommunityId()); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | | import com.panzhihua.service_community.service.ComMngPopulationHouseService; |
| | | import com.panzhihua.service_community.service.ComMngPopulationHouseUserService; |
| | | import com.panzhihua.service_community.service.ComMngPopulationService; |
| | | import com.panzhihua.service_community.service.ComMngVillageService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | public class ComMngVillageApi { |
| | | @Resource |
| | | private ComMngVillageService comMngVillageService; |
| | | @Resource |
| | | private ComMngPopulationHouseService comMngPopulationHouseService; |
| | | @Resource |
| | | private ComMngPopulationHouseUserService comMngPopulationHouseUserService; |
| | | @Resource |
| | | private ComMngPopulationService comMngPopulationService; |
| | | |
| | | /** |
| | | * 新增实有房屋 |
| | |
| | | return comMngVillageService.getVillage(villageId); |
| | | } |
| | | |
| | | /** |
| | | * 综治app-小区列表 |
| | | * @param villageListAppDTO 请求参数 |
| | | * @return 小区列表 |
| | | */ |
| | | @PostMapping("/village/grid/list") |
| | | public R getGridPopulationAdminList(@RequestBody ComMngVillageListAppDTO villageListAppDTO) { |
| | | return comMngVillageService.getGridVillageList(villageListAppDTO); |
| | | } |
| | | |
| | | /** |
| | | * 综治app-根据小区id查询小区下楼栋列表 |
| | | * @param villageId 小区id |
| | | * @return 楼栋列表 |
| | | */ |
| | | @PostMapping("/village/grid/building/list") |
| | | public R getGridVillageBuildingList(@RequestParam("villageId")Long villageId) { |
| | | return comMngVillageService.getGridVillageBuildingList(villageId); |
| | | } |
| | | |
| | | /** |
| | | * 小区楼栋下房屋列表 |
| | | * @param buildHouseAppDTO 请求参数 |
| | | * @return 房屋列表 |
| | | */ |
| | | @PostMapping("/village/grid/building/house/list") |
| | | public R getGridVillageBuildingHouseList(@RequestBody PageComMngVillageBuildHouseAppDTO buildHouseAppDTO) { |
| | | return comMngPopulationHouseService.getGridVillageBuildingHouseList(buildHouseAppDTO); |
| | | } |
| | | |
| | | /** |
| | | * 小区楼栋下房屋信息 |
| | | * @param houseId 房屋id |
| | | * @return 房屋信息 |
| | | */ |
| | | @PostMapping("/village/grid/building/house/detail") |
| | | public R getGridVillageBuildingHouseDetail(@RequestParam("houseId")Long houseId) { |
| | | return comMngPopulationHouseService.getGridVillageBuildingHouseDetail(houseId); |
| | | } |
| | | |
| | | @PostMapping("/village/grid/building/house/population/list") |
| | | public R getBuildingHousePopulationList(@RequestBody PageComMngPopulationDTO populationDTO) { |
| | | return comMngPopulationService.getBuildingHousePopulationList(populationDTO); |
| | | } |
| | | |
| | | @PostMapping("/village/grid/building/house/add/population") |
| | | public R addBuildingHousePopulation(@RequestBody AddComMngHousePopulationDTO housePopulationDTO) { |
| | | return comMngPopulationHouseUserService.addBuildingHousePopulation(housePopulationDTO); |
| | | } |
| | | |
| | | @PostMapping("/village/grid/building/house/del/population") |
| | | public R delBuildingHousePopulation(@RequestBody DelComMngHousePopulationDTO housePopulationDTO) { |
| | | return comMngPopulationHouseUserService.delBuildingHousePopulation(housePopulationDTO); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComMngPopulationService; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | return comMngPopulationService.getPopulationRepairByApp(); |
| | | } |
| | | |
| | | /** |
| | | * 综治后台-居民列表 |
| | | * @param populationListDTO 请求参数 |
| | | * @return 居民列表 |
| | | */ |
| | | @PostMapping("/grid/list") |
| | | public R getGridPopulationAdminList(@RequestBody ComMngPopulationListDTO populationListDTO) { |
| | | return comMngPopulationService.getGridPopulationAdminList(populationListDTO); |
| | | } |
| | | |
| | | @PostMapping("/grid/del") |
| | | public R delGridPopulationAdmin(@RequestBody List<Long> ids) { |
| | | return comMngPopulationService.delGridPopulationAdmin(ids); |
| | | } |
| | | |
| | | @GetMapping("/grid/get") |
| | | public R getGridPopulationAdminDetail(@RequestParam("populationId")Long populationId) { |
| | | return comMngPopulationService.getPopulationDetailApp(populationId); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | " AND DATE_FORMAT(caa.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{actActivityListDTO.endTime} " + |
| | | " </if> " + |
| | | "<if test='actActivityListDTO.type!=null'>" + |
| | | " AND caa.type = #{actActivityListDTO.type} " + |
| | | " AND caa.status = #{actActivityListDTO.type} " + |
| | | " </if> " + |
| | | " </where> "+ |
| | | "ORDER BY " + |
| | |
| | | "<if test='comActDynVO.status != null '>" + |
| | | "AND d.`status` = #{comActDynVO.status} " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.type != null '>" + |
| | | "AND d.type = #{comActDynVO.type} " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.publishAtBegin != null '>" + |
| | | "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " + |
| | | "AND #{comActDynVO.publishAtEnd}" + |
| | |
| | | "<if test='neighborCircleAdminDTO.startAt != null and neighborCircleAdminDTO.endAt !=null '>" + |
| | | "and nc.create_at between #{neighborCircleAdminDTO.startAt} and #{neighborCircleAdminDTO.endAt} \n" + |
| | | " </if> " + |
| | | "<if test='neighborCircleAdminDTO.status != null '>" + |
| | | "and nc.status = #{neighborCircleAdminDTO.status} \n" + |
| | | " </if> " + |
| | | "</where>"+ |
| | | "order by " + |
| | | "case when nc.`status`=1 then 0 else 1 end, \n" + |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.grid.ComMngVillageListAppDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageComMngVillageBuildHouseAppDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageTotalVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | | import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingHouseVO; |
| | | import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingVO; |
| | | import com.panzhihua.common.model.vos.grid.PageComMngVillageVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationDetailVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVillageDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | @Select("select village_id,alley,house_num,group_at,type,address,update_at from com_mng_village where village_id = #{villageId}") |
| | | ComMngVillageVO getVillageById(@Param("villageId") Long villageId); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " village_id, " + |
| | | " `name` AS userName, " + |
| | | " build_sum, " + |
| | | " address, " + |
| | | " create_at as createAt, " + |
| | | " lng, " + |
| | | " lat, " + |
| | | " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, " + |
| | | " ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmv.village_id ) AS houseNum, " + |
| | | " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND out_or_local = 1 ) AS registerNum, " + |
| | | " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND is_rent = 2 ) AS rentNum " + |
| | | "FROM " + |
| | | " com_mng_village AS cmv where cmv.community_id = #{villageListAppDTO.communityId} " + |
| | | "<if test='villageListAppDTO.name != null and villageListAppDTO.name != ""'>" + |
| | | " and cmv.name like concat(#{villageListAppDTO.name},'%')"+ |
| | | " </if> " + |
| | | "<if test='villageListAppDTO.sortColumns!=null'>" + |
| | | " ORDER BY ${villageListAppDTO.sortColumns} ${villageListAppDTO.sortType} " + |
| | | " </if>" + |
| | | " </script>") |
| | | IPage<PageComMngVillageVO> getGridVillageList(Page page, @Param("villageListAppDTO") ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | @Select("SELECT DISTINCT " + |
| | | " village_id," + |
| | | " floor, " + |
| | | " unit_no " + |
| | | "FROM " + |
| | | " com_mng_population_house AS cmph " + |
| | | "WHERE " + |
| | | " village_id = #{villageId}") |
| | | List<ComMngVillageBuildingVO> getGridVillageBuildingList(@Param("villageId") Long villageId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.area.AreaAddressVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | |
| | | import com.panzhihua.common.model.vos.community.screen.event.*; |
| | | import com.panzhihua.common.model.vos.community.screen.index.*; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import com.panzhihua.common.model.vos.grid.EventSpecialPopulationVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationListVO; |
| | | import com.panzhihua.common.model.vos.grid.admin.ComMngPopulationListVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.user.ComHouseMemberVo; |
| | |
| | | " id = #{populationId}") |
| | | PopulationDetailVO getPopulationDetailApp(@Param("populationId") Long populationId); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " * " + |
| | | "FROM " + |
| | | " ( " + |
| | | " SELECT " + |
| | | " cmp.id, " + |
| | | " cmp.`name` AS userName, " + |
| | | " cmp.label, " + |
| | | " cmp.card_no, " + |
| | | " cmp.card_no_str, " + |
| | | " cmp.sex, " + |
| | | " cmp.address, " + |
| | | " cmp.political_outlook, " + |
| | | " cmp.census_register, " + |
| | | " cmp.house_id, " + |
| | | " cmp.phone, " + |
| | | " IFNULL(cmp.house_id,0) as isHouse, " + |
| | | " ( SELECT event_status FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS eventStatus, " + |
| | | " ( SELECT create_at FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS createAt " + |
| | | " FROM " + |
| | | " com_mng_population AS cmp where 1=1 " + |
| | | "<if test='populationListDTO.keyWord != null and populationListDTO.keyWord != ""'>" + |
| | | "AND (cmp.name like concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%') or cmp.address like concat (#{populationListDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.label != null and populationListDTO.label != ""'>" + |
| | | "AND cmp.label like concat ('%',#{populationListDTO.label},'%') " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.sex != null'>" + |
| | | "AND cmp.sex = #{populationListDTO.sex} " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.isHouse != null and populationListDTO.isHouse == 1'>" + |
| | | "AND cmp.house_id is not null " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.isHouse != null and populationListDTO.isHouse == 2'>" + |
| | | "AND cmp.house_id is null " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.communityId != null'>" + |
| | | "AND cmp.act_id = #{populationListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.politicalOutlook != null'>" + |
| | | "AND cmp.political_outlook = #{populationListDTO.politicalOutlook} " + |
| | | " </if> " + |
| | | " ) as population where 1=1 " + |
| | | "<if test='populationListDTO.eventStatus != null'>" + |
| | | "AND population.eventStatus = #{populationListDTO.eventStatus} " + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<ComMngPopulationListVO> getGridPopulationAdminList(Page page,@Param("populationListDTO") ComMngPopulationListDTO populationListDTO); |
| | | |
| | | @Select("select relation from com_mng_population_house_user where house_id = #{houseId} and popul_id = #{populationId}") |
| | | Integer getPopulationRelationByHouseId(@Param("houseId") Long houseId, @Param("populationId") Long populationId); |
| | | |
| | | @Select("<script>" + |
| | | " select count(id) from event_visiting_tasks as evt where visiter_id in " + |
| | | "<foreach collection='ids' item='id' index='index' open='(' close=')' separator=',' >" + |
| | | "#{id}" + |
| | | "</foreach>" + |
| | | " </script>") |
| | | Integer getPopulationVisitingCount(@Param("ids") List<Long> ids); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " cmp.id, " + |
| | | " cmp.`name`, " + |
| | | " cmp.card_no as idCard, " + |
| | | " cmp.label, " + |
| | | " cmp.sex, " + |
| | | " cmp.phone, " + |
| | | " cmp.address, " + |
| | | " cmp.political_outlook " + |
| | | " FROM " + |
| | | " com_mng_population AS cmp where 1=1 " + |
| | | "<if test='populationDTO.keyWord != null'>" + |
| | | " AND (cmp.name like concat(#{populationDTO.keyWord},'%') or cmp.card_no_str like concat(#{populationDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<EventSpecialPopulationVO> getBuildingHousePopulationList(Page page,@Param("populationDTO") PageComMngPopulationDTO populationDTO); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageComMngVillageBuildHouseAppDTO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingHouseDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingHouseVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationListVO; |
| | | import com.panzhihua.common.model.vos.user.ComMngHouseVo; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationHouseDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | " from com_act as ca where ca.community_id = #{communityId}") |
| | | ComMngVillageRegionVO getRegion(@Param("communityId") Long communityId); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT id, floor, unit_no, house_no, `status`,( SELECT count( id ) FROM com_mng_population_house_user WHERE house_id = cmph.id ) AS userNum " + |
| | | " FROM " + |
| | | " com_mng_population_house AS cmph " + |
| | | " <where> " + |
| | | "<if test='buildHouseAppDTO.villageId != null '>" + |
| | | " and cmph.village_id = #{buildHouseAppDTO.villageId} " + |
| | | " </if> " + |
| | | "<if test='buildHouseAppDTO.floor != null and buildHouseAppDTO.floor !="" '>" + |
| | | " and cmph.floor = #{buildHouseAppDTO.floor} " + |
| | | " </if> " + |
| | | "<if test='buildHouseAppDTO.unitNo != null and buildHouseAppDTO.unitNo !="" '>" + |
| | | " and cmph.unit_no = #{buildHouseAppDTO.unitNo} " + |
| | | " </if> " + |
| | | "<if test='buildHouseAppDTO.houseNo != null and buildHouseAppDTO.houseNo !="" '>" + |
| | | " and cmph.house_no like concat(#{buildHouseAppDTO.houseNo},'%') " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " </script>") |
| | | IPage<ComMngVillageBuildingHouseVO> getGridVillageBuildingHouseList(Page page, @Param("buildHouseAppDTO") PageComMngVillageBuildHouseAppDTO buildHouseAppDTO); |
| | | |
| | | @Select("SELECT " + |
| | | " cmph.id, " + |
| | | " cmv.`name` AS villageName, " + |
| | | " cmph.floor, " + |
| | | " cmph.unit_no, " + |
| | | " cmph.house_no, " + |
| | | " cmph.address, " + |
| | | " cmph.`status`, " + |
| | | " cmv.lat, " + |
| | | " cmv.lng " + |
| | | "FROM " + |
| | | " com_mng_population_house AS cmph " + |
| | | " LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmph.village_id " + |
| | | "WHERE " + |
| | | " cmph.id = #{houseId}") |
| | | ComMngVillageBuildingHouseDetailVO getGridVillageBuildingHouseDetail(@Param("houseId") Long houseId); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " cmp.id, " + |
| | | " cmphu.id as housePopulationId, " + |
| | | " cmp.sex, " + |
| | | " cmp.`name`, " + |
| | | " cmp.phone, " + |
| | | " cmp.card_no, " + |
| | | " cmp.label, " + |
| | | " cmp.address, " + |
| | | " cmp.nation, " + |
| | | " cmphu.create_at, " + |
| | | " cmp.political_outlook " + |
| | | "FROM " + |
| | | " com_mng_population_house_user AS cmphu " + |
| | | " LEFT JOIN com_mng_population AS cmp ON cmp.id = cmphu.popul_id " + |
| | | "WHERE " + |
| | | " cmphu.house_id = #{houseId} " + |
| | | "<if test='relation != null '>" + |
| | | " AND cmphu.relation = #{relation} " + |
| | | " </if> " + |
| | | "<if test='relationId != null '>" + |
| | | " AND cmphu.relation_id = #{relationId} " + |
| | | " </if> " + |
| | | " </script>") |
| | | List<PopulationListVO> getGridVillageBuildingPopulationList(@Param("houseId") Long houseId,@Param("relation") Integer relation,@Param("relationId") Integer relationId); |
| | | |
| | | } |
| | |
| | | "left join com_mng_population as cmp on cmp.id = cmphu.popul_id where cmphu.house_id = #{houseId}") |
| | | List<ComMngPopulationHouseUserAdminVO> getHouseUserByHouseId(@Param("houseId") Long houseId); |
| | | |
| | | @Select("update com_mng_population_house_user set relation = null where id = #{id}") |
| | | Integer delBuildingHousePopulationRelation(@Param("id") Long id); |
| | | |
| | | @Select("update com_mng_population_house_user set relation_id = null where id = #{id}") |
| | | Integer delBuildingHousePopulationRelationId(@Param("id") Long id); |
| | | |
| | | } |
| | |
| | | /** |
| | | * 居住地房屋id |
| | | */ |
| | | // private Long houseId; |
| | | private Long houseId; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女 3.未知) |
| | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 与户主关系(1.户主 2.配偶 3.子女 4.孙女 5.父母 6.其他) |
| | | */ |
| | | public interface relation{ |
| | | int hz = 1; |
| | | int po = 2; |
| | | int zn = 3; |
| | | int sn = 4; |
| | | int fm = 5; |
| | | int qt = 6; |
| | | } |
| | | |
| | | /** |
| | | * 人和房屋关系’ (1.自住2、租住) |
| | | */ |
| | | public interface relationId{ |
| | | int zizhu = 1; |
| | | int zuzhu = 2; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComMngPopulationHouseUserDO{" + |
| | |
| | | import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseEditAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageComMngVillageBuildHouseAppDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationHouseDO; |
| | | |
| | |
| | | */ |
| | | R getRegion(Long communityId); |
| | | |
| | | /** |
| | | * 小区楼栋下房屋列表 |
| | | * @param buildHouseAppDTO 请求参数 |
| | | * @return 房屋列表 |
| | | */ |
| | | R getGridVillageBuildingHouseList(PageComMngVillageBuildHouseAppDTO buildHouseAppDTO); |
| | | |
| | | /** |
| | | * 小区楼栋下房屋详情 |
| | | * @param houseId 房屋id |
| | | * @return 房屋详情 |
| | | */ |
| | | R getGridVillageBuildingHouseDetail(Long houseId); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.grid.AddComMngHousePopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.DelComMngHousePopulationDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationHouseUserDO; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public interface ComMngPopulationHouseUserService extends IService<ComMngPopulationHouseUserDO> { |
| | | |
| | | R addBuildingHousePopulation(AddComMngHousePopulationDTO housePopulationDTO); |
| | | |
| | | R delBuildingHousePopulation(DelComMngHousePopulationDTO housePopulationDTO); |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationTagCardNoDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO; |
| | | import com.panzhihua.common.model.dtos.grid.AddComMngHousePopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; |
| | |
| | | R getPopulationDetailApp(Long populationId); |
| | | |
| | | R getPopulationRepairByApp(); |
| | | |
| | | R getGridPopulationAdminList(ComMngPopulationListDTO populationListDTO); |
| | | |
| | | R delGridPopulationAdmin(List<Long> ids); |
| | | |
| | | R getBuildingHousePopulationList(PageComMngPopulationDTO populationDTO); |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import com.panzhihua.common.model.dtos.grid.ComMngVillageListAppDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageComMngVillageBuildHouseAppDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | |
| | | * @return 小区详情 |
| | | */ |
| | | R getVillage(Long villageId); |
| | | |
| | | /** |
| | | * 小区列表 |
| | | * @param villageListAppDTO 请求参数 |
| | | * @return 小区列表 |
| | | */ |
| | | R getGridVillageList(ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | /** |
| | | * 小区下楼栋列表 |
| | | * @param villageId 小区id |
| | | * @return 小区下楼栋列表 |
| | | */ |
| | | R getGridVillageBuildingList(Long villageId); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseEditAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageComMngVillageBuildHouseAppDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngCascadeHouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationHouseDetailAdminVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationHouseTotalVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationHouseUserAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingHouseDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingHouseVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationListVO; |
| | | import com.panzhihua.service_community.dao.ComActVillageDAO; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationDAO; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationHouseDAO; |
| | |
| | | return R.ok(this.baseMapper.getRegion(communityId)); |
| | | } |
| | | |
| | | /** |
| | | * 小区楼栋下房屋列表 |
| | | * @param buildHouseAppDTO 请求参数 |
| | | * @return 房屋列表 |
| | | */ |
| | | @Override |
| | | public R getGridVillageBuildingHouseList(PageComMngVillageBuildHouseAppDTO buildHouseAppDTO){ |
| | | |
| | | IPage<ComMngVillageBuildingHouseVO> buildingHouseVOIPage = this.baseMapper.getGridVillageBuildingHouseList(new Page(buildHouseAppDTO.getPageNum(),buildHouseAppDTO.getPageSize()),buildHouseAppDTO); |
| | | if(!buildingHouseVOIPage.getRecords().isEmpty()){ |
| | | buildingHouseVOIPage.getRecords().forEach(house ->{ |
| | | boolean result=house.getHouseNo().matches("[0-9]+"); |
| | | if(result){//该字段为纯数字 |
| | | if(house.getHouseNo().length() == 4){ |
| | | house.setBuildingNum(house.getHouseNo().substring(0,2).replaceAll("^(0+)", "")); |
| | | }else if(house.getHouseNo().length() == 3){ |
| | | house.setBuildingNum(house.getHouseNo().substring(0,1).replaceAll("^(0+)", "")); |
| | | } |
| | | }else{ |
| | | house.setBuildingNum("-"); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(buildingHouseVOIPage); |
| | | } |
| | | |
| | | /** |
| | | * 小区楼栋下房屋信息 |
| | | * @param houseId 房屋id |
| | | * @return 房屋信息 |
| | | */ |
| | | @Override |
| | | public R getGridVillageBuildingHouseDetail(Long houseId){ |
| | | |
| | | ComMngVillageBuildingHouseDetailVO buildingHouseDetailVO = this.baseMapper.getGridVillageBuildingHouseDetail(houseId); |
| | | if(buildingHouseDetailVO != null){ |
| | | |
| | | //转换楼层数 |
| | | String houseNo = buildingHouseDetailVO.getHouseNo(); |
| | | boolean result = houseNo.matches("[0-9]+"); |
| | | if(result){//该字段为纯数字 |
| | | if(houseNo.length() == 4){ |
| | | buildingHouseDetailVO.setBuildingNum(houseNo.substring(0,2).replaceAll("^(0+)", "")); |
| | | }else if(houseNo.length() == 3){ |
| | | buildingHouseDetailVO.setBuildingNum(houseNo.substring(0,1).replaceAll("^(0+)", "")); |
| | | } |
| | | }else{ |
| | | buildingHouseDetailVO.setBuildingNum("-"); |
| | | } |
| | | |
| | | //查询该房屋的户主信息 |
| | | List<PopulationListVO> householderList = this.baseMapper.getGridVillageBuildingPopulationList(buildingHouseDetailVO.getId(),1,null); |
| | | if(!householderList.isEmpty()){ |
| | | householderList.forEach(householder -> { |
| | | try { |
| | | Integer age = IdcardUtil.getAgeByIdCard(householder.getCardNo()); |
| | | householder.setAge(age); |
| | | }catch (Exception e){ |
| | | log.error("身份证号码转换年龄失败,人员id:" + householder.getId()); |
| | | } |
| | | }); |
| | | buildingHouseDetailVO.setHouseholderList(householderList); |
| | | } |
| | | //查询该房屋的住户信息 |
| | | List<PopulationListVO> populationList = this.baseMapper.getGridVillageBuildingPopulationList(buildingHouseDetailVO.getId(),null,1); |
| | | if(!populationList.isEmpty()){ |
| | | populationList.forEach(population -> { |
| | | try { |
| | | Integer age = IdcardUtil.getAgeByIdCard(population.getCardNo()); |
| | | population.setAge(age); |
| | | }catch (Exception e){ |
| | | log.error("身份证号码转换年龄失败,人员id:" + population.getId()); |
| | | } |
| | | }); |
| | | buildingHouseDetailVO.setPopulationList(populationList); |
| | | } |
| | | } |
| | | return R.ok(buildingHouseDetailVO); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.grid.AddComMngHousePopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.DelComMngHousePopulationDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationHouseUserDAO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationHouseUserDO; |
| | | import com.panzhihua.service_community.service.ComMngPopulationHouseUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | @Service |
| | | public class ComMngPopulationHouseUserServiceImpl extends ServiceImpl<ComMngPopulationHouseUserDAO, ComMngPopulationHouseUserDO> implements ComMngPopulationHouseUserService { |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addBuildingHousePopulation(AddComMngHousePopulationDTO housePopulationDTO){ |
| | | List<ComMngPopulationHouseUserDO> populationHouseUserDOList = new ArrayList<>(); |
| | | if(!housePopulationDTO.getPopulationIds().isEmpty()){ |
| | | housePopulationDTO.getPopulationIds().forEach(housePopulationId -> { |
| | | ComMngPopulationHouseUserDO populationHouseUserDO = this.baseMapper.selectOne( |
| | | new QueryWrapper<ComMngPopulationHouseUserDO>().lambda() |
| | | .eq(ComMngPopulationHouseUserDO::getHouseId,housePopulationDTO.getHouseId()) |
| | | .eq(ComMngPopulationHouseUserDO::getPopulId,housePopulationId)); |
| | | if(populationHouseUserDO == null){ |
| | | populationHouseUserDO = new ComMngPopulationHouseUserDO(); |
| | | populationHouseUserDO.setId(Snowflake.getId()); |
| | | populationHouseUserDO.setHouseId(housePopulationDTO.getHouseId()); |
| | | populationHouseUserDO.setPopulId(housePopulationId); |
| | | populationHouseUserDO.setRelationId(ComMngPopulationHouseUserDO.relationId.zizhu); |
| | | populationHouseUserDO.setStartAt(new Date()); |
| | | populationHouseUserDO.setCreateAt(new Date()); |
| | | if(housePopulationDTO.getType().equals(AddComMngHousePopulationDTO.type.hz)){ |
| | | populationHouseUserDO.setRelation(ComMngPopulationHouseUserDO.relation.hz); |
| | | } |
| | | populationHouseUserDOList.add(populationHouseUserDO); |
| | | }else{ |
| | | if(housePopulationDTO.getType().equals(AddComMngHousePopulationDTO.type.hz)){ |
| | | populationHouseUserDO.setRelation(ComMngPopulationHouseUserDO.relation.hz); |
| | | } |
| | | populationHouseUserDO.setRelationId(ComMngPopulationHouseUserDO.relationId.zizhu); |
| | | this.baseMapper.updateById(populationHouseUserDO); |
| | | } |
| | | }); |
| | | } |
| | | this.saveBatch(populationHouseUserDOList); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R delBuildingHousePopulation(DelComMngHousePopulationDTO housePopulationDTO){ |
| | | |
| | | ComMngPopulationHouseUserDO houseUserDO = this.baseMapper.selectById(housePopulationDTO.getHousePopulationId()); |
| | | if(houseUserDO == null){ |
| | | return R.fail("未查询到居住用户数据"); |
| | | } |
| | | if(housePopulationDTO.getType().equals(DelComMngHousePopulationDTO.type.hz)){ |
| | | if(houseUserDO.getRelationId() == null || !houseUserDO.getRelationId().equals(ComMngPopulationHouseUserDO.relationId.zizhu)){ |
| | | this.baseMapper.deleteById(housePopulationDTO.getHousePopulationId()); |
| | | }else{ |
| | | this.baseMapper.delBuildingHousePopulationRelation(housePopulationDTO.getHousePopulationId()); |
| | | } |
| | | }else{ |
| | | if(houseUserDO.getRelation() == null || !houseUserDO.getRelation().equals(ComMngPopulationHouseUserDO.relation.hz)){ |
| | | this.baseMapper.deleteById(housePopulationDTO.getHousePopulationId()); |
| | | }else{ |
| | | this.baseMapper.delBuildingHousePopulationRelationId(housePopulationDTO.getHousePopulationId()); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO; |
| | | import com.panzhihua.common.model.dtos.grid.AddComMngHousePopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.event.*; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventTransferRecordVO; |
| | | import com.panzhihua.common.model.vos.community.screen.index.*; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationListVO; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import com.panzhihua.common.model.vos.grid.admin.ComMngPopulationListVO; |
| | | import com.panzhihua.common.model.vos.screen.ComActPopulationCultureVO; |
| | | import com.panzhihua.common.model.vos.screen.ComActPopulationScreenVO; |
| | | import com.panzhihua.common.model.vos.screen.ComMngPopulationAgeVO; |
| | |
| | | + vo.getFloor() + vo.getUnitNo() + vo.getHouseNo(); |
| | | vo.setAddress(address); |
| | | |
| | | //todo 后期优化改为批量 |
| | | //先判断房屋是否存在 |
| | | ComMngPopulationHouseDO populationHouseDO = comMngPopulationHouseDAO.selectOne(new QueryWrapper<ComMngPopulationHouseDO>().lambda() |
| | | .eq(ComMngPopulationHouseDO::getCommunityId, communityId).eq(ComMngPopulationHouseDO::getVillageId, comMngVillageDO.getVillageId()) |
| | |
| | | if (populationHouseDO == null) { |
| | | //房屋信息不存在建立房屋信息 |
| | | populationHouseDO = savePopulationHouse(vo, comMngVillageDO, communityId, address, areaPath, comActDO.getName()); |
| | | vo.setHouseId(populationHouseDO.getId()); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(vo.getName()) && StringUtils.isEmpty(vo.getCardNo())) { |
| | |
| | | } else { |
| | | //如果存在人口信息,且是自用房,则更新人口默认的房屋信息 |
| | | if (vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) { |
| | | populationDO = updatePopulationHouseUse(vo, populationDO); |
| | | populationDO = updatePopulationDO(vo, populationDO); |
| | | } |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private ComMngPopulationDO updatePopulationHouseUse(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO) throws Exception { |
| | | private ComMngPopulationDO updatePopulationDO(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO) throws Exception { |
| | | populationDO.setRoad(vo.getRoad()); |
| | | populationDO.setDoorNo(vo.getDoorNo()); |
| | | populationDO.setFloor(vo.getFloor()); |
| | |
| | | populationDO.setHouseNo(vo.getHouseNo()); |
| | | populationDO.setCardNo(vo.getCardNo()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | if(vo.getIsResidence().intValue() == 1){ |
| | | populationDO.setHouseId(vo.getHouseId()); |
| | | } |
| | | if (StringUtils.isNotEmpty(populationDO.getPhone())) { |
| | | // populationDO.setPhone(AESUtil.encrypt128(populationDO.getPhone(), aesKey)); |
| | | populationDO.setPhone(populationDO.getPhone()); |
| | | } |
| | | this.baseMapper.updateById(populationDO); |
| | |
| | | populationDO.setCardNo(vo.getCardNo()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | | if(vo.getIsResidence().intValue() == 1){ |
| | | populationDO.setHouseId(vo.getHouseId()); |
| | | } |
| | | this.baseMapper.insert(populationDO); |
| | | return populationDO; |
| | | } |
| | |
| | | populationHouseDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationHouseDO.setAlley(vo.getRoad()); |
| | | populationHouseDO.setHouseNum(vo.getDoorNo()); |
| | | populationHouseDO.setCode(vo.getDoorNo()); |
| | | populationHouseDO.setStatus(vo.getIsRent()); |
| | | populationHouseDO.setCommunityId(communityId); |
| | | populationHouseDO.setFloor(vo.getFloor()); |
| | | populationHouseDO.setUnitNo(vo.getUnitNo()); |
| | | populationHouseDO.setHouseNo(vo.getHouseNo()); |
| | | populationHouseDO.setCode(vo.getHouseNo()); |
| | | populationHouseDO.setAddress(address); |
| | | populationHouseDO.setUpdateAt(new Date()); |
| | | populationHouseDO.setConstructPurpose(vo.getBuildPurpose()); |
| | |
| | | |
| | | //查询统计人口数据 |
| | | ComMngPopulationTotalVO populationTotalVO = populationDAO.getPopulationTotalByAdmin(communityId); |
| | | if(communityId.equals(2L)){ |
| | | populationTotalVO.setSpecialTotal(36); |
| | | } |
| | | statisticsVO.setPopulationTotalVO(populationTotalVO); |
| | | |
| | | return R.ok(statisticsVO); |
| | |
| | | setAgeGroup(comActPopulationScreenVO, communityId); |
| | | //统计学历 |
| | | setCultureGroup(comActPopulationScreenVO, communityId); |
| | | |
| | | //查询网格数据 |
| | | List<EventGridStatisticsVO> gridStatisticsList = this.baseMapper.getEventScreenGridData(communityId); |
| | | comActPopulationScreenVO.setGridStatisticsList(gridStatisticsList); |
| | | |
| | | //查询小区列表 |
| | | List<CivilVillageStatisticsVO> villageStatisticsList = this.baseMapper.getCivilScreenVillageList(communityId); |
| | | comActPopulationScreenVO.setVillageStatisticsList(villageStatisticsList); |
| | | |
| | | return R.ok(comActPopulationScreenVO); |
| | | } |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getGridPopulationAdminList(ComMngPopulationListDTO populationListDTO){ |
| | | IPage<ComMngPopulationListVO> populationListIPage = this.baseMapper.getGridPopulationAdminList(new Page(populationListDTO.getPageNum(),populationListDTO.getPageSize()),populationListDTO); |
| | | if(!populationListIPage.getRecords().isEmpty()){ |
| | | populationListIPage.getRecords().forEach(population -> { |
| | | try { |
| | | Integer age = IdcardUtil.getAgeByIdCard(population.getCardNo()); |
| | | population.setAge(age); |
| | | }catch (Exception e){ |
| | | log.error("当前人口身份证获取年龄失败,实有人口id:" + population.getId()); |
| | | } |
| | | //查询此用户在当前房屋是否是户主 |
| | | Integer relation = this.baseMapper.getPopulationRelationByHouseId(population.getHouseId(),population.getId()); |
| | | if(relation == null || relation != 1){ |
| | | population.setIsRelation(2); |
| | | }else{ |
| | | population.setIsRelation(1); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(populationListIPage); |
| | | } |
| | | |
| | | @Override |
| | | public R delGridPopulationAdmin(List<Long> ids){ |
| | | Integer count = this.baseMapper.getPopulationVisitingCount(ids); |
| | | if(count > 0){ |
| | | return R.ok("您选择的数据中存在被引用的,无法删除"); |
| | | } |
| | | this.baseMapper.deleteBatchIds(ids); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getBuildingHousePopulationList(PageComMngPopulationDTO populationDTO){ |
| | | |
| | | IPage<EventSpecialPopulationVO> populationVOIPage = this.baseMapper.getBuildingHousePopulationList(new Page(populationDTO.getPageNum(),populationDTO.getPageSize()),populationDTO); |
| | | if(!populationVOIPage.getRecords().isEmpty()){ |
| | | populationVOIPage.getRecords().forEach(population -> { |
| | | try { |
| | | Integer age = IdcardUtil.getAgeByIdCard(population.getIdCard()); |
| | | population.setAge(age); |
| | | }catch (Exception e){ |
| | | log.error("人员身份证转换年龄失败,人员id:" + population.getId()); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(populationVOIPage); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import com.panzhihua.common.model.dtos.grid.ComMngVillageListAppDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageComMngVillageBuildHouseAppDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | | import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingHouseVO; |
| | | import com.panzhihua.common.model.vos.grid.ComMngVillageBuildingVO; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | |
| | | public R getVillage(Long villageId){ |
| | | return R.ok(this.baseMapper.getVillageById(villageId)); |
| | | } |
| | | |
| | | /** |
| | | * 综治app-小区列表 |
| | | * @param villageListAppDTO 请求参数 |
| | | * @return 小区列表 |
| | | */ |
| | | @Override |
| | | public R getGridVillageList(ComMngVillageListAppDTO villageListAppDTO){ |
| | | return R.ok(this.baseMapper.getGridVillageList(new Page(villageListAppDTO.getPageNum(),villageListAppDTO.getPageSize()),villageListAppDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 综治app-根据小区id查询小区下楼栋列表 |
| | | * @param villageId 小区id |
| | | * @return 楼栋列表 |
| | | */ |
| | | @Override |
| | | public R getGridVillageBuildingList(Long villageId){ |
| | | |
| | | List<ComMngVillageBuildingVO> villageBuildingList = this.baseMapper.getGridVillageBuildingList(villageId); |
| | | if(!villageBuildingList.isEmpty()){ |
| | | villageBuildingList.forEach(villageBuilding -> { |
| | | if(!villageBuilding.getFloor().contains("栋")){ |
| | | villageBuilding.setFloorString(villageBuilding.getFloor() + "栋"); |
| | | } |
| | | if(!villageBuilding.getUnitNo().contains("单元")){ |
| | | villageBuilding.setUnitNoString(villageBuilding.getUnitNo() + "单元"); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(villageBuildingList); |
| | | } |
| | | |
| | | } |
| | |
| | | DateTime endDay = DateUtil.endOfMonth(date); |
| | | |
| | | int m = DateUtil.month(endDay); |
| | | // if(m == 0){ |
| | | // m = 12; |
| | | // } |
| | | // m--; |
| | | m++; |
| | | if(m == 12){ |
| | | m = 0; |
| | | } |
| | | int day = DateUtil.dayOfMonth(endDay); |
| | | int half = day/2; |
| | | String month = DateUtil.format(date,moth_format_str); |
| | |
| | | return dateList; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.LcEventVisitingTasksListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventVisitingTasksDTO; |
| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @date 2021-05-26 |
| | | * @since 1.0 |
| | | */ |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/eventvisitingtasks") |
| | |
| | | |
| | | /** |
| | | * 统计走访任务 |
| | | * |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改重点人群走访记录 |
| | | * |
| | | * @param eventVisitingTasksEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找重点人群走访记录 |
| | | * |
| | | * @param pageEventVisitingTasksDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询重点人群走访记录详细信息 |
| | | * |
| | | * @param id 重点人群走访记录 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | R<EventVisitingTasksDetailsVO> eventVisitingTasksDetails(@PathVariable("id") Long id) { |
| | | return eventVisitingTasksService.eventVisitingTasksDetails(id); |
| | | } |
| | | |
| | | /** |
| | | * 删除走访任务 |
| | | * |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @PostMapping("/delete") |
| | | R delete(@RequestParam("ids") String ids, @RequestParam("communityId") Long communityId) { |
| | | return eventVisitingTasksService.delete(ids, communityId); |
| | | R delete(@RequestBody IdDTO idDTO, @RequestParam("communityId") Long communityId){ |
| | | return eventVisitingTasksService.delete(idDTO,communityId); |
| | | } |
| | | |
| | | /** |
| | | * 需走访人员列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增走访任务 |
| | | * |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | R add(@RequestParam("ids") String ids, @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId) throws Exception { |
| | | return eventVisitingTasksService.add(ids, communityId, userId); |
| | | R add(@RequestBody IdDTO idDTO, @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId) throws Exception { |
| | | return eventVisitingTasksService.add(idDTO,communityId,userId); |
| | | } |
| | | |
| | | /** |
| | | * 走访记录 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 走访任务列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * app走访任务列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | * @throws Exception |
| | |
| | | |
| | | /** |
| | | * 导出 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * app走访详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 撤销走访 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/cancel/{id}") |
| | | R cancel(@PathVariable("id") Long id) { |
| | | return eventVisitingTasksService.cancel(id); |
| | | @PostMapping("/cancel") |
| | | R cancel(@RequestBody IdDTO idDTO){ |
| | | return eventVisitingTasksService.cancel(idDTO); |
| | | } |
| | | |
| | | /** |
| | | * 恢复 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/reset/{id}") |
| | | R reset(@PathVariable("id") Long id) { |
| | | return eventVisitingTasksService.reset(id); |
| | | @PostMapping("/reset") |
| | | R reset(@RequestBody IdDTO idDTO){ |
| | | return eventVisitingTasksService.reset(idDTO); |
| | | } |
| | | |
| | | /** |
| | | * 开始走访 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 完成走访记录 |
| | | * |
| | | * @param taskCompleteDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | |
| | | /** |
| | | * 删除走访任务 |
| | | * |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R delete(String ids, Long communityId); |
| | | R delete(IdDTO idDTO, Long communityId); |
| | | |
| | | /** |
| | | * 需走访人员列表 |
| | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R add(String ids, Long communityId, Long userId) throws Exception; |
| | | R add(IdDTO idDTO, Long communityId, Long userId) throws Exception; |
| | | |
| | | List<EventVisitingTasksVO> exportTaskList(EventTasksQuery query) throws Exception; |
| | | |
| | | /** |
| | | * 撤销 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | R cancel(Long id); |
| | | R cancel(IdDTO idDTO); |
| | | |
| | | /** |
| | | * 恢复 |
| | | * |
| | | * @param id |
| | | * @param idDTO |
| | | * @return |
| | | */ |
| | | R reset(Long id); |
| | | R reset(IdDTO idDTO); |
| | | |
| | | /** |
| | | * 开始 |
| | |
| | | public R getNearByGrid(PageEventGridNearbyDTO pageEventGridNearbyDTO) { |
| | | Page page = new Page(pageEventGridNearbyDTO.getPageNum(), pageEventGridNearbyDTO.getPageSize()); |
| | | String latLng = pageEventGridNearbyDTO.getHappentLatLng(); |
| | | if (!latLng.matches("^[\\-\\+]?(0(\\.\\d{1,10})?|([1-9](\\d)?)(\\.\\d{1,10})?|1[0-7]\\d{1}(\\.\\d{1,10})?|180\\.0{1,10}),[\\-\\+]?((0|([1-8]\\d?))(\\.\\d{1,10})?|90(\\.0{1,10})?)$")) { |
| | | // if(!latLng.matches("^[\\-\\+]?(0(\\.\\d{1,10})?|([1-9](\\d)?)(\\.\\d{1,10})?|1[0-7]\\d{1}(\\.\\d{1,10})?|180\\.0{1,10}),[\\-\\+]?((0|([1-8]\\d?))(\\.\\d{1,10})?|90(\\.0{1,10})?)$")){ |
| | | // return R.fail("经纬度参数错误"); |
| | | // } |
| | | if(!latLng.matches("[1-9][0-9](\\.[0-9]{1,6})?,[1-9][0-9]{2}(\\.[0-9]{1,6})?")){ |
| | | return R.fail("经纬度参数错误"); |
| | | } |
| | | String latLngArr[] = latLng.split(","); |
| | |
| | | |
| | | /** |
| | | * 根据网格id查询网格统计数据 |
| | | * |
| | | * @param gridId 网格id |
| | | * @return 网格统计数据 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询网格事件统计数据 |
| | | * |
| | | * @param statisticsDTO 请求参数 |
| | | * @return 网格事件统计数据 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 事件大屏查询事件列表 |
| | | * |
| | | * @param eventListDTO 请求参数 |
| | | * @return 事件列表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 特殊人群上报-社区人口数据列表 |
| | | * |
| | | * @param specialPopulationDTO 请求参数 |
| | | * @return 社区人口数据列表 |
| | | */ |
| | |
| | | if (!countMap.isEmpty()) { |
| | | workScreenVO.setResolvedNum(countMap.get("resolvedNum") == null ? 0L : Long.valueOf(countMap.get("resolvedNum").toString())); |
| | | workScreenVO.setPendingNum(countMap.get("pendingNum") == null ? 0L : Long.valueOf(countMap.get("pendingNum").toString())); |
| | | workScreenVO.setPropagandaNum(countMap.get("propagandaNum") == null ? 0L : Long.valueOf(countMap.get("propagandaNum").toString())); |
| | | workScreenVO.setPropagandaNum(countMap.get("propagandaNum")== null ? 13L : Long.valueOf(countMap.get("propagandaNum").toString())); |
| | | workScreenVO.setCurrentNum(countMap.get("currentNum") == null ? 0L : Long.valueOf(countMap.get("currentNum").toString())); |
| | | } |
| | | |
| | | //计算处理时间消耗的时间 |
| | | DateScreenVO countAvg = this.eventMapper.countByAvgCommunityId(communityId); |
| | | if (countAvg != null) { |
| | | int second = (int) (countAvg.getStartTime().getTime() - countAvg.getEndTime().getTime()) / 1000; |
| | | int second = (int) (countAvg.getEndTime().getTime() - countAvg.getStartTime().getTime())/1000; |
| | | if (second > 0) { |
| | | second = second / workScreenVO.getResolvedNum().intValue(); |
| | | workScreenVO.setAvgCost(second); |
| | |
| | | DateTime endDay = DateUtil.endOfMonth(date); |
| | | |
| | | int m = DateUtil.month(endDay); |
| | | // if(m == 0){ |
| | | // m = 11; |
| | | // } |
| | | // m--; |
| | | m++; |
| | | if(m == 12){ |
| | | m = 0; |
| | | } |
| | | int day = DateUtil.dayOfMonth(endDay); |
| | | int half = day / 2; |
| | | String month = DateUtil.format(date, moth_format_str); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | EventServiceImpl service = new EventServiceImpl(); |
| | | List<EventWorkVO> list = service.listHalfYearByDyn(); |
| | | System.out.println(list); |
| | | String content = "30,104"; |
| | | String re = "[1-9][0-9](\\.[0-9]{1,6})?,[1-9][0-9]{2}(\\.[0-9]{1,6})?"; |
| | | |
| | | System.out.println(content.matches(re)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.enums.EventTasksStatusEnum; |
| | | import com.panzhihua.common.enums.PopulPoliticalOutlookEnum; |
| | | import com.panzhihua.common.model.dtos.EventResourceDTO; |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | |
| | | /** |
| | | * 修改重点人群走访记录 |
| | | * |
| | | * @param eventVisitingTasksEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找重点人群走访记录 |
| | | * |
| | | * @param pageEventVisitingTasksDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | @Transactional |
| | | @Override |
| | | public R delete(String ids, Long communityId) { |
| | | String[] idarr = ids.split(","); |
| | | public R delete(IdDTO idDTO, Long communityId) { |
| | | StringBuilder rt = new StringBuilder(); |
| | | String[] idarr = idDTO.getId().split(","); |
| | | for (String id : idarr) { |
| | | if (StringUtils.isEmpty(id)) { |
| | | continue; |
| | | } |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectOne(new QueryWrapper<EventVisitingTasksDO>().eq("id", Long.valueOf(id)).eq("grid_member_community", communityId)); |
| | | if (eventVisitingTasksDO == null) { |
| | | throw new RuntimeException("无权限"); |
| | | String error = toDelete(Long.valueOf(id)); |
| | | if(!StringUtils.isEmpty(error)){ |
| | | rt.append(rt); |
| | | } |
| | | eventVisitingTasksMapper.deleteById(Long.valueOf(id)); |
| | | } |
| | | if(!StringUtils.isEmpty(rt)){ |
| | | return R.fail("部分删除失败:"+rt.toString()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | private String toDelete(Long id) { |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | if(eventVisitingTasksDO == null){ |
| | | return "["+id+"]数据不存在;"; |
| | | } |
| | | if(!Objects.equals(eventVisitingTasksDO.getEventStatus(),EventTasksStatusEnum.DZF.getCode())){ |
| | | return "["+eventVisitingTasksDO.getVisiterName()+"]状态不可删除;"; |
| | | } |
| | | eventVisitingTasksMapper.deleteById(Long.valueOf(id)); |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public R visitorList(EventVisitListQuery query) { |
| | | IPage<EventVisitListVO> page = eventVisitingTasksMapper.visitorList(new Page(query.getPageNum(), query.getPageSize()), query); |
| | | page.getRecords().stream().forEach(e -> { |
| | | List<EventVisitingTasksDO> list = eventVisitingTasksMapper.selectList(new QueryWrapper<EventVisitingTasksDO>().eq("visiter_id", e.getId()).orderByDesc("id")); |
| | | List<EventVisitingTasksDO> list = eventVisitingTasksMapper.selectList(new QueryWrapper<EventVisitingTasksDO>().eq("visiter_id",e.getId()).orderByDesc("id").last("limit 0,1")); |
| | | if (!CollectionUtils.isEmpty(list)) { |
| | | e.setCreateAt(list.get(0).getCreateAt()); |
| | | e.setEventStatus(list.get(0).getEventStatus()); |
| | |
| | | if (eventVisitingTasksDO != null) { |
| | | EventVisitingTasksDetailsVO eventVisitingTasksDetailsVO = new EventVisitingTasksDetailsVO(); |
| | | BeanUtils.copyProperties(eventVisitingTasksDO, eventVisitingTasksDetailsVO); |
| | | JSONObject jsonObject = JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson()); |
| | | eventVisitingTasksDetailsVO.setTableContentJson(JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson())); |
| | | if(jsonObject != null && jsonObject.get("check") != null){ |
| | | eventVisitingTasksDetailsVO.setOption(jsonObject.get("check").toString()); |
| | | } |
| | | return R.ok(eventVisitingTasksDetailsVO); |
| | | } |
| | | return R.fail(); |
| | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R add(String ids, Long communityId, Long userId) throws Exception { |
| | | Map<String, Object> map = eventVisitingTasksMapper.findUserByCommunityId(communityId, 6); |
| | | if (CollectionUtils.isEmpty(map)) { |
| | | return R.fail("网格员不存在"); |
| | | } |
| | | String[] id = ids.split(","); |
| | | public R add(IdDTO idDTO, Long communityId, Long userId) throws Exception { |
| | | |
| | | // Map<String,Object> map = eventVisitingTasksMapper.findUserByCommunityId(communityId,6); |
| | | // if(CollectionUtils.isEmpty(map)){ |
| | | // return R.fail("网格员不存在"); |
| | | // } |
| | | |
| | | StringBuilder rt = new StringBuilder(); |
| | | String[] id = idDTO.getId().split(","); |
| | | for (String idstr : id) { |
| | | if (StringUtils.isEmpty(idstr)) { |
| | | continue; |
| | | } |
| | | addVisitingTask(Long.valueOf(idstr), map, communityId, userId); |
| | | String error = addVisitingTask(Long.valueOf(idstr),communityId,userId); |
| | | if(!StringUtils.isEmpty(error)){ |
| | | rt.append(error); |
| | | } |
| | | |
| | | } |
| | | if(!StringUtils.isEmpty(rt)){ |
| | | return R.fail("部分新增失败"+rt.toString()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return page.getRecords(); |
| | | } |
| | | |
| | | private String addVisitingTask(Long id, Long communityId,Long userId) throws Exception{ |
| | | |
| | | private void addVisitingTask(Long id, Map<String, Object> gridMap, Long communityId, Long userId) throws Exception { |
| | | Map<String,Object> map = eventVisitingTasksMapper.findPopulationById(id); |
| | | if(CollectionUtils.isEmpty(map)){ |
| | | return "被访问人ID["+id+"]不存在;"; |
| | | } |
| | | |
| | | Integer count = eventVisitingTasksMapper.countNoneComplete(id); |
| | | if (count > 0) { |
| | | return; |
| | | } |
| | | Map<String, Object> map = eventVisitingTasksMapper.findPopulationById(id); |
| | | if (CollectionUtils.isEmpty(map)) { |
| | | return; |
| | | return "被访问人["+map.get("name")+"]只能同时存在一条待走访任务;"; |
| | | } |
| | | EventVisitingTasksDO visitingTasksDO = new EventVisitingTasksDO(); |
| | | // visitingTasksDO.setGridMemberStreet(Long.valueOf(gridMap.get("street_id").toString())); |
| | |
| | | } |
| | | |
| | | eventVisitingTasksMapper.insert(visitingTasksDO); |
| | | return null; |
| | | } |
| | | |
| | | private List<String> getOption(String label) { |
| | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R cancel(Long id) { |
| | | public R cancel(IdDTO idDTO) { |
| | | |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(Long.valueOf(idDTO.getId())); |
| | | if (eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.DZF.getCode()) { |
| | | return R.fail("当前状态不可撤销"); |
| | | } |
| | | int rt = eventVisitingTasksMapper.cancel(id, EventTasksStatusEnum.YCX.getCode()); |
| | | int rt = eventVisitingTasksMapper.cancel(eventVisitingTasksDO.getId(),EventTasksStatusEnum.YCX.getCode()); |
| | | if (rt > 0) { |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R reset(Long id) { |
| | | public R reset(IdDTO idDTO) { |
| | | |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(Long.valueOf(idDTO.getId())); |
| | | if (eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.YCX.getCode()) { |
| | | return R.fail("当前状态不可恢复"); |
| | | } |
| | | int rt = eventVisitingTasksMapper.updateEventStatus(id, EventTasksStatusEnum.DZF.getCode()); |
| | | int rt = eventVisitingTasksMapper.updateEventStatus(eventVisitingTasksDO.getId(),EventTasksStatusEnum.DZF.getCode()); |
| | | if (rt > 0) { |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<LcEventVisitingTasksListDTO> getUnUploadVisitingTask() { |
| | | List<LcEventVisitingTasksListDTO> lcEventVisitingTasksList = new ArrayList<>(10); |
| | | List<LcEventVisitingTasksListDTO> lcEventVisitingTasksList =new ArrayList<>(); |
| | | List<EventVisitingTasksDO> eventVisitingTasksList = baseMapper.selectList( |
| | | new QueryWrapper<EventVisitingTasksDO>() |
| | | .eq("lc_upload", false) |
| | |
| | | </select> |
| | | |
| | | <select id="getGridMemberLists" resultType="com.panzhihua.common.model.vos.grid.EventGridMemberAdminVO"> |
| | | select user_id,nick_name from sys_user where community_id = #{communityId} and `type` = 6 |
| | | select user_id,nick_name from sys_user where `type` = 6 |
| | | </select> |
| | | |
| | | <select id="getGridMember" resultType="com.panzhihua.common.model.vos.grid.GridMemberAdminVO"> |
| | |
| | | e.grid_member_name like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.event_title like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.happen_address like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.order_sn like concat('%', #{pageEventManageDTO.keyWord},'%') |
| | | e.order_sn like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.event_clazz like concat('%', #{pageEventManageDTO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="pageEventManageDTO.revokeType!=null"> |
| | |
| | | e.grid_member_name like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.event_title like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.happen_address like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.order_sn like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') |
| | | e.order_sn like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.propaganda_type like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | egd.grid_name like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="pagePublicityEventCommunityDTO.revokeType!=null"> |
| | |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_status = 2 |
| | | e.event_status = 2 |
| | | AND e.event_process_status = 2 |
| | | ) AS handleEventTotal, |
| | | ( |
| | |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_category = 2 |
| | | e.event_category = 2 |
| | | AND e.event_status = 2 |
| | | ) AS propagandaEducationTotal, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 AND community_id = #{communityId} ) AS easyPhotoTotal |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 ) AS easyPhotoTotal |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_status = 2 |
| | | e.event_status = 2 |
| | | </select> |
| | | |
| | | <select id="getEventCountByGridIds" resultType="Integer"> |
| | |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_status = 2 |
| | | AND e.event_deal_status in (1,2,3,4,6) |
| | | ORDER BY |
| | | e.create_at DESC |
| | | LIMIT 10 |
| | |
| | | */ |
| | | @Override |
| | | public R listComMngUserTag(Long communityId) { |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO.selectList(new QueryWrapper<ComMngUserTagDO>().lambda().eq(ComMngUserTagDO::getCommunityId, communityId)); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO.selectList(new QueryWrapper<ComMngUserTagDO>().or().lambda().eq(ComMngUserTagDO::getSysFlag,1).or().eq(ComMngUserTagDO::getCommunityId, communityId)); |
| | | if (ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | return R.fail(); |
| | | } |