Commit 282117f6 by 丁伟峰

Merge remote-tracking branch 'origin/develop' into develop

2 parents 22352b7a 9ed7205b
......@@ -43,6 +43,10 @@ public class TimeUtils {
return LocalDate.parse(s, DateTimeFormatter.ofPattern(pattern));
}
public static final String IsoLocalDate2String(LocalDate localDate) {
return localDate.format(DateTimeFormatter.ofPattern(DATE_GAP_FORMAT));
}
public static final LocalDate addDays(LocalDate date, long days) {
return date.plusDays(days);
}
......
package com.dituhui.pea.order.dto;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
......@@ -13,5 +15,17 @@ public class OrderServiceDetailResp {
private String risk;
private String riskDesc;
private String location;
private OrderDetail reschedulingParams;
private List<KV> items;
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class OrderDetail{
private String location;
private String address;
private String brand;
private String date;
private String type;
private String skill;
}
}
......@@ -51,6 +51,15 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
List<KV> items = this.packOrderDetail(order);
// 设置订单详情信息
OrderServiceDetailResp.OrderDetail detail = new OrderServiceDetailResp.OrderDetail();
detail.setAddress(String.format("%s%s%s", order.getCity(), order.getCounty(), order.getAddress()));
detail.setLocation(String.format("%s,%s", order.getX(),order.getY()));
detail.setDate(TimeUtils.IsoLocalDate2String(order.getDt()));
detail.setBrand(order.getBrand());
detail.setType(order.getType());
detail.setSkill(order.getSkill());
OrderServiceDetailResp res = new OrderServiceDetailResp();
res.setOrderId(orderId);
res.setRisk("");
......@@ -59,6 +68,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
res.setStatus(order.getStatus());
res.setAppointmentStatus(order.getAppointmentStatus());
res.setLocation(String.format("%s,%s", order.getX(), order.getY()));
res.setReschedulingParams(detail);
res.setItems(items);
return Result.success(res);
......@@ -92,7 +102,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
if (appoints.isEmpty()) {
// 没有指派单列表,返回
res.setOrderId(orderId);
res.setOrders(List.of());
res.setOrders(new ArrayList<>());
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!