|  |  | @ -461,9 +461,6 @@ public class IoCodeTempController extends BaseController { | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         //校验库存是否存在
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (addOrderRequest.getFromCorp() == null) { |  |  |  |         if (addOrderRequest.getFromCorp() == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             BasicCorpEntity basicCorpEntity = basicUnitMaintainService.selectByName(addOrderRequest.getFromCorp()); |  |  |  |             BasicCorpEntity basicCorpEntity = basicUnitMaintainService.selectByName(addOrderRequest.getFromCorp()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (basicCorpEntity == null && bussinessTypeEntity.getCorpType() == ConstantStatus.CORP_TYPE_INPUT && bussinessTypeEntity.isGenUnit()) { |  |  |  |             if (basicCorpEntity == null && bussinessTypeEntity.getCorpType() == ConstantStatus.CORP_TYPE_INPUT && bussinessTypeEntity.isGenUnit()) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -802,28 +799,34 @@ public class IoCodeTempController extends BaseController { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @AuthRuleAnnotation("") |  |  |  |     @AuthRuleAnnotation("") | 
			
		
	
		
		
			
				
					
					|  |  |  |     @PostMapping("/udiwms/addCode/updateBindSup") |  |  |  |     @PostMapping("/udiwms/addCode/updateBindSup") | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse updateBindSup(@RequestBody IoCodeTempEntity warehouseEntity, BindingResult bindingResult) { |  |  |  |     public BaseResponse updateBindSup(@RequestBody IoCodeTempEntity codeTempEntity, BindingResult bindingResult) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (bindingResult.hasErrors()) { |  |  |  |         if (bindingResult.hasErrors()) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); |  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (StrUtil.isNotEmpty(warehouseEntity.getMySupId())) { |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             warehouseEntity.setSupId(warehouseEntity.getMySupId()); |  |  |  |         if (StrUtil.isNotEmpty(codeTempEntity.getSupId())) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             codeTempService.updateById(warehouseEntity); |  |  |  |             codeTempEntity.setSupId(codeTempEntity.getSupId()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         } else if (warehouseEntity.getRelId() != null) { |  |  |  |             codeTempService.updateById(codeTempEntity); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             warehouseEntity = codeTempService.selectById(warehouseEntity.getId()); |  |  |  |         } else if (codeTempEntity.getRelId() != null) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             int reCount = udiCalCountUtil.getActCount(warehouseEntity); |  |  |  |             codeTempEntity = codeTempService.selectById(codeTempEntity.getId()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             warehouseEntity.setReCount(reCount); |  |  |  |             int reCount = udiCalCountUtil.getActCount(codeTempEntity); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             codeTempService.updateById(warehouseEntity); |  |  |  |             codeTempEntity.setReCount(reCount); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(warehouseEntity.getAction()); |  |  |  |             codeTempService.updateById(codeTempEntity); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             BaseResponse baseResponse = checkSupId(bussinessTypeEntity, warehouseEntity, warehouseEntity.getSupId()); |  |  |  |             BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(codeTempEntity.getAction()); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             BaseResponse baseResponse = checkSupId(bussinessTypeEntity, codeTempEntity, codeTempEntity.getSupId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (baseResponse != null) |  |  |  |             if (baseResponse != null) | 
			
		
	
		
		
			
				
					
					|  |  |  |                 return baseResponse; |  |  |  |                 return baseResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         codeTempEntity = codeTempService.selectById(codeTempEntity.getId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         IoOrderEntity orderEntity = orderService.findByBillNo(codeTempEntity.getOrderId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ioAddInoutService.genOrderDetailCode(orderEntity, codeTempEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         return ResultVOUtils.success("绑定成功"); |  |  |  |         return ResultVOUtils.success("绑定成功"); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |     @Resource | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     IoAddInoutService ioAddInoutService; | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |     IoOrderDetailCodeService ioOrderDetailCodeService; |  |  |  |     IoOrderDetailCodeService ioOrderDetailCodeService; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |