| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -18,7 +18,6 @@ import digital.laboratory.platform.common.feign.RemoteTemplate2htmlService; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.common.feign.RemoteWord2PDFService; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.common.feign.RemoteWord2PDFService; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.common.oss.service.OssFile; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.common.oss.service.OssFile; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.reagent.utils.IntegerUtils; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.reagent.utils.PageUtils; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.reagent.utils.PageUtils; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.reagent.entity.*; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.reagent.entity.*; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -28,6 +27,7 @@ import digital.laboratory.platform.sys.entity.CabinetCell; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.sys.feign.RemoteCabinetService; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.sys.feign.RemoteCabinetService; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import feign.Response; | 
					 | 
					 | 
					 | 
					import feign.Response; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					import io.seata.spring.annotation.GlobalTransactional; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import org.apache.commons.io.output.ByteArrayOutputStream; | 
					 | 
					 | 
					 | 
					import org.apache.commons.io.output.ByteArrayOutputStream; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import org.springframework.beans.BeanUtils; | 
					 | 
					 | 
					 | 
					import org.springframework.beans.BeanUtils; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
					 | 
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -562,7 +562,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        Calendar instance = Calendar.getInstance(); | 
					 | 
					 | 
					 | 
					        Calendar instance = Calendar.getInstance(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int year = instance.get(Calendar.YEAR); | 
					 | 
					 | 
					 | 
					        int year = instance.get(Calendar.YEAR); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        IntegerUtils integerUtils = new IntegerUtils(); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        for (ReagentConsumableInventoryDTO reagentConsumableInventoryDTO : reagentConsumableInventoryDTOList) { | 
					 | 
					 | 
					 | 
					        for (ReagentConsumableInventoryDTO reagentConsumableInventoryDTO : reagentConsumableInventoryDTOList) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            Integer quantity = reagentConsumableInventoryDTO.getTotalQuantity() * reagentConsumableInventoryDTO.getPackagedCopies(); | 
					 | 
					 | 
					 | 
					            Integer quantity = reagentConsumableInventoryDTO.getTotalQuantity() * reagentConsumableInventoryDTO.getPackagedCopies(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            SupplierInformation supplier = supplierInformationService.getOne(Wrappers.<SupplierInformation>query().eq("supplier_name", reagentConsumableInventoryDTO.getSupplierName())); | 
					 | 
					 | 
					 | 
					            SupplierInformation supplier = supplierInformationService.getOne(Wrappers.<SupplierInformation>query().eq("supplier_name", reagentConsumableInventoryDTO.getSupplierName())); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -570,6 +569,32 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            String location = "F" + reagentConsumableInventoryDTO.getRoomNo().charAt(0) + "-" + reagentConsumableInventoryDTO.getRoomNo() + "_试剂柜-" + reagentConsumableInventoryDTO | 
					 | 
					 | 
					 | 
					            String location = "F" + reagentConsumableInventoryDTO.getRoomNo().charAt(0) + "-" + reagentConsumableInventoryDTO.getRoomNo() + "_试剂柜-" + reagentConsumableInventoryDTO | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    .getLocation().charAt(0) + "_" + reagentConsumableInventoryDTO.getLocation(); | 
					 | 
					 | 
					 | 
					                    .getLocation().charAt(0) + "_" + reagentConsumableInventoryDTO.getLocation(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getStandardValueOrPurity())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                reagentConsumableInventoryDTO.setStandardValueOrPurity(""); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getDeviationOrUncertainty())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                reagentConsumableInventoryDTO.setDeviationOrUncertainty(""); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getEnglishName())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                reagentConsumableInventoryDTO.setEnglishName(""); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCasNumber())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                reagentConsumableInventoryDTO.setCasNumber(""); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCode())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                reagentConsumableInventoryDTO.setCode(""); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getPurityGrade())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                reagentConsumableInventoryDTO.setPurityGrade(""); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getRemark())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                reagentConsumableInventoryDTO.setRemark(""); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!StrUtil.isNotBlank(reagentConsumableInventoryDTO.getAlias())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                reagentConsumableInventoryDTO.setAlias(""); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            ReagentConsumableInventory one = this.getOne(Wrappers.<ReagentConsumableInventory>query() | 
					 | 
					 | 
					 | 
					            ReagentConsumableInventory one = this.getOne(Wrappers.<ReagentConsumableInventory>query() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    .eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName()) | 
					 | 
					 | 
					 | 
					                    .eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName()) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()), "brand", reagentConsumableInventoryDTO.getBrand()) | 
					 | 
					 | 
					 | 
					                    .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()), "brand", reagentConsumableInventoryDTO.getBrand()) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -674,18 +699,13 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                BeanUtils.copyProperties(reagentConsumableInventoryDTO, reagentConsumableInventory); | 
					 | 
					 | 
					 | 
					                BeanUtils.copyProperties(reagentConsumableInventoryDTO, reagentConsumableInventory); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase()); | 
					 | 
					 | 
					 | 
					                reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                reagentConsumableInventory.setWarningValue(1); | 
					 | 
					 | 
					 | 
					                reagentConsumableInventory.setWarningValue(1); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (reagentConsumableInventoryDTO.getSpecificationAndModel().equals("/")) { | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (reagentConsumableInventoryDTO.getPackages() != null) { | 
					 | 
					 | 
					 | 
					                if (reagentConsumableInventoryDTO.getPackages() != null) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    if (reagentConsumableInventoryDTO.getSpecificationAndModel().equals("/")) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventoryDTO.getPackages()); | 
					 | 
					 | 
					 | 
					                        reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventoryDTO.getPackages()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    } | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    } else { | 
					 | 
					 | 
					 | 
					                    } else { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (reagentConsumableInventoryDTO.getPackages() != null) { | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventoryDTO.getSpecificationAndModel() + "," + reagentConsumableInventoryDTO.getPackages()); | 
					 | 
					 | 
					 | 
					                        reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventoryDTO.getSpecificationAndModel() + "," + reagentConsumableInventoryDTO.getPackages()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    } | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (reagentConsumableInventoryDTO.getPackages() != null) { | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    reagentConsumableInventory.setSpecificationAndModel(reagentConsumableInventory.getSpecificationAndModel() + "," + reagentConsumableInventoryDTO.getPackages()); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); | 
					 | 
					 | 
					 | 
					                batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(reagentConsumableInventory); | 
					 | 
					 | 
					 | 
					                ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(reagentConsumableInventory); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                reagentConsumableInventory.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); | 
					 | 
					 | 
					 | 
					                reagentConsumableInventory.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -772,4 +792,24 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        System.out.println("总个数" + orgFullVOS.size()); | 
					 | 
					 | 
					 | 
					        System.out.println("总个数" + orgFullVOS.size()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return orgFullVOS; | 
					 | 
					 | 
					 | 
					        return orgFullVOS; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    @GlobalTransactional | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    public boolean updateLocation(BatchDetails batchDetails) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        BatchDetails oldBatchDetails = batchDetailsService.getById(batchDetails.getBatchDetailsId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        this.updateCabinet(oldBatchDetails.getLatticeId(), oldBatchDetails.getReagentConsumableInventoryId(), -1);//清除原来位置信息ID
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        oldBatchDetails.setLocation(batchDetails.getLocation()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        oldBatchDetails.setBoxId(batchDetails.getBoxId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        oldBatchDetails.setLocation(batchDetails.getLocation()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        oldBatchDetails.setRoomNo(batchDetails.getLocation().substring(3, 6)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (batchDetailsService.updateById(oldBatchDetails)) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.updateCabinet(oldBatchDetails.getLatticeId(), oldBatchDetails.getReagentConsumableInventoryId(), 1); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            return true; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        } else return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
  |