|
|
202
|
if (EmptyUtils.isNotEmpty(response)) {
|
|
|
203
|
dismissDialog();
|
|
|
204
|
handlingOperations(response, startInterface);
|
|
|
205
|
}
|
|
|
206
|
|
|
|
207
|
}
|
|
|
208
|
});
|
|
|
209
|
}
|
|
|
210
|
|
|
|
211
|
private void handlingOperations(String response, int interfaceType) {
|
|
|
212
|
String rtnCode = com.google.zxing.client.android.JsonUtils.getKeyResult(response, "rtnCode");
|
|
|
213
|
String rtnMsg = com.google.zxing.client.android.JsonUtils.getKeyResult(response, "rtnMsg");
|
|
|
214
|
switch (rtnCode) {
|
|
|
215
|
case "01":
|
|
|
216
|
if (interfaceType == startInterface) {
|
|
|
217
|
String data = JsonUtils.getKeyResult(response, "data");
|
|
|
218
|
String orderid = JsonUtils.getKeyResult(data, "orderId");
|
|
|
219
|
Intent intent = new Intent(getApplicationContext(), TLDLoadingActivity.class);
|
|
|
220
|
intent.putExtra(com.electric.chargingpile.constant.ChargingConstants.ORDERID, orderid);
|
|
|
221
|
startActivity(intent);
|
|
|
222
|
finish();
|
|
|
223
|
}
|
|
|
224
|
break;
|
|
|
225
|
case "304":
|
|
|
226
|
alertDialog.builder()
|
|
|
227
|
.setMsg(rtnMsg)
|
|
|
228
|
.setPositiveButton("去充值", new View.OnClickListener() {
|
|
|
229
|
@Override
|
|
|
230
|
public void onClick(View v) {
|
|
|
231
|
Intent intent = new Intent(getApplicationContext(), AccountRechargeActivity.class);
|
|
|
232
|
startActivity(intent);
|
|
|
233
|
}
|
|
|
234
|
})
|
|
|
235
|
// .setNegativeButton("开通免密支付", new View.OnClickListener() {
|
|
|
236
|
// @Override
|
|
|
237
|
// public void onClick(View v) {
|
|
|
238
|
// Intent intent = new Intent(getApplicationContext(),NonSecretSeettingActivity.class);
|
|
|
239
|
// Uri uri = Uri.parse("chongdianzhuang://");
|
|
|
240
|
// intent.setData(uri);
|
|
|
241
|
// startActivity(intent);
|
|
|
242
|
// }
|
|
|
243
|
// })
|
|
|
244
|
.show();
|
|
|
245
|
break;
|
|
|
246
|
case "305":
|
|
|
247
|
alertDialog.builder()
|
|
|
248
|
.setMsg(rtnMsg)
|
|
|
249
|
.setPositiveButton("联系客服", new View.OnClickListener() {
|
|
|
250
|
@Override
|
|
|
251
|
public void onClick(View v) {
|
|
|
252
|
tellTask();
|
|
|
253
|
}
|
|
|
254
|
}).setNegativeButton("取消", new View.OnClickListener() {
|
|
|
255
|
@Override
|
|
|
256
|
public void onClick(View v) {
|
|
|
257
|
}
|
|
|
258
|
}).show();
|
|
|
259
|
break;
|
|
|
260
|
case "309":
|
|
|
261
|
alertDialog.builder()
|
|
|
262
|
.setMsg(rtnMsg)
|
|
|
263
|
.setPositiveButton("联系客服", new View.OnClickListener() {
|
|
|
264
|
@Override
|
|
|
265
|
public void onClick(View v) {
|
|
|
266
|
tellTask();
|
|
|
267
|
}
|
|
|
268
|
}).setNegativeButton("取消", new View.OnClickListener() {
|
|
|
269
|
@Override
|
|
|
270
|
public void onClick(View v) {
|
|
|
271
|
}
|
|
|
272
|
}).show();
|
|
|
273
|
break;
|
|
|
274
|
case "306":
|
|
|
275
|
//跳转到充电详情界面
|
|
|
276
|
String data306 = JsonUtils.getKeyResult(response, "data");
|
|
|
277
|
String orderid = JsonUtils.getKeyResult(data306, "orderId");
|
|
|
278
|
Intent intent306 = new Intent(getApplicationContext(), ChargingStatusActivity.class);
|
|
|
279
|
intent306.putExtra(com.electric.chargingpile.constant.ChargingConstants.ORDERID, orderid);
|
|
|
280
|
startActivity(intent306);
|
|
|
281
|
finish();
|
|
|
282
|
break;
|
|
|
283
|
case "307":
|
|
|
284
|
alertDialog.builder()
|
|
|
285
|
.setMsg(rtnMsg)
|
|
|
286
|
.setPositiveButton("去充值", new View.OnClickListener() {
|
|
|
287
|
@Override
|
|
|
288
|
public void onClick(View v) {
|
|
|
289
|
Intent intent = new Intent(getApplicationContext(), AccountRechargeActivity.class);
|
|
|
290
|
startActivity(intent);
|
|
|
291
|
}
|
|
|
292
|
}).show();
|
|
|
293
|
break;
|
|
|
294
|
case "311":
|
|
|
295
|
alertDialog.builder()
|
|
|
296
|
.setMsg(rtnMsg)
|
|
|
297
|
.setPositiveButton("开通免密支付", new View.OnClickListener() {
|
|
|
298
|
@Override
|
|
|
299
|
public void onClick(View v) {
|
|
|
300
|
Intent intent = new Intent(getApplicationContext(), NonSecretSeettingActivity.class);
|
|
|
301
|
Uri uri = Uri.parse("chongdianzhuang://");
|
|
|
302
|
intent.setData(uri);
|
|
|
303
|
startActivity(intent);
|
|
|
304
|
}
|
|
|
305
|
}).show();
|
|
|
306
|
break;
|
|
|
307
|
case "1800":
|
|
|
308
|
String data1800 = JsonUtils.getKeyResult(response, "data");
|
|
|
309
|
String pileId = JsonUtils.getKeyResult(data1800, "pileId");
|
|
|
310
|
Intent intent1800 = new Intent(getApplicationContext(), SelectPileActivity.class);
|
|
|
311
|
intent1800.putExtra(com.electric.chargingpile.constant.ChargingConstants.ORDERID, pileId);
|
|
|
312
|
startActivity(intent1800);
|
|
|
313
|
break;
|
|
|
314
|
|
|
|
315
|
case "1000":
|
|
|
316
|
String data1000 = JsonUtils.getKeyResult(response, "data");
|
|
|
317
|
String pileIds = JsonUtils.getKeyResult(data1000, "pileId");
|
|
|
318
|
ChargingPileActivity.actionStart(this,pileIds);
|
|
|
319
|
break;
|
|
|
320
|
default:
|
|
|
321
|
ToastUtil.showToast(getApplicationContext(), rtnMsg, Toast.LENGTH_SHORT);
|
|
|
322
|
break;
|
|
|
323
|
}
|
|
|
324
|
}
|
|
|
325
|
|
|
|
326
|
@AfterPermissionGranted(RC_TELL_PERM)
|
|
|
327
|
public void tellTask() {
|
|
|
328
|
if (hasTellPermission()) {
|
|
|
329
|
// Have permission, do the thing!
|
|
|
330
|
// Toast.makeText(this, "TODO: Camera things", Toast.LENGTH_LONG).show();
|
|
|
331
|
String telNum = "4008810405";
|
|
|
332
|
Intent intent = new Intent();
|
|
|
333
|
intent.setAction("android.intent.action.CALL");
|
|
|
334
|
intent.addCategory("android.intent.category.DEFAULT");
|
|
|
335
|
intent.setData(Uri.parse("tel:" + telNum));
|
|
|
336
|
ChargingPileActivity.this.startActivity(intent);
|
|
|
337
|
|
|
|
338
|
} else {
|
|
|
339
|
LogUtils.e("@@@@@@@");
|
|
|
340
|
// Ask for one permission
|
|
|
341
|
EasyPermissions.requestPermissions(
|
|
|
342
|
this,
|
|
|
343
|
"该功能需要开启拨号权限,是否前往开启?",
|
|
|
344
|
RC_TELL_PERM,
|
|
|
345
|
Manifest.permission.CALL_PHONE);
|
|
|
346
|
}
|
|
|
347
|
}
|
|
|
348
|
|
|
|
349
|
private boolean hasTellPermission() {
|
|
|
350
|
return EasyPermissions.hasPermissions(this, Manifest.permission.CALL_PHONE);
|
|
|
351
|
}
|
|
|
352
|
|
|
|
353
|
@Override
|
|
|
354
|
public void onPermissionsGranted(int requestCode, List<String> perms) {
|
|
|
355
|
|
|
|
356
|
}
|
|
|
357
|
|
|
|
358
|
@Override
|
|
|
359
|
public void onPermissionsDenied(int requestCode, List<String> perms) {
|
|
|
360
|
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
|
|
|
361
|
new AppSettingsDialog.Builder(ChargingPileActivity.this).build().show();
|
|
|
362
|
}
|
|
|
363
|
}
|
|
|
364
|
|
|
|
365
|
private void dismissDialog() {
|
|
|
366
|
if (this != null && !isFinishing()) {
|
|
|
367
|
if (loadingDialog.isShowing()) {
|
|
|
368
|
loadingDialog.dismiss();
|
|
|
369
|
}
|
|
|
370
|
}
|
|
|
371
|
}
|
|
144
|
372
|
|
|
145
|
373
|
|
|
146
|
374
|
public static void actionStart(Context context,String pileId){
|
|
|
@ -51,6 +51,7 @@ import com.tencent.bugly.crashreport.CrashReport;
|
|
51
|
51
|
import com.umeng.analytics.MobclickAgent;
|
|
52
|
52
|
import com.zhy.http.okhttp.OkHttpUtils;
|
|
53
|
53
|
import com.zhy.http.okhttp.callback.StringCallback;
|
|
|
54
|
import com.zhy.http.okhttp.request.RequestCall;
|
|
54
|
55
|
|
|
55
|
56
|
import java.net.URLEncoder;
|
|
56
|
57
|
import java.text.SimpleDateFormat;
|
|
|
@ -70,7 +71,7 @@ import okhttp3.Call;
|
|
70
|
71
|
public class ChargingStatusActivity extends Activity implements View.OnClickListener {
|
|
71
|
72
|
private static final String TAG = "ChargingStatusActivity";
|
|
72
|
73
|
private ImageView iv_charging, iv_back, iv_activity;
|
|
73
|
|
private TextView tv_charging, tv_stop, tv_activity;
|
|
|
74
|
private TextView tv_charging, tv_stop;
|
|
74
|
75
|
private TextView tv_chongdianliang, tv_zhuang_num, tv_jindu, tv_dianya, tv_dianliu, tv_time, tv_cost, tv_help;
|
|
75
|
76
|
String result, stubGroupId;
|
|
76
|
77
|
CircleProgressBar bar;
|
|
|
@ -116,6 +117,7 @@ public class ChargingStatusActivity extends Activity implements View.OnClickList
|
|
116
|
117
|
private LinearLayout layoutCarCertificate;
|
|
117
|
118
|
private ImageView imgA,imgV,imgProgrees;
|
|
118
|
119
|
private TextView certifiedCarOwner;
|
|
|
120
|
private TextView tv_overage;
|
|
119
|
121
|
|
|
120
|
122
|
|
|
121
|
123
|
@Override
|
|
|
@ -138,6 +140,7 @@ public class ChargingStatusActivity extends Activity implements View.OnClickList
|
|
138
|
140
|
// start timer task
|
|
139
|
141
|
setTimerTask();
|
|
140
|
142
|
msgStatus();
|
|
|
143
|
getUserIntegral();
|
|
141
|
144
|
}
|
|
142
|
145
|
|
|
143
|
146
|
|
|
|
@ -158,8 +161,6 @@ public class ChargingStatusActivity extends Activity implements View.OnClickList
|
|
158
|
161
|
String icon = JsonUtils.getKeyResult(response, "icon");
|
|
159
|
162
|
String url = JsonUtils.getKeyResult(response, "url");
|
|
160
|
163
|
if (status.equals("1")) {
|
|
161
|
|
// tv_activity.setVisibility(View.VISIBLE);
|
|
162
|
|
// tv_activity.setText(message);
|
|
163
|
164
|
Picasso.with(MainApplication.context)
|
|
164
|
165
|
.load(icon)
|
|
165
|
166
|
.into(iv_activity);
|
|
|
@ -205,8 +206,6 @@ public class ChargingStatusActivity extends Activity implements View.OnClickList
|
|
205
|
206
|
iv_activity = (ImageView) findViewById(R.id.iv_activity);
|
|
206
|
207
|
iv_back.setOnClickListener(this);
|
|
207
|
208
|
iv_activity.setOnClickListener(this);
|
|
208
|
|
tv_activity = (TextView) findViewById(R.id.tv_activity);
|
|
209
|
|
tv_activity.setOnClickListener(this);
|
|
210
|
209
|
|
|
211
|
210
|
tv_help = findViewById(R.id.tv_help);
|
|
212
|
211
|
tv_help.setOnClickListener(this);
|
|
|
@ -226,6 +225,7 @@ public class ChargingStatusActivity extends Activity implements View.OnClickList
|
|
226
|
225
|
tv_dianya = (TextView) findViewById(R.id.tv_dianya);
|
|
227
|
226
|
tv_dianliu = (TextView) findViewById(R.id.tv_dianliu);
|
|
228
|
227
|
tv_time = (TextView) findViewById(R.id.tv_time);
|
|
|
228
|
tv_overage = (TextView) findViewById(R.id.tv_overage);
|
|
229
|
229
|
layoutCarCertificate = findViewById(R.id.layoutCarCertificate);
|
|
230
|
230
|
|
|
231
|
231
|
imgA = findViewById(R.id.imgA);
|
|
|
@ -649,6 +649,48 @@ public class ChargingStatusActivity extends Activity implements View.OnClickList
|
|
649
|
649
|
}
|
|
650
|
650
|
}
|
|
651
|
651
|
|
|
|
652
|
private void getUserIntegral() {
|
|
|
653
|
String replace = null;
|
|
|
654
|
try {
|
|
|
655
|
long appTime1 = System.currentTimeMillis() / 1000;
|
|
|
656
|
long updatetime = appTime1 - MainMapActivity.cha - 3;
|
|
|
657
|
String token = String.valueOf(updatetime);
|
|
|
658
|
String encode_token = DES3.encode(token);
|
|
|
659
|
replace = URLEncoder.encode(encode_token);
|
|
|
660
|
} catch (Exception e) {
|
|
|
661
|
e.printStackTrace();
|
|
|
662
|
}
|
|
|
663
|
String url = MainApplication.url + "/zhannew/basic/web/index.php/member/get-score?id=" + MainApplication.userId +
|
|
|
664
|
"&phone=" + MainApplication.userPhone + "&password=" + URLEncoder.encode(MainApplication.userPassword) + "&token=" + replace;
|
|
|
665
|
RequestCall call = OkHttpUtils.get().url(url).build();
|
|
|
666
|
call.execute(new StringCallback() {
|
|
|
667
|
@Override
|
|
|
668
|
public void onError(Call call, Exception e) {
|
|
|
669
|
|
|
|
670
|
}
|
|
|
671
|
|
|
|
672
|
@Override
|
|
|
673
|
public void onResponse(String response) {
|
|
|
674
|
// Log.e(TAG, "onResponse:getUserIntegral= "+response );
|
|
|
675
|
String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
|
|
|
676
|
if (null != rtnCode && rtnCode.equals("01")) {
|
|
|
677
|
String rtnMsg = JsonUtils.getKeyResult(response, "rtnMsg");
|
|
|
678
|
String money = JsonUtils.getKeyResult(rtnMsg, "money");
|
|
|
679
|
if (null != money && !money.equals("")) {
|
|
|
680
|
tv_overage.setText(money);
|
|
|
681
|
}
|
|
|
682
|
} else {
|
|
|
683
|
ProfileManager.getInstance().setUsername(getApplicationContext(), "");
|
|
|
684
|
MainApplication.userPhone = "";
|
|
|
685
|
Toast.makeText(getApplicationContext(), "登录已失效,请重新登录", Toast.LENGTH_SHORT).show();
|
|
|
686
|
startActivity(new Intent(getApplicationContext(), LoginActivity.class));
|
|
|
687
|
}
|
|
|
688
|
}
|
|
|
689
|
});
|
|
|
690
|
|
|
|
691
|
}
|
|
|
692
|
|
|
|
693
|
|
|
652
|
694
|
private void chargingChangeStatus(String third_id) {
|
|
653
|
695
|
String url = MainApplication.url + "/zhannew/basic/web/index.php/kazuma/offline";
|
|
654
|
696
|
OkHttpUtils.get().url(url)
|
|
|
@ -59,6 +59,8 @@ public class ConfirmOrderActivity extends AppCompatActivity implements View.OnCl
|
|
59
|
59
|
private LoadingDialog mDialog;
|
|
60
|
60
|
private int try_count=0;
|
|
61
|
61
|
private int delayedSettlementCount=0;
|
|
|
62
|
private RelativeLayout rl_number_plate;
|
|
|
63
|
private TextView tv_num_plate;
|
|
62
|
64
|
|
|
63
|
65
|
@Override
|
|
64
|
66
|
protected void onCreate(@Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
|
|
@ -172,6 +174,8 @@ public class ConfirmOrderActivity extends AppCompatActivity implements View.OnCl
|
|
172
|
174
|
rl_end_info=findViewById(R.id.rl_end_info);
|
|
173
|
175
|
|
|
174
|
176
|
tv_gocomment = findViewById(R.id.tv_gocomment);
|
|
|
177
|
rl_number_plate = findViewById(R.id.rl_number_plate);
|
|
|
178
|
tv_num_plate = findViewById(R.id.tv_num_plate);
|
|
175
|
179
|
|
|
176
|
180
|
iv_back.setOnClickListener(this);
|
|
177
|
181
|
layoutRed.setOnClickListener(this);
|
|
|
@ -193,12 +197,14 @@ public class ConfirmOrderActivity extends AppCompatActivity implements View.OnCl
|
|
193
|
197
|
tv_charging_time.setText(mChargingBean.getTimeCharge());
|
|
194
|
198
|
tv_charging_liang.setText(mChargingBean.getPower()+"度");
|
|
195
|
199
|
|
|
196
|
|
/* if (TextUtils.isEmpty(mChargingBean.getEndInfo())) {
|
|
197
|
|
rl_end_info.setVisibility(View.GONE);
|
|
|
200
|
String plate_number = mChargingBean.getPlate_number();
|
|
|
201
|
|
|
|
202
|
if (plate_number == null || plate_number.equals("")){
|
|
|
203
|
rl_number_plate.setVisibility(View.GONE);
|
|
198
|
204
|
}else{
|
|
199
|
|
tv_tishi.setText(mChargingBean.getEndInfo());
|
|
200
|
|
rl_end_info.setVisibility(View.VISIBLE);
|
|
201
|
|
}*/
|
|
|
205
|
rl_number_plate.setVisibility(View.VISIBLE);
|
|
|
206
|
tv_num_plate.setText(plate_number);
|
|
|
207
|
}
|
|
202
|
208
|
}
|
|
203
|
209
|
}
|
|
204
|
210
|
|
|
|
@ -498,7 +498,8 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
|
498
|
498
|
if (key.length - 1 > 2) {
|
|
499
|
499
|
permissionTask();
|
|
500
|
500
|
} else {
|
|
501
|
|
dialogup();
|
|
|
501
|
// dialogup();
|
|
|
502
|
permissionTask();
|
|
502
|
503
|
}
|
|
503
|
504
|
}
|
|
504
|
505
|
|
|
|
@ -3430,6 +3431,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
|
3430
|
3431
|
private void dialogup_other() {
|
|
3431
|
3432
|
int code = Integer.parseInt(now_versionCode);
|
|
3432
|
3433
|
if (code - getVersionCode(getApplication()) > 0) {
|
|
|
3434
|
// if(true){
|
|
3433
|
3435
|
alterDialog = new AlertDialogUpdate(MainMapActivity.this);
|
|
3434
|
3436
|
|
|
3435
|
3437
|
alterDialog.builder()
|
|
|
@ -3457,8 +3459,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
|
3457
|
3459
|
}
|
|
3458
|
3460
|
}
|
|
3459
|
3461
|
private void downLoadFile() {
|
|
3460
|
|
String url = "http://cdz.evcharge.cc/app/app.apk";
|
|
3461
|
|
|
|
3462
|
3462
|
showProgressWindow();
|
|
3463
|
3463
|
ToastUtil.showToast(getApplicationContext(), "正在下载中", Toast.LENGTH_SHORT);
|
|
3464
|
3464
|
OkHttpUtils.get().url("http://cdz.evcharge.cc/app/app.apk").build()
|
|
|
@ -67,6 +67,9 @@ public class OderDetailsActivity extends Activity implements View.OnClickListene
|
|
67
|
67
|
private LinearLayout red_paper_bag_bottom;
|
|
68
|
68
|
private RelativeLayout rl_end_info;
|
|
69
|
69
|
private String name;
|
|
|
70
|
private TextView tv_num_plate;
|
|
|
71
|
private RelativeLayout rl_number_plate;
|
|
|
72
|
private String plate_number;
|
|
70
|
73
|
|
|
71
|
74
|
@Override
|
|
72
|
75
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
@ -89,6 +92,10 @@ public class OderDetailsActivity extends Activity implements View.OnClickListene
|
|
89
|
92
|
tv_pinglun = (TextView) findViewById(R.id.tv_pinglun);
|
|
90
|
93
|
tv_gocomment = (TextView) findViewById(R.id.tv_gocomment);
|
|
91
|
94
|
red_paper_bag_bottom = findViewById(R.id.red_paper_bag_bottom);
|
|
|
95
|
|
|
|
96
|
rl_number_plate = findViewById(R.id.rl_number_plate);
|
|
|
97
|
tv_num_plate = findViewById(R.id.tv_num_plate);
|
|
|
98
|
|
|
92
|
99
|
iv = (ImageView) findViewById(R.id.iv);
|
|
93
|
100
|
|
|
94
|
101
|
tv_gocomment.setOnClickListener(this);
|
|
|
@ -120,21 +127,23 @@ public class OderDetailsActivity extends Activity implements View.OnClickListene
|
|
120
|
127
|
|
|
121
|
128
|
tv_tishi = (TextView) findViewById(R.id.tv_tishi);
|
|
122
|
129
|
rl_end_info = (RelativeLayout) findViewById(R.id.rl_end_info);
|
|
123
|
|
// if (ChargingStatusActivity.no == 0){
|
|
124
|
|
// tv_tishi.setVisibility(View.GONE);
|
|
125
|
|
// }else{
|
|
|
130
|
|
|
126
|
131
|
if (end_info.equals("")) {
|
|
127
|
132
|
rl_end_info.setVisibility(View.GONE);
|
|
128
|
133
|
} else {
|
|
129
|
134
|
rl_end_info.setVisibility(View.VISIBLE);
|
|
130
|
135
|
tv_tishi.setText(end_info);
|
|
131
|
136
|
}
|
|
132
|
|
// tv_tishi.setVisibility(View.VISIBLE);
|
|
133
|
|
// tv_tishi.setText(end_info);
|
|
134
|
|
// }
|
|
|
137
|
|
|
|
138
|
if (plate_number == null || plate_number.equals("")){
|
|
|
139
|
rl_number_plate.setVisibility(View.GONE);
|
|
|
140
|
}else{
|
|
|
141
|
rl_number_plate.setVisibility(View.VISIBLE);
|
|
|
142
|
tv_num_plate.setText(plate_number);
|
|
|
143
|
}
|
|
|
144
|
|
|
135
|
145
|
|
|
136
|
146
|
if (EmptyUtils.isNotEmpty(activeUrl)) {
|
|
137
|
|
// ToastUtil.showToast(getApplicationContext(),activeUrl,Toast.LENGTH_LONG);
|
|
138
|
147
|
new Handler().postDelayed(new Runnable() {
|
|
139
|
148
|
@Override
|
|
140
|
149
|
public void run() {
|
|
|
@ -165,6 +174,8 @@ public class OderDetailsActivity extends Activity implements View.OnClickListene
|
|
165
|
174
|
zhan_idc = chargingBean.getZhanID();
|
|
166
|
175
|
order_id = chargingBean.getOrderId();
|
|
167
|
176
|
out_order_id = chargingBean.getOutOrderId();
|
|
|
177
|
plate_number = chargingBean.getPlate_number();
|
|
|
178
|
|
|
168
|
179
|
// settlement = getIntent().getStringExtra("settlement");
|
|
169
|
180
|
name = chargingBean.getZhanname();
|
|
170
|
181
|
serviceCharge = chargingBean.getServiceMoney();
|
|
|
@ -52,7 +52,6 @@ import org.jetbrains.annotations.NotNull;
|
|
52
|
52
|
|
|
53
|
53
|
import java.io.BufferedReader;
|
|
54
|
54
|
import java.io.BufferedWriter;
|
|
55
|
|
import java.io.File;
|
|
56
|
55
|
import java.io.IOException;
|
|
57
|
56
|
import java.io.InputStreamReader;
|
|
58
|
57
|
import java.io.OutputStreamWriter;
|
|
|
@ -187,6 +186,9 @@ public class MainApplication extends MultiDexApplication implements CameraXConfi
|
|
187
|
186
|
initImageLoader(getApplicationContext());
|
|
188
|
187
|
|
|
189
|
188
|
try {
|
|
|
189
|
if (BuildConfig.DEBUG){
|
|
|
190
|
OkHttpUtils.getInstance().debug("hyc",true);
|
|
|
191
|
}
|
|
190
|
192
|
OkHttpUtils.getInstance().setCertificates(getAssets().open("ca.crt"));
|
|
191
|
193
|
OkHttpUtils.getInstance().setCertificates();
|
|
192
|
194
|
} catch (IOException e) {
|
|
|
@ -6,5 +6,6 @@ public interface ChargingConstants {
|
|
6
|
6
|
String URL = "url";
|
|
7
|
7
|
String FLAG = "flag";
|
|
8
|
8
|
String ORDERID = "orderid";
|
|
|
9
|
String PLATE_NUM = "plate_num";
|
|
9
|
10
|
String TYPE = "type";
|
|
10
|
11
|
}
|
|
|
@ -44,6 +44,15 @@ public class ChargingBean implements Serializable {
|
|
44
|
44
|
private String serviceMoney;
|
|
45
|
45
|
private String totalMoney;
|
|
46
|
46
|
private String redMoney;
|
|
|
47
|
private String plate_number;
|
|
|
48
|
|
|
|
49
|
public String getPlate_number() {
|
|
|
50
|
return plate_number;
|
|
|
51
|
}
|
|
|
52
|
|
|
|
53
|
public void setPlate_number(String plate_number) {
|
|
|
54
|
this.plate_number = plate_number;
|
|
|
55
|
}
|
|
47
|
56
|
|
|
48
|
57
|
public String getOrderId() {
|
|
49
|
58
|
return orderId;
|
|
|
@ -742,11 +742,10 @@ public class ProfileManager {
|
|
742
|
742
|
|
|
743
|
743
|
public void setLicensePlateHistory(String str) {
|
|
744
|
744
|
ArrayList<String> list = getLicensePlateHistory();
|
|
|
745
|
list.remove(str); //除重
|
|
745
|
746
|
if (list.size() >= 6){
|
|
746
|
747
|
list.remove(list.size() -1 );
|
|
747
|
748
|
}
|
|
748
|
|
|
|
749
|
|
list.remove(str);
|
|
750
|
749
|
list.add(0,str);
|
|
751
|
750
|
PreferenceManager.getInstance(MainApplication.context).putString(KEY_LICENSE_PLATE_HISTORY, new Gson().toJson(list));
|
|
752
|
751
|
}
|
|
|
@ -2,6 +2,7 @@ package com.electric.chargingpile.view;
|
|
2
|
2
|
|
|
3
|
3
|
import android.app.Dialog;
|
|
4
|
4
|
import android.content.Context;
|
|
|
5
|
import android.util.Log;
|
|
5
|
6
|
import android.view.Display;
|
|
6
|
7
|
import android.view.LayoutInflater;
|
|
7
|
8
|
import android.view.View;
|
|
|
@ -159,7 +159,7 @@
|
|
159
|
159
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
160
|
160
|
|
|
161
|
161
|
<View
|
|
162
|
|
android:layout_width="1dp"
|
|
|
162
|
android:layout_width="match_parent"
|
|
163
|
163
|
android:layout_height="0dp"
|
|
164
|
164
|
android:layout_weight="1" />
|
|
165
|
165
|
|
|
|
@ -231,16 +231,6 @@
|
|
231
|
231
|
app:wlv_waveColor="#3fffffff"
|
|
232
|
232
|
app:wlv_wave_background_Color="#00ffffff" />
|
|
233
|
233
|
|
|
234
|
|
|
|
235
|
|
<!--<com.loonggg.circleprogressbarlibrary.view.CircleProgressBar-->
|
|
236
|
|
<!--android:id="@+id/pb"-->
|
|
237
|
|
<!--android:layout_width="143dp"-->
|
|
238
|
|
<!--android:layout_height="143dp"-->
|
|
239
|
|
<!--android:visibility="gone"-->
|
|
240
|
|
<!--android:layout_centerInParent="true"-->
|
|
241
|
|
<!--loonggg:bgProgressBarColor="#efefef"-->
|
|
242
|
|
<!--loonggg:circleStrokeWidth="5dp" />-->
|
|
243
|
|
|
|
244
|
234
|
<LinearLayout
|
|
245
|
235
|
android:layout_width="wrap_content"
|
|
246
|
236
|
android:layout_height="wrap_content"
|
|
|
@ -347,10 +337,43 @@
|
|
347
|
337
|
|
|
348
|
338
|
</RelativeLayout>
|
|
349
|
339
|
|
|
|
340
|
<View
|
|
|
341
|
android:layout_width="0.5dp"
|
|
|
342
|
android:layout_height="match_parent"
|
|
|
343
|
android:background="@color/ui_6d" />
|
|
|
344
|
|
|
|
345
|
<RelativeLayout
|
|
|
346
|
android:layout_width="0dp"
|
|
|
347
|
android:layout_height="match_parent"
|
|
|
348
|
android:layout_weight="1">
|
|
|
349
|
|
|
|
350
|
<TextView
|
|
|
351
|
android:layout_width="wrap_content"
|
|
|
352
|
android:layout_height="wrap_content"
|
|
|
353
|
android:layout_alignParentTop="true"
|
|
|
354
|
android:layout_centerHorizontal="true"
|
|
|
355
|
android:text="账户余额"
|
|
|
356
|
android:textColor="@color/ui_68"
|
|
|
357
|
android:textSize="12sp" />
|
|
|
358
|
|
|
|
359
|
<TextView
|
|
|
360
|
android:id="@+id/tv_overage"
|
|
|
361
|
android:layout_width="wrap_content"
|
|
|
362
|
android:layout_height="wrap_content"
|
|
|
363
|
android:layout_alignParentBottom="true"
|
|
|
364
|
android:layout_centerHorizontal="true"
|
|
|
365
|
android:layout_centerVertical="true"
|
|
|
366
|
android:text="--"
|
|
|
367
|
android:textColor="@color/ui_62"
|
|
|
368
|
android:textSize="21sp" />
|
|
|
369
|
|
|
|
370
|
</RelativeLayout>
|
|
|
371
|
|
|
350
|
372
|
</LinearLayout>
|
|
351
|
373
|
|
|
352
|
374
|
|
|
353
|
375
|
<RelativeLayout
|
|
|
376
|
android:paddingBottom="30dp"
|
|
354
|
377
|
android:layout_width="match_parent"
|
|
355
|
378
|
android:layout_height="match_parent">
|
|
356
|
379
|
<LinearLayout
|
|
|
@ -385,6 +408,7 @@
|
|
385
|
408
|
|
|
386
|
409
|
</LinearLayout>
|
|
387
|
410
|
<ImageView
|
|
|
411
|
tools:src="@drawable/ic_charging_pile"
|
|
388
|
412
|
tools:visibility="visible"
|
|
389
|
413
|
android:id="@+id/iv_activity"
|
|
390
|
414
|
android:layout_width="wrap_content"
|
|
|
@ -396,20 +420,6 @@
|
|
396
|
420
|
android:visibility="gone" />
|
|
397
|
421
|
|
|
398
|
422
|
<TextView
|
|
399
|
|
tools:visibility="visible"
|
|
400
|
|
android:id="@+id/tv_activity"
|
|
401
|
|
android:layout_width="wrap_content"
|
|
402
|
|
android:layout_height="wrap_content"
|
|
403
|
|
android:layout_below="@+id/tv_stop"
|
|
404
|
|
android:layout_centerHorizontal="true"
|
|
405
|
|
android:paddingTop="20dp"
|
|
406
|
|
android:paddingBottom="15dp"
|
|
407
|
|
android:text=""
|
|
408
|
|
android:textColor="#ffa900"
|
|
409
|
|
android:textSize="14sp"
|
|
410
|
|
android:visibility="visible" />
|
|
411
|
|
|
|
412
|
|
<TextView
|
|
413
|
423
|
android:layout_centerHorizontal="true"
|
|
414
|
424
|
android:textStyle="bold"
|
|
415
|
425
|
android:id="@+id/tv_stop"
|
|
|
@ -273,6 +273,34 @@
|
|
273
|
273
|
android:textSize="14sp" />
|
|
274
|
274
|
|
|
275
|
275
|
</RelativeLayout>
|
|
|
276
|
<RelativeLayout
|
|
|
277
|
tools:visibility="visible"
|
|
|
278
|
android:visibility="gone"
|
|
|
279
|
android:id="@+id/rl_number_plate"
|
|
|
280
|
android:layout_width="match_parent"
|
|
|
281
|
android:layout_height="wrap_content"
|
|
|
282
|
android:layout_marginTop="13dp">
|
|
|
283
|
|
|
|
284
|
<TextView
|
|
|
285
|
android:layout_width="wrap_content"
|
|
|
286
|
android:layout_height="wrap_content"
|
|
|
287
|
android:layout_alignParentLeft="true"
|
|
|
288
|
android:layout_marginLeft="15dp"
|
|
|
289
|
android:text="充电车辆"
|
|
|
290
|
android:textColor="@color/ui_68"
|
|
|
291
|
android:textSize="14sp" />
|
|
|
292
|
|
|
|
293
|
<TextView
|
|
|
294
|
android:id="@+id/tv_num_plate"
|
|
|
295
|
android:layout_width="wrap_content"
|
|
|
296
|
android:layout_height="wrap_content"
|
|
|
297
|
android:layout_alignParentRight="true"
|
|
|
298
|
android:layout_marginRight="15dp"
|
|
|
299
|
tools:text="--"
|
|
|
300
|
android:textColor="@color/ui_68"
|
|
|
301
|
android:textSize="14sp" />
|
|
|
302
|
|
|
|
303
|
</RelativeLayout>
|
|
276
|
304
|
|
|
277
|
305
|
|
|
278
|
306
|
</LinearLayout>
|
|
|
@ -282,6 +282,35 @@
|
|
282
|
282
|
android:textSize="14sp" />
|
|
283
|
283
|
|
|
284
|
284
|
</RelativeLayout>
|
|
|
285
|
|
|
|
286
|
<RelativeLayout
|
|
|
287
|
tools:visibility="visible"
|
|
|
288
|
android:visibility="gone"
|
|
|
289
|
android:id="@+id/rl_number_plate"
|
|
|
290
|
android:layout_width="match_parent"
|
|
|
291
|
android:layout_height="wrap_content"
|
|
|
292
|
android:layout_marginTop="13dp">
|
|
|
293
|
|
|
|
294
|
<TextView
|
|
|
295
|
android:layout_width="wrap_content"
|
|
|
296
|
android:layout_height="wrap_content"
|
|
|
297
|
android:layout_alignParentLeft="true"
|
|
|
298
|
android:layout_marginLeft="15dp"
|
|
|
299
|
android:text="充电车辆"
|
|
|
300
|
android:textColor="@color/ui_68"
|
|
|
301
|
android:textSize="14sp" />
|
|
|
302
|
|
|
|
303
|
<TextView
|
|
|
304
|
android:id="@+id/tv_num_plate"
|
|
|
305
|
android:layout_width="wrap_content"
|
|
|
306
|
android:layout_height="wrap_content"
|
|
|
307
|
android:layout_alignParentRight="true"
|
|
|
308
|
android:layout_marginRight="15dp"
|
|
|
309
|
tools:text="--"
|
|
|
310
|
android:textColor="@color/ui_68"
|
|
|
311
|
android:textSize="14sp" />
|
|
|
312
|
|
|
|
313
|
</RelativeLayout>
|
|
285
|
314
|
</LinearLayout>
|
|
286
|
315
|
|
|
287
|
316
|
<TextView
|
|
|
@ -21,9 +21,9 @@
|
|
21
|
21
|
<com.qmuiteam.qmui.widget.QMUIProgressBar
|
|
22
|
22
|
android:id="@+id/qMUIProgressBar"
|
|
23
|
23
|
android:layout_width="match_parent"
|
|
24
|
|
android:layout_height="16dp"
|
|
|
24
|
android:layout_height="12dp"
|
|
25
|
25
|
android:textColor="@color/lvse"
|
|
26
|
|
android:textSize="16sp"
|
|
|
26
|
android:textSize="12sp"
|
|
27
|
27
|
android:layout_marginBottom="20dp"
|
|
28
|
28
|
android:layout_marginLeft="16dp"
|
|
29
|
29
|
android:layout_marginRight="16dp"
|