Commit a5aad5f3 by wangli

文件重命名

1 parent 59499185
......@@ -3,7 +3,7 @@ package com.dituhui.pea.order.dto;
import lombok.Data;
@Data
public class EnginnerTimelineReq {
public class EngineerTimelineReq {
private String enginnerCode;
private String date;
}
......@@ -5,7 +5,7 @@ import lombok.Data;
import java.util.List;
@Data
public class EnginnerTimelineResp {
public class EngineerTimelineResp {
private String engineerCode;
private String engineerName;
......
......@@ -3,7 +3,7 @@ package com.dituhui.pea.order.service.impl;
import com.dituhui.pea.common.Result;
import com.dituhui.pea.order.common.TimeUtils;
import com.dituhui.pea.order.dao.*;
import com.dituhui.pea.order.dto.EnginnerTimelineResp;
import com.dituhui.pea.order.dto.EngineerTimelineResp;
import com.dituhui.pea.order.entity.*;
import com.dituhui.pea.order.service.EngineerTimelineService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -64,9 +64,9 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
String branchId = this.getEngineerBranchId(engineerCode);
String warehouseLocation = this.getWarehouseLocation(branchId);
List<EnginnerTimelineResp.DynamicItem> dynamics = this.packItems(timelines, orders, orderLocations, warehouseLocation);
List<EngineerTimelineResp.DynamicItem> dynamics = this.packItems(timelines, orders, orderLocations, warehouseLocation);
EnginnerTimelineResp res = new EnginnerTimelineResp();
EngineerTimelineResp res = new EngineerTimelineResp();
res.setEngineerCode(engineerCode);
res.setEngineerName(engineerInfo.getName());
res.setDynamics(dynamics);
......@@ -122,15 +122,15 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
}
private List<EnginnerTimelineResp.DynamicItem> packItems(List<OrderEvent> timelines, List<OrderAppointment> orders, HashMap<String, String> locations, String warehouseLocation) {
private List<EngineerTimelineResp.DynamicItem> packItems(List<OrderEvent> timelines, List<OrderAppointment> orders, HashMap<String, String> locations, String warehouseLocation) {
int index = 0;
String order_id, title, type, text, location;
List<EnginnerTimelineResp.DynamicItem> items = new ArrayList<>();
List<EngineerTimelineResp.DynamicItem> items = new ArrayList<>();
Set<String> s = new HashSet<>();
for (OrderEvent t: timelines){
EnginnerTimelineResp.DynamicItem item = new EnginnerTimelineResp.DynamicItem();
EngineerTimelineResp.DynamicItem item = new EngineerTimelineResp.DynamicItem();
if (t.getEvent().equals("分站取还配件")) {
title = t.getEvent();
......@@ -167,7 +167,7 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
continue;
}
index += 1;
EnginnerTimelineResp.DynamicItem item = new EnginnerTimelineResp.DynamicItem();
EngineerTimelineResp.DynamicItem item = new EngineerTimelineResp.DynamicItem();
item.setTitle(String.format("第%d单出发", index));
item.setTime(TimeUtils.IsoTimestamp2DateTime(o.getExpectStartTime()));
item.setStatus(0);
......@@ -177,6 +177,6 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
items.add(item);
}
// 根据items的time升序排序
return items.stream().sorted(Comparator.comparing(EnginnerTimelineResp.DynamicItem::getTime)).collect(Collectors.toList());
return items.stream().sorted(Comparator.comparing(EngineerTimelineResp.DynamicItem::getTime)).collect(Collectors.toList());
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!