|
@@ -12,6 +12,7 @@ import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.DictUtils;
|
|
|
import com.fs.company.cache.ICompanyCacheService;
|
|
|
import com.fs.company.cache.ICompanyUserCacheService;
|
|
|
+import com.fs.company.domain.Company;
|
|
|
import com.fs.company.domain.CompanyUser;
|
|
|
import com.fs.course.config.CourseConfig;
|
|
|
import com.fs.course.domain.FsCourseFinishTemp;
|
|
@@ -29,6 +30,7 @@ import com.fs.his.service.IFsUserService;
|
|
|
import com.fs.his.utils.ConfigUtil;
|
|
|
import com.fs.his.vo.OptionsVO;
|
|
|
import com.fs.qw.Bean.MsgBean;
|
|
|
+import com.fs.qw.cache.IQwExternalContactCacheService;
|
|
|
import com.fs.qw.cache.IQwUserCacheService;
|
|
|
import com.fs.qw.domain.QwExternalContact;
|
|
|
import com.fs.qw.domain.QwExternalContactInfo;
|
|
@@ -91,6 +93,8 @@ public class FsCourseWatchLogServiceImpl extends ServiceImpl<FsCourseWatchLogMap
|
|
|
@Autowired
|
|
|
RedisCache redisCache;
|
|
|
@Autowired
|
|
|
+ private IQwExternalContactCacheService qwExternalContactCacheService;
|
|
|
+ @Autowired
|
|
|
private QwWatchLogMapper qwWatchLogMapper;
|
|
|
@Autowired
|
|
|
private FsUserCourseVideoMapper courseVideoMapper;
|
|
@@ -999,4 +1003,79 @@ public class FsCourseWatchLogServiceImpl extends ServiceImpl<FsCourseWatchLogMap
|
|
|
totalCost,
|
|
|
totalCost > 0 ? String.format("%.2f", logs.size() * 1000.0 / totalCost) : "∞");
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<FsCourseWatchLogListVO> selectFsCourseWatchLogListVOexport(FsCourseWatchLogListParam param) {
|
|
|
+
|
|
|
+ List<FsCourseWatchLogListVO> list = fsCourseWatchLogMapper.selectFsCourseWatchLogListVOexport(param);
|
|
|
+ for (FsCourseWatchLogListVO item : list) {
|
|
|
+ // 项目
|
|
|
+ if(ObjectUtils.isNotNull(item.getProject())) {
|
|
|
+ String sysCourseProject = DictUtils.getDictLabel("sys_course_project", String.valueOf(item.getProject()));
|
|
|
+ if(StringUtils.isNotBlank(sysCourseProject)){
|
|
|
+ item.setProjectName(sysCourseProject);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 用户名
|
|
|
+ if(ObjectUtils.isNotNull(item.getUserId())) {
|
|
|
+ FsUser fsUser = fsUserCacheService.selectFsUserById(item.getUserId());
|
|
|
+ if(ObjectUtils.isNotNull(fsUser)){
|
|
|
+ item.setExternalUserName(String.format("%s_%d",fsUser.getNickname(),fsUser.getUserId()));
|
|
|
+ item.setFsNickName(fsUser.getNickname());
|
|
|
+ item.setFsAvatar(fsUser.getAvatar());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 公司名
|
|
|
+ if(ObjectUtils.isNotNull(item.getCompanyId())){
|
|
|
+ Company company = companyCacheService.selectCompanyById(Long.valueOf(item.getCompanyId()));
|
|
|
+ if(ObjectUtils.isNotNull(company)){
|
|
|
+ item.setCompanyName(String.format("%s_%d", company.getCompanyName(), company.getCompanyId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 销售名
|
|
|
+ if(ObjectUtils.isNotNull(item.getCompanyUserId())){
|
|
|
+ CompanyUser companyUser = companyUserCacheService.selectCompanyUserById(item.getCompanyUserId());
|
|
|
+ if(ObjectUtils.isNotNull(companyUser)){
|
|
|
+ item.setCompanyUserName(String.format("%s_%d", companyUser.getNickName(), companyUser.getUserId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 课程
|
|
|
+ if(ObjectUtils.isNotNull(item.getCourseId())){
|
|
|
+ FsUserCourse course = fsUserCourseCacheService.selectFsUserCourseByCourseId(item.getCourseId());
|
|
|
+ if(ObjectUtils.isNotNull(course)){
|
|
|
+ item.setCourseName(course.getCourseName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 小节
|
|
|
+ if(ObjectUtils.isNotNull(item.getVideoId())){
|
|
|
+ FsUserCourseVideo fsUserCourseVideo = fsUserCourseVideoCacheService.selectFsUserCourseVideoByVideoId(item.getVideoId());
|
|
|
+ if(ObjectUtils.isNotNull(fsUserCourseVideo)){
|
|
|
+ item.setVideoName(fsUserCourseVideo.getTitle());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 企微用户名
|
|
|
+ if(ObjectUtils.isNotNull(item.getQwUserId())){
|
|
|
+ String qwUserName = qwUserCacheService.queryQwUserNameByUserId(item.getQwUserId());
|
|
|
+ if(StringUtils.isNotBlank(qwUserName)){
|
|
|
+ item.setQwUserName(qwUserName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 企微外部联系人
|
|
|
+ if(ObjectUtils.isNotNull(item.getQwExternalContactId())){
|
|
|
+ String qwExternalContactName = qwExternalContactCacheService.selectQwExternalContactById(Long.valueOf(item.getQwExternalContactId()));
|
|
|
+ if(StringUtils.isNotBlank(qwExternalContactName)){
|
|
|
+ item.setExternalUserName(qwExternalContactName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
}
|