xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsRoleController.java
@@ -10,6 +10,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; @@ -22,8 +23,7 @@ * @author mitao * @since 2026-02-03 */ @Controller @RequestMapping("") @RestController public class XpOperationsRoleController { xp-robotaxi-api/src/main/java/com/xiaopeng/api/vo/account/XpOperationsUserProfileVO.java
@@ -1,5 +1,6 @@ package com.xiaopeng.api.vo.account; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -12,6 +13,7 @@ * @author mitao * @date 2026-02-14 */ @ApiModel(value = "运维人员个人中心首页VO") @Data public class XpOperationsUserProfileVO implements Serializable { private static final long serialVersionUID = 1L; xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/constant/I18nKeyConstant.java
@@ -9,7 +9,4 @@ String TASK_NOT_EXIST = "task.not.exist"; String VEHICLE_NOT_EXIST = "vehicle.not.exist"; String TASK_RULE_NOT_CONFIG = "task.rule.not.config"; } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpTaskServiceImpl.java
@@ -1,6 +1,7 @@ package com.xiaopeng.maintenance.service.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -176,13 +177,16 @@ XpTaskRule taskRule = xpTaskRuleService.lambdaQuery().last("limit 1").one(); XpTaskRuleRole taskRuleRole = xpTaskRuleRoleService.lambdaQuery().eq(XpTaskRuleRole::getRuleType, 9).last("limit 1").one(); if (Objects.isNull(taskRuleRole) || Objects.isNull(taskRule)) { throw new ServiceException("未配置车辆事故任务分配规则", I18nKeyConstant.TASK_RULE_NOT_CONFIG); throw new ServiceException("未配置车辆事故任务分配规则"); } R<List<XpOperationsRole>> xpOperationsRoleResult = xpOperationUserClient.getXpOperationsRoleByRoleId(taskRuleRole.getRoleId()); if (CollUtil.isNotEmpty(xpOperationsRoleResult.getData())) { List<Long> userIds = xpOperationsRoleResult.getData().stream().map(XpOperationsRole::getOperationsUserId).collect(Collectors.toList()); xpTask.setHandleUserId(StringUtils.join(userIds, ",")); } //查询事故处理限时配置 LocalDateTime endTime = LocalDateTime.now().plusMinutes(taskRule.getProcessingTimeLimit()); xpTask.setEndTime(endTime); this.save(xpTask); //发送消息通知 @@ -232,7 +236,7 @@ .body(JSONObject.toJSONString(param)) .account(account).title("车辆事故警示") .pushType(AliPushTypeConstant.NOTICE) .deviceType(data.get(0).getDeviceType()) .deviceType(data.get(0).getDeviceType()) .build()); } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/vo/TaskRuleDetailVO.java
@@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; import com.xiaopeng.api.model.maintenance.XpTaskRuleRole; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -10,6 +11,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.List; @Data @@ -23,7 +25,8 @@ @ApiModelProperty(value = "车辆日常监测 频次") private Integer vehicleInspectionFrequency; @ApiModelProperty(value = "车辆日常检测 任务下放时间") private LocalDateTime vehicleInspectionTime; @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8") private LocalTime vehicleInspectionTime; @ApiModelProperty(value = "车辆日常监测 紧急程度 0=P0 1=P1 2=P2 3=P3") private Integer vehicleInspectionLevel; @@ -32,7 +35,8 @@ private Boolean vehicleCollection; @ApiModelProperty(value = "车辆收车每日时间") private LocalDateTime vehicleCollectionTime; @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8") private LocalTime vehicleCollectionTime; @ApiModelProperty(value = "车辆保养周期是否启用") private Boolean maintenanceCycle; @@ -44,7 +48,8 @@ private Integer maintenanceCycleTimeType; @ApiModelProperty(value = "车辆保养周期 任务下放时间") private LocalDateTime maintenanceCycleTaskTime; @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8") private LocalTime maintenanceCycleTaskTime; @ApiModelProperty(value = "车辆保养周期 紧急程度 0=P0 1=P1 2=P2 3=P3") private Integer maintenanceCycleLevel; @@ -59,7 +64,11 @@ private Integer chargingStrategyLevel; @ApiModelProperty(value = "车身清洁保养周期X") private Integer vehicleCleanTime; private Integer vehicleCleanCycle; @ApiModelProperty(value = "车身清洁保养任务下放时间") @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8") private LocalTime vehicleCleanTime; @ApiModelProperty(value = "车身清洁保养周期X 1=天 2=月") private Integer vehicleCleanTimeType; @@ -68,7 +77,11 @@ private Integer vehicleCleanLevel; @ApiModelProperty(value = "日常整备保养周期X") private Integer routineMaintenanceTime; private Integer routineMaintenanceCycle; @ApiModelProperty(value = "日常整备保养任务下放时间") @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8") private LocalTime routineMaintenanceTime; @ApiModelProperty(value = "日常整备保养周期X 1=天 2=月") private Integer routineMaintenanceTimeType; xp-robotaxi-maintenance-boot/src/main/resources/i18n/messages.properties
@@ -1,5 +1,4 @@ # 中文 welcome.message=欢迎来到我们的应用程序! task.not.exist=任务不存在 vehicle.not.exist=车辆不存在 task.rule.not.config=未配置车辆事故任务分配规则 vehicle.not.exist=车辆不存在 xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderEvaluateServiceImpl.java
@@ -16,6 +16,7 @@ import com.xiaopeng.api.model.order.XpOrder; import com.xiaopeng.api.model.order.XpOrderEvaluate; import com.xiaopeng.api.vo.account.GetUserListByUidsVo; import com.xiaopeng.common.core.constant.HttpStatus; import com.xiaopeng.common.core.domain.R; import com.xiaopeng.common.core.utils.StringUtils; import com.xiaopeng.common.core.web.page.PageInfo; @@ -109,13 +110,13 @@ } // 4. 批量查询关联数据 Map<Long, XpAppUser> userMap = batchGetUsers(userIds); JSONObject jsonObject = batchGetUsers(userIds); Map<Long, XpVehicle> vehicleMap = batchGetVehicles(vehicleIds); Map<Long, XpOrder> orderMap = batchGetOrders(orderIds); // 5. 根据查询条件过滤(手机号、车牌号) List<OrderEvaluatePageVO> voList = evaluatePage.getRecords().stream() .map(evaluate -> convertToPageVO(evaluate, userMap, vehicleMap, orderMap)) .map(evaluate -> convertToPageVO(evaluate, jsonObject, vehicleMap, orderMap)) .filter(vo -> filterByQuery(vo, query)) .collect(Collectors.toList()); @@ -161,20 +162,22 @@ /** * 批量获取用户信息 */ private Map<Long, XpAppUser> batchGetUsers(Set<Long> userIds) { private JSONObject batchGetUsers(Set<Long> userIds) { if (CollectionUtils.isEmpty(userIds)) { return new HashMap<>(); return new JSONObject(); } try { R<List<XpAppUser>> result = xpAppUserClient.listByIds(new ArrayList<>(userIds)); if (Objects.nonNull(result) && Objects.nonNull(result.getData())) { return result.getData().stream() .collect(Collectors.toMap(XpAppUser::getId, Function.identity(), (a, b) -> a)); GetUserListByUidsVo getUserListByUidsVo = new GetUserListByUidsVo(); getUserListByUidsVo.setUids(new ArrayList<>(userIds)); getUserListByUidsVo.setGetPreCarOwner(Boolean.TRUE); UserResourcesDto userListByUids = userResourcesClient.getUserListByUids(getUserListByUidsVo); if (userListByUids.getCode().equals(HttpStatus.SUCCESS)) { return JSONObject.parseObject(userListByUids.getData().toString()); } } catch (Exception e) { log.error("批量获取用户信息失败: {}", e.getMessage()); } return new HashMap<>(); return new JSONObject(); } /** @@ -212,7 +215,7 @@ * VO转换 */ private OrderEvaluatePageVO convertToPageVO(XpOrderEvaluate evaluate, Map<Long, XpAppUser> userMap, JSONObject jsonObject, Map<Long, XpVehicle> vehicleMap, Map<Long, XpOrder> orderMap) { OrderEvaluatePageVO vo = new OrderEvaluatePageVO(); @@ -224,10 +227,10 @@ vo.setEvaluateTime(evaluate.getEvaluateTime()); // 用户信息 if (Objects.nonNull(evaluate.getAppUserId()) && userMap.containsKey(evaluate.getAppUserId())) { XpAppUser user = userMap.get(evaluate.getAppUserId()); vo.setNickName(user.getNickName()); vo.setPhoneNumber(user.getPhoneNumber()); if (Objects.nonNull(evaluate.getAppUserId()) && jsonObject.containsKey(evaluate.getAppUserId().toString())) { JSONObject userInfo = jsonObject.getJSONObject(evaluate.getAppUserId().toString()); vo.setNickName(userInfo.getString("nickName")); vo.setPhoneNumber(userInfo.getString("mobile")); } // 车辆信息 xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages.properties
@@ -1,7 +1,7 @@ # 中文 fleet.operation.user.bound.v2=当前车队已和该人员关联 policy.application.audit.ids.notEmpty=保单申请ID列表不能为空 fleet.operation.user.bound.v1=运维人员[{0}]已绑定车队[{1}] fleet.operation.user.bound.v1= fleet.vehicle.bound.v2=当前车队已和该车辆关联 fleet.vehicle.bound.v1=车辆[{0}]已绑定车队[{1}] policy.application.audit.status.notNull=保单审核状态不能为空