|  |  | @ -245,6 +245,7 @@ public class IoAddInoutService { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     //新增业务单据处理
 |  |  |  |     //新增业务单据处理
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public void dealBusProcess(IoOrderEntity orderEntity, Integer fromVailPi) { |  |  |  |     public void dealBusProcess(IoOrderEntity orderEntity, Integer fromVailPi) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         orderEntity.setErrMsg("正在处理!"); |  |  |  |         orderEntity.setErrMsg("正在处理!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESSING); |  |  |  |         orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESSING); | 
			
		
	
		
		
			
				
					
					|  |  |  |         orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); |  |  |  |         orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); | 
			
		
	
	
		
		
			
				
					|  |  | @ -308,10 +309,67 @@ public class IoAddInoutService { | 
			
		
	
		
		
			
				
					
					|  |  |  |         orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); |  |  |  |         orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); | 
			
		
	
		
		
			
				
					
					|  |  |  |         orderEntity.setUpdateTime(new Date()); |  |  |  |         orderEntity.setUpdateTime(new Date()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         orderService.update(orderEntity); |  |  |  |         orderService.update(orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         //业务单直接生成扫码单
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (bussinessTypeEntity.getCheckWebNew() == 4) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             boolean exit = codeTempService.isExit(orderEntity.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if (!exit) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 stockGenScan(orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         return; |  |  |  |         return; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |      * 业务单生成扫码单 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     public void stockGenScan(IoOrderEntity orderEntity) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         List<IoOrderDetailBizEntity> bizEntities = orderDetailBizService.findByOrderId(orderEntity.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         List<IoCodeTempEntity> codeTempEntities = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         for (IoOrderDetailBizEntity bizEntity : bizEntities) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             IoCodeTempEntity codeTempEntity = new IoCodeTempEntity(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             String udiCode = "#" + bizEntity.getNameCode() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     + "#" + StrUtil.trimToEmpty(bizEntity.getProductDate()) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     + "#" + StrUtil.trimToEmpty(bizEntity.getExpireDate()) + | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     "#" + StrUtil.trimToEmpty(bizEntity.getBatchNo()) + "#" + "#" + "#"; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setCode(udiCode); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setMainAction(orderEntity.getMainAction()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setAction(orderEntity.getAction()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setOrderId(orderEntity.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setCorpOrderId(orderEntity.getCorpOrderId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setNameCode(bizEntity.getNameCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setBatchNo(bizEntity.getBatchNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setProduceDate(bizEntity.getProductDate()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setExpireDate(bizEntity.getExpireDate()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setSupId(bizEntity.getSupId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setRelId(bizEntity.getBindRlFk()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setCount(bizEntity.getCount()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setReCount(bizEntity.getCount()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setDeptCode(orderEntity.getDeptCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setInvCode(orderEntity.getInvCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setUpdateTime(new Date()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setCreateTime(new Date()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntity.setPrice(bizEntity.getPrice()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if (orderEntity.getBillNo() != null && orderEntity.getBillNo().length() >= 12) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 codeTempEntity.setInBatchNo(orderEntity.getBillNo().substring(orderEntity.getBillNo().length() - 12)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeTempEntities.add(codeTempEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         codeTempService.insertBatch(codeTempEntities); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         bizEntities.forEach(orderDetailBizEntity -> { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             IoOrderDetailCodeEntity orderDetailCodeEntity = new IoOrderDetailCodeEntity(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             BeanUtils.copyProperties(orderDetailBizEntity, orderDetailCodeEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             orderDetailCodeEntity.setId(null); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             orderDetailCodeEntity.setReCount(orderDetailBizEntity.getCount()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             orderDetailCodeEntity.setCount(orderDetailBizEntity.getCount()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             orderDetailCodeService.insert(orderDetailCodeEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ioCheckInoutService.check(orderEntity.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     //生成扫码单据详情
 |  |  |  |     //生成扫码单据详情
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public void genOrderDetailCode(IoOrderEntity orderEntity, IoCodeTempEntity codeTempEntity) { |  |  |  |     public void genOrderDetailCode(IoOrderEntity orderEntity, IoCodeTempEntity codeTempEntity) { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |