|
@@ -39,6 +39,7 @@ import java.lang.reflect.Method;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -94,7 +95,19 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
|
BusinessOpportunity businessOpportunity = bOMapper.selectByIdToInfo(bo.getId());
|
|
|
businessOpportunity.setActionLogList(actionLogMapper.selectByInfoListBusiness(bo.getId()));
|
|
|
businessOpportunity.setUploadFilePList(uploadFileMapper.selectByInfoList("business", bo.getId()));
|
|
|
- businessOpportunity.setTaskList(taskMapper.selectList(new QueryWrapper<Task>().eq("business_opportunity_id", bo.getId())));
|
|
|
+ List<Task> tasks = taskMapper.selectList(new QueryWrapper<Task>().eq("business_opportunity_id", bo.getId()));
|
|
|
+ for (Task task : tasks) {
|
|
|
+ String executorId = task.getExecutorId();
|
|
|
+ if (executorId != null && executorId != ""){
|
|
|
+ List<String> list = Arrays.asList(executorId.split(","));
|
|
|
+ List<User> users = userMapper.selectList(new QueryWrapper<User>().in("id", list));
|
|
|
+ List<String> executorNamesList = users.stream()
|
|
|
+ .map(User::getName)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ task.setExecutorNames(executorNamesList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ businessOpportunity.setTaskList(tasks);
|
|
|
List<BusinessItemProduct> businessItemProducts = bipMapper.selectList(new QueryWrapper<BusinessItemProduct>().eq("business_id", bo.getId()));
|
|
|
if (businessItemProducts.size() > 0) {
|
|
|
BigDecimal finalPrice = new BigDecimal(0);
|