Merge remote-tracking branch 'origin/test' into test
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationService.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
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.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; |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | public class ComMngPopulationListVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("姓名") |
| | |
| | | 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.neighbor.*; |
| | |
| | | @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); |
| | | } |
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); |
| | | } |
| | |
| | | @ApiOperation(value = "居民列表@lyq",response = ComMngPopulationListVO.class) |
| | | @PostMapping("/list") |
| | | public R list(@RequestBody ComMngPopulationListDTO populationListDTO){ |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | populationListDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | // LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | // populationListDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return communityService.getGridPopulationList(populationListDTO); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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.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.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; |
| | |
| | | " </script>") |
| | | Integer getPopulationVisitingCount(@Param("ids") List<Long> ids); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " cmp.id, " + |
| | | " cmp.`name`, " + |
| | | " cmp.card_no as idCard, " + |
| | | " cmp.label, " + |
| | | " cmp.sex, " + |
| | | " IFNULL( cmp.phone, '暂无' ) as 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`, " + |
| | | " IFNULL( cmp.phone, '暂无' ) as 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); |
| | | |
| | | } |
| | |
| | | @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; |
| | |
| | | |
| | | R delGridPopulationAdmin(List<Long> ids); |
| | | |
| | | R getBuildingHousePopulationList(PageComMngPopulationDTO populationDTO); |
| | | |
| | | |
| | | |
| | | R binding(); |
| | | } |
| | |
| | | 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.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; |
| | |
| | | //不存在实有人口,则新增 |
| | | populationDO = savePopulationDO(vo, comActDO, comMngVillageDO); |
| | | } else { |
| | | //如果存在人口信息,且是自用房或是居住地,则更新人口默认的房屋信息 |
| | | if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | | //如果存在人口信息,且是自用房,则更新人口默认的房屋信息 |
| | | if (vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) { |
| | | populationDO = updatePopulationDO(vo, populationDO); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
| | |
| | | </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"> |
| | |
| | | `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"> |