From 0b99371d3e543532608e691e2bdfda3e65e1912c Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 20 九月 2024 10:18:24 +0800
Subject: [PATCH] 工单取图片查询优化
---
ycl-server/src/main/java/com/ycl/platform/controller/CalculateReportController.java | 66 +++++++++------------------------
1 files changed, 18 insertions(+), 48 deletions(-)
diff --git a/ycl-server/src/main/java/com/ycl/platform/controller/CalculateReportController.java b/ycl-server/src/main/java/com/ycl/platform/controller/CalculateReportController.java
index 2473c04..7c23eea 100644
--- a/ycl-server/src/main/java/com/ycl/platform/controller/CalculateReportController.java
+++ b/ycl-server/src/main/java/com/ycl/platform/controller/CalculateReportController.java
@@ -1,21 +1,15 @@
package com.ycl.platform.controller;
import com.ycl.platform.domain.form.CalculateReportBackfillForm;
-import com.ycl.system.domain.group.Update;
-import com.ycl.system.domain.group.Add;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import lombok.RequiredArgsConstructor;
-import java.util.List;
-import org.springframework.validation.annotation.Validated;
-import jakarta.validation.constraints.NotEmpty;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import com.ycl.platform.domain.query.CalculateReportQuery;
import com.ycl.platform.service.CalculateReportService;
import com.ycl.system.Result;
-import com.ycl.platform.domain.form.CalculateReportForm;
-import com.ycl.platform.domain.query.CalculateReportQuery;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
@@ -32,25 +26,6 @@
public class CalculateReportController {
private final CalculateReportService calculateReportService;
-
-// @PostMapping
-// @ApiOperation(value = "娣诲姞", notes = "娣诲姞")
-// public Result add(@RequestBody @Validated(Add.class) CalculateReportForm form) {
-// return calculateReportService.add(form);
-// }
-
-// @PutMapping
-// @ApiOperation(value = "淇敼", notes = "淇敼")
-// public Result update(@RequestBody @Validated(Update.class) CalculateReportForm form) {
-// return calculateReportService.update(form);
-// }
-
- @PutMapping
- @ApiOperation(value = "淇敼閲戦", notes = "淇敼閲戦")
- @PreAuthorize("@ss.hasPermi('system:calculate:report:edit:money')")
- public Result adjustMoney(@RequestBody @Validated(Update.class) CalculateReportForm form) {
- return calculateReportService.update(form);
- }
@GetMapping("/page")
@ApiOperation(value = "鍒嗛〉", notes = "鍒嗛〉")
@@ -73,23 +48,18 @@
return calculateReportService.detail(id);
}
-// @GetMapping("/list")
-// @ApiOperation(value = "鍒楄〃", notes = "鍒楄〃")
-// public Result list() {
-// return calculateReportService.all();
-// }
+ @PutMapping("/status/{reportId}")
+ @ApiOperation(value = "淇敼鍙戝竷鐘舵��", notes = "淇敼鍙戝竷鐘舵��")
+ @PreAuthorize("@ss.hasPermi('system:calculate:report:status')")
+ public Result updatePublishStatus(@PathVariable("reportId") Long reportId) {
+ return calculateReportService.updatePublishStatus(reportId);
+ }
-// @DeleteMapping("/{id}")
-// @ApiOperation(value = "ID鍒犻櫎", notes = "ID鍒犻櫎")
-// public Result removeById(@PathVariable("id") String id) {
-// return calculateReportService.removeById(id);
-// }
-//
-// @DeleteMapping("/batch")
-// @ApiOperation(value = "鎵归噺鍒犻櫎", notes = "鎵归噺鍒犻櫎")
-// public Result remove(@RequestBody @NotEmpty(message = "璇烽�夋嫨鏁版嵁") List<String> ids) {
-// return calculateReportService.remove(ids);
-// }
-
+ @PostMapping("/export")
+ @ApiOperation(value = "瀵煎嚭", notes = "瀵煎嚭")
+ @PreAuthorize("@ss.hasPermi('system:calculate:report:export')")
+ public void export(Integer contractId, HttpServletResponse response) {
+ calculateReportService.export(contractId, response);
+ }
}
--
Gitblit v1.8.0