| 
					
				 | 
			
			
				@@ -15,6 +15,7 @@ import com.fs.company.service.ICompanyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.company.service.ICompanyUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.company.vo.QwIpadTotalVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.company.vo.RedPacketMoneyVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.course.dto.BatchSendCourseAllDTO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.course.mapper.FsCourseRedPacketLogMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.course.service.IFsCourseWatchLogService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.course.service.ITencentCloudCosService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -28,9 +29,15 @@ import com.fs.erp.dto.ErpOrderResponse; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.erp.mapper.FsErpFinishPushMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.erp.service.IErpOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.fastGpt.domain.FastGptEventTokenLog; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.fastGpt.domain.FastGptPushTokenTotal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.fastGpt.domain.FastgptChatVoiceHomo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.fastGpt.domain.FastgptEventLogTotal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.fastGpt.mapper.FastGptChatSessionMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.fastGpt.mapper.FastgptChatVoiceHomoMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.fastGpt.service.IFastgptEventLogTotalService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.fastgptApi.util.AudioUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.fastgptApi.vo.AudioVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.gtPush.mapper.PushLogMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.his.config.FsSysConfig; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.his.config.StoreConfig; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.his.domain.FsInquiryOrder; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -46,11 +53,16 @@ import com.fs.his.service.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.his.service.impl.FsPackageOrderServiceImpl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.his.utils.ConfigUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.his.vo.FsSubOrderResultVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.hisStore.domain.FsStoreOrderScrm; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.im.dto.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.im.service.IImService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.im.service.OpenIMService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.qw.domain.QwCompany; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.qw.mapper.QwRestrictionPushRecordMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.qw.service.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.qwApi.service.QwApiService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.sop.domain.QwSopTempVoice; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.fs.sop.service.IQwSopTempVoiceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.system.domain.SysConfig; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.system.mapper.SysConfigMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.google.gson.Gson; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -59,10 +71,14 @@ import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.slf4j.LoggerFactory; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Qualifier; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.data.redis.core.RedisTemplate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Component; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.time.LocalDate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.time.LocalDateTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.concurrent.CompletableFuture; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.stream.Collectors; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @Slf4j 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @Component("task") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -85,7 +101,7 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IFsFollowService fsFollowService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IFsStoreAfterSalesService fsStoreAfterSalesService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //    IErpOrderService erpOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     FsIntegralOrderMapper integralOrderMapper; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -126,7 +142,7 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     FsPackageOrderServiceImpl packageOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IFsStoreOrderLogsService fsStoreOrderLogsService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    org.slf4j.Logger logger= LoggerFactory.getLogger(getClass()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    org.slf4j.Logger logger = LoggerFactory.getLogger(getClass()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     IFsDoctorService doctorService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -158,6 +174,10 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IQwCompanyService qwCompanyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IQwUserService qwUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private OpenIMService openIMService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public RedisTemplate redisTemplate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ICompanyUserService userService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -165,6 +185,97 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IFastgptEventLogTotalService fastgptEventLogTotalService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private FastgptChatVoiceHomoMapper fastgptChatVoiceHomoMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private IQwSopTempVoiceService qwSopTempVoiceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private QwRestrictionPushRecordMapper qwRestrictionPushRecordMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public static final String SOP_TEMP_VOICE_KEY = "sop:tempVoice"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * sop任务token消耗统计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void sopPushTokenTotal() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 判断是否是凌晨 00:00 - 00:59 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        boolean isEarlyMorning = isEarlyMorning(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 获取日期字符串(今天或昨天) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String dateTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (isEarlyMorning) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dateTime = DateUtils.addDateDays(-1); // 昨天 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dateTime = DateUtils.getDate(); // 今天 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        log.info("开始执行sop任务token消耗统计"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<FastGptPushTokenTotal> fastGptPushTotalList = qwRestrictionPushRecordMapper.selectFastgptPushTokenTotal(dateTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (fastGptPushTotalList != null && !fastGptPushTotalList.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (FastGptPushTokenTotal fastGptPushTotal : fastGptPushTotalList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    // 获取统计数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Integer type = fastGptPushTotal.getType(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Long count = 0L; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if(type == 7){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        count = fastGptPushTotal.getCount() * 450; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        count = fastGptPushTotal.getCount() * 150; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    fastGptPushTotal.setCount(count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    FastGptPushTokenTotal pushTotal = qwRestrictionPushRecordMapper.selectFastGptPushTokenTotalByInfo(fastGptPushTotal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if(pushTotal == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        qwRestrictionPushRecordMapper.insertPushTokenTotal(fastGptPushTotal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        fastGptPushTotal.setId(pushTotal.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        qwRestrictionPushRecordMapper.updatePushTokenTotal(fastGptPushTotal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            log.info("结束执行sop任务token消耗统计"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            log.error("执行sop任务token消耗统计异常", e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 一键生成语音定时任务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void ConsumerSopTempVoice() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Long newCompanyUserId = redisCache.popVoiceKey(SOP_TEMP_VOICE_KEY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (newCompanyUserId != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<QwSopTempVoice> sopTempVoices = redisCache.getVoiceAllList(SOP_TEMP_VOICE_KEY + ":" + newCompanyUserId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (sopTempVoices != null && !sopTempVoices.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        for (QwSopTempVoice qwSopTempVoice : sopTempVoices) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                AudioVO audioVO = new AudioVO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                List<FastgptChatVoiceHomo> homos = fastgptChatVoiceHomoMapper.selectFastgptChatVoiceHomoList(new FastgptChatVoiceHomo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                audioVO = AudioUtils.createUserUrlAndUrl(homos, qwSopTempVoice.getCompanyUserId(), qwSopTempVoice.getVoiceTxt()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                if (audioVO != null && audioVO.getWavUrl() != null && audioVO.getUrl() != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    qwSopTempVoice.setVoiceUrl(audioVO.getUrl()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    qwSopTempVoice.setUserVoiceUrl(audioVO.getWavUrl()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    qwSopTempVoice.setDuration(audioVO.getDuration()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    qwSopTempVoice.setRecordType(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    qwSopTempVoiceService.updateQwSopTempVoice(qwSopTempVoice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } finally { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        redisCache.deleteObject(SOP_TEMP_VOICE_KEY + ":" + newCompanyUserId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                log.info("没有需要生成的语音"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            log.error("生成语音定时任务执行异常", e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //统计ai事件埋点 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void eventLogTotals() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 判断是否是凌晨 00:00 - 00:59 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -229,7 +340,7 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         FastgptEventLogTotal eventLogTotal = new FastgptEventLogTotal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         eventLogTotal.setId(info.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         eventLogTotal.setCount(newCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if(!processedKeys.contains(uniqueKey)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (!processedKeys.contains(uniqueKey)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             toUpdateList.add(eventLogTotal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             // 标记为已处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             processedKeys.add(uniqueKey); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -237,7 +348,7 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     total.setStatTime(dateTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if(!processedKeys.contains(uniqueKey)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!processedKeys.contains(uniqueKey)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         toInsertList.add(total); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         // 标记为已处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         processedKeys.add(uniqueKey); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -340,7 +451,7 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         FastgptEventLogTotal eventLogTotalNew = new FastgptEventLogTotal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         eventLogTotalNew.setId(info.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         eventLogTotalNew.setCount(totalCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if(!processedKeys.contains(uniqueKey)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (!processedKeys.contains(uniqueKey)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             toUpdateList.add(eventLogTotalNew); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             // 标记为已处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             processedKeys.add(uniqueKey); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -357,7 +468,7 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     eventLogTotal.setQwUserId(tokenLog.getQwUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     eventLogTotal.setStatTime(dateTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if(!processedKeys.contains(uniqueKey)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!processedKeys.contains(uniqueKey)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         toInsertList.add(eventLogTotal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         // 标记为已处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         processedKeys.add(uniqueKey); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -383,23 +494,23 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //定时查询ipad主机使用情况,建议每天凌晨1点执行一次 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void totalIpadTask(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void totalIpadTask() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String dateTime = DateUtils.addDateDays(-1); // 昨天 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<QwIpadTotalVo> qwIpadTotalVos = userService.selectCompanyByIpadStatusCount(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(qwIpadTotalVos != null && !qwIpadTotalVos.isEmpty()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (qwIpadTotalVos != null && !qwIpadTotalVos.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             qwIpadTotalVos.forEach(qwIpadTotalVo -> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     qwIpadTotalVo.setStatTime(dateTime) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             int a = userService.insertQwIpadTotal(qwIpadTotalVos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(a == 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (a == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 log.error("插入ipad主机失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             log.error("查询没有数据"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void addQwUserName(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void addQwUserName() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         QwCompany qwCompany = new QwCompany(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<QwCompany> companyList = qwCompanyService.selectQwCompanyList(qwCompany); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (QwCompany company : companyList) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -407,50 +518,56 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void videoTranscode() throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void videoTranscode() throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tencentCloudCosService.videoTranscode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void updateUrl() throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void updateUrl() throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tencentCloudCosService.updateUrl(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void addPrescribeImg() throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-       List<Long> ids= fsPrescribeService.selectFsPrescribeByPrescribeIdByOrderType(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void addPrescribeImg() throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Long> ids = fsPrescribeService.selectFsPrescribeByPrescribeIdByOrderType(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (Long id : ids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             System.out.println(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             fsPrescribeService.PrescribeStoreImg(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void addQwWatchLog() throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void addQwWatchLog() throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LocalDateTime now = LocalDateTime.now().withSecond(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fsCourseWatchLogService.addCourseWatchLogDay(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void transferLog() throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void addQwWatchLogMinute(Integer minute) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        log.info("定时更新看课111"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(minute == null) minute = 30; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LocalDateTime now = LocalDateTime.now().withSecond(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LocalDateTime start = now.minusMinutes(minute); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LocalDateTime end = now.minusSeconds(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        fsCourseWatchLogService.addCourseWatchLogDayMinute(start, end); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void transferLog() throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         qwExternalContactTransferLogService.updateQwExternalContactTransferLogByStatus(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void isArtificial() throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void isArtificial() throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fastGptChatSessionMapper.updateFastGptChatSessionByIsReply(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void expirationQwAppCountWay(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void expirationQwAppCountWay() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         qwAppContactWayService.expirationQwAppCountWay(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void sendOrderMsg() throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void sendOrderMsg() throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsStoreOrder> fsStoreOrders = fsStoreOrderMapper.selectStoreOrderIdByFollow(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (FsStoreOrder fsStoreOrder : fsStoreOrders) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -458,72 +575,97 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void redPacketSubMoney() throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void redPacketSubMoney() throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<RedPacketMoneyVO> redPacketMoneyVOS = fsCourseRedPacketLogMapper.selectFsCourseRedPacketLogByCompany(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (RedPacketMoneyVO redPacketMoneyVO : redPacketMoneyVOS) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            companyService.subtractCompanyMoney(redPacketMoneyVO.getMoney(),redPacketMoneyVO.getCompanyId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            companyService.subtractCompanyMoney(redPacketMoneyVO.getMoney(), redPacketMoneyVO.getCompanyId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void redPacketAddMoney() throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void redPacketAddMoney() throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<RedPacketMoneyVO> redPacketMoneyVOS = fsCourseRedPacketLogMapper.selectFsCourseAddRedPacketLogByCompany(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (RedPacketMoneyVO redPacketMoneyVO : redPacketMoneyVOS) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            companyService.addRedPacketCompanyMoney(redPacketMoneyVO.getMoney(),redPacketMoneyVO.getCompanyId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            companyService.addRedPacketCompanyMoney(redPacketMoneyVO.getMoney(), redPacketMoneyVO.getCompanyId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void updateCompanyUserStatus() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void updateCompanyUserStatus() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CompanyUser user = new CompanyUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         user.setStatus("0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         user.setDelFlag("0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<CompanyUser> companyUsers = companyUserMapper.selectCompanyUserList(user); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (CompanyUser companyUser : companyUsers) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(SecurityUtils.matchesPassword("123456", companyUser.getPassword())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (SecurityUtils.matchesPassword("123456", companyUser.getPassword())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 companyUser.setStatus("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 companyUserMapper.updateCompanyUser(companyUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                logger.info("密码为123456 停用账号:"+companyUser.getUserId()+":"+companyUser.getNickName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                logger.info("密码为123456 停用账号:" + companyUser.getUserId() + ":" + companyUser.getNickName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void couponStatus() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void couponStatus() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fsUserCouponMapper.updateFsUserCouponStatusByLimtTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //每10秒执行一次 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void auditPrescribe() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void auditPrescribe() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SysConfig sysConfig = sysConfigMapper.selectConfigByConfigKey("his.inquiryConfig"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String configValue = sysConfig.getConfigValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String, Object> config = (Map<String, Object>) JSON.parse(configValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        boolean isAudit = (boolean)config.get("isAutoPrescribeAudit"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (isAudit){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        boolean isAudit = (boolean) config.get("isAutoPrescribeAudit"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (isAudit) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             fsPrescribeService.auditPrescribe(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void deliveryOp() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void deliveryOp() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         IErpOrderService erpOrderService = getErpService(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsStoreOrder> orders = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (erpOrderService == gyOrderService){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (erpOrderService == gyOrderService) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             orders = fsStoreOrderMapper.selectOmsOrderdeliveryOp(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else if (erpOrderService == wdtOrderService || erpOrderService == dfOrderService || erpOrderService == jSTOrderService){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if (erpOrderService == wdtOrderService || erpOrderService == dfOrderService || erpOrderService == jSTOrderService) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             orders = fsStoreOrderMapper.selectWdtOmsOrderdeliveryOp(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(FsStoreOrder order:orders){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ErpOrderQueryRequert request=new ErpOrderQueryRequert(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            request.setCode(order.getExtendOrderId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (erpOrderService != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ErpOrderQueryResponse response = erpOrderService.getOrder(request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (erpOrderService != dfOrderService) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (response.getOrders() != null && response.getOrders().size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        for (ErpOrderQuery orderQuery : response.getOrders()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (orderQuery.getDeliverys() != null && orderQuery.getDeliverys().size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                for (ErpDeliverys delivery : orderQuery.getDeliverys()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    if (delivery.getDelivery() && StringUtils.isNotEmpty(delivery.getMail_no())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        //更新商订单状态 删除REDIS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        fsStoreOrderService.deliveryOrder(order.getOrderCode(), delivery.getMail_no(), delivery.getExpress_code(), delivery.getExpress_name()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        redisCache.deleteObject("delivery" + ":" + order.getExtendOrderId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void deliveryOpScrm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        IErpOrderService erpOrderService = getErpService(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<FsStoreOrderScrm> orders = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (erpOrderService == gyOrderService){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            orders = fsStoreOrderMapper.selectOmsOrderdeliveryOpScrm(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if (erpOrderService == wdtOrderService || erpOrderService == dfOrderService || erpOrderService == jSTOrderService){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            orders = fsStoreOrderMapper.selectWdtOmsOrderdeliveryOpScrm(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for(FsStoreOrderScrm order:orders){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ErpOrderQueryRequert request=new ErpOrderQueryRequert(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             request.setCode(order.getExtendOrderId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (erpOrderService != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ErpOrderQueryResponse response=erpOrderService.getOrder(request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ErpOrderQueryResponse response=erpOrderService.getScrmOrder(request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (erpOrderService != dfOrderService){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if(response.getOrders()!=null&&response.getOrders().size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         for(ErpOrderQuery orderQuery : response.getOrders()){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -531,21 +673,18 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 for(ErpDeliverys delivery:orderQuery.getDeliverys()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     if(delivery.getDelivery()&& StringUtils.isNotEmpty(delivery.getMail_no())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         //更新商订单状态 删除REDIS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        fsStoreOrderService.deliveryOrder(order.getOrderCode(),delivery.getMail_no(),delivery.getExpress_code(),delivery.getExpress_name()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        fsStoreOrderService.deliveryOrderScrm(order.getOrderCode(),delivery.getMail_no(),delivery.getExpress_code(),delivery.getExpress_name()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         redisCache.deleteObject("delivery"+":"+order.getExtendOrderId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -553,11 +692,11 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         IErpOrderService erpOrderService = getErpService(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsStoreOrder> orders = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (erpOrderService !=null && erpOrderService == dfOrderService){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (erpOrderService != null && erpOrderService == dfOrderService) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             orders = fsStoreOrderMapper.selectShippedOrder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(orders!=null&& !orders.isEmpty()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (orders != null && !orders.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<CompletableFuture<Void>> futures = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                for(FsStoreOrder order:orders){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (FsStoreOrder order : orders) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     CompletableFuture<Void> future = CompletableFuture.runAsync(() -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         erpOrderService.getOrderDeliveryStatus(order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     }); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -568,15 +707,14 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void CreateOmsAndHis() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void CreateOmsAndHis() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<Long> omsList = fsStoreOrderMapper.selectFsStoreOrderNoCreateOms(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        logger.info("推送订单id====>{}",omsList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        logger.info("推送订单id====>{}", omsList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (Long l : omsList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 fsStoreOrderService.createOmsOrder(l); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                logger.error("推送订单异常:",e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                logger.error("推送订单异常:", e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        List<Long> tuiOrderList = fsStoreOrderMapper.selectFsStoreOrderNoTuiOrder(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -589,31 +727,30 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void createFollow() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void createFollow() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsStoreOrder> orders = fsStoreOrderMapper.selectStoreOrderIdByFollow(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (FsStoreOrder order : orders) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 fsStoreOrderService.addFsFollowByStoreOrder(order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                logger.info("创建随访错误:"+order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                logger.info("创建随访错误:" + order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     IFsStoreSubOrderService fsStoreSubOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void puSubStoreOrder() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void puSubStoreOrder() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<Long> longs = fsStoreSubOrderService.selectFsStoreSubOrderByNoPush(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int i=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int i = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (Long aLong : longs) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             FsSubOrderResultVO fsSubOrderResultVO = fsStoreSubOrderService.TuiFsStoreSubOrderByStoreOrder(aLong); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (fsSubOrderResultVO!=null&&fsSubOrderResultVO.getCode()!=null&&fsSubOrderResultVO.getCode()==1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (fsSubOrderResultVO != null && fsSubOrderResultVO.getCode() != null && fsSubOrderResultVO.getCode() == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 i++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (i>65){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (i > 65) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -621,14 +758,13 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void refundOp() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<FsStoreAfterSales> list=fsStoreAfterSalesService.selectFsStoreAfterSalesByDoAudit(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(list!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            for(FsStoreAfterSales afterSales:list){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void refundOp() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<FsStoreAfterSales> list = fsStoreAfterSalesService.selectFsStoreAfterSalesByDoAudit(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (list != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (FsStoreAfterSales afterSales : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     fsStoreAfterSalesService.auditing(afterSales); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -636,16 +772,17 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void isAfterSales() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SysConfig sysConfig = sysConfigMapper.selectConfigByConfigKey("his.store"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String configValue = sysConfig.getConfigValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String, Object> config = (Map<String, Object>) JSON.parse(configValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Integer storeAfterSalesDay = (Integer)config.get("storeAfterSalesDay"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer storeAfterSalesDay = (Integer) config.get("storeAfterSalesDay"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsStoreOrder> fsStoreOrders = fsStoreOrderMapper.selectFsStoreOrderNoIsAfterSales(storeAfterSalesDay); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (FsStoreOrder fsStoreOrder : fsStoreOrders) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 fsStoreOrderService.addIntegralAndShareByStoreOrder(fsStoreOrder); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 logger.info("分账错误: " + fsStoreOrder.getOrderCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -653,26 +790,25 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void integralOrderStatus(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void integralOrderStatus() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         integralOrderMapper.updatePackageOrderStatusByDeliveryTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void packageStatus() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void packageStatus() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fsPackageOrderMapper.updatePackageOrderStatusByFinishTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SysConfig sysConfig = sysConfigMapper.selectConfigByConfigKey("his.store"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String configValue = sysConfig.getConfigValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String, Object> config = (Map<String, Object>) JSON.parse(configValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Integer unPayTime = (Integer)config.get("unPayTime"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer unPayTime = (Integer) config.get("unPayTime"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fsPackageOrderMapper.updatePackageOrderStatusByStatus(unPayTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void endFollow(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void endFollow() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fsStoreOrderService.endFollow(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void erDelivery(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void erDelivery() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fsStoreOrderService.endDeliveryOrder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -680,15 +816,16 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ICompanyService companyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void addCompanyMoney(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void addCompanyMoney() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsStoreOrder> orders = fsStoreOrderMapper.selectOrderIds(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (FsStoreOrder order : orders){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (FsStoreOrder order : orders) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             CompanyMoneyLogs moneyLog1 = moneyLogsMapper.selectCompanyMoneyLogsByOrderId(order.getOrderId(), 5); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            CompanyMoneyLogs moneyLog2 = moneyLogsMapper.selectCompanyMoneyLogsByOrderId(order.getOrderId(),3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (moneyLog1==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            CompanyMoneyLogs moneyLog2 = moneyLogsMapper.selectCompanyMoneyLogsByOrderId(order.getOrderId(), 3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (moneyLog1 == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 companyService.subtractCompanyMoney(order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (moneyLog2==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (moneyLog2 == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 companyService.addCompanyMoney(order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 FsStoreOrder orderMap = new FsStoreOrder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 orderMap.setOrderId(order.getOrderId()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -699,28 +836,26 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //每天执行一次 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void syncExpress() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<Long> ids =fsStoreOrderMapper.selectSyncExpressIds(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void syncExpress() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Long> ids = fsStoreOrderMapper.selectSyncExpressIds(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (Long id : ids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             fsStoreOrderService.syncExpress(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void refundCompanyMoney(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void refundCompanyMoney() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsStoreOrder> list = fsStoreOrderMapper.selectOrders(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (FsStoreOrder order : list ){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (FsStoreOrder order : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             companyService.refundCompanyMoney(order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void subIntegral() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void subIntegral() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fsUserIntegralLogsService.subFsUserIntegralLogsByOrder5(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void finishInquiry(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void finishInquiry() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsInquiryOrder> orders = inquiryOrderMapper.selectFsInquiryOrderByFinish(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (FsInquiryOrder order : orders) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 订单已超过48小时,执行关闭操作 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -729,20 +864,20 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             param.setDoctorId(order.getDoctorId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 iFsInquiryOrderService.autoFinishOrder(param); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                logger.info("订单已超过48小时关闭异常"+param); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                logger.info("订单已超过48小时关闭异常" + param); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void finishStoreOrderByXN(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void finishStoreOrderByXN() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsStoreOrder> orders = fsStoreOrderMapper.selectFinishStoreOrderByXN(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (orders!=null&&orders.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (orders != null && orders.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (FsStoreOrder o : orders) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(o.getOrderId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (order.getStatus()!= 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (order.getStatus() != 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 FsStoreOrder o1 = new FsStoreOrder(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -753,20 +888,20 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 int i = fsStoreOrderMapper.updateFsStoreOrder(o1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.FINISH_ORDER.getValue(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         FsStoreOrderLogEnum.FINISH_ORDER.getDesc()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (order.getCompanyId()!=null&&order.getTuiMoneyStatus()==0&&order.getPayType()==1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (order.getCompanyId() != null && order.getTuiMoneyStatus() == 0 && order.getPayType() == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     companyService.addCompanyMoney(order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void inquirySendSms(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void inquirySendSms() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsInquiryOrder> orders = inquiryOrderMapper.selectFsInquiryOrderBySendSms(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (FsInquiryOrder order : orders){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            FsInquiryOrderPatientDTO patientDTO = JSON.parseObject(order.getPatientJson(),FsInquiryOrderPatientDTO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (patientDTO!=null&&patientDTO.getPatientName()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (FsInquiryOrder order : orders) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            FsInquiryOrderPatientDTO patientDTO = JSON.parseObject(order.getPatientJson(), FsInquiryOrderPatientDTO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (patientDTO != null && patientDTO.getPatientName() != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 FsUser fsUser = fsUserMapper.selectFsUserByUserId(order.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (fsUser!=null&&fsUser.getPhone()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (fsUser != null && fsUser.getPhone() != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     smsService.sendUserSms(fsUser.getPhone(), patientDTO.getPatientName(), "2"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     order.setIsSendSms(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     inquiryOrderMapper.updateFsInquiryOrder(order); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -777,9 +912,9 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //处理30天问题件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void clearProblemOrder(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void clearProblemOrder() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<FsStoreOrder> orders = fsStoreOrderMapper.selectFsStoreOrderByProblemOrder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (FsStoreOrder order : orders){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (FsStoreOrder order : orders) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             FsStoreOrder map = new FsStoreOrder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             map.setStatus(4); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             map.setOrderId(order.getOrderId()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -790,14 +925,14 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //30天无通话记录回收坐席 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void recoverCompanyCaller(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void recoverCompanyCaller() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SysConfig sysConfig = sysConfigMapper.selectConfigByConfigKey("his.store"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         StoreConfig fsPayConfig = new Gson().fromJson(sysConfig.getConfigValue(), StoreConfig.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Integer days = fsPayConfig.getStoreCall(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<CompanyVoiceCaller> list = companyVoiceCallerMapper.selectCompanyVoiceCallerByRecover(days); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (CompanyVoiceCaller caller : list){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            Long count = companyVoiceLogsMapper.selectCompanyVoiceLogsCountByCallerNo(caller.getCallerNo(),caller.getBindTime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (count==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (CompanyVoiceCaller caller : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Long count = companyVoiceLogsMapper.selectCompanyVoiceLogsCountByCallerNo(caller.getCallerNo(), caller.getBindTime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (count == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 caller.setCompanyId(0l); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 caller.setCompanyUserId(0l); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 caller.setMobile(""); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -810,32 +945,27 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void tb() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        packageOrderService.payConfirm("", "1780763211956486144", "1075999515888117190", "14", 1,null,null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        packageOrderService.payConfirm("", "1780763211956486144", "1075999515888117190", "14", 1, null, null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void addSend(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-       String userId="4048905872"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-       String doctorId="147"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String storeOrderId="470920"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String followId="1062986"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void addSend() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String userId = "4048905872"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String doctorId = "147"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String storeOrderId = "470920"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String followId = "1062986"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //发送给用户 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        MsgDTO msgDTO=new MsgDTO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        MsgCustomDTO customDTO=new MsgCustomDTO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        MsgDTO msgDTO = new MsgDTO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        MsgCustomDTO customDTO = new MsgCustomDTO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         customDTO.setType("startDrugReport"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         customDTO.setImType(2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         customDTO.setOrderId(storeOrderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         customDTO.setFollowId(followId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         msgDTO.setCloudCustomData(JSONUtil.toJsonStr(customDTO)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msgDTO.setFrom_Account("U-"+userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msgDTO.setTo_Account("D-"+doctorId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<MsgDataDTO> msgs=new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        MsgDataDTO msg=new MsgDataDTO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        msgDTO.setFrom_Account("U-" + userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        msgDTO.setTo_Account("D-" + doctorId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<MsgDataDTO> msgs = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        MsgDataDTO msg = new MsgDataDTO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         msg.setMsgType("TIMTextElem"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         msg.setMsgContent(new MsgDataFormatDTO("您好")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         msgs.add(msg); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1114,7 +1244,7 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                iFsPackageOrderService.updateFsPackageOrder(order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                num++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /// / 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        logger.info("所有订单同步完成:"+num); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1190,7 +1320,7 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //同步流水 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //同步流水 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //    public void task(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        CompanyMoneyLogs item = moneyLogsMapper.selectCompanyMoneyLogsById(248884L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        String logsId=item.getLogsId().toString(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1293,27 +1423,27 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IErpOrderService getErpService() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FsSysConfig sysConfig = configUtil.getSysConfig(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Integer erpOpen = sysConfig.getErpOpen(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (erpOpen != null && erpOpen == 1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (erpOpen != null && erpOpen == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //判断erp类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Integer erpType = sysConfig.getErpType(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (erpType != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (erpType != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 IErpOrderService erpOrderService = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (erpType == 1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (erpType == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     //管易 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    erpOrderService =  gyOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else if (erpType == 2){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    erpOrderService = gyOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (erpType == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     //旺店通 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    erpOrderService =  wdtOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else if (erpType == 3){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    erpOrderService = wdtOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (erpType == 3) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    erpOrderService =  hzOMSErpOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else if (erpType == 4){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    erpOrderService = hzOMSErpOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (erpType == 4) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     //代服 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    erpOrderService =  dfOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }else if(erpType == 5){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    erpOrderService=jSTOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }else if(erpType == 6){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    erpOrderService=k9OrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    erpOrderService = dfOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (erpType == 5) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    erpOrderService = jSTOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (erpType == 6) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    erpOrderService = k9OrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return erpOrderService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1322,4 +1452,71 @@ public class Task { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 定时任务-im会员定时发课,每一分钟执行一次 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void sendOpenImCourse(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String redisKey = "openIm:batchSendMsg:sendCourse"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Map<String, BatchSendCourseAllDTO> cacheMap = redisCache.getCacheMap(redisKey); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(cacheMap == null || cacheMap.isEmpty()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            logger.info("=====================会员IM定时发课,不存在对应的redisKey=================="); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Map.Entry<String, BatchSendCourseAllDTO>> toSendMap = cacheMap.entrySet().parallelStream().filter((v) -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            String[] split = v.getKey().split(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            long timestamp = Long.parseLong(split[2]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return timestamp < System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(toSendMap.isEmpty()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            logger.info("=====================会员IM定时发课,不存在可执行的发课任务=================="); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (Map.Entry<String, BatchSendCourseAllDTO> entry : toSendMap) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //执行发送消息任务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BatchSendCourseAllDTO batchSendCourseAllDTO = entry.getValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            openIMService.batchSendCourseTask(batchSendCourseAllDTO.getBatchSendCourseDTO(), batchSendCourseAllDTO.getOpenImBatchMsgDTO(), batchSendCourseAllDTO.getProject(), batchSendCourseAllDTO.getImMsgSendDetailList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 执行结束,删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.redisTemplate.<String, BatchSendCourseAllDTO>opsForHash().delete(redisKey, entry.getKey()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 定时任务-im 会员催课,每一分钟执行一次 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void urgeOpenImCourse(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String redisKey = "openIm:batchSendMsg:urgeCourse"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Map<String, BatchSendCourseAllDTO> cacheMap = redisCache.getCacheMap(redisKey); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(cacheMap == null || cacheMap.isEmpty()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            logger.info("===================== 会员-IM发消息催课,不存在对应的redisKey=================="); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Map.Entry<String, BatchSendCourseAllDTO>> toSendMap = cacheMap.entrySet().parallelStream().filter((v) -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            String[] split = v.getKey().split(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            long timestamp = Long.parseLong(split[2]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return timestamp < System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(toSendMap.isEmpty()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            logger.info("===================== 会员-IM发消息催课,不存在可发送的消息=================="); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (Map.Entry<String, BatchSendCourseAllDTO> entry : toSendMap) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //执行发送消息任务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BatchSendCourseAllDTO batchSendCourseAllDTO = entry.getValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            openIMService.batchUrgeCourseTask(batchSendCourseAllDTO.getOpenImBatchMsgDTO(), batchSendCourseAllDTO.getImMsgSendDetailList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 执行结束,删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.redisTemplate.<String, BatchSendCourseAllDTO>opsForHash().delete(redisKey, entry.getKey()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |