|  |  |  | @ -9,7 +9,6 @@ import com.glxp.api.entity.basic.*; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.collect.IoCollectCode; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.collect.IoCollectOrder; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.collect.IoCollectOrderOrigin; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.inv.InvProductDetailEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.exception.JsonException; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.req.collect.CollectOrderBizRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.req.collect.CollectOrderRequest; | 
			
		
	
	
		
			
				
					|  |  |  | @ -19,7 +18,8 @@ import com.glxp.api.res.inout.IoOrderDetailCodeResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.res.inout.VailCodeResultResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.collect.*; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.inout.impl.IoCodeService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.inv.impl.InvProductDetailService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.inv.impl.InvProductServiceNew; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.vo.basic.InvProductNewVo; | 
			
		
	
		
			
				
					|  |  |  |  | import org.aspectj.weaver.ast.Var; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.beans.BeanUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.collection.CollUtil; | 
			
		
	
	
		
			
				
					|  |  |  | @ -93,7 +93,7 @@ public class IoCodeTempController extends BaseController { | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     InvPreinProductDetailService invPreinProductDetailService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     InvProductDetailService invProductDetailService; | 
			
		
	
		
			
				
					|  |  |  |  |     InvProductServiceNew invProductServiceNew; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     IoCodeLostService codeLostService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
	
		
			
				
					|  |  |  | @ -989,11 +989,11 @@ public class IoCodeTempController extends BaseController { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (IntUtil.value(priceFifo) > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                         if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) { | 
			
		
	
		
			
				
					|  |  |  |  |                             //1.获取当前批次已出库数量
 | 
			
		
	
		
			
				
					|  |  |  |  |                             Integer outCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT); | 
			
		
	
		
			
				
					|  |  |  |  |                             Integer outCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT); | 
			
		
	
		
			
				
					|  |  |  |  |                             //2.获取当前批次入库数量
 | 
			
		
	
		
			
				
					|  |  |  |  |                             Integer inCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT); | 
			
		
	
		
			
				
					|  |  |  |  |                             Integer inCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT); | 
			
		
	
		
			
				
					|  |  |  |  |                             if ((IntUtil.value(inCount) - IntUtil.value(outCount) - IntUtil.value(exitLocalEntity.getReCount())) < 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 InvProductDetailEntity nextInvProduct = invProductDetailService.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 InvProductNewVo nextInvProduct = invProductServiceNew.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 if (nextInvProduct != null) { | 
			
		
	
		
			
				
					|  |  |  |  |                                     genDetaiEntity.setPrice(nextInvProduct.getPrice()); | 
			
		
	
		
			
				
					|  |  |  |  |                                     genDetaiEntity.setInBatchNo(nextInvProduct.getInBatchNo()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -1462,11 +1462,11 @@ public class IoCodeTempController extends BaseController { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (IntUtil.value(priceFifo) > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                         if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) { | 
			
		
	
		
			
				
					|  |  |  |  |                             //1.获取当前批次已出库数量
 | 
			
		
	
		
			
				
					|  |  |  |  |                             Integer outCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT); | 
			
		
	
		
			
				
					|  |  |  |  |                             Integer outCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT); | 
			
		
	
		
			
				
					|  |  |  |  |                             //2.获取当前批次入库数量
 | 
			
		
	
		
			
				
					|  |  |  |  |                             Integer inCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT); | 
			
		
	
		
			
				
					|  |  |  |  |                             Integer inCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT); | 
			
		
	
		
			
				
					|  |  |  |  |                             if ((IntUtil.value(inCount) - IntUtil.value(outCount) - IntUtil.value(exitLocalEntity.getReCount())) < 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 InvProductDetailEntity nextInvProduct = invProductDetailService.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 InvProductNewVo nextInvProduct = invProductServiceNew.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 if (nextInvProduct != null) { | 
			
		
	
		
			
				
					|  |  |  |  |                                     genDetaiEntity.setPrice(nextInvProduct.getPrice()); | 
			
		
	
		
			
				
					|  |  |  |  |                                     genDetaiEntity.setInBatchNo(nextInvProduct.getInBatchNo()); | 
			
		
	
	
		
			
				
					|  |  |  | 
 |