|  |  | @ -187,21 +187,21 @@ public class SpsSyncDownloadService { | 
			
		
	
		
		
			
				
					
					|  |  |  |         switch (exportType) { |  |  |  |         switch (exportType) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             case BASIC_DATA: |  |  |  |             case BASIC_DATA: | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (needExec(info.getBasicProducts(), info.getBasicCorp(), info.getSupCert())) { |  |  |  |                 if (needExec(info.getBasicProducts(), info.getBasicCorp(), info.getSupCert())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     basicExportInfoCreate(exportType, now |  |  |  |                     basicExportInfoCreate(exportType, syncTime, now | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                             , x -> x.generateBasicDataFile(info, now, false, syncTime) |  |  |  |                             , x -> x.generateBasicDataFile(info, now, false, syncTime) | 
			
		
	
		
		
			
				
					
					|  |  |  |                             , x -> x.generateBasicDataFile(info, now, true, syncTime)); |  |  |  |                             , x -> x.generateBasicDataFile(info, now, true, syncTime)); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 break; |  |  |  |                 break; | 
			
		
	
		
		
			
				
					
					|  |  |  |             case OTHER_DATA: |  |  |  |             case OTHER_DATA: | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (needExec(info.getUdiCodeLost(), info.getUdiCodeRel())) { |  |  |  |                 if (needExec(info.getUdiCodeLost(), info.getUdiCodeRel())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     basicExportInfoCreate(exportType, now |  |  |  |                     basicExportInfoCreate(exportType, syncTime, now | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                             , x -> x.generateOtherDataFile(info, now, false, syncTime) |  |  |  |                             , x -> x.generateOtherDataFile(info, now, false, syncTime) | 
			
		
	
		
		
			
				
					
					|  |  |  |                             , x -> x.generateOtherDataFile(info, now, true, syncTime)); |  |  |  |                             , x -> x.generateOtherDataFile(info, now, true, syncTime)); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 break; |  |  |  |                 break; | 
			
		
	
		
		
			
				
					
					|  |  |  |             case DOCUMENT_TYPE_DATA: |  |  |  |             case DOCUMENT_TYPE_DATA: | 
			
		
	
		
		
			
				
					
					|  |  |  | //                if (needExec(info.getTypeBus(), info.getTypeScan(), info.getTypeThird())) {
 |  |  |  | //                if (needExec(info.getTypeBus(), info.getTypeScan(), info.getTypeThird())) {
 | 
			
		
	
		
		
			
				
					
					|  |  |  | //                    basicExportInfoCreate(exportType, now
 |  |  |  | //                    basicExportInfoCreate(exportType, syncTime, now
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | //                            , x -> x.generateDocumentTypeDataFile(info, now, false, syncTime)
 |  |  |  | //                            , x -> x.generateDocumentTypeDataFile(info, now, false, syncTime)
 | 
			
		
	
		
		
			
				
					
					|  |  |  | //                            , x -> x.generateDocumentTypeDataFile(info, now, true, syncTime));
 |  |  |  | //                            , x -> x.generateDocumentTypeDataFile(info, now, true, syncTime));
 | 
			
		
	
		
		
			
				
					
					|  |  |  | //                }
 |  |  |  | //                }
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -230,7 +230,7 @@ public class SpsSyncDownloadService { | 
			
		
	
		
		
			
				
					
					|  |  |  |      * @param hasDataMethod    判断时候有无数据方法 |  |  |  |      * @param hasDataMethod    判断时候有无数据方法 | 
			
		
	
		
		
			
				
					
					|  |  |  |      * @param createFileMethod 执行文件生成方法 |  |  |  |      * @param createFileMethod 执行文件生成方法 | 
			
		
	
		
		
			
				
					
					|  |  |  |      */ |  |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |  |     private void basicExportInfoCreate(BasicExportTypeEnum exportEnum, Date now, Function<SpsSyncDownloadService, Boolean> hasDataMethod, Function<SpsSyncDownloadService, Boolean> createFileMethod) { |  |  |  |     private void basicExportInfoCreate(BasicExportTypeEnum exportEnum, Date syncTime, Date now, Function<SpsSyncDownloadService, Boolean> hasDataMethod, Function<SpsSyncDownloadService, Boolean> createFileMethod) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         //防止出现同时调用问题
 |  |  |  |         //防止出现同时调用问题
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         String redisKey = String.format("spsm-sync-create:%s", exportEnum.getKey()); |  |  |  |         String redisKey = String.format("spsm-sync-create:%s", exportEnum.getKey()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         boolean result = redisUtil.setIfAbsent(redisKey, 1, 10); |  |  |  |         boolean result = redisUtil.setIfAbsent(redisKey, 1, 10); | 
			
		
	
	
		
		
			
				
					|  |  | @ -256,13 +256,14 @@ public class SpsSyncDownloadService { | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             exportStatus = BasicExportStatusEntity.builder() |  |  |  |             exportStatus = BasicExportStatusEntity.builder() | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .id(CustomUtil.getId()) |  |  |  |                     .id(CustomUtil.getId()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .status(BasicExportStatusEnum.WAIT_TRIGGERED.getCode()) |  |  |  |                     .status(syncTime == null ? BasicExportStatusEnum.WAIT_TRIGGERED.getCode() : BasicExportStatusEnum.WAIT_BUILT.getCode()) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     .idDatas(exportEnum.getKey()) |  |  |  |                     .idDatas(exportEnum.getKey()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .type(exportEnum.getRemark()) |  |  |  |                     .type(exportEnum.getRemark()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .scheduleType(0) |  |  |  |                     .scheduleType(0) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .updateTime(cn.hutool.core.date.DateUtil.date()) |  |  |  |                     .updateTime(cn.hutool.core.date.DateUtil.date()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .startTime(now) |  |  |  |                     .startTime(now) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     .build(); |  |  |  |                     .build(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             createFileMethod.apply(applicationContext.getBean(this.getClass())); | 
			
		
	
		
		
			
				
					
					|  |  |  |             basicExportService.save(exportStatus); |  |  |  |             basicExportService.save(exportStatus); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } else if (exportStatus.getStatus().equals(BasicExportStatusEnum.WAIT_BUILT.getCode())) {//文件待生成
 |  |  |  |         } else if (exportStatus.getStatus().equals(BasicExportStatusEnum.WAIT_BUILT.getCode())) {//文件待生成
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             createFileMethod.apply(applicationContext.getBean(this.getClass())); |  |  |  |             createFileMethod.apply(applicationContext.getBean(this.getClass())); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |