|  |  | @ -68,6 +68,7 @@ import javax.annotation.Resource; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.math.BigDecimal; |  |  |  | import java.math.BigDecimal; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.text.ParseException; |  |  |  | import java.text.ParseException; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.text.SimpleDateFormat; |  |  |  | import java.text.SimpleDateFormat; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import java.time.LocalDateTime; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.*; |  |  |  | import java.util.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.concurrent.atomic.AtomicInteger; |  |  |  | import java.util.concurrent.atomic.AtomicInteger; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.stream.Collectors; |  |  |  | import java.util.stream.Collectors; | 
			
		
	
	
		
		
			
				
					|  |  | @ -119,6 +120,13 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse handleExternalThrInvSfOrder(FilterInvProductRequest filterInvProductRequest) { |  |  |  |     public BaseResponse handleExternalThrInvSfOrder(FilterInvProductRequest filterInvProductRequest) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (thrInvOrderMapper.countDownloadsInRange(filterInvProductRequest.getStartDate(), filterInvProductRequest.getEndDate()) <= 0) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             log.info("自动抓取第三方收费出入库明细生成单据定时任务结束=" + filterInvProductRequest.getStartDate() + "---" + filterInvProductRequest.getEndDate()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             log.info("已下载忽略"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return ResultVOUtils.error(20001, "已下载忽略"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         BaseResponse<PageSimpleResponse<ThrInvResultResponse>> baseResponse = erpInvClient.getInvSfResult(filterInvProductRequest); |  |  |  |         BaseResponse<PageSimpleResponse<ThrInvResultResponse>> baseResponse = erpInvClient.getInvSfResult(filterInvProductRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (baseResponse.getCode() == 20000) { |  |  |  |         if (baseResponse.getCode() == 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             List<ThrInvResultResponse> list = baseResponse.getData().getList(); |  |  |  |             List<ThrInvResultResponse> list = baseResponse.getData().getList(); | 
			
		
	
	
		
		
			
				
					|  |  | @ -162,6 +170,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |     public void handleExternalThrInvPhOrder(FilterInvProductRequest filterInvProductRequest) { |  |  |  |     public void handleExternalThrInvPhOrder(FilterInvProductRequest filterInvProductRequest) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         BaseResponse<PageSimpleResponse<ThrInvResultResponse>> baseResponse = erpInvClient.getInvPhResult(filterInvProductRequest); |  |  |  |         BaseResponse<PageSimpleResponse<ThrInvResultResponse>> baseResponse = erpInvClient.getInvPhResult(filterInvProductRequest); | 
			
		
	
	
		
		
			
				
					|  |  | @ -339,23 +348,13 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
		
			
				
					
					|  |  |  |         filterInvProductRequest.setThirdSysUrlValue(thrSystemDetailEntity.getValue()); |  |  |  |         filterInvProductRequest.setThirdSysUrlValue(thrSystemDetailEntity.getValue()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String days = getBeginAndEndDateByDays(1); |  |  |  |         String days = getBeginAndEndDateByDays(1); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         filterInvProductRequest.setStartDate(stringToDate(days + " 00:00:00")); |  |  |  |         filterInvProductRequest.setStartDate(stringToDate(days)); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         filterInvProductRequest.setEndDate(stringToDate(days + " 12:59:59")); |  |  |  |         filterInvProductRequest.setEndDate(stringToDate(days)); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         if (thrInvOrderMapper.countDownloadsInRange(filterInvProductRequest.getStartDate(), filterInvProductRequest.getEndDate()) <= 0) { |  |  |  |         handleExternalThrInvSfOrder(filterInvProductRequest); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             handleExternalThrInvSfOrder(filterInvProductRequest); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             log.info("自动抓取第三方收费出入库明细生成单据定时任务结束"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } else { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             log.info("已下载户略"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         filterInvProductRequest.setStartDate(stringToDate(days + " 13:00:00")); |  |  |  | //        filterInvProductRequest.setStartDate(stringToDate(days + " 13:00:00"));
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         filterInvProductRequest.setEndDate(stringToDate(days + " 23:59:59")); |  |  |  | //        filterInvProductRequest.setEndDate(stringToDate(days + " 23:59:59"));
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         if (thrInvOrderMapper.countDownloadsInRange(filterInvProductRequest.getStartDate(), filterInvProductRequest.getEndDate()) <= 0) { |  |  |  | //        handleExternalThrInvSfOrder(filterInvProductRequest);
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             handleExternalThrInvSfOrder(filterInvProductRequest); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             log.info("自动抓取第三方收费出入库明细生成单据定时任务结束"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } else { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             log.info("已下载户略"); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
	
		
		
			
				
					|  |  | @ -820,8 +819,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
		
			
				
					
					|  |  |  |         log.info("手动抓取第三方收费出入库明细生成单据定时任务开始"); |  |  |  |         log.info("手动抓取第三方收费出入库明细生成单据定时任务开始"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         FilterInvProductRequest filterInvProductRequest = new FilterInvProductRequest(); |  |  |  |         FilterInvProductRequest filterInvProductRequest = new FilterInvProductRequest(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         filterInvProductRequest.setThirdSys(filterDownloadInvOrderRequest.getThirdSysFk()); |  |  |  |         filterInvProductRequest.setThirdSys(filterDownloadInvOrderRequest.getThirdSysFk()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         filterInvProductRequest.setStartDate(stringToDate(filterDownloadInvOrderRequest.getStartDate() + " 00:00:00")); |  |  |  |         filterInvProductRequest.setStartDate(stringToDate(filterDownloadInvOrderRequest.getStartDate())); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         filterInvProductRequest.setEndDate(stringToDate(filterDownloadInvOrderRequest.getEndDate() + " 23:59:59")); |  |  |  |         filterInvProductRequest.setEndDate(stringToDate(filterDownloadInvOrderRequest.getEndDate())); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         log.info("手动抓取第三方收费出入库明细生成单据定时任务结束"); |  |  |  |         log.info("手动抓取第三方收费出入库明细生成单据定时任务结束"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         return handleExternalThrInvSfOrder(filterInvProductRequest); |  |  |  |         return handleExternalThrInvSfOrder(filterInvProductRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |