Commit 7d88cabe by 王力

Merge branch 'feature_OrderServiceList_wangl' into 'develop'

完善接口返回字段

See merge request !12
2 parents a981e391 a55b9a5d
......@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.sql.Timestamp;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
......@@ -82,6 +83,12 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
record.setOrgBranchName(o.getOrgBranchName());
record.setEngineerNum(this.getEngNum(names)); //工程师数量
record.setEngineerNames(this.getEngNames(names)); //工程师姓名列表
record.setExpectTimeBegin(this.Timestamp2Datetime(o.getExpectTimeBegin()));
record.setExpectTimeEnd(this.Timestamp2Datetime(o.getExpectTimeEnd()));
record.setAppointmentTime(null);
record.setAppointmentStatus(o.getAppointmentStatus());
record.setAppointmentType(o.getAppointmentMethod());
record.setCreateTime(this.Timestamp2Datetime(o.getCreateTime()));
content.add(record);
}
......@@ -170,4 +177,9 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
public Timestamp getTimestampFromDate(String date){
return Timestamp.valueOf(date + " 00:00:00");
}
private String Timestamp2Datetime(Timestamp t) {
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-mm-dd HH:MM:SS");
return df.format(t.toLocalDateTime());
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!