Commit 442383dc by wangli

修改

1 parent 31198fbb
...@@ -114,8 +114,8 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -114,8 +114,8 @@ public class DispatchServiceImpl implements DispatchService {
lqw.in(levelType.equals("branch"), OrderRequest::getOrgBranchId, levelIds); lqw.in(levelType.equals("branch"), OrderRequest::getOrgBranchId, levelIds);
lqw.in(levelType.equals("group"), OrderRequest::getOrgGroupId, levelIds); lqw.in(levelType.equals("group"), OrderRequest::getOrgGroupId, levelIds);
lqw.eq(OrderRequest::getStatus, "open"); lqw.eq(OrderRequest::getStatus, "open");
lqw.ge(OrderRequest::getExpectTimeBegin, this.DateString2Timestamp(date, "00:00:00")); lqw.ge(OrderRequest::getExpectTimeBegin, this.getTimestampFromDate(date, "00:00:00"));
lqw.le(OrderRequest::getExpectTimeBegin, this.DateString2Timestamp(date, "23:59:59")); lqw.le(OrderRequest::getExpectTimeBegin, this.getTimestampFromDate(date, "23:59:59"));
List<String> statuses = List.of("", "未派单", "未派工"); // TODO List<String> statuses = List.of("", "未派单", "未派工"); // TODO
lqw.in(OrderRequest::getAppointmentStatus, statuses); lqw.in(OrderRequest::getAppointmentStatus, statuses);
...@@ -164,15 +164,8 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -164,15 +164,8 @@ public class DispatchServiceImpl implements DispatchService {
return map; return map;
} }
private long DateString2Timestamp(String date, String time) { public Timestamp getTimestampFromDate(String date, String time){
String datetime = String.format("%s %s", date, time); return Timestamp.valueOf(date + " " + time);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
return dateFormat.parse(datetime).getTime();
} catch (Exception e) {
e.printStackTrace();
}
return 0;
} }
private String timestamp2Datetime(Timestamp t, String pattern) { private String timestamp2Datetime(Timestamp t, String pattern) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!