dget.RecyclerView 22
            android:id="@+id/recyclerView"
23
            android:layout_width="match_parent"
24
            android:layout_height="320dp"/>
25
        <ProgressBar
26
            android:id="@+id/progressBar"
27
            android:layout_centerInParent="true"
28
            android:layout_width="wrap_content"
29
            android:layout_height="wrap_content"    />
30
        <TextView
31
            android:visibility="gone"
32
            android:gravity="center"
33
            android:text="暂无优惠券~"
34
            android:textColor="#ff9b9b9b"
35
            android:textSize="18sp"
36
            android:id="@+id/noPreferential"
37
            android:layout_width="match_parent"
38
            android:layout_height="320dp"/>
39
    </RelativeLayout>
31 40
    <TextView
32 41
        android:id="@+id/complete"
33 42
        android:layout_width="match_parent"

+ 2 - 1
app/src/main/res/layout/item_text_checkbox.xml

@ -1,6 +1,7 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
    android:layout_width="match_parent"
4
    xmlns:tools="http://schemas.android.com/tools"
4 5
    android:padding="10dp"
5 6
    android:layout_height="wrap_content">
6 7
@ -10,7 +11,7 @@
10 11
        android:layout_weight="1"
11 12
        android:layout_width="0dp"
12 13
        android:layout_height="wrap_content"
13
        android:text="不使用"
14
        tools:text="不使用"
14 15
        android:textColor="@color/color_ff333333"
15 16
        android:textSize="14sp" />
16 17
    <CheckBox

+ 2 - 0
app/src/main/res/layout/recommend_charging_station_item.xml

@ -212,6 +212,8 @@
212 212
        </LinearLayout>
213 213
    </LinearLayout>
214 214
    <TextView
215
        android:ellipsize="end"
216
        android:lines="1"
215 217
        android:visibility="gone"
216 218
        android:id="@+id/parkingFee"
217 219
        android:layout_marginEnd="15dp"

+ 25 - 8
zxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java

@ -65,6 +65,7 @@ import com.google.zxing.client.android.camera.CameraManager;
65 65
import com.google.zxing.client.android.clipboard.ClipboardInterface;
66 66
import com.google.zxing.client.android.constant.ChargingConstants;
67 67
import com.google.zxing.client.android.constant.UrlConstants;
68
import com.google.zxing.client.android.data.DelayedSettlementBean;
68 69
import com.google.zxing.client.android.data.OperatorPicsBean;
69 70
import com.google.zxing.client.android.dialog.SettleAccountsDialog;
70 71
import com.google.zxing.client.android.history.HistoryItem;
@ -571,13 +572,13 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
571 572
    @Override
572 573
    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
573 574
        if (resultCode == RESULT_OK && requestCode == HISTORY_REQUEST_CODE && historyManager != null) {
574
            if (isSettleAccounts == 0){
575
//            if (isSettleAccounts == 0){
575 576
                int itemNumber = intent.getIntExtra(Intents.History.ITEM_NUMBER, -1);
576 577
                if (itemNumber >= 0) {
577 578
                    HistoryItem historyItem = historyManager.buildHistoryItem(itemNumber);
578 579
                    decodeOrStoreSavedBitmap(null, historyItem.getResult());
579 580
                }
580
            }
581
//            }
581 582
        }
582 583
    }
583 584
@ -1113,7 +1114,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
1113 1114
    }
1114 1115
1115 1116
    private void handlingOperations(String response, int interfaceType) {
1116
        LogUtils.e(interfaceType + "---" + response);
1117
        LogUtils.e(interfaceType + "hyc---" + response);
1117 1118
        String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
1118 1119
        String rtnMsg = JsonUtils.getKeyResult(response, "rtnMsg");
1119 1120
        switch (rtnCode) {
@ -1168,6 +1169,12 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
1168 1169
                }
1169 1170
                try305Count++;
1170 1171
                if (!CaptureActivity.this.isFinishing() && CaptureActivity.this != null) {
1172
                    String data = JsonUtils.getKeyResult(response, "data");
1173
                    Gson gson=new Gson();
1174
                    List<DelayedSettlementBean> datas = gson.fromJson(data, new TypeToken<List<DelayedSettlementBean>>() {
1175
                    }.getType());
1176
                    showSettleAccountsDialog(datas);
1177
/*
1171 1178
                    alertDialog.builder()
1172 1179
                            .setMsg(rtnMsg)
1173 1180
                            .setPositiveButton("联系客服", new View.OnClickListener() {
@ -1175,7 +1182,8 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
1175 1182
                                public void onClick(View v) {
1176 1183
                                    try305Count = 1;
1177 1184
                                    //tellTask();
1178
                                    wechatAlert();
1185
//                                    wechatAlert();
1186
                                    showSettleAccountsDialog();
1179 1187
                                }
1180 1188
                            }).setNegativeButton("取消", new View.OnClickListener() {
1181 1189
                        @Override
@ -1183,6 +1191,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
1183 1191
                            try305Count = 1;
1184 1192
                        }
1185 1193
                    }).show();
1194
*/
1186 1195
                }
1187 1196
                break;
1188 1197
            case "309":
@ -1395,23 +1404,31 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
1395 1404
        });
1396 1405
    }
