|
@@ -10,14 +10,20 @@ import com.fs.common.utils.poi.ExcelUtil;
|
|
import com.fs.framework.security.LoginUser;
|
|
import com.fs.framework.security.LoginUser;
|
|
import com.fs.framework.service.TokenService;
|
|
import com.fs.framework.service.TokenService;
|
|
import com.fs.qw.domain.QwUserVoiceLog;
|
|
import com.fs.qw.domain.QwUserVoiceLog;
|
|
|
|
+import com.fs.qw.param.QwTagSearchParam;
|
|
|
|
+import com.fs.qw.service.IQwTagService;
|
|
import com.fs.qw.service.IQwUserVoiceLogService;
|
|
import com.fs.qw.service.IQwUserVoiceLogService;
|
|
import com.fs.qw.vo.QwUserVoiceLogTotalVo;
|
|
import com.fs.qw.vo.QwUserVoiceLogTotalVo;
|
|
import com.fs.qw.vo.QwUserVoiceLogVo;
|
|
import com.fs.qw.vo.QwUserVoiceLogVo;
|
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
|
+import com.google.gson.Gson;
|
|
|
|
+import com.google.gson.reflect.TypeToken;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 企微用户通话记录Controller
|
|
* 企微用户通话记录Controller
|
|
@@ -35,6 +41,9 @@ public class QwUserVoiceLogController extends BaseController
|
|
@Autowired
|
|
@Autowired
|
|
private TokenService tokenService;
|
|
private TokenService tokenService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IQwTagService iQwTagService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询企微用户通话记录列表
|
|
* 查询企微用户通话记录列表
|
|
*/
|
|
*/
|
|
@@ -49,6 +58,35 @@ public class QwUserVoiceLogController extends BaseController
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询企微用户通话记录列表
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('qw:qwUserVoiceLog:list')")
|
|
|
|
+ @PostMapping("/newList")
|
|
|
|
+ public TableDataInfo newList(@RequestBody QwUserVoiceLogVo qwUserVoiceLog)
|
|
|
|
+ {
|
|
|
|
+ PageHelper.startPage(qwUserVoiceLog.getPageNum(), qwUserVoiceLog.getPageSize());
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
+ qwUserVoiceLog.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
|
+ List<QwUserVoiceLogVo> list = qwUserVoiceLogService.selectQwUserVoiceLogList(qwUserVoiceLog);
|
|
|
|
+ list.forEach(item->{
|
|
|
|
+
|
|
|
|
+ if (!Objects.equals(item.getQwExternalContact().getTagIds(), "[]") && item.getQwExternalContact().getTagIds()!=null) {
|
|
|
|
+ QwTagSearchParam param = new QwTagSearchParam();
|
|
|
|
+ Gson gson = new Gson();
|
|
|
|
+ List<String> tagIds = gson.fromJson(
|
|
|
|
+ item.getQwExternalContact().getTagIds(),
|
|
|
|
+ new TypeToken<List<String>>() {
|
|
|
|
+ }.getType()
|
|
|
|
+ );
|
|
|
|
+ param.setTagIds(tagIds);
|
|
|
|
+ item.setTagIdsName(iQwTagService.selectQwTagListByTagIds(param));
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return getDataTable(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询我的通话记录列表
|
|
* 查询我的通话记录列表
|
|
* @param qwUserVoiceLog
|
|
* @param qwUserVoiceLog
|
|
@@ -141,6 +179,9 @@ public class QwUserVoiceLogController extends BaseController
|
|
@GetMapping("/totalExport")
|
|
@GetMapping("/totalExport")
|
|
public AjaxResult totalExport(QwUserVoiceLogTotalVo qwUserVoiceLog)
|
|
public AjaxResult totalExport(QwUserVoiceLogTotalVo qwUserVoiceLog)
|
|
{
|
|
{
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
+ qwUserVoiceLog.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
|
+ qwUserVoiceLog.setQwUserId(1L);
|
|
List<QwUserVoiceLogTotalVo> list = qwUserVoiceLogService.selectQwUserVoiceLogTotalList(qwUserVoiceLog);
|
|
List<QwUserVoiceLogTotalVo> list = qwUserVoiceLogService.selectQwUserVoiceLogTotalList(qwUserVoiceLog);
|
|
list.forEach(m-> {
|
|
list.forEach(m-> {
|
|
m.setQwUserName(m.getQwUser().getQwUserName());
|
|
m.setQwUserName(m.getQwUser().getQwUserName());
|