|  |  | @ -11,10 +11,15 @@ import com.glxp.api.entity.collect.IoCollectOrderBiz; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.inout.IoOrderDetailBizEntity; |  |  |  | import com.glxp.api.entity.inout.IoOrderDetailBizEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.inout.IoOrderEntity; |  |  |  | import com.glxp.api.entity.inout.IoOrderEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.collect.CollectOrderRequest; |  |  |  | import com.glxp.api.req.collect.CollectOrderRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.req.inout.FilterOrderRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.res.basic.UdiRelevanceResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.collect.IoCollectOrderResponse; |  |  |  | import com.glxp.api.res.collect.IoCollectOrderResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.res.inout.IoOrderResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.basic.BasicCollectBustypeService; |  |  |  | import com.glxp.api.service.basic.BasicCollectBustypeService; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.service.basic.UdiRelevanceService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.inout.IoOrderDetailBizService; |  |  |  | import com.glxp.api.service.inout.IoOrderDetailBizService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.inout.IoOrderService; |  |  |  | import com.glxp.api.service.inout.IoOrderService; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.util.IntUtil; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.stereotype.Service; |  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import javax.annotation.Resource; |  |  |  | import javax.annotation.Resource; | 
			
		
	
	
		
		
			
				
					|  |  | @ -54,15 +59,19 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC | 
			
		
	
		
		
			
				
					
					|  |  |  |     BasicCollectBustypeService collectBustypeService; |  |  |  |     BasicCollectBustypeService collectBustypeService; | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |     IoCollectOrderBizService collectOrderBizService; |  |  |  |     IoCollectOrderBizService collectOrderBizService; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     UdiRelevanceService udiRelevanceService; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     /** |  |  |  |     /** | 
			
		
	
		
		
			
				
					
					|  |  |  |      * 导入内部数据 |  |  |  |      * 导入内部数据 | 
			
		
	
		
		
			
				
					
					|  |  |  |      */ |  |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |  |     public void importOrder() { |  |  |  |     public void importOrder() { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |         FilterOrderRequest filterOrderRequest = new FilterOrderRequest(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         List<IoOrderEntity> list = orderService.selectAll(); |  |  |  |         filterOrderRequest.setPage(1); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         filterOrderRequest.setLimit(1000); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         List<IoOrderResponse> list = orderService.filterList(filterOrderRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  |         List<IoCollectOrder> collectOrderList = new ArrayList<>(); |  |  |  |         List<IoCollectOrder> collectOrderList = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         for (IoOrderEntity ioOrderEntity : list) { |  |  |  |         for (IoOrderResponse ioOrderEntity : list) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             BasicCollectBustypeEntity collectBustypeEntity = collectBustypeService.findByAddr(ioOrderEntity.getAction()); |  |  |  |             BasicCollectBustypeEntity collectBustypeEntity = collectBustypeService.findByAddr(ioOrderEntity.getAction()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (collectBustypeEntity == null) |  |  |  |             if (collectBustypeEntity == null) | 
			
		
	
		
		
			
				
					
					|  |  |  |                 continue; |  |  |  |                 continue; | 
			
		
	
	
		
		
			
				
					|  |  | @ -73,11 +82,10 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .billNo(ioOrderEntity.getBillNo()) |  |  |  |                     .billNo(ioOrderEntity.getBillNo()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .busType(collectBustypeEntity.getCode()) |  |  |  |                     .busType(collectBustypeEntity.getCode()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .fromType("内部单据") |  |  |  |                     .fromType("内部单据") | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .fromCorp(ioOrderEntity.getFromCorp()) |  |  |  |                     .fromCorp(ioOrderEntity.getFromName()) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     .billTime(ioOrderEntity.getCreateTime()) |  |  |  |                     .billTime(ioOrderEntity.getCreateTime()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .createTime(ioOrderEntity.getCreateTime()) |  |  |  |                     .createTime(ioOrderEntity.getCreateTime()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .createUser(ioOrderEntity.getCreateUser()) |  |  |  |                     .createUser(ioOrderEntity.getCreateUser()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .fromCorp(ioOrderEntity.getFromCorp()) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .updateTime(new Date()) |  |  |  |                     .updateTime(new Date()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .splitStatus(0) |  |  |  |                     .splitStatus(0) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .tagStatus(0) |  |  |  |                     .tagStatus(0) | 
			
		
	
	
		
		
			
				
					|  |  | @ -87,8 +95,12 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             List<IoCollectOrderBiz> collectOrderBizs = new ArrayList<>(); |  |  |  |             List<IoCollectOrderBiz> collectOrderBizs = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) { |  |  |  |             for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectByRelId(bizEntity.getBindRlFk() + ""); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 IoCollectOrderBiz collectOrderBiz = IoCollectOrderBiz.builder().orderIdFk(collectOrder.getBillNo()) |  |  |  |                 IoCollectOrderBiz collectOrderBiz = IoCollectOrderBiz.builder().orderIdFk(collectOrder.getBillNo()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .relId(bizEntity.getBindRlFk()) |  |  |  |                         .relId(bizEntity.getBindRlFk()) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         .thrCode(udiRelevanceResponse.getMainId()) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         .ybbm(udiRelevanceResponse.getYbbm()) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         .payFeeCode(udiRelevanceResponse.getPayFeeCode()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .cpmctymc(bizEntity.getCoName()) |  |  |  |                         .cpmctymc(bizEntity.getCoName()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .nameCode(bizEntity.getNameCode()) |  |  |  |                         .nameCode(bizEntity.getNameCode()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .ggxh(bizEntity.getSpec()) |  |  |  |                         .ggxh(bizEntity.getSpec()) | 
			
		
	
	
		
		
			
				
					|  |  | @ -99,6 +111,11 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .measureUnit(bizEntity.getMeasname()) |  |  |  |                         .measureUnit(bizEntity.getMeasname()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .tagStatus(1) |  |  |  |                         .tagStatus(1) | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .unTagCount(bizEntity.getCount()).build(); |  |  |  |                         .unTagCount(bizEntity.getCount()).build(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (IntUtil.value(udiRelevanceResponse.getProductsType()) == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     collectOrderBiz.setGgxh(udiRelevanceResponse.getBzgg()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     collectOrderBiz.setMeasureUnit(udiRelevanceResponse.getPrepnUnit()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 collectOrderBizs.add(collectOrderBiz); |  |  |  |                 collectOrderBizs.add(collectOrderBiz); | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (CollUtil.isNotEmpty(collectOrderBizs)) |  |  |  |             if (CollUtil.isNotEmpty(collectOrderBizs)) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |