From b7586ba9b38136c7af8ca9b31f92f570a0b039c2 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期一, 21 八月 2023 18:02:35 +0800
Subject: [PATCH] 计量管理-》计量修改                                  试验管理-》合格率统计

---
 inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/InspectionController.java |   46 ++++++++++------------------------------------
 1 files changed, 10 insertions(+), 36 deletions(-)

diff --git a/inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/InspectionController.java b/inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/InspectionController.java
index dd191cd..bd72e5d 100644
--- a/inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/InspectionController.java
+++ b/inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/InspectionController.java
@@ -7,6 +7,7 @@
 
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.yuanchu.limslaboratory.pojo.Inspection;
+import com.yuanchu.limslaboratory.pojo.Report;
 import com.yuanchu.limslaboratory.pojo.vo.InspectionVo;
 import com.yuanchu.limslaboratory.service.LinkBasicInformationService;
 import com.yuanchu.limslaboratory.service.RawMaterialService;
@@ -21,6 +22,7 @@
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.yuanchu.limslaboratory.service.InspectionService;
+
 import javax.annotation.Resource;
 
 /**
@@ -66,40 +68,17 @@
     @GetMapping("/selectAll")
     public Result selectAll(Integer type) {
         switch (type) {
-            case 0 :
+            case 0:
                 //鍘熸潗鏂�
                 return Result.success(rawMaterialService.selectRawmaAll());
-            case 1 :
+            case 1:
                 //濮旀墭鍗�
                 return Result.success(linkBasicInformationService.selectLinkAll());
-            case 2 :
+            case 2:
                 //鎴愬搧妫�楠�
                 return Result.success("璇疯緭鍏ユ楠屼俊鎭�!");
         }
         return Result.fail("绫诲瀷閿欒!");
-    }
-
-
-    @ApiOperation(value = "閫夋嫨鍘熸潗鏂欐姤妫�")
-    @ApiImplicitParams(value = {
-            @ApiImplicitParam(name = "id", value = "鍘熸潗鏂欐姤妫�鍗昳d", dataTypeClass = Integer.class, required = true),
-            @ApiImplicitParam(name = "startTime", value = "妫�楠屽紑濮嬫棩鏈�", dataTypeClass = String.class, required = true),
-            @ApiImplicitParam(name = "endTime", value = "妫�楠岀粨鏉熸棩鏈�", dataTypeClass = String.class, required = true)
-    })
-    @GetMapping("/selectRawmaById")
-    public Result selectRawmaById(Integer id, String startTime, String endTime) throws ParseException {
-        return Result.success(rawMaterialService.selectRawmaById(id,startTime,endTime));
-    }
-
-
-    @ApiOperation(value = "閫夋嫨濮旀墭鎶ユ鍜屾牱鍝�")
-    @ApiImplicitParams(value = {
-            @ApiImplicitParam(name = "bid", value = "濮旀墭鎶ユ鍗昳d", dataTypeClass = Integer.class, required = true),
-            @ApiImplicitParam(name = "did", value = "濮旀墭鎶ユ鏍峰搧id", dataTypeClass = Integer.class, required = true)
-    })
-    @GetMapping("/selectLinkByid")
-    public Result selectLinkByid(Integer bid, Integer did) {
-        return Result.success(linkBasicInformationService.selectLinkByid(bid, did));
     }
 
 
@@ -111,7 +90,7 @@
         return Result.success(inspectionService.addInspect((Integer) unmarshal.get("id"), inspectionVo));
     }
 
-    @ApiOperation(value = "鏍规嵁妫�楠屽崟id鏌ヨ鍘熸潗鏂欐楠屽崟璇︽儏")
+    @ApiOperation(value = "鏍规嵁妫�楠屽崟id鏌ヨ妫�楠屽崟璇︽儏")
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "id", value = "妫�楠屽崟id", dataTypeClass = Integer.class, required = true)
     })
@@ -120,18 +99,13 @@
         return Result.success(inspectionService.selectInspectsListById(id));
     }
 
-    @ApiOperation(value = "涓婃姤(鏇存柊妫�楠岀姸鎬�)")
+    @ApiOperation(value = "浣滃簾妫�楠屽崟")
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "id", value = "妫�楠屽崟id", dataTypeClass = Integer.class, required = true)
     })
-    @PostMapping("/updateInspectsById")
-    public Result updateInspectsById(Integer id) {
-        //濡傛灉宸茬粡涓婃姤浜嗕笉鑳藉啀涓�娆′笂鎶�
-        Inspection inspection = inspectionService.getById(id);
-        if (ObjectUtils.isNotEmpty(inspection.getInspectionStatus())) {
-            return Result.fail("宸茬粡涓婃姤杩囦簡,涓嶈兘鍐嶆涓婃姤!");
-        }
-        return Result.success(inspectionService.updateInspectsById(id));
+    @PostMapping("/delInspect")
+    public Result delInspect(Integer id)  {
+        return Result.success(inspectionService.delInspect(id));
     }
 
 

--
Gitblit v1.9.3