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/PlanServiceImpl.java | 40 +++++++++++++++++++++++++++++----------- 1 files changed, 29 insertions(+), 11 deletions(-) diff --git a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/PlanServiceImpl.java b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/PlanServiceImpl.java index e3e23a9..45da709 100644 --- a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/PlanServiceImpl.java +++ b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/PlanServiceImpl.java @@ -1,5 +1,7 @@ package com.yuanchu.limslaboratory.service.impl; + +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.yuanchu.limslaboratory.mapper.InspectionMaterialListMapper; import com.yuanchu.limslaboratory.mapper.InspectionProductListMapper; import com.yuanchu.limslaboratory.pojo.InspectionMaterialList; @@ -13,10 +15,11 @@ import javax.annotation.Resource; import java.util.List; +import java.util.Map; /** * <p> - * 鏈嶅姟瀹炵幇绫� + * 鏈嶅姟瀹炵幇绫� * </p> * * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃 @@ -29,15 +32,15 @@ PlanMapper planMapper; @Resource - InspectionMaterialListMapper inspectionMaterialListMapper; - - @Resource InspectionProductListMapper inspectionProductListMapper; - //鏌ヨ鎵�鏈夋楠岃鍒� + //鏌ヨ鎵�鏈夋楠岃鍒掑垎閰� @Override - public List<PlanDto> selectAllPlan(int pageSize, int countSize, Integer state) { - return planMapper.selectAllPlan((pageSize - 1) * countSize,pageSize * countSize, state); + public Map selectAllPlan(int pageSize, int countSize, Integer state) { + if (state == null) { + state = 2; + } + return planMapper.selectAllPlan((pageSize - 1) * countSize, pageSize * countSize, state); } //浣滃簾妫�楠岃鍒� @@ -47,12 +50,27 @@ //鐘舵�佹敼涓轰綔搴�0 plan.setState(0); int judge = planMapper.updateById(plan); - return judge>0; + return judge > 0; } - //鏌ヨ妫�楠岃鍒掗噷闈㈢殑鍒嗛厤淇℃伅 + //鏍规嵁鏍峰搧id鏌ヨ妫�楠岃鍒掗噷闈㈢殑妫�楠岄」鐩� @Override - public List<InspectionProductList> selectById(Integer id) { - return inspectionProductListMapper.selectByMaterId(id); + public List<InspectionProductList> selectProductById(Integer id) { + return inspectionProductListMapper.selectByMaterId(id); + } + + //淇敼妫�楠岃鍒掗噷鍒嗛厤璁″垝鐨勪俊鎭� + @Override + public void upPlan(InspectionProductList inspectionProductList) { + LambdaUpdateWrapper<InspectionProductList> updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(InspectionProductList::getInspectionMaterialListId, inspectionProductList.getInspectionMaterialListId()) + .eq(InspectionProductList::getMethod, inspectionProductList.getMethod()); + inspectionProductListMapper.update(inspectionProductList, updateWrapper); + } + + //鏌ヨ鎴愬搧妫�楠� + @Override + public List<PlanDto> selectInspection(int pageSize, int countSize, Integer state) { + return planMapper.selectInspection((pageSize - 1) * countSize, pageSize * countSize, state); } } -- Gitblit v1.9.3