|
@@ -111,6 +111,9 @@ public class ExtQuotationServiceImpl extends ServiceImpl<ExtQuotationMapper, Ext
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ //最近有跟进的数据
|
|
|
+ wrapper.le("DATEDIFF( NOW(), last_follow_time )", dto.getFollowDay());
|
|
|
+
|
|
|
wrapper.orderByDesc("eq", ExtQuotation::getId);
|
|
|
|
|
|
Page<ExtQuotationVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
@@ -120,6 +123,11 @@ public class ExtQuotationServiceImpl extends ServiceImpl<ExtQuotationMapper, Ext
|
|
|
return page;
|
|
|
}
|
|
|
|
|
|
+ //获取对内报价单号
|
|
|
+ List<Long> internalIds = records.stream().map(ExtQuotation::getSaleQuotationId).collect(Collectors.toList());
|
|
|
+ Map<Long, String> internalMap = saleQuotationService.mapKV(SaleQuotation::getId, SaleQuotation::getCode,
|
|
|
+ q -> q.in(SaleQuotation::getId, internalIds));
|
|
|
+
|
|
|
// 赋值用户名称
|
|
|
UserUtil.assignmentNickName(records, BasePo::getCreateUser, ExtQuotationVo::setUserName);
|
|
|
|
|
@@ -148,16 +156,19 @@ public class ExtQuotationServiceImpl extends ServiceImpl<ExtQuotationMapper, Ext
|
|
|
.orderByDesc(ExtQuotationFollow::getFollowTime)
|
|
|
);
|
|
|
|
|
|
- for (ExtQuotationVo saleQuotationVo : records) {
|
|
|
+ for (ExtQuotationVo esq : records) {
|
|
|
//赋值报价公司名称
|
|
|
- saleQuotationVo.setCompanyName(companyMap.get(saleQuotationVo.getCompanyId()));
|
|
|
+ esq.setCompanyName(companyMap.get(esq.getCompanyId()));
|
|
|
|
|
|
//赋值产品列表
|
|
|
- saleQuotationVo.setQuotationProductList(pMap.get(saleQuotationVo.getId()));
|
|
|
+ esq.setQuotationProductList(pMap.get(esq.getId()));
|
|
|
|
|
|
//赋值跟进信息
|
|
|
- List<ExtQuotationFollow> extQuotationFollows = followMap.get(saleQuotationVo.getId());
|
|
|
- saleQuotationVo.setExtQuotationFollowList(extQuotationFollows);
|
|
|
+ List<ExtQuotationFollow> extQuotationFollows = followMap.get(esq.getId());
|
|
|
+ esq.setExtQuotationFollowList(extQuotationFollows);
|
|
|
+
|
|
|
+ //赋值内部报价单号
|
|
|
+ esq.setInternalCode(internalMap.get(esq.getSaleQuotationId()));
|
|
|
}
|
|
|
|
|
|
return page;
|