|
@@ -1,9 +1,11 @@
|
|
package org.springblade.archive.controller;
|
|
package org.springblade.archive.controller;
|
|
|
|
|
|
|
|
+
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
|
+import org.springblade.archive.dto.ArchiveInspectionDTO;
|
|
import org.springblade.archive.entity.ArchiveInspection;
|
|
import org.springblade.archive.entity.ArchiveInspection;
|
|
import org.springblade.archive.service.IArchiveInspectionService;
|
|
import org.springblade.archive.service.IArchiveInspectionService;
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
@@ -13,9 +15,9 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
-@RequestMapping("/archiveInspection")
|
|
|
|
|
|
+@RequestMapping("/archiveInspectionInfo")
|
|
@Api(value = "档案检查信息", tags = "档案检查信息")
|
|
@Api(value = "档案检查信息", tags = "档案检查信息")
|
|
-public class ArchiveInspectionController extends BladeController {
|
|
|
|
|
|
+public class ArchiveInspectionInfoController {
|
|
|
|
|
|
private IArchiveInspectionService archiveInspectionService;
|
|
private IArchiveInspectionService archiveInspectionService;
|
|
|
|
|
|
@@ -31,6 +33,7 @@ public class ArchiveInspectionController extends BladeController {
|
|
@ApiOperationSupport(order = 3)
|
|
@ApiOperationSupport(order = 3)
|
|
@ApiOperation(value = "新增档案检查", notes = "传入archiveInspection")
|
|
@ApiOperation(value = "新增档案检查", notes = "传入archiveInspection")
|
|
public R addArchiveInspection(@RequestBody ArchiveInspection archiveInspection) {
|
|
public R addArchiveInspection(@RequestBody ArchiveInspection archiveInspection) {
|
|
|
|
+
|
|
boolean success = archiveInspectionService.save(archiveInspection);
|
|
boolean success = archiveInspectionService.save(archiveInspection);
|
|
return success ? R.success("新增成功") : R.fail("新增失败");
|
|
return success ? R.success("新增成功") : R.fail("新增失败");
|
|
}
|
|
}
|
|
@@ -52,15 +55,11 @@ public class ArchiveInspectionController extends BladeController {
|
|
|
|
|
|
@GetMapping("/opinion")
|
|
@GetMapping("/opinion")
|
|
@ApiOperationSupport(order = 6)
|
|
@ApiOperationSupport(order = 6)
|
|
- @ApiOperation(value = "获取抽检意见", notes = "传入fileId和userId")
|
|
|
|
- public R<String> getOpinion(@RequestParam Long fileId) {
|
|
|
|
|
|
+ @ApiOperation(value = "获取抽检意见", notes = "传入fileId")
|
|
|
|
+ public R<ArchiveInspectionDTO> getOpinion(@RequestParam Long fileId) {
|
|
Long userId = AuthUtil.getUserId();
|
|
Long userId = AuthUtil.getUserId();
|
|
- ArchiveInspection archiveInspection = archiveInspectionService.getbyFileId(fileId, userId);
|
|
|
|
- String opinion = "";
|
|
|
|
- if (archiveInspection != null) {
|
|
|
|
- opinion = archiveInspection.getOpinion();
|
|
|
|
- }
|
|
|
|
- return R.data(opinion);
|
|
|
|
|
|
+ ArchiveInspectionDTO archiveInspectionDTO = archiveInspectionService.getbyFileId(fileId, userId);
|
|
|
|
+ return R.data(archiveInspectionDTO);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|