Commit f2d67e518c0e0d4b972ca00c22dcaa50e6c48a14

Authored by 杜方
1 parent efb28bd0

畅游通核销app: 1.修复全检的上传数量 2.身份证和扫二维码检票数据显示问题

src/com/ectrip/cyt/center/CenterHandle.java
@@ -114,6 +114,7 @@ public class CenterHandle { @@ -114,6 +114,7 @@ public class CenterHandle {
114 * @param pwd 114 * @param pwd
115 * @param verifyPassword 115 * @param verifyPassword
116 */ 116 */
  117 + String allQuantity;
117 public void allTicket(int position, String pwd, String verifyPassword) { 118 public void allTicket(int position, String pwd, String verifyPassword) {
118 isAll = true; 119 isAll = true;
119 getConsumedSeq(position); 120 getConsumedSeq(position);
@@ -122,13 +123,14 @@ public class CenterHandle { @@ -122,13 +123,14 @@ public class CenterHandle {
122 productOfConsumeOrders = new ArrayList<>(); 123 productOfConsumeOrders = new ArrayList<>();
123 for (int i = 0; i < products.size(); i++) { 124 for (int i = 0; i < products.size(); i++) {
124 Integer base = new Integer(products.get(i).getBaseQuantity()) * totle; 125 Integer base = new Integer(products.get(i).getBaseQuantity()) * totle;
  126 + allQuantity = products.get(i).getQuantity();
125 ProductOfConsumeOrder consumeOrder = new ProductOfConsumeOrder(products.get(i).getProductId(), base); 127 ProductOfConsumeOrder consumeOrder = new ProductOfConsumeOrder(products.get(i).getProductId(), base);
126 productOfConsumeOrders.add(consumeOrder); 128 productOfConsumeOrders.add(consumeOrder);
127 } 129 }
128 130
129 HttpHelper.getInstance(context).consumeOrder( 131 HttpHelper.getInstance(context).consumeOrder(
130 orderInfos.get(position).getOrderId(), 132 orderInfos.get(position).getOrderId(),
131 - orderInfos.get(position).getOrderAmount(), pwd, verifyPassword, 133 + allQuantity, pwd, verifyPassword,
132 consumedSeq, productOfConsumeOrders, 134 consumedSeq, productOfConsumeOrders,
133 new CenterConsumeCallback(position, true, 0)); 135 new CenterConsumeCallback(position, true, 0));
134 } 136 }
@@ -369,7 +371,7 @@ public class CenterHandle { @@ -369,7 +371,7 @@ public class CenterHandle {
369 if (isAll) { 371 if (isAll) {
370 HttpHelper.getInstance(context).consumeOrder( 372 HttpHelper.getInstance(context).consumeOrder(
371 orderInfos.get(position).getOrderId(), 373 orderInfos.get(position).getOrderId(),
372 - orderInfos.get(position).getOrderAmount(), password, verifyPassword, 374 + allQuantity, password, verifyPassword,
373 consumedSeq, productOfConsumeOrders, 375 consumedSeq, productOfConsumeOrders,
374 new CenterConsumeCallback(position, true, 0)); 376 new CenterConsumeCallback(position, true, 0));
375 } else { 377 } else {
@@ -432,7 +434,7 @@ public class CenterHandle { @@ -432,7 +434,7 @@ public class CenterHandle {
432 if (isAll) { 434 if (isAll) {
433 HttpHelper.getInstance(context).consumeOrder( 435 HttpHelper.getInstance(context).consumeOrder(
434 orderInfos.get(position).getOrderId(), 436 orderInfos.get(position).getOrderId(),
435 - orderInfos.get(position).getOrderAmount(), password, verifyPassword, 437 + allQuantity, password, verifyPassword,
436 consumedSeq, productOfConsumeOrders, 438 consumedSeq, productOfConsumeOrders,
437 new CenterConsumeCallback(position, true, 0)); 439 new CenterConsumeCallback(position, true, 0));
438 } else { 440 } else {
src/com/ectrip/cyt/ui/IDOrderListActivity.java
@@ -36,6 +36,7 @@ import com.ectrip.cyt.constant.DeviceType; @@ -36,6 +36,7 @@ import com.ectrip.cyt.constant.DeviceType;
36 import com.ectrip.cyt.constant.OrderCode; 36 import com.ectrip.cyt.constant.OrderCode;
37 import com.ectrip.cyt.constant.SelectAction; 37 import com.ectrip.cyt.constant.SelectAction;
38 import com.ectrip.cyt.response.PassengerInfosBean; 38 import com.ectrip.cyt.response.PassengerInfosBean;
  39 +import com.ectrip.cyt.response.ProductInfoQuery;
39 import com.ectrip.cyt.response.QueryOrderResponse; 40 import com.ectrip.cyt.response.QueryOrderResponse;
40 import com.ectrip.cyt.utils.LogUtil; 41 import com.ectrip.cyt.utils.LogUtil;
41 import com.ectrip.cyt.utils.SharedPreferences2Obj; 42 import com.ectrip.cyt.utils.SharedPreferences2Obj;
@@ -441,20 +442,38 @@ public class IDOrderListActivity extends BaseActivity implements @@ -441,20 +442,38 @@ public class IDOrderListActivity extends BaseActivity implements
441 // String[] str = list.toArray(new String[0]); 442 // String[] str = list.toArray(new String[0]);
442 // centerHandle.showDialog(str); 443 // centerHandle.showDialog(str);
443 LogUtil.d("IDOrderListActivity","idcardNumber = "+idcardNumber); 444 LogUtil.d("IDOrderListActivity","idcardNumber = "+idcardNumber);
444 - List<PassengerInfosBean> passengerInfosBeans = orderInfos.get(position).getProducts().get(position).getPassengerInfos();  
445 - for (PassengerInfosBean bean : passengerInfosBeans){  
446 - if(idcardNumber.equals(bean.getCredentials())){  
447 - LogUtil.d("IDOrderListActivity","getCredentials1 = "+bean.getCredentials());  
448 - if("ID_CARD".equals(bean.getCredentialsType())){  
449 - LogUtil.d("IDOrderListActivity","getCredentialsType = "+bean.getCredentialsType());  
450 - centerHandle.partTicket(position, pwd, "TRUE",bean.getCredentials(),true);  
451 - }else{  
452 - centerHandle.partTicket(position, pwd, "TRUE",bean.getVoucher(),false);  
453 - }  
454 445
  446 + List<ProductInfoQuery> products = orderInfos.get(position).getProducts();
  447 + for (int i = 0; i < products.size(); i++) {
  448 + List<PassengerInfosBean> passengerInfosBeans = products.get(i).getPassengerInfos();
  449 + for (PassengerInfosBean bean : passengerInfosBeans){
  450 + if(idcardNumber.equals(bean.getCredentials())){
  451 + LogUtil.d("IDOrderListActivity","getCredentials1 = "+bean.getCredentials());
  452 + if("ID_CARD".equals(bean.getCredentialsType())){
  453 + LogUtil.d("IDOrderListActivity","getCredentialsType = "+bean.getCredentialsType());
  454 + centerHandle.partTicket(position, pwd, "TRUE",bean.getCredentials(),true);
  455 + }else{
  456 + centerHandle.partTicket(position, pwd, "TRUE",bean.getVoucher(),false);
  457 + }
  458 +
  459 + }
455 } 460 }
456 } 461 }
457 462
  463 +// List<PassengerInfosBean> passengerInfosBeans = orderInfos.get(position).getProducts().get(position).getPassengerInfos();
  464 +// for (PassengerInfosBean bean : passengerInfosBeans){
  465 +// if(idcardNumber.equals(bean.getCredentials())){
  466 +// LogUtil.d("IDOrderListActivity","getCredentials1 = "+bean.getCredentials());
  467 +// if("ID_CARD".equals(bean.getCredentialsType())){
  468 +// LogUtil.d("IDOrderListActivity","getCredentialsType = "+bean.getCredentialsType());
  469 +// centerHandle.partTicket(position, pwd, "TRUE",bean.getCredentials(),true);
  470 +// }else{
  471 +// centerHandle.partTicket(position, pwd, "TRUE",bean.getVoucher(),false);
  472 +// }
  473 +//
  474 +// }
  475 +// }
  476 +
458 } catch (NumberFormatException e) { 477 } catch (NumberFormatException e) {
459 e.printStackTrace(); 478 e.printStackTrace();
460 } 479 }
src/com/ectrip/cyt/ui/QRCodeOrderListActivity.java
@@ -29,6 +29,7 @@ import com.ectrip.cyt.constant.DeviceType; @@ -29,6 +29,7 @@ import com.ectrip.cyt.constant.DeviceType;
29 import com.ectrip.cyt.constant.OrderCode; 29 import com.ectrip.cyt.constant.OrderCode;
30 import com.ectrip.cyt.constant.SelectAction; 30 import com.ectrip.cyt.constant.SelectAction;
31 import com.ectrip.cyt.response.PassengerInfosBean; 31 import com.ectrip.cyt.response.PassengerInfosBean;
  32 +import com.ectrip.cyt.response.ProductInfoQuery;
32 import com.ectrip.cyt.response.QueryOrderResponse; 33 import com.ectrip.cyt.response.QueryOrderResponse;
33 import com.ectrip.cyt.utils.LogUtil; 34 import com.ectrip.cyt.utils.LogUtil;
34 import com.ectrip.cyt.utils.SharedPreferences2Obj; 35 import com.ectrip.cyt.utils.SharedPreferences2Obj;
@@ -274,13 +275,27 @@ public class QRCodeOrderListActivity extends BaseActivity implements ListOnclick @@ -274,13 +275,27 @@ public class QRCodeOrderListActivity extends BaseActivity implements ListOnclick
274 "FALSE", QRCodeOrderListActivity.this); 275 "FALSE", QRCodeOrderListActivity.this);
275 } 276 }
276 // centerHandle.dialog(Integer.parseInt(orderInfos.get(position).getOrderAmount()), position); 277 // centerHandle.dialog(Integer.parseInt(orderInfos.get(position).getOrderAmount()), position);
277 - List<PassengerInfosBean> passengerInfosBeans = orderInfos.get(position).getProducts().get(position).getPassengerInfos();  
278 - for (PassengerInfosBean bean : passengerInfosBeans) {  
279 - if (orid.equals(bean.getVoucher())) {  
280 - LogUtil.d("IDOrderListActivity", "getVoucher = " + bean.getVoucher());  
281 - centerHandle.partTicket(position, "", "TRUE", bean.getVoucher(), false); 278 +
  279 +
  280 + List<ProductInfoQuery> products = orderInfos.get(position).getProducts();
  281 + for (int i = 0; i < products.size(); i++) {
  282 + List<PassengerInfosBean> passengerInfosBeans = products.get(i).getPassengerInfos();
  283 + for (PassengerInfosBean bean : passengerInfosBeans){
  284 + if (orid.equals(bean.getVoucher())) {
  285 + LogUtil.d(TAG, "getVoucher = " + bean.getVoucher());
  286 + centerHandle.partTicket(position, "", "TRUE", bean.getVoucher(), false);
  287 + }
282 } 288 }
283 } 289 }
  290 +
  291 +
  292 +// List<PassengerInfosBean> passengerInfosBeans = orderInfos.get(position).getProducts().get(position).getPassengerInfos();
  293 +// for (PassengerInfosBean bean : passengerInfosBeans) {
  294 +// if (orid.equals(bean.getVoucher())) {
  295 +// LogUtil.d("IDOrderListActivity", "getVoucher = " + bean.getVoucher());
  296 +// centerHandle.partTicket(position, "", "TRUE", bean.getVoucher(), false);
  297 +// }
  298 +// }
284 } catch (NumberFormatException e) { 299 } catch (NumberFormatException e) {
285 e.printStackTrace(); 300 e.printStackTrace();
286 } 301 }