1397 1406
1398
    private void showSettleAccountsDialog(){
1407
    private void showSettleAccountsDialog(final List<DelayedSettlementBean> datas){
1399 1408
        if (isDestroyed() ||isFinishing()) {
1400 1409
            return;
1401 1410
        }
1402
        isSettleAccounts=1;
1411
1403 1412
        new SettleAccountsDialog(this)
1404 1413
                .builder()
1405
                .setCancleOnClick(new View.OnClickListener() {
1414
                .setOpenOnClick(new View.OnClickListener() {
1406 1415
                    @Override
1407 1416
                    public void onClick(View v) {
1408
                        isSettleAccounts=1;
1417
                        try305Count = 1;
1418
                        if (datas!=null && datas.size()>0){
1419
                            Intent intent = new Intent();
1420
                            intent.setClassName("com.electric.chargingpile",
1421
                                    "com.electric.chargingpile.activity.ConfirmOrderActivity");
1422
                            intent.putExtra(ChargingConstants.ORDERID, datas.get(0).getOrder_id());
1423
                            startActivity(intent);
1424
                        }
1409 1425
                    }
1410 1426
                })
1411 1427
                .setCancleOnClick(new View.OnClickListener(){
1412 1428
1413 1429
                    @Override
1414 1430
                    public void onClick(View v) {
1431
                        try305Count = 1;
1415 1432
                        finish();
1416 1433
                    }
1417 1434
                })

+ 1 - 0
zxing/src/main/java/com/google/zxing/client/android/constant/ChargingConstants.java

@ -7,4 +7,5 @@ public interface ChargingConstants {
7 7
    String FLAG = "flag";
8 8
    String ORDERID = "orderid";
9 9
    String TYPE = "type";
10
    String HBID = "hbid";
10 11
}

+ 8 - 1
zxing/src/main/java/com/google/zxing/client/android/constant/UrlConstants.java

@ -2,8 +2,15 @@ package com.google.zxing.client.android.constant;
2 2
3 3
public interface UrlConstants {
4 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
5 7
    String USER_CHARGING_CHECK_URL = HOST_URL + "api/charge/check-user";
6 8
    String START_CHARGING_URL = HOST_URL + "api/charge/start";
7 9
    String CHARGING_STATUS_URL = HOST_URL + "api/charge/query";
8
    String STOP_CHARGING_URL = HOST_URL + "api/charge/close";
10
    String STOP_CHARGING_URL = HOST_URL + "api/charge/close";//关闭充电
11
12
    String RED_ENVELOPE_LIST = HOST_URL + "/api/charge/hblist";//红包列表
13
    String SETTLEMENT = HOST_URL + "api/charge/settlement"; //选中红包时,提交结算时的接口
14
    String QUERY_NOT_CLOSE = HOST_URL + "api/charge/querynotclose";  //仅仅是查询接口状态,充电是否停止,state >= 2 则表示停止
15
9 16
}

+ 80 - 0
zxing/src/main/java/com/google/zxing/client/android/data/DelayedSettlementBean.java

@ -0,0 +1,80 @@
1
package com.google.zxing.client.android.data;
2
3
public class DelayedSettlementBean {
4
    private String id;
5
    private String company;
6
    private String third_party_id;
7
    private String user_id;
8
    private String third_id;
9
    private String settlement;
10
    private String order_id;
11
12
    public String getOrder_id() {
13
        return order_id;
14
    }
15
16
    public void setOrder_id(String order_id) {
17
        this.order_id = order_id;
18
    }
19
20
    @Override
21
    public String toString() {
22
        return "DelayedSettlementBean{" +
23
                "id='" + id + '\'' +
24
                ", company='" + company + '\'' +
25
                ", third_party_id='" + third_party_id + '\'' +
26
                ", user_id='" + user_id + '\'' +
27
                ", third_id='" + third_id + '\'' +
28
                ", settlement='" + settlement + '\'' +
29
                ", order_id='" + order_id + '\'' +
30
                '}';
31
    }
32
33
    public String getId() {
34
        return id;
35
    }
36
37
    public void setId(String id) {
38
        this.id = id;
39
    }
40
41
    public String getCompany() {
42
        return company;
43
    }
44
45
    public void setCompany(String company) {
46
        this.company = company;
47
    }
48
49
    public String getThird_party_id() {
50
        return third_party_id;
51
    }
52
53
    public void setThird_party_id(String third_party_id) {
54
        this.third_party_id = third_party_id;
55
    }
56
57
    public String getUser_id() {
58
        return user_id;
59
    }
60
61
    public void setUser_id(String user_id) {
62
        this.user_id = user_id;
63
    }
64
65
    public String getThird_id() {
66
        return third_id;
67
    }
68
69
    public void setThird_id(String third_id) {
70
        this.third_id = third_id;
71
    }
72
73
    public String getSettlement() {
74
        return settlement;
75
    }
76
77
    public void setSettlement(String settlement) {
78
        this.settlement = settlement;
79
    }
80
}

cdzApp - Gogs: Go Git Service

充电桩app代码

1145873331@qq.com d2f405e921 add video play 7 vuotta sitten
..
src d2f405e921 add video play 7 vuotta sitten
.gitignore d2f405e921 add video play 7 vuotta sitten
build.gradle d2f405e921 add video play 7 vuotta sitten
proguard-rules.pro d2f405e921 add video play 7 vuotta sitten