From 30f6da8bf0143906b42fa600f6a604cea6c81f71 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期三, 26 七月 2023 09:16:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionServiceImpl.java | 19 +++++++------------
1 files changed, 7 insertions(+), 12 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 d548a76..058dd0b 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
@@ -12,12 +12,9 @@
import com.yuanchu.limslaboratory.service.InspectionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
-
import javax.annotation.Resource;
-import java.time.LocalDateTime;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
+
/**
* <p>
@@ -32,27 +29,25 @@
@Resource
private InspectionMapper inspectionMapper;
+
@Resource
private PlanMapper planMapper;
+
@Resource
InspectionMaterialListMapper inspectionMaterialListMapper;
+ //娣诲姞妫�楠岀敵璇峰崟
@Override
public Inspection addInspection(String userName,int type) {
Inspection inspection = new Inspection(type, 0,1,1, userName);
- System.out.println(inspection);
int judge = inspectionMapper.insert(inspection);
- System.out.println(judge);
return judge>0?inspection:null;
}
//鏌ヨ鎵�鏈夋楠屽崟鍒楄〃
@Override
- public Map selectAllInspection(int pageSize, int countSize, Integer state) {
- Map map = new HashMap();
- map.put("data",inspectionMapper.selectAllInspection((pageSize - 1) * countSize,pageSize * countSize, state));
- map.put("count", inspectionMapper.selectInspectToCount(state));
- return map;
+ public List<InspectionDto> selectAllInspection(int pageSize, int countSize, Integer state) {
+ return inspectionMapper.selectAllInspection((pageSize - 1) * countSize,pageSize * countSize, state);
}
//浣滃簾鐢宠妫�楠屽崟
@@ -62,7 +57,7 @@
Inspection inspection = inspectionMapper.selectById(inspectionId);
inspection.setState(0);
int judge1 = inspectionMapper.updateById(inspection);
- //妫�楠屾牱鍝佷綔搴�
+ //妫�楠屾牱鍝佷綔搴�(鏍规嵁鎶ユ鍗昳d鍒犻櫎鏍峰搧淇℃伅)
UpdateWrapper<InspectionMaterialList> wrapper = new UpdateWrapper<>();
wrapper.eq("inspection_id", inspectionId).set("state", 0);
int judge2 = inspectionMaterialListMapper.update(new InspectionMaterialList(),wrapper);
--
Gitblit v1.9.3