|
|
@@ -1,8 +1,10 @@
|
|
|
package com.goafanti.customer.service.impl;
|
|
|
|
|
|
+import com.goafanti.Interview.bo.selectByUidAidBo;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
import com.goafanti.common.model.*;
|
|
|
+import com.goafanti.common.utils.DateUtils;
|
|
|
import com.goafanti.common.utils.excel.NewExcelUtil;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
@@ -109,7 +111,7 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
}
|
|
|
BeanUtils.copyProperties(userArchives, user);
|
|
|
user.setUid(id);
|
|
|
- List<UserArchivesInterview> userArchivesInterviews;
|
|
|
+ List<selectByUidAidBo> userArchivesInterviews;
|
|
|
if (type==0){
|
|
|
userArchivesInterviews = userArchivesInterviewMapper.selectByUidAid(id, TokenManager.getAdminId());
|
|
|
user.setInterviewList(userArchivesInterviews);
|
|
|
@@ -318,9 +320,33 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
@Override
|
|
|
public Object selectUserArchives(InputSelectUserArchives in) {
|
|
|
Map<String, Object> params = getParams(in);
|
|
|
-
|
|
|
- return findPage("selectUserArchivesList",
|
|
|
+ Pagination<?> page = findPage("selectUserArchivesList",
|
|
|
"selectUserArchivesCount", params, in.getPageNo(), in.getPageSize());
|
|
|
+// List<OutSelectUserArchives> list = (List<OutSelectUserArchives>) page.getList();
|
|
|
+// list.stream().forEach(e ->{
|
|
|
+// List<selectByUidAidBo> userArchivesInterviews = userArchivesInterviewMapper.selectByUidAid(e.getId(), null);
|
|
|
+// e.setPublicContent(pushContent(userArchivesInterviews));
|
|
|
+// });
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ private String pushContent(List<selectByUidAidBo> list) {
|
|
|
+ if (!list.isEmpty()){
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
|
+ list.stream().forEach(e ->{
|
|
|
+ builder.append(e.getAdminName()).append( "[").append(DateUtils.formatDateChineseYYYYMMddHH(e.getCreateTime())).append("]:");
|
|
|
+ builder.append("前期沟通-客户的难处:").append(e.getEarlyCommunication()).append("\n");
|
|
|
+ builder.append("客户的需求:").append(e.getCustomerDemand()).append("\n");
|
|
|
+ builder.append("面谈思路:").append(e.getInterviewIdeas()).append("\n");
|
|
|
+ builder.append("面谈达成的目的:").append(e.getInterviewPurpose()).append("\n");
|
|
|
+ builder.append("经理/上级面谈建议:").append(e.getInterviewRecommend()).append("\n");
|
|
|
+ if (e.getInterviewFeedback()!=null)builder.append("面谈的反馈:").append(e.getInterviewFeedback()).append("\n");
|
|
|
+ if (e.getFollowUpPlan()!=null)builder.append("后续计划:").append(e.getFollowUpPlan()).append("\n");
|
|
|
+ builder.append("\n");
|
|
|
+ });
|
|
|
+ return builder.toString();
|
|
|
+ }
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
private Map<String, Object> getParams(InputSelectUserArchives in) {
|
|
|
@@ -371,6 +397,10 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
Map<String, Object> params = getParams(in);
|
|
|
List<OutSelectUserArchives> list= (List<OutSelectUserArchives>) findList("selectUserArchivesList",
|
|
|
params, 1, 999999);
|
|
|
+ list.stream().forEach(e ->{
|
|
|
+ List<selectByUidAidBo> userArchivesInterviews = userArchivesInterviewMapper.selectByUidAid(e.getId(), null);
|
|
|
+ e.setPublicContent(pushContent(userArchivesInterviews));
|
|
|
+ });
|
|
|
NewExcelUtil<OutSelectUserArchives> newExcelUtil = new NewExcelUtil<>(OutSelectUserArchives.class);
|
|
|
return newExcelUtil.exportExcel( list,"用户档案",uploadPath);
|
|
|
}
|