stationList) {
- this.stationList.clear();
- this.stationList.addAll(stationList);
- for (int i = 0; i < stationList.size(); i++) {
- OchBusStation station = stationList.get(i);
- if (station.getIsCurrentSite() == OchBusConst.STATION_STATUS_ARRIVING || station.getIsCurrentSite() == OchBusConst.STATION_STATUS_STOPPED ) {
- currentStation = i;
- break;
- }
- }
- notifyDataSetChanged();
- }
-
- @NonNull
- @Override
- public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
- return new ViewHolder(LayoutInflater.from(context).inflate(R.layout.item_och_bus_station, parent, false));
- }
-
- @Override
- public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
-// Logger.d("OchBusStationAdapter", "position: " + position + " currPos: " + currentStation + " station: " + stationList.get(position));
- holder.tvStationName.setText(stationList.get(position).getSiteName());
- if (position == currentStation) {
- if (currentStation == 0) {
- // 在起始点
- holder.tvStationName.setTextColor(context.getResources().getColor(R.color.module_mogo_och_bus_arrived_station_name_text_color));
- holder.ivIcon.setImageResource(R.drawable.module_mogo_och_icon_arrived_station);
- holder.vDashBottom.setColor(context.getResources().getColor(R.color.module_mogo_och_bus_not_arrive_dash_color));
- } else {
- holder.tvStationName.setTextColor(context.getResources().getColor(R.color.module_mogo_och_bus_current_station_name_text_color));
- holder.ivIcon.setImageResource(R.drawable.module_mogo_och_icon_arriving_station);
- holder.vDashTop.setGradient(context.getResources().getColor(R.color.module_mogo_och_bus_arriving_start_dash_color), context.getResources().getColor(R.color.module_mogo_och_bus_arriving_end_dash_color));
- holder.vDashBottom.setColor(context.getResources().getColor(R.color.module_mogo_och_bus_not_arrive_dash_color));
- }
- } else if (position < currentStation) {
- // 驶过
- holder.tvStationName.setTextColor(context.getResources().getColor(R.color.module_mogo_och_bus_arrived_station_name_text_color));
- holder.ivIcon.setImageResource(R.drawable.module_mogo_och_icon_arrived_station);
- if (position == currentStation - 1) {
- holder.vDashBottom.setGradient(context.getResources().getColor(R.color.module_mogo_och_bus_leaving_start_dash_color), context.getResources().getColor(R.color.module_mogo_och_bus_leaving_end_dash_color));
- holder.vDashTop.setColor(context.getResources().getColor(R.color.module_mogo_och_bus_arrived_dash_color));
- } else {
- holder.vDashTop.setColor(context.getResources().getColor(R.color.module_mogo_och_bus_arrived_dash_color));
- holder.vDashBottom.setColor(context.getResources().getColor(R.color.module_mogo_och_bus_arrived_dash_color));
- }
- } else {
- holder.tvStationName.setTextColor(context.getResources().getColor(R.color.module_mogo_och_bus_not_arrive_station_name_text_color));
- holder.ivIcon.setImageResource(R.drawable.module_mogo_och_bus_icon_not_arrive_station);
- holder.vDashTop.setColor(context.getResources().getColor(R.color.module_mogo_och_bus_not_arrive_dash_color));
- holder.vDashBottom.setColor(context.getResources().getColor(R.color.module_mogo_och_bus_not_arrive_dash_color));
- }
-
- if (position == 0) {
- holder.tvStationNotice.setText("起点");
- holder.tvStationNotice.setVisibility(View.VISIBLE);
- holder.vDashTop.setVisibility(View.GONE);
- holder.vDashBottom.setVisibility(View.VISIBLE);
- } else if (position == getItemCount() - 1) {
- holder.tvStationNotice.setText("终点");
- holder.tvStationNotice.setVisibility(View.VISIBLE);
- holder.vDashTop.setVisibility(View.VISIBLE);
- holder.vDashBottom.setVisibility(View.GONE);
- } else {
- holder.tvStationNotice.setVisibility(View.GONE);
- holder.vDashTop.setVisibility(View.VISIBLE);
- holder.vDashBottom.setVisibility(View.VISIBLE);
-
- }
-
- }
-
- @Override
- public int getItemCount() {
- return stationList.size();
- }
-
- static class ViewHolder extends RecyclerView.ViewHolder {
- ImageView ivIcon;
- TextView tvStationName;
- TextView tvStationNotice;
- VerticalDashLineView vDashBottom, vDashTop;
-
- public ViewHolder(@NonNull View itemView) {
- super(itemView);
- ivIcon = itemView.findViewById(R.id.module_mogo_och_bus_station_icon);
- tvStationName = itemView.findViewById(R.id.module_mogo_och_bus_station_name);
- tvStationNotice = itemView.findViewById(R.id.module_mogo_och_bus_station_notice);
- vDashTop = itemView.findViewById(R.id.module_mogo_och_bus_station_top_dash);
- vDashBottom = itemView.findViewById(R.id.module_mogo_och_bus_station_bottom_dash);
- }
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusArriveAtStationMsg.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusArriveAtStationMsg.java
deleted file mode 100644
index af742321b0..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusArriveAtStationMsg.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import java.util.List;
-
-public
-/**
- * @author congtaowang
- * @since 2021/3/23
- *
- * 小巴达到站点,推送需要下车的乘客列表
- */
-class OchBusArriveAtStationMsg {
-
-
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusLeaveStationRequest.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusLeaveStationRequest.java
deleted file mode 100644
index d9e470ecf6..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusLeaveStationRequest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.mogo.och.bus.bean;
-
-/**
- * 公交驶离车站,同步服务端请求参数封装
- *
- * @author tongchenfei
- */
-public class OchBusLeaveStationRequest {
- private final String sn;
- private final int siteId;
-
- public OchBusLeaveStationRequest(String sn, int siteId) {
- this.sn = sn;
- this.siteId = siteId;
- }
-
- public String getSn() {
- return sn;
- }
-
- public int getSiteId() {
- return siteId;
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusOperationStatusRequest.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusOperationStatusRequest.java
deleted file mode 100644
index fd952f537e..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusOperationStatusRequest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
-import com.mogo.commons.network.Utils;
-import com.mogo.utils.network.utils.Util;
-
-public
-/**
- * @author congtaowang
- * @since 2021/3/22
- *
- * 小巴车运营状态请求参数
- */
-class OchBusOperationStatusRequest {
-
- public String sn;
- // 0 - 关闭、1 - 启动
- public String status;
-
- public OchBusOperationStatusRequest() {
- this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
- }
-
- public OchBusOperationStatusRequest shutdown() {
- status = "0";
- return this;
- }
-
- public OchBusOperationStatusRequest launch() {
- status = "1";
- return this;
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusOperationStatusResponse.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusOperationStatusResponse.java
deleted file mode 100644
index fa7ae2b59f..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusOperationStatusResponse.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import com.mogo.eagle.core.data.BaseData;
-
-public
-/**
- * @author congtaowang
- * @since 2021/3/22
- *
- * 小巴车运营状态请求参数
- */
-class OchBusOperationStatusResponse extends BaseData {
-
- public Result result;
-
- public static class Result {
- public String id;
- public String sn;
- public String areaCode;
- public String plateNumber;
- public int status;
-
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusOrder.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusOrder.java
deleted file mode 100644
index d1ba24ee9f..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusOrder.java
+++ /dev/null
@@ -1,227 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import java.util.List;
-
-public
-/**
- * @author congtaowang
- * @since 2021/3/23
- *
- * 小巴订单
- */
-class OchBusOrder {
-
- /**
- * _id : bf014b186a0d417e8086f324e5cbcd1d
- * orderNo : XB20210324000002
- * orderType : 10
- * userName : 星期一
- * userPhone : 15555555555
- * startStationId : 1
- * startStation : 万集东门站
- * startStationCoordinate : [116.7354579447,40.1974932972]
- * endStationId : 2
- * endStation : 顺密路口站
- * endStationCoordinate : [116.7215386924,40.194019209]
- * orderDispatchType : 1
- * carNum : 京NB007
- * sn : F803BB2037EZD00088
- * orderStartTime : Mar 24, 2021 12:51:51 PM
- * orderEndTime : Mar 24, 2021 1:38:13 PM
- * cityCode : 010
- * areaCode : 1001
- * createTime : Mar 24, 2021 12:51:51 PM
- * updateTime : Mar 24, 2021 1:38:13 PM
- * travelDistance : 1.2
- */
-
- private String _id;
- private String orderNo;
- private int orderType;
- private String userName;
- private String userPhone;
- private int startStationId;
- private String startStation;
- private int endStationId;
- private String endStation;
- private int orderDispatchType;
- private String carNum;
- private String sn;
- private String orderStartTime;
- private String orderEndTime;
- private String cityCode;
- private String areaCode;
- private String createTime;
- private String updateTime;
- private double travelDistance;
- private List< Double > startStationCoordinate;
- private List< Double > endStationCoordinate;
-
- public String get_id() {
- return _id;
- }
-
- public void set_id( String _id ) {
- this._id = _id;
- }
-
- public String getOrderNo() {
- return orderNo;
- }
-
- public void setOrderNo( String orderNo ) {
- this.orderNo = orderNo;
- }
-
- public int getOrderType() {
- return orderType;
- }
-
- public void setOrderType( int orderType ) {
- this.orderType = orderType;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName( String userName ) {
- this.userName = userName;
- }
-
- public String getUserPhone() {
- return userPhone;
- }
-
- public void setUserPhone( String userPhone ) {
- this.userPhone = userPhone;
- }
-
- public int getStartStationId() {
- return startStationId;
- }
-
- public void setStartStationId( int startStationId ) {
- this.startStationId = startStationId;
- }
-
- public String getStartStation() {
- return startStation;
- }
-
- public void setStartStation( String startStation ) {
- this.startStation = startStation;
- }
-
- public int getEndStationId() {
- return endStationId;
- }
-
- public void setEndStationId( int endStationId ) {
- this.endStationId = endStationId;
- }
-
- public String getEndStation() {
- return endStation;
- }
-
- public void setEndStation( String endStation ) {
- this.endStation = endStation;
- }
-
- public int getOrderDispatchType() {
- return orderDispatchType;
- }
-
- public void setOrderDispatchType( int orderDispatchType ) {
- this.orderDispatchType = orderDispatchType;
- }
-
- public String getCarNum() {
- return carNum;
- }
-
- public void setCarNum( String carNum ) {
- this.carNum = carNum;
- }
-
- public String getSn() {
- return sn;
- }
-
- public void setSn( String sn ) {
- this.sn = sn;
- }
-
- public String getOrderStartTime() {
- return orderStartTime;
- }
-
- public void setOrderStartTime( String orderStartTime ) {
- this.orderStartTime = orderStartTime;
- }
-
- public String getOrderEndTime() {
- return orderEndTime;
- }
-
- public void setOrderEndTime( String orderEndTime ) {
- this.orderEndTime = orderEndTime;
- }
-
- public String getCityCode() {
- return cityCode;
- }
-
- public void setCityCode( String cityCode ) {
- this.cityCode = cityCode;
- }
-
- public String getAreaCode() {
- return areaCode;
- }
-
- public void setAreaCode( String areaCode ) {
- this.areaCode = areaCode;
- }
-
- public String getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime( String createTime ) {
- this.createTime = createTime;
- }
-
- public String getUpdateTime() {
- return updateTime;
- }
-
- public void setUpdateTime( String updateTime ) {
- this.updateTime = updateTime;
- }
-
- public double getTravelDistance() {
- return travelDistance;
- }
-
- public void setTravelDistance( double travelDistance ) {
- this.travelDistance = travelDistance;
- }
-
- public List< Double > getStartStationCoordinate() {
- return startStationCoordinate;
- }
-
- public void setStartStationCoordinate( List< Double > startStationCoordinate ) {
- this.startStationCoordinate = startStationCoordinate;
- }
-
- public List< Double > getEndStationCoordinate() {
- return endStationCoordinate;
- }
-
- public void setEndStationCoordinate( List< Double > endStationCoordinate ) {
- this.endStationCoordinate = endStationCoordinate;
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusResetRequest.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusResetRequest.java
deleted file mode 100644
index 7dc9da88d1..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusResetRequest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.mogo.och.bus.bean;
-
-/**
- * 重置车站状态请求参数
- *
- * @author tongchenfei
- */
-public class OchBusResetRequest {
- private String sn;
- private int siteId;
- double lat;
- double lon;
-
- public OchBusResetRequest(String sn, int siteId, double lat, double lon) {
- this.sn = sn;
- this.siteId = siteId;
- this.lat = lat;
- this.lon = lon;
- }
-
- public String getSn() {
- return sn;
- }
-
- public void setSn(String sn) {
- this.sn = sn;
- }
-
- public double getLat() {
- return lat;
- }
-
- public void setLat(double lat) {
- this.lat = lat;
- }
-
- public double getLon() {
- return lon;
- }
-
- public void setLon(double lon) {
- this.lon = lon;
- }
-
- public int getSiteId() {
- return siteId;
- }
-
- public void setSiteId(int siteId) {
- this.siteId = siteId;
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusRoutesRequest.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusRoutesRequest.java
deleted file mode 100644
index 5de543ba60..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusRoutesRequest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.mogo.och.bus.bean;
-
-/**
- * 网约车小巴路线请求参数封装
- *
- * @author tongchenfei
- */
-public class OchBusRoutesRequest {
- double lat;
- double lon;
- String sn;
-
- public OchBusRoutesRequest(String sn, double lat, double lon) {
- this.lat = lat;
- this.lon = lon;
- this.sn = sn;
- }
-
- public double getLat() {
- return lat;
- }
-
- public void setLat(double lat) {
- this.lat = lat;
- }
-
- public double getLon() {
- return lon;
- }
-
- public void setLon(double lon) {
- this.lon = lon;
- }
-
- public String getSn() {
- return sn;
- }
-
- public void setSn(String sn) {
- this.sn = sn;
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusRoutesResponse.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusRoutesResponse.java
deleted file mode 100644
index 5ba1f6fd06..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusRoutesResponse.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import com.mogo.eagle.core.data.BaseData;
-
-/**
- * 网约车小巴路线接口请求响应结果
- *
- * @author tongchenfei
- */
-public class OchBusRoutesResponse extends BaseData {
- private OchBusRoutesResult result;
-
- public OchBusRoutesResult getResult() {
- return result;
- }
-
- public void setResult(OchBusRoutesResult result) {
- this.result = result;
- }
-
- @Override
- public String toString() {
- return "OchBusRoutesResponse{" +
- "result=" + result +
- '}';
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusRoutesResult.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusRoutesResult.java
deleted file mode 100644
index d9042bcc16..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusRoutesResult.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import java.util.List;
-
-/**
- * 网约车小巴路线接口返回接口数据封装
- *
- * @author tongchenfei
- */
-public class OchBusRoutesResult {
- private List site;
-
- public List getSite() {
- return site;
- }
-
- public void setSite(List site) {
- this.site = site;
- }
-
- @Override
- public String toString() {
- return "OchBusRoutesResult{" +
- "site=" + site +
- '}';
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStation.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStation.java
deleted file mode 100644
index 2172ec94f0..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStation.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package com.mogo.och.bus.bean;
-
-/**
- * 单个网约车小巴车站信息
- *
- * @author tongchenfei
- */
-public class OchBusStation {
- private int lineId;
- private int siteId;
- private String siteName;
- private String cityCode;
- private String areaCode;
- private String areaName;
- private double lat;
- private double lon;
- private String siteDesc;
- private int siteState;
- private int isCurrentSite;// @see OchBusConst 是否是当前站 1:是 2:下一站 0:普通站
- private int siteColor;
- private String peoples;
- private int ifStop; // 是否需要停靠、1需要、0不需要
-
- public int getIfStop() {
- return ifStop;
- }
-
- public void setIfStop( int ifStop ) {
- this.ifStop = ifStop;
- }
-
- public int getLineId() {
- return lineId;
- }
-
- public void setLineId(int lineId) {
- this.lineId = lineId;
- }
-
- public int getSiteId() {
- return siteId;
- }
-
- public void setSiteId(int siteId) {
- this.siteId = siteId;
- }
-
- public String getSiteName() {
- return siteName;
- }
-
- public void setSiteName(String siteName) {
- this.siteName = siteName;
- }
-
- public String getCityCode() {
- return cityCode;
- }
-
- public void setCityCode(String cityCode) {
- this.cityCode = cityCode;
- }
-
- public String getAreaCode() {
- return areaCode;
- }
-
- public void setAreaCode(String areaCode) {
- this.areaCode = areaCode;
- }
-
- public String getAreaName() {
- return areaName;
- }
-
- public void setAreaName(String areaName) {
- this.areaName = areaName;
- }
-
- public double getLat() {
- return lat;
- }
-
- public void setLat(double lat) {
- this.lat = lat;
- }
-
- public double getLon() {
- return lon;
- }
-
- public void setLon(double lon) {
- this.lon = lon;
- }
-
- public String getSiteDesc() {
- return siteDesc;
- }
-
- public void setSiteDesc(String siteDesc) {
- this.siteDesc = siteDesc;
- }
-
- public int getSiteState() {
- return siteState;
- }
-
- public void setSiteState(int siteState) {
- this.siteState = siteState;
- }
-
- public int getIsCurrentSite() {
- return isCurrentSite;
- }
-
- public void setIsCurrentSite(int isCurrentSite) {
- this.isCurrentSite = isCurrentSite;
- }
-
- public int getSiteColor() {
- return siteColor;
- }
-
- public void setSiteColor(int siteColor) {
- this.siteColor = siteColor;
- }
-
- public String getPeoples() {
- return peoples;
- }
-
- public void setPeoples(String peoples) {
- this.peoples = peoples;
- }
-
- @Override
- public String toString() {
- return "OchBusStation{" +
- "lineId=" + lineId +
- ", siteId=" + siteId +
- ", siteName='" + siteName + '\'' +
- ", cityCode='" + cityCode + '\'' +
- ", areaCode='" + areaCode + '\'' +
- ", areaName='" + areaName + '\'' +
- ", lat=" + lat +
- ", lon=" + lon +
- ", siteDesc='" + siteDesc + '\'' +
- ", siteState=" + siteState +
- ", isCurrentSite=" + isCurrentSite +
- ", siteColor=" + siteColor +
- ", peoples='" + peoples + '\'' +
- '}';
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStationsChangedMsg.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStationsChangedMsg.java
deleted file mode 100644
index 6c188a1be7..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/OchBusStationsChangedMsg.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import java.util.List;
-
-public
-/**
- * @author congtaowang
- * @since 2021/3/25
- *
- * 小巴站点信息变更:停靠状态等
- */
-class OchBusStationsChangedMsg {
-
- public List< OchBusStation > data;
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersRequest.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersRequest.java
deleted file mode 100644
index 464a2d6ad3..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersRequest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
-import com.mogo.commons.network.Utils;
-
-/**
- * 查询下车乘客请求参数
- *
- * @author tongchenfei
- */
-public class QueryLeaveAwayPassengersRequest {
- private String sn;
- private int endSiteId;
- private int orderDispatchType = 4;
-
- public QueryLeaveAwayPassengersRequest(int siteId) {
- this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
- this.endSiteId = siteId;
- }
-
- public String getSn() {
- return sn;
- }
-
- public void setSn(String sn) {
- this.sn = sn;
- }
-
- public int getEndSiteId() {
- return endSiteId;
- }
-
- public void setEndSiteId(int endSiteId) {
- this.endSiteId = endSiteId;
- }
-
- public int getOrderDispatchType() {
- return orderDispatchType;
- }
-
- public void setOrderDispatchType(int orderDispatchType) {
- this.orderDispatchType = orderDispatchType;
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersResponse.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersResponse.java
deleted file mode 100644
index 2b371aa57d..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersResponse.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import com.mogo.eagle.core.data.BaseData;
-
-import java.util.List;
-
-public
-/**
- * @author congtaowang
- * @since 2021/3/26
- *
- * 到站查询下车乘客
- */
-class QueryLeaveAwayPassengersResponse extends BaseData {
-
- public Result result;
-
- public static class Result {
-
- public List< LeaveAwayPassenger > info;
- }
-
- public static class LeaveAwayPassenger {
-
- /**
- * _id : 9a3b0aacb5f241eabb5ed9f8615d9af6
- * orderNo : XB20210324000001
- * orderType : 10
- * userName : 星期一
- * userPhone : 15555555555
- * startStationId : 1
- * startStation : 万集东门站
- * startStationCoordinate : [116.7354579447,40.1974932972]
- * endStationId : 2
- * endStation : 顺密路口站
- * endStationCoordinate : [116.7215386924,40.194019209]
- * orderDispatchType : 1
- * carNum : 京NB007
- * sn : F803BB2037EZD00088
- * orderStartTime : 2021-03-24 11:51:24
- * orderEndTime :
- * arrivedStartStationTime :
- * arrivedEndStationTime :
- * cityCode : 010
- * areaCode : 1001
- * createTime : 2021-03-24 11:51:24
- * updateTime : 2021-03-24 12:32:10
- * personNum :
- * travelDistance : 1.2
- * vehicleColour :
- * lastBrandName :
- * headImgUrl :
- */
-
- public String _id;
- public String orderNo;
- public int orderType;
- public String userName;
- public String userPhone;
- public int startStationId;
- public String startStation;
- public int endStationId;
- public String endStation;
- public int orderDispatchType;
- public String carNum;
- public String sn;
- public String orderStartTime;
- public String orderEndTime;
- public String arrivedStartStationTime;
- public String arrivedEndStationTime;
- public String cityCode;
- public String areaCode;
- public String createTime;
- public String updateTime;
- public String personNum;
- public double travelDistance;
- public String vehicleColour;
- public String lastBrandName;
- public String headImgUrl;
- public List< Double > startStationCoordinate;
- public List< Double > endStationCoordinate;
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryOchBusOperationStatusRequest.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryOchBusOperationStatusRequest.java
deleted file mode 100644
index 8b261aaad7..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryOchBusOperationStatusRequest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
-import com.mogo.commons.network.Utils;
-
-public
-/**
- * @author congtaowang
- * @since 2021/3/22
- *
- * 小巴车运营状态请求参数
- */
-class QueryOchBusOperationStatusRequest {
-
- public String sn;
-
- public QueryOchBusOperationStatusRequest() {
- this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/UpdateSiteStatusRequest.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/UpdateSiteStatusRequest.java
deleted file mode 100644
index 05f42f0f8a..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/UpdateSiteStatusRequest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.mogo.och.bus.bean;
-
-import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
-import com.mogo.commons.network.Utils;
-
-public
-/**
- * @author congtaowang
- * @since 2021/3/22
- *
- * 小巴车运营状态请求参数
- */
-class UpdateSiteStatusRequest {
-
- public String sn;
- // 0 - 关闭、1 - 启动
- public int siteId;
-
- public UpdateSiteStatusRequest( int siteId ) {
- this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
- this.siteId = siteId;
- }
-
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/OchBusConst.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/OchBusConst.java
deleted file mode 100644
index 5f0cfa5f07..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/constant/OchBusConst.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.mogo.och.bus.constant;
-
-/**
- * 常量
- *
- * @author tongchenfei
- */
-public class OchBusConst {
- // 测试用的广播
- public static final String BROADCAST_TEST_BUS_CONTROL_TYPE_EXTRA_KEY = "sceneType";
- // 无状态
- public static final int STATION_STATUS_IDLE = 0;
- // 到站
- public static final int STATION_STATUS_STOPPED = 1;
- // 离开某一站
- public static final int STATION_STATUS_LEAVING = 2;
- // 下一站
- public static final int STATION_STATUS_ARRIVING = 3;
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java
deleted file mode 100644
index 75bda62d70..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java
+++ /dev/null
@@ -1,238 +0,0 @@
-package com.mogo.och.bus.fragment;
-
-import android.view.View;
-import android.widget.TextView;
-
-import androidx.annotation.NonNull;
-
-import com.mogo.commons.debug.DebugConfig;
-import com.mogo.commons.voice.AIAssist;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.och.BaseOchFragment;
-import com.mogo.och.bus.R;
-import com.mogo.och.bus.bean.OchBusStation;
-import com.mogo.och.bus.presenter.OchBusPresenter;
-import com.mogo.och.view.SlidePanelView;
-import com.mogo.service.adas.IMogoAdasOCHCallback;
-import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
-import com.mogo.utils.logger.Logger;
-
-import java.util.List;
-
-
-/**
- * 网约车小巴界面
- *
- * @author tongchenfei
- */
-public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPresenter > implements SlidePanelView.OnSlidePanelMoveToEndListener {
- private static final String TAG = "OchBusFragment";
-
- private TextView mCurrentStationName;
- private TextView mStartStationFlag;
- private TextView mNextStationName;
- private TextView mEndStationFlag;
-
- private View mBus;
-
-
- @Override
- protected void initViews() {
- super.initViews();
- mBus = findViewById( R.id.module_och_bus_tag );
- mCurrentStationName = findViewById( R.id.module_och_bus_current_station );
- mStartStationFlag = findViewById( R.id.module_och_bus_start_station_tag );
- mNextStationName = findViewById( R.id.module_och_bus_order_end_station );
- mEndStationFlag = findViewById( R.id.module_och_bus_end_station_tag );
-
- if ( DebugConfig.isDebug() ) {
- mBus.setOnClickListener( view -> {
- TipToast.shortTip( "重置了车站状态" );
- mPresenter.debugResetStationStatus();
- } );
-
- mBus.setOnLongClickListener( view -> {
- getActivity().finish();
- return true;
- } );
- }
-
- Logger.d( TAG, "initView: " + MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() );
- // 初始化的时候设置 UI 按钮状态
- switch ( MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() ) {
- case IMogoAdasOCHCallback.STATUS_AUTOPILOT_DISABLE:
- hideAutopilotBiz();
- break;
- case IMogoAdasOCHCallback.STATUS_AUTOPILOT_ENABLE:
- showAutopilotBiz();
- onAutopilotStatusChanged( false );
- break;
- case IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING:
- showAutopilotBiz();
- onAutopilotStatusChanged( true );
- break;
- default:
- break;
- }
- }
-
- @NonNull
- @Override
- protected OchBusPresenter createPresenter() {
- return new OchBusPresenter( this );
- }
-
- @Override
- public void onResume() {
- super.onResume();
- }
-
- /**
- * 根据站点列表信息刷新车站面板,滑块面板
- *
- * @param stationList 车站列表信息
- * @param currentStation 当前站点
- * @param nextStation 下个站点
- */
- public void refreshBusStations( List< OchBusStation > stationList, int currentStation, int nextStation ) {
- if ( getActivity() == null ) {
- return;
- }
- getActivity().runOnUiThread( () -> {
- if ( stationList == null ) {
- // 获取小巴数据失败
- return;
- }
-
- // 渲染小巴路线数据
- renderCurrentStationStatus( stationList, currentStation, nextStation );
- } );
- }
-
- /**
- * 重新刷新站点信息
- */
- private void renderCurrentStationStatus( List< OchBusStation > stationList, int currentStation, int nextStation ) {
-
- String currentStationName = null;
- String nextStationName = null;
- int startStationFlagVisibility = View.INVISIBLE;
- int endStationFlagVisibility = View.INVISIBLE;
-
- boolean isArriveEndStation = false;
- boolean isArriveAtStation = false;
- boolean isArriveAtStartStation = false;
-
- // 获取当前站点的名称
- currentStationName = stationList.get( currentStation ).getSiteName();
-
- // 是否到达起点
- if ( currentStation == 0 ) {
- startStationFlagVisibility = View.VISIBLE;
- isArriveAtStartStation = true;
- mStartStationFlag.setText( "始" );
- }
- // 是否到达站点
- else if ( currentStation > 0 && currentStation < stationList.size() - 1 ) {
- isArriveAtStation = true;
- }
- // 是否到达终点
- else if ( currentStation == stationList.size() - 1 ) {
- isArriveEndStation = true;
- nextStationName = "--";
- mStartStationFlag.setText( "终" );
- startStationFlagVisibility = View.VISIBLE;
- endStationFlagVisibility = View.INVISIBLE;
- }
-
- // 获取下一站点名称
- if ( nextStation > currentStation && nextStation <= stationList.size() - 1 ) {
- nextStationName = stationList.get( nextStation ).getSiteName();
- }
-
- // 是否到达终点
- if ( nextStation == stationList.size() - 1 ) {
- endStationFlagVisibility = View.VISIBLE;
- }
-
- // 重置滑动按钮文字
- if ( isArriveEndStation ) {
- showSlidePanle( "单程结束" );
- } else if ( isArriveAtStartStation ) {
- showSlidePanle( "滑动出发" );
- } else if ( isArriveAtStation ) {
- showSlidePanle( "滑动出发" );
- }
- mCurrentStationName.setText( currentStationName );
- mNextStationName.setText( nextStationName );
- mStartStationFlag.setVisibility( startStationFlagVisibility );
- mEndStationFlag.setVisibility( endStationFlagVisibility );
- }
-
-
- public void hideOchBus() {
-// tvNotice.setVisibility(View.GONE);
- }
-
- @Override
- public int getStationPanelViewId() {
- return R.layout.fragment_och_bus;
- }
-
- @Override
- public void restartAutopilot() {
- mPresenter.restartAutopilot();
- }
-
- @Override
- public SlidePanelView.OnSlidePanelMoveToEndListener getSlidePanelOnEndListener() {
- return this;
- }
-
- @Override
- public void moveToEnd() {
- // 开启自动驾驶到下一站
- mPresenter.autoDriveToNextStation(false);
- }
-
- /**
- * 设置自动驾驶可用状态
- */
- public void onAutopilotEnableChange( boolean isEnable ) {
- onAutopilotStatusChanged(isEnable);
- if ( isEnable ) {
- showAutopilotBiz();
- } else {
- hideAutopilotBiz();
- }
- }
-
- @Override
- protected void onChangeOperationStatus() {
- super.onChangeOperationStatus();
- mPresenter.onChangeOperationStatus();
- // TODO 临时解决因为首次请求Http-DNS是北京的bug,后续需要考虑Http-DNS状态变化后向外同步的逻辑
- mPresenter.queryBusRoutes();
- }
-
- /**
- * 修改经营状态
- * @param launch true-收车,false-出车
- */
- public void changeOperationStatus( boolean launch ) {
- isOperationStatus = launch;
- if ( launch ) {
- // 出车的时候重制站点状态
- mPresenter.debugResetStationStatus();
-
- tvOperationStatus.setText( "收车" );
-// showSlidePanle("滑动出发");
- showPanel();
- } else {
- AIAssist.getInstance(getContext()).speakTTSVoice("已收车");
- tvOperationStatus.setText("出车");
- hideSlidePanel();
- hidPanel();
- }
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IOchBusApiService.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IOchBusApiService.java
deleted file mode 100644
index 66755df49f..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IOchBusApiService.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.mogo.och.bus.net;
-
-import com.mogo.eagle.core.data.BaseData;
-import com.mogo.och.bus.bean.OchBusOperationStatusRequest;
-import com.mogo.och.bus.bean.OchBusOperationStatusResponse;
-import com.mogo.och.bus.bean.OchBusRoutesResponse;
-import com.mogo.och.bus.bean.QueryLeaveAwayPassengersRequest;
-import com.mogo.och.bus.bean.QueryLeaveAwayPassengersResponse;
-import com.mogo.och.bus.bean.QueryOchBusOperationStatusRequest;
-import com.mogo.och.bus.bean.UpdateSiteStatusRequest;
-
-import io.reactivex.Observable;
-import okhttp3.RequestBody;
-import retrofit2.http.Body;
-import retrofit2.http.Headers;
-import retrofit2.http.POST;
-
-/**
- * 小巴车相关接口
- *
- * @author tongchenfei
- *
- * wiki: http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=48970072
- */
-public interface IOchBusApiService {
-
- /**
- * 根据车机坐标获取所在区域全部站点信息
- *
- * @param requestBody 请求参数
- * @return 接口返回数据
- */
- @Headers( {"Content-Type:application/json;charset=UTF-8"} )
- @POST( "/yycp-onlinecar-hailing/onlineCarHailing/site/querySiteByCoordinate/v1" )
- Observable< OchBusRoutesResponse > querySiteByCoordinate( @Body RequestBody requestBody );
-
-
- /**
- * 公交车驶离车站时,通知服务端
- *
- * @param requestBody 请求参数 {"sn":"","siteId":"车站id"}
- * @return 无返回值
- */
- @Headers( {"Content-Type:application/json;charset=UTF-8"} )
- @POST( "/yycp-onlinecar-hailing/onlineCarHailing/site/siteCrashCheck/v1" )
- Observable< OchBusRoutesResponse > leaveStation( @Body RequestBody requestBody );
-
- /**
- * 调试用重置接口
- *
- * @param requestBody 请求参数{"siteId":1,"sn":"F803EB2046PZD00229"}
- * @return 返回值是重置后的车站列表
- */
- @Headers( {"Content-Type:application/json;charset=UTF-8"} )
- @POST( "/yycp-onlinecar-hailing/onlineCarHailing/site/resetSiteByCoordinate/v1" )
- Observable< OchBusRoutesResponse > debugResetStationStatus( @Body RequestBody requestBody );
-
- /**
- * 修改小巴运营状态
- *
- * @param request
- * @return
- */
- @Headers( {"Content-type:application/json;charset=UTF-8"} )
- @POST( "/yycp-onlinecar-hailing/onlineCarHailing/busOrder/updateBusStatus/v1" )
- Observable< BaseData > changeOperationStatus( @Body OchBusOperationStatusRequest request );
-
- /**
- * 查询小巴运营状态
- *
- * @param request
- * @return
- */
- @Headers( {"Content-type:application/json;charset=UTF-8"} )
- @POST( "/yycp-onlinecar-hailing/onlineCarHailing/busOrder/queryBusStatus/v1" )
- Observable< OchBusOperationStatusResponse > queryOperationStatus( @Body QueryOchBusOperationStatusRequest request );
-
- /**
- * 更新到站信息
- *
- * @param request
- * @return
- */
- @Headers( {"Content-type:application/json;charset=UTF-8"} )
- @POST( "/yycp-onlinecar-hailing/onlineCarHailing/site/siteDynamic/v1" )
- Observable< OchBusRoutesResponse > updateSiteStation( @Body UpdateSiteStatusRequest request );
-
- /**
- * 到站查询下车乘客
- *
- * @param request
- * @return
- */
- @Headers( {"Content-type:application/json;charset=UTF-8"} )
- @POST( "/yycp-onlinecar-hailing/onlineCarHailing/busOrder/queryOrderBySiteAndSn/v1" )
- Observable< QueryLeaveAwayPassengersResponse > queryStationLeaveAwayPassengers( @Body QueryLeaveAwayPassengersRequest request );
-
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusOrderModel.java
deleted file mode 100644
index 0676b09427..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusOrderModel.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package com.mogo.och.bus.presenter;
-
-import android.content.Context;
-import android.os.Looper;
-
-import com.mogo.commons.AbsMogoApplication;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.och.bus.bean.OchBusOrder;
-import com.mogo.och.bus.bean.OchBusStation;
-import com.mogo.och.bus.bean.OchBusStationsChangedMsg;
-import com.mogo.service.cloud.socket.IMogoOnMessageListener;
-import com.mogo.utils.UiThreadHandler;
-import com.mogo.utils.logger.Logger;
-import com.mogo.utils.network.utils.GsonUtil;
-
-import java.util.List;
-
-public
-/**
- * @author congtaowang
- * @since 2021/3/23
- *
- * 小巴订单管理
- */
-class OchBusOrderModel {
- private final String TAG = "OchBusOrderModel";
-
- private static volatile OchBusOrderModel sInstance;
-
- public static OchBusOrderModel getInstance() {
- if ( sInstance == null ) {
- synchronized ( OchBusOrderModel.class ) {
- if ( sInstance == null ) {
- sInstance = new OchBusOrderModel();
- }
- }
- }
- return sInstance;
- }
-
- public void init() {
- mContext = AbsMogoApplication.getApp();
- MogoApisHandler.getInstance()
- .getApis()
- .getSocketManagerApi( mContext )
- .registerOnMessageListener( 401021, mOnOrderListener );
- MogoApisHandler.getInstance()
- .getApis()
- .getSocketManagerApi( mContext )
- .registerOnMessageListener( 401020, mOnBusStationsChangedMsg );
- }
-
- private Object readResolve() {
- // 阻止反序列化,必须实现 Serializable 接口
- return sInstance;
- }
-
- private Context mContext;
-
- /**
- * 小巴订单
- *
- * 1. 新订单
- */
- private IMogoOnMessageListener< OchBusOrder > mOnOrderListener = new IMogoOnMessageListener< OchBusOrder >() {
- @Override
- public Class< OchBusOrder > target() {
- return OchBusOrder.class;
- }
-
- @Override
- public void onMsgReceived( OchBusOrder obj ) {
- Logger.i(TAG, "401021--小巴订单:" + GsonUtil.jsonFromObject(obj));
-
- if ( obj == null ) {
- return;
- }
- runOnUiThread( () -> {
- if ( mOnBusOrderChangedListener != null ) {
- mOnBusOrderChangedListener.onBusOrderChanged( obj );
- }
- } );
- }
- };
-
- /**
- * 站点信息变更推送
- * 新订单、取消订单、到达站点等都会导致停靠站点变更,故都会收到此推送
- */
- private IMogoOnMessageListener< OchBusStationsChangedMsg > mOnBusStationsChangedMsg = new IMogoOnMessageListener< OchBusStationsChangedMsg >() {
- @Override
- public Class< OchBusStationsChangedMsg > target() {
- return OchBusStationsChangedMsg.class;
- }
-
- @Override
- public void onMsgReceived( OchBusStationsChangedMsg obj ) {
- Logger.i(TAG, "401020--站点信息变更推送:" + GsonUtil.jsonFromObject(obj));
-
- if ( obj == null ) {
- return;
- }
- runOnUiThread( () -> {
- if ( mOnBusStationsChangedListener != null ) {
- mOnBusStationsChangedListener.onBusStationsChanged( obj.data );
- }
- } );
- }
- };
-
- private OnBusStationsChangedListener mOnBusStationsChangedListener;
- private OnBusOrderChangedListener mOnBusOrderChangedListener;
-
- private OchBusOrderModel() {
-
- }
-
- /**
- * 小巴到站
- */
- public void onArriveAtStation() {
-
- }
-
- public void setOnBusStationsChangedListener( OnBusStationsChangedListener onBusStationsChangedListener ) {
- this.mOnBusStationsChangedListener = onBusStationsChangedListener;
- }
-
- public void setOnBusOrderChangedListener( OnBusOrderChangedListener mOnBusOrderChangedListener ) {
- this.mOnBusOrderChangedListener = mOnBusOrderChangedListener;
- }
-
- /**
- * 站点信息
- */
- public interface OnBusStationsChangedListener {
- void onBusStationsChanged( List< OchBusStation > data );
- }
-
- /**
- * 站点信息
- */
- public interface OnBusOrderChangedListener {
- void onBusOrderChanged( OchBusOrder order );
- }
-
- private void runOnUiThread( Runnable runnable ) {
- if ( Looper.myLooper() == Looper.getMainLooper() ) {
- runnable.run();
- } else {
- UiThreadHandler.postDelayed( runnable, 0 );
- }
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java
deleted file mode 100644
index c197e01b4f..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java
+++ /dev/null
@@ -1,653 +0,0 @@
-package com.mogo.och.bus.presenter;
-
-import android.os.Handler;
-import android.os.Message;
-import android.text.TextUtils;
-import android.util.Log;
-
-import androidx.annotation.NonNull;
-import androidx.lifecycle.LifecycleOwner;
-
-import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
-import com.mogo.eagle.core.data.BaseData;
-import com.mogo.commons.mvp.Presenter;
-import com.mogo.commons.network.SubscribeImpl;
-import com.mogo.commons.voice.AIAssist;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.constants.HostConst;
-import com.mogo.och.bus.bean.OchBusLeaveStationRequest;
-import com.mogo.och.bus.bean.OchBusOperationStatusRequest;
-import com.mogo.och.bus.bean.OchBusOperationStatusResponse;
-import com.mogo.och.bus.bean.OchBusOrder;
-import com.mogo.och.bus.bean.OchBusResetRequest;
-import com.mogo.och.bus.bean.OchBusRoutesRequest;
-import com.mogo.och.bus.bean.OchBusRoutesResponse;
-import com.mogo.och.bus.bean.OchBusStation;
-import com.mogo.och.bus.bean.QueryLeaveAwayPassengersRequest;
-import com.mogo.och.bus.bean.QueryLeaveAwayPassengersResponse;
-import com.mogo.och.bus.bean.QueryOchBusOperationStatusRequest;
-import com.mogo.och.bus.bean.UpdateSiteStatusRequest;
-import com.mogo.och.bus.fragment.OchBusFragment;
-import com.mogo.och.bus.net.IOchBusApiService;
-import com.mogo.service.adas.IMogoAdasOCHCallback;
-import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
-import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
-import com.mogo.utils.logger.Logger;
-import com.mogo.utils.network.RequestOptions;
-import com.mogo.utils.network.utils.GsonUtil;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.schedulers.Schedulers;
-import okhttp3.MediaType;
-import okhttp3.RequestBody;
-
-import static com.mogo.och.bus.constant.OchBusConst.STATION_STATUS_ARRIVING;
-import static com.mogo.och.bus.constant.OchBusConst.STATION_STATUS_LEAVING;
-import static com.mogo.och.bus.constant.OchBusConst.STATION_STATUS_STOPPED;
-
-/**
- * 网约车小巴
- *
- * @author tongchenfei
- */
-public class OchBusPresenter extends Presenter< OchBusFragment > implements IMogoAdasOCHCallback,
- Handler.Callback,
- OchBusOrderModel.OnBusStationsChangedListener,
- OchBusOrderModel.OnBusOrderChangedListener {
- private static final String TAG = "OchBusPresenter";
-
- // 运营类型
- private static final int VEHICLE_TYPE = 10;
- private static final int MSG_QUERY_BUS_STATION = 1001;
- private static final long QUERY_BUS_STATION_DELAY = 5000;
-
- /**
- * 用来表示是否正在开往下一站
- */
- private boolean isGoingToNextStation = false;
-
- private IOchBusApiService mService;
-
- /**
- * 运营状态、后端更具运营状态来判断车辆是否派单
- */
- private boolean mIsWorking = false;
-
- public OchBusPresenter( OchBusFragment view ) {
- super( view );
- mService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( IOchBusApiService.class, HostConst.OCH_DOMAIN );
- MogoApisHandler.getInstance().getApis().getAdasControllerApi().addAdasOCHCallback( this );
- OchBusOrderModel.getInstance().init();
- OchBusOrderModel.getInstance().setOnBusStationsChangedListener( this );
- OchBusOrderModel.getInstance().setOnBusOrderChangedListener( this );
- }
-
- private final Handler handler = new Handler( this );
-
- private final List< OchBusStation > stationList = new ArrayList<>();
-
- private int currentStationIndex = 0;
-
- @Override
- public void onCreate( @NonNull LifecycleOwner owner ) {
- super.onCreate( owner );
- Log.d(TAG, "onCreate ------> ");
- queryOperationStatus();
- queryBusRoutes();
- }
-
- /**
- * 查询小巴路线
- */
- public void queryBusRoutes() {
- Logger.d( TAG, "查询小巴路线");
-
- double lat = 40.1974932972;
- double lon = 116.7354579447;
- lat = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat();
- lon = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon();
-
- OchBusRoutesRequest request = new OchBusRoutesRequest( MoGoAiCloudClientConfig.getInstance().getSn(), lat, lon );
- RequestBody requestBody = RequestBody.create( MediaType.get( "application/json;charset=UTF-8" ), GsonUtil.jsonFromObject( request ) );
- mService.querySiteByCoordinate( requestBody )
- .subscribeOn( Schedulers.io() ).observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< OchBusRoutesResponse >( RequestOptions.create( getContext() ) ) {
-
- @Override
- public void onSuccess( OchBusRoutesResponse o ) {
- super.onSuccess( o );
- if ( o == null
- || o.getResult() == null
- || o.getResult().getSite() == null
- || o.getResult().getSite().isEmpty() ) {
- return;
- }
- Logger.d( TAG, "获取到小巴路线数据: " + o );
- renderBusStationsStatus( o.getResult().getSite() );
- }
-
- @Override
- public void onError( Throwable e ) {
- super.onError( e );
- Logger.e( TAG, e, "获取小巴路线图失败" );
- // 重复请求小巴路线,直至成功
- queryBusStationDelay();
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- Logger.e( TAG, "获取小巴路线失败 code: " + code + " msg: " + message );
- // 重复请求小巴路线,直至成功
- queryBusStationDelay();
- }
- } );
- }
-
- /**
- * 渲染站点信息
- *
- * @param site
- */
- private void renderBusStationsStatus( List< OchBusStation > site ) {
- Logger.d( TAG, "渲染站点信息");
-
- int lastStopStation = getNextStopStation();
-
- stationList.clear();
- stationList.addAll( site );
- for ( int i = 0; i < stationList.size(); i++ ) {
- OchBusStation s = stationList.get( i );
- // 是否正在开往下一站
- if ( s.getIsCurrentSite() == STATION_STATUS_LEAVING ) {
- isGoingToNextStation = true;
- mView.hideSlidePanel();
- }
-
- // 当前站点信息
- if ( s.getIsCurrentSite() == STATION_STATUS_LEAVING
- || s.getIsCurrentSite() == STATION_STATUS_STOPPED ) {
- currentStationIndex = i;
- }
- }
-
- mView.refreshBusStations( stationList, currentStationIndex, getNextStopStation() );
-
- if ( isGoingToNextStation ) {
- mView.hideSlidePanel();
- }
-
- resetNextStopStation( lastStopStation );
-
- }
-
- /**
- * 重置下一站
- *
- * @param lastStopStation
- */
- private void resetNextStopStation( int lastStopStation ) {
- Logger.d( TAG, "重置下一站");
-
- int nextStopStation = getNextStopStation();
- if ( nextStopStation < 0 ) {
- return;
- }
- if ( lastStopStation <= nextStopStation || nextStopStation <= currentStationIndex ) {
- return;
- }
- if ( MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus()
- == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING ) {
- // 自动驾驶中动态设置下一个停靠站点
- autoDriveToNextStation( true );
- }
- }
-
- /**
- * 根据订单状态、获取下一站靠站的的站点
- *
- * @return -1 当前已是最后一个站点
- */
- private int getNextStopStation() {
- if ( currentStationIndex >= stationList.size() - 1 ) {
- return -1;
- }
- int nextStationIndex = currentStationIndex + 1;
- for ( ; nextStationIndex < stationList.size() - 1; nextStationIndex++ ) {
- if ( stationList.get( nextStationIndex ).getIfStop() == 1 ) {
- break;
- }
- }
- return nextStationIndex;
- }
-
- /**
- * 延时查询站点信心
- */
- private void queryBusStationDelay() {
- handler.sendEmptyMessageDelayed( MSG_QUERY_BUS_STATION, QUERY_BUS_STATION_DELAY );
- }
-
- /**
- * 在踩刹车、控制方向盘等操作后,会停止自动驾驶,重启自动驾驶的话相当于重新设置自动驾驶目的地
- */
- public void restartAutopilot() {
- Logger.d( TAG, "重启自动驾驶===" + isGoingToNextStation );
- if ( isGoingToNextStation ) {
- autoDriveToNextStation( true );
- }
- }
-
- /**
- * 测试、重置站点状态
- */
- public void debugResetStationStatus() {
- Logger.d( TAG, "测试、重置站点状态");
- double lat = 40.1974932972;
- double lon = 116.7354579447;
-
- // ADAS 经纬度,需要启动工控机
- lat = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat();
- lon = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon();
-
- OchBusResetRequest request = new OchBusResetRequest(MoGoAiCloudClientConfig.getInstance().getSn(), 1, lat, lon);
- RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request));
- mService.debugResetStationStatus(requestBody)
- .subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
- .subscribe(new SubscribeImpl(RequestOptions.create(getContext())) {
-
- @Override
- public void onSuccess(OchBusRoutesResponse o) {
- super.onSuccess(o);
- Logger.d(TAG, "获取到小巴路线数据: " + o);
- isGoingToNextStation = false;
- if (o.getResult() == null || o.getResult().getSite() == null || o.getResult().getSite().isEmpty()) {
- return;
- }
- renderBusStationsStatus(o.getResult().getSite());
- }
-
- @Override
- public void onError(Throwable e) {
- super.onError(e);
- Logger.e(TAG, e, "获取小巴路线图失败");
- // 重复请求小巴路线,直至成功
- queryBusStationDelay();
- }
-
- @Override
- public void onError(String message, int code) {
- super.onError(message, code);
- Logger.e(TAG, "获取小巴路线失败 code: " + code + " msg: " + message);
- // 重复请求小巴路线,直至成功
- queryBusStationDelay();
- }
- });
- }
-
- /**
- * 开启自动驾驶到下一站
- */
- public void autoDriveToNextStation( boolean isRestart ) {
- Logger.d( TAG, "开启自动驾驶到下一站");
-
- if ( currentStationIndex >= stationList.size() - 1 ) {
- // 当前站是最后一站,结束当前行程
- travelOver();
- return;
- }
- OchBusStation currentStation = stationList.get( currentStationIndex );
-
- int nextStationIndex = getNextStopStation();
-
- OchBusStation nextStation = stationList.get( nextStationIndex );
- currentStation.setIsCurrentSite( STATION_STATUS_LEAVING );
- nextStation.setIsCurrentSite( STATION_STATUS_ARRIVING );
-
- AutopilotControlParameters currentAutopilot = new AutopilotControlParameters();
- currentAutopilot.isSpeakVoice = !isRestart;
- currentAutopilot.startLatLon = new AutopilotControlParameters.AutoPilotLonLat( currentStation.getLat(), currentStation.getLon() );
- currentAutopilot.endLatLon = new AutopilotControlParameters.AutoPilotLonLat( nextStation.getLat(), nextStation.getLon() );
- currentAutopilot.vehicleType = VEHICLE_TYPE;
- Logger.d( TAG, "开启自动驾驶====" + currentAutopilot );
- MogoApisHandler.getInstance().getApis().getAdasControllerApi().aiCloudToAdasData( currentAutopilot );
-
- if ( mView != null ) {
- mView.refreshBusStations( stationList, currentStationIndex, nextStationIndex );
- mView.hideSlidePanel();
- }
-
- if ( isGoingToNextStation ) {
- // 为了避免恢复自动驾驶时重复的接口请求
- return;
- }
- isGoingToNextStation = true;
- AIAssist.getInstance( getContext() ).speakTTSVoice( "欢迎乘坐’蘑菇车联‘无人驾驶小巴车,请您坐好,注意乘车安全,行程即将开始" );
- RequestBody request = RequestBody.create( MediaType.get( "application/json" ), GsonUtil.jsonFromObject( new OchBusLeaveStationRequest( MoGoAiCloudClientConfig.getInstance().getSn(), stationList.get( currentStationIndex ).getSiteId() ) ) );
- mService.leaveStation( request ).subscribeOn( Schedulers.io() )
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< OchBusRoutesResponse >( RequestOptions.create( getContext() ) ) {
- @Override
- public void onSuccess( OchBusRoutesResponse o ) {
- super.onSuccess( o );
- if ( o.getResult() == null || o.getResult().getSite() == null || o.getResult().getSite().isEmpty() ) {
- return;
- }
- renderBusStationsStatus( o.getResult().getSite() );
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- Logger.d( TAG, "leave station error: " + message );
- }
-
- @Override
- public void onError( Throwable e ) {
- super.onError( e );
- Logger.e( TAG, e, "leave station exception" );
- }
- } );
- }
-
- @Override
- public void onArriveAt( AutopilotStationInfo data ) {
- if ( currentStationIndex >= stationList.size() - 1 ) {
- Logger.e( TAG, "到站异常,取消后续操作" );
- return;
- }
- Logger.d( TAG, "到站====" );
- isGoingToNextStation = false;
- // 到达站点后,更新站点状态
- currentStationIndex = getNextStopStation();
- updateSiteStation();
- queryLeaveAwayPassengers();
- }
-
- /**
- * 到站后重置站点状态
- */
- private void updateSiteStation() {
- Logger.d( TAG, "到站后重置站点状态");
-
- mService.updateSiteStation( new UpdateSiteStatusRequest( stationList.get( currentStationIndex ).getSiteId() ) )
- .subscribeOn( Schedulers.io() )
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< OchBusRoutesResponse >( RequestOptions.create( getContext() ) ) {
- @Override
- public void onSuccess( OchBusRoutesResponse o ) {
- super.onSuccess( o );
- if ( o.getResult() == null && o.getResult().getSite() == null || o.getResult().getSite().isEmpty() ) {
- return;
- }
- renderBusStationsStatus( o.getResult().getSite() );
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- Logger.d( TAG, "leave station error: " + message );
- }
-
- @Override
- public void onError( Throwable e ) {
- super.onError( e );
- Logger.e( TAG, e, "leave station exception" );
- }
- } );
- }
-
- /**
- * 查询到站下车乘客
- */
- private void queryLeaveAwayPassengers() {
- Logger.d( TAG, "查询到站下车乘客");
-
- mService.queryStationLeaveAwayPassengers( new QueryLeaveAwayPassengersRequest( stationList.get( currentStationIndex ).getSiteId() ) )
- .subscribeOn( Schedulers.io() )
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< QueryLeaveAwayPassengersResponse >( RequestOptions.create( getContext() ) ) {
- @Override
- public void onSuccess( QueryLeaveAwayPassengersResponse o ) {
- super.onSuccess( o );
- playLeavePassengersMsg( o );
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- Logger.d( TAG, "leave station error: " + message );
- }
-
- @Override
- public void onError( Throwable e ) {
- super.onError( e );
- Logger.e( TAG, e, "leave station exception" );
- }
- } );
- }
-
- /**
- * 播报下车乘客信息
- *
- * @param awayPassengersResponse
- */
- private void playLeavePassengersMsg( QueryLeaveAwayPassengersResponse awayPassengersResponse ) {
- Logger.d( TAG, "播报下车乘客信息");
-
- if ( currentStationIndex > stationList.size() - 1 ) {
- return;
- }
- String station = stationList.get( currentStationIndex ).getSiteName();
- StringBuilder builder = new StringBuilder( "已到达" );
- builder.append( station );
- if ( !station.endsWith( "站" ) ) {
- builder.append( "站" );
- }
- if ( awayPassengersResponse == null || awayPassengersResponse.result == null || awayPassengersResponse.result.info == null || awayPassengersResponse.result.info.isEmpty() ) {
- //
- } else {
- builder.append( ",请尾号为 " );
- for ( QueryLeaveAwayPassengersResponse.LeaveAwayPassenger leaveAwayPassenger : awayPassengersResponse.result.info ) {
- if ( leaveAwayPassenger == null ) {
- continue;
- }
- String tailNum = null;
- try {
- tailNum = leaveAwayPassenger.userPhone.substring(leaveAwayPassenger.userPhone.length() - 4);
- } catch (Exception e) {
- e.printStackTrace();
- tailNum = leaveAwayPassenger.userPhone;
- }
- builder.append( tailNum ).append( "。" );
- }
- builder.append( "的乘客下车" );
- }
- builder.append(",带好随身物品,下车请注意安全");
- Logger.d(TAG, "TTS:" + builder.toString());
- AIAssist.getInstance( getContext() ).speakTTSVoice( builder.toString() );
- }
-
- /**
- * 行程结束
- */
- private void travelOver() {
- Logger.d( TAG, "行程结束");
-
- if ( currentStationIndex >= stationList.size() ) {
- Logger.e( TAG, "travel over index out of station list" );
- return;
- }
- Logger.d( TAG, "单程结束====" );
- MogoApisHandler.getInstance().getApis().getAdasControllerApi().cancelAutopilot();
- AIAssist.getInstance( getContext() ).speakTTSVoice( "感谢您体验’蘑菇车联‘无人驾驶小巴车,请您携带好随身物品,我们下次再见" );
- RequestBody request = RequestBody.create( MediaType.get( "application/json" ), GsonUtil.jsonFromObject( new OchBusLeaveStationRequest( MoGoAiCloudClientConfig.getInstance().getSn(), stationList.get( currentStationIndex ).getSiteId() ) ) );
- mService.leaveStation( request ).subscribeOn( Schedulers.io() )
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< OchBusRoutesResponse >( RequestOptions.create( getContext() ) ) {
- @Override
- public void onSuccess( OchBusRoutesResponse o ) {
- super.onSuccess( o );
- // 始发站改为Stoped,其他站改为Idle
- Logger.d( TAG, "单程真的结束了====" );
- if ( o.getResult() == null || o.getResult().getSite() == null || o.getResult().getSite().isEmpty() ) {
- return;
- }
- renderBusStationsStatus( o.getResult().getSite() );
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- Logger.d( TAG, "leave station error: " + message );
- }
-
- @Override
- public void onError( Throwable e ) {
- super.onError( e );
- Logger.e( TAG, e, "leave station exception" );
- }
- } );
- }
-
- @Override
- public void onStateChanged( int state, String reason ) {
- Logger.d( TAG, "onStateChange: " + state );
- switch ( state ) {
- case IMogoAdasOCHCallback.STATUS_AUTOPILOT_ENABLE:
- // 设置UI【自动驾驶】按钮是否展示
- mView.onAutopilotEnableChange( true );
- // 改变UI自动驾驶状态
- mView.onAutopilotStatusChanged( false );
- if ( isGoingToNextStation ) {
- mView.hideSlidePanel();
- }
- break;
- case IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING:
- // 改变UI自动驾驶状态
- mView.onAutopilotStatusChanged( true );
- break;
- default:
- mView.onAutopilotEnableChange( false );
- break;
- }
- }
-
- @Override
- public boolean handleMessage( Message msg ) {
- if ( msg.what == MSG_QUERY_BUS_STATION ) {
- queryBusRoutes();
- return true;
- }
- return false;
- }
-
- public boolean isWorking() {
- return mIsWorking;
- }
-
- /**
- * 修改小巴运营状态
- */
- public void onChangeOperationStatus() {
- Logger.d( TAG, "修改小巴运营状态");
-
- mService.changeOperationStatus( isWorking() ? new OchBusOperationStatusRequest().shutdown() : new OchBusOperationStatusRequest().launch() )
- .subscribeOn( Schedulers.io() )
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< BaseData >( RequestOptions.create( getContext() ) ) {
- @Override
- public void onSuccess( BaseData o ) {
- super.onSuccess( o );
- mIsWorking = !mIsWorking;
- if ( mIsWorking ) {
- if ( stationList != null && stationList.size() > 0 ) {
- AIAssist.getInstance( getContext() ).speakTTSVoice( "车辆已整备完毕,请前往" + stationList.get( 0 ).getSiteName() + "站点" );
- }
- }
- if ( mView != null ) {
- mView.changeOperationStatus( isWorking() );
- }
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- Logger.d( TAG, "leave station error: " + message );
- }
-
- @Override
- public void onError( Throwable e ) {
- super.onError( e );
- Logger.e( TAG, e, "leave station exception" );
- }
- } );
- }
-
- /**
- * 查询运营状态
- */
- public void queryOperationStatus() {
- Logger.d( TAG, "查询运营状态");
-
- mService.queryOperationStatus( new QueryOchBusOperationStatusRequest() )
- .subscribeOn( Schedulers.io() )
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< OchBusOperationStatusResponse >( RequestOptions.create( getContext() ) ) {
- @Override
- public void onSuccess( OchBusOperationStatusResponse o ) {
- super.onSuccess( o );
- if ( o.result != null ) {
- mIsWorking = o.result.status == 1;
- }
- if ( mView != null ) {
- mView.changeOperationStatus( isWorking() );
- }
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- Logger.d( TAG, "查询运营状态 error: " + message );
- }
-
- @Override
- public void onError( Throwable e ) {
- super.onError( e );
- Logger.e( TAG, e, "查询运营状态 exception" );
- }
- } );
- }
-
-
- @Override
- public void onBusStationsChanged( List< OchBusStation > data ) {
- renderBusStationsStatus( data );
- }
-
- @Override
- public void onBusOrderChanged( OchBusOrder order ) {
- if ( order == null ) {
- return;
- }
- if ( TextUtils.isEmpty( order.getUserPhone() ) ) {
- return;
- }
- try {
- String tailNum = null;
- try {
- tailNum = order.getUserPhone().substring( order.getUserPhone().length() - 4 );
- } catch (Exception e) {
- e.printStackTrace();
- tailNum = order.getUserPhone();
- }
- Logger.d(TAG, "TTS:" + tailNum);
- AIAssist.getInstance( getContext() ).speakTTSVoice( "接到新订单,尾号 " + tailNum + " 上车站点为 " + order.getStartStation() );
- } catch ( Exception e ) {
- e.printStackTrace();
- }
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/receiver/TestOchBusBroadcastReceiver.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/receiver/TestOchBusBroadcastReceiver.java
deleted file mode 100644
index 066b55b112..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/receiver/TestOchBusBroadcastReceiver.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.mogo.och.bus.receiver;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-import com.mogo.och.bus.constant.OchBusConst;
-import com.mogo.utils.logger.Logger;
-
-/**
- * 测试小巴车的场景
- *
- * @author donghongyu
- * @date 4/26/21 12:08 PM
- */
-public class TestOchBusBroadcastReceiver extends BroadcastReceiver {
- private static final String TAG = "TestOchBusBroadcastReceiver";
-
- private Context mContext;
-
- @Override
- public void onReceive(Context context, Intent intent) {
- try {
- this.mContext = context;
- int sceneType = intent.getIntExtra(OchBusConst.BROADCAST_TEST_BUS_CONTROL_TYPE_EXTRA_KEY, 0);
- Logger.d(TAG, "sceneType:" + sceneType);
-
- // 分发场景
- dispatchSceneTest(sceneType);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private void dispatchSceneTest(int sceneType) {
-
- }
-
-
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/NoTouchConstraintLayout.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/NoTouchConstraintLayout.java
deleted file mode 100644
index 558a515bd9..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/NoTouchConstraintLayout.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.mogo.och.bus.view;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-
-import androidx.constraintlayout.widget.ConstraintLayout;
-
-import com.mogo.commons.debug.DebugConfig;
-
-/**
- * 强制拦截所有touch时间的约束布局
- *
- * @author tongchenfei
- */
-public class NoTouchConstraintLayout extends ConstraintLayout {
- public NoTouchConstraintLayout(Context context) {
- super(context);
- }
-
- public NoTouchConstraintLayout(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- public NoTouchConstraintLayout(Context context, AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- }
-
- @Override
- public boolean onInterceptTouchEvent(MotionEvent ev) {
- if(DebugConfig.isDebug()){
- return super.onInterceptTouchEvent(ev);
- }else {
- return true;
- }
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/VerticalDashLineView.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/VerticalDashLineView.java
deleted file mode 100644
index 250d4a41b6..0000000000
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/view/VerticalDashLineView.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.mogo.och.bus.view;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.DashPathEffect;
-import android.graphics.LinearGradient;
-import android.graphics.Paint;
-import android.graphics.Path;
-import android.graphics.Shader;
-import android.util.AttributeSet;
-import android.view.View;
-
-import androidx.annotation.Nullable;
-
-/**
- * 垂直虚线
- *
- * @author tongchenfei
- */
-public class VerticalDashLineView extends View {
- public VerticalDashLineView(Context context) {
- this(context,null);
- }
-
- public VerticalDashLineView(Context context, @Nullable AttributeSet attrs) {
- this(context, attrs,0);
- }
-
- public VerticalDashLineView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- init();
- }
-
- private final Paint linePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
- private final Path dashPath = new Path();
-
- private void init(){
- linePaint.setColor(Color.GREEN);
- linePaint.setStyle(Paint.Style.STROKE);
- linePaint.setStrokeWidth(2);
- linePaint.setPathEffect(new DashPathEffect(new float[]{5, 5}, 0));
- }
-
- public void setGradient(int startColor, int endColor) {
- LinearGradient linearGradient = new LinearGradient(0, 0, getWidth(), getHeight(), startColor, endColor, Shader.TileMode.CLAMP);
- linePaint.setShader(linearGradient);
- invalidate();
- }
-
- public void setColor(int color) {
- linePaint.setShader(null);
- linePaint.setColor(color);
- invalidate();
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
- dashPath.reset();
- dashPath.moveTo((float) getWidth()/2, 0);
- dashPath.lineTo((float) getWidth()/2,getHeight());
- canvas.drawPath(dashPath,linePaint);
- }
-}
diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/module_mogo_och_bus_icon_not_arrive_station.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/module_mogo_och_bus_icon_not_arrive_station.png
deleted file mode 100644
index e0bb24c526..0000000000
Binary files a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/module_mogo_och_bus_icon_not_arrive_station.png and /dev/null differ
diff --git a/OCH/mogo-och-bus/src/main/res/drawable/module_mogo_och_bus_station_green_dash_line.xml b/OCH/mogo-och-bus/src/main/res/drawable/module_mogo_och_bus_station_green_dash_line.xml
deleted file mode 100644
index e8584b47ff..0000000000
--- a/OCH/mogo-och-bus/src/main/res/drawable/module_mogo_och_bus_station_green_dash_line.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/drawable/module_mogo_och_bus_station_v_green_dash.xml b/OCH/mogo-och-bus/src/main/res/drawable/module_mogo_och_bus_station_v_green_dash.xml
deleted file mode 100644
index 969b501621..0000000000
--- a/OCH/mogo-och-bus/src/main/res/drawable/module_mogo_och_bus_station_v_green_dash.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- -
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/drawable/module_och_bus_panel_anchor_bkg.xml b/OCH/mogo-och-bus/src/main/res/drawable/module_och_bus_panel_anchor_bkg.xml
deleted file mode 100644
index 38fc28d893..0000000000
--- a/OCH/mogo-och-bus/src/main/res/drawable/module_och_bus_panel_anchor_bkg.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/drawable/module_och_bus_panel_bkg.xml b/OCH/mogo-och-bus/src/main/res/drawable/module_och_bus_panel_bkg.xml
deleted file mode 100644
index 4a08f10745..0000000000
--- a/OCH/mogo-och-bus/src/main/res/drawable/module_och_bus_panel_bkg.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml b/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml
deleted file mode 100644
index f2b8dfca44..0000000000
--- a/OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/layout/item_och_bus_station.xml b/OCH/mogo-och-bus/src/main/res/layout/item_och_bus_station.xml
deleted file mode 100644
index 25ac60ead5..0000000000
--- a/OCH/mogo-och-bus/src/main/res/layout/item_och_bus_station.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/raw/bus_away_passengers.json b/OCH/mogo-och-bus/src/main/res/raw/bus_away_passengers.json
deleted file mode 100644
index e76436f2dc..0000000000
--- a/OCH/mogo-och-bus/src/main/res/raw/bus_away_passengers.json
+++ /dev/null
@@ -1,184 +0,0 @@
-{
- "code": 0,
- "msg": "",
- "detailMsg": "",
- "result": {
- "info": [
- {
- "_id": "cee57b3ae07c4486b0357319368487d7",
- "orderNo": "XB20210422000002",
- "orderType": 10,
- "userName": "董QAD",
- "userPhone": "15631204018",
- "startStationId": 1,
- "startStation": "万集东门站",
- "startStationCoordinate": [
- 116.7354579447,
- 40.1974932972
- ],
- "endStationId": 2,
- "endStation": "顺密路口站",
- "endStationCoordinate": [
- 116.721520973,
- 40.1940181096
- ],
- "orderDispatchType": 7,
- "carNum": "京NB010",
- "sn": "F803EB2046PZD00149",
- "orderStartTime": "2021-04-22 16:31:58",
- "orderEndTime": "2021-04-26 10:38:13",
- "arrivedStartStationTime": null,
- "arrivedEndStationTime": null,
- "cityCode": "010",
- "areaCode": "1001",
- "createTime": "2021-04-22 16:31:58",
- "updateTime": "2021-04-26 10:38:13",
- "personNum": 1,
- "travelDistance": 1.2,
- "vehicleColour": null,
- "lastBrandName": null,
- "headImgUrl": null
- },
- {
- "_id": "ce69b1bcfb9840c6a4563bc6ef947caf",
- "orderNo": "XB20210426000000",
- "orderType": 10,
- "userName": "董QAD",
- "userPhone": "15631204018",
- "startStationId": 1,
- "startStation": "万集东门站",
- "startStationCoordinate": [
- 116.7354579447,
- 40.1974932972
- ],
- "endStationId": 2,
- "endStation": "顺密路口站",
- "endStationCoordinate": [
- 116.721520973,
- 40.1940181096
- ],
- "orderDispatchType": 7,
- "carNum": "京NB010",
- "sn": "F803EB2046PZD00149",
- "orderStartTime": "2021-04-26 10:38:48",
- "orderEndTime": "2021-04-26 10:46:16",
- "arrivedStartStationTime": null,
- "arrivedEndStationTime": null,
- "cityCode": "010",
- "areaCode": "1001",
- "createTime": "2021-04-26 10:38:48",
- "updateTime": "2021-04-26 10:46:16",
- "personNum": 1,
- "travelDistance": 1.2,
- "vehicleColour": null,
- "lastBrandName": null,
- "headImgUrl": null
- },
- {
- "_id": "cae07b56f41c4e0fa60ab3543ffc258e",
- "orderNo": "XB20210426000001",
- "orderType": 10,
- "userName": "董QAD",
- "userPhone": "15631204018",
- "startStationId": 1,
- "startStation": "万集东门站",
- "startStationCoordinate": [
- 116.7354579447,
- 40.1974932972
- ],
- "endStationId": 2,
- "endStation": "顺密路口站",
- "endStationCoordinate": [
- 116.721520973,
- 40.1940181096
- ],
- "orderDispatchType": 7,
- "carNum": "京NB010",
- "sn": "F803EB2046PZD00149",
- "orderStartTime": "2021-04-26 10:47:05",
- "orderEndTime": "2021-04-26 10:48:07",
- "arrivedStartStationTime": null,
- "arrivedEndStationTime": null,
- "cityCode": "010",
- "areaCode": "1001",
- "createTime": "2021-04-26 10:47:05",
- "updateTime": "2021-04-26 10:48:07",
- "personNum": 1,
- "travelDistance": 1.2,
- "vehicleColour": null,
- "lastBrandName": null,
- "headImgUrl": null
- },
- {
- "_id": "62bc84afbc434d01b644c74ee406e772",
- "orderNo": "XB20210426000002",
- "orderType": 10,
- "userName": "董QAD",
- "userPhone": "15631204018",
- "startStationId": 1,
- "startStation": "万集东门站",
- "startStationCoordinate": [
- 116.7354579447,
- 40.1974932972
- ],
- "endStationId": 2,
- "endStation": "顺密路口站",
- "endStationCoordinate": [
- 116.721520973,
- 40.1940181096
- ],
- "orderDispatchType": 7,
- "carNum": "京NB010",
- "sn": "F803EB2046PZD00149",
- "orderStartTime": "2021-04-26 10:48:22",
- "orderEndTime": "2021-04-26 10:50:32",
- "arrivedStartStationTime": null,
- "arrivedEndStationTime": null,
- "cityCode": "010",
- "areaCode": "1001",
- "createTime": "2021-04-26 10:48:22",
- "updateTime": "2021-04-26 10:50:32",
- "personNum": 1,
- "travelDistance": 1.2,
- "vehicleColour": null,
- "lastBrandName": null,
- "headImgUrl": null
- },
- {
- "_id": "fa3214c7a6ec411bb3d6edbc98907423",
- "orderNo": "XB20210426000009",
- "orderType": 10,
- "userName": "董QAD",
- "userPhone": "15631204018",
- "startStationId": 1,
- "startStation": "万集东门站",
- "startStationCoordinate": [
- 116.7354579447,
- 40.1974932972
- ],
- "endStationId": 2,
- "endStation": "顺密路口站",
- "endStationCoordinate": [
- 116.721520973,
- 40.1940181096
- ],
- "orderDispatchType": 7,
- "carNum": "京NB010",
- "sn": "F803EB2046PZD00149",
- "orderStartTime": "2021-04-26 19:26:05",
- "orderEndTime": "2021-04-27 14:35:50",
- "arrivedStartStationTime": null,
- "arrivedEndStationTime": null,
- "cityCode": "010",
- "areaCode": "1001",
- "createTime": "2021-04-26 19:26:05",
- "updateTime": "2021-04-27 14:35:50",
- "personNum": 1,
- "travelDistance": 1.2,
- "vehicleColour": null,
- "lastBrandName": null,
- "headImgUrl": null
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/raw/bus_order_1.json b/OCH/mogo-och-bus/src/main/res/raw/bus_order_1.json
deleted file mode 100644
index 050b67447d..0000000000
--- a/OCH/mogo-och-bus/src/main/res/raw/bus_order_1.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "_id": "62bc84afbc434d01b644c74ee406e772",
- "areaCode": "1001",
- "carNum": "京NB010",
- "cityCode": "010",
- "createTime": "Apr 26, 2021 10:48:22 AM",
- "endStation": "顺密路口站",
- "endStationCoordinate": [
- 116.721520973,
- 40.1940181096
- ],
- "endStationId": 2,
- "orderDispatchType": 1,
- "orderNo": "XB20210426000002",
- "orderStartTime": "Apr 26, 2021 10:48:22 AM",
- "orderType": 10,
- "sn": "F803EB2046PZD00149",
- "startStation": "万集东门站",
- "startStationCoordinate": [
- 116.7354579447,
- 40.1974932972
- ],
- "startStationId": 1,
- "travelDistance": 1.2,
- "updateTime": "Apr 26, 2021 10:48:23 AM",
- "userName": "董QAD",
- "userPhone": "15631204018"
-}
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/raw/bus_station_list1.json b/OCH/mogo-och-bus/src/main/res/raw/bus_station_list1.json
deleted file mode 100644
index c74daa1174..0000000000
--- a/OCH/mogo-och-bus/src/main/res/raw/bus_station_list1.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "code": 0,
- "msg": "",
- "detailMsg": "",
- "result": {
- "site": [
- {
- "lineId": 1.0,
- "siteId": 1.0,
- "siteName": "万集东门站",
- "cityCode": "010",
- "areaCode": "1001",
- "areaName": "顺义区",
- "currentLocation": [
- 116.7354579447,
- 40.1974932972
- ],
- "lon": 116.7354579447,
- "lat": 40.1974932972,
- "siteDesc": "万集东门站",
- "siteState": 1.0,
- "isCurrentSite": 1.0,
- "siteColor": 1.0,
- "peoples": "0",
- "ifStop": 1.0
- },
- {
- "lineId": 1.0,
- "siteId": 2.0,
- "siteName": "市政府前街18号",
- "cityCode": "010",
- "areaCode": "1001",
- "areaName": "顺义区",
- "currentLocation": [
- 116.729134342,
- 40.1953113732
- ],
- "lon": 116.729134342,
- "lat": 40.1953113732,
- "siteDesc": "市政府前街18号",
- "siteState": 1.0,
- "isCurrentSite": 3.0,
- "siteColor": 2.0,
- "peoples": "0",
- "ifStop": 0.0
- },
- {
- "lineId": 1.0,
- "siteId": 3.0,
- "siteName": "顺密路口站",
- "cityCode": "010",
- "areaCode": "1001",
- "areaName": "顺义区",
- "currentLocation": [
- 116.721520973,
- 40.1940181096
- ],
- "lon": 116.721520973,
- "lat": 40.1940181096,
- "siteDesc": "顺密路口站",
- "siteState": 1.0,
- "isCurrentSite": 0.0,
- "siteColor": 0.0,
- "peoples": "0",
- "ifStop": 1.0
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/raw/bus_station_list2.json b/OCH/mogo-och-bus/src/main/res/raw/bus_station_list2.json
deleted file mode 100644
index 48d6782cc3..0000000000
--- a/OCH/mogo-och-bus/src/main/res/raw/bus_station_list2.json
+++ /dev/null
@@ -1,109 +0,0 @@
-{
- "code": 0,
- "msg": "",
- "detailMsg": "",
- "result": {
- "site": [
- {
- "lineId": 1.0,
- "siteId": 1.0,
- "siteName": "万集东门站",
- "cityCode": "010",
- "areaCode": "1001",
- "areaName": "顺义区",
- "currentLocation": [
- 116.7354579447,
- 40.1974932972
- ],
- "lon": 116.7354579447,
- "lat": 40.1974932972,
- "siteDesc": "万集东门站",
- "siteState": 1.0,
- "isCurrentSite": 0.0,
- "siteColor": 0.0,
- "peoples": "0",
- "ifStop": 1.0
- },
- {
- "lineId": 1.0,
- "siteId": 1.0,
- "siteName": "万集东门站",
- "cityCode": "010",
- "areaCode": "1001",
- "areaName": "顺义区",
- "currentLocation": [
- 116.7374429112,
- 40.2023987087
- ],
- "lon": 116.7374429112,
- "lat": 40.2023987087,
- "siteDesc": "万集东门站",
- "siteState": 1.0,
- "isCurrentSite": 0.0,
- "siteColor": 0.0,
- "peoples": "0",
- "ifStop": 1.0
- },
- {
- "lineId": 1.0,
- "siteId": 2.0,
- "siteName": "顺密路口站",
- "cityCode": "010",
- "areaCode": "1001",
- "areaName": "顺义区",
- "currentLocation": [
- 116.721520973,
- 40.1940181096
- ],
- "lon": 116.721520973,
- "lat": 40.1940181096,
- "siteDesc": "顺密路口站",
- "siteState": 1.0,
- "isCurrentSite": 1.0,
- "siteColor": 1.0,
- "peoples": "0",
- "ifStop": 1.0
- },
- {
- "lineId": 1.0,
- "siteId": 2.0,
- "siteName": "顺密路口站",
- "cityCode": "010",
- "areaCode": "1001",
- "areaName": "顺义区",
- "currentLocation": [
- 116.723146,
- 40.179637
- ],
- "lon": 116.723146,
- "lat": 40.179637,
- "siteDesc": "顺密路口站",
- "siteState": 1.0,
- "isCurrentSite": 1.0,
- "siteColor": 1.0,
- "peoples": "0",
- "ifStop": 1.0
- },
- {
- "lineId": 2.0,
- "siteId": 2.0,
- "siteName": "顺密路口站",
- "cityCode": "010",
- "areaCode": "1001",
- "areaName": "顺义区",
- "currentLocation": [
- 116.738835502,
- 40.2023958306
- ],
- "lon": 116.738835502,
- "lat": 40.2023958306,
- "siteDesc": "顺密路口站",
- "siteState": 1.0,
- "isCurrentSite": 1.0,
- "siteColor": 1.0,
- "peoples": "0",
- "ifStop": 1.0
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml
deleted file mode 100644
index 81c5fe7e4e..0000000000
--- a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
- 300px
- 348px
- 211px
- 276px
-
-
- 220px
- 98px
- 159px
-
- 32px
- 20px
- 42px
- 32px
-
- 15px
-
- 20px
- 36px
- 28px
- 36px
-
- 3px
- 3px
- 17px
- 17px
-
-
- 300px
- 270px
- 30px
- 24px
- 24px
- 1px
- 30px
- 23px
- 30px
- 146px
- 20px
- 23px
- 30px
- 23px
- 26px
- 32px
- 20px
- 80px
- 3px
- 44.5px
- 20px
- 28px
- 27px
-
-
- 25.6px
- 20px
- 20px
- 16px
- 16px
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/values/colors.xml b/OCH/mogo-och-bus/src/main/res/values/colors.xml
deleted file mode 100644
index fa0e45046d..0000000000
--- a/OCH/mogo-och-bus/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- #FF1FA7FF
- #FFFFFFFF
- #FFFFFFFF
- #FF51649D
- #7F8299EB
-
- #51649D
- #427d8e
- #1FA7FF
- #3FC281
- #427d8e
- #3FC281
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-bus/src/main/res/values/dimens.xml b/OCH/mogo-och-bus/src/main/res/values/dimens.xml
deleted file mode 100644
index 38414718d2..0000000000
--- a/OCH/mogo-och-bus/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
- 300px
- 348px
- 211px
- 276px
-
-
- 220px
- 98px
- 159px
-
- 32px
- 20px
- 26px
- 20px
-
- 15px
-
- 20px
- 36px
- 28px
- 36px
-
- 3px
- 3px
- 17px
- 17px
-
-
- 300px
- 270px
- 30px
- 24px
- 24px
- 1px
- 30px
- 23px
- 30px
- 146px
- 20px
- 23px
- 30px
- 23px
- 26px
- 20px
- 20px
- 80px
- 3px
- 27px
- 20px
- 28px
- 27px
-
- 16px
- 16px
- 16px
- 16px
- 16px
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-noop/.gitignore b/OCH/mogo-och-noop/.gitignore
deleted file mode 100644
index 42afabfd2a..0000000000
--- a/OCH/mogo-och-noop/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/OCH/mogo-och-noop/build.gradle b/OCH/mogo-och-noop/build.gradle
deleted file mode 100644
index f1a7e40077..0000000000
--- a/OCH/mogo-och-noop/build.gradle
+++ /dev/null
@@ -1,61 +0,0 @@
-apply plugin: 'com.android.library'
-apply plugin: 'com.alibaba.arouter'
-
-android {
- compileSdkVersion rootProject.ext.android.compileSdkVersion
- // buildToolsVersion rootProject.ext.android.buildToolsVersion
- defaultConfig {
- minSdkVersion rootProject.ext.android.minSdkVersion
- targetSdkVersion rootProject.ext.android.targetSdkVersion
- versionCode Integer.valueOf(VERSION_CODE)
- versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
-
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles "consumer-rules.pro"
-
- javaCompileOptions {
- annotationProcessorOptions {
- arguments = [AROUTER_MODULE_NAME: project.getName()]
- }
- }
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: "libs", include: ["*.jar"])
- implementation rootProject.ext.dependencies.androidxappcompat
- implementation rootProject.ext.dependencies.arouter
- annotationProcessor rootProject.ext.dependencies.aroutercompiler
-
- if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
- implementation rootProject.ext.dependencies.mogooch
- implementation rootProject.ext.dependencies.mogoutils
- implementation rootProject.ext.dependencies.mogocommons
-
- implementation rootProject.ext.dependencies.mogo_core_data
- implementation rootProject.ext.dependencies.mogo_core_function_api
-
- } else {
- implementation project(":OCH:mogo-och")
- implementation project(":foudations:mogo-utils")
- implementation project(":foudations:mogo-commons")
-
- implementation project(':core:mogo-core-data')
- implementation project(':core:mogo-core-function-api')
- }
-}
-
-apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
\ No newline at end of file
diff --git a/OCH/mogo-och-noop/consumer-rules.pro b/OCH/mogo-och-noop/consumer-rules.pro
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/OCH/mogo-och-noop/gradle.properties b/OCH/mogo-och-noop/gradle.properties
deleted file mode 100644
index a3c4fc4290..0000000000
--- a/OCH/mogo-och-noop/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-GROUP=com.mogo.och
-POM_ARTIFACT_ID=och-noop
-VERSION_CODE=1
diff --git a/OCH/mogo-och-noop/proguard-rules.pro b/OCH/mogo-och-noop/proguard-rules.pro
deleted file mode 100644
index 481bb43481..0000000000
--- a/OCH/mogo-och-noop/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/OCH/mogo-och-noop/src/main/AndroidManifest.xml b/OCH/mogo-och-noop/src/main/AndroidManifest.xml
deleted file mode 100644
index 83e4053945..0000000000
--- a/OCH/mogo-och-noop/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- /
-
\ No newline at end of file
diff --git a/OCH/mogo-och-noop/src/main/java/com/mogo/och/bus/MogoOCHNoop.java b/OCH/mogo-och-noop/src/main/java/com/mogo/och/bus/MogoOCHNoop.java
deleted file mode 100644
index 787751ea8a..0000000000
--- a/OCH/mogo-och-noop/src/main/java/com/mogo/och/bus/MogoOCHNoop.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.mogo.och.bus;
-
-import android.content.Context;
-import android.os.Bundle;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentActivity;
-
-import com.alibaba.android.arouter.facade.annotation.Route;
-import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
-import com.mogo.och.OCHConstants;
-import com.mogo.utils.logger.Logger;
-
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 描述
- */
-@Route(path = OCHConstants.PATH)
-public class MogoOCHNoop implements IMoGoFunctionProvider {
-
- private static final String TAG = "MogoOCHNoop";
-
- @Override
- public void init(Context context) {
- Logger.d(TAG, "noop-");
- }
-
- @Nullable
- @Override
- public Fragment createCoverage(@Nullable FragmentActivity activity, @Nullable Integer containerId) {
- Logger.d(TAG, "noop-");
- return null;
- }
-
- @NonNull
- @Override
- public String getFunctionName() {
- return TAG;
- }
-
- @Override
- public void onDestroy() {
-
- }
-
-}
diff --git a/OCH/mogo-och-taxi/.gitignore b/OCH/mogo-och-taxi/.gitignore
deleted file mode 100644
index 42afabfd2a..0000000000
--- a/OCH/mogo-och-taxi/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/build.gradle b/OCH/mogo-och-taxi/build.gradle
deleted file mode 100644
index 11f721a2dc..0000000000
--- a/OCH/mogo-och-taxi/build.gradle
+++ /dev/null
@@ -1,66 +0,0 @@
-apply plugin: 'com.android.library'
-apply plugin: 'com.alibaba.arouter'
-
-android {
- compileSdkVersion rootProject.ext.android.compileSdkVersion
- // buildToolsVersion rootProject.ext.android.buildToolsVersion
- defaultConfig {
- minSdkVersion rootProject.ext.android.minSdkVersion
- targetSdkVersion rootProject.ext.android.targetSdkVersion
- versionCode Integer.valueOf(VERSION_CODE)
- versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
-
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles "consumer-rules.pro"
-
- javaCompileOptions {
- annotationProcessorOptions {
- arguments = [AROUTER_MODULE_NAME: project.getName()]
- }
- }
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: "libs", include: ["*.jar"])
- implementation rootProject.ext.dependencies.androidxappcompat
- implementation rootProject.ext.dependencies.arouter
- annotationProcessor rootProject.ext.dependencies.aroutercompiler
- implementation rootProject.ext.dependencies.rxandroid
- implementation rootProject.ext.dependencies.androidxconstraintlayout
-
- if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
- implementation rootProject.ext.dependencies.mogooch
- implementation rootProject.ext.dependencies.mogoutils
- implementation rootProject.ext.dependencies.mogocommons
- implementation rootProject.ext.dependencies.modulecommon
-
- implementation rootProject.ext.dependencies.mogo_core_utils
- implementation rootProject.ext.dependencies.mogo_core_data
- implementation rootProject.ext.dependencies.mogo_core_function_api
- } else {
- implementation project(":OCH:mogo-och")
- implementation project(":foudations:mogo-utils")
- implementation project(":foudations:mogo-commons")
- implementation project(":modules:mogo-module-common")
-
- implementation project(':core:mogo-core-utils')
- implementation project(':core:mogo-core-data')
- implementation project(':core:mogo-core-function-api')
- }
-}
-
-apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/consumer-rules.pro b/OCH/mogo-och-taxi/consumer-rules.pro
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/OCH/mogo-och-taxi/gradle.properties b/OCH/mogo-och-taxi/gradle.properties
deleted file mode 100644
index 2d8ec933d9..0000000000
--- a/OCH/mogo-och-taxi/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-GROUP=com.mogo.och
-POM_ARTIFACT_ID=och-taxi
-VERSION_CODE=1
diff --git a/OCH/mogo-och-taxi/proguard-rules.pro b/OCH/mogo-och-taxi/proguard-rules.pro
deleted file mode 100644
index 481bb43481..0000000000
--- a/OCH/mogo-och-taxi/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/AndroidManifest.xml b/OCH/mogo-och-taxi/src/main/AndroidManifest.xml
deleted file mode 100644
index fb42392054..0000000000
--- a/OCH/mogo-och-taxi/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- /
-
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoADASAutoPilotStatusChangedListener.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoADASAutoPilotStatusChangedListener.java
deleted file mode 100644
index 944f331d2c..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoADASAutoPilotStatusChangedListener.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.mogo.och.taxi;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/26
- *
- * adas 可自动驾驶状态切换逻辑
- */
-interface IMogoADASAutoPilotStatusChangedListener {
-
- void onAutoPilotStatusChanged( int status, String reason );
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoOCHTaxiArriveCallback.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoOCHTaxiArriveCallback.java
deleted file mode 100644
index b3f683b843..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoOCHTaxiArriveCallback.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.mogo.och.taxi;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/18
- *
- * 网约车-出租车到站回调
- */
-interface IMogoOCHTaxiArriveCallback {
-
- void onTheWay2StartStation();
-
- /**
- * 到达起始站
- */
- void onArriveAtStartStation();
-
- /**
- * 到达终点站
- */
- void onArriveAtEndStation();
-
- /**
- * 去往目的地的路上
- */
- void onTheWay2EndStation();
-
- /**
- * 乘客已到达站点
- */
- void onUserArriveAtStartStation();
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IOperationChangedListener.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IOperationChangedListener.java
deleted file mode 100644
index af7fc38699..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IOperationChangedListener.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.mogo.och.taxi;
-
-public interface IOperationChangedListener {
- void onOperationChanged(boolean launch);
- void onOrderStatusChanged(int status);
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxi.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxi.java
deleted file mode 100644
index 5541e6029d..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxi.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.mogo.och.taxi;
-
-import android.content.Context;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentActivity;
-
-import com.alibaba.android.arouter.facade.annotation.Route;
-import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.och.OCHConstants;
-import com.mogo.och.taxi.ui.OCHTaxiFragment;
-import com.mogo.och.taxi.ui.OCHTaxiUiController;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
-import com.mogo.utils.UiThreadHandler;
-import com.mogo.utils.logger.Logger;
-
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 网约车-出租车
- */
-@Route(path = OCHConstants.PATH)
-public class MogoOCHTaxi implements IMoGoFunctionProvider, IMogoStatusChangedListener {
-
- private static final String TAG = "MogoOCHTaxi";
- private OCHTaxiFragment ochTaxiFragment;
- private FragmentActivity mActivity;
- private int mContainerId;
-
-
- @Override
- public void init(Context context) {
- Logger.d(TAG, "init");
- MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("ochTaxi", StatusDescriptor.VR_MODE, this);
- MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("ochTaxi", StatusDescriptor.TOP_VIEW, this);
- }
-
- private void showFragment() {
- if (ochTaxiFragment == null) {
- Logger.d(TAG, "准备add fragment======");
- ochTaxiFragment = new OCHTaxiFragment();
- mActivity.getSupportFragmentManager().beginTransaction().add(mContainerId, ochTaxiFragment).commitAllowingStateLoss();
- return;
- }
- Logger.d(TAG, "准备show fragment");
- mActivity.getSupportFragmentManager().beginTransaction().show(ochTaxiFragment).commitAllowingStateLoss();
- }
-
- private void hideFragment() {
- if (ochTaxiFragment != null) {
- mActivity.getSupportFragmentManager().beginTransaction().hide(ochTaxiFragment).commitAllowingStateLoss();
- }
- }
-
- @Override
- public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
- if (descriptor == StatusDescriptor.VR_MODE) {
- if (isTrue) {
- showFragment();
- MogoOCHTaxiModel.getInstance().init(mActivity.getApplicationContext());
- } else {
- hideFragment();
- }
- }
- }
-
- @Nullable
- @Override
- public Fragment createCoverage(@Nullable FragmentActivity activity, @Nullable Integer containerId) {
- this.mActivity = activity;
- this.mContainerId = containerId;
-// MogoOCHTaxiModel.getInstance().init( activity.getApplicationContext() );
- OCHTaxiUiController.getInstance().init(activity, containerId);
-
- UiThreadHandler.postDelayed(() -> {
- OCHTaxiUiController.getInstance().stepIntoVrMode();
- }, 5_000L);
- return null;
- }
-
- @NonNull
- @Override
- public String getFunctionName() {
- return TAG;
- }
-
- @Override
- public void onDestroy() {
-
- }
-
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxiModel.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxiModel.java
deleted file mode 100644
index f897b01a23..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxiModel.java
+++ /dev/null
@@ -1,915 +0,0 @@
-package com.mogo.och.taxi;
-
-import android.content.Context;
-import android.content.Intent;
-import android.location.Location;
-import android.net.ConnectivityManager;
-
-import com.mogo.cloud.commons.utils.CoordinateUtils;
-import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
-import com.mogo.eagle.core.data.BaseData;
-import com.mogo.commons.network.SubscribeImpl;
-import com.mogo.eagle.core.data.map.MogoLatLng;
-import com.mogo.map.navi.IMogoCarLocationChangedListener2;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.constants.HostConst;
-import com.mogo.och.taxi.ui.OCHTaxiUiController;
-import com.mogo.service.adas.IMogoAdasOCHCallback;
-import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
-import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
-import com.mogo.service.cloud.socket.IMogoLifecycleListener;
-import com.mogo.service.cloud.socket.IMogoOnMessageListener;
-import com.mogo.service.intent.IMogoIntentListener;
-import com.mogo.utils.NetworkUtils;
-import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
-import com.mogo.utils.logger.Logger;
-import com.mogo.utils.network.RequestOptions;
-import com.mogo.utils.network.utils.GsonUtil;
-import com.mogo.utils.storage.SharedPrefsMgr;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import io.reactivex.Observable;
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.disposables.Disposable;
-import io.reactivex.schedulers.Schedulers;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 网约车 - 出租车业务逻辑处理
- */
-class MogoOCHTaxiModel {
-
- private static final String TAG = "MogoOCHTaxiModel";
-
- /**
- * 到达起始点围栏
- */
- public static final int ARRIVE_AT_START_STATION_DISTANCE = 20;
-
- private static volatile MogoOCHTaxiModel sInstance;
-
- private MogoOCHTaxiModel() {
- }
-
- public static MogoOCHTaxiModel getInstance() {
- if ( sInstance == null ) {
- synchronized ( MogoOCHTaxiModel.class ) {
- if ( sInstance == null ) {
- sInstance = new MogoOCHTaxiModel();
- }
- }
- }
- return sInstance;
- }
-
- /**
- * 订单信息
- */
- public static final String SP_KEY_OCH_TAXI_ORDER = "SP_KEY_OCH_TAXI_ORDER";
-
- private OrderMsgListener mOrderMsgListener;
- private OrderStatusMsgListener mOrderStatusMsgListener;
- private OCHTaxiServiceApi mOCHTaxiServiceApi;
- private Context mContext;
- private OCHTaxiOrderResponse mCurrentOCHOrder;
- private OCHArriveNotifyCallback mNotifyCallback;
- private OCHSocketLifeCycleLisnter mSocketLifeCycleLisnter;
- private IMogoCarLocationChangedListener2 mCarLocationChangedListener2;
- /**
- * 是否达到起始站点
- */
- private boolean mIsArriveAtStartStation = false;
-
- /**
- * 是否在去往终点站的路上
- */
- private boolean mIsOnTheWay2EndStation = false;
-
- /**
- * 是否达到终点
- */
- private boolean mIsArriveAtEndStation = false;
-
-// /**
-// * 乘客已到达上车站点
-// */
-// private boolean mIsUserArriveAtStartStation = false;
-
- /**
- * 查询订单信息重试次数
- */
- private int mRetryCounter = 0;
-
- private int mOCHRHCarstatus = -1;
-
- private Object readResolve() {
- // 阻止反序列化,必须实现 Serializable 接口
- return sInstance;
- }
-
- public void init( Context context ) {
- mContext = context.getApplicationContext();
-
- if (mOCHTaxiServiceApi == null){
- mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi().create(OCHTaxiServiceApi.class, HostConst.OCH_DOMAIN);
- }
- MogoApisHandler.getInstance()
- .getApis()
- .getSocketManagerApi( context )
- .registerOnMessageListener( 401016, mOrderMsgListener = new OrderMsgListener() );
- MogoApisHandler.getInstance()
- .getApis()
- .getSocketManagerApi( context )
- .registerOnMessageListener( 401019, mOrderStatusMsgListener = new OrderStatusMsgListener() );
- MogoApisHandler.getInstance()
- .getApis()
- .getSocketManagerApi(context)
- .registerLifecycleListener(10010,mSocketLifeCycleLisnter = new OCHSocketLifeCycleLisnter());
- MogoApisHandler.getInstance()
- .getApis()
- .getAdasControllerApi()
- .addAdasOCHCallback( mNotifyCallback = new OCHArriveNotifyCallback() );
- MogoApisHandler.getInstance()
- .getApis()
- .getIntentManagerApi()
- .registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
-// if ( NetworkUtils.isConnected( mContext ) ) {
-// restoreOrderInfo();
-// }
- if ( NetworkUtils.isConnected( mContext ) ) {
- querryCarStatus();
- }
- }
-
- public void querryCarStatus() {
- mOCHTaxiServiceApi.queryCarStatus( new OCHCarStatus (MoGoAiCloudClientConfig.getInstance().getSn(),0))
- .subscribeOn(Schedulers.io())
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< OCHCarStatusResponse >(RequestOptions.create(mContext)) {
- @Override
- public void onSuccess(OCHCarStatusResponse data) {
- super.onSuccess(data);
- Logger.e(TAG,"querryCarStatus:"+data.data.status);
-
- mOCHRHCarstatus = data.data.status == 1 ? 1:0;
-
- //更新view
- OCHTaxiUiController.getInstance().onOperationChanged(mOCHRHCarstatus==1);
- //刷新数据
- updateData(mOCHRHCarstatus);
- }
-
- @Override
- public void onError(Throwable e) {
- super.onError(e);
- Logger.e(TAG,"querryCarStatus:"+e.getMessage());
- }
-
- @Override
- public void onError(String message, int code) {
- super.onError(message,code);
- Logger.e(TAG,"querryCarStatus:"+message);
- }
- });
- }
-
- public void updateData(int status){
- if (status == 1){
- //查询订单
- restoreOrderInfo();
- }
- }
-
- /**
- * 重新恢复订单状态
- */
- private void restoreOrderInfo() {
- Logger.d( TAG, "重新查询订单状态" );
- mRetryCounter = 0;
- query2RestoreOrderStatus(null);
- }
-
- /**
- * 查询订单状态,来恢复旧订单(因crash导致应用重启、断网没收到推送等)状态
- *
- * 已结束、已取消:清除订单状态
- * 已到达目的地:更新UI,显示到达目的地状态
- * 车辆已到达起始地:等待乘客上车,并确认上车
- * 乘客已上车:更新UI,显示已到达起始站,等待安全员确认开启自动驾驶
- * 在去往目的地的路上:显示去往目的地的路上
- * 在去往起始地的路上、未获取具体状态:以新接收订单开始处理
- *
- * @param orderNo
- */
- private void query2RestoreOrderStatus( String orderNo ) {
- Logger.e(TAG,"query2RestoreOrderStatus:"+orderNo);
- queryOCHOrderStatus( orderNo, new OCHOrderStatusCallback< OCHTaxiOrderResponse2 >() {
- @Override
- public void onSuccess( OCHTaxiOrderResponse2 data ) {
- Logger.d( TAG, "query2RestoreOrderStatus:"+ data.toString());
- if ( data == null || data.data == null) {
- Logger.d( TAG, "订单已取消或已完成" );
- clearCurrentOCHOrder();
- OCHTaxiUiController.getInstance().onOrderStatusChanged(OCHOrderStatus.None.getCode());
- return;
- }
- convertCurrentOrder( data );
- OCHOrderStatus status = OCHOrderStatus.valueOf( data.data.orderDispatchType );
- OCHTaxiUiController.getInstance().onOrderStatusChanged(data.data.orderDispatchType);
- switch ( status ) {
- case JourneyCompleted:
- TipToast.shortTip( mContext.getString( R.string.module_och_taxi_order_completed ) );
- clearCurrentOCHOrder();
-// OCHTaxiUiController.getInstance().removeFragment();
- break;
- case Cancel:
- TipToast.shortTip( mContext.getString( R.string.module_och_taxi_order_cancel ) );
- clearCurrentOCHOrder();
-// OCHTaxiUiController.getInstance().removeFragment();
- break;
- case ArriveAtEndStation:
- case UserState:
- mIsArriveAtEndStation = true;
- mIsArriveAtStartStation = false;
- mIsOnTheWay2EndStation = false;
-// mIsUserArriveAtStartStation = false;
-// OCHTaxiUiController.getInstance().addFragment();
- break;
- case ArriveAtStartStation:
- mIsArriveAtStartStation = true;
- mIsArriveAtEndStation = false;
- mIsOnTheWay2EndStation = false;
-// mIsUserArriveAtStartStation = false;
-// OCHTaxiUiController.getInstance().addFragment();
- break;
- case UserArriveAtStartStation:
- mIsArriveAtStartStation = true;
- mIsArriveAtEndStation = false;
- mIsOnTheWay2EndStation = false;
-// mIsUserArriveAtStartStation = true;
-// OCHTaxiUiController.getInstance().addFragment();
- break;
- case OnTheWayToEndStation:
- mIsArriveAtStartStation = false;
- mIsArriveAtEndStation = false;
- mIsOnTheWay2EndStation = true;
-// mIsUserArriveAtStartStation = false;
-// OCHTaxiUiController.getInstance().addFragment();
- break;
- case OnTheWayToStartStation:
- default:
- mIsArriveAtStartStation = false;
- mIsArriveAtEndStation = false;
- mIsOnTheWay2EndStation = false;
-// mIsUserArriveAtStartStation = false;
- mOrderMsgListener.onMsgReceived( mCurrentOCHOrder );
- break;
- }
- }
-
- @Override
- public void onError() {
- if ( mRetryCounter++ > 3 ) {
- return;
- }
- query2RestoreOrderStatus( orderNo );
- }
-
- @Override
- public void onFail() {
- Logger.w( TAG, "查询订单失败" );
- }
- } );
- }
-
- /**
- * 用于长连接
- * @param orderNo
- */
- private void querryOrderStatusForMakeUp( String orderNo ) {
- Logger.e(TAG,"querryOrderStatusForMakeUp:"+orderNo);
- queryOCHOrderStatus( orderNo, new OCHOrderStatusCallback< OCHTaxiOrderResponse2 >() {
- @Override
- public void onSuccess( OCHTaxiOrderResponse2 data ) {
- if ( data == null || data.data == null) {
- Logger.d( TAG, "订单已取消或已完成" );
- clearCurrentOCHOrder();
- OCHTaxiUiController.getInstance().onOrderStatusChanged(OCHOrderStatus.None.getCode());
- return;
- }
- Logger.d( TAG, "querryOrderStatusForMakeUp:"+ data.data.orderDispatchType);
- convertCurrentOrder( data );
- OCHOrderStatus status = OCHOrderStatus.valueOf( data.data.orderDispatchType );
- switch ( status ) {
- case JourneyCompleted:
- TipToast.shortTip( mContext.getString( R.string.module_och_taxi_order_completed ) );
- OCHTaxiUiController.getInstance().onOrderStatusChanged(data.data.orderDispatchType);
- clearCurrentOCHOrder();
- break;
- case Cancel:
- TipToast.shortTip( mContext.getString( R.string.module_och_taxi_order_cancel ) );
- OCHTaxiUiController.getInstance().onOrderStatusChanged(data.data.orderDispatchType);
- clearCurrentOCHOrder();
- break;
- case OnTheWayToStartStation:
-// default:
- mIsArriveAtStartStation = false;
- mIsArriveAtEndStation = false;
- mIsOnTheWay2EndStation = false;
- OCHTaxiUiController.getInstance().onOrderStatusChanged(data.data.orderDispatchType);
- mOrderMsgListener.onMsgReceived( mCurrentOCHOrder );
- break;
- }
- }
-
- @Override
- public void onError() {
-
- }
-
- @Override
- public void onFail() {
- Logger.w( TAG, "查询订单失败" );
- }
- } );
- }
-
- /**
- * 将查询到的订单转换成推送的订单数据,目前两者数据结构不一样
- *
- * @param data
- */
- private void convertCurrentOrder( OCHTaxiOrderResponse2 data ) {
- if (data.data == null){
- return;
- }
- if ( mCurrentOCHOrder == null ) {
- mCurrentOCHOrder = new OCHTaxiOrderResponse();
- }
- mCurrentOCHOrder.orderNo = data.data.orderNo;
- mCurrentOCHOrder.orderDispatchType = data.data.orderDispatchType;
- mCurrentOCHOrder.endStation = data.data.endStation;
- mCurrentOCHOrder.startStation = data.data.startStation;
- mCurrentOCHOrder.travelDistance = data.data.travelDistance;
- mCurrentOCHOrder.orderType = data.data.orderType;
- mCurrentOCHOrder.drivingRoutes = new ArrayList<>();
- OCHTaxiOrderResponse.OCHTaxiStation startStation = new OCHTaxiOrderResponse.OCHTaxiStation();
- List< Double > startStationCoordinate = data.data.startStationCoordinate;
- List< Double > startGcjStationCoordinate = data.data.startGcjStationCoordinate;
- if (startStationCoordinate != null && startStationCoordinate.size()>1 &&
- startGcjStationCoordinate!= null && startGcjStationCoordinate.size() > 1){
- startStation.lon = startGcjStationCoordinate.get( 0 );
- startStation.lat = startGcjStationCoordinate.get( 1 );
- startStation.wgsLon = startStationCoordinate.get(0);
- startStation.wgsLat = startStationCoordinate.get(1);
- startStation.siteId = data.data.startStationId;
- startStation.siteName = data.data.startStation;
- mCurrentOCHOrder.drivingRoutes.add( startStation );
- }
- OCHTaxiOrderResponse.OCHTaxiStation endStation = new OCHTaxiOrderResponse.OCHTaxiStation();
- List< Double > endStationCoordinate = data.data.endStationCoordinate;
- List< Double > endGcjStationCoordinate = data.data.endGcjStationCoordinate;
- if (endStationCoordinate != null && endStationCoordinate.size()>1 &&
- endGcjStationCoordinate!=null && endGcjStationCoordinate.size() > 1){
- endStation.lon = endGcjStationCoordinate.get( 0 );
- endStation.lat = endGcjStationCoordinate.get( 1 );
- endStation.wgsLon = endStationCoordinate.get( 0 );
- endStation.wgsLat = endStationCoordinate.get( 1 );
- endStation.siteId = data.data.endStationId;
- endStation.siteName = data.data.endStation;
- mCurrentOCHOrder.drivingRoutes.add( endStation );
- }
- cacheOrderInfo2Native( mCurrentOCHOrder );
- }
-
- /**
- * 监听网络变化,避免启动机器时无网导致无法更新订单信息
- */
- private IMogoIntentListener mNetWorkIntentListener = new IMogoIntentListener() {
- @Override
- public void onIntentReceived( String intentStr, Intent intent ) {
- Logger.d( TAG, "onIntentReceived = %s", intentStr );
- if ( ConnectivityManager.CONNECTIVITY_ACTION.equals( intentStr ) ) {
- if ( NetworkUtils.isConnected( mContext ) ) {
-// restoreOrderInfo();
- querryCarStatus();
- }
- }
- }
- };
-
- public void changedOperationStatus() {
- if ( mOCHRHCarstatus == -1){
- querryCarStatus();
- return;
- }
-
- if (checkCurrentOCHOrder()){
- TipToast.shortTip( "订单未完成,无法下线收车" );
- return;
- }
-
- int status = mOCHRHCarstatus == 1 ? 0 : 1;
- mOCHTaxiServiceApi.updateCarStatus(new OCHCarStatus(MoGoAiCloudClientConfig.getInstance().getSn(),status))
- .subscribeOn(Schedulers.io())
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< OCHCarStatusResponse >(RequestOptions.create(mContext)) {
- @Override
- public void onSuccess(OCHCarStatusResponse o) {
- super.onSuccess(o);
- Logger.d(TAG,"OCHCarStatusResponse:"+o.data.status);
- mOCHRHCarstatus = o.data.status;
- OCHTaxiUiController.getInstance().onOperationChanged(mOCHRHCarstatus == 1);
- updateData(mOCHRHCarstatus);
- Logger.d(TAG,"changeCarStatus:"+status);
- }
-
- @Override
- public void onError(Throwable e) {
- super.onError(e);
- Logger.d(TAG,"changeCarStatus:"+e.getMessage());
- }
-
- @Override
- public void onError(String message, int code) {
- super.onError(message, code);
- Logger.d(TAG,"changeCarStatus:"+message);
- }
- });
- }
-
- /**
- * 自车定位
- */
- private class LocationListener implements IMogoCarLocationChangedListener2 {
-
- @Override
- public void onCarLocationChanged2( Location location ) {
-// Logger.d( TAG, "定位已判断是否达到上车站点: 起点(%s, %s), 当前位置(%s, %s)",
-// mCurrentOCHOrder.drivingRoutes.get( 0 ).lon,
-// mCurrentOCHOrder.drivingRoutes.get( 0 ).lat,
-// location.getLongitude(),
-// location.getLatitude()
-// );
- onLocationChanged( location );
- }
-
- @Override
- public void onCarLocationChanged( MogoLatLng latLng ) {
-
- }
- }
-
- /**
- * 位置变化时,通过围栏({@link #ARRIVE_AT_START_STATION_DISTANCE}M)判断,是否到达x点
- *
- * @param location
- */
- private void onLocationChanged( Location location ) {
- if ( location == null ) {
- return;
- }
- if ( !checkCurrentOCHOrder() ) {
- return;
- }
- if ( mIsArriveAtStartStation ) {
- return;
- }
-// if ( mIsUserArriveAtStartStation ) {
-// return;
-// }
- judgeStartStation( location );
- }
-
-
- /**
- * 根据围栏判断,是否到达起点
- *
- * @param location
- */
- private void judgeStartStation( Location location ) {
- OCHTaxiOrderResponse.OCHTaxiStation station = mCurrentOCHOrder.drivingRoutes.get( 0 );//起点
- double distance = CoordinateUtils.calculateLineDistance( station.lon, station.lat, location.getLongitude(), location.getLatitude() );
- if ( distance > ARRIVE_AT_START_STATION_DISTANCE ) {
- distance = CoordinateUtils.calculateLineDistance( station.lon, station.lat,
- MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon(),
- MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat() );
- }
- if ( distance <= ARRIVE_AT_START_STATION_DISTANCE ) {
- mIsArriveAtStartStation = true;
- OCHTaxiUiController.getInstance().onArriveAtStartStation();
- updateOCHOrderStatus( OCHOrderStatus.ArriveAtStartStation, new OCHOrderStatusCallback() {
- @Override
- public void onSuccess( Object data ) {
- OCHTaxiUiController.getInstance().onOrderStatusChanged(OCHOrderStatus.ArriveAtStartStation.getCode());
- Logger.d( TAG, "更新状态成功" );
- }
-
- @Override
- public void onFail() {
- Logger.d( TAG, "更新状态失败" );
- }
-
-
- @Override
- public void onError() {
- Logger.d( TAG, "更新状态失败2" );
- }
- } );
- return;
- }
-// Logger.d( TAG, "distance = %s", distance );
- }
-
- /**
- * 是否已到达起始站
- */
- public boolean isArriveAtStartStation() {
- return mIsArriveAtStartStation;
- }
-
- /**
- * 是否已到达终点站
- *
- * @return
- */
- public boolean isArriveAtEndStation() {
- return mIsArriveAtEndStation;
- }
-
-
- /**
- * 设置去往终点状态
- *
- * @param isOnTheWay2EndStation
- */
- public void setOnTheWay2EndStation( boolean isOnTheWay2EndStation ) {
- this.mIsOnTheWay2EndStation = isOnTheWay2EndStation;
- OCHTaxiUiController.getInstance().onTheWay2EndStation();
- }
-
- /**
- * 是否在去往目的地的路上
- *
- * @return
- */
- public boolean isOnTheWay2EndStation() {
- return mIsOnTheWay2EndStation;
- }
-
- /**
- * 后端长链推送通知新订单
- */
- private class OrderMsgListener implements IMogoOnMessageListener< OCHTaxiOrderResponse > {
- @Override
- public Class< OCHTaxiOrderResponse > target() {
- return OCHTaxiOrderResponse.class;
- }
-
- @Override
- public void onMsgReceived( OCHTaxiOrderResponse obj ) {
- if ( obj == null ) {
- return;
- }
- if (mOCHRHCarstatus != 1){
- return;
- }
- Logger.d( TAG, "收到新订单" + GsonUtil.jsonFromObject(obj));
-
- mCurrentOCHOrder = obj;
- cacheOrderInfo2Native( mCurrentOCHOrder );
- Location location = MogoApisHandler.getInstance()
- .getApis()
- .getMapServiceApi()
- .getNavi( mContext )
- .getCarLocation2();
- onLocationChanged( location );
- if ( !isArriveAtStartStation() ) {
- registerCarLocationListener();
- }
- OCHTaxiUiController.getInstance().onOrderStatusChanged(mCurrentOCHOrder.orderDispatchType);
- }
- }
-
- /**
- * 保存订单到本地,避免车机重启丢失数据
- *
- * @param obj
- */
- private void cacheOrderInfo2Native( OCHTaxiOrderResponse obj ) {
- if ( obj == null ) {
- return;
- }
- SharedPrefsMgr.getInstance( mContext ).putString( SP_KEY_OCH_TAXI_ORDER, GsonUtil.jsonFromObject( obj ) );
- }
-
- /**
- * 达到起始站围栏监听
- */
- private void registerCarLocationListener() {
- MogoApisHandler.getInstance()
- .getApis()
- .getRegisterCenterApi()
- .registerCarLocationChangedListener( TAG,
- mCarLocationChangedListener2 == null ? mCarLocationChangedListener2 = new LocationListener() : mCarLocationChangedListener2 );
- }
-
- /**
- * 注销到达起始站围栏监听
- */
- public void unregisterCarLocationListener() {
- if ( mCarLocationChangedListener2 == null ) {
- return;
- }
- MogoApisHandler.getInstance()
- .getApis()
- .getRegisterCenterApi()
- .unregisterCarLocationChangedListener( TAG, mCarLocationChangedListener2 );
- }
-
- public void unregisterSocketListener(){
- MogoApisHandler.getInstance()
- .getApis()
- .getSocketManagerApi(mContext)
- .unregisterLifecycleListener(10010);
- }
-
- /**
- * 后端长链推送通知订单状态被改变
- */
- private class OrderStatusMsgListener implements IMogoOnMessageListener< OCHTaxiOrderStatusResponse > {
-
- @Override
- public Class target() {
- return OCHTaxiOrderStatusResponse.class;
- }
-
- @Override
- public void onMsgReceived( OCHTaxiOrderStatusResponse obj ) {
- if ( obj == null ) {
- return;
- }
- if (mOCHRHCarstatus != 1){
- return;
- }
-
- Logger.d(TAG, "订单状态被改变:" + GsonUtil.jsonFromObject(obj));
- OCHOrderStatus status = OCHOrderStatus.valueOf( obj.orderDispatchType );
- switch ( status ) {
- case Cancel:
- clearCurrentOCHOrder();
- OCHTaxiUiController.getInstance().onOrderStatusChanged(status.getCode());
- break;
- case UserArriveAtStartStation:
- mIsArriveAtStartStation = true;
- OCHTaxiUiController.getInstance().onUserArriveAtStartStation();
- break;
- default:
- Logger.d( TAG, "current order status: %s", status );
- break;
- }
- }
- }
-
- private class OCHSocketLifeCycleLisnter implements IMogoLifecycleListener {
-
- @Override
- public void onConnectFailure() {
- Logger.e(TAG,"socket onConnectFailure");
- }
-
- @Override
- public void onConnectSuccess() {
- Logger.e(TAG,"socket onConnectSuccess");
- stopSocketMakeUp();
- }
-
- @Override
- public void onConnectLost() {
- Logger.e(TAG,"socket onConnectLost");
- startSocketMakeUp();
- }
- }
-
- public void startSocketMakeUp(){
- if (mOCHRHCarstatus == 1){
- timeLoop();
- }
- }
-
- public void stopSocketMakeUp(){
- if (mDisposable != null){
- mDisposable.dispose();
- }
- }
-
- /**
- * 自动驾驶本地通知订单到站
- */
- private class OCHArriveNotifyCallback implements IMogoAdasOCHCallback {
- @Override
- public void onArriveAt( AutopilotStationInfo data ) {
- if ( data == null ) {
- return;
- }
- if ( mIsArriveAtEndStation ) {
- return;
- }
- if ( !checkCurrentOCHOrder() ) {
- return;
- }
- mIsArriveAtEndStation = true;
- OCHTaxiUiController.getInstance().onArriveAtEndStation();
- }
-
- @Override
- public void onStateChanged( int state, String reason ) {
-// Logger.d( TAG, "state = %s", state );
- OCHTaxiUiController.getInstance().onAutoPilotStatusChanged( state, reason );
- }
- }
-
- /**
- * 更新订单状态
- *
- * @param orderStatus 订单状态
- */
- public void updateOCHOrderStatus( OCHOrderStatus orderStatus, OCHOrderStatusCallback callback ) {
- if ( mCurrentOCHOrder == null ) {
- return;
- }
- if ( mOCHTaxiServiceApi == null ) {
- mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi().create( OCHTaxiServiceApi.class, HostConst.OCH_DOMAIN );
- }
- mOCHTaxiServiceApi.updateOrderStatus( new OCHTaxiOrderStatus( MoGoAiCloudClientConfig.getInstance().getSn(), mCurrentOCHOrder.orderNo, orderStatus.getCode() ) )
- .subscribeOn( Schedulers.io() )
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< BaseData >( RequestOptions.create( mContext ) ) {
- @Override
- public void onSuccess( BaseData o ) {
- super.onSuccess( o );
- if ( callback != null ) {
- callback.onSuccess( o );
- }
- }
-
- @Override
- public void onError( Throwable e ) {
- super.onError( e );
- if ( callback != null ) {
- callback.onError();
- }
- Logger.e(TAG,"updateOCHOrderStatus:"+e.getMessage());
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- Logger.e(TAG,"updateOCHOrderStatus:"+message);
- if ( callback != null ) {
- callback.onFail();
- }
- }
- } );
- }
-
- /**
- * 查询订单状态
- *
- * @param orderNo 订单号
- */
- public void queryOCHOrderStatus( String orderNo, OCHOrderStatusCallback< OCHTaxiOrderResponse2 > callback ) {
- if ( mOCHTaxiServiceApi == null ) {
- mOCHTaxiServiceApi = MogoApisHandler.getInstance().getApis().getNetworkApi().create( OCHTaxiServiceApi.class, HostConst.OCH_DOMAIN );
- }
- mOCHTaxiServiceApi.queryOrder( new OCHTaxiOrderStatus( MoGoAiCloudClientConfig.getInstance().getSn(), orderNo, OCHOrderStatus.None.getCode() ) )
- .subscribeOn( Schedulers.io() )
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< OCHTaxiOrderResponse2 >( RequestOptions.create( mContext ) ) {
- @Override
- public void onSuccess( OCHTaxiOrderResponse2 o ) {
- super.onSuccess( o );
- if ( callback != null ) {
- callback.onSuccess( o );
- }
- }
-
- @Override
- public void onError( Throwable e ) {
- super.onError( e );
- if ( callback != null ) {
- callback.onError();
- }
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- Logger.e("MogoOCHTaxi","queryOCHOrderStatus:"+message);
- if ( callback != null ) {
- callback.onFail();
- }
- }
- } );
- }
-
- /**
- * 清除订单信息
- */
- public void clearCurrentOCHOrder() {
- mCurrentOCHOrder = null;
- mIsArriveAtStartStation = false;
- mIsArriveAtEndStation = false;
- mIsOnTheWay2EndStation = false;
-// mIsUserArriveAtStartStation = false;
- SharedPrefsMgr.getInstance( mContext ).remove( SP_KEY_OCH_TAXI_ORDER );
- }
-
- /**
- * 检测当前订单
- *
- * @return
- */
- public boolean checkCurrentOCHOrder() {
- if ( mCurrentOCHOrder != null
- && mCurrentOCHOrder.drivingRoutes != null) {
- return true;
- }
- return false;
- }
-
- /**
- * 以当前订单为基础,开启自动驾驶
- */
- public void startAutoPilot() {
- if ( !checkCurrentOCHOrder() ) {
- Logger.e( TAG, "no order or order is empty." );
- return;
- }
-
- AutopilotControlParameters parameters = new AutopilotControlParameters();
- parameters.vehicleType = mCurrentOCHOrder.orderType;
- parameters.startLatLon = new AutopilotControlParameters.AutoPilotLonLat( mCurrentOCHOrder.drivingRoutes.get( 0 ).wgsLat, mCurrentOCHOrder.drivingRoutes.get( 0 ).wgsLon );
- parameters.endLatLon = new AutopilotControlParameters.AutoPilotLonLat( mCurrentOCHOrder.drivingRoutes.get( 1 ).wgsLat, mCurrentOCHOrder.drivingRoutes.get( 1 ).wgsLon );
- MogoApisHandler.getInstance()
- .getApis()
- .getAdasControllerApi()
- .aiCloudToAdasData( parameters );
- Logger.d( TAG, "start autopilot with parameter: %s", GsonUtil.jsonFromObject( parameters ) );
- }
-
- /**
- * 获取当前订单
- *
- * @return
- */
- public OCHTaxiOrderResponse getCurrentOCHOrder() {
- return mCurrentOCHOrder;
- }
-
- public void calculateTravelDistance(Location carLocation){
- if (mCurrentOCHOrder.drivingRoutes != null && mCurrentOCHOrder.drivingRoutes.size()>0){
- OCHTaxiOrderResponse.OCHTaxiStation endStationOCHLocation = mCurrentOCHOrder.drivingRoutes.get(1);
- double distance = CoordinateUtils.calculateLineDistance(
- endStationOCHLocation.lon, endStationOCHLocation.lat,
- carLocation.getLongitude(), carLocation.getLatitude());
- mCurrentOCHOrder.decreaseTravelDistance(distance);
- }
- }
-
- /**
- * 结束自动驾驶
- */
- public void cancelAutopilot() {
- try {
- MogoApisHandler.getInstance()
- .getApis()
- .getAdasControllerApi()
- .cancelAutopilot();
- Logger.d( TAG, "结束自动驾驶" );
- unregisterCarLocationListener();
- } catch ( Exception e ) {
- e.printStackTrace();
- }
- }
-
- private static final int PERIOD = 1 * 1000;
- private static final int DELAY = 100;
- private Disposable mDisposable;
- /**
- * 定时循环任务
- */
- private void timeLoop() {
- mDisposable = Observable.interval(DELAY, PERIOD, TimeUnit.MILLISECONDS)
- .map((aLong -> aLong + 1))
- .subscribeOn(Schedulers.io())
- .observeOn(AndroidSchedulers.mainThread())
- .subscribe(aLong -> querryOrderStatusForMakeUp(null));
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHCarStatus.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHCarStatus.java
deleted file mode 100644
index b3744a6063..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHCarStatus.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.mogo.och.taxi;
-
-import com.mogo.eagle.core.data.BaseData;
-
-public
-/**
- *
- * 修改/查询网约车-出租车订单状态的数据结构
- */
-class OCHCarStatus extends BaseData {
-
- public String sn;// 不排除本地没有缓存订单号的情况
- public int status; //0 收车 1出车
-
- public OCHCarStatus(String sn,
- int status ) {
- this.sn = sn;
- this.status = status;
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHCarStatusResponse.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHCarStatusResponse.java
deleted file mode 100644
index 3a497cabc0..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHCarStatusResponse.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.mogo.och.taxi;
-
-import com.mogo.eagle.core.data.BaseData;
-
-public
-/**
- *
- * 修改/查询网约车-出租车订单状态的数据结构
- */
-class OCHCarStatusResponse extends BaseData {
-
- public String sn;// 不排除本地没有缓存订单号的情况
- public int status; //0 收车 1出车
- public Result data;
-
- public OCHCarStatusResponse(String sn,
- int status ) {
- this.sn = sn;
- this.status = status;
- }
- public static class Result{
- public int id;
- public String sn;
- public String areaCode;
- public String plateNumber;
- public int status;
-// String remark;
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHOrderStatus.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHOrderStatus.java
deleted file mode 100644
index 10d20acefc..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHOrderStatus.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.mogo.och.taxi;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 未派单 0
- * 去往上车站点 1
- * 车辆已到达上车站点 2
- * 乘客已到达上车站点 3
- * 去往下车站点 4
- * 到达下车站点 5
- * 已完成 6
- * 已取消 7
- */
-enum OCHOrderStatus {
-
- None( 0 ),
- OnTheWayToStartStation( 1 ),
- ArriveAtStartStation( 2 ),
- UserArriveAtStartStation( 3 ),
- OnTheWayToEndStation( 4 ),
- ArriveAtEndStation( 5 ),
- UserState( 6 ),//小程序用的状态 车机不处理
- Cancel( 7 ),
- JourneyCompleted(8);//行程完成
-
- private int code;
-
- OCHOrderStatus( int code ) {
- this.code = code;
- }
-
- public int getCode() {
- return code;
- }
-
- public static OCHOrderStatus valueOf( int code ) {
- for ( OCHOrderStatus value : OCHOrderStatus.values() ) {
- if ( value.code == code ) {
- return value;
- }
- }
- return None;
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHOrderStatusCallback.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHOrderStatusCallback.java
deleted file mode 100644
index 45be87c871..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHOrderStatusCallback.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.mogo.och.taxi;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 修改订单状态回调接口
- */
-interface OCHOrderStatusCallback< T > {
-
- void onSuccess( T data );
-
- void onFail();
-
- default void onError() {
-
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderResponse.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderResponse.java
deleted file mode 100644
index ffdc0c3451..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderResponse.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package com.mogo.och.taxi;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.List;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 描述
- */
-class OCHTaxiOrderResponse implements Parcelable {
-
- // 订单号
- public String orderNo;
- // 订单运营类型 (9出租车,10小巴)
- public int orderType;
- // 起始站名称
- public String startStation;
- // 目的站名称
- public String endStation;
- // 当前订单状态
- public int orderDispatchType;
- // 起始站目的站距离km
- public double travelDistance;
- // 站点
- public List< OCHTaxiStation > drivingRoutes;
-
- /**
- * @param distance
- */
- public void decreaseTravelDistance( double distance ) {
- travelDistance = ( ( float ) distance / 1000f );
- if ( travelDistance < 0 ) {
- travelDistance = 0;
- }
- }
-
- public static class OCHTaxiStation implements Parcelable {
- public String siteId;
- public String siteName;
- public double lon;// 用于计算距离
- public double lat;
- public double wgsLon;//用于自动驾驶
- public double wgsLat;
- public OCHTaxiStation() {
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- @Override
- public void writeToParcel( Parcel dest, int flags ) {
- dest.writeString( this.siteId );
- dest.writeString( this.siteName );
- dest.writeDouble( this.lon );
- dest.writeDouble( this.lat );
- dest.writeDouble( this.wgsLon );
- dest.writeDouble( this.wgsLat );
- }
-
- protected OCHTaxiStation( Parcel in ) {
- this.siteId = in.readString();
- this.siteName = in.readString();
- this.lon = in.readDouble();
- this.lat = in.readDouble();
- this.wgsLon = in.readDouble();
- this.wgsLat = in.readDouble();
- }
-
- public static final Creator< OCHTaxiStation > CREATOR = new Creator< OCHTaxiStation >() {
- @Override
- public OCHTaxiStation createFromParcel( Parcel source ) {
- return new OCHTaxiStation( source );
- }
-
- @Override
- public OCHTaxiStation[] newArray( int size ) {
- return new OCHTaxiStation[size];
- }
- };
- }
-
- public OCHTaxiOrderResponse() {
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- @Override
- public void writeToParcel( Parcel dest, int flags ) {
- dest.writeString( this.orderNo );
- dest.writeInt( this.orderType );
- dest.writeString( this.startStation );
- dest.writeString( this.endStation );
- dest.writeInt( this.orderDispatchType );
- dest.writeDouble( this.travelDistance );
- dest.writeTypedList( this.drivingRoutes );
- }
-
- protected OCHTaxiOrderResponse( Parcel in ) {
- this.orderNo = in.readString();
- this.orderType = in.readInt();
- this.startStation = in.readString();
- this.endStation = in.readString();
- this.orderDispatchType = in.readInt();
- this.travelDistance = in.readDouble();
- this.drivingRoutes = in.createTypedArrayList( OCHTaxiStation.CREATOR );
- }
-
- public static final Creator< OCHTaxiOrderResponse > CREATOR = new Creator< OCHTaxiOrderResponse >() {
- @Override
- public OCHTaxiOrderResponse createFromParcel( Parcel source ) {
- return new OCHTaxiOrderResponse( source );
- }
-
- @Override
- public OCHTaxiOrderResponse[] newArray( int size ) {
- return new OCHTaxiOrderResponse[size];
- }
- };
-
- @Override
- public String toString() {
- return "OCHTaxiResponse{" +
- "orderNo='" + orderNo + '\'' +
- ", orderType=" + orderType +
- ", startStation='" + startStation + '\'' +
- ", endStation='" + endStation + '\'' +
- ", orderDispatchType=" + orderDispatchType +
- ", travelDistance=" + travelDistance +
- ", drivingRoutes=" + drivingRoutes +
- '}';
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderResponse2.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderResponse2.java
deleted file mode 100644
index fc1ecb4437..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderResponse2.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.mogo.och.taxi;
-
-import com.mogo.eagle.core.data.BaseData;
-
-import java.util.List;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 描述
- */
-class OCHTaxiOrderResponse2 extends BaseData {
-
- public Result data;
-
- public static class Result {
- public String _id;
- // 订单号
- public String orderNo;
- // 订单运营类型 (9出租车,10小巴)
- public int orderType;
-
- // 当前订单状态
- public int orderDispatchType;
- // 起始站目的站距离km
- public double travelDistance;
-
- public String userName;
- public String userPhone;
-
- // 起始站名称
- public String startStation;
- // 起始站ID
- public String startStationId;
- // 起点站点
- public List< Double > startStationCoordinate;
- public List< Double > startGcjStationCoordinate;//高德坐标系 用于距离计算
-
- // 目的站名称
- public String endStation;
- // 目的站ID
- public String endStationId;
- // 终点站点
- public List< Double > endStationCoordinate;
- public List< Double > endGcjStationCoordinate;//高德坐标系 用于距离计算
-
- public String orderStartTime;
- public String cityCode;
- public String areaCode;
- public String createTime;
- public String updateTime;
- public int personNum;
- public String headImgUrl;
- public String lastBrandName;
-
- public String arrivedStartStationTime;
- public String arrivedEndStationTime;
-
- public String sn;
- public String carNum;
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderStatus.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderStatus.java
deleted file mode 100644
index 061dcd6f79..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderStatus.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.mogo.och.taxi;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 修改/查询网约车-出租车订单状态的数据结构
- */
-class OCHTaxiOrderStatus {
-
- public String sn;// 不排除本地没有缓存订单号的情况
- public String orderNo;
- public int orderDispatchType;
-
-
- public OCHTaxiOrderStatus( String sn,
- String orderNo,
- int orderDispatchType ) {
- this.sn = sn;
- this.orderNo = orderNo;
- this.orderDispatchType = orderDispatchType;
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderStatusResponse.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderStatusResponse.java
deleted file mode 100644
index 3dd006f2f1..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOrderStatusResponse.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.mogo.och.taxi;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 描述
- */
-class OCHTaxiOrderStatusResponse {
-
- // 订单号
- public String orderNo;
-
- // 订单运营类型 (9出租车,10小巴)
- public int orderType;
-
- // 起始站名称
- public String startStation;
- public String startStationId;
-
- // 目的站名称
- public String endStation;
- public String endStationId;
-
- // 当前订单状态
- /**
- * 未派单 0
- * 去往上车站点 1
- * 已到达上车站点 2
- * 去往下车站点 3
- * 到达下车站点 4
- * 已完成 5
- * 已取消 6
- */
- public int orderDispatchType;
-
- // 起始站目的站距离km
- public double travelDistance;
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOverlayManager.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOverlayManager.java
deleted file mode 100644
index e12ebe6d6d..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiOverlayManager.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.mogo.och.taxi;
-
-import android.content.Context;
-
-import com.mogo.eagle.core.data.map.MogoLatLng;
-import com.mogo.eagle.core.data.map.MogoLocation;
-import com.mogo.map.overlay.IMogoOverlayManager;
-import com.mogo.map.overlay.IMogoPolyline;
-import com.mogo.map.overlay.MogoPolylineOptions;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.utils.LocationUtils;
-import com.mogo.utils.ColorUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class OCHTaxiOverlayManager {
-
-
- private IMogoPolyline mMoGoPolyline;
- // 连接线参数
- private MogoPolylineOptions mPolylineOptions;
- // 线路径集合
- private List mPolylinePointList;
- // 渐变色
- private List mPolylineColors;
- private Context mContext;
- IMogoOverlayManager mogoOverlayManager;
- public OCHTaxiOverlayManager(Context context) {
- mPolylineOptions = new MogoPolylineOptions();
- // 绘制路径集合
- mPolylinePointList = new ArrayList<>();
- // 引导线颜色
- mPolylineColors = new ArrayList<>();
- mContext = context;
- mogoOverlayManager = MogoApisHandler.getInstance().getApis().getMapServiceApi().getOverlayManager(mContext);
- }
-
- /**
- * 绘制最优路线
- *
- * @param routelist 要绘制的经纬度度集合
- */
- public IMogoPolyline draw(MogoLocation carLocal, List routelist) {
- clearMogoRouteOverlay();
- if (routelist != null) {
-
- // 将当前车辆位置放进去
- mPolylinePointList.add(new MogoLatLng(carLocal.getLatitude(), carLocal.getLongitude()));
- // 过滤后台推送的推荐路线集合
- for (MogoLatLng polyline : routelist) {
- //需要剔除已经行驶过的经纬度,这里需要比对推荐路线集合中的点是否在当前车辆行驶方向前面如果不在则抛弃
- if (LocationUtils.isPointOnCarFront(carLocal, polyline)) {
- mPolylinePointList.add(polyline);
- }
- }
- mPolylineColors.addAll(ColorUtils.getGradientAlpha("#002965ED", "#FF2965ED", "#002965ED", mPolylinePointList.size()));
- // 替换路径集合
- mPolylineOptions.points(mPolylinePointList);
- // 线条粗细,渐变,渐变色值
- mPolylineOptions.width(25).useGradient(true).colorValues(mPolylineColors);
- // 绘制线
- mMoGoPolyline = mogoOverlayManager.addPolyline(mPolylineOptions);
- }
- return mMoGoPolyline;
- }
-
- public void clearMogoRouteOverlay(){
- if (mMoGoPolyline != null) {
- mMoGoPolyline.remove();
- mPolylinePointList.clear();
- mPolylineColors.clear();
- }
- }
-
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiServiceApi.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiServiceApi.java
deleted file mode 100644
index b8c437336a..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/OCHTaxiServiceApi.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.mogo.och.taxi;
-
-import com.mogo.eagle.core.data.BaseData;
-
-import io.reactivex.Observable;
-import retrofit2.http.Body;
-import retrofit2.http.Headers;
-import retrofit2.http.POST;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 网约车-出租车接口
- */
-interface OCHTaxiServiceApi {
-
- /**
- * 更新订单状态
- *
- * @param status
- * @return
- */
- @Headers( {"Content-type:application/json;charset=UTF-8"} )
- @POST( "/yycp-onlinecar-hailing/onlineCarHailing/order/updateOCHOrderState/v1" )
- Observable< BaseData > updateOrderStatus( @Body OCHTaxiOrderStatus status );
-
- /**
- * 查询订单状态
- *
- * @return
- */
- @Headers( {"Content-type:application/json;charset=UTF-8"} )
- @POST( "/yycp-onlinecar-hailing/onlineCarHailing/order/queryOrderForCar/v1" )
- Observable< OCHTaxiOrderResponse2 > queryOrder( @Body OCHTaxiOrderStatus status );
- /**
- * 查询网约车状态
- */
- @Headers({"Content-type:application/json;charset=UTF-8"})
- @POST("/yycp-onlinecar-hailing/onlineCarHailing/order/queryTaxiCarStatus/v1")
- Observable queryCarStatus(@Body OCHCarStatus sn );
-
-
- /**
- * 更新网约车状态
- */
- @Headers({"Content-type:application/json;charset=UTF-8"})
- @POST("/yycp-onlinecar-hailing/onlineCarHailing/order/updateTaxiCarStatus/v1")
- Observable updateCarStatus(@Body OCHCarStatus status );
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiFragment.java
deleted file mode 100644
index 12450552ac..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiFragment.java
+++ /dev/null
@@ -1,511 +0,0 @@
-package com.mogo.och.taxi.ui;
-
-import android.location.Location;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.TextView;
-
-import androidx.annotation.NonNull;
-
-import com.mogo.cloud.commons.utils.CoordinateUtils;
-import com.mogo.eagle.core.data.map.MogoLatLng;
-import com.mogo.eagle.core.data.map.MogoLocation;
-import com.mogo.map.navi.IMogoCarLocationChangedListener2;
-import com.mogo.map.overlay.MogoPolylineOptions;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.utils.LocationUtils;
-import com.mogo.och.BaseOchFragment;
-import com.mogo.och.taxi.IMogoADASAutoPilotStatusChangedListener;
-import com.mogo.och.taxi.IMogoOCHTaxiArriveCallback;
-import com.mogo.och.taxi.IOperationChangedListener;
-import com.mogo.och.taxi.MogoOCHTaxiModel;
-import com.mogo.och.taxi.OCHOrderStatus;
-import com.mogo.och.taxi.OCHOrderStatusCallback;
-import com.mogo.och.taxi.R;
-import com.mogo.och.view.SlidePanelView;
-import com.mogo.service.adas.IMogoAdasOCHCallback;
-import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
-import com.mogo.utils.logger.Logger;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/18
- *
- * 网约车-出租车UI
- */
-class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > implements OCHTaxiView,
- IMogoStatusChangedListener,
- IMogoOCHTaxiArriveCallback,
- IMogoADASAutoPilotStatusChangedListener,
- IOperationChangedListener,
- IMogoAdasOCHCallback,
- IMogoCarLocationChangedListener2 {
-
- public static final String TAG = "OCHTaxiFragment";
-
- public static OCHTaxiFragment newInstance() {
-
- Bundle args = new Bundle();
-
- OCHTaxiFragment fragment = new OCHTaxiFragment();
- fragment.setArguments( args );
- return fragment;
- }
-
- private TextView mOrderStatus;
- private TextView mStartStationName;
- private TextView mEndStationName;
- private TextView mDistance;
-
- private MogoPolylineOptions mogoPolylineOptions;
- private volatile int saveOrderState = -1;
- @Override
- public int getStationPanelViewId() {
- return R.layout.module_och_taxi_panel;
- }
-
- @Override
- public void restartAutopilot() {
- // 在自动驾驶中,才会有重新开启自动驾驶的操作
- if ( MogoOCHTaxiModel.getInstance().isOnTheWay2EndStation() ) {
- Logger.d( TAG, "restartAutopilot" );
- MogoOCHTaxiModel.getInstance().startAutoPilot();
- }
- }
-
- @Override
- protected void initViews() {
- super.initViews();
- mOrderStatus = findViewById( R.id.module_och_taxi_order_status );
- mStartStationName = findViewById( R.id.module_och_taxi_order_start_station );
- mEndStationName = findViewById( R.id.module_och_taxi_order_end_station );
- mDistance = findViewById( R.id.module_och_taxi_order_distance );
-
-// showPanel();
- hidPanel();
- initListeners();
-// updateOrderStatus();
- if ( MogoApisHandler.getInstance()
- .getApis()
- .getStatusManagerApi()
- .isVrMode() ) {
- vrMode();
- } else {
- flatMode();
- }
-
- tvOperationStatus.setVisibility(View.VISIBLE);
- }
-
- private void initListeners() {
- MogoApisHandler.getInstance()
- .getApis()
- .getStatusManagerApi()
- .registerStatusChangedListener( TAG, StatusDescriptor.VR_MODE, this );
- OCHTaxiUiController.getInstance().setOCHTaxiArriveCallback( this );
- OCHTaxiUiController.getInstance().setAutoPilotStatusChangedListener( this );
- OCHTaxiUiController.getInstance().setOperationChangeListener(this);
- MogoApisHandler.getInstance()
- .getApis()
- .getRegisterCenterApi()
- .registerCarLocationChangedListener( TAG, this );
- }
-
- @NonNull
- @Override
- protected OCHTaxiPresenter createPresenter() {
- return new OCHTaxiPresenter( this );
- }
-
- @Override
- public void onStatusChanged( StatusDescriptor descriptor, boolean isTrue ) {
- if ( isTrue ) {
- vrMode();
- } else {
- flatMode();
- }
- }
-
- @Override
- protected void onChangeOperationStatus() {
- super.onChangeOperationStatus();
- MogoOCHTaxiModel.getInstance().changedOperationStatus();
- }
-
- private void vrMode() {
- if ( mRootView != null ) {
- mRootView.setVisibility(
- View.VISIBLE
- );
- }
- }
-
- private void flatMode() {
- if ( mRootView != null ) {
- mRootView.setVisibility(
- View.GONE
- );
- }
- }
-
- private boolean isSpeakedEndingNotice = false;
- /**
- * 初始化订单信息
- */
- private void updateOrderStatus() {
- updateOrderBaseStatusInfo();
- if ( MogoOCHTaxiModel.getInstance().isArriveAtEndStation() ) {
- Logger.d( TAG, "已经达到终点" );
- slidePanelView.setVisibility( View.VISIBLE );
- slidePanelView.setText( getString( R.string.module_och_taxi_arrive_at_end_station ) );
- mOrderStatus.setText( R.string.module_och_taxi_arrive_at_end_station2 );
- } else if ( MogoOCHTaxiModel.getInstance().isOnTheWay2EndStation() ) {
- Logger.d( TAG, "已经去往终点" );
- slidePanelView.setVisibility( View.GONE );
- mOrderStatus.setText( R.string.module_och_taxi_on_the_way_2_end_station );
- } else if ( MogoOCHTaxiModel.getInstance().isArriveAtStartStation() ) {
- Logger.d( TAG, "已经达到起点" );
- mOrderStatus.setText( R.string.module_och_taxi_waiting );
- slidePanelView.setVisibility( View.VISIBLE );
- slidePanelView.setText( getString( R.string.module_och_taxi_arrive_at_start_station ) );
- } else if ( MogoOCHTaxiModel.getInstance().checkCurrentOCHOrder() ) {
- Logger.d( TAG, "去往上车站点" );
- slidePanelView.setVisibility( View.GONE );
- mOrderStatus.setText( R.string.module_och_taxi_new_order );
- }
- }
-
- public synchronized void SpeakNoticeOnce(){
- if (!isSpeakedEndingNotice){
- isSpeakedEndingNotice = true;
- showNotice( getString( R.string.module_och_taxi_order_complete_1) );
- }
- }
-
- /**
- * 更新订单基本信息
- */
- private void updateOrderBaseStatusInfo() {
- if ( MogoOCHTaxiModel.getInstance().checkCurrentOCHOrder() ) {
- mStartStationName.setText( MogoOCHTaxiModel.getInstance().getCurrentOCHOrder().startStation );
- mEndStationName.setText( MogoOCHTaxiModel.getInstance().getCurrentOCHOrder().endStation );
- double distance = MogoOCHTaxiModel.getInstance().getCurrentOCHOrder().travelDistance;
- if ( MogoOCHTaxiModel.getInstance().isArriveAtEndStation() ) {
- distance = 0;
- }
- if ( distance * 1000 >= 1000 ) {
- mDistance.setText( String.format( "%.1f km", distance ) );
- } else {
- mDistance.setText( ( ( int ) ( distance * 1000 ) ) + " m" );
- }
-
- }
- }
-
- @Override
- public void onArriveAtStartStation() {
- Logger.d( TAG, "通知达到起点" );
- updateOrderStatus();
- }
-
- @Override
- public void onTheWay2StartStation() {
- Logger.d( TAG, "去往上车站点" );
- updateOrderStatus();
- }
-
- @Override
- public void onArriveAtEndStation() {
- Logger.d( TAG, "通知达到终点" );
- updateOrderStatus();
- MogoOCHTaxiModel.getInstance().updateOCHOrderStatus( OCHOrderStatus.ArriveAtEndStation, new OCHOrderStatusCallback() {
- @Override
- public void onSuccess( Object data ) {
- Logger.d( TAG, "更新状态成功" );
- onOrderStatusChanged(OCHOrderStatus.ArriveAtEndStation.getCode());
- }
-
- @Override
- public void onFail() {
- Logger.d( TAG, "更新状态失败" );
- }
-
-
- @Override
- public void onError() {
- Logger.d( TAG, "更新状态失败2" );
- }
- } );
-// MogoApisHandler.getInstance()
-// .getApis()
-// .getRegisterCenterApi()
-// .unregisterCarLocationChangedListener( TAG, this );
- }
-
- @Override
- public void onTheWay2EndStation() {
- Logger.d( TAG, "通知去往终点" );
- updateOrderStatus();
- }
-
- @Override
- public void onUserArriveAtStartStation() {
- Logger.d( TAG, "通知乘客已上车" );
- updateOrderStatus();
- }
-
- @Override
- public void onDestroyView() {
- super.onDestroyView();
- MogoApisHandler.getInstance()
- .getApis()
- .getStatusManagerApi()
- .unregisterStatusChangedListener( TAG, StatusDescriptor.VR_MODE, this );
- OCHTaxiUiController.getInstance().setOCHTaxiArriveCallback( null );
- OCHTaxiUiController.getInstance().setAutoPilotStatusChangedListener( null );
- OCHTaxiUiController.getInstance().setOperationChangeListener(null);
- MogoApisHandler.getInstance()
- .getApis()
- .getRegisterCenterApi()
- .unregisterCarLocationChangedListener( TAG, this );
- MogoOCHTaxiModel.getInstance().unregisterCarLocationListener();
- MogoOCHTaxiModel.getInstance().unregisterSocketListener();
- mLocation = null;
- }
-
- @Override
- public SlidePanelView.OnSlidePanelMoveToEndListener getSlidePanelOnEndListener() {
- return this::onSlidePanelMoveToEnd;
- }
-
- private void onSlidePanelMoveToEnd() {
- // 已到达终点,需要结束订单
- if ( MogoOCHTaxiModel.getInstance().isArriveAtEndStation() ) {
- MogoOCHTaxiModel.getInstance().updateOCHOrderStatus( OCHOrderStatus.JourneyCompleted, new OCHOrderStatusCallback() {
- @Override
- public void onSuccess( Object data ) {
- Logger.d( TAG, "更新状态成功" );
- MogoOCHTaxiModel.getInstance().clearCurrentOCHOrder();
- MogoOCHTaxiModel.getInstance().cancelAutopilot();
- OCHTaxiUiController.getInstance().onOrderStatusChanged(0);
- }
-
- @Override
- public void onFail() {
- Logger.d( TAG, "更新状态失败" );
- }
-
- @Override
- public void onError() {
- Logger.d( TAG, "更新状态失败2" );
- }
- } );
- return;
- // 乘客已确认到达起点,前往下一站并开启自动驾驶
- } else if ( !MogoOCHTaxiModel.getInstance().isOnTheWay2EndStation() ) {
- MogoOCHTaxiModel.getInstance().startAutoPilot();
- }
- }
-
- @Override
- public void onAutoPilotStatusChanged( int status, String reason ) {
- Logger.d( TAG, "status = %s, reason = %s", status, reason );
- onAutopilotStatusChanged( status == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING );
- if ( status == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING && !MogoOCHTaxiModel.getInstance().isArriveAtEndStation()) {
- resetOCHTaxiOrderAutopilotStatus();
- } else {
- updateOrderStatus();
- }
- }
-
- /**
- * 收到自动驾驶通知的成功状态之后,设置本地状态及服务端状态
- */
- private void resetOCHTaxiOrderAutopilotStatus() {
- MogoOCHTaxiModel.getInstance().setOnTheWay2EndStation( true );
- MogoOCHTaxiModel.getInstance().updateOCHOrderStatus( OCHOrderStatus.OnTheWayToEndStation, new OCHOrderStatusCallback() {
- @Override
- public void onSuccess( Object data ) {
- Logger.d( TAG, "更新状态成功" );
- onOrderStatusChanged(OCHOrderStatus.OnTheWayToEndStation.getCode());
- }
-
- @Override
- public void onFail() {
- Logger.d( TAG, "更新状态失败" );
- }
-
-
- @Override
- public void onError() {
- Logger.d( TAG, "更新状态失败2" );
- }
- } );
- }
-
- @Override
- public void onCarLocationChanged( MogoLatLng latLng ) {
- }
-
- private Location mLocation;
- @Override
- public void onCarLocationChanged2( Location location ) {
- OCHTaxiUiController.getInstance().runOnUIThread( () -> {
- calculateTravelDistance( location );
- } );
- }
-
- /**
- * 根据位置信息计算当前剩余距离
- *
- * @param location
- */
- private void calculateTravelDistance( Location location ) {
- if ( location == null ) {
- return;
- }
-// if ( !MogoOCHTaxiModel.getInstance().isOnTheWay2EndStation() ) {
-// return;
-// }
-// if ( MogoOCHTaxiModel.getInstance().isArriveAtEndStation() ) {
-// return;
-// }
- if ( mLocation == null ) {
- mLocation = location;
- }
-// double distance = CoordinateUtils.calculateLineDistance(
-// location.getLongitude(), location.getLatitude(),
-// mLocation.getLongitude(), mLocation.getLatitude()
-// );
-// Logger.e("lianglihui","calculateTravelDistance:"+distance);
-
- if ( MogoOCHTaxiModel.getInstance().isOnTheWay2EndStation() &&
- MogoOCHTaxiModel.getInstance().checkCurrentOCHOrder() &&
- !MogoOCHTaxiModel.getInstance().isArriveAtEndStation()) {
- MogoOCHTaxiModel.getInstance().calculateTravelDistance(location);
-// MogoOCHTaxiModel.getInstance().getCurrentOCHOrder().decreaseTravelDistance( distance );
- updateOrderBaseStatusInfo();
- }
- mLocation = location;
- }
-
- @Override
- public void onOperationChanged(boolean launch) {
- Logger.e(TAG,"onOperationChanged:"+ launch);
- isOperationStatus = launch;
- if ( launch ) {
- tvOperationStatus.setText( "收车" );
-// showSlidePanle("滑动出发");
-// showPanel();
- } else {
-// AIAssist.getInstance(getContext()).speakTTSVoice("已收车");
- tvOperationStatus.setText("出车");
- hideSlidePanel();
-// hidPanel();
- }
-// changeLayoutViewStatus(launch);
- }
-
- private void changeLayoutViewStatus(boolean launch) {
- getPanelView().setVisibility(launch ? View.VISIBLE : View.INVISIBLE);
- }
-
- @Override
- public void onOrderStatusChanged(int status) {
-
-// int orderState = MogoOCHTaxiModel.getInstance().getCurrentOCHOrder().orderDispatchType;
-// if (orderState == status){
-// return;
-// }
- getActivity().runOnUiThread(() -> {
- if (status == OCHOrderStatus.None.getCode() || status == OCHOrderStatus.Cancel.getCode() || status == OCHOrderStatus.JourneyCompleted.getCode() ){
- getPanelView().setVisibility(View.INVISIBLE);
- hideSlidePanel();
- changeOperationViewVisible(View.VISIBLE);
- isSpeakedEndingNotice = false;
- } else {
- getPanelView().setVisibility(View.VISIBLE);
- changeOperationViewVisible(View.INVISIBLE);
- }
-
- if(status != saveOrderState){
- OCHOrderStatus ochStatus = OCHOrderStatus.valueOf( status );
- switch (ochStatus){
- case OnTheWayToStartStation:
- showNotice(getString( R.string.module_och_taxi_new_order));
- break;
- case Cancel:
- showNotice(getString( R.string.module_och_taxi_order_cancel));
- break;
- case ArriveAtStartStation:
- showNotice( getString( R.string.module_och_taxi_order_status_ph_text) );
- break;
- case OnTheWayToEndStation:
-// showNotice("欢迎使用蘑菇智行");
- break;
- case ArriveAtEndStation:
- showNotice( getString( R.string.module_och_taxi_order_complete_1) );
- break;
- case JourneyCompleted:
- showNotice( "感谢您使用蘑菇智行,再见~" );
- break;
- }
- }
- saveOrderState = status;
- updateOrderStatus();
- });
- }
-
-
- public double calculateTravelDistance(MogoLocation carLocation,List routeList){
- List mPolylinePointList = new ArrayList<>();
- mPolylinePointList.add(new MogoLatLng(carLocation.getLatitude(), carLocation.getLongitude()));
- MogoLatLng routeLatLng;
- for (int i = 0 ; i< routeList.size() ; i++) {
- routeLatLng =routeList.get(i);
- //需要剔除已经行驶过的经纬度,这里需要比对推荐路线集合中点是否在当前车w辆行驶方向前面如果不在则抛弃
- if (LocationUtils.isPointOnCarFront(carLocation, routeLatLng)) {
- mPolylinePointList.add(routeLatLng);
- }
- }
- MogoLatLng routeLatLng1,routeLatLng2;
- double distance = 0;
- for (int i = 0; i < mPolylinePointList.size() ; i ++){
- if (i < mPolylinePointList.size() -1 ){
- routeLatLng1 = mPolylinePointList.get(i);
- routeLatLng2 = mPolylinePointList.get(i+1);
- distance += CoordinateUtils.calculateLineDistance(
- routeLatLng1.getLon(), routeLatLng1.getLat(),
- routeLatLng2.getLon(), routeLatLng2.getLat()
- );
- }
- }
- return distance;
- }
-
- @Override
- public void onArriveAt(AutopilotStationInfo data) {
- Logger.d( TAG, "行程结束");
- MogoApisHandler.getInstance().getApis().getAdasControllerApi().cancelAutopilot();
- }
-
- @Override
- public void onStateChanged(int state, String reason) {
- Logger.d( TAG, "onStateChange: " + state );
- switch ( state ) {
- case IMogoAdasOCHCallback.STATUS_AUTOPILOT_ENABLE:
- hideSlidePanel();
- break;
- case IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING:
- break;
- default:
- break;
- }
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiPresenter.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiPresenter.java
deleted file mode 100644
index 477e9df753..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiPresenter.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.mogo.och.taxi.ui;
-
-import androidx.annotation.NonNull;
-import androidx.lifecycle.LifecycleOwner;
-
-import com.mogo.commons.mvp.Presenter;
-import com.mogo.utils.logger.Logger;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/18
- *
- * 描述
- */
-class OCHTaxiPresenter extends Presenter< OCHTaxiView > {
-
- private static final String TAG = "OCHTaxiPresenter";
-
- public OCHTaxiPresenter( OCHTaxiView view ) {
- super( view );
- }
-
- @Override
- public void onCreate( @NonNull LifecycleOwner owner ) {
- super.onCreate( owner );
- Logger.d( TAG, "网约车-出租车拿到订单" );
- }
-
- @Override
- public void onDestroy( @NonNull LifecycleOwner owner ) {
- super.onDestroy( owner );
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiUiController.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiUiController.java
deleted file mode 100644
index a7d025469a..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiUiController.java
+++ /dev/null
@@ -1,204 +0,0 @@
-package com.mogo.och.taxi.ui;
-
-import android.os.Looper;
-import android.util.Log;
-
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentActivity;
-import androidx.fragment.app.FragmentManager;
-
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.och.taxi.IMogoADASAutoPilotStatusChangedListener;
-import com.mogo.och.taxi.IMogoOCHTaxiArriveCallback;
-import com.mogo.och.taxi.IOperationChangedListener;
-import com.mogo.och.taxi.MogoOCHTaxiModel;
-import com.mogo.utils.UiThreadHandler;
-import com.mogo.utils.logger.Logger;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/18
- *
- * 控制UI显示
- */
-class OCHTaxiUiController implements IMogoOCHTaxiArriveCallback, IMogoADASAutoPilotStatusChangedListener {
-
- private static final String TAG = "OCHTaxiUiController";
-
- private static volatile OCHTaxiUiController sInstance;
- private FragmentActivity mActivity;
- private int mContainerId;
-
- private IMogoOCHTaxiArriveCallback mOCHTaxiArriveCallback;
- private IMogoADASAutoPilotStatusChangedListener mAutoPilotStatusChangedListener;
- private IOperationChangedListener mOperationChangedLisnter;
-
- private OCHTaxiUiController() {
- }
-
- public static OCHTaxiUiController getInstance() {
- if ( sInstance == null ) {
- synchronized ( OCHTaxiUiController.class ) {
- if ( sInstance == null ) {
- sInstance = new OCHTaxiUiController();
- }
- }
- }
- return sInstance;
- }
-
- private Object readResolve() {
- // 阻止反序列化,必须实现 Serializable 接口
- return sInstance;
- }
-
- public void init( FragmentActivity activity, int containerId ) {
- mActivity = activity;
- mContainerId = containerId;
- }
-
- public void addFragment() {
- Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
- runOnUIThread( this::addFragmentImpl );
- }
-
- private void addFragmentImpl() {
- if ( !MogoOCHTaxiModel.getInstance().checkCurrentOCHOrder() ) {
- return;
- }
- Fragment fragment = null;
- FragmentManager fragmentManager = mActivity.getSupportFragmentManager();
- fragment = fragmentManager.findFragmentByTag( OCHTaxiFragment.TAG );
- if ( fragment == null ) {
- fragment = OCHTaxiFragment.newInstance();
- }
- mActivity.getSupportFragmentManager()
- .beginTransaction()
- .replace( mContainerId, fragment, OCHTaxiFragment.TAG )
- .commitNowAllowingStateLoss();
-
- Logger.d( TAG, "add fragment" );
- }
-
- public void removeFragment() {
- runOnUIThread( () -> {
- Fragment fragment = null;
- FragmentManager fragmentManager = mActivity.getSupportFragmentManager();
- fragment = fragmentManager.findFragmentByTag( OCHTaxiFragment.TAG );
- if ( fragment == null ) {
- return;
- }
- fragmentManager.beginTransaction()
- .remove( fragment )
- .commitNowAllowingStateLoss();
- } );
- }
-
- public void setOCHTaxiArriveCallback( IMogoOCHTaxiArriveCallback OCHTaxiArriveCallback ) {
- this.mOCHTaxiArriveCallback = OCHTaxiArriveCallback;
- }
-
- public void setAutoPilotStatusChangedListener( IMogoADASAutoPilotStatusChangedListener autoPilotStatusChangedListener ) {
- this.mAutoPilotStatusChangedListener = autoPilotStatusChangedListener;
- }
-
- public void setOperationChangeListener(IOperationChangedListener listener){
- this.mOperationChangedLisnter = listener;
- }
-
- @Override
- public void onTheWay2StartStation() {
- runOnUIThread( () -> {
- if ( mOCHTaxiArriveCallback != null ) {
- mOCHTaxiArriveCallback.onTheWay2StartStation();
- }
- } );
- }
-
- @Override
- public void onArriveAtStartStation() {
- runOnUIThread( () -> {
- if ( mOCHTaxiArriveCallback != null ) {
- mOCHTaxiArriveCallback.onArriveAtStartStation();
- }
- } );
- }
-
- @Override
- public void onTheWay2EndStation() {
- runOnUIThread( () -> {
- if ( mOCHTaxiArriveCallback != null ) {
- mOCHTaxiArriveCallback.onTheWay2EndStation();
- }
- } );
- }
-
- @Override
- public void onArriveAtEndStation() {
- runOnUIThread( () -> {
- if ( mOCHTaxiArriveCallback != null ) {
- mOCHTaxiArriveCallback.onArriveAtEndStation();
- }
- } );
- }
-
- @Override
- public void onUserArriveAtStartStation() {
- runOnUIThread( () -> {
- if ( mOCHTaxiArriveCallback != null ) {
- mOCHTaxiArriveCallback.onUserArriveAtStartStation();
- }
- } );
- }
-
- public void runOnUIThread( Runnable executor ) {
- if ( executor == null ) {
- return;
- }
- if ( Looper.myLooper() != Looper.getMainLooper() ) {
- UiThreadHandler.post( executor );
- } else {
- executor.run();
- }
- }
-
- @Override
- public void onAutoPilotStatusChanged( int status, String reason ) {
- runOnUIThread( () -> {
- if ( mAutoPilotStatusChangedListener != null ) {
- mAutoPilotStatusChangedListener.onAutoPilotStatusChanged( status, reason );
- }
- } );
- }
-
-
-
-
- /**
- * 进入鹰眼模式,设置手势缩放地图失效
- */
- public void stepIntoVrMode() {
- Logger.d( TAG, "进入vr模式" );
- MogoApisHandler.getInstance()
- .getApis()
- .getMapServiceApi()
- .getMapUIController()
- .openVrMode( false );
- }
-
- public void onOperationChanged(boolean b) {
- runOnUIThread( () -> {
- if (mOperationChangedLisnter != null){
- mOperationChangedLisnter.onOperationChanged(b);
- }
- } );
- }
- public void onOrderStatusChanged(int status){
- runOnUIThread( () -> {
- if (mOperationChangedLisnter != null){
- mOperationChangedLisnter.onOrderStatusChanged(status);
- }
- } );
- }
-}
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiView.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiView.java
deleted file mode 100644
index ba9377c8fe..0000000000
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiView.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.mogo.och.taxi.ui;
-
-import com.mogo.commons.mvp.IView;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/18
- *
- * 描述
- */
-interface OCHTaxiView extends IView {
-}
diff --git a/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_bkg.xml b/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_bkg.xml
deleted file mode 100644
index 04864e072b..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_bkg.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_distance_bkg.xml b/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_distance_bkg.xml
deleted file mode 100644
index 50d9558492..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_distance_bkg.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml b/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml
deleted file mode 100644
index a9ccf96c3e..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/raw/taxi_order.json b/OCH/mogo-och-taxi/src/main/res/raw/taxi_order.json
deleted file mode 100644
index e8d0819d3f..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/raw/taxi_order.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "drivingRoutes": [
- {
- "lat": 40.197234,
- "lon": 116.74143,
- "siteId": "1.0",
- "siteName": "万集东门站"
- },
- {
- "lat": 40.1953113732,
- "lon": 116.729134342,
- "siteId": "2.0",
- "siteName": "市政府前街18号"
- }
- ],
- "endStation": "市政府前街18号",
- "orderDispatchType": 1,
- "orderNo": "CZ20210430000005",
- "orderType": 9,
- "startStation": "万集东门站",
- "travelDistance": 0.6
-}
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/raw/taxi_order_detail.json b/OCH/mogo-och-taxi/src/main/res/raw/taxi_order_detail.json
deleted file mode 100644
index 7d62fcacb7..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/raw/taxi_order_detail.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "code": 0,
- "msg": "",
- "detailMsg": "",
- "result": {
- "_id": "5352c1d2c9d84ab3ab9ecf1e47e13bdd",
- "orderNo": "CZ20210427000016",
- "orderType": 9,
- "userName": "董QAD",
- "userPhone": "15631204018",
- "startStationId": 10000,
- "startStation": "0409第一站",
- "startStationCoordinate": [
- 116.7389159039,
- 40.1992312592
- ],
- "endStationId": 21,
- "endStation": "第二十一站",
- "endStationCoordinate": [
- 116.737866,
- 40.19646
- ],
- "orderDispatchType": 1,
- "carNum": "京NB010",
- "sn": "F803EB2046PZD00149",
- "orderStartTime": "Apr 27, 2021 8:55:44 PM",
- "arrivedStartStationTime": "",
- "arrivedEndStationTime": "",
- "cityCode": "010",
- "areaCode": "1001",
- "createTime": "Apr 27, 2021 8:55:44 PM",
- "updateTime": "Apr 27, 2021 8:55:56 PM",
- "personNum": 1,
- "travelDistance": 0.3,
- "vehicleColour": "黑色",
- "lastBrandName": "",
- "headImgUrl": "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83ep4YkeZqjiazTK87NQtYp6KMYvAdJcxNpxyJ2gibeNNheH1HFaJdX4hB15eIR3zZdGMWNanKzIn460w/132"
- }
-}
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/raw/taxi_order_state_update.json b/OCH/mogo-och-taxi/src/main/res/raw/taxi_order_state_update.json
deleted file mode 100644
index 9ee3d17f02..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/raw/taxi_order_state_update.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "endStation": "市政府前街18号",
- "endStationId": "2.0",
- "orderDispatchType": 7,
- "orderNo": "CZ20210430000005",
- "orderType": 9,
- "startStation": "万集东门站",
- "startStationId": "1.0",
- "travelDistance": 0.6
-}
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1440/dimens.xml b/OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1440/dimens.xml
deleted file mode 100644
index 7c13d7dcbd..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1440/dimens.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- 464px
- 310px
- 15px
- 25px
- 25px
- 32px
- 1px
- 20px
- 20px
- 20px
- 140px
- 20px
- 41px
- 17px
- 41px
- 42px
- 32px
- 32px
- 84px
- 3px
- 20px
- 32px
- 36px
- 17px
- 31.5px
-
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/values/colors.xml b/OCH/mogo-och-taxi/src/main/res/values/colors.xml
deleted file mode 100644
index 0bc7d761be..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- #FFFFFF
- #707DBE
- #8198E8
- #8198E8
- #8198E8
- #FFFFFF
-
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/values/dimens.xml b/OCH/mogo-och-taxi/src/main/res/values/dimens.xml
deleted file mode 100644
index ff8e1c5530..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- 464px
- 310px
- 5px
- 20px
- 20px
- 20px
- 1px
- 20px
- 20px
- 20px
- 140px
- 20px
- 20px
- 17px
- 20px
- 26px
- 20px
- 20px
- 64px
- 3px
- 20px
- 20px
- 24px
- 17px
- 22.5px
-
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/values/strings.xml b/OCH/mogo-och-taxi/src/main/res/values/strings.xml
deleted file mode 100644
index f81168d27d..0000000000
--- a/OCH/mogo-och-taxi/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 确认上车,行程开始
- 到达站点,乘客已下车
- 已到达上车站点,等待乘客上车
- 预计里程
- 3.2 km
- 请携带好随身物品,注意侧后\n方来车,感谢体验’蘑菇车联‘自\n动驾驶车!
- 即将到达目的地,请您携带好随身物品,安全下车。
- 去往下车地点
- 已到达,等待乘客上车
- 收到新订单,前往上车地点
- 已到达下车地点
- 订单已完成
- 订单已取消
-
\ No newline at end of file
diff --git a/OCH/mogo-och/.gitignore b/OCH/mogo-och/.gitignore
deleted file mode 100644
index 42afabfd2a..0000000000
--- a/OCH/mogo-och/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/OCH/mogo-och/build.gradle b/OCH/mogo-och/build.gradle
deleted file mode 100644
index fe6096623e..0000000000
--- a/OCH/mogo-och/build.gradle
+++ /dev/null
@@ -1,61 +0,0 @@
-apply plugin: 'com.android.library'
-apply plugin: 'com.alibaba.arouter'
-
-android {
- compileSdkVersion rootProject.ext.android.compileSdkVersion
- // buildToolsVersion rootProject.ext.android.buildToolsVersion
- defaultConfig {
- minSdkVersion rootProject.ext.android.minSdkVersion
- targetSdkVersion rootProject.ext.android.targetSdkVersion
- versionCode Integer.valueOf(VERSION_CODE)
- versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
-
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles "consumer-rules.pro"
-
- javaCompileOptions {
- annotationProcessorOptions {
- arguments = [AROUTER_MODULE_NAME: project.getName()]
- }
- }
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: "libs", include: ["*.jar"])
- implementation rootProject.ext.dependencies.androidxappcompat
- implementation rootProject.ext.dependencies.arouter
- annotationProcessor rootProject.ext.dependencies.aroutercompiler
-
- implementation rootProject.ext.dependencies.androidxconstraintlayout
-
- if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
- implementation rootProject.ext.dependencies.mogoutils
- implementation rootProject.ext.dependencies.mogocommons
- implementation rootProject.ext.dependencies.modulecommon
-
- implementation rootProject.ext.dependencies.mogo_core_data
- } else {
- implementation project(":foudations:mogo-utils")
- implementation project(":foudations:mogo-commons")
- implementation project(":modules:mogo-module-common")
-
- implementation project(':core:mogo-core-data')
-
- }
-}
-
-apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
\ No newline at end of file
diff --git a/OCH/mogo-och/consumer-rules.pro b/OCH/mogo-och/consumer-rules.pro
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/OCH/mogo-och/gradle.properties b/OCH/mogo-och/gradle.properties
deleted file mode 100644
index 48c034660a..0000000000
--- a/OCH/mogo-och/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-GROUP=com.mogo.och
-POM_ARTIFACT_ID=och
-VERSION_CODE=1
diff --git a/OCH/mogo-och/proguard-rules.pro b/OCH/mogo-och/proguard-rules.pro
deleted file mode 100644
index 481bb43481..0000000000
--- a/OCH/mogo-och/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/AndroidManifest.xml b/OCH/mogo-och/src/main/AndroidManifest.xml
deleted file mode 100644
index e27819d70f..0000000000
--- a/OCH/mogo-och/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- /
-
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java b/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java
deleted file mode 100644
index c5952774c7..0000000000
--- a/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java
+++ /dev/null
@@ -1,273 +0,0 @@
-package com.mogo.och;
-
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.CheckedTextView;
-import android.widget.FrameLayout;
-import android.widget.TextView;
-
-import androidx.constraintlayout.widget.Group;
-
-import com.mogo.commons.debug.DebugConfig;
-import com.mogo.commons.mvp.IView;
-import com.mogo.commons.mvp.MvpFragment;
-import com.mogo.commons.mvp.Presenter;
-import com.mogo.commons.voice.AIAssist;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.view.OnPreventFastClickListener;
-import com.mogo.och.view.SlidePanelView;
-import com.mogo.service.adas.IMogoAdasOCHCallback;
-import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
-import com.mogo.utils.logger.Logger;
-
-/**
- * 网约车基础Fragment,主要负责布局通用界面,处理站点面板和通话面板互斥情况
- *
- * 部分业务放在了此处处理
- *
- * @author tongchenfei
- */
-public abstract class BaseOchFragment> extends MvpFragment {
-
- private static final String TAG = "BaseOchFragment";
-
- protected SlidePanelView slidePanelView;
- private CheckedTextView ctvAutopilotStatus;
- protected TextView tvOperationStatus;
- public boolean isOperationStatus;//false-收车,true-出车
- private FrameLayout flStationPanelContainer;
- private Group groupTestPanel;
-
-
- /**
- * 滑动按钮触发的事件
- */
- private final SlidePanelView.OnSlidePanelMoveToEndListener onSlideToEndListener = () -> {
- // 此处做一个代理,处理一下共有情况
- if (getSlidePanelOnEndListener() != null) {
- getSlidePanelOnEndListener().moveToEnd();
- }
- };
-
- @Override
- protected int getLayoutId() {
- return R.layout.module_mogo_och_base_fragment;
- }
-
- @Override
- public String getTagName() {
- return TAG;
- }
-
- private View panelView;
-
- @Override
- protected void initViews() {
- groupTestPanel = findViewById(R.id.groupTestPanel);
- slidePanelView = findViewById(R.id.module_mogo_och_slide_panel);
- ctvAutopilotStatus = findViewById(R.id.module_mogo_och_autopilot_status);
- flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
-
- tvOperationStatus = findViewById(R.id.module_mogo_och_operation_status);
-
- panelView = LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flStationPanelContainer);
- slidePanelView.setOnSlidePanelMoveToEndListener(onSlideToEndListener);
-
- ctvAutopilotStatus.setOnClickListener(new OnPreventFastClickListener() {
- @Override
- public void onClickImpl(View v) {
- // 如果能自动驾驶,就自动驾驶,不能就提示
- restartAutopilot();
- }
- });
-
- // debug下调用测试面板
- if (DebugConfig.isDebug()) {
- ctvAutopilotStatus.setOnLongClickListener(v -> {
- if (groupTestPanel.getVisibility() == View.VISIBLE) {
- groupTestPanel.setVisibility(View.GONE);
- } else {
- groupTestPanel.setVisibility(View.VISIBLE);
- }
- return false;
- });
- }
-
- onAutopilotStatusChanged(MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING);
-
- // 模拟 不可自动驾驶,目前场景是刚开机,adas还未和工控机连接
- findViewById(R.id.btnAutopilotDisable).setOnClickListener(view ->
- {
- MogoApisHandler.getInstance().getApis()
- .getAdasControllerApi()
- .mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_DISABLE, "不能使用");
-// Logger.d("lianglihui","模拟 不可自动驾驶");
- }
- );
-
- // 模拟 可自动驾驶,工控机连接正常,且处于人工干预状态
- findViewById(R.id.btnAutopilotEnable).setOnClickListener(view ->
- {
- MogoApisHandler.getInstance().getApis()
- .getAdasControllerApi()
- .mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_ENABLE, "能使用");
-
-// Logger.d("lianglihui","模拟 可自动驾驶");
- }
- );
-
- // 模拟 自动驾驶能力,自动驾驶中,可能是停车,可能是行进,但是是机器在处理车的前进后退,不是人
- findViewById(R.id.btnAutopilotRunning).setOnClickListener(view ->
- {
- MogoApisHandler.getInstance().getApis()
- .getAdasControllerApi()
- .mockOchStatus(IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING, "Running");
-// Logger.d("lianglihui","模拟 自动驾驶能力");
- }
- );
-
- // 模拟 自动驾驶站
- findViewById(R.id.btnAutopilotArrive).setOnClickListener(view ->
- {
- MogoApisHandler.getInstance().getApis()
- .getAdasControllerApi().mockOchStatus(-1, "Arrived");
-
-// Logger.d("lianglihui","模拟 自动驾驶站");
- }
- );
-
- // 模拟 站点下发工控
- findViewById(R.id.btnAutopilotControl).setOnClickListener(view ->
- {
-// Logger.d("lianglihui","模拟 站点下发工控");
- AutopilotControlParameters currentAutopilot = new AutopilotControlParameters();
- currentAutopilot.isSpeakVoice = true;
- // 万集东门站
- currentAutopilot.startLatLon = new AutopilotControlParameters.AutoPilotLonLat(40.194795425,116.724476409);
- // 市政府前街18号
- currentAutopilot.endLatLon = new AutopilotControlParameters.AutoPilotLonLat(40.1939540844,116.720067);
- // 订单运营类型 (9出租车,10小巴)
- currentAutopilot.vehicleType = 10;
- Logger.d(TAG, "模拟 订单站点下发:" + currentAutopilot);
- MogoApisHandler.getInstance().getApis().getAdasControllerApi().aiCloudToAdasData(currentAutopilot);
- }
- );
-
- tvOperationStatus.setOnClickListener(view -> {
- onChangeOperationStatus();
- });
- }
-
- protected void onChangeOperationStatus() {
-
- }
-
-
- /**
- * 展示滑动按钮
- *
- * @param text 指定的文字
- */
- public void showSlidePanle(String text) {
- if (isOperationStatus) {
- getActivity().runOnUiThread(() -> {
- slidePanelView.setText(text);
- slidePanelView.setVisibility(View.VISIBLE);
- });
- }
- }
-
- /**
- * 隐藏滑动按钮
- */
- public void hideSlidePanel() {
- getActivity().runOnUiThread(() -> {
- slidePanelView.setVisibility(View.GONE);
- });
- }
-
- public void showNotice(String notice) {
- getActivity().runOnUiThread(() -> {
- AIAssist.getInstance(getContext()).speakTTSVoice(notice);
- });
- }
-
- /**
- * 改变自动驾驶状态
- *
- * @param isInAutopilot true - 在自动驾驶中 false - 不在自动驾驶中
- */
- public void onAutopilotStatusChanged(boolean isInAutopilot) {
- getActivity().runOnUiThread(() -> {
- ctvAutopilotStatus.setChecked(isInAutopilot);
- });
- }
-
- /**
- * 隐藏【自动驾驶】按钮
- */
- public void hideAutopilotBiz() {
- getActivity().runOnUiThread(() -> {
-// ctvAutopilotStatus.setVisibility(View.GONE);
-// slidePanelView.setVisibility(View.GONE);
- });
- }
-
- /**
- * 展示【自动驾驶】按钮
- */
- public void showAutopilotBiz() {
- getActivity().runOnUiThread(() -> {
- ctvAutopilotStatus.setVisibility(View.VISIBLE);
- if (isOperationStatus) {
- slidePanelView.setVisibility(View.VISIBLE);
- } else {
- slidePanelView.setVisibility(View.GONE);
- }
- });
- }
-
- public void hidPanel() {
- getActivity().runOnUiThread(() -> {
- flStationPanelContainer.setVisibility(View.GONE);
- });
- }
-
- public void showPanel() {
- getActivity().runOnUiThread(() -> {
- flStationPanelContainer.setVisibility(View.VISIBLE);
- });
- }
-
- public View getPanelView() {
- return panelView;
- }
-
- public SlidePanelView.OnSlidePanelMoveToEndListener getSlidePanelOnEndListener() {
- return null;
- }
-
- @Override
- public void onDestroyView() {
- super.onDestroyView();
- }
-
- /**
- * 获取站点面板view,在{@link #initViews()}时候添加到container中
- *
- * @return 站点面板view
- */
- public abstract int getStationPanelViewId();
-
- /**
- * 重新开启自动驾驶
- */
- public abstract void restartAutopilot();
-
-
- public void changeOperationViewVisible(int visible){
- getActivity().runOnUiThread(() -> {
- tvOperationStatus.setVisibility(visible);
- });
- }
-}
diff --git a/OCH/mogo-och/src/main/java/com/mogo/och/OCHConstants.java b/OCH/mogo-och/src/main/java/com/mogo/och/OCHConstants.java
deleted file mode 100644
index 09ab4955e0..0000000000
--- a/OCH/mogo-och/src/main/java/com/mogo/och/OCHConstants.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.mogo.och;
-
-public
-/**
- * @author congtaowang
- * @since 2021/1/15
- *
- * 网约车部分常量字段
- */
-class OCHConstants {
-
- /**
- * arouter 路由地址
- */
- public static final String PATH = "/och/api";
-}
diff --git a/OCH/mogo-och/src/main/java/com/mogo/och/view/FrameAnimImageView.java b/OCH/mogo-och/src/main/java/com/mogo/och/view/FrameAnimImageView.java
deleted file mode 100644
index c2776c48b9..0000000000
--- a/OCH/mogo-och/src/main/java/com/mogo/och/view/FrameAnimImageView.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package com.mogo.och.view;
-
-import android.content.Context;
-import android.os.Handler;
-import android.os.Message;
-import android.util.AttributeSet;
-
-/**
- * 帧动画ImageView封装
- *
- * @author tongchenfei
- */
-public class FrameAnimImageView extends androidx.appcompat.widget.AppCompatImageView implements Handler.Callback {
- public static final long FRAME_INTERVAL = 50L;
- private final static int MSG_LOOP = 3003;
-
- public FrameAnimImageView(Context context) {
- super(context);
- }
-
- public FrameAnimImageView(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- public FrameAnimImageView(Context context, AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- }
-
- private int[] animRes;
- private int animPos;
- private boolean isInAnim = false;
-
- private final Handler animHandler = new Handler(this);
-
- public void setAnimRes(int[] animRes) {
- this.animRes = animRes;
- }
-
- public void startAnim() {
- isInAnim = true;
- animHandler.sendEmptyMessage(MSG_LOOP);
- }
-
- public void stopAnim() {
- isInAnim = false;
- }
-
- @Override
- protected void onDetachedFromWindow() {
- super.onDetachedFromWindow();
- stopAnim();
- }
-
- @Override
- public boolean handleMessage(Message msg) {
- if (isInAnim && animRes != null) {
- if (animPos >= animRes.length) {
- animPos = 0;
- }
- setImageResource(animRes[animPos++]);
- animHandler.sendEmptyMessageDelayed(MSG_LOOP, FRAME_INTERVAL);
- }
- return true;
- }
-}
diff --git a/OCH/mogo-och/src/main/java/com/mogo/och/view/SlidePanelView.java b/OCH/mogo-och/src/main/java/com/mogo/och/view/SlidePanelView.java
deleted file mode 100644
index 8f2e12b9a6..0000000000
--- a/OCH/mogo-och/src/main/java/com/mogo/och/view/SlidePanelView.java
+++ /dev/null
@@ -1,268 +0,0 @@
-package com.mogo.och.view;
-
-import android.animation.ObjectAnimator;
-import android.animation.ValueAnimator;
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.LinearGradient;
-import android.graphics.Matrix;
-import android.graphics.Paint;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.graphics.Shader;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.animation.DecelerateInterpolator;
-
-import androidx.annotation.Nullable;
-
-import com.mogo.och.R;
-
-
-/**
- * 滑块滑动面板
- *
- * @author tongchenfei
- */
-public class SlidePanelView extends View {
- private static final String TAG = "SlidePanelView";
-
- public SlidePanelView(Context context) {
- this(context, null);
- }
-
- public SlidePanelView(Context context, @Nullable AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public SlidePanelView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- TypedArray mTypedArray = context.obtainStyledAttributes(attrs, R.styleable.SlidePanelView);
- textSize = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_textSize, textSize);
- BLOCK_START_X = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_BLOCK_START_X, BLOCK_START_X);
- BLOCK_START_Y = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_BLOCK_START_Y, BLOCK_START_Y);
- NORMAL_TEXT_MARGIN_LEFT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_NORMAL_TEXT_MARGIN_LEFT, NORMAL_TEXT_MARGIN_LEFT);
- NORMAL_TEXT_MARGIN_RIGHT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_NORMAL_TEXT_MARGIN_RIGHT, NORMAL_TEXT_MARGIN_RIGHT);
- SHORT_TEXT_MARGIN_LEFT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_SHORT_TEXT_MARGIN_LEFT, SHORT_TEXT_MARGIN_LEFT);
- SHORT_TEXT_MARGIN_RIGHT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_SHORT_TEXT_MARGIN_RIGHT, SHORT_TEXT_MARGIN_RIGHT);
- SLIDEPANELVIEW_VIEW_HIGH = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_SLIDEPANELVIEW_VIEW_HIGH, SLIDEPANELVIEW_VIEW_HIGH);
- init();
- }
-
- private final Paint bgPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
- private final Paint blockPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
- private final Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
-
- private static int textSize = 67;
- private static int BLOCK_START_X = 15;
- private static int BLOCK_START_Y = 15;
- private static int NORMAL_TEXT_MARGIN_LEFT = 40;
- private static int NORMAL_TEXT_MARGIN_RIGHT = 60;
- private static int SHORT_TEXT_MARGIN_LEFT = 60;
- private static int SHORT_TEXT_MARGIN_RIGHT = 70;
- private static int SLIDEPANELVIEW_VIEW_HIGH = 160;
-
- private int textMarginLeft = NORMAL_TEXT_MARGIN_LEFT;
- private int textMarginRight = NORMAL_TEXT_MARGIN_RIGHT;
-
- private OnSlidePanelMoveToEndListener moveToEndListener;
-
- private int blockWidth = 0;
- private int blockOffset = 0;
-
- private float lastX;
- private boolean isToEnd = false;
-
- private static final String STRING_SLIDE_TO_RIGHT = "向右滑动";
- private RectF bgRectF;
- private Bitmap bmBlock;
-
- private final Matrix gradientMatrix = new Matrix();
- private float matrixTranslate;
- private final Rect textRect = new Rect();
- private LinearGradient textGradient;
-
- private ObjectAnimator matrixAnim;
-
- private String blockText = STRING_SLIDE_TO_RIGHT;
- private Paint.FontMetrics blockTextMetrics = new Paint.FontMetrics();
-
- private static final int GRADIENT_OFFSET = 200;
-
- public void setOnSlidePanelMoveToEndListener(OnSlidePanelMoveToEndListener moveToEndListener) {
- this.moveToEndListener = moveToEndListener;
- }
-
- private void setBlockOffset(int blockOffset) {
- this.blockOffset = blockOffset;
- invalidate();
- }
-
- private void setMatrixTranslate(float matrixTranslate) {
- this.matrixTranslate = matrixTranslate;
- invalidate();
- }
-
- public void setText(String text) {
- this.blockText = text;
- requestLayout();
- invalidate();
- }
-
- private void init() {
- bgPaint.setColor(Color.parseColor("#CC0F1325"));
- bgPaint.setStyle(Paint.Style.FILL);
-
- textPaint.setStyle(Paint.Style.FILL);
- textPaint.setTextSize(textSize);
- textPaint.setTextAlign(Paint.Align.LEFT);
- textGradient = new LinearGradient(-GRADIENT_OFFSET, 0, 0, 0, new int[]{0x33ffffff, 0xffffffff, 0x33ffffff}, null, Shader.TileMode.CLAMP);
- textGradient.setLocalMatrix(gradientMatrix);
- textPaint.setShader(textGradient);
- textPaint.getFontMetrics(blockTextMetrics);
-
- bmBlock = BitmapFactory.decodeResource(getResources(), R.drawable.module_och_base_slide_block);
- blockWidth = bmBlock.getWidth();
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- int widthMode = MeasureSpec.getMode(widthMeasureSpec);
- int heightMode = MeasureSpec.getMode(heightMeasureSpec);
- int widthSize;
- int heightSize;
-
- if (blockText.length() < 5) {
- textMarginLeft = SHORT_TEXT_MARGIN_LEFT;
- textMarginRight = SHORT_TEXT_MARGIN_RIGHT;
- } else {
- textMarginLeft = NORMAL_TEXT_MARGIN_LEFT;
- textMarginRight = NORMAL_TEXT_MARGIN_RIGHT;
- }
-
- if (widthMode == MeasureSpec.AT_MOST) {
- // 宽度根据图片大小,字符串长度,各种间隔确定
- // 高度根据图片大小和上下间隔确定
- textPaint.getTextBounds(blockText, 0, blockText.length(), textRect);
- widthSize = BLOCK_START_X * 2 + bmBlock.getWidth() + textMarginLeft + textMarginRight + textRect.width();
-// heightSize = BLOCK_START_Y * 2 + bmBlock.getHeight();
- heightSize = SLIDEPANELVIEW_VIEW_HIGH;
- widthMeasureSpec = MeasureSpec.makeMeasureSpec(widthSize, widthMode);
- heightMeasureSpec = MeasureSpec.makeMeasureSpec(heightSize, heightMode);
- }
-
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- }
-
- private float textOffset = 0;
-
- @Override
- protected void onSizeChanged(int w, int h, int oldw, int oldh) {
- super.onSizeChanged(w, h, oldw, oldh);
- bgRectF = new RectF(0, 0, w, h);
-
- if (matrixAnim != null) {
- matrixAnim.cancel();
- }
- textOffset = (getHeight() - blockTextMetrics.ascent - blockTextMetrics.descent) / 2;
- matrixAnim = ObjectAnimator.ofFloat(this, "matrixTranslate", 0, w + GRADIENT_OFFSET).setDuration(2000);
- matrixAnim.setRepeatCount(ValueAnimator.INFINITE);
- matrixAnim.start();
- }
-
- @Override
- protected void onAttachedToWindow() {
- super.onAttachedToWindow();
- if (matrixAnim != null) {
- matrixAnim.start();
- }
- }
-
- @Override
- protected void onDetachedFromWindow() {
- super.onDetachedFromWindow();
- if (matrixAnim != null) {
- matrixAnim.cancel();
- }
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- float x = event.getX();
- float y = event.getY();
-
- switch (event.getAction()) {
- case MotionEvent.ACTION_DOWN:
- if (x > BLOCK_START_X + blockOffset && x < blockWidth + BLOCK_START_X + blockOffset && y > BLOCK_START_Y && y < getHeight() - BLOCK_START_Y) {
- isToEnd = false;
- lastX = x;
- }
- break;
- case MotionEvent.ACTION_MOVE:
- if (lastX != 0) {
- blockOffset = (int) (x - lastX);
- if (blockOffset < 0) {
- blockOffset = 0;
- }
- if (blockOffset + BLOCK_START_X + blockWidth > getWidth()) {
- // 超出右边界
- blockOffset = getWidth() - BLOCK_START_X - blockWidth;
- if (!isToEnd) {
- isToEnd = true;
- if (moveToEndListener != null) {
- moveToEndListener.moveToEnd();
- }
- startBlockBackAnim();
- }
- }
- invalidate();
- }
- break;
- case MotionEvent.ACTION_UP:
- // 执行滑块回归动画
- if (!isToEnd) {
- startBlockBackAnim();
- }
- break;
- default:
- break;
- }
-
- return true;
- }
-
- private void startBlockBackAnim() {
- ObjectAnimator animator = ObjectAnimator.ofInt(this, "blockOffset", blockOffset, 0);
- animator.setInterpolator(new DecelerateInterpolator());
- animator.setDuration(1000 * blockOffset / getWidth());
- animator.start();
- lastX = 0;
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
- super.onDraw(canvas);
- // 画背景
- canvas.drawRoundRect(bgRectF, (float) getHeight() / 2, SLIDEPANELVIEW_VIEW_HIGH / 2, bgPaint);
- // 画文字
- gradientMatrix.setTranslate(matrixTranslate, 0);
- textGradient.setLocalMatrix(gradientMatrix);
- canvas.save();
- canvas.drawText(blockText, blockWidth + BLOCK_START_X + textMarginLeft, textOffset, textPaint);
- canvas.restore();
- // 画滑块
- canvas.drawBitmap(bmBlock, BLOCK_START_X + blockOffset, BLOCK_START_Y, blockPaint);
- }
-
- public interface OnSlidePanelMoveToEndListener {
- /**
- * 滑块滑到了末尾
- */
- void moveToEnd();
- }
-}
diff --git a/OCH/mogo-och/src/main/res/color/module_mogo_och_autopilot_text_color_selector.xml b/OCH/mogo-och/src/main/res/color/module_mogo_och_autopilot_text_color_selector.xml
deleted file mode 100644
index 19f43e5bfd..0000000000
--- a/OCH/mogo-och/src/main/res/color/module_mogo_och_autopilot_text_color_selector.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_autopilot_status_bg.xml b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_autopilot_status_bg.xml
deleted file mode 100644
index 97ac9039cc..0000000000
--- a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_autopilot_status_bg.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
-
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_base_icon_not_in_autopilot.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_base_icon_not_in_autopilot.png
deleted file mode 100644
index 927296d690..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_base_icon_not_in_autopilot.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_icon_arrived_station.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_icon_arrived_station.png
deleted file mode 100644
index 8a065b66dd..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_icon_arrived_station.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_icon_arriving_station.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_icon_arriving_station.png
deleted file mode 100644
index 4ed57a0e30..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_mogo_och_icon_arriving_station.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_och_base_slide_block.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_och_base_slide_block.png
deleted file mode 100644
index c7655b477c..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_och_base_slide_block.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_och_bus_ic_autopilot.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_och_bus_ic_autopilot.png
deleted file mode 100644
index 927296d690..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_och_bus_ic_autopilot.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_och_dot_line.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_och_dot_line.png
deleted file mode 100644
index a720a532ea..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1440/module_och_dot_line.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi/img_module_mogo_och_operation_status_bg.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/img_module_mogo_och_operation_status_bg.png
deleted file mode 100644
index 27cb9285d3..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi/img_module_mogo_och_operation_status_bg.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_base_icon_in_autopilot.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_base_icon_in_autopilot.png
deleted file mode 100644
index 75c26c3d71..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_base_icon_in_autopilot.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_base_icon_not_in_autopilot.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_base_icon_not_in_autopilot.png
deleted file mode 100644
index 21dc719ec9..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_base_icon_not_in_autopilot.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_base_notice_box_bg.9.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_base_notice_box_bg.9.png
deleted file mode 100644
index 8b4b579b56..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_base_notice_box_bg.9.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arrived_station.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arrived_station.png
deleted file mode 100644
index a676a789c3..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arrived_station.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arriving_station.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arriving_station.png
deleted file mode 100644
index e1fd463963..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arriving_station.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_base_slide_block.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_base_slide_block.png
deleted file mode 100644
index 8ffd0abe52..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_base_slide_block.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_bus_ic_autopilot.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_bus_ic_autopilot.png
deleted file mode 100644
index be978145dc..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_bus_ic_autopilot.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_dot_line.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_dot_line.png
deleted file mode 100644
index 186001352c..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_dot_line.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable/img_module_mogo_och_operation_status_bg.9.png b/OCH/mogo-och/src/main/res/drawable/img_module_mogo_och_operation_status_bg.9.png
deleted file mode 100644
index 0af2b9db73..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable/img_module_mogo_och_operation_status_bg.9.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg.xml b/OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg.xml
deleted file mode 100644
index 97ac9039cc..0000000000
--- a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
-
diff --git a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg_check.png b/OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg_check.png
deleted file mode 100644
index 28857974b5..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg_check.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg_nor.png b/OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg_nor.png
deleted file mode 100644
index f7d4f92c4b..0000000000
Binary files a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg_nor.png and /dev/null differ
diff --git a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_base_autopilot_status_icon_selector.xml b/OCH/mogo-och/src/main/res/drawable/module_mogo_och_base_autopilot_status_icon_selector.xml
deleted file mode 100644
index 29f2cd11e2..0000000000
--- a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_base_autopilot_status_icon_selector.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_operation_status_bg.xml b/OCH/mogo-och/src/main/res/drawable/module_mogo_och_operation_status_bg.xml
deleted file mode 100644
index 753d85e3ec..0000000000
--- a/OCH/mogo-och/src/main/res/drawable/module_mogo_och_operation_status_bg.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/res/drawable/module_och_panel_bkg.xml b/OCH/mogo-och/src/main/res/drawable/module_och_panel_bkg.xml
deleted file mode 100644
index 4a08f10745..0000000000
--- a/OCH/mogo-och/src/main/res/drawable/module_och_panel_bkg.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml b/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml
deleted file mode 100644
index 3cc3070de3..0000000000
--- a/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/res/values-xhdpi-2560x1440/dimens.xml b/OCH/mogo-och/src/main/res/values-xhdpi-2560x1440/dimens.xml
deleted file mode 100644
index 44445885c1..0000000000
--- a/OCH/mogo-och/src/main/res/values-xhdpi-2560x1440/dimens.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
- 40px
- 40px
- 46px
- 24px
-
- 530px
- 492px
-
- 20px
- 20px
- 70px
- 130px
- 93px
- 150px
- 70px
-
- 24px
- 460px
- 140px
-
- 120px
- 120px
-
- 83px
-
- 30px
- 466px
- 414px
-
-
-
- 46px
- 36px
- 13px
- 12px
- 350px
-
- 460px
- 30px
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/res/values/attrs.xml b/OCH/mogo-och/src/main/res/values/attrs.xml
deleted file mode 100644
index 24c52520f0..0000000000
--- a/OCH/mogo-och/src/main/res/values/attrs.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/res/values/colors.xml b/OCH/mogo-och/src/main/res/values/colors.xml
deleted file mode 100644
index 17263cf6f5..0000000000
--- a/OCH/mogo-och/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- #FFFFFF
- #FF52BBFF
-
\ No newline at end of file
diff --git a/OCH/mogo-och/src/main/res/values/dimens.xml b/OCH/mogo-och/src/main/res/values/dimens.xml
deleted file mode 100644
index 033d24465a..0000000000
--- a/OCH/mogo-och/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
- 40px
- 40px
- 46px
- 24px
-
- 345px
- 492px
-
- 15px
- 15px
- 40px
- 50px
- 50px
- 70px
- 40px
-
- 24px
- 300px
- 100px
-
- 100px
- 100px
-
- 35px
-
- 15px
- 300px
- 270px
-
- 30px
- 13px
- 12px
- 288px
-
- 460px
- 30px
-
-
\ No newline at end of file
diff --git a/app/functions/och.gradle b/app/functions/och.gradle
index 3c96f07e37..d1e7d70339 100644
--- a/app/functions/och.gradle
+++ b/app/functions/och.gradle
@@ -1,26 +1,30 @@
// 网约车服务:仅小巴车、出租车渠道用
project.dependencies {
- if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
- f8xxImplementation rootProject.ext.dependencies.mogoochnoop
- f80xImplementation rootProject.ext.dependencies.mogoochnoop
- f8AmapImplementation rootProject.ext.dependencies.mogoochnoop
+ f8xxImplementation rootProject.ext.dependencies.mogoochnoop
+ f80xImplementation rootProject.ext.dependencies.mogoochnoop
+ f8AmapImplementation rootProject.ext.dependencies.mogoochnoop
- fochtaxiImplementation rootProject.ext.dependencies.mogoochtaxi
- fochbusImplementation rootProject.ext.dependencies.mogoochbus
+ fochtaxiImplementation rootProject.ext.dependencies.mogoochtaxi
+ fochbusImplementation rootProject.ext.dependencies.mogoochbus
- fPadLenovoImplementation rootProject.ext.dependencies.mogoochnoop
- fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.mogoochtaxi
- fPadLenovoOchBusImplementation rootProject.ext.dependencies.mogoochbus
- } else {
- f8xxImplementation project(':OCH:mogo-och-noop')
- f80xImplementation project(':OCH:mogo-och-noop')
- f8AmapImplementation project(':OCH:mogo-och-noop')
-
- fochtaxiImplementation project(':OCH:mogo-och-taxi')
- fochbusImplementation project(':OCH:mogo-och-bus')
-
- fPadLenovoImplementation project(':OCH:mogo-och-noop')
- fPadLenovoOchTaxiImplementation project(':OCH:mogo-och-taxi')
- fPadLenovoOchBusImplementation project(':OCH:mogo-och-bus')
+ fPadLenovoImplementation (rootProject.ext.dependencies.mogoochnoop){
+ exclude group: 'com.mogo.commons' //by group
+ exclude group: 'com.mogo.map' //by group
+ exclude group: 'com.mogo.eagle.core' //by group
+ exclude group: 'com.mogo.eagle.core.function' //by group
+ }
+ fPadLenovoOchTaxiImplementation (rootProject.ext.dependencies.mogoochtaxi){
+ exclude group: 'com.mogo.commons' //by group
+ exclude group: 'com.mogo.module' //by group
+ exclude group: 'com.mogo.map' //by group
+ exclude group: 'com.mogo.eagle.core' //by group
+ exclude group: 'com.mogo.eagle.core.function' //by group
+ }
+ fPadLenovoOchBusImplementation (rootProject.ext.dependencies.mogoochbus){
+ exclude group: 'com.mogo.commons' //by group
+ exclude group: 'com.mogo.module' //by group
+ exclude group: 'com.mogo.map' //by group
+ exclude group: 'com.mogo.eagle.core' //by group
+ exclude group: 'com.mogo.eagle.core.function' //by group
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java
index e0e7c7380b..ef5fef174d 100644
--- a/app/src/main/java/com/mogo/launcher/MogoApplication.java
+++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java
@@ -1,11 +1,5 @@
package com.mogo.launcher;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Process;
-import android.util.Log;
-
-import com.apm.applog.AppLog;
import com.apm.insight.AttachUserData;
import com.apm.insight.CrashType;
import com.apm.insight.MonitorCrash;
@@ -13,23 +7,12 @@ import com.apm.insight.log.VLog;
import com.auto.zhidao.logsdk.CrashSystem;
import com.bytedance.apm.insight.ApmInsight;
import com.bytedance.apm.insight.ApmInsightInitConfig;
-import com.bytedance.apm.insight.IDynamicParams;
-import com.bytedance.boost_multidex.BoostMultiDex;
-import com.mogo.cloud.httpdns.MogoHttpDnsConfig;
-import com.mogo.cloud.httpdns.bean.HttpDnsSimpleLocation;
-import com.mogo.cloud.passport.IMoGoTokenCallback;
-import com.mogo.cloud.passport.MoGoAiCloudClient;
-import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
-import com.mogo.commons.AbsMogoApplication;
-import com.mogo.commons.constants.SharedPrefsConstants;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.function.main.MainMoGoApplication;
import com.mogo.module.v2x.utils.ObuConfig;
import com.mogo.test.crashreport.CrashReportConstants;
-import com.mogo.test.crashreport.upgrade.UpgradeReportConstants;
import com.mogo.utils.CommonUtils;
-import com.mogo.utils.ProcessUtils;
import com.mogo.utils.logger.LogLevel;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.storage.SharedPrefsMgr;
diff --git a/gradle.properties b/gradle.properties
index 6410230f4b..3a6afb0567 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -182,9 +182,9 @@ SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.1.2
SKIN_SUPPORT_DESIGN_VERSION=2.1.2
# OCH
MOGO_OCH_VERSION=2.1.2-test
-MOGO_OCH_BUS_VERSION=2.1.2-test
-MOGO_OCH_NOOP_VERSION=2.1.2-test
-MOGO_OCH_TAXI_VERSION=2.1.2-test
+MOGO_OCH_BUS_VERSION=2.0.66
+MOGO_OCH_NOOP_VERSION=2.0.66
+MOGO_OCH_TAXI_VERSION=2.0.66
# mogoAiCloud sdk services
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.2
################# 旧版本架构模块版本 #################
diff --git a/modules.txt b/modules.txt
index 37c3973bfb..4074c01866 100644
--- a/modules.txt
+++ b/modules.txt
@@ -39,10 +39,6 @@
:modules:mogo-module-v2x
:modules:mogo-module-back
:modules:mogo-module-main
-:OCH:mogo-och
-:OCH:mogo-och-bus
-:OCH:mogo-och-noop
-:OCH:mogo-och-taxi
:modules:mogo-module-push-base
:modules:mogo-module-push-noop
:modules:mogo-module-push
diff --git a/settings.gradle b/settings.gradle
index 89d13be420..bd2e3043f2 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -88,20 +88,3 @@ include ':test:crashreport-bugly'
include ':test:crashreport-noop'
include ':test:crashreport-upgrade'
-// 换肤
-//include ':skin:skin-support'
-//include ':skin:skin-support-appcompat'
-//include ':skin:skin-support-cardview'
-//include ':skin:skin-support-constraint-layout'
-//include ':skin:skin-support-design'
-//include ':skin:mogo-skin-light'
-//include ':skin:mogo-skin-support-impl'
-//include ':skin:mogo-skin-support-noop'
-//include ':skin:mogo-skin-support'
-
-// 网约车
-include ':OCH:mogo-och-taxi'
-include ':OCH:mogo-och-bus'
-include ':OCH:mogo-och-noop'
-include ':OCH:mogo-och'
-