From a061540bf4c2bdb81edc3898cd27f4ba18512846 Mon Sep 17 00:00:00 2001
From: lyfO_o <764716047@qq.com>
Date: Thu, 22 Apr 2021 11:47:43 +0800
Subject: [PATCH] 实验室库存导出
---
src/main/java/com/nanometer/smartlab/service/OpeWarehouseReserveServiceImpl.java | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/nanometer/smartlab/service/OpeWarehouseReserveServiceImpl.java b/src/main/java/com/nanometer/smartlab/service/OpeWarehouseReserveServiceImpl.java
index f761fc8..d63916b 100644
--- a/src/main/java/com/nanometer/smartlab/service/OpeWarehouseReserveServiceImpl.java
+++ b/src/main/java/com/nanometer/smartlab/service/OpeWarehouseReserveServiceImpl.java
@@ -205,7 +205,7 @@
}
}
- @Transactional(propagation = Propagation.REQUIRED)
+ @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
public boolean updateOpeWarehouseReserve(OpeWarehouseReserve opeWarehouseReserve) {
try {
int row = this.opeWarehouseReserveDao.updateOpeWarehouseReserve(opeWarehouseReserve);
@@ -225,26 +225,14 @@
}
}
- @Transactional(propagation = Propagation.REQUIRED)
+ @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
public void claimForPerson(List<OpeApplyReserve> selectedListForPerson,String userId,String projectNum,String laboratoryId,String laboratoryContainerId){
try{
for(OpeApplyReserve app:selectedListForPerson){
List<String> reagentCodes = app.getReagentCode();
if (reagentCodes != null && reagentCodes.size() > 0) {
- List<OpeReagentStatus> ss=new ArrayList<>();
- for (String opeReagentStatusId : reagentCodes) {
- OpeReagentStatus opeReagentStatus = this.opeReagentStatusService.getOpeReagentStatus(opeReagentStatusId);
- opeReagentStatus.setUserId(userId);
- opeReagentStatus.setProjectNum(projectNum);
- //boolean flag = this.opeReagentStatusService.updateReagentStatus(opeReagentStatus);
- this.opeReagentStatusService.updateReagentStatus3(opeReagentStatus);
- ss.add(opeReagentStatus);
- //更新试剂状态和
- opeReagentStatus.setHouseId(laboratoryId);
- opeReagentStatus.setContainerId(laboratoryContainerId);
- this.opeReagentStatusDao.updateOpeReagentStatusDao(opeReagentStatus);
+ this.opeReagentStatusService.updateReagentStatus3(reagentCodes,userId,projectNum,laboratoryId,laboratoryContainerId);
- }
//更新是现实库存
OpeLaboratoryReserve lr=new OpeLaboratoryReserve();
lr.setReagentId(app.getReagent().getId());
@@ -295,6 +283,9 @@
logger.error(ex.getMessage(), ex);
throw new BusinessException(ExceptionEnumCode.DB_ERR,
MessageUtil.getMessageByCode(ExceptionEnumCode.DB_ERR.getCode()), ex);
+ }catch(Exception e){
+ e.printStackTrace();
+ throw new RuntimeException(e);
}
}
--
Gitblit v1.9.2