|
|
@@ -0,0 +1,59 @@
|
|
|
+package com.zksy.controller.property;
|
|
|
+
|
|
|
+import com.zksy.property.domain.AReceiptInfo;
|
|
|
+import com.zksy.property.service.AReceiptInfoService;
|
|
|
+import com.zksy.utils.AjaxResult;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author Administrator
|
|
|
+ * @version 1.0
|
|
|
+ * @project enterprise-assets-service
|
|
|
+ * @description 收据控制层
|
|
|
+ * @date 2025/6/24 14:33:13
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/AReceiptInfo")
|
|
|
+@Api(tags = "收据信息",description = "收据信息desc")
|
|
|
+public class AReceiptInfoController {
|
|
|
+ @Autowired
|
|
|
+ private AReceiptInfoService service;
|
|
|
+ @GetMapping("/findByPage")
|
|
|
+ @ApiOperation(value = "收据信息查询分页")
|
|
|
+ public AjaxResult findByPage(long pageNum, long pageSize, String receiptNumber,String payer,String paymentMethod,String generationDate){
|
|
|
+ return AjaxResult.success(service.findByPage(pageNum, pageSize, receiptNumber,payer,paymentMethod,generationDate));
|
|
|
+ }
|
|
|
+ @GetMapping("/getAReceiptInfoList")
|
|
|
+ @ApiOperation(value = "收据信息查询")
|
|
|
+ public AjaxResult getAReceiptInfoList(String receiptNumber,String payer,String paymentMethod,String generationDate){
|
|
|
+ return AjaxResult.success(service.getAReceiptInfoList(receiptNumber,payer,paymentMethod,generationDate));
|
|
|
+ }
|
|
|
+ @GetMapping("/getById/{id}")
|
|
|
+ @ApiOperation(value = "根据Id查询收据信息")
|
|
|
+ public AjaxResult getById(@PathVariable String id){
|
|
|
+ return AjaxResult.success(service.getById(id));
|
|
|
+ }
|
|
|
+ @PostMapping("/save")
|
|
|
+ @ApiOperation(value = "收据信息保存")
|
|
|
+ public AjaxResult save(@RequestBody AReceiptInfo entity) {
|
|
|
+ return service.save(entity) ? AjaxResult.success(entity) : AjaxResult.error("保存失败");
|
|
|
+ }
|
|
|
+ @PostMapping("/update")
|
|
|
+ @ApiOperation(value = "收据信息修改")
|
|
|
+ public AjaxResult update(@RequestBody AReceiptInfo entity) {
|
|
|
+ entity.setUpdateTime(LocalDateTime.now());
|
|
|
+ return service.updateById(entity) ? AjaxResult.success(entity) : AjaxResult.error("修改失败");
|
|
|
+ }
|
|
|
+ @PostMapping("/deleteBatch")
|
|
|
+ @ApiOperation(value = "收据信息删除")
|
|
|
+ public AjaxResult delete(@RequestBody String[] ids) {
|
|
|
+ return service.removeBatchByIds(Arrays.asList(ids)) ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
|
|
|
+ }
|
|
|
+
|
|
|
+}
|