|
@@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -633,6 +634,35 @@ public class OrderServiceImpl extends ServiceImpl<OrderBaseMapper, OrderBase> im
|
|
|
orderBase.setStreet("");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ // getLocationByAddress
|
|
|
+ if (StringUtils.isEmpty(orderBase.getLng()) || StringUtils.isEmpty(orderBase.getLat())){
|
|
|
+ String add = "";
|
|
|
+ if (StringUtils.isNotEmpty(orderBase.getProvince())){
|
|
|
+ add = add + orderBase.getProvince();
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(orderBase.getCity())){
|
|
|
+ add = add + orderBase.getCity();
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(orderBase.getArea())){
|
|
|
+ add = add + orderBase.getArea();
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(orderBase.getStreet())){
|
|
|
+ add = add + orderBase.getStreet();
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(add)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String lngLat = publicService.getLocationByAddress(add);
|
|
|
+ if (StringUtils.isEmpty(lngLat)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<String> result = Arrays.asList(lngLat.split(","));
|
|
|
+
|
|
|
+ orderBase.setLng(result.get(0));
|
|
|
+ orderBase.setLat(result.get(1));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 平台工单地理位置转成商户工单地理位置
|