李宇
2021-04-26 df938f06da12eddacfc9d2aee52d153222f5aa2c
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);
                  ss.add(opeReagentStatus);
                  //更新试剂状态和
                  opeReagentStatus.setHouseId(laboratoryId);
                  opeReagentStatus.setContainerId(laboratoryContainerId);
                  this.opeReagentStatusDao.updateOpeReagentStatusDao(opeReagentStatus);
                  this.opeReagentStatusService.updateReagentStatus3(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);
      }
   }