|
@@ -28,6 +28,7 @@ import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.service.IFsUserService;
|
|
import com.fs.his.service.IFsUserService;
|
|
|
import com.fs.qw.domain.QwContactWay;
|
|
import com.fs.qw.domain.QwContactWay;
|
|
|
import com.fs.qw.domain.QwExternalContact;
|
|
import com.fs.qw.domain.QwExternalContact;
|
|
|
|
|
+import com.fs.qw.domain.QwExternalContactCommunication;
|
|
|
import com.fs.qw.domain.QwTag;
|
|
import com.fs.qw.domain.QwTag;
|
|
|
import com.fs.qw.dto.CompanyTransferDTO;
|
|
import com.fs.qw.dto.CompanyTransferDTO;
|
|
|
import com.fs.qw.param.*;
|
|
import com.fs.qw.param.*;
|
|
@@ -98,6 +99,9 @@ public class QwExternalContactController extends BaseController
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IFsUserCompanyBindService fsUserCompanyBindService;
|
|
private IFsUserCompanyBindService fsUserCompanyBindService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IQwExternalContactCommunicationService qwExternalContactCommunicationService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查询企业微信客户列表
|
|
* 查询企业微信客户列表
|
|
|
*/
|
|
*/
|
|
@@ -114,7 +118,20 @@ public class QwExternalContactController extends BaseController
|
|
|
startPage();
|
|
startPage();
|
|
|
qwExternalContact.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
qwExternalContact.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
List<QwExternalContactVO> list = qwExternalContactService.selectQwExternalContactListVO(qwExternalContact);
|
|
List<QwExternalContactVO> list = qwExternalContactService.selectQwExternalContactListVO(qwExternalContact);
|
|
|
|
|
+
|
|
|
|
|
+ if(list==null|| list.isEmpty()){
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
|
|
+ List<Long> ids=list.stream().map(QwExternalContactVO::getId).collect(Collectors.toList());
|
|
|
|
|
+
|
|
|
|
|
+ // 查询用户沟通内容
|
|
|
|
|
+ List<QwExternalContactCommunication> contactCommunications=qwExternalContactCommunicationService.getListByExternalContactIds(ids);
|
|
|
|
|
+ Map<String, String> communicationMap = contactCommunications.stream().collect(Collectors.toMap(QwExternalContactCommunication::getExternalContactId, QwExternalContactCommunication::getCommunicationContent));
|
|
|
|
|
+
|
|
|
list.forEach(item->{
|
|
list.forEach(item->{
|
|
|
|
|
+ // 设置最后沟通内容
|
|
|
|
|
+ item.setLastContactContent(communicationMap.get(String.valueOf(item.getId())));
|
|
|
|
|
+
|
|
|
|
|
|
|
|
if (!Objects.equals(item.getTagIds(), "[]") && item.getTagIds()!=null) {
|
|
if (!Objects.equals(item.getTagIds(), "[]") && item.getTagIds()!=null) {
|
|
|
QwTagSearchParam param = new QwTagSearchParam();
|
|
QwTagSearchParam param = new QwTagSearchParam();
|
|
@@ -262,7 +279,18 @@ public class QwExternalContactController extends BaseController
|
|
|
startPage();
|
|
startPage();
|
|
|
qwExternalContact.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
qwExternalContact.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
List<QwExternalContactVO> list = qwExternalContactService.selectQwExternalContactListVO(qwExternalContact);
|
|
List<QwExternalContactVO> list = qwExternalContactService.selectQwExternalContactListVO(qwExternalContact);
|
|
|
|
|
+ if(list==null|| list.isEmpty()){
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
|
|
+ List<Long> ids=list.stream().map(QwExternalContactVO::getId).collect(Collectors.toList());
|
|
|
|
|
+
|
|
|
|
|
+ // 查询用户沟通内容
|
|
|
|
|
+ List<QwExternalContactCommunication> contactCommunications=qwExternalContactCommunicationService.getListByExternalContactIds(ids);
|
|
|
|
|
+ Map<String, String> communicationMap = contactCommunications.stream().collect(Collectors.toMap(QwExternalContactCommunication::getExternalContactId, QwExternalContactCommunication::getCommunicationContent));
|
|
|
|
|
+
|
|
|
list.forEach(item->{
|
|
list.forEach(item->{
|
|
|
|
|
+ // 设置最后沟通内容
|
|
|
|
|
+ item.setLastContactContent(communicationMap.get(String.valueOf(item.getId())));
|
|
|
|
|
|
|
|
if (!Objects.equals(item.getTagIds(), "[]") && item.getTagIds()!=null) {
|
|
if (!Objects.equals(item.getTagIds(), "[]") && item.getTagIds()!=null) {
|
|
|
QwTagSearchParam param = new QwTagSearchParam();
|
|
QwTagSearchParam param = new QwTagSearchParam();
|
|
@@ -289,10 +317,6 @@ public class QwExternalContactController extends BaseController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
- // 查询用户沟通内容
|
|
|
|
|
-
|
|
|
|
|
- // 查询用户身体情况
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|