| | |
| | | @Log(title = "房屋基础信息管理-新增房屋", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增房屋") |
| | | @PostMapping(value = "/addHouse") |
| | | @PreAuthorize("@ss.hasPermi('system:house:add')") |
| | | @PreAuthorize("@ss.hasPermi('house:list:add')") |
| | | public R<Boolean> addHouse(@Validated @RequestBody THouseDTO dto) { |
| | | return R.ok(tHouseService.save(dto)); |
| | | } |
| | | @Log(title = "房屋基础信息管理-编辑房屋", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "编辑房屋") |
| | | @PostMapping(value = "/updateHouse") |
| | | @PreAuthorize("@ss.hasPermi('system:house:edit')") |
| | | @PreAuthorize("@ss.hasPermi('house:list:edit')") |
| | | public R<Boolean> updateHouse(@Validated @RequestBody THouseDTO dto) { |
| | | return R.ok(tHouseService.updateById(dto)); |
| | | } |
| | | @Log(title = "房屋基础信息管理-查询房屋信息", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "查询房屋信息") |
| | | @GetMapping(value = "/getHouseById") |
| | | @PreAuthorize("@ss.hasPermi('system:house:detail')") |
| | | @PreAuthorize("@ss.hasPermi('house:list:detail')") |
| | | public R<THouse> getHouseById(@RequestParam String id) { |
| | | THouse tHouse = tHouseService.getById(id); |
| | | tHouse.setLeaseStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,tHouse.getLeaseStatus())); |
| | | tHouse.setBusinessAttributes(DictUtils.getDictLabel(DictConstants.DICT_TYPE_BUSINESS_ATTRIBUTES,tHouse.getBusinessAttributes())); |
| | | // tHouse.setLeaseStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,tHouse.getLeaseStatus())); |
| | | // tHouse.setBusinessAttributes(DictUtils.getDictLabel(DictConstants.DICT_TYPE_BUSINESS_ATTRIBUTES,tHouse.getBusinessAttributes())); |
| | | return R.ok(tHouse); |
| | | } |
| | | @Log(title = "房屋基础信息管理-删除房屋", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除房屋") |
| | | @DeleteMapping(value = "/deleteHouseById") |
| | | @PreAuthorize("@ss.hasPermi('system:house:delete')") |
| | | @PreAuthorize("@ss.hasPermi('house:list:delete')") |
| | | |
| | | public R<Boolean> deleteHouseById(@RequestParam String id) { |
| | | return R.ok(tHouseService.removeById(id)); |
| | | } |
| | | @ApiOperation(value = "获取房屋分页列表") |
| | | @PostMapping(value = "/houseList") |
| | | @PreAuthorize("@ss.hasPermi('system:house:list')") |
| | | |
| | | @PreAuthorize("@ss.hasPermi('house:list')") |
| | | public R<PageInfo<THouse>> houseList(@RequestBody THouseQuery query) { |
| | | return R.ok(tHouseService.houseList(query)); |
| | | } |
| | | @ApiOperation(value = "历史租户列表") |
| | | @PostMapping(value = "/userHistoryList") |
| | | @PreAuthorize("@ss.hasPermi('system:house:historyList')") |
| | | public R<PageInfo<HouseVO>> userHistoryList(@RequestBody TUserHistoryQuery query) { |
| | | return R.ok(tHouseService.userHistoryList(query)); |
| | | } |