|  |  |  | @ -14,6 +14,10 @@ import com.glxp.api.req.inv.FilterInvCountOrderDetailRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.res.inv.InvCountOrderDetailResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.inv.InvCountOrderDetailService; | 
			
		
	
		
			
				
					|  |  |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
			
				
					|  |  |  |  | import org.apache.ibatis.session.ExecutorType; | 
			
		
	
		
			
				
					|  |  |  |  | import org.apache.ibatis.session.SqlSession; | 
			
		
	
		
			
				
					|  |  |  |  | import org.apache.ibatis.session.SqlSessionFactory; | 
			
		
	
		
			
				
					|  |  |  |  | import org.apache.ibatis.session.TransactionIsolationLevel; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -32,6 +36,8 @@ public class InvCountOrderDetailServiceImpl implements InvCountOrderDetailServic | 
			
		
	
		
			
				
					|  |  |  |  |     private InvCountOrderDao invCountOrderDao; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     private InvProductDao invProductDao; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     private SqlSessionFactory sqlSessionFactory; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |  |     public List<InvCountOrderDetailEntity> filterList(FilterInvCountOrderDetailRequest detailRequest) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -78,4 +84,20 @@ public class InvCountOrderDetailServiceImpl implements InvCountOrderDetailServic | 
			
		
	
		
			
				
					|  |  |  |  |         invCountOrderDetailDao.insert(invCountOrderDetail); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse batchAddDetail(String orderId, List<InvCountOrderDetailEntity> countOrderDetailList) { | 
			
		
	
		
			
				
					|  |  |  |  |         InvCountOrderEntity invCountOrder = invCountOrderDao.selectByOrderId(orderId); | 
			
		
	
		
			
				
					|  |  |  |  |         SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED); | 
			
		
	
		
			
				
					|  |  |  |  |         InvCountOrderDetailDao mapper = sqlSession.getMapper(InvCountOrderDetailDao.class); | 
			
		
	
		
			
				
					|  |  |  |  |         for (InvCountOrderDetailEntity orderDetailEntity : countOrderDetailList) { | 
			
		
	
		
			
				
					|  |  |  |  |             InvProductEntity invProductEntity = invProductDao.selectProductInfo(orderDetailEntity.getRelId(), orderDetailEntity.getBatchNo(), invCountOrder.getDeptCode(), invCountOrder.getInvCode(), invCountOrder.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |             orderDetailEntity.setInvNum(invProductEntity.getReCount()); | 
			
		
	
		
			
				
					|  |  |  |  |             orderDetailEntity.setCountNum(0); | 
			
		
	
		
			
				
					|  |  |  |  |             mapper.insert(orderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         sqlSession.commit(); | 
			
		
	
		
			
				
					|  |  |  |  |         sqlSession.close(); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |