@ -112,9 +112,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    @Override //标准物质标准物质管理列表
   
					 
					 
					 
					    @Override //标准物质标准物质管理列表
   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    public  IPage < ReagentConsumableInventoryVO >  getReagentConsumableInventoryRMVOList ( IPage < ReagentConsumableInventory >  page ,  Integer  warning ,  String  keywords )  {   
					 
					 
					 
					    public  IPage < ReagentConsumableInventoryVO >  getReagentConsumableInventoryRMVOList ( IPage < ReagentConsumableInventory >  page ,  Integer  warning ,  String  keywords )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        Integer  reagentCategory  =  1 ;   
					 
					 
					 
					        Integer  reagentCategory  =  1 ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        if  ( warning  ! =  null  & &  warning  = =  2 )  {   
					 
					 
					 
					//        if (warning != null && warning == 2) {
  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					            return  this . getReagentConsumableInventoryWarningPage ( ( Page )  page ,  reagentCategory ) ;   
					 
					 
					 
					//            return this.getReagentConsumableInventoryWarningPage((Page) page, reagentCategory);
  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        }   
					 
					 
					 
					//        }
  
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					        IPage < ReagentConsumableInventoryVO >  reagentConsumableInventoryVOPage  =  baseMapper . getReagentConsumableInventoryVOPage ( page ,  warning ,  keywords ,  reagentCategory ) ;   
					 
					 
					 
					        IPage < ReagentConsumableInventoryVO >  reagentConsumableInventoryVOPage  =  baseMapper . getReagentConsumableInventoryVOPage ( page ,  warning ,  keywords ,  reagentCategory ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        return  reagentConsumableInventoryVOPage ;   
					 
					 
					 
					        return  reagentConsumableInventoryVOPage ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    }   
					 
					 
					 
					    }   
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -122,36 +122,43 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    @Override //试剂耗材管理列表
   
					 
					 
					 
					    @Override //试剂耗材管理列表
   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    public  IPage < ReagentConsumableInventoryVO >  getReagentConsumableInventoryREVOList ( IPage < ReagentConsumableInventory >  page ,  Integer  warning ,  String  keywords )  {   
					 
					 
					 
					    public  IPage < ReagentConsumableInventoryVO >  getReagentConsumableInventoryREVOList ( IPage < ReagentConsumableInventory >  page ,  Integer  warning ,  String  keywords )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        Integer  reagentCategory  =  0 ;   
					 
					 
					 
					        Integer  reagentCategory  =  0 ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        if  ( warning  ! =  null  & &  warning  = =  2 )  {   
					 
					 
					 
					//        if (warning != null && warning == 2) {
  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					            return  this . getReagentConsumableInventoryWarningPage ( ( Page )  page ,  reagentCategory ) ;   
					 
					 
					 
					//            return this.getReagentConsumableInventoryWarningPage((Page) page, reagentCategory);
  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        }   
					 
					 
					 
					//        }
  
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					        IPage < ReagentConsumableInventoryVO >  reagentConsumableInventoryVOPage  =  baseMapper . getReagentConsumableInventoryVOPage ( page ,  warning ,  keywords ,  reagentCategory ) ;   
					 
					 
					 
					        IPage < ReagentConsumableInventoryVO >  reagentConsumableInventoryVOPage  =  baseMapper . getReagentConsumableInventoryVOPage ( page ,  warning ,  keywords ,  reagentCategory ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        return  reagentConsumableInventoryVOPage ;   
					 
					 
					 
					        return  reagentConsumableInventoryVOPage ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    }   
					 
					 
					 
					    }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    //查询即将到期的试剂耗材、标准物质:reagentCategory:0代表试剂耗材,1代表标准物质、标准储备溶液
   
					 
					 
					 
					    //查询即将到期的试剂耗材、标准物质:reagentCategory:0代表试剂耗材,1代表标准物质、标准储备溶液
   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    public  IPage < ReagentConsumableInventoryVO >  getReagentConsumableInventoryWarningPage ( Page  page ,  Integer  reagentCategory )  {   
					 
					 
					 
					    public  IPage < ReagentConsumableInventoryVO >  getReagentConsumableInventoryWarningPage ( Page  page ,  Integer  reagentCategory )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        List < ReagentConsumableInventoryVO >  reagentConsumableInventoryVOList  =  new  ArrayList < > ( ) ;   
					 
					 
					 
					        if  ( reagentCategory  = =  0 )  {   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        List < BatchDetails >  list  =  batchDetailsService . list ( Wrappers . < BatchDetails > query ( ) . eq ( "warning_information" ,  "即将过期" ) . or ( ) . eq ( "warning_information" ,  "已过期" ) . or ( ) . eq ( "warning_information" ,  "即将到达存储期限" ) . or ( ) . eq ( "warning_information" ,  "已超过存储期限" ) ) ;   
					 
					 
					 
					            IPage < ReagentConsumableInventoryVO >  reagentConsumableInventoryVOIPage  =  baseMapper . getRmListById ( ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        //查找具有到期批次物品的试剂耗材\标准物质类信息
   
					 
					 
					 
					            if  ( reagentConsumableInventoryVOIPage  ! =  null )  {   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        if  ( list  ! =  null  & &  list . size ( )  ! =  0 )  {   
					 
					 
					 
					                return  reagentConsumableInventoryVOIPage ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					            for  ( BatchDetails  batchDetails  :  list )  {   
					 
					 
					 
					            }  else  return  null ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                ReagentConsumableInventory  reagentConsumableInventory  =  new  ReagentConsumableInventory ( ) ;   
					 
					 
					 
					        }  else  {   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                if  ( reagentCategory  = =  0 )  {   
					 
					 
					 
					            IPage < ReagentConsumableInventoryVO >  reagentConsumableInventoryVOIPage  =  baseMapper . getRemListById ( ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                    reagentConsumableInventory  =  this . getOne ( new  LambdaQueryWrapper < ReagentConsumableInventory > ( ) . eq ( ReagentConsumableInventory : : getReagentConsumableInventoryId ,  batchDetails . getReagentConsumableInventoryId ( ) ) . ne ( ReagentConsumableInventory : : getCategory ,  "标准物质" ) . ne ( ReagentConsumableInventory : : getCategory ,  "标准储备溶液" ) ) ;   
					 
					 
					 
					            if  ( reagentConsumableInventoryVOIPage  ! =  null )  {   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                }  else  {   
					 
					 
					 
					                return  reagentConsumableInventoryVOIPage ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                    reagentConsumableInventory  =  this . getOne ( new  LambdaQueryWrapper < ReagentConsumableInventory > ( ) . eq ( ReagentConsumableInventory : : getReagentConsumableInventoryId ,  batchDetails . getReagentConsumableInventoryId ( ) ) . ne ( ReagentConsumableInventory : : getCategory ,  "试剂" ) . ne ( ReagentConsumableInventory : : getCategory ,  "耗材" ) ) ;   
					 
					 
					 
					            }  else  return  null ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                }   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                if  ( reagentConsumableInventory  ! =  null )  {   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    ReagentConsumableInventoryVO  reagentConsumableInventoryVO  =  new  ReagentConsumableInventoryVO ( ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    BeanUtils . copyProperties ( reagentConsumableInventory ,  reagentConsumableInventoryVO ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    reagentConsumableInventoryVO . setBatchDetailsVOS ( batchDetailsService . getBatchDetailsList ( reagentConsumableInventoryVO . getReagentConsumableInventoryId ( ) ) ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    reagentConsumableInventoryVOList . add ( reagentConsumableInventoryVO ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                }   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            }   
					 
					 
					 
					 
				
			 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					        }   
					 
					 
					 
					        }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        PageUtils  pageUtils  =  new  PageUtils ( ) ;   
					 
					 
					 
					//        List<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = new ArrayList<>();
  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        return  pageUtils . getPages ( ( int )  page . getCurrent ( ) ,  ( int )  page . getSize ( ) ,  reagentConsumableInventoryVOList ) ;   
					 
					 
					 
					//        List<BatchDetails> list = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("warning_information", "即将过期").or().eq("warning_information", "已过期").or().eq("warning_information", "即将到达存储期限").or().eq("warning_information", "已超过存储期限"));
  
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//        //查找具有到期批次物品的试剂耗材\标准物质类信息
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//        if (list != null && list.size() != 0) {
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//            for (BatchDetails batchDetails : list) {
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//                ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory();
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					////                if (reagentConsumableInventory != null) {
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//                    ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO();
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//                    BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryVO);
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//                    reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsService.getBatchDetailsList(reagentConsumableInventoryVO.getReagentConsumableInventoryId()));
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//                    reagentConsumableInventoryVOList.add(reagentConsumableInventoryVO);
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//                }
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//            }
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//        }
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//        PageUtils pageUtils = new PageUtils();
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					//        return pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), reagentConsumableInventoryVOList);
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    }   
					 
					 
					 
					    }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    @Override //入库增加库存
   
					 
					 
					 
					    @Override //入库增加库存
   
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -196,7 +203,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    @Override //分页查询标准物质
   
					 
					 
					 
					    @Override //分页查询标准物质
   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    public  IPage < ReferenceMaterialFullVO >  getStandardAllList ( Page  page ,  QueryWrapper < ReferenceMaterial >  qw ,  Integer  status ,  String  number )  {   
					 
					 
					 
					    public  IPage < ReferenceMaterialFullVO >  getStandardAllList ( Page  page ,  String  reagentConsumableName ,  Integer  referenceMaterialStatus )  {   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					//        //如果扫码
  
					 
					 
					 
					//        //如果扫码
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					//        if (StrUtil.isNotBlank(number)) {
  
					 
					 
					 
					//        if (StrUtil.isNotBlank(number)) {
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					//            ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.<ReferenceMaterial>query().eq("number", number));
  
					 
					 
					 
					//            ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.<ReferenceMaterial>query().eq("number", number));
  
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -210,7 +217,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					//
  
					 
					 
					 
					//
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					//            }
  
					 
					 
					 
					//            }
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					//        }
  
					 
					 
					 
					//        }
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        IPage < ReferenceMaterialFullVO >  referenceMaterialPage  =  baseMapper . getReferenceMaterialPage ( page ,  qw ) ;   
					 
					 
					 
					        IPage < ReferenceMaterialFullVO >  referenceMaterialPage  =  baseMapper . getReferenceMaterialPage ( page ,  referenceMaterialStatus ,  reagentConsumableName ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					        return  referenceMaterialPage ;   
					 
					 
					 
					        return  referenceMaterialPage ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    }   
					 
					 
					 
					    }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -224,10 +231,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            throw  new  RuntimeException ( String . format ( "未能查询到该ID对应的标准物质" ) ) ;   
					 
					 
					 
					            throw  new  RuntimeException ( String . format ( "未能查询到该ID对应的标准物质" ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        }   
					 
					 
					 
					        }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        ReagentConsumableInventoryFullVO  reagentConsumableInventoryFullVO  =  new  ReagentConsumableInventoryFullVO ( ) ;   
					 
					 
					 
					        ReagentConsumableInventoryFullVO  reagentConsumableInventoryFullVO  =  new  ReagentConsumableInventoryFullVO ( ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        ReagentConsumables  reagentConsumables  =  reagentConsumablesService . getById ( referenceMaterial . getReagentConsumableId ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        ReagentConsumableInventory  byId  =  this . getById ( referenceMaterial . getReagentConsumableInventoryId ( ) ) ;   
					 
					 
					 
					        BeanUtils . copyProperties ( reagentConsumables ,  reagentConsumableInventoryFullVO ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        BeanUtils . copyProperties ( byId ,  reagentConsumableInventoryFullVO ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					        reagentConsumableInventoryFullVO . setNumber ( referenceMaterial . getNumber ( ) ) ;   
					 
					 
					 
					        reagentConsumableInventoryFullVO . setNumber ( referenceMaterial . getNumber ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        reagentConsumableInventoryFullVO . setBatchDetailsId ( referenceMaterial . getBatchDetailsId ( ) ) ;   
					 
					 
					 
					        reagentConsumableInventoryFullVO . setBatchDetailsId ( referenceMaterial . getBatchDetailsId ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        BatchDetails  batchDetails  =  batchDetailsService . getById ( referenceMaterial . getBatchDetailsId ( ) ) ;   
					 
					 
					 
					        BatchDetails  batchDetails  =  batchDetailsService . getById ( referenceMaterial . getBatchDetailsId ( ) ) ;   
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -247,9 +253,11 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        List < StandardMaterialApplication >  list  =  standardMaterialApplicationService . list ( new  LambdaQueryWrapper < StandardMaterialApplication > ( ) . eq ( StandardMaterialApplication : : getReferenceMaterialId ,  id ) . orderByDesc ( StandardMaterialApplication : : getDateOfClaim ) ) ;   
					 
					 
					 
					        List < StandardMaterialApplication >  list  =  standardMaterialApplicationService . list ( new  LambdaQueryWrapper < StandardMaterialApplication > ( ) . eq ( StandardMaterialApplication : : getReferenceMaterialId ,  id ) . orderByDesc ( StandardMaterialApplication : : getDateOfClaim ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        R < SysUser >  userR  =  remoteUserService . innerGetById ( list . get ( 0 ) . getRecipientId ( ) ) ;   
					 
					 
					 
					        if  ( list . size ( )  >  0 )  {   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        reagentConsumableInventoryFullVO . setHolderName ( userR . getData ( ) . getName ( ) ) ;   
					 
					 
					 
					            R < SysUser >  userR  =  remoteUserService . innerGetById ( list . get ( 0 ) . getRecipientId ( ) ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        reagentConsumableInventoryFullVO . setHolderId ( userR . getData ( ) . getUserId ( ) ) ;   
					 
					 
					 
					            reagentConsumableInventoryFullVO . setHolderName ( userR . getData ( ) . getName ( ) ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					            reagentConsumableInventoryFullVO . setHolderId ( userR . getData ( ) . getUserId ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        if  ( one1  ! =  null )  {   
					 
					 
					 
					        if  ( one1  ! =  null )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            reagentConsumableInventoryFullVO . setConfigurationConcentration ( one1 . getConfigurationConcentration ( ) ) ;   
					 
					 
					 
					            reagentConsumableInventoryFullVO . setConfigurationConcentration ( one1 . getConfigurationConcentration ( ) ) ;   
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -341,7 +349,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        System . out . println ( "referenceMaterialTablePDF................." ) ;   
					 
					 
					 
					        System . out . println ( "referenceMaterialTablePDF................." ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        for  ( ReferenceMaterialVO  referenceMaterialVO  :  voList )  {   
					 
					 
					 
					        for  ( ReferenceMaterialVO  referenceMaterialVO  :  voList )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            referenceMaterialVO . setTime ( LocalDateTimeUtil . format ( referenceMaterialVO . getCreateTime ( ) , "yyyy-MM-dd" ) ) ;   
					 
					 
					 
					            referenceMaterialVO . setTime ( LocalDateTimeUtil . format ( referenceMaterialVO . getCreateTime ( ) ,   "yyyy-MM-dd" ) ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					        }   
					 
					 
					 
					        }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        int  x  =  1 ;   
					 
					 
					 
					        int  x  =  1 ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -386,7 +394,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        ByteArrayInputStream  fisWord  =  new  ByteArrayInputStream ( fosWord . toByteArray ( ) ) ;   
					 
					 
					 
					        ByteArrayInputStream  fisWord  =  new  ByteArrayInputStream ( fosWord . toByteArray ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        fosWord . close ( ) ;   
					 
					 
					 
					        fosWord . close ( ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        ossFile . fileSave ( "document"  +  "/"  +  "referenceMaterial"  +  "/"  +  id  +  "/"  +  applyFileName  +  ".docx" , fisWord ) ;   
					 
					 
					 
					        ossFile . fileSave ( "document"  +  "/"  +  "referenceMaterial"  +  "/"  +  id  +  "/"  +  applyFileName  +  ".docx" ,   fisWord ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        //MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
   
					 
					 
					 
					        //MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					//        MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
  
					 
					 
					 
					//        MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
  
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -411,19 +419,11 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    //试剂/耗材扫描物品编码进行持久化
   
					 
					 
					 
					    //试剂/耗材扫描物品编码进行持久化
   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    @Override   
					 
					 
					 
					    @Override   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    public  void  setCode ( String  id ,  String  code )  {   
					 
					 
					 
					    public  void  setCode ( String  id ,  String  code )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					        ReagentConsumables  reagentConsumables  =  reagentConsumablesService . getById ( id ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        ReagentConsumables  byId  =  reagentConsumablesService . getById ( id ) ;   
					 
					 
					 
					        if  ( reagentConsumables  ! =  null )  {   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					            reagentConsumables . setCode ( code ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					        ReagentConsumableInventory  one  =  this . getOne ( Wrappers . < ReagentConsumableInventory > query ( ) . eq ( "reagent_consumable_id" ,  id ) ) ;   
					 
					 
					 
					            reagentConsumablesService . updateById ( reagentConsumables ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        if  ( byId  ! =  null  &  one  ! =  null )  {   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            byId . setCode ( code ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            one . setCode ( code ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            this . updateById ( one ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            reagentConsumablesService . updateById ( byId ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					        }   
					 
					 
					 
					        }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    }   
					 
					 
					 
					    }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    @Override   
					 
					 
					 
					    @Override   
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -525,7 +525,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                reagentConsumableInventoryDTO . setAlias ( "" ) ;   
					 
					 
					 
					                reagentConsumableInventoryDTO . setAlias ( "" ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            }   
					 
					 
					 
					            }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            ReagentConsumableInventory  one  =  this  . getOne ( Wrappers . < ReagentConsumableInventory  > query ( ) . eq ( "reagent_consumable_name" ,  reagentConsumableInventoryDTO . getReagentConsumableName ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getBrand ( ) ) ,  "brand" ,  reagentConsumableInventoryDTO . getBrand ( ) ) . eq ( "category" ,  reagentConsumableInventoryDTO . getCategory ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getSpecificationAndModel ( ) ) ,  "specification_and_model" ,  reagentConsumableInventoryDTO . getSpecificationAndModel ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getStandardValueOrPurity ( ) ) ,  "standard_value_or_purity" ,  reagentConsumableInventoryDTO . getStandardValueOrPurity ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getCasNumber ( ) ) ,  "cas_number" ,  reagentConsumableInventoryDTO . getCasNumber ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getSpecies ( ) ) ,  "species" ,  reagentConsumableInventoryDTO . getSpecies ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getEnglishName ( ) ) ,  "english_name" ,  reagentConsumableInventoryDTO . getEnglishName ( ) ) . eq ( reagentConsumableInventoryDTO . getPackagedCopies ( )  ! =  null ,  "packaged_copies" ,  reagentConsumableInventoryDTO . getPackagedCopies ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getAlias ( ) ) ,  "alias" ,  reagentConsumableInventoryDTO . getAlias ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getPurityGrade ( ) ) ,  "purity_grade" ,  reagentConsumableInventoryDTO . getPurityGrade ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getDeviationOrUncertainty ( ) ) ,  "deviation_or_uncertainty" ,  reagentConsumableInventoryDTO . getDeviationOrUncertainty ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getMinimumUnit ( ) ) ,  "minimum_unit" ,  reagentConsumableInventoryDTO . getMinimumUnit ( ) ) ) ;   
					 
					 
					 
					            ReagentConsumables  oldReagentConsumables  =  reagentConsumablesService  . getOne ( Wrappers . < ReagentConsumables  > query ( ) . eq ( "reagent_consumable_name" ,  reagentConsumableInventoryDTO . getReagentConsumableName ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getBrand ( ) ) ,  "brand" ,  reagentConsumableInventoryDTO . getBrand ( ) ) . eq ( "category" ,  reagentConsumableInventoryDTO . getCategory ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getSpecificationAndModel ( ) ) ,  "specification_and_model" ,  reagentConsumableInventoryDTO . getSpecificationAndModel ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getStandardValueOrPurity ( ) ) ,  "standard_value_or_purity" ,  reagentConsumableInventoryDTO . getStandardValueOrPurity ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getCasNumber ( ) ) ,  "cas_number" ,  reagentConsumableInventoryDTO . getCasNumber ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getSpecies ( ) ) ,  "species" ,  reagentConsumableInventoryDTO . getSpecies ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getEnglishName ( ) ) ,  "english_name" ,  reagentConsumableInventoryDTO . getEnglishName ( ) ) . eq ( reagentConsumableInventoryDTO . getPackagedCopies ( )  ! =  null ,  "packaged_copies" ,  reagentConsumableInventoryDTO . getPackagedCopies ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getAlias ( ) ) ,  "alias" ,  reagentConsumableInventoryDTO . getAlias ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getPurityGrade ( ) ) ,  "purity_grade" ,  reagentConsumableInventoryDTO . getPurityGrade ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getDeviationOrUncertainty ( ) ) ,  "deviation_or_uncertainty" ,  reagentConsumableInventoryDTO . getDeviationOrUncertainty ( ) ) . eq ( StrUtil . isNotBlank ( reagentConsumableInventoryDTO . getMinimumUnit ( ) ) ,  "minimum_unit" ,  reagentConsumableInventoryDTO . getMinimumUnit ( ) ) ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					            BatchDetails  batchDetails  =  new  BatchDetails ( ) ;   
					 
					 
					 
					            BatchDetails  batchDetails  =  new  BatchDetails ( ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            batchDetails . setServiceStatus ( 1 ) ;   
					 
					 
					 
					            batchDetails . setServiceStatus ( 1 ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            batchDetails . setQuantity ( quantity ) ;   
					 
					 
					 
					            batchDetails . setQuantity ( quantity ) ;   
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -559,18 +559,18 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            batchDetails . setBatchNumber ( "/" ) ;   
					 
					 
					 
					            batchDetails . setBatchNumber ( "/" ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            batchDetails . setBatchDetailsId ( IdWorker . get32UUID ( ) . toUpperCase ( ) ) ;   
					 
					 
					 
					            batchDetails . setBatchDetailsId ( IdWorker . get32UUID ( ) . toUpperCase ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            batchDetails . setRoomNo ( reagentConsumableInventoryDTO . getRoomNo ( ) ) ;   
					 
					 
					 
					            batchDetails . setRoomNo ( reagentConsumableInventoryDTO . getRoomNo ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            if  ( one  ! =  null )  {   
					 
					 
					 
					            if  ( oldReagentConsumables  ! =  null )  {   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                List < BatchDetails >  batchDetailsList  =  batchDetailsService . list ( Wrappers . < BatchDetails > query ( ) . eq ( "reagent_consumable_inventory_id" ,  one . getReagentConsumableInventoryId ( ) ) ) ;   
					 
					 
					 
					                ReagentConsumableInventory  inventory  =  this . getOne ( Wrappers . < ReagentConsumableInventory > lambdaQuery ( ) . eq ( ReagentConsumableInventory : : getReagentConsumableId ,  oldReagentConsumables . getReagentConsumableId ( ) ) ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					                List < BatchDetails >  batchDetailsList  =  batchDetailsService . list ( Wrappers . < BatchDetails > query ( ) . eq ( "reagent_consumable_inventory_id" ,  inventory . getReagentConsumableInventoryId ( ) ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                if  ( batchDetailsList  ! =  null  &  batchDetailsList . size ( )  >  0 )  {   
					 
					 
					 
					                if  ( batchDetailsList  ! =  null  &  batchDetailsList . size ( )  >  0 )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    int  x  =  batchDetailsList . size ( )  +  1 ;   
					 
					 
					 
					                    int  x  =  batchDetailsList . size ( )  +  1 ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    batchDetails . setBatch ( "2023-"  +  x ) ;   
					 
					 
					 
					                    batchDetails . setBatch ( "2023-"  +  x ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    one . setTotalQuantity ( one . getTotalQuantity ( )  +  quantity ) ;   
					 
					 
					 
					                    inventory . setTotalQuantity ( inventory . getTotalQuantity ( )  +  quantity ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                    this . updateById ( one ) ;   
					 
					 
					 
					                    this . updateById ( inventory ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					                }   
					 
					 
					 
					                }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                batchDetails . setReagentConsumableInventoryId ( one . getReagentConsumableInventoryId ( ) ) ;   
					 
					 
					 
					                batchDetails . setReagentConsumableInventoryId ( inventory . getReagentConsumableInventoryId ( ) ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                ReagentConsumables  reagentConsumables  =  reagentConsumablesService . getById ( one . getReagentConsumableId ( ) ) ;   
					 
					 
					 
					                if  ( ! oldReagentConsumables . getCategory ( ) . equals ( "标准物质" ) )  {   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                if  ( ! one . getCategory ( ) . equals ( "标准物质" ) )  {   
					 
					 
					 
					                    ReagentConsumableStash  reagentConsumableStash  =  reagentConsumableStashService . getOne ( Wrappers . < ReagentConsumableStash > query ( ) . eq ( "room_no" ,  reagentConsumableInventoryDTO . getRoomNo ( ) ) . eq ( "reagent_consumable_id" ,  oldReagentConsumables . getReagentConsumableId ( ) ) ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                    ReagentConsumableStash  reagentConsumableStash  =  reagentConsumableStashService . getOne ( Wrappers . < ReagentConsumableStash > query ( ) . eq ( "room_no" ,  reagentConsumableInventoryDTO . getRoomNo ( ) ) . eq ( "reagent_consumable_id" ,  reagentConsumables . getReagentConsumableId ( ) ) ) ;   
					 
					 
					 
					 
				
			 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					                    if  ( reagentConsumableStash  ! =  null )  {   
					 
					 
					 
					                    if  ( reagentConsumableStash  ! =  null )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        reagentConsumableStash . setTotalQuantity ( reagentConsumableStash . getTotalQuantity ( )  +  quantity ) ;   
					 
					 
					 
					                        reagentConsumableStash . setTotalQuantity ( reagentConsumableStash . getTotalQuantity ( )  +  quantity ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        batchDetails . setReagentConsumableStashId ( reagentConsumableStash . getId ( ) ) ;   
					 
					 
					 
					                        batchDetails . setReagentConsumableStashId ( reagentConsumableStash . getId ( ) ) ;   
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -580,15 +580,15 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        BeanUtils . copyProperties ( reagentConsumableInventoryDTO ,  consumableStash ) ;   
					 
					 
					 
					                        BeanUtils . copyProperties ( reagentConsumableInventoryDTO ,  consumableStash ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        consumableStash . setId ( IdWorker . get32UUID ( ) . toUpperCase ( ) ) ;   
					 
					 
					 
					                        consumableStash . setId ( IdWorker . get32UUID ( ) . toUpperCase ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        consumableStash . setTotalQuantity ( quantity ) ;   
					 
					 
					 
					                        consumableStash . setTotalQuantity ( quantity ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        consumableStash . setReagentConsumableId ( r eagentConsumables. getReagentConsumableId ( ) ) ;   
					 
					 
					 
					                        consumableStash . setReagentConsumableId ( oldR eagentConsumables. getReagentConsumableId ( ) ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					                        batchDetails . setReagentConsumableStashId ( consumableStash . getId ( ) ) ;   
					 
					 
					 
					                        batchDetails . setReagentConsumableStashId ( consumableStash . getId ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        reagentConsumableStashService . save ( consumableStash ) ;   
					 
					 
					 
					                        reagentConsumableStashService . save ( consumableStash ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    }   
					 
					 
					 
					                    }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                }   
					 
					 
					 
					                }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                if  ( reagentConsumableInventoryDTO . getCategory ( ) . equals ( "标准物质" ) )  {   
					 
					 
					 
					                if  ( reagentConsumableInventoryDTO . getCategory ( ) . equals ( "标准物质" ) )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    ReferenceMaterial  referenceMaterial  =  new  ReferenceMaterial ( ) ;   
					 
					 
					 
					                    ReferenceMaterial  referenceMaterial  =  new  ReferenceMaterial ( ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    referenceMaterial . setReagentConsumableId ( r eagentConsumables. getReagentConsumableId ( ) ) ;   
					 
					 
					 
					                    referenceMaterial . setReagentConsumableId ( oldR eagentConsumables. getReagentConsumableId ( ) ) ;   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					                    referenceMaterial . setReagentConsumableInventoryId ( one . getReagentConsumableInventoryId ( ) ) ;   
					 
					 
					 
					                    referenceMaterial . setReagentConsumableInventoryId ( inventory . getReagentConsumableInventoryId ( ) ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					                    referenceMaterial . setLocation ( location ) ;   
					 
					 
					 
					                    referenceMaterial . setLocation ( location ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    referenceMaterial . setStatus ( 0 ) ;   
					 
					 
					 
					                    referenceMaterial . setStatus ( 0 ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    referenceMaterial . setLatticeId ( cabinetCell . getId ( ) ) ;   
					 
					 
					 
					                    referenceMaterial . setLatticeId ( cabinetCell . getId ( ) ) ;   
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -604,28 +604,30 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    referenceMaterialService . save ( referenceMaterial ) ;   
					 
					 
					 
					                    referenceMaterialService . save ( referenceMaterial ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    this . updateCabinet ( cabinetCell . getId ( ) ,  referenceMaterial . getId ( ) ,  1 ) ;   
					 
					 
					 
					                    this . updateCabinet ( cabinetCell . getId ( ) ,  referenceMaterial . getId ( ) ,  1 ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                }   
					 
					 
					 
					                }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                this . updateCabinet ( cabinetCell . getId ( ) ,  r eagentConsumables. getReagentConsumableId ( ) ,  1 ) ;   
					 
					 
					 
					                this . updateCabinet ( cabinetCell . getId ( ) ,  oldR eagentConsumables. getReagentConsumableId ( ) ,  1 ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            }  else  {   
					 
					 
					 
					            }  else  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                ReagentConsumableInventory  reagentConsumableInventory  =  new  ReagentConsumableInventory ( ) ;   
					 
					 
					 
					                ReagentConsumableInventory  reagentConsumableInventory  =  new  ReagentConsumableInventory ( ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                BeanUtils . copyProperties ( reagentConsumableInventoryDTO ,  reagentConsumableInventory ) ;   
					 
					 
					 
					                ReagentConsumables  reagentConsumables  =  new  ReagentConsumables ( ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					                BeanUtils . copyProperties ( reagentConsumableInventoryDTO ,  reagentConsumables ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                reagentConsumableInventory . setReagentConsumableInventoryId ( IdWorker . get32UUID ( ) . toUpperCase ( ) ) ;   
					 
					 
					 
					                reagentConsumableInventory . setReagentConsumableInventoryId ( IdWorker . get32UUID ( ) . toUpperCase ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                reagentConsumableInventory . setWarningValue ( 1 ) ;   
					 
					 
					 
					                reagentConsumableInventory . setWarningValue ( 1 ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                if  ( reagentConsumableInventoryDTO . getPackages ( )  ! =  null )  {   
					 
					 
					 
					                if  ( reagentConsumableInventoryDTO . getPackages ( )  ! =  null )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    if  ( reagentConsumableInventoryDTO . getSpecificationAndModel ( ) . equals ( "/" ) )  {   
					 
					 
					 
					                    if  ( reagentConsumableInventoryDTO . getSpecificationAndModel ( ) . equals ( "/" ) )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        reagentConsumableInventory  . setSpecificationAndModel ( reagentConsumableInventoryDTO . getPackages ( ) ) ;   
					 
					 
					 
					                        reagentConsumables  . setSpecificationAndModel ( reagentConsumableInventoryDTO . getPackages ( ) ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					                    }  else  {   
					 
					 
					 
					                    }  else  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        reagentConsumableInventory  . setSpecificationAndModel ( reagentConsumableInventoryDTO . getSpecificationAndModel ( )  +  ","  +  reagentConsumableInventoryDTO . getPackages ( ) ) ;   
					 
					 
					 
					                        reagentConsumables  . setSpecificationAndModel ( reagentConsumableInventoryDTO . getSpecificationAndModel ( )  +  ","  +  reagentConsumableInventoryDTO . getPackages ( ) ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					                    }   
					 
					 
					 
					                    }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                }   
					 
					 
					 
					                }   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                batchDetails . setReagentConsumableInventoryId ( reagentConsumableInventory . getReagentConsumableInventoryId ( ) ) ;   
					 
					 
					 
					                batchDetails . setReagentConsumableInventoryId ( reagentConsumableInventory . getReagentConsumableInventoryId ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                ReagentConsumables  reagentConsumables  =  reagentConsumablesService . addReagentConsumables ( reagentConsumableInventory ) ;   
					 
					 
					 
					                reagentConsumables . setReagentConsumableId ( IdWorker . get32UUID ( ) . toUpperCase ( ) ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					                reagentConsumablesService . save ( reagentConsumables ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                reagentConsumableInventory . setReagentConsumableId ( reagentConsumables . getReagentConsumableId ( ) ) ;   
					 
					 
					 
					                reagentConsumableInventory . setReagentConsumableId ( reagentConsumables . getReagentConsumableId ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                reagentConsumableInventory . setTotalQuantity ( quantity ) ;   
					 
					 
					 
					                reagentConsumableInventory . setTotalQuantity ( quantity ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                this . save ( reagentConsumableInventory ) ;   
					 
					 
					 
					                this . save ( reagentConsumableInventory ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                this . updateCabinet ( cabinetCell . getId ( ) ,  reagentConsumables . getReagentConsumableId ( ) ,  1 ) ;   
					 
					 
					 
					                this . updateCabinet ( cabinetCell . getId ( ) ,  reagentConsumables . getReagentConsumableId ( ) ,  1 ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                if  ( ! reagentConsumableInventory  . getCategory ( ) . equals ( "标准物质" ) )  {   
					 
					 
					 
					                if  ( ! reagentConsumables  . getCategory ( ) . equals ( "标准物质" ) )  {   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					                    ReagentConsumableStash  reagentConsumableStash  =  reagentConsumableStashService . getOne ( Wrappers . < ReagentConsumableStash > query ( ) . eq ( "room_no" ,  reagentConsumableInventoryDTO . getRoomNo ( ) ) . eq ( "reagent_consumable_id" ,  reagentConsumables . getReagentConsumableId ( ) ) ) ;   
					 
					 
					 
					                    ReagentConsumableStash  reagentConsumableStash  =  reagentConsumableStashService . getOne ( Wrappers . < ReagentConsumableStash > query ( ) . eq ( "room_no" ,  reagentConsumableInventoryDTO . getRoomNo ( ) ) . eq ( "reagent_consumable_id" ,  reagentConsumables . getReagentConsumableId ( ) ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                    if  ( reagentConsumableStash  ! =  null )  {   
					 
					 
					 
					                    if  ( reagentConsumableStash  ! =  null )  {   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                        reagentConsumableStash . setTotalQuantity ( reagentConsumableStash . getTotalQuantity ( )  +  quantity ) ;   
					 
					 
					 
					                        reagentConsumableStash . setTotalQuantity ( reagentConsumableStash . getTotalQuantity ( )  +  quantity ) ;   
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -738,11 +740,15 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        BeanUtils . copyProperties ( batchDetails ,  batchDetailsVO ) ;   
					 
					 
					 
					        BeanUtils . copyProperties ( batchDetails ,  batchDetailsVO ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        batchDetailsVO . setSupplierName ( supplierInformationService . getById ( batchDetails . getSupplierId ( ) ) . getSupplierName ( ) ) ;   
					 
					 
					 
					        batchDetailsVO . setSupplierName ( supplierInformationService . getById ( batchDetails . getSupplierId ( ) ) . getSupplierName ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        ReagentConsumableInventory  reagentConsumableInventory  =  this . getById ( batchDetails . getReagentConsumableInventoryId ( ) ) ;   
					 
					 
					 
					        ReagentConsumableInventory  reagentConsumableInventory  =  this . getById ( batchDetails . getReagentConsumableInventoryId ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        ReagentConsumables  reagentConsumables  =  reagentConsumablesService . getById ( reagentConsumableInventory . getReagentConsumableId ( ) ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        ReagentConsumableInventoryVO  vo  =  new  ReagentConsumableInventoryVO ( ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        BeanUtils . copyProperties ( reagentConsumableInventory ,  vo ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        BeanUtils . copyProperties ( reagentConsumables ,  vo ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        List < LocationInfoVO >  locationInfoVOList  =  locationInfoService . getListById ( id ) ;   
					 
					 
					 
					        List < LocationInfoVO >  locationInfoVOList  =  locationInfoService . getListById ( id ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        HashMap < String ,  Object >  objectObjectHashMap  =  new  HashMap < > ( ) ;   
					 
					 
					 
					        HashMap < String ,  Object >  objectObjectHashMap  =  new  HashMap < > ( ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        objectObjectHashMap . put ( "batchDetails" ,  batchDetailsVO ) ;   
					 
					 
					 
					        objectObjectHashMap . put ( "batchDetails" ,  batchDetailsVO ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        objectObjectHashMap . put ( "reagentConsumableInventory" ,  reagentConsumableIn vent ory ) ;   
					 
					 
					 
					        objectObjectHashMap . put ( "reagentConsumableInventory" ,  vo ) ;   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					        objectObjectHashMap . put ( "locationInfoVOList" ,  locationInfoVOList ) ;   
					 
					 
					 
					        objectObjectHashMap . put ( "locationInfoVOList" ,  locationInfoVOList ) ;   
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        return  objectObjectHashMap ;   
					 
					 
					 
					        return  objectObjectHashMap ;