Merge #65 into master from cc_20260317_fix
feat:建店信息 副总裁 * cc_20260317_fix: (3 commits squashed) - feat:建店信息 - feat:建店信息 - feat:建店信息 副总裁 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/65
This commit is contained in:
@@ -86,6 +86,8 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
private ShopAuditInfoDAO shopAuditInfoDAO;
|
private ShopAuditInfoDAO shopAuditInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private OperationLogDAO operationLogDAO;
|
private OperationLogDAO operationLogDAO;
|
||||||
|
@Autowired
|
||||||
|
private RegionDao regionDao;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -269,16 +271,18 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(response.getXgjVicePresident())) {
|
if (StringUtils.isBlank(response.getXgjVicePresident())) {
|
||||||
List<EnterpriseUserDO> userList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.VICE_PRESIDENT_IN_CHARGE, shopInfo.getRegionId());
|
RegionDO region = regionDao.getRegionById(shopInfo.getRegionId());
|
||||||
if (CollectionUtils.isNotEmpty(userList)) {
|
if (!Objects.isNull(region)){
|
||||||
List<EnumInfoDO> xgjVicePresidentList = enumInfoService.getByTypeCode(ZxjpEnum.XGJ_VICE_PRESIDENT.getCode());
|
String parentId = region.getParentId();
|
||||||
List<String> userNameSet = userList.stream().map(EnterpriseUserDO::getName).collect(Collectors.toList());
|
RegionDO parentRegion = regionDao.getRegionById(Long.valueOf(parentId));
|
||||||
List<String> xgjVicePresidentNameList = xgjVicePresidentList.stream().map(EnumInfoDO::getSysValue).collect(Collectors.toList());
|
if (!Objects.isNull(parentRegion)){
|
||||||
List<String> resultUserNameList = userNameSet.stream()
|
String name = parentRegion.getName();
|
||||||
.filter(xgjVicePresidentNameList::contains)
|
if (name != null && name.contains("_")) {
|
||||||
.collect(Collectors.toList());
|
String president = name.substring(name.indexOf("_") + 1);
|
||||||
if (CollectionUtils.isNotEmpty(resultUserNameList)){
|
response.setXgjVicePresident(president);
|
||||||
response.setXgjVicePresident(resultUserNameList.get(0));
|
} else {
|
||||||
|
response.setXgjVicePresident(name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user