Merge branch 'test' into 'master'
Test
See merge request root/zhihuishequ!87
| | |
| | | vo.setHouseHold(oneData.get(27).trim()); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(28))){ |
| | | vo.setHouseHold(oneData.get(28).trim()); |
| | | vo.setIsResidence(0); |
| | | }else{ |
| | | vo.setIsResidence(PopulIsOkEnum.getCodeByName(oneData.get(28).trim())); |
| | | } |
| | |
| | | package com.panzhihua.common.model.dtos; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author xyh |
| | |
| | | @ApiModel("id参数") |
| | | public class IdDTO { |
| | | |
| | | @NotNull(message = "id不能为空") |
| | | @ApiModelProperty("id") |
| | | private String id; |
| | | |
| | | public String getId() { |
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; |
| | | |
| | | } |
| | |
| | | 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; |
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/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); |
| | | } |
| | |
| | | /** |
| | | * 撤销走访 |
| | | * |
| | | * @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 |
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 com.alibaba.excel.EasyExcel; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksAddDTO; |
| | | 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.*; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | |
| | | 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(@RequestBody IdDTO idDTO){ |
| | | public R delete(@RequestBody @Valid IdDTO idDTO){ |
| | | return gridService.delete(idDTO,this.getCommunityId()); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "新增走访任务") |
| | | public R add(@RequestBody IdDTO idDTO){ |
| | | 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); |
| | | } |
| | | |
| | | |
| | |
| | | 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 org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"居民模块"}) |
| | |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private GridService gridService; |
| | | |
| | | @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); |
| | | } |
| | | |
| | | @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); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | "AND cmp.house_id is null " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.communityId != null'>" + |
| | | "AND cmp.community_id = #{populationListDTO.communityId} " + |
| | | "AND cmp.act_id = #{populationListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.politicalOutlook != null'>" + |
| | | "AND cmp.political_outlook = #{populationListDTO.politicalOutlook} " + |
| | |
| | | @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, " + |
| | | " 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 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.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; |
| | |
| | | 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()); |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 撤销走访 |
| | | * @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 |
| | | * @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(","); |
| | |
| | | } |
| | | |
| | | 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)); |
| | | } |
| | | |
| | | } |
| | |
| | | if(!StringUtils.isEmpty(error)){ |
| | | rt.append(rt); |
| | | } |
| | | eventVisitingTasksMapper.deleteById(Long.valueOf(id)); |
| | | } |
| | | if(!StringUtils.isEmpty(rt)){ |
| | | return R.fail("部分删除失败:"+rt.toString()); |
| | |
| | | if(!Objects.equals(eventVisitingTasksDO.getEventStatus(),EventTasksStatusEnum.DZF.getCode())){ |
| | | return "["+eventVisitingTasksDO.getVisiterName()+"]状态不可删除;"; |
| | | } |
| | | eventVisitingTasksMapper.deleteById(Long.valueOf(id)); |
| | | return null; |
| | | } |
| | | |
| | |
| | | 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()); |
| | |
| | | |
| | | @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(); |
| | | } |
| | |
| | | </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"> |
| | |
| | | */ |
| | | @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(); |
| | | } |