Commit 2823b2ba by 刘鑫

fix(加单确认): 加单确认时, 客户意向时间也同时更改

1 parent cbfabeb2
......@@ -37,9 +37,11 @@ import org.locationtech.spatial4j.shape.Rectangle;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.MessageFormat;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
......@@ -186,6 +188,12 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
orderInfo.setPlanStartTime(planStartTime);
orderInfo.setPlanEndTime(planEndTime);
LocalDate date = planStartTime.toLocalDate();
LocalTime exceptStartHour = LocalTime.of(planStartTime.getHour(), 0);
orderInfo.setExpectTimeBegin(LocalDateTime.of(date, exceptStartHour));
LocalTime exceptEndHour = exceptStartHour.plusHours(2);
orderInfo.setExpectTimeEnd(LocalDateTime.of(date, exceptEndHour));
orderInfo.setApplyNote(MessageFormat.format("{0}-{1}", DateTimeUtil.formatTime(exceptStartHour), DateTimeUtil.formatTime(exceptEndHour)));
}
orderInfo.setReasonForFailure(request.getReasonForFailure());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!