| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.user.UserElectronicFileVO; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.service_community.service.*; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | private ComMngProvinceService comMngProvinceService; |
| | | @Resource |
| | | private ComMngPopulationService comMngPopulationService; |
| | | @Resource |
| | | private ComMngPopulationHouseService comMngPopulationHouseService; |
| | | @Resource |
| | | private ComMngVillageService comMngVillageService; |
| | | |
| | | |
| | | /** |
| | | * 小程序用户车辆登记 |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/car/save") |
| | | public R saveComMngCar(@RequestBody ComMngCarSaveDTO comMngCarSaveDTO) { |
| | | public R saveComMngCar(@Validated({AddGroup.class}) @RequestBody ComMngCarSaveDTO comMngCarSaveDTO) { |
| | | return comMngCarService.saveComMngCar(comMngCarSaveDTO); |
| | | } |
| | | |
| | |
| | | return comMngRealCompanyService.detailComMngRealCompany(id); |
| | | } |
| | | |
| | | @GetMapping("/company/belongs") |
| | | @PostMapping("/company/belongs") |
| | | public R belongsComMngRealCompany(@RequestBody ComMngRealCompanyBelongsDTO comMngRealCompanyBelongsDTO) { |
| | | return comMngRealCompanyService.belongsComMngRealCompany(comMngRealCompanyBelongsDTO); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/population/import") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R listSavePopulationExcelVO(@RequestBody List<ComMngPopulationServeExcelVO> list, @RequestParam(value = "communityId") Long communityId){ |
| | | public R listSavePopulationExcelVO(@RequestBody List<ComMngPopulationServeExcelVO> list, @RequestParam(value = "communityId") Long communityId) throws Exception{ |
| | | return comMngPopulationService.listSavePopulation(list,communityId); |
| | | } |
| | | |
| | | /** |
| | | * 确认导入实有人口(有则更新,无则新建) |
| | | * @param list 用户信息 |
| | | * @param communityId 社区id |
| | | * @return 导入结果 |
| | | */ |
| | | @PostMapping("/population/import/confirm") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R listSavePopulationConfirm(@RequestBody List<ComMngPopulationServeExcelVO> list, @RequestParam(value = "communityId") Long communityId){ |
| | | return comMngPopulationService.listSavePopulationConfirm(list,communityId); |
| | | } |
| | | |
| | | /** |
| | | * 根据实有人口id查询详情 |
| | | * @param populationId 实有人口id |
| | | * @return 实有人口详情查询结果 |
| | | */ |
| | | @PostMapping("/population/detail") |
| | | public R detailPopulation(@RequestParam(value = "populationId") Long populationId) { |
| | | return comMngPopulationService.detailPopulation(populationId); |
| | | } |
| | | |
| | | /** |
| | | * 查询实有人口电子档信息 |
| | | * @param populationId 实有人口id |
| | | * @return 实有人口电子档信息 |
| | | */ |
| | | @PostMapping("/population/electronicArchives") |
| | | public R electronicArchivesPopulation(@RequestParam(value = "populationId") Long populationId) { |
| | | return comMngPopulationService.electronicArchivesPopulation(populationId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据实有人口id修改标签列表 |
| | | * @param populationTagDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/population/editTag") |
| | | public R editTagPopulation(@RequestBody ComMngPopulationTagDTO populationTagDTO) { |
| | | return comMngPopulationService.editTagPopulation(populationTagDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据实有人口身份证修改标签列表 |
| | | * |
| | | * @param comMngPopulationTagCardNoDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/cardNo/population/editTag") |
| | | public R editTagPopulationByCardNo(@RequestBody ComMngPopulationTagCardNoDTO comMngPopulationTagCardNoDTO) { |
| | | return comMngPopulationService.editTagPopulationByCardNo(comMngPopulationTagCardNoDTO); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除实有人口 |
| | | * @param Ids 删除id集合 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/population/delete") |
| | | public R deletePopulations(@RequestBody List<Long> Ids) { |
| | | return comMngPopulationService.deletePopulations(Ids); |
| | | } |
| | | |
| | | /** |
| | | * 根据社区id查询所有实有人口 |
| | | * @param communityId 社区id |
| | | * @return 查询结果 |
| | | */ |
| | | @PostMapping("/population/getAll") |
| | | public R getPopulationListByCommunityId(@RequestParam(value = "communityId") Long communityId) { |
| | | return comMngPopulationService.getPopulationListByCommunityId(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 根据id集合查询实有人口 |
| | | * @param Ids 实有人口id集合 |
| | | * @return 查询结果 |
| | | */ |
| | | @PostMapping("/population/getList") |
| | | public R getPopulationLists(@RequestBody List<Long> Ids) { |
| | | return comMngPopulationService.getPopulationLists(Ids); |
| | | } |
| | | |
| | | /** |
| | | * 编辑实有人口 |
| | | * @param populationEditDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/population/edit") |
| | | R editPopulation(@RequestBody ComMngPopulationEditDTO populationEditDTO,@RequestParam("communityId") Long communityId) throws Exception{ |
| | | return comMngPopulationService.editPopulation(populationEditDTO, communityId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询特殊群体 |
| | | * @param pageInputUserDTO 请求参数 |
| | | * @return 特殊群体列表 |
| | | */ |
| | | @PostMapping("/special/page") |
| | | public R specialInputUser(@RequestBody PageInputUserDTO pageInputUserDTO) { |
| | | return comMngPopulationService.specialInputUser(pageInputUserDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除特殊群体人员 |
| | | * @param id 特殊群体id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/special/delete") |
| | | public R deleteSpecialInputUser(@RequestParam(value = "id") Long id){ |
| | | return comMngPopulationService.deleteSpecialInputUser(id); |
| | | } |
| | | |
| | | /** |
| | | * 编辑实有人口_电子档案 |
| | | * @param userElectronicFileVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/population/edit/electronicArchives") |
| | | R editPopulation(@RequestBody UserElectronicFileVO userElectronicFileVO){ |
| | | return comMngPopulationService.editUserElectronicFile(userElectronicFileVO); |
| | | } |
| | | |
| | | /** |
| | | * 实有人口统计 |
| | | * @param communityId 社区id |
| | | * @return 统计结果 |
| | | */ |
| | | @PostMapping("/population/statistics") |
| | | public R getPopulationTotalByAdmin(@RequestParam("communityId") Long communityId) { |
| | | return comMngPopulationService.getPopulationTotalByAdmin(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 查询房屋级联菜单 |
| | | * @param cascadeHouseDTO 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @PostMapping("/population/cascade/list") |
| | | public R getCascadeHouseAddress(@RequestBody CascadeHouseDTO cascadeHouseDTO){ |
| | | return comMngPopulationHouseService.getCascadeHouseAddress(cascadeHouseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询房屋列表 |
| | | * @param populationHouseAdminDTO 请求参数 |
| | | * @return 房屋列表 |
| | | */ |
| | | @PostMapping("/population/page/house") |
| | | public R getPageHouse(@RequestBody ComMngPopulationHouseAdminDTO populationHouseAdminDTO){ |
| | | return comMngPopulationHouseService.getPageHouse(populationHouseAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查询实有房屋信息 |
| | | * @param houseId 房屋id |
| | | * @return 房屋信息 |
| | | */ |
| | | @PostMapping("/population/house/detail") |
| | | public R getHouseDetail(@RequestParam(value = "houseId") Long houseId) { |
| | | return comMngPopulationHouseService.getHouseDetail(houseId); |
| | | } |
| | | |
| | | /** |
| | | * 编辑实有房屋信息 |
| | | * @param houseEditAdminDTO 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("/population/house/edit") |
| | | public R editHouse(@RequestBody ComMngPopulationHouseEditAdminDTO houseEditAdminDTO) { |
| | | return comMngPopulationHouseService.editHouse(houseEditAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据房屋id列表删除房屋信息 |
| | | * @param Ids 请求参数 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/population/house/delete") |
| | | public R deleteHouses(@RequestBody List<Long> Ids){ |
| | | return comMngPopulationHouseService.deleteHouses(Ids); |
| | | } |
| | | |
| | | /** |
| | | * 实有房屋统计 |
| | | * @param communityId 社区id |
| | | * @return 统计结果 |
| | | */ |
| | | @PostMapping("/population/house/statistics") |
| | | public R getHouseTotalByAdmin(@RequestParam("communityId") Long communityId) { |
| | | return comMngPopulationHouseService.getHouseTotalByAdmin(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 根据社区id查询社区所有省市区 |
| | | * @param communityId 社区id |
| | | * @return 社区所在省市区 |
| | | */ |
| | | @PostMapping("/village/getRegion") |
| | | public R getRegion(@RequestParam("communityId") Long communityId) { |
| | | return comMngPopulationHouseService.getRegion(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 统计社区内小区数量 |
| | | * @param communityId 社区id |
| | | * @return 统计小区数量 |
| | | */ |
| | | @PostMapping("/village/statistics") |
| | | public R villageStatistics(@RequestParam("communityId") Long communityId) { |
| | | return comMngVillageService.villageStatistics(communityId); |
| | | } |
| | | |
| | | } |