|
|
@@ -42,10 +42,7 @@ import java.net.URLEncoder;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.text.DecimalFormat;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -341,14 +338,17 @@ public class CwProjectReportArchiveController {
|
|
|
*/
|
|
|
@ApiOperation(value = "根据报告年份修改文档存放位置")
|
|
|
@PostMapping(value = "/updatePlaceByYear")
|
|
|
- public ResponseEntity<String> updatePlaceByYear(@RequestBody CwProjectReportArchiveDTO dto) {
|
|
|
+ public ResponseEntity<Map<String, Object>> updatePlaceByYear(@RequestBody CwProjectReportArchiveDTO dto) {
|
|
|
int rows = cwProjectReportArchiveService.updatePlaceByYear(dto);
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
if (rows > 0) {
|
|
|
- return ResponseEntity.ok("操作成功,共转移 " + rows + " 条份报告");
|
|
|
+ result.put("code", 0); // 0 表示成功
|
|
|
+ result.put("message", "操作成功,共转移 " + rows + " 条份报告");
|
|
|
} else {
|
|
|
- return ResponseEntity.status(HttpStatus.BAD_REQUEST)
|
|
|
- .body("未找到对应年份的数据");
|
|
|
+ result.put("code", 1); // 1 表示失败
|
|
|
+ result.put("message", "未找到对应年份的数据");
|
|
|
}
|
|
|
+ return ResponseEntity.ok(result);
|
|
|
}
|
|
|
|
|
|
}
|