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;
|
||||
@Resource
|
||||
private OperationLogDAO operationLogDAO;
|
||||
@Autowired
|
||||
private RegionDao regionDao;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -269,16 +271,18 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
||||
}
|
||||
}
|
||||
if (StringUtils.isBlank(response.getXgjVicePresident())) {
|
||||
List<EnterpriseUserDO> userList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.VICE_PRESIDENT_IN_CHARGE, shopInfo.getRegionId());
|
||||
if (CollectionUtils.isNotEmpty(userList)) {
|
||||
List<EnumInfoDO> xgjVicePresidentList = enumInfoService.getByTypeCode(ZxjpEnum.XGJ_VICE_PRESIDENT.getCode());
|
||||
List<String> userNameSet = userList.stream().map(EnterpriseUserDO::getName).collect(Collectors.toList());
|
||||
List<String> xgjVicePresidentNameList = xgjVicePresidentList.stream().map(EnumInfoDO::getSysValue).collect(Collectors.toList());
|
||||
List<String> resultUserNameList = userNameSet.stream()
|
||||
.filter(xgjVicePresidentNameList::contains)
|
||||
.collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(resultUserNameList)){
|
||||
response.setXgjVicePresident(resultUserNameList.get(0));
|
||||
RegionDO region = regionDao.getRegionById(shopInfo.getRegionId());
|
||||
if (!Objects.isNull(region)){
|
||||
String parentId = region.getParentId();
|
||||
RegionDO parentRegion = regionDao.getRegionById(Long.valueOf(parentId));
|
||||
if (!Objects.isNull(parentRegion)){
|
||||
String name = parentRegion.getName();
|
||||
if (name != null && name.contains("_")) {
|
||||
String president = name.substring(name.indexOf("_") + 1);
|
||||
response.setXgjVicePresident(president);
|
||||
} else {
|
||||
response.setXgjVicePresident(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user