From 0a62550520293dacf31c4cf0dd58735db066e2dd Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期三, 26 七月 2023 09:29:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionMaterialListServiceImpl.java | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionMaterialListServiceImpl.java b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionMaterialListServiceImpl.java
index 4d916d9..0538298 100644
--- a/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionMaterialListServiceImpl.java
+++ b/inspection-server/src/main/java/com/yuanchu/limslaboratory/service/impl/InspectionMaterialListServiceImpl.java
@@ -37,13 +37,18 @@
ProductMapper productMapper;
@Resource
+ InspectionProductListService inspectionProductListService;
+
+ @Resource
InspectionProductListMapper inspectionProductListMapper;
+ //鏌ヨ妫�楠屽崟閲岄潰鐨勭墿鏂欎俊鎭�
@Override
public List<InspectionMaterialList> selectInspectionMaterialListByInsId(String insId) {
return inspectionMaterialListMapper.selectInspectionMaterialListByInsId(insId);
}
+ //娣诲姞妫�楠屽崟涓殑妫�楠屾牱鍝�
@Override
@Transactional(rollbackFor = Exception.class)
public InspectionMaterialList addInspectionMaterialList(InspectionMaterialList inspectionMaterialList,String userId) {
@@ -61,6 +66,7 @@
.setUserId(Integer.parseInt(userId));
list1.add(inspectionProductList);
});
+ //娣诲姞妫�楠岄」鐩�
int judge2 = inspectionProductListMapper.addInspectionProductList(list1);
return judge>0&&judge2>0?inspectionMaterialList:null;
}
@@ -74,19 +80,16 @@
list.setState(0);
list.setId(inspectionMaterialListId);
int judge1 = inspectionMaterialListMapper.updateById(list);
- //鍒犻櫎鏍峰搧妫�楠岄」鐩�
- UpdateWrapper<InspectionProductList> wrapper = new UpdateWrapper<>();
- wrapper.eq("inspection_material_list_id", inspectionMaterialListId).set("state", 0);
- int judge2 = inspectionProductListMapper.update(new InspectionProductList(), wrapper);
+ //鏍规嵁鏍峰搧id鍒犻櫎妫�楠屾牱鍝佷腑鐨勬楠岄」鐩�
+ int judge2 = inspectionProductListService.delInspectionProductList(inspectionMaterialListId);
return judge1>0&&judge2>0;
}
- //淇敼鏍峰搧淇℃伅
+ //鏍规嵁鏍峰搧id淇敼鏍峰搧淇℃伅
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateInspectionMaterialList( Integer inspectionMaterialListId,InspectionMaterialList inspectionMaterialList) {
LambdaUpdateWrapper<InspectionMaterialList> updateWrapper = new LambdaUpdateWrapper<>();
- //鏍规嵁鏍峰搧id鏌ヨ
updateWrapper.eq(InspectionMaterialList::getId,inspectionMaterialListId);
int judge = inspectionMaterialListMapper.update(inspectionMaterialList, updateWrapper);
return judge>0;
--
Gitblit v1.9.3