huyuguo 5 ans auparavant
Parent
commit
f91342ac03

+ 3 - 1
app/src/main/java/com/electric/chargingpile/activity/RecommendChargingStationActivity.java

@ -391,6 +391,8 @@ public class RecommendChargingStationActivity extends AppCompatActivity implemen
391 391
                            double d = AMapUtils.calculateLineDistance(center, ll);
392 392
                            list.get(i).setDistanceNum(d);
393 393
                            list.get(i).setDistance(Util.getDistance(d));
394
395
                            list.get(i).setZhan_id(list.get(i).getId()); // 呵呵...
394 396
                        }
395 397
                        recommendZhanList = list;
396 398
                        filterChargingStation();
@ -484,7 +486,7 @@ public class RecommendChargingStationActivity extends AppCompatActivity implemen
484 486
                public void onClick(View v) {
485 487
                    Intent intent = new Intent(getApplication(),
486 488
                            NewZhanDetailsActivity.class);
487
                    intent.putExtra("zhan_id", recommendZhan.getId());
489
                    intent.putExtra("zhan_id", recommendZhan.getZhan_id());
488 490
                    startActivity(intent);
489 491
                }
490 492
            });

+ 1 - 1
app/src/main/java/com/electric/chargingpile/activity/RecommendZhanActivity.java

@ -890,7 +890,7 @@ public class RecommendZhanActivity extends Activity implements View.OnClickListe
890 890
                    MobclickAgent.onEvent(getApplicationContext(), "0402");
891 891
                    Intent intent = new Intent(getApplication(),
892 892
                            NewZhanDetailsActivity.class);
893
                    intent.putExtra("zhan_id", rz.getId());
893
                    intent.putExtra("zhan_id", rz.getZhan_id());
894 894
                    startActivity(intent);
895 895
                }
896 896
            });

+ 5 - 2
app/src/main/java/com/electric/chargingpile/activity/ZhanListActivity.java

@ -186,6 +186,7 @@ public class ZhanListActivity extends Activity implements View.OnClickListener {
186 186
187 187
188 188
                            } catch (Exception e) {
189
                                e.printStackTrace();
189 190
                            }
190 191
                        }
191 192
@ -330,7 +331,7 @@ public class ZhanListActivity extends Activity implements View.OnClickListener {
330 331
            public void run() {
331 332
                try {
332 333
                    // 创建Socket
333
                    socket = new Socket("cdz.evcharge.cc", 9503); // IP:10.14.114.127,端口54321
334
                    socket = new Socket("59.110.68.162", 9503); // IP:59.110.68.162,端口54321 cdz.evcharge.cc
334 335
                    // 向服务器发送消息
335 336
                    PrintWriter out = new PrintWriter(new BufferedWriter(
336 337
                            new OutputStreamWriter(socket.getOutputStream())), true);
@ -428,6 +429,7 @@ public class ZhanListActivity extends Activity implements View.OnClickListener {
428 429
                    LogUtils.e(socket_string);
429 430
                    ete1(socket_string);
430 431
                } catch (Exception e) {
432
                    e.printStackTrace();
431 433
                }
432 434
            }
433 435
        }).start();
@ -439,7 +441,7 @@ public class ZhanListActivity extends Activity implements View.OnClickListener {
439 441
            @Override
440 442
            public void run() {
441 443
                try {
442
                    socket = new Socket("cdz.evcharge.cc", 9503); // IP:10.14.114.127,端口54321
444
                    socket = new Socket("59.110.68.162", 9503); // IP:59.110.68.162,端口54321 cdz.evcharge.cc
443 445
                    socket.setReceiveBufferSize(99999);  //  接收缓冲大小
444 446
                    socket.setSendBufferSize(99999);
445 447
                    // 向服务器发送消息
@ -465,6 +467,7 @@ public class ZhanListActivity extends Activity implements View.OnClickListener {
465 467
                    socket.close();
466 468
467 469
                } catch (Exception e) {
470
                    e.printStackTrace();
468 471
                }
469 472
            }
470 473
        }).start();

+ 38 - 34
app/src/main/java/com/electric/chargingpile/data/RecommendZhan.java

@ -31,13 +31,13 @@ public class RecommendZhan {
31 31
     * stop_cost: 免费 收费
32 32
     */
33 33
34
    private String id;
35 34
    private String zhan_name;
36 35
    private String supplier;
37 36
    private String slow_num;
38 37
    private String fast_num;
39 38
    private String poi_jing;
40 39
    private String poi_wei;
40
    private String id;
41 41
    private String zhan_id;
42 42
    private String charge_cost_way2;
43 43
    private String distance;
@ -55,6 +55,15 @@ public class RecommendZhan {
55 55
    private String park_location;
56 56
    private String stop_cost;
57 57
58
59
    public String getId() {
60
        return id;
61
    }
62
63
    public void setId(String id) {
64
        this.id = id;
65
    }
66
58 67
    public double getDistanceNum() {
59 68
        return distanceNum;
60 69
    }
@ -111,39 +120,6 @@ public class RecommendZhan {
111 120
        return comment_cnt;
112 121
    }
113 122
114
    public String getId() {
115
        return id;
116
    }
117
118
    public void setId(String id) {
119
        this.id = id;
120
    }
121
122
    @Override
123
    public String toString() {
124
        return "RecommendZhan{" +
125
                "id='" + id + '\'' +
126
                ", zhan_name='" + zhan_name + '\'' +
127
                ", supplier='" + supplier + '\'' +
128
                ", slow_num='" + slow_num + '\'' +
129
                ", fast_num='" + fast_num + '\'' +
130
                ", poi_jing='" + poi_jing + '\'' +
131
                ", poi_wei='" + poi_wei + '\'' +
132
                ", zhan_id='" + zhan_id + '\'' +
133
                ", charge_cost_way2='" + charge_cost_way2 + '\'' +
134
                ", distance='" + distance + '\'' +
135
                ", score=" + score +
136
                ", pile_status='" + pile_status + '\'' +
137
                ", fast_able_num='" + fast_able_num + '\'' +
138
                ", slow_able_num='" + slow_able_num + '\'' +
139
                ", star='" + star + '\'' +
140
                ", own_pay='" + own_pay + '\'' +
141
                ", zongjia=" + zongjia +
142
                ", charge_record_cnt=" + charge_record_cnt +
143
                ", comment_cnt=" + comment_cnt +
144
                '}';
145
    }
146
147 123
    public String getZhan_name() {
148 124
        return zhan_name;
149 125
    }
@ -263,4 +239,32 @@ public class RecommendZhan {
263 239
    public void setOwn_pay(String own_pay) {
264 240
        this.own_pay = own_pay;
265 241
    }
242
243
    @Override
244
    public String toString() {
245
        return "RecommendZhan{" +
246
                "zhan_name='" + zhan_name + '\'' +
247
                ", supplier='" + supplier + '\'' +
248
                ", slow_num='" + slow_num + '\'' +
249
                ", fast_num='" + fast_num + '\'' +
250
                ", poi_jing='" + poi_jing + '\'' +
251
                ", poi_wei='" + poi_wei + '\'' +
252
                ", zhan_id='" + zhan_id + '\'' +
253
                ", charge_cost_way2='" + charge_cost_way2 + '\'' +
254
                ", distance='" + distance + '\'' +
255
                ", distanceNum=" + distanceNum +
256
                ", score=" + score +
257
                ", pile_status='" + pile_status + '\'' +
258
                ", fast_able_num='" + fast_able_num + '\'' +
259
                ", slow_able_num='" + slow_able_num + '\'' +
260
                ", star='" + star + '\'' +
261
                ", own_pay='" + own_pay + '\'' +
262
                ", zongjia=" + zongjia +
263
                ", charge_record_cnt=" + charge_record_cnt +
264
                ", comment_cnt=" + comment_cnt +
265
                ", belong_attribute='" + belong_attribute + '\'' +
266
                ", park_location='" + park_location + '\'' +
267
                ", stop_cost='" + stop_cost + '\'' +
268
                '}';
269
    }
266 270
}