|  |  | @ -2,6 +2,7 @@ package com.glxp.api.controller.inout; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.annotation.CusRedissonAnnotation; |  |  |  | import com.glxp.api.annotation.CusRedissonAnnotation; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.constant.*; |  |  |  | import com.glxp.api.constant.*; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.entity.basic.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.inv.InvProductDetailEntity; |  |  |  | import com.glxp.api.entity.inv.InvProductDetailEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.inout.impl.IoCodeService; |  |  |  | import com.glxp.api.service.inout.impl.IoCodeService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.inv.impl.InvProductDetailService; |  |  |  | import com.glxp.api.service.inv.impl.InvProductDetailService; | 
			
		
	
	
		
		
			
				
					|  |  | @ -19,10 +20,6 @@ import com.glxp.api.common.util.ResultVOUtils; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.controller.BaseController; |  |  |  | import com.glxp.api.controller.BaseController; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.auth.AuthAdmin; |  |  |  | import com.glxp.api.entity.auth.AuthAdmin; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.auth.InvWarehouseEntity; |  |  |  | import com.glxp.api.entity.auth.InvWarehouseEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.basic.BasicBussinessTypeEntity; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.basic.BasicCorpEntity; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.basic.UdiEntity; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.basic.UdiProductEntity; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.inout.*; |  |  |  | import com.glxp.api.entity.inout.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.inv.InvPreInProductDetailEntity; |  |  |  | import com.glxp.api.entity.inv.InvPreInProductDetailEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.basic.CompanyProductRelevanceRequest; |  |  |  | import com.glxp.api.req.basic.CompanyProductRelevanceRequest; | 
			
		
	
	
		
		
			
				
					|  |  | @ -747,21 +744,21 @@ public class IoCodeTempController extends BaseController { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (IntUtil.value(bussinessTypeEntity.getUseDyCount()) == 2) { |  |  |  |             if (IntUtil.value(bussinessTypeEntity.getUseDyCount()) == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (bussinessTypeEntity.isScanPreIn() && checkDiAttribute(bussinessTypeEntity, udiRelevanceResponse, 2)) {    //校验预验收库存
 |  |  |  |                 if (bussinessTypeEntity.isScanPreIn() && checkDiAttribute(bussinessTypeEntity, udiRelevanceResponse.getId(), 2)) {    //校验预验收库存
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     BaseResponse invRes = checkPreInInv(bussinessTypeEntity, codeEnttity, false); |  |  |  |                     BaseResponse invRes = checkPreInInv(bussinessTypeEntity, codeEnttity, false); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if (invRes != null) { |  |  |  |                     if (invRes != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         deleteEmptyBillNo(orderEntity); |  |  |  |                         deleteEmptyBillNo(orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |                         return invRes; |  |  |  |                         return invRes; | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (bussinessTypeEntity.isAdvancePreIn() && checkDiAttribute(bussinessTypeEntity, udiRelevanceResponse, 3)) {  //校验寄售库存
 |  |  |  |                 if (bussinessTypeEntity.isAdvancePreIn() && checkDiAttribute(bussinessTypeEntity, udiRelevanceResponse.getId(), 3)) {  //校验寄售库存
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     BaseResponse invRes = checkPreInv(bussinessTypeEntity, codeEnttity, false); |  |  |  |                     BaseResponse invRes = checkPreInv(bussinessTypeEntity, codeEnttity, false); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if (invRes != null) { |  |  |  |                     if (invRes != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         deleteEmptyBillNo(orderEntity); |  |  |  |                         deleteEmptyBillNo(orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |                         return invRes; |  |  |  |                         return invRes; | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (bussinessTypeEntity.isVailInv() && checkDiAttribute(bussinessTypeEntity, udiRelevanceResponse, 1)) { |  |  |  |                 if (bussinessTypeEntity.isVailInv() && checkDiAttribute(bussinessTypeEntity, udiRelevanceResponse.getId(), 1)) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     BaseResponse invRes = checkInv(bussinessTypeEntity, codeEnttity, false); |  |  |  |                     BaseResponse invRes = checkInv(bussinessTypeEntity, codeEnttity, false); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if (invRes != null) { |  |  |  |                     if (invRes != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         deleteEmptyBillNo(orderEntity); |  |  |  |                         deleteEmptyBillNo(orderEntity); | 
			
		
	
	
		
		
			
				
					|  |  | @ -1358,11 +1355,11 @@ public class IoCodeTempController extends BaseController { | 
			
		
	
		
		
			
				
					
					|  |  |  |         codeTempService.updateById(codeTempEntity); |  |  |  |         codeTempService.updateById(codeTempEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |         BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(tempEntity.getAction()); |  |  |  |         BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(tempEntity.getAction()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         BaseResponse invRes = null; |  |  |  |         BaseResponse invRes = null; | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (bussinessTypeEntity.isScanPreIn()) {    //校验预验收库存
 |  |  |  |         if (bussinessTypeEntity.isScanPreIn() && checkDiAttribute(bussinessTypeEntity, codeTempEntity.getRelId(), 2)) {    //校验预验收库存
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             invRes = checkPreInInv(bussinessTypeEntity, codeTempEntity, true); |  |  |  |             invRes = checkPreInInv(bussinessTypeEntity, codeTempEntity, true); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } else if (bussinessTypeEntity.isAdvancePreIn()) {  //校验寄售库存
 |  |  |  |         } else if (bussinessTypeEntity.isAdvancePreIn() && checkDiAttribute(bussinessTypeEntity, codeTempEntity.getRelId(), 3)) {  //校验寄售库存
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             invRes = checkPreInv(bussinessTypeEntity, codeTempEntity, true); |  |  |  |             invRes = checkPreInv(bussinessTypeEntity, codeTempEntity, true); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } else { |  |  |  |         } else if (bussinessTypeEntity.isAdvancePreIn() && checkDiAttribute(bussinessTypeEntity, codeTempEntity.getRelId(), 1)) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             invRes = checkInv(bussinessTypeEntity, codeTempEntity, true); |  |  |  |             invRes = checkInv(bussinessTypeEntity, codeTempEntity, true); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (invRes != null) { |  |  |  |         if (invRes != null) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -1850,18 +1847,28 @@ public class IoCodeTempController extends BaseController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     /** |  |  |  |     /** | 
			
		
	
		
		
			
				
					
					|  |  |  |      * @param udiRelevanceResponse |  |  |  |      * @param purType 1:入账库;2:预验收库;3:寄售库 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |      * @param purType              1:入账库;2:预验收库;3:寄售库 |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |      */ |  |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |  |     public boolean checkDiAttribute(BasicBussinessTypeEntity bussinessTypeEntity, UdiRelevanceResponse udiRelevanceResponse, Integer purType) { |  |  |  |     public boolean checkDiAttribute(BasicBussinessTypeEntity bussinessTypeEntity, UdiRelevanceResponse udiRelevanceEntity, Integer purType) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         if (bussinessTypeEntity.getUseDyCount() == 2) { |  |  |  |         if (bussinessTypeEntity.getUseDyCount() == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (IntUtil.value(udiRelevanceResponse.getPurType()) == IntUtil.value(purType)) { |  |  |  |             if (IntUtil.value(udiRelevanceEntity.getPurType()) == IntUtil.value(purType)) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 return true; |  |  |  |                 return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |             } else |  |  |  |             } else | 
			
		
	
		
		
			
				
					
					|  |  |  |                 return false; |  |  |  |                 return false; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |     /** | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |      * | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     public boolean checkDiAttribute(BasicBussinessTypeEntity bussinessTypeEntity, Long relId, Integer purType) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (bussinessTypeEntity.getUseDyCount() == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if (udiRelevanceService.findPurType(relId) == IntUtil.value(purType)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } else | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 return false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return true; |  |  |  |         return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |