From 616c9c94af30ae75eb5994a2cea3fac16acaa005 Mon Sep 17 00:00:00 2001
From: 李林 <z1292839451@163.com>
Date: 星期四, 20 七月 2023 11:21:50 +0800
Subject: [PATCH] 增加请求“检验模块”

---
 inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
index 68a5caf..a9f7f82 100644
--- a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
+++ b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java
@@ -2,6 +2,7 @@
 
 import com.yuanchu.limslaboratory.pojo.Inspection;
 import com.yuanchu.limslaboratory.mapper.InspectionMapper;
+import com.yuanchu.limslaboratory.pojo.dto.InspectionDto;
 import com.yuanchu.limslaboratory.service.InspectionService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
@@ -25,7 +26,14 @@
     private InspectionMapper inspectionMapper;
 
     @Override
-    public int addInspection(Inspection inspection) {
-        return inspectionMapper.insert(inspection);
+    public Inspection addInspection(String userName,int type) {
+        Inspection inspection = new Inspection(type, 0,1,1, userName);
+        int judge = inspectionMapper.insert(inspection);
+        return judge>0?inspection:null;
+    }
+
+    @Override
+    public List<InspectionDto> selectAllInspection(int pageSize, int countSize, Integer state) {
+        return inspectionMapper.selectAllInspection((pageSize - 1) * countSize,pageSize * countSize, state);
     }
 }

--
Gitblit v1.9.3