|  |  |  | @ -121,7 +121,7 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         //如果库存为空就删了该数据
 | 
			
		
	
		
			
				
					|  |  |  |  |                         if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && invPreInProductDetailEntity.getOutCount() == 0 | 
			
		
	
		
			
				
					|  |  |  |  |                         if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && (invPreInProductDetailEntity.getOutCount() == null || invPreInProductDetailEntity.getOutCount() == 0) | 
			
		
	
		
			
				
					|  |  |  |  |                                 && invPreInProductDetailEntity.getCount() == 0 && invPreInProductDetailEntity.getReCount() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                             invPreInProductDetailDao.deleteById(invPreInProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
	
		
			
				
					|  |  |  | @ -191,7 +191,7 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                         invPreProductDetailDao.updateById(invPreInProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         //如果库存为空就删了该数据
 | 
			
		
	
		
			
				
					|  |  |  |  |                         if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && invPreInProductDetailEntity.getOutCount() == 0 | 
			
		
	
		
			
				
					|  |  |  |  |                         if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && (invPreInProductDetailEntity.getOutCount() == null || invPreInProductDetailEntity.getOutCount() == 0) | 
			
		
	
		
			
				
					|  |  |  |  |                                 && invPreInProductDetailEntity.getCount() == 0 && invPreInProductDetailEntity.getReCount() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                             invPreProductDetailDao.deleteById(invPreInProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
	
		
			
				
					|  |  |  | @ -257,7 +257,7 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                         invProductDetailDao.updateById(invPreInProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         //如果库存为空就删了该数据
 | 
			
		
	
		
			
				
					|  |  |  |  |                         if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && invPreInProductDetailEntity.getOutCount() == 0 | 
			
		
	
		
			
				
					|  |  |  |  |                         if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && (invPreInProductDetailEntity.getOutCount() == null || invPreInProductDetailEntity.getOutCount() == 0) | 
			
		
	
		
			
				
					|  |  |  |  |                                 && invPreInProductDetailEntity.getCount() == 0 && invPreInProductDetailEntity.getReCount() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                             invProductDetailDao.deleteById(invPreInProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
	
		
			
				
					|  |  |  | @ -598,7 +598,7 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |             ew.select("count"); | 
			
		
	
		
			
				
					|  |  |  |  |             ew.last("limit 1"); | 
			
		
	
		
			
				
					|  |  |  |  |             InvPreInProductDetailEntity invPreInProductDetailEntity = invPreInProductDetailDao.selectOne(ew); | 
			
		
	
		
			
				
					|  |  |  |  |             if (invPreInProductDetailEntity.getCount() <= 0) { | 
			
		
	
		
			
				
					|  |  |  |  |             if (invPreInProductDetailEntity==null || invPreInProductDetailEntity.getCount() <= 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                 return "该产品没存在该货架上!"; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             if (StrUtil.isNotBlank(bindInvSpaceRequest.getOrderId())) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -621,7 +621,7 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |             ew.select("count"); | 
			
		
	
		
			
				
					|  |  |  |  |             ew.last("limit 1"); | 
			
		
	
		
			
				
					|  |  |  |  |             InvPreProductDetailEntity invPreProductDetailEntity = invPreProductDetailDao.selectOne(ew); | 
			
		
	
		
			
				
					|  |  |  |  |             if (invPreProductDetailEntity.getCount() <= 0) { | 
			
		
	
		
			
				
					|  |  |  |  |             if (invPreProductDetailEntity==null || invPreProductDetailEntity.getCount() <= 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                 return "该产品没存在该货架上!"; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             if (StrUtil.isNotBlank(bindInvSpaceRequest.getOrderId())) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -644,7 +644,7 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |             ew.select("count"); | 
			
		
	
		
			
				
					|  |  |  |  |             ew.last("limit 1"); | 
			
		
	
		
			
				
					|  |  |  |  |             InvProductDetailEntity invProductDetailEntity = invProductDetailDao.selectOne(ew); | 
			
		
	
		
			
				
					|  |  |  |  |             if (invProductDetailEntity.getCount() <= 0) { | 
			
		
	
		
			
				
					|  |  |  |  |             if (invProductDetailEntity==null || invProductDetailEntity.getCount() <= 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                 return "该产品没存在该货架上!"; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             if (StrUtil.isNotBlank(bindInvSpaceRequest.getOrderId())) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -761,6 +761,16 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                                 invPreInProductDetailEntity.setOutCount(0); | 
			
		
	
		
			
				
					|  |  |  |  |                                 invPreInProductDetailDao.insert(invPreInProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  |                             //如果库存为空就删了该数据
 | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.clear(); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("code", invPlaceOrderDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.last("limit 1"); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPreInProductDetailEntity = invPreInProductDetailDao.selectOne(ew); | 
			
		
	
		
			
				
					|  |  |  |  |                             if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && invPreInProductDetailEntity.getOutCount() == 0 | 
			
		
	
		
			
				
					|  |  |  |  |                                     && invPreInProductDetailEntity.getCount() == 0 && invPreInProductDetailEntity.getReCount() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 invPreInProductDetailDao.deleteById(invPreInProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | @ -788,16 +798,6 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                             invPreProductDetailEntity.setReCount(invPreProductDetailEntity.getReCount() - reCount); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPreProductDetailDao.updateById(invPreProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                             //如果库存为空就删了该数据
 | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.clear(); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("code", invPlaceOrderDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.last("limit 1"); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPreProductDetailEntity = invPreProductDetailDao.selectOne(ew); | 
			
		
	
		
			
				
					|  |  |  |  |                             if (invPreProductDetailEntity != null && invPreProductDetailEntity.getInCount() == 0 && invPreProductDetailEntity.getOutCount() == 0 | 
			
		
	
		
			
				
					|  |  |  |  |                                     && invPreProductDetailEntity.getCount() == 0 && invPreProductDetailEntity.getReCount() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 invPreProductDetailDao.deleteById(invPreProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                             //如果有存在数据就加没有就新建
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -826,6 +826,16 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                                 invPreProductDetailEntity.setOutCount(0); | 
			
		
	
		
			
				
					|  |  |  |  |                                 invPreProductDetailDao.insert(invPreProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  |                             //如果库存为空就删了该数据
 | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.clear(); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("code", invPlaceOrderDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.last("limit 1"); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPreProductDetailEntity = invPreProductDetailDao.selectOne(ew); | 
			
		
	
		
			
				
					|  |  |  |  |                             if (invPreProductDetailEntity != null && invPreProductDetailEntity.getInCount() == 0 && invPreProductDetailEntity.getOutCount() == 0 | 
			
		
	
		
			
				
					|  |  |  |  |                                     && invPreProductDetailEntity.getCount() == 0 && invPreProductDetailEntity.getReCount() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 invPreProductDetailDao.deleteById(invPreProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | @ -854,16 +864,6 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                             invProductDetailEntity.setReCount(invProductDetailEntity.getReCount() - reCount); | 
			
		
	
		
			
				
					|  |  |  |  |                             invProductDetailDao.updateById(invProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                             //如果库存为空就删了该数据
 | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.clear(); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("code", invPlaceOrderDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.last("limit 1"); | 
			
		
	
		
			
				
					|  |  |  |  |                             invProductDetailEntity = invProductDetailDao.selectOne(ew); | 
			
		
	
		
			
				
					|  |  |  |  |                             if (invProductDetailEntity != null && invProductDetailEntity.getInCount() == 0 && invProductDetailEntity.getOutCount() == 0 | 
			
		
	
		
			
				
					|  |  |  |  |                                     && invProductDetailEntity.getCount() == 0 && invProductDetailEntity.getReCount() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 invProductDetailDao.deleteById(invProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                             //如果有存在数据就加没有就新建
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -892,6 +892,18 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                                 invProductDetailEntity.setOutCount(0); | 
			
		
	
		
			
				
					|  |  |  |  |                                 invProductDetailDao.insert(invProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                             //如果库存为空就删了该数据
 | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.clear(); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("code", invPlaceOrderDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             ew.last("limit 1"); | 
			
		
	
		
			
				
					|  |  |  |  |                             invProductDetailEntity = invProductDetailDao.selectOne(ew); | 
			
		
	
		
			
				
					|  |  |  |  |                             if (invProductDetailEntity != null && invProductDetailEntity.getInCount() == 0 && invProductDetailEntity.getOutCount() == 0 | 
			
		
	
		
			
				
					|  |  |  |  |                                     && invProductDetailEntity.getCount() == 0 && invProductDetailEntity.getReCount() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 invProductDetailDao.deleteById(invProductDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |