|
|
@@ -1,5 +1,6 @@
|
|
|
package com.fs.qw.service.impl;
|
|
|
|
|
|
+import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
|
|
|
import com.fs.common.core.domain.R;
|
|
|
@@ -7,13 +8,17 @@ import com.fs.common.utils.DateUtils;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.his.domain.FsSopDoctorTask;
|
|
|
+import com.fs.his.dto.SopDoctorTaskDto;
|
|
|
import com.fs.his.mapper.FsSopDoctorTaskMapper;
|
|
|
+import com.fs.his.param.DoctorTaskStatsParam;
|
|
|
import com.fs.his.utils.PhoneUtil;
|
|
|
+import com.fs.his.vo.SopDoctorTaskVo;
|
|
|
import com.fs.hisStore.service.IFsUserInformationCollectionService;
|
|
|
import com.fs.qw.domain.QwExternalContact;
|
|
|
import com.fs.qw.mapper.QwExternalContactMapper;
|
|
|
import com.fs.qw.param.FsDoctorMemberSalesQueryParam;
|
|
|
import com.fs.qw.param.MemberSalesParam;
|
|
|
+import com.fs.qw.vo.DoctorTaskStatsVO;
|
|
|
import com.fs.qw.vo.FsDoctorMemberSalesVO;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -45,6 +50,9 @@ public class FsDoctorMemberSalesServiceImpl extends ServiceImpl<FsDoctorMemberSa
|
|
|
@Autowired
|
|
|
private IFsUserInformationCollectionService userInformationCollectionService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private FsSopDoctorTaskMapper fsSopDoctorTaskMapper;
|
|
|
+
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public R push(MemberSalesParam param) {
|
|
|
@@ -89,10 +97,6 @@ public class FsDoctorMemberSalesServiceImpl extends ServiceImpl<FsDoctorMemberSa
|
|
|
public List<FsDoctorMemberSalesVO> selectFsDoctorMemberSalesVOList(FsDoctorMemberSalesQueryParam param) {
|
|
|
//1.跟进会员信息
|
|
|
List<FsDoctorMemberSalesVO> voList = memberSalesMapper.selectFsDoctorMemberSalesVOList(param);
|
|
|
- //2.获取填写的会员的采集信息
|
|
|
- //List<Long> fsUserIds=voList.stream().map(FsDoctorMemberSalesVO::getFsUserId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
- //List<FsUserInformationCollection> userInformationCollections =userInformationCollectionService.selectFsUserInformationCollectionListByUserIds(fsUserIds);
|
|
|
- //Map<Long, FsUserInformationCollection> userInformationCollectionMap=userInformationCollections.stream().collect(Collectors.toMap(FsUserInformationCollection::getUserId,v->v));
|
|
|
if (!CollectionUtils.isEmpty(voList)) {
|
|
|
for (FsDoctorMemberSalesVO vo : voList) {
|
|
|
if (!StringUtils.isEmpty(vo.getPhone())) {
|
|
|
@@ -106,9 +110,6 @@ public class FsDoctorMemberSalesServiceImpl extends ServiceImpl<FsDoctorMemberSa
|
|
|
//2.获取跟进会员待处理的总数
|
|
|
Long unprocessedDoctorTaskCount = sopDoctorTaskMapper.selectUnprocessedDoctorTaskCount(vo.getId());
|
|
|
vo.setUnprocessed(unprocessedDoctorTaskCount);
|
|
|
- //3.获取会员真实姓名
|
|
|
- //FsUserInformationCollection collection = userInformationCollectionMap.get(vo.getFsUserId());
|
|
|
- //vo.setRealName(collection != null ? collection.getUserName() : null);
|
|
|
}
|
|
|
}
|
|
|
return voList;
|
|
|
@@ -187,4 +188,23 @@ public class FsDoctorMemberSalesServiceImpl extends ServiceImpl<FsDoctorMemberSa
|
|
|
{
|
|
|
return baseMapper.deleteFsDoctorMemberSalesById(id);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<DoctorTaskStatsVO> selectDoctorTaskStats(DoctorTaskStatsParam param) {
|
|
|
+ List<DoctorTaskStatsVO> doctorTaskStatsVOS = memberSalesMapper.selectDoctorTaskStats(param);
|
|
|
+ if (CollectionUtils.isEmpty(doctorTaskStatsVOS)){
|
|
|
+ return Collections.emptyList();
|
|
|
+ }
|
|
|
+ return doctorTaskStatsVOS;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<SopDoctorTaskVo> selectCompletedTasksList(SopDoctorTaskDto queryDto) {
|
|
|
+ queryDto.setStatus(1);//1:已处理
|
|
|
+ List<SopDoctorTaskVo> sopDoctorTaskVos = fsSopDoctorTaskMapper.selectFsSopDoctorTaskVoList(queryDto);
|
|
|
+ if (!CollectionUtils.isEmpty(sopDoctorTaskVos)){
|
|
|
+ return sopDoctorTaskVos;
|
|
|
+ }
|
|
|
+ return sopDoctorTaskVos;
|
|
|
+ }
|
|
|
}
|