| | |
| | | |
| | | 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(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 导入结果 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @PostMapping("/population/importLowSecurity") |
| | | @PostMapping("population/importLowSecurity") |
| | | public R listSavePopulationLowSecurityExcelVO(@RequestBody List<ComMngPopulationLowSecurityExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId) { |
| | | return comMngPopulationService.listSaveLowSecurityPopulation(list, communityId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 批量导入高龄老人 listSavePopulationElderExcelVO 批量导入高龄老人 |
| | | * @param list 高龄老人数据 |
| | | * @param communityId 社区id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @PostMapping("population/importElder") |
| | | public R listSavePopulationElderExcelVO(@RequestBody List<ComMngPopulationElderExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId){ |
| | | return comMngPopulationService.listSaveEdlerPopulation(list, communityId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 批量导入养老金人员 listSavePopulationPensionExcelVO 批量导入养老金人员 |
| | | * @param list 养老金人员数据 |
| | | * @param communityId 社区id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @PostMapping("population/importPension") |
| | | R listSavePopulationPensionExcelVO(@RequestBody List<ComMngPopulationPensionExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId){ |
| | | return comMngPopulationService.listSavePensionPopulation(list, communityId, userId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 实有人口详情查询结果 |
| | | */ |
| | | @PostMapping("/population/detail") |
| | | public R detailPopulation(@RequestParam(value = "populationId") Long populationId) { |
| | | return comMngPopulationService.detailPopulation(populationId); |
| | | public R detailPopulation(@RequestParam(value = "populationId") Long populationId, @RequestParam(value = "communityId") Long communityId) { |
| | | return comMngPopulationService.detailPopulation(populationId, communityId); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 批量删除实有人口 |
| | | * |
| | | * @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R getCascadeHouseAddress(@RequestBody CascadeHouseDTO cascadeHouseDTO) { |
| | | return comMngPopulationHouseService.getCascadeHouseAddress(cascadeHouseDTO); |
| | | } |
| | | /** |
| | | * 查询房屋二级级联菜单 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @PostMapping("/population/second/list") |
| | | public R getSecondHouseAddress(@RequestBody CascadeHouseDTO cascadeHouseDTO) { |
| | | return comMngPopulationHouseService.getSecondHouseAddress(cascadeHouseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询房屋二级级联菜单后台 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @PostMapping("/population/second/listBack") |
| | | public R getSecondHouse(@RequestBody CascadeHouseDTO cascadeHouseDTO) { |
| | | return comMngPopulationHouseService.getSecondHouse(cascadeHouseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询房屋列表 |
| | |
| | | @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); |
| | | } |
| | | } |