|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.panzhihua.common.model.dtos.grid.AddComMngHousePopulationDTO; | 
|---|
|  |  |  | import com.panzhihua.common.model.dtos.grid.DelComMngHousePopulationDTO; | 
|---|
|  |  |  | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  | import org.springframework.validation.annotation.Validated; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | 
|---|
|  |  |  | private ComMngPopulationHouseService comMngPopulationHouseService; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private ComMngVillageService comMngVillageService; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private ComMngPopulationHouseUserService comMngPopulationHouseUserService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 小程序用户车辆登记 | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping("/area/all") | 
|---|
|  |  |  | R getCityTreeByProvinceCode(@RequestParam(value = "provinceAdcode") Integer provinceAdcode) { | 
|---|
|  |  |  | return comMngProvinceService.getCityTreeByProvinceCode(provinceAdcode); | 
|---|
|  |  |  | public R getCityTreeByProvinceCode(@RequestParam(value = "provinceAdcode") Integer provinceAdcode, | 
|---|
|  |  |  | @RequestParam(value = "areaCode", required = false) String areaCode) { | 
|---|
|  |  |  | return comMngProvinceService.getCityTreeByProvinceCode(provinceAdcode, areaCode); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping("/population/page") | 
|---|
|  |  |  | public R pagePopulation(@RequestBody ComMngPopulationDTO comMngPopulationVO) { | 
|---|
|  |  |  | return comMngPopulationService.pagePopulation(comMngPopulationVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 社区后台老人导出管理列表 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param comMngPopulationVO | 
|---|
|  |  |  | *            查询参数 | 
|---|
|  |  |  | * @return 实有人口分页查询结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/population/exportOld") | 
|---|
|  |  |  | public R exportOld(@RequestBody ComMngPopulationDTO comMngPopulationVO) { | 
|---|
|  |  |  | return comMngPopulationService.exportOld(comMngPopulationVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据身份证查询实有人口信息 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping("/population/selectByIdCard") | 
|---|
|  |  |  | public R selectByIdCard(@RequestParam("idCard") String idCard){ | 
|---|
|  |  |  | ComMngPopulationDO comMngPopulationDO=comMngPopulationService.getPopulationByCardNo(idCard); | 
|---|
|  |  |  | if(comMngPopulationDO!=null){ | 
|---|
|  |  |  | return R.ok(comMngPopulationDO.getAddress()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.fail(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 批量删除实有人口 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param Ids | 
|---|
|  |  |  | * @param ids | 
|---|
|  |  |  | *            删除id集合 | 
|---|
|  |  |  | * @return 删除结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/population/delete") | 
|---|
|  |  |  | public R deletePopulations(@RequestBody List<Long> Ids) { | 
|---|
|  |  |  | return comMngPopulationService.deletePopulations(Ids); | 
|---|
|  |  |  | public R deletePopulations(@RequestBody List<Long> ids, Long communityId) { | 
|---|
|  |  |  | return comMngPopulationService.deletePopulations(ids,communityId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | public R specialInputUser(@RequestBody PageInputUserDTO pageInputUserDTO) { | 
|---|
|  |  |  | return comMngPopulationService.specialInputUser(pageInputUserDTO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 导出特殊群体 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param pageInputUserDTO | 
|---|
|  |  |  | *            请求参数 | 
|---|
|  |  |  | * @return 特殊群体列表 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/special/export") | 
|---|
|  |  |  | public R specialInputUserExport(@RequestBody PageInputUserDTO pageInputUserDTO) { | 
|---|
|  |  |  | return comMngPopulationService.specialInputUserExport(pageInputUserDTO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 删除特殊群体人员 | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return 删除结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/special/delete") | 
|---|
|  |  |  | public R deleteSpecialInputUser(@RequestParam(value = "id") Long id) { | 
|---|
|  |  |  | return comMngPopulationService.deleteSpecialInputUser(id); | 
|---|
|  |  |  | public R deleteSpecialInputUser(@RequestParam(value = "id") Long id,@RequestParam(value = "communityId") Long communityId) { | 
|---|
|  |  |  | return comMngPopulationService.deleteSpecialInputUser(id,communityId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询房屋二级级联菜单后台 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param cascadeHouseDTO | 
|---|
|  |  |  | *            请求参数 | 
|---|
|  |  |  | * @return 菜单列表 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/population/second/listBack") | 
|---|
|  |  |  | public R getSecondHouse(@RequestBody CascadeHouseDTO cascadeHouseDTO) { | 
|---|
|  |  |  | return comMngPopulationHouseService.getSecondHouse(cascadeHouseDTO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 分页查询房屋列表 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param populationHouseAdminDTO | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping("/population/house/edit") | 
|---|
|  |  |  | public R editHouse(@RequestBody ComMngPopulationHouseEditAdminDTO houseEditAdminDTO) { | 
|---|
|  |  |  | return comMngPopulationHouseService.editHouse(houseEditAdminDTO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 新增实有房屋信息 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param houseEditAdminDTO | 
|---|
|  |  |  | *            请求参数 | 
|---|
|  |  |  | * @return 编辑结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/population/house/insert") | 
|---|
|  |  |  | public R insertHouse(@RequestBody ComMngPopulationHouseInsertAdminDTO houseEditAdminDTO) { | 
|---|
|  |  |  | return comMngPopulationHouseService.insertHouse(houseEditAdminDTO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | public R villageStatistics(@RequestParam("communityId") Long communityId) { | 
|---|
|  |  |  | return comMngVillageService.villageStatistics(communityId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 编辑实有房屋信息 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param comMngPopulationHouseUserVO | 
|---|
|  |  |  | *            请求参数 | 
|---|
|  |  |  | * @return 编辑结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/population/house/user/edit") | 
|---|
|  |  |  | public R editHouseUser(@RequestBody ComMngPopulationHouseUserVO comMngPopulationHouseUserVO) { | 
|---|
|  |  |  | return comMngPopulationHouseUserService.updateAll(comMngPopulationHouseUserVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 新增实有房屋信息 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param comMngPopulationHouseUserVO | 
|---|
|  |  |  | *            请求参数 | 
|---|
|  |  |  | * @return 编辑结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/population/house/user/insert") | 
|---|
|  |  |  | public R insertHouseUser(@RequestBody ComMngPopulationHouseUserVO comMngPopulationHouseUserVO) { | 
|---|
|  |  |  | return comMngPopulationHouseUserService.insert(comMngPopulationHouseUserVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据房屋id列表删除房屋信息 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param comMngPopulationHouseUserVO | 
|---|
|  |  |  | *            请求参数 | 
|---|
|  |  |  | * @return 删除结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/population/house/user/delete") | 
|---|
|  |  |  | public R deleteHousesUser(@RequestBody ComMngPopulationHouseUserVO comMngPopulationHouseUserVO) { | 
|---|
|  |  |  | return comMngPopulationHouseUserService.delete(comMngPopulationHouseUserVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据id查询 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param id | 
|---|
|  |  |  | *            请求参数 | 
|---|
|  |  |  | * @return 删除结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping("/population/house/user/detail") | 
|---|
|  |  |  | public R detailHousesUser(@RequestParam("id") Long id) { | 
|---|
|  |  |  | return comMngPopulationHouseUserService.detail(id); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 历史数据人员类型填充 | 
|---|
|  |  |  | * @param newVoList | 
|---|
|  |  |  | * @param communityId | 
|---|
|  |  |  | * @param userId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/history/filled") | 
|---|
|  |  |  | public R filledPopulationPersonType(@RequestBody List<ComMngPopulationServeExcelVO> newVoList, | 
|---|
|  |  |  | @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId) { | 
|---|
|  |  |  | return comMngPopulationService.filledPopulationPersonType(newVoList, communityId, userId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|