|
@@ -0,0 +1,90 @@
|
|
|
+package org.springblade.business.controller;
|
|
|
+
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import org.springblade.business.entity.TrialContainerClassification;
|
|
|
+import org.springblade.business.entity.TrialCyFinishTestReport;
|
|
|
+import org.springblade.business.entity.TrialCyTestType;
|
|
|
+import org.springblade.business.entity.TrialCyThirdReport;
|
|
|
+import org.springblade.business.service.TrialCyService;
|
|
|
+import org.springblade.business.service.TrialCyTestTypeService;
|
|
|
+import org.springblade.core.tool.api.R;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 成渝试验数据接口
|
|
|
+ * @author LHB
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@AllArgsConstructor
|
|
|
+@RequestMapping("/cyTrial")
|
|
|
+@Api(value = "成渝试验数据接口", tags = "成渝试验数据接口")
|
|
|
+public class TrialCyController {
|
|
|
+
|
|
|
+ private TrialCyService trialCyService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据合同段id验证当前合同段是否未成渝项目下未开启试验功能的合同段
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/isCyAndTestModule")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation(value = "验证是否使用成渝那边的树", notes = "传入合同段id")
|
|
|
+ public R<Boolean> isCyAndTestModule(Long projectId,Long contractId){
|
|
|
+ return R.data(trialCyService.isCyAndTestModule(projectId, contractId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取成渝那边的树
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getTree")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation(value = "获取成渝那边的树", notes = "传入项目id")
|
|
|
+ public R<List<TrialCyTestType>> getTree(Long projectId, String parentId){
|
|
|
+ return R.data(trialCyService.getTree(projectId,parentId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取试验检测报告
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getTrialDetectionReport")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation(value = "获取试验检测报告", notes = "")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "contractId", value = "合同段id", required = true),
|
|
|
+ @ApiImplicitParam(name = "pKeyId", value = "树节点pKeyId", required = true)
|
|
|
+ })
|
|
|
+ public R<List<TrialCyFinishTestReport>> getTrialDetectionReport(Long contractId, Long pKeyId){
|
|
|
+ return R.data(trialCyService.getTrialDetectionReport(contractId,pKeyId));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取第三方/外委 检测报告
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getThirdReport")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation(value = "获取第三方/外委 检测报告", notes = "")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "contractId", value = "合同段id", required = true),
|
|
|
+ @ApiImplicitParam(name = "pKeyId", value = "树节点pKeyId", required = true),
|
|
|
+ @ApiImplicitParam(name = "type", value = "类型:0-外委检测,1-第三方", required = true)
|
|
|
+ })
|
|
|
+ public R<List<TrialCyThirdReport>> getThirdReport(Long contractId, Long pKeyId, Integer type){
|
|
|
+ return R.data(trialCyService.getThirdReport(contractId,pKeyId,type));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|