|
|
@ -51,8 +51,10 @@ import springfox.documentation.annotations.ApiIgnore; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.validation.Valid; |
|
|
|
import javax.validation.Valid; |
|
|
|
import java.security.NoSuchAlgorithmException; |
|
|
|
import java.security.NoSuchAlgorithmException; |
|
|
|
|
|
|
|
import java.util.Comparator; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 基础客户表 控制器 |
|
|
|
* 基础客户表 控制器 |
|
|
@ -97,6 +99,7 @@ public class BasicdataClientController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
return R.data(detail); |
|
|
|
return R.data(detail); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 基础客户表 分页 |
|
|
|
* 基础客户表 分页 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -128,6 +131,34 @@ public class BasicdataClientController extends BladeController { |
|
|
|
pages.getRecords().forEach(i -> { |
|
|
|
pages.getRecords().forEach(i -> { |
|
|
|
List<BasicdataStoreBusinessEntity> list = basicdataStoreBusinessService.list(Wrappers.<BasicdataStoreBusinessEntity>query().lambda().eq(BasicdataStoreBusinessEntity::getClientId, i.getId())); |
|
|
|
List<BasicdataStoreBusinessEntity> list = basicdataStoreBusinessService.list(Wrappers.<BasicdataStoreBusinessEntity>query().lambda().eq(BasicdataStoreBusinessEntity::getClientId, i.getId())); |
|
|
|
i.setTypeServiceBusiness(list); |
|
|
|
i.setTypeServiceBusiness(list); |
|
|
|
|
|
|
|
//查询客户绑定第一位联系人
|
|
|
|
|
|
|
|
List<BasicdataStoreContactEntity> listed = basicdataStoreContactService.list(Wrappers.<BasicdataStoreContactEntity>query().lambda().eq(BasicdataStoreContactEntity::getShopId, i.getId())); |
|
|
|
|
|
|
|
if (Func.isNotEmpty(listed)) { |
|
|
|
|
|
|
|
String string = listed.stream().sorted(Comparator.comparing(BasicdataStoreContactEntity::getCreateTime)).findFirst().map(BasicdataStoreContactEntity::getLinkman).get(); |
|
|
|
|
|
|
|
i.setLinkman(string); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<String> collect = list.stream().filter(f -> Func.isNotEmpty(f.getMold())).map(BasicdataStoreBusinessEntity::getMold).collect(Collectors.toList()); |
|
|
|
|
|
|
|
if (collect.size() > 0) { |
|
|
|
|
|
|
|
//进行
|
|
|
|
|
|
|
|
String s = collect.get(0); |
|
|
|
|
|
|
|
switch (s) { |
|
|
|
|
|
|
|
case "1": |
|
|
|
|
|
|
|
i.setTypeServiceName("商配"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "2": |
|
|
|
|
|
|
|
i.setTypeServiceName("市配"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "3": |
|
|
|
|
|
|
|
i.setTypeServiceName("自提"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "4": |
|
|
|
|
|
|
|
i.setTypeServiceName("三方中转"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//处理客户的配送类型
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if(!i.getCreateUser().equals(null)){
|
|
|
|
// if(!i.getCreateUser().equals(null)){
|
|
|
|
// R<User> userR = userClient.userInfoById(i.getCreateUser());
|
|
|
|
// R<User> userR = userClient.userInfoById(i.getCreateUser());
|
|
|
|
// i.setCreateUserName(userR.getData().getName());
|
|
|
|
// i.setCreateUserName(userR.getData().getName());
|
|
|
@ -157,6 +188,7 @@ public class BasicdataClientController extends BladeController { |
|
|
|
List<BasicdataClientEntity> pages = basicdataClientService.listName(name); |
|
|
|
List<BasicdataClientEntity> pages = basicdataClientService.listName(name); |
|
|
|
return R.data(pages); |
|
|
|
return R.data(pages); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 基础客户表查询 |
|
|
|
* 基础客户表查询 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|