fix
This commit is contained in:
@@ -391,7 +391,8 @@
|
||||
</select>
|
||||
<select id="selectInvestmentByList" resultType="com.cool.store.entity.ShopInfoDO">
|
||||
select line_id as LineId,
|
||||
investment_manager as InvestmentManager
|
||||
investment_manager as investmentManager,
|
||||
development_manager as developmentManager
|
||||
from xfsg_shop_info
|
||||
where line_id in
|
||||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
||||
|
||||
@@ -102,16 +102,30 @@ public class LineServiceImpl implements LineService {
|
||||
}
|
||||
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectInvestmentByLines(Collections.singletonList(lineInfo.getId()));
|
||||
Set<String> userIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||
Set<String> developmentMserIds = shopInfoDOS.stream().map(ShopInfoDO::getDevelopmentManager).collect(Collectors.toSet());
|
||||
userIds.add(lineInfo.getInvestmentManager());
|
||||
Set<String> userIds = new HashSet<>();
|
||||
//门店的招生和选址人远
|
||||
Set<String> shopInvestmentMserIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
|
||||
Set<String> developmentMserIds = shopInfoDOS.stream().map(ShopInfoDO::getDevelopmentManager).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
|
||||
//把线索的招商,选址专员放一起
|
||||
shopInvestmentMserIds.add(lineInfo.getInvestmentManager());
|
||||
if (StringUtils.isNotBlank(lineInfo.getDevelopmentManager())){
|
||||
developmentMserIds.add(lineInfo.getDevelopmentManager());
|
||||
}
|
||||
userIds.addAll(shopInvestmentMserIds);
|
||||
userIds.addAll(developmentMserIds);
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||
StringBuilder investmentManagerName = new StringBuilder();
|
||||
for (String userId : userIds) {
|
||||
investmentManagerName.append(userNameMap.get(userId)).append(",");
|
||||
for (String userId : shopInvestmentMserIds) {
|
||||
if (StringUtils.isBlank(userId)){
|
||||
continue;
|
||||
}
|
||||
if (investmentManagerName.length() == 0) {
|
||||
investmentManagerName.append(userNameMap.get(userId));
|
||||
} else {
|
||||
investmentManagerName.append(",").append(userNameMap.get(userId));
|
||||
}
|
||||
}
|
||||
result.setInvestmentManagerName(investmentManagerName.substring(0, investmentManagerName.length() - 1));
|
||||
result.setInvestmentManagerName(investmentManagerName.toString());
|
||||
// if (StringUtil.isNotEmpty(lineInfo.getInvestmentManager())){
|
||||
// EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(lineInfo.getInvestmentManager());
|
||||
// result.setInvestmentManagerName(user.getName());
|
||||
@@ -144,9 +158,16 @@ public class LineServiceImpl implements LineService {
|
||||
BeanUtil.copyProperties(lineInfo, result);
|
||||
StringBuilder developmentManagerName = new StringBuilder();
|
||||
for (String userId : developmentMserIds) {
|
||||
developmentManagerName.append(userNameMap.get(userId)).append(",");
|
||||
if (StringUtils.isBlank(userId)){
|
||||
continue;
|
||||
}
|
||||
if (developmentManagerName.length() == 0) {
|
||||
developmentManagerName.append(userNameMap.get(userId));
|
||||
} else {
|
||||
developmentManagerName.append(",").append(userNameMap.get(userId));
|
||||
}
|
||||
}
|
||||
result.setDevelopmentManager(investmentManagerName.substring(0, investmentManagerName.length() - 1));
|
||||
result.setDevelopmentManager(developmentManagerName.toString());
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -305,9 +326,9 @@ public class LineServiceImpl implements LineService {
|
||||
Set<String> userIdSet = investmentManagerIdMapByLineId.getOrDefault(x.getId(), new HashSet<>());
|
||||
userIdSet.add(x.getInvestmentManager());
|
||||
for (String s : userIdSet) {
|
||||
if (investmentManagerUserName.length() ==0) {
|
||||
if (investmentManagerUserName.length() == 0) {
|
||||
investmentManagerUserName.append(userNameMap.get(s));
|
||||
}else{
|
||||
} else {
|
||||
investmentManagerUserName.append(",").append(userNameMap.get(s));
|
||||
}
|
||||
}
|
||||
@@ -317,12 +338,12 @@ public class LineServiceImpl implements LineService {
|
||||
developmentManagerIdsSet.add(x.getDevelopmentManager());
|
||||
}
|
||||
for (String s : developmentManagerIdsSet) {
|
||||
if(StringUtils.isBlank(s)){
|
||||
if (StringUtils.isBlank(s)) {
|
||||
continue;
|
||||
}
|
||||
if (developmentManagerUserName.length() ==0) {
|
||||
if (developmentManagerUserName.length() == 0) {
|
||||
developmentManagerUserName.append(userNameMap.get(s));
|
||||
}else{
|
||||
} else {
|
||||
developmentManagerUserName.append(",").append(userNameMap.get(s));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user