Commit 5ce44b40 by zhengxj

finish 订单列表 on 20191025 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@24430 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent ed28ce7f
...@@ -67,7 +67,7 @@ public class AMapUtils { ...@@ -67,7 +67,7 @@ public class AMapUtils {
return map; return map;
} }
public static Double getDistanceMeter(GlobalCoordinates gpsFrom, GlobalCoordinates gpsTo) { public static double getDistanceMeter(GlobalCoordinates gpsFrom, GlobalCoordinates gpsTo) {
// 创建GeodeticCalculator,调用计算方法,传入坐标系、经纬度用于计算距离 // 创建GeodeticCalculator,调用计算方法,传入坐标系、经纬度用于计算距离
GeodeticCurve geoCurve = new GeodeticCalculator().calculateGeodeticCurve(Ellipsoid.Sphere, gpsFrom, gpsTo); GeodeticCurve geoCurve = new GeodeticCalculator().calculateGeodeticCurve(Ellipsoid.Sphere, gpsFrom, gpsTo);
......
...@@ -3296,6 +3296,15 @@ public class OrderServiceImpl implements IOrderService { ...@@ -3296,6 +3296,15 @@ public class OrderServiceImpl implements IOrderService {
oueryOrderReq.setUserType(userType); oueryOrderReq.setUserType(userType);
// 订单结束日 // 订单结束日
if (com.glsx.common.utils.StringUtils.isNotEmpty(oueryOrderReq.getDateStart())) {
Date startDate = DateUtil.parseDateYmd(oueryOrderReq.getDateStart());
startDate.setHours(0);
startDate.setMinutes(0);
startDate.setSeconds(0);
oueryOrderReq.setDateEnd(DateUtil.formatDate(startDate));
}
// 订单结束日
if (com.glsx.common.utils.StringUtils.isNotEmpty(oueryOrderReq.getDateEnd())) { if (com.glsx.common.utils.StringUtils.isNotEmpty(oueryOrderReq.getDateEnd())) {
Date endDate = DateUtil.parseDateYmd(oueryOrderReq.getDateEnd()); Date endDate = DateUtil.parseDateYmd(oueryOrderReq.getDateEnd());
endDate.setHours(23); endDate.setHours(23);
...@@ -3305,6 +3314,15 @@ public class OrderServiceImpl implements IOrderService { ...@@ -3305,6 +3314,15 @@ public class OrderServiceImpl implements IOrderService {
} }
// 预约安装时间结束日 // 预约安装时间结束日
if (com.glsx.common.utils.StringUtils.isNotEmpty(oueryOrderReq.getReserveInstallTimeStart())) {
Date startDate = DateUtil.parseDateYmd(oueryOrderReq.getReserveInstallTimeStart());
startDate.setHours(0);
startDate.setMinutes(0);
startDate.setSeconds(0);
oueryOrderReq.setReserveInstallTimeEnd(DateUtil.formatDate(startDate));
}
// 预约安装时间结束日
if (com.glsx.common.utils.StringUtils.isNotEmpty(oueryOrderReq.getReserveInstallTimeEnd())) { if (com.glsx.common.utils.StringUtils.isNotEmpty(oueryOrderReq.getReserveInstallTimeEnd())) {
Date endDate = DateUtil.parseDateYmd(oueryOrderReq.getReserveInstallTimeEnd()); Date endDate = DateUtil.parseDateYmd(oueryOrderReq.getReserveInstallTimeEnd());
endDate.setHours(23); endDate.setHours(23);
...@@ -3703,7 +3721,7 @@ public class OrderServiceImpl implements IOrderService { ...@@ -3703,7 +3721,7 @@ public class OrderServiceImpl implements IOrderService {
} }
} }
// 距离 // 距离
mechanicBusiness.setDistance(AMapUtils.getDistanceMeter(source, target).intValue()); mechanicBusiness.setDistance((int) AMapUtils.getDistanceMeter(source, target));
} }
// orderBy:c按单量排序降序,d按距离升序排序(默认),t按时效升序排序 // orderBy:c按单量排序降序,d按距离升序排序(默认),t按时效升序排序
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!