|
@@ -1,5 +1,6 @@
|
|
|
package com.zksy.controller.property;
|
|
package com.zksy.controller.property;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.date.DateTime;
|
|
|
import com.zksy.property.domain.APropertyReceipt;
|
|
import com.zksy.property.domain.APropertyReceipt;
|
|
|
import com.zksy.property.domain.APublicRentalHousing;
|
|
import com.zksy.property.domain.APublicRentalHousing;
|
|
|
import com.zksy.property.service.APropertyReceiptService;
|
|
import com.zksy.property.service.APropertyReceiptService;
|
|
@@ -20,54 +21,55 @@ import java.util.Arrays;
|
|
|
* @author Administrator
|
|
* @author Administrator
|
|
|
* @version 1.0
|
|
* @version 1.0
|
|
|
* @project enterprise-assets-service
|
|
* @project enterprise-assets-service
|
|
|
- * @description 公租房租赁情况控制层
|
|
|
|
|
|
|
+ * @description 公租房租金收入情况控制层
|
|
|
* @date 2025/6/24 14:33:13
|
|
* @date 2025/6/24 14:33:13
|
|
|
*/
|
|
*/
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/apublicRentalHousing")
|
|
@RequestMapping("/apublicRentalHousing")
|
|
|
-@Api(tags = "公租房租赁情况信息",description = "公租房租赁情况信息desc")
|
|
|
|
|
|
|
+@Api(tags = "公租房租金收入情况",description = "公租房租金收入情况desc")
|
|
|
public class APublicRentalHousingController {
|
|
public class APublicRentalHousingController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private APublicRentalHousingService service;
|
|
private APublicRentalHousingService service;
|
|
|
@GetMapping("/findByPage")
|
|
@GetMapping("/findByPage")
|
|
|
- @ApiOperation(value = "公租房租赁情况信息查询分页")
|
|
|
|
|
|
|
+ @ApiOperation(value = "公租房租金收入情况查询分页")
|
|
|
public AjaxResult findByPage(long pageNum, long pageSize, String receiptNumber,String building,String roomNumber){
|
|
public AjaxResult findByPage(long pageNum, long pageSize, String receiptNumber,String building,String roomNumber){
|
|
|
return AjaxResult.success(service.findByPage(pageNum, pageSize, receiptNumber,building,roomNumber));
|
|
return AjaxResult.success(service.findByPage(pageNum, pageSize, receiptNumber,building,roomNumber));
|
|
|
}
|
|
}
|
|
|
@GetMapping("/getARentalPropertyList")
|
|
@GetMapping("/getARentalPropertyList")
|
|
|
- @ApiOperation(value = "公租房租赁情况信息查询")
|
|
|
|
|
- public AjaxResult getAPropertyReceiptList(String unit,String building,String roomNumber){
|
|
|
|
|
- return AjaxResult.success(service.getAPublicRentalHousingList(unit,building,roomNumber));
|
|
|
|
|
|
|
+ @ApiOperation(value = "公租房租金收入情况查询")
|
|
|
|
|
+ public AjaxResult getAPropertyReceiptList(String receiptNumber,String building,String roomNumber){
|
|
|
|
|
+ return AjaxResult.success(service.getAPublicRentalHousingList(receiptNumber,building,roomNumber));
|
|
|
}
|
|
}
|
|
|
- @GetMapping("/getById/{borrowId}")
|
|
|
|
|
- @ApiOperation(value = "根据Id查询公租房租赁情况信息")
|
|
|
|
|
|
|
+ @GetMapping("/getById/{id}")
|
|
|
|
|
+ @ApiOperation(value = "根据Id查询公租房租金收入情况")
|
|
|
public AjaxResult getById(@PathVariable String id){
|
|
public AjaxResult getById(@PathVariable String id){
|
|
|
return AjaxResult.success(service.getById(id));
|
|
return AjaxResult.success(service.getById(id));
|
|
|
}
|
|
}
|
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
|
- @ApiOperation(value = "公租房租赁情况信息保存")
|
|
|
|
|
|
|
+ @ApiOperation(value = "公租房租金收入情况保存")
|
|
|
public AjaxResult save(@RequestBody APublicRentalHousing eAdminLicenseInfo) {
|
|
public AjaxResult save(@RequestBody APublicRentalHousing eAdminLicenseInfo) {
|
|
|
- return AjaxResult.success(service.save(eAdminLicenseInfo));
|
|
|
|
|
|
|
+ return service.save(eAdminLicenseInfo) ? AjaxResult.success(eAdminLicenseInfo) : AjaxResult.error("保存失败");
|
|
|
}
|
|
}
|
|
|
@PostMapping("/update")
|
|
@PostMapping("/update")
|
|
|
- @ApiOperation(value = "公租房租赁情况信息修改")
|
|
|
|
|
|
|
+ @ApiOperation(value = "公租房租金收入情况修改")
|
|
|
public AjaxResult update(@RequestBody APublicRentalHousing eAdminLicenseInfo) {
|
|
public AjaxResult update(@RequestBody APublicRentalHousing eAdminLicenseInfo) {
|
|
|
- return AjaxResult.success(service.updateById(eAdminLicenseInfo));
|
|
|
|
|
|
|
+ eAdminLicenseInfo.setUpdateTime(new DateTime());
|
|
|
|
|
+ return service.updateById(eAdminLicenseInfo) ? AjaxResult.success(eAdminLicenseInfo) : AjaxResult.error("修改失败");
|
|
|
}
|
|
}
|
|
|
@PostMapping("/deleteBatch")
|
|
@PostMapping("/deleteBatch")
|
|
|
- @ApiOperation(value = "公租房租赁情况信息删除")
|
|
|
|
|
|
|
+ @ApiOperation(value = "公租房租金收入情况删除")
|
|
|
public AjaxResult delete(@RequestBody String[] ids) {
|
|
public AjaxResult delete(@RequestBody String[] ids) {
|
|
|
- return AjaxResult.success(service.removeBatchByIds(Arrays.asList(ids)));
|
|
|
|
|
|
|
+ return service.removeBatchByIds(Arrays.asList(ids)) ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
|
|
|
}
|
|
}
|
|
|
@PostMapping("/importData")
|
|
@PostMapping("/importData")
|
|
|
@ApiOperation(value = "导入数据")
|
|
@ApiOperation(value = "导入数据")
|
|
|
public AjaxResult importData(MultipartFile file) {
|
|
public AjaxResult importData(MultipartFile file) {
|
|
|
return AjaxResult.success(service.saveOrUpdateBatch(ExcelImportUtil.importExcel(file, APublicRentalHousing.class)));
|
|
return AjaxResult.success(service.saveOrUpdateBatch(ExcelImportUtil.importExcel(file, APublicRentalHousing.class)));
|
|
|
}
|
|
}
|
|
|
- @PostMapping("/exportData")
|
|
|
|
|
|
|
+ @GetMapping("/exportData")
|
|
|
@ApiOperation(value = "导出数据")
|
|
@ApiOperation(value = "导出数据")
|
|
|
- public AjaxResult exportData(HttpServletResponse response,String unit,String building,String roomNumber) {
|
|
|
|
|
- return AjaxResult.success(ExcelExportUtil.exportExcel(response,service.getAPublicRentalHousingList(unit,building,roomNumber), APublicRentalHousing.class, "公租房租赁情况信息","公租房租赁情况信息"));
|
|
|
|
|
|
|
+ public void exportData(HttpServletResponse response,String receiptNumber,String building,String roomNumber) {
|
|
|
|
|
+ ExcelExportUtil.exportExcel(response,service.getAPublicRentalHousingList(receiptNumber,building,roomNumber), APublicRentalHousing.class, "公租房租金收入情况","公租房租金收入情况");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|