库位失效
							parent
							
								
									a1cbf2cb50
								
							
						
					
					
						commit
						59a31fd5f4
					
				| 
						 | 
					@ -46,7 +46,8 @@ public class DefaultLocationManager extends DefaultBaseManager implements
 | 
				
			||||||
	public void deleteAll(List<Long> locationIds) {
 | 
						public void deleteAll(List<Long> locationIds) {
 | 
				
			||||||
		String errMsg = "";
 | 
							String errMsg = "";
 | 
				
			||||||
		for (Long id : locationIds) {
 | 
							for (Long id : locationIds) {
 | 
				
			||||||
			Long count = Long.valueOf(String.valueOf(commonDao.findByNamedQueryUniqueResult("getInventoryLogCountByLocationId", new String[] {"locationId"}, new Long[] {id})));
 | 
								String hql="select COUNT(inv.id) from Inventory inv where inv.location.id="+id+" and inv.quantity=0";
 | 
				
			||||||
 | 
								Long count = (Long) commonDao.findByQuery(hql).get(0);
 | 
				
			||||||
			Location location = commonDao.load(Location.class, id);
 | 
								Location location = commonDao.load(Location.class, id);
 | 
				
			||||||
			if (count == 0) {
 | 
								if (count == 0) {
 | 
				
			||||||
				location.setDisabled(true);
 | 
									location.setDisabled(true);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue