| 
					
				 | 
			
			
				@@ -3426,6 +3426,19 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return AjaxResult.error("库存明细库存不足"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 判断出库明细审批参数是否开启 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (CKDetailsSwitch()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                TWarehousebillsitems tbs = tWarehousebillsitemsMapper.selectTWarehousebillsitemsById(warehousebillsitems.getfId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (tbs.getfItemstatus() == 2L) { // 判断仓库明细从表数据明细审批状态是否为 2 ,则是未发起明细请核过 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    throw new WarehouseException("通过明细请核后重试"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (tbs.getfItemstatus() == 3L) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    throw new WarehouseException("明细请核被驳回,请重新提交请核"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (tbs.getfItemstatus() == 4L || tWarehousebillsitems.getfItemstatus() == 5L) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    throw new WarehouseException("明细审批中~"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 将被更改的明细请核状态装进传递 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                warehousebillsitems.setfItemstatus(tbs.getfItemstatus()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tWarehousebillsitems.setfVolumn(warehousebillsitems.getfVolumn()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 跟新库存总账 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             updateTWhgenlegData(tWarehousebillsitems, tWhgenle.getfId(), billsType); 
			 |