|  |  | @ -22,6 +22,7 @@ import com.glxp.api.constant.ConstantStatus; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.constant.ConstantType; |  |  |  | import com.glxp.api.constant.ConstantType; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.dao.collect.IoCollectOrderMapper; |  |  |  | import com.glxp.api.dao.collect.IoCollectOrderMapper; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.dao.inout.IoCodeTempDao; |  |  |  | import com.glxp.api.dao.inout.IoCodeTempDao; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.entity.auth.DeptEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.auth.SysWorkplace; |  |  |  | import com.glxp.api.entity.auth.SysWorkplace; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.basic.*; |  |  |  | import com.glxp.api.entity.basic.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.collect.*; |  |  |  | import com.glxp.api.entity.collect.*; | 
			
		
	
	
		
		
			
				
					|  |  | @ -41,22 +42,24 @@ import com.glxp.api.req.basic.FilterUdiRelRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.collect.CollectOrderBizRequest; |  |  |  | import com.glxp.api.req.collect.CollectOrderBizRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.collect.CollectOrderRequest; |  |  |  | import com.glxp.api.req.collect.CollectOrderRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.collect.PostCollectOrderRequest; |  |  |  | import com.glxp.api.req.collect.PostCollectOrderRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.inout.DeleteTageCodeRequest; |  |  |  | import com.glxp.api.req.inout.*; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.inout.FilterOrderRequest; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.inout.PostOrderRequest; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.PageSimpleResponse; |  |  |  | import com.glxp.api.res.PageSimpleResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.basic.BasicSkPrescribeResponse; |  |  |  | import com.glxp.api.res.basic.BasicSkPrescribeResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.basic.SysWorkplaceResponse; |  |  |  | import com.glxp.api.res.basic.SysWorkplaceResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.basic.UdiRelevanceResponse; |  |  |  | import com.glxp.api.res.basic.UdiRelevanceResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.collect.CollectOrderBizResponse; |  |  |  | import com.glxp.api.res.collect.CollectOrderBizResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.collect.IoCollectOrderResponse; |  |  |  | import com.glxp.api.res.collect.IoCollectOrderResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.res.inout.IoOrderDetailResultResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.inout.IoOrderResponse; |  |  |  | import com.glxp.api.res.inout.IoOrderResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.inout.IoStatOrderResponse; |  |  |  | import com.glxp.api.res.inout.IoStatOrderResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.res.sync.SpsSyncOrderResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.thrsys.ThrInvProductResponse; |  |  |  | import com.glxp.api.res.thrsys.ThrInvProductResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.service.auth.DeptService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.auth.SysWorkplaceService; |  |  |  | import com.glxp.api.service.auth.SysWorkplaceService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.basic.*; |  |  |  | import com.glxp.api.service.basic.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.inout.*; |  |  |  | import com.glxp.api.service.inout.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.inout.impl.IoCodeService; |  |  |  | import com.glxp.api.service.inout.impl.IoCodeService; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.service.sync.HeartService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.thrsys.SysWorkplacePutRelService; |  |  |  | import com.glxp.api.service.thrsys.SysWorkplacePutRelService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.util.*; |  |  |  | import com.glxp.api.util.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.util.udi.FilterUdiUtils; |  |  |  | import com.glxp.api.util.udi.FilterUdiUtils; | 
			
		
	
	
		
		
			
				
					|  |  | @ -361,6 +364,53 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC | 
			
		
	
		
		
			
				
					
					|  |  |  |         return ResultVOUtils.success("下载成功"); |  |  |  |         return ResultVOUtils.success("下载成功"); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     HeartService heartService; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     SpGetHttpClient spGetHttp; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     // TODO: 2024/10/14 下载本地单据类型
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     public BaseResponse importSpmsUdi(CollectOrderRequest collectOrderRequest) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ReviewSpmsRequest reviewSpmsRequest = new ReviewSpmsRequest(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         reviewSpmsRequest.setBillNo(collectOrderRequest.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         reviewSpmsRequest.setAction(collectOrderRequest.getBusType()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         //获取自助平台待审核单据,并插入到数据库
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         BaseResponse<SpsSyncOrderResponse> baseResponse = spGetHttp.getReviewOrder(reviewSpmsRequest, 1 + ""); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (baseResponse.getCode() == 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             SpsSyncOrderResponse spsSyncOrderResponse = baseResponse.getData(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             List<IoOrderEntity> orderEntities = spsSyncOrderResponse.getOrderEntities(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if (CollUtil.isNotEmpty(orderEntities)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 IoOrderEntity orderEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 orderEntity = orderEntities.get(0); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 orderEntity.setUpdateTime(null); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 orderEntity.setFromType(ConstantStatus.FROM_UDISP); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 orderEntity.setReviewSp(true); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 IoOrderEntity temp = orderService.findByBillNo(orderEntity.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (temp == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     orderEntity.setId(null); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     orderService.insertOrder(orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     heartService.insetOrderDb(spsSyncOrderResponse, orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     orderEntity = orderService.findByBillNo(orderEntity.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     addInoutService.dealProcess(orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     orderEntity = orderService.findByBillNo(orderEntity.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     if (orderEntity.getStatus() != ConstantStatus.ORDER_STATS_ERROR && !ioCheckInoutService.checkManual(orderEntity.getBillNo())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         ioCheckInoutService.check(orderEntity.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 orderEntity = orderService.findByBillNo(orderEntity.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_CHECK_REW) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     return ResultVOUtils.error(500, "非待审核单据!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.importUdi(collectOrderRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return baseResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse<PageSimpleResponse<IoCollectOrder>> selectImportUdi(FilterOrderRequest filterOrderRequest) { |  |  |  |     public BaseResponse<PageSimpleResponse<IoCollectOrder>> selectImportUdi(FilterOrderRequest filterOrderRequest) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         List<IoCollectOrder> ioCollectOrders = new ArrayList<>(); |  |  |  |         List<IoCollectOrder> ioCollectOrders = new ArrayList<>(); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |