|
@@ -1,17 +1,17 @@
|
|
package cn.cslg.pas.controller;
|
|
package cn.cslg.pas.controller;
|
|
|
|
|
|
import cn.cslg.pas.common.core.base.Constants;
|
|
import cn.cslg.pas.common.core.base.Constants;
|
|
-import cn.cslg.pas.common.dto.business.PatentDigProjectTaskDTO;
|
|
|
|
import cn.cslg.pas.common.dto.business.ReferencesDTO;
|
|
import cn.cslg.pas.common.dto.business.ReferencesDTO;
|
|
|
|
+import cn.cslg.pas.common.dto.business.ReferencesUpdateDTO;
|
|
import cn.cslg.pas.common.utils.Response;
|
|
import cn.cslg.pas.common.utils.Response;
|
|
|
|
+import cn.cslg.pas.common.vo.business.ReferencesVO;
|
|
import cn.cslg.pas.service.business.ReferencesService;
|
|
import cn.cslg.pas.service.business.ReferencesService;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Author xiexiang
|
|
* @Author xiexiang
|
|
@@ -30,4 +30,25 @@ public class ReferencesController {
|
|
Integer id = referencesService.add(referencesDTO);
|
|
Integer id = referencesService.add(referencesDTO);
|
|
return Response.success(id);
|
|
return Response.success(id);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Operation(summary = "更新报告文档")
|
|
|
|
+ @PostMapping("/updateReferences")
|
|
|
|
+ public Response updateReferences(@RequestBody ReferencesUpdateDTO referencesUpdateDTO) {
|
|
|
|
+ Integer id = referencesService.update(referencesUpdateDTO);
|
|
|
|
+ return Response.success(id);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Operation(summary = "查报告文档")
|
|
|
|
+ @GetMapping("/getReferences")
|
|
|
|
+ public Response getReferences(Integer projectId) {
|
|
|
|
+ List<ReferencesVO> referencesVOS = referencesService.query(projectId);
|
|
|
|
+ return Response.success(referencesVOS);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Operation(summary = "删除报告文档")
|
|
|
|
+ @PostMapping("/deleteReferences")
|
|
|
|
+ public Response deleteReferences(@RequestBody List<Integer> ids) {
|
|
|
|
+ referencesService.delete(ids);
|
|
|
|
+ return Response.success("删除成功");
|
|
|
|
+ }
|
|
}
|
|
}
|