| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- package com.zksy.controller.property;
- import com.zksy.info.domain.EAdminLicenseInfo;
- import com.zksy.info.service.EAdminLicenseInfoService;
- import com.zksy.property.domain.ARentalProperty;
- import com.zksy.property.service.ARentalPropertyService;
- import com.zksy.utils.AjaxResult;
- import com.zksy.utils.ExcelExportUtil;
- import com.zksy.utils.ExcelImportUtil;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.web.multipart.MultipartFile;
- import javax.servlet.http.HttpServletResponse;
- import java.util.Arrays;
- /**
- * @author Administrator
- * @version 1.0
- * @project enterprise-assets-service
- * @description 公租房租赁情况控制层
- * @LocalDate 2025/6/24 14:33:13
- */
- @RestController
- @RequestMapping("/arentalProperty")
- @Api(tags = "公租房租赁情况信息",description = "公租房租赁情况信息desc")
- public class ARentalPropertyController {
- @Autowired
- private ARentalPropertyService service;
- @GetMapping("/findByPage")
- @ApiOperation(value = "公租房租赁情况信息查询分页")
- public AjaxResult findByPage(long pageNum, long pageSize, String tenantCompany,String electricMeterNumber,String roomNumber){
- return AjaxResult.success(service.findByPage(pageNum, pageSize, tenantCompany,electricMeterNumber,roomNumber));
- }
- @GetMapping("/getARentalPropertyList")
- @ApiOperation(value = "公租房租赁情况信息查询")
- public AjaxResult getARentalPropertyList(String licenseCertificateName,String electricMeterNumber,String roomNumber){
- return AjaxResult.success(service.getARentalPropertyList(licenseCertificateName,electricMeterNumber,roomNumber));
- }
- @GetMapping("/getById/{borrowId}")
- @ApiOperation(value = "根据Id查询公租房租赁情况信息")
- public AjaxResult getById(@PathVariable String id){
- return AjaxResult.success(service.getById(id));
- }
- @PostMapping("/save")
- @ApiOperation(value = "公租房租赁情况信息保存")
- public AjaxResult save(@RequestBody ARentalProperty arentalProperty) {
- return AjaxResult.success(service.save(arentalProperty));
- }
- @PostMapping("/upLocalDate")
- @ApiOperation(value = "公租房租赁情况信息修改")
- public AjaxResult upLocalDate(@RequestBody ARentalProperty arentalProperty) {
- return AjaxResult.success(service.updateById(arentalProperty));
- }
- @PostMapping("/deleteBatch")
- @ApiOperation(value = "公租房租赁情况信息删除")
- public AjaxResult delete(@RequestBody String[] ids) {
- return AjaxResult.success(service.removeBatchByIds(Arrays.asList(ids)));
- }
- @PostMapping("/importData")
- @ApiOperation(value = "导入数据")
- public AjaxResult importData(MultipartFile file) {
- return AjaxResult.success(service.saveOrUpdateBatch(ExcelImportUtil.importExcel(file, ARentalProperty.class)));
- }
- @PostMapping("/exportData")
- @ApiOperation(value = "导出数据")
- public AjaxResult exportData(HttpServletResponse response,String licenseCertificateName,String licenseNumber,String currentStatus) {
- return AjaxResult.success(ExcelExportUtil.exportExcel(response,service.getARentalPropertyList(licenseCertificateName,licenseNumber,currentStatus), ARentalProperty.class, "公租房租赁情况信息","公租房租赁情况信息"));
- }
- }
|