|  | @@ -1,5 +1,6 @@
 | 
											
												
													
														|  |  package com.fs.sop.service.impl;
 |  |  package com.fs.sop.service.impl;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +import cn.hutool.core.util.ObjectUtil;
 | 
											
												
													
														|  |  import cn.hutool.json.JSONUtil;
 |  |  import cn.hutool.json.JSONUtil;
 | 
											
												
													
														|  |  import com.alibaba.fastjson.JSON;
 |  |  import com.alibaba.fastjson.JSON;
 | 
											
												
													
														|  |  import com.alibaba.fastjson.JSONArray;
 |  |  import com.alibaba.fastjson.JSONArray;
 | 
											
										
											
												
													
														|  | @@ -555,6 +556,9 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
 | 
											
												
													
														|  |                      sopLogs.setSendType(6);
 |  |                      sopLogs.setSendType(6);
 | 
											
												
													
														|  |                      sopLogs.setExternalUserName(groupUser.getName());
 |  |                      sopLogs.setExternalUserName(groupUser.getName());
 | 
											
												
													
														|  |                      sopLogs.setQwUserKey(qwUser.getId());
 |  |                      sopLogs.setQwUserKey(qwUser.getId());
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                    // 设置实际发送人
 | 
											
												
													
														|  | 
 |  | +                    updateQwUserKey(sopLogs,qwUser.getQwUserId(),param.getSopId());
 | 
											
												
													
														|  |                      //域名
 |  |                      //域名
 | 
											
												
													
														|  |                      String companyUserId = qwUser.getCompanyUserId().toString();
 |  |                      String companyUserId = qwUser.getCompanyUserId().toString();
 | 
											
												
													
														|  |                      String domainName = companyUserMapper.selectDomainByUserId(Long.parseLong(companyUserId));
 |  |                      String domainName = companyUserMapper.selectDomainByUserId(Long.parseLong(companyUserId));
 | 
											
										
											
												
													
														|  | @@ -691,6 +695,8 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
 | 
											
												
													
														|  |                      sopLogs.setSendType(12);
 |  |                      sopLogs.setSendType(12);
 | 
											
												
													
														|  |                      sopLogs.setExternalUserName(groupChat.getName());
 |  |                      sopLogs.setExternalUserName(groupChat.getName());
 | 
											
												
													
														|  |                      sopLogs.setQwUserKey(qwUser.getId());
 |  |                      sopLogs.setQwUserKey(qwUser.getId());
 | 
											
												
													
														|  | 
 |  | +                    // 设置实际发送人
 | 
											
												
													
														|  | 
 |  | +                    updateQwUserKey(sopLogs,qwUser.getQwUserId(),param.getSopId());
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                      QwSopCourseFinishTempSetting setting = new QwSopCourseFinishTempSetting();
 |  |                      QwSopCourseFinishTempSetting setting = new QwSopCourseFinishTempSetting();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -995,12 +1001,15 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
 | 
											
												
													
														|  |                  setting.setVideoId(param.getVideoId());
 |  |                  setting.setVideoId(param.getVideoId());
 | 
											
												
													
														|  |                  setting.setCourseId(param.getCourseId());
 |  |                  setting.setCourseId(param.getCourseId());
 | 
											
												
													
														|  |                  setting.setCourseType(param.getCourseType());
 |  |                  setting.setCourseType(param.getCourseType());
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |                  try {
 |  |                  try {
 | 
											
												
													
														|  |                      sopLogs.setQwUserKey(Long.valueOf(qwUserId));
 |  |                      sopLogs.setQwUserKey(Long.valueOf(qwUserId));
 | 
											
												
													
														|  |                  }catch (Exception e){
 |  |                  }catch (Exception e){
 | 
											
												
													
														|  |                      log.error("设置qwUserId异常", e);
 |  |                      log.error("设置qwUserId异常", e);
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
												
													
														|  |                  sopLogs.setContentJson(JSON.toJSONString(setting));
 |  |                  sopLogs.setContentJson(JSON.toJSONString(setting));
 | 
											
												
													
														|  | 
 |  | +                // 设置实际发送人
 | 
											
												
													
														|  | 
 |  | +                updateQwUserKey(sopLogs,qwUser.getQwUserId(),param.getSopId());
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                  sopLogsList.add(sopLogs);
 |  |                  sopLogsList.add(sopLogs);
 | 
											
												
													
														|  |              });
 |  |              });
 | 
											
										
											
												
													
														|  | @@ -1014,6 +1023,15 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
 | 
											
												
													
														|  |          return R.ok();
 |  |          return R.ok();
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    private void updateQwUserKey(QwSopLogs sopLogs, String qwUserId, String sopId) {
 | 
											
												
													
														|  | 
 |  | +        // 设置实际发送人
 | 
											
												
													
														|  | 
 |  | +        SopUserLogs qwSopLogs = sopUserLogsMapper.queryUserBySopId(qwUserId,sopId);
 | 
											
												
													
														|  | 
 |  | +        if (qwSopLogs != null && ObjectUtil.isNotEmpty(qwSopLogs.getActualQwId())){
 | 
											
												
													
														|  | 
 |  | +            // sopLogs.setQwUserid(qwUser.getQwUserId());
 | 
											
												
													
														|  | 
 |  | +            sopLogs.setQwUserKey(qwSopLogs.getActualQwId());
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      private void createVoiceUrl(QwSopCourseFinishTempSetting.Setting st, String companyUserId, QwSop qwSop) {
 |  |      private void createVoiceUrl(QwSopCourseFinishTempSetting.Setting st, String companyUserId, QwSop qwSop) {
 | 
											
												
													
														|  |          QwSopTempVoice qwSopTempVoice = sopTempVoiceService.selectQwSopTempVoiceByCompanyUserIdAndVoiceTxt(Long.valueOf(companyUserId), st.getValue());
 |  |          QwSopTempVoice qwSopTempVoice = sopTempVoiceService.selectQwSopTempVoiceByCompanyUserIdAndVoiceTxt(Long.valueOf(companyUserId), st.getValue());
 | 
											
												
													
														|  |          if (qwSopTempVoice != null && qwSopTempVoice.getVoiceUrl() != null && qwSopTempVoice.getRecordType() == 1) {
 |  |          if (qwSopTempVoice != null && qwSopTempVoice.getVoiceUrl() != null && qwSopTempVoice.getRecordType() == 1) {
 |