Commit 377d141b by wangli

接口变更

1 parent 7fe87d53
...@@ -11,8 +11,8 @@ public class ScheduleEngineerOverviewResp { ...@@ -11,8 +11,8 @@ public class ScheduleEngineerOverviewResp {
private String startTime; private String startTime;
private String endTime; private String endTime;
private List<Dynamic> dynamics; private List<Dynamic> dynamics;
private List<Timeline> timelines; private List<TimeLineDTO> orders;
private List<Order> orders; private List<Order> orderDetails;
@Data @Data
public static class Dynamic { public static class Dynamic {
...@@ -21,13 +21,6 @@ public class ScheduleEngineerOverviewResp { ...@@ -21,13 +21,6 @@ public class ScheduleEngineerOverviewResp {
} }
@Data @Data
public static class Timeline {
private String startTime;
private String endTime;
private String type;
}
@Data
public static class Order { public static class Order {
private String orderId; private String orderId;
private String location; private String location;
......
...@@ -7,8 +7,10 @@ import com.dituhui.pea.common.BusinessException; ...@@ -7,8 +7,10 @@ import com.dituhui.pea.common.BusinessException;
import com.dituhui.pea.common.Result; import com.dituhui.pea.common.Result;
import com.dituhui.pea.order.common.TimeUtils; import com.dituhui.pea.order.common.TimeUtils;
import com.dituhui.pea.order.dao.*; import com.dituhui.pea.order.dao.*;
import com.dituhui.pea.order.dto.LabelValueDTO;
import com.dituhui.pea.order.dto.ScheduleEngineerOverviewResp; import com.dituhui.pea.order.dto.ScheduleEngineerOverviewResp;
import com.dituhui.pea.order.dto.ScheduleOverviewResp; import com.dituhui.pea.order.dto.ScheduleOverviewResp;
import com.dituhui.pea.order.dto.TimeLineDTO;
import com.dituhui.pea.order.entity.*; import com.dituhui.pea.order.entity.*;
import com.dituhui.pea.order.service.ScheduleService; import com.dituhui.pea.order.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -125,19 +127,22 @@ public class ScheduleServiceImpl implements ScheduleService { ...@@ -125,19 +127,22 @@ public class ScheduleServiceImpl implements ScheduleService {
@Override @Override
public Result<?> getScheduleEngineerOverview(String date, String engineerCode) throws BusinessException { public Result<?> getScheduleEngineerOverview(String date, String engineerCode) throws BusinessException {
EngineerInfo engineer = this.queryEngineerInfo(engineerCode); EngineerInfo engineer = engineerInfoMPDao.getByEngineerCode(engineerCode);
if (engineer == null) { if (engineer == null) {
throw new BusinessException("分销员不存在"); throw new BusinessException("分销员不存在");
} }
List<LabelValueDTO> emptyTips = new ArrayList<>();
List<OrderAppointment> orderAppointments = this.queryOrderAppointmentsByEngineerCode(engineerCode, date); List<OrderAppointment> orderAppointments = this.queryOrderAppointmentsByEngineerCode(engineerCode, date);
List<TimeLineDTO> timelines = new ArrayList<>();
List<ScheduleEngineerOverviewResp.Timeline> timelines = new ArrayList<>();
for (OrderAppointment o : orderAppointments) { for (OrderAppointment o : orderAppointments) {
ScheduleEngineerOverviewResp.Timeline item = new ScheduleEngineerOverviewResp.Timeline(); TimeLineDTO item = new TimeLineDTO();
item.setStartTime(TimeUtils.timestamp2DateTime(o.getExpectStartTime(), "hh:mm")); item.setOrderId(o.getOrderId());
item.setEndTime(TimeUtils.timestamp2DateTime(o.getExpectEndTime(), "hh:mm")); item.setPreStatus(o.getPreStatus());
item.setType(o.getStatus()); item.setAppointmentStatus(o.getStatus());
item.setStartTime(TimeUtils.IsoTimestamp2DateTime(o.getExpectStartTime()));
item.setEndTime(TimeUtils.IsoTimestamp2DateTime(o.getExpectEndTime()));
item.setTips(emptyTips);
timelines.add(item); timelines.add(item);
} }
...@@ -192,8 +197,8 @@ public class ScheduleServiceImpl implements ScheduleService { ...@@ -192,8 +197,8 @@ public class ScheduleServiceImpl implements ScheduleService {
res.setStartTime("08:00"); // TODO res.setStartTime("08:00"); // TODO
res.setEndTime("18:00"); res.setEndTime("18:00");
res.setDynamics(dynamics); res.setDynamics(dynamics);
res.setTimelines(timelines); res.setOrders(timelines);
res.setOrders(orders); res.setOrderDetails(orders);
return Result.success(res); return Result.success(res);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!