Commit e9fb4e82 by wangli

修改

1 parent 2488d21e
......@@ -3,6 +3,7 @@ package com.dituhui.pea.order.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.dituhui.pea.common.BusinessException;
import com.dituhui.pea.common.Result;
import com.dituhui.pea.order.common.ListUtils;
import com.dituhui.pea.order.common.TimeUtils;
import com.dituhui.pea.order.dao.*;
import com.dituhui.pea.order.dto.*;
......@@ -127,11 +128,17 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
Comparator<OrderInfo> dtDesc = Comparator.comparing(OrderInfo::getDt).reversed();
List<OrderInfo> results = orders.stream().sorted(dtDesc).collect(Collectors.toList());
LocalDate lastDt = results.get(0).getDt();
LocalDate lastDt = results.get(0).getDt(); //最新预约
List<OrderAppointmentListResp.OrderAppointment> items = new ArrayList<>();
for (OrderInfo o : results) {
EngineerInfo eg = egInfo.getOrDefault(o.getEngineerCode(), null);
if(eg == null) {
log.warn("未获得工程师{}基础信息, 订单:{}", o.getEngineerCode(), o.getOrderId());
}
String skill = egSkill.getOrDefault(o.getEngineerCode(), null);
if(skill == null) {
log.warn("未获得工程师{}基础技能, 订单:{}", o.getEngineerCode(), o.getOrderId());
}
// 获取工程师姓名
String engineerName = (eg != null) ? eg.getName() : o.getEngineerCode();
......@@ -365,7 +372,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
private List<KV> packOrderTimeline(List<OrderTimeline> timelines) {
List<KV> items = new ArrayList<>();
if (timelines == null) {
if(ListUtils.isEmpty(timelines)){
return items;
}
for (OrderTimeline o : timelines) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!