/td>
|
|
|
88
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
89
|
android:layout_width="match_parent"
|
|
|
90
|
android:layout_height="wrap_content"
|
|
|
91
|
android:layout_marginStart="12dp"
|
|
|
92
|
android:layout_marginTop="12dp"
|
|
|
93
|
android:layout_marginEnd="12dp"
|
|
|
94
|
android:background="@drawable/bg_white_radius8"
|
|
|
95
|
android:paddingStart="14dp"
|
|
|
96
|
android:paddingTop="20dp"
|
|
|
97
|
android:paddingEnd="14dp"
|
|
|
98
|
android:paddingBottom="20dp">
|
|
|
99
|
|
|
|
100
|
<TextView
|
|
|
101
|
android:id="@+id/tvNumberPlate"
|
|
|
102
|
android:layout_width="wrap_content"
|
|
|
103
|
android:layout_height="wrap_content"
|
|
|
104
|
android:text="车牌号:"
|
|
|
105
|
android:textColor="@color/color_0e0e0e"
|
|
|
106
|
android:textSize="14sp"
|
|
|
107
|
android:textStyle="bold"
|
|
|
108
|
app:layout_constraintBottom_toBottomOf="@+id/et_carPlate"
|
|
|
109
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
110
|
app:layout_constraintTop_toTopOf="@+id/et_carPlate" />
|
|
|
111
|
|
|
|
112
|
<EditText
|
|
|
113
|
android:id="@+id/et_carPlate"
|
|
|
114
|
android:layout_width="0dp"
|
|
|
115
|
android:layout_height="34dp"
|
|
|
116
|
android:layout_marginStart="16dp"
|
|
|
117
|
android:background="@drawable/bg_edit_radius4"
|
|
|
118
|
android:hint="请输入车牌号"
|
|
|
119
|
android:maxLength="8"
|
|
|
120
|
android:maxLines="1"
|
|
|
121
|
android:paddingStart="10dp"
|
|
|
122
|
android:paddingEnd="10dp"
|
|
|
123
|
android:textColor="@color/black"
|
|
|
124
|
android:textSize="14sp"
|
|
|
125
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
126
|
app:layout_constraintStart_toEndOf="@+id/tvNumberPlate"
|
|
|
127
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
128
|
|
|
|
129
|
<TextView
|
|
|
130
|
android:id="@+id/tvHint"
|
|
|
131
|
android:layout_width="wrap_content"
|
|
|
132
|
android:layout_height="wrap_content"
|
|
|
133
|
android:layout_marginTop="12dp"
|
|
|
134
|
android:text="*输入正确车牌号充电结束可获取停车优惠(注意大写)"
|
|
|
135
|
android:textColor="#ff3ec34c"
|
|
|
136
|
android:textSize="12sp"
|
|
|
137
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
138
|
app:layout_constraintTop_toBottomOf="@+id/et_carPlate" />
|
|
|
139
|
|
|
|
140
|
<TextView
|
|
|
141
|
android:id="@+id/tvHistory"
|
|
|
142
|
android:layout_width="wrap_content"
|
|
|
143
|
android:layout_height="wrap_content"
|
|
|
144
|
android:paddingTop="12dp"
|
|
|
145
|
android:paddingBottom="12dp"
|
|
|
146
|
android:text="历史记录"
|
|
|
147
|
android:textColor="@color/color_0e0e0e"
|
|
|
148
|
android:textSize="14sp"
|
|
|
149
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
150
|
app:layout_constraintTop_toBottomOf="@+id/tvHint" />
|
|
|
151
|
|
|
|
152
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
153
|
android:id="@+id/rvHistory"
|
|
|
154
|
android:layout_width="match_parent"
|
|
|
155
|
android:layout_height="wrap_content"
|
|
|
156
|
app:layout_constraintTop_toBottomOf="@+id/tvHistory" />
|
|
|
157
|
|
|
|
158
|
|
|
|
159
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
160
|
|
|
|
161
|
<View
|
|
|
162
|
android:layout_width="1dp"
|
|
|
163
|
android:layout_height="0dp"
|
|
|
164
|
android:layout_weight="1" />
|
|
|
165
|
|
|
|
166
|
<TextView
|
|
|
167
|
android:id="@+id/tvStartCharge"
|
|
|
168
|
android:layout_width="match_parent"
|
|
|
169
|
android:layout_height="42dp"
|
|
|
170
|
android:layout_marginStart="12dp"
|
|
|
171
|
android:layout_marginEnd="12dp"
|
|
|
172
|
android:background="@drawable/bg_start_charging"
|
|
|
173
|
android:gravity="center"
|
|
|
174
|
android:text="启动充电"
|
|
|
175
|
android:layout_marginBottom="12dp"
|
|
|
176
|
android:textColor="@color/white"
|
|
|
177
|
android:textSize="16sp" />
|
|
|
178
|
|
|
|
179
|
|
|
|
180
|
<LinearLayout
|
|
|
181
|
android:id="@+id/keyboardParent"
|
|
|
182
|
android:layout_width="match_parent"
|
|
|
183
|
android:layout_height="wrap_content"
|
|
|
184
|
android:orientation="vertical"
|
|
|
185
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
186
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
|
187
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
188
|
</LinearLayout>
|
|
|
@ -0,0 +1,60 @@
|
|
|
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
2
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
3
|
android:layout_width="match_parent"
|
|
|
4
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
5
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
6
|
tools:background="#f1f1"
|
|
|
7
|
android:layout_height="match_parent">
|
|
|
8
|
|
|
|
9
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
10
|
android:padding="20dp"
|
|
|
11
|
android:layout_marginStart="50dp"
|
|
|
12
|
android:background="@drawable/bg_while_radius16"
|
|
|
13
|
android:layout_gravity="center"
|
|
|
14
|
android:layout_marginEnd="50dp"
|
|
|
15
|
android:layout_width="match_parent"
|
|
|
16
|
android:layout_height="wrap_content">
|
|
|
17
|
|
|
|
18
|
<TextView
|
|
|
19
|
android:id="@+id/tvTitle"
|
|
|
20
|
android:gravity="center"
|
|
|
21
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
22
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
23
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
24
|
android:layout_width="match_parent"
|
|
|
25
|
android:layout_height="wrap_content"
|
|
|
26
|
tools:text="请确认是否是给\n车牌号京AAL0207充电"
|
|
|
27
|
android:textColor="#ff0e0e0e"
|
|
|
28
|
android:textSize="18sp"
|
|
|
29
|
/>
|
|
|
30
|
|
|
|
31
|
<TextView
|
|
|
32
|
app:layout_constraintEnd_toStartOf="@+id/tvCorrect"
|
|
|
33
|
android:id="@+id/tvRetransmit"
|
|
|
34
|
android:layout_width="0dp"
|
|
|
35
|
android:layout_height="40dp"
|
|
|
36
|
android:layout_marginTop="16dp"
|
|
|
37
|
android:gravity="center"
|
|
|
38
|
android:text="重输"
|
|
|
39
|
android:background="@drawable/bg_ececec_radius20"
|
|
|
40
|
android:textColor="@color/black"
|
|
|
41
|
android:textSize="16sp"
|
|
|
42
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
43
|
app:layout_constraintTop_toBottomOf="@+id/tvTitle" />
|
|
|
44
|
|
|
|
45
|
<TextView
|
|
|
46
|
android:background="@drawable/bg_3ec34c_radius20"
|
|
|
47
|
android:layout_marginStart="16dp"
|
|
|
48
|
android:id="@+id/tvCorrect"
|
|
|
49
|
android:layout_width="0dp"
|
|
|
50
|
android:layout_height="40dp"
|
|
|
51
|
android:gravity="center"
|
|
|
52
|
android:text="正确"
|
|
|
53
|
android:textColor="@color/white"
|
|
|
54
|
android:textSize="16sp"
|
|
|
55
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
56
|
app:layout_constraintStart_toEndOf="@+id/tvRetransmit"
|
|
|
57
|
app:layout_constraintTop_toTopOf="@+id/tvRetransmit" />
|
|
|
58
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
59
|
|
|
|
60
|
</LinearLayout>
|
|
|
@ -0,0 +1,18 @@
|
|
|
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
2
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
3
|
android:layout_width="match_parent"
|
|
|
4
|
android:layout_height="wrap_content"
|
|
|
5
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
6
|
<TextView
|
|
|
7
|
android:id="@+id/tvLicensePlate"
|
|
|
8
|
android:layout_marginBottom="8dp"
|
|
|
9
|
android:background="@drawable/bg_white_radius4"
|
|
|
10
|
android:padding="10dp"
|
|
|
11
|
android:layout_width="wrap_content"
|
|
|
12
|
android:layout_height="wrap_content"
|
|
|
13
|
tools:text="京AAL0207"
|
|
|
14
|
android:textColor="#ff9b9b9b"
|
|
|
15
|
android:textSize="14sp"
|
|
|
16
|
/>
|
|
|
17
|
|
|
|
18
|
</LinearLayout>
|
|
|
@ -1279,6 +1279,18 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|
1279
|
1279
|
intent1800.putExtra(ChargingConstants.ORDERID, pileId);
|
|
1280
|
1280
|
startActivity(intent1800);
|
|
1281
|
1281
|
break;
|
|
|
1282
|
|
|
|
1283
|
case "1000":
|
|
|
1284
|
|
|
|
1285
|
String data1000 = JsonUtils.getKeyResult(response, "data");
|
|
|
1286
|
String pileId0 = JsonUtils.getKeyResult(data1000, "pileId");
|
|
|
1287
|
Intent intent1000 = new Intent();
|
|
|
1288
|
|
|
|
1289
|
intent1000.setClassName("com.electric.chargingpile",
|
|
|
1290
|
"com.electric.chargingpile.activity.ChargingPileActivity");
|
|
|
1291
|
intent1000.putExtra(ChargingConstants.ORDERID, pileId0);
|
|
|
1292
|
startActivity(intent1000);
|
|
|
1293
|
break;
|
|
1282
|
1294
|
default:
|
|
1283
|
1295
|
new Handler().postDelayed(new Runnable() {
|
|
1284
|
1296
|
public void run() {
|
|
|
@ -1311,6 +1323,10 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|
1311
|
1323
|
}
|
|
1312
|
1324
|
|
|
1313
|
1325
|
private void startCharging(String result) {
|
|
|
1326
|
//http://h5.towatt.com/weixin/pro/pay/help.html?P00000178
|
|
|
1327
|
String[] resultSplit = result.split("\\?");
|
|
|
1328
|
String chargingPile = resultSplit[resultSplit.length - 1];
|
|
|
1329
|
|
|
1314
|
1330
|
OkHttpUtils.get().url(UrlConstants.START_CHARGING_URL)
|
|
1315
|
1331
|
.addParams(ChargingConstants.FLAG, numType)
|
|
1316
|
1332
|
.addParams(ChargingConstants.URL, URLEncoder.encode(result))
|
|
|
@ -1,8 +1,8 @@
|
|
1
|
1
|
package com.google.zxing.client.android.constant;
|
|
2
|
2
|
|
|
3
|
3
|
public interface UrlConstants {
|
|
4
|
|
String HOST_URL = "http://cdz.evcharge.cc/zhannew/basic/web/index.php/";
|
|
5
|
|
// String HOST_URL = "http://59.110.68.162/zhannew/basic/web/index.php/"; //测试链接
|
|
|
4
|
// String HOST_URL = "http://cdz.evcharge.cc/zhannew/basic/web/index.php/";
|
|
|
5
|
String HOST_URL = "http://59.110.68.162/zhannew/basic/web/index.php/"; //测试链接
|
|
6
|
6
|
|
|
7
|
7
|
String USER_CHARGING_CHECK_URL = HOST_URL + "api/charge/check-user";
|
|
8
|
8
|
String START_CHARGING_URL = HOST_URL + "api/charge/start";
|