Kaynağa Gözat

客户修改

Guo1B0 10 ay önce
ebeveyn
işleme
4bb0c26a4c

+ 1 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/BusinessOpportunityController.java

@@ -289,6 +289,7 @@ public class BusinessOpportunityController {
         HashMap<Object, Object> r = new HashMap<>();
         User user = userMapper.selectById(request.getHeader("Token"));
         bo.setIsDelete(1);
+        bo.setPageIndex((bo.getPageIndex()-1) * bo.getPageFrom());
         bo.setUserId(user.getId());
         bo.setCompanyId(user.getCompanyId());
         setNull(bo);

+ 14 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/BusinessOpportunityServiceImpl.java

@@ -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);