fix: 修复订单详情接口

This commit is contained in:
wuchuanbang 2025-08-11 18:17:52 +08:00
parent bdcc6e91e3
commit d005f3a43c
2 changed files with 9 additions and 1 deletions

View File

@ -458,6 +458,7 @@ public class OrderBiz {
}
orderTaskDetailVO.setCargoWeight(orderDetail.getCargoWeight());
EmEmployees employees = emEmployeesMap.get(orderDetail.getOperatorId());
orderTaskDetailVO.setOperatorId(orderDetail.getOperatorId());
if (ObjectUtil.isNotNull(employees)) {
orderTaskDetailVO.setOperatorName(employees.getName());
}
@ -487,12 +488,14 @@ public class OrderBiz {
Map<Long, CpRoute> routeMap = cpRoutes.stream().collect(Collectors.toMap(CpRoute::getId, route -> route));
String[] routeIdArray = routeIds.split(StrUtil.COMMA);
StringBuilder routeNameBuilder = new StringBuilder();
List<Long> routeIdList = new ArrayList<>();
for (String routeIdStr : routeIdArray) {
CpRoute cpRoute = routeMap.get(Long.valueOf(routeIdStr));
String name = cpRoute.getName();
routeNameBuilder.append(name).append(StrUtil.COMMA);
orderAllDetailVO.setRouteIds(List.of(cpRoute.getId()));
routeIdList.add(cpRoute.getId());
}
orderAllDetailVO.setRouteIds(routeIdList);
// 去掉最后一个逗号
return routeNameBuilder.substring(0, routeNameBuilder.length() - 1);
}

View File

@ -37,6 +37,11 @@ public class OrderTaskDetailVO {
@ApiModelProperty(value = "载物重量")
private BigDecimal cargoWeight;
/**
* 操作员ID
*/
@ApiModelProperty(value = "操作员ID")
private Long operatorId;
/**
* 操作员
*/