|  |  | @ -18,13 +18,11 @@ import com.glxp.api.res.collect.CollectOrderBizResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.basic.UdiProductService; |  |  |  | import com.glxp.api.service.basic.UdiProductService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.util.IntUtil; |  |  |  | import com.glxp.api.util.IntUtil; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.ibm.icu.text.UFormat; |  |  |  | import com.ibm.icu.text.UFormat; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import org.aspectj.weaver.ast.Var; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.stereotype.Service; |  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import javax.annotation.Resource; |  |  |  | import javax.annotation.Resource; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.Collections; |  |  |  | import java.util.*; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.HashSet; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.List; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.Set; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import java.util.stream.Collectors; |  |  |  | import java.util.stream.Collectors; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | @Service |  |  |  | @Service | 
			
		
	
	
		
		
			
				
					|  |  | @ -57,7 +55,9 @@ public class IoCollectOrderBizService extends ServiceImpl<IoCollectOrderBizMappe | 
			
		
	
		
		
			
				
					
					|  |  |  |         //设置 应该扫码数量 shouldCount
 |  |  |  |         //设置 应该扫码数量 shouldCount
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (data.size() > 0) { |  |  |  |         if (data.size() > 0) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             for (CollectOrderBizResponse collectOrderBizResponse : data) { |  |  |  |             for (CollectOrderBizResponse collectOrderBizResponse : data) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 collectOrderBizResponse.setShouldCount(setShouldCount(collectOrderBizResponse)); |  |  |  |                 List<Integer> integers = setShouldCount(collectOrderBizResponse); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 collectOrderBizResponse.setShouldCount(integers.get(0)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 collectOrderBizResponse.setSplitCount(integers.get(1)); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (collectOrderBizResponse.getScanCount() == null) { |  |  |  |                 if (collectOrderBizResponse.getScanCount() == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     collectOrderBizResponse.setScanCount(0); |  |  |  |                     collectOrderBizResponse.setScanCount(0); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
	
		
		
			
				
					|  |  | @ -216,7 +216,8 @@ public class IoCollectOrderBizService extends ServiceImpl<IoCollectOrderBizMappe | 
			
		
	
		
		
			
				
					
					|  |  |  |         return data; |  |  |  |         return data; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public Integer setShouldCount(CollectOrderBizResponse collectOrderBizResponse){ |  |  |  |     public List<Integer> setShouldCount(CollectOrderBizResponse collectOrderBizResponse){ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ArrayList<Integer> integers = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         List<BasicProductsEntity> productList = basicProductsDao.selectList( |  |  |  |         List<BasicProductsEntity> productList = basicProductsDao.selectList( | 
			
		
	
		
		
			
				
					
					|  |  |  |                 new LambdaQueryWrapper<BasicProductsEntity>() |  |  |  |                 new LambdaQueryWrapper<BasicProductsEntity>() | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .eq(BasicProductsEntity::getYbbm, collectOrderBizResponse.getYbbm()) |  |  |  |                         .eq(BasicProductsEntity::getYbbm, collectOrderBizResponse.getYbbm()) | 
			
		
	
	
		
		
			
				
					|  |  | @ -224,13 +225,11 @@ public class IoCollectOrderBizService extends ServiceImpl<IoCollectOrderBizMappe | 
			
		
	
		
		
			
				
					
					|  |  |  |         BasicProductsEntity product = productList.get(0); |  |  |  |         BasicProductsEntity product = productList.get(0); | 
			
		
	
		
		
			
				
					
					|  |  |  |         Integer myBhxjsl = product.getBhxjsl(); |  |  |  |         Integer myBhxjsl = product.getBhxjsl(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         Integer shouldCount = 0; |  |  |  |         Integer shouldCount = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         int remainder = collectOrderBizResponse.getCount() % myBhxjsl; | 
			
		
	
		
		
			
				
					
					|  |  |  |         double quotient = (double) collectOrderBizResponse.getCount() / myBhxjsl; |  |  |  |         double quotient = (double) collectOrderBizResponse.getCount() / myBhxjsl; | 
			
		
	
		
		
			
				
					
					|  |  |  |         int integerPart = (int) quotient; |  |  |  |         int integerPart = (int) quotient; | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (quotient == integerPart) { |  |  |  |         if (quotient == integerPart) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (integerPart == 0) { |  |  |  |             if (integerPart == 0) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (collectOrderBizResponse.getAutoTagStatus() != 2) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     shouldCount = 1; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |             } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 shouldCount = integerPart; |  |  |  |                 shouldCount = integerPart; | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
	
		
		
			
				
					|  |  | @ -238,9 +237,11 @@ public class IoCollectOrderBizService extends ServiceImpl<IoCollectOrderBizMappe | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (IntUtil.value(collectOrderBizResponse.getAutoTagStatus()) == 2) { |  |  |  |             if (IntUtil.value(collectOrderBizResponse.getAutoTagStatus()) == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 shouldCount = 0; |  |  |  |                 shouldCount = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |             } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 shouldCount = integerPart + 1; |  |  |  |                 shouldCount = integerPart; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return shouldCount; |  |  |  |         integers.add(shouldCount); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         integers.add(remainder); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return integers; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |