bug修复;

This commit is contained in:
王奎兴
2025-12-13 20:48:24 +08:00
parent 74e735353f
commit 97330de8ba
15 changed files with 131 additions and 1 deletions
@@ -2042,6 +2042,7 @@ public class UserApplicationService {
VehiclePo vehiclePo = new VehiclePo();
sysUser.setUserid(userPo.getUserId());
sysUser.setUsername(userPo.getUserAccount());
sysUser.setRealname(userPo.getUserName());
UserDriverPo userDriverPo = userDriverDomainService.selectByUserId(userPo.getUserId());
if (ObjectUtil.isNull(userDriverPo)) {
userDriverPo = new UserDriverPo();
@@ -2052,6 +2052,42 @@ public class UserDriverApplicationService {
return mapList;
}
public List<Map<String, String>> userPersonalDriverAuthList() {
//获取当前登录人
LoginUser loginUser = SecurityUtils.getLoginUser();
if (ObjectUtil.isNull(loginUser)) {
throw new DigitalLogisticsException(UserError.TIMEOUT);
}
UserDriverDO userDriverDO = new UserDriverDO();
//20240227 修改为查询用户关联的司机数据,包括车队长、承运企业
List<UserDriverPo> userDriverPos = userDriverDomainService.userPersonalDriverAuthList(userDriverDO);
List<Map<String, String>> mapList = new ArrayList<>();
if (CollUtil.isNotEmpty(userDriverPos)) {
for (UserDriverPo u : userDriverPos) {
Map<String, String> map = new HashMap<>();
map.put("userId", u.getUserId().toString());
StringBuilder str = new StringBuilder();
str.append(u.getUserName());
if (StrUtil.isNotEmpty(u.getUserPhone())) {
str.append(", ").append(u.getUserPhone());
}
if (StrUtil.isNotEmpty(u.getDriverEnterpriseName())) {
str.append("").append(u.getDriverEnterpriseName()).append("");
}
map.put("label", String.valueOf(str));
mapList.add(map);
}
}
return mapList;
}
/**
* 车队认证-车队长查询
*/