|
@@ -17,6 +17,7 @@ import com.management.platform.service.SysFunctionService;
|
|
import com.management.platform.service.WxCorpInfoService;
|
|
import com.management.platform.service.WxCorpInfoService;
|
|
import com.management.platform.util.ExcelUtil;
|
|
import com.management.platform.util.ExcelUtil;
|
|
import com.management.platform.util.HttpRespMsg;
|
|
import com.management.platform.util.HttpRespMsg;
|
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.poi.ss.usermodel.CellType;
|
|
import org.apache.poi.ss.usermodel.CellType;
|
|
import org.apache.poi.xssf.usermodel.XSSFCell;
|
|
import org.apache.poi.xssf.usermodel.XSSFCell;
|
|
@@ -358,23 +359,25 @@ public class ContactsServiceImpl extends ServiceImpl<ContactsMapper, Contacts> i
|
|
List<BusinessOpportunity> opportunityList = businessOpportunityMapper.selectList(bLqw);
|
|
List<BusinessOpportunity> opportunityList = businessOpportunityMapper.selectList(bLqw);
|
|
LambdaQueryWrapper<Stage> stageLQW = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<Stage> stageLQW = new LambdaQueryWrapper<>();
|
|
List<Stage> stages = stageMapper.selectList(stageLQW);
|
|
List<Stage> stages = stageMapper.selectList(stageLQW);
|
|
|
|
+ if(CollectionUtils.isNotEmpty(opportunityList)){
|
|
|
|
+ opportunityList.forEach(businessOpportunity -> {
|
|
|
|
+ Custom custom = customMapper.selectById(businessOpportunity.getCustomerId());
|
|
|
|
+ businessOpportunity.setCustomerName(custom.getCustomName());
|
|
|
|
+ if (StringUtils.isNotBlank(businessOpportunity.getInchargerId())){
|
|
|
|
+ User chargeUser = userMapper.selectById(businessOpportunity.getInchargerId());
|
|
|
|
+ businessOpportunity.setInchargerName(chargeUser.getName());
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotBlank(businessOpportunity.getCreatorId())){
|
|
|
|
+ User creatorUser = userMapper.selectById(businessOpportunity.getCreatorId());
|
|
|
|
+ businessOpportunity.setCreatorName(creatorUser.getName());
|
|
|
|
+ }
|
|
|
|
+ if (businessOpportunity.getStageId()!=null){
|
|
|
|
+ Optional<Stage> first = stages.stream().filter(s -> s.getId().equals(businessOpportunity.getStageId())).findFirst();
|
|
|
|
+ first.ifPresent(stage -> businessOpportunity.setStageValue(stage.getName()));
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
- opportunityList.forEach(businessOpportunity -> {
|
|
|
|
- Custom custom = customMapper.selectById(businessOpportunity.getCustomerId());
|
|
|
|
- businessOpportunity.setCustomerName(custom.getCustomName());
|
|
|
|
- if (businessOpportunity.getInchargerId()!=null){
|
|
|
|
- User chargeUser = userMapper.selectById(businessOpportunity.getInchargerId());
|
|
|
|
- businessOpportunity.setInchargerName(chargeUser.getName());
|
|
|
|
- }
|
|
|
|
- if (businessOpportunity.getCreatorId()!=null){
|
|
|
|
- User creatorUser = userMapper.selectById(businessOpportunity.getCreatorId());
|
|
|
|
- businessOpportunity.setCreatorName(creatorUser.getName());
|
|
|
|
- }
|
|
|
|
- if (businessOpportunity.getStageId()!=null){
|
|
|
|
- Optional<Stage> first = stages.stream().filter(s -> s.getId().equals(businessOpportunity.getStageId())).findFirst();
|
|
|
|
- first.ifPresent(stage -> businessOpportunity.setStageValue(stage.getName()));
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
|
|
//附件信息查询
|
|
//附件信息查询
|
|
LambdaQueryWrapper<ContactsDocument> cDLqw = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<ContactsDocument> cDLqw = new LambdaQueryWrapper<>();
|