@@ -93,6 +93,7 @@ public class IFCode { | |||
public static final String IFCODE155 = "155"; //订单完成收货 | |||
public static final String IFCODE171 = "171"; //根据车辆ID获取正常的状态储值卡 | |||
public static final String IFCODE9 = "9"; //根据订单ID查询订单详情 | |||
public static final String IFCODE8 = "8"; //根据订单编号orderId查询订单详情 | |||
public static final String IFCODE50 = "50"; //写卡指令申请 | |||
public static final String IFCODE51 = "51"; //写卡指令返回 |
@@ -187,11 +187,16 @@ public class ResultBean<T> { | |||
} | |||
} | |||
public static class ReleaseProductInfo{ | |||
public String remarks; | |||
} | |||
public static class ProductInfo{ | |||
public String id; //产品ID | |||
public Long fee; //业务员端-产品价格 | |||
public String productMsg; //产品描述信息 | |||
public BizContent data; | |||
public long oncePrice; | |||
@Override | |||
public String toString() { | |||
@@ -291,6 +296,9 @@ public class ResultBean<T> { | |||
* \"validityFormat\":1 | |||
* */ | |||
public static class BizContent<T> { | |||
public long oncePrice; | |||
public ReleaseProductInfo releaseProduct; | |||
public String remarks; | |||
public String promoteId; | |||
public String productIntro; | |||
private String isSign; | |||
@@ -322,6 +330,8 @@ public class ResultBean<T> { | |||
public String applyType; //申请单类型 | |||
public String damageMode; //0-人为损坏 1-自然损坏 | |||
public List<BizContent> csmsnProducts;//产品选择列表 | |||
public List<BizContent> multipleeEquity;//多项权益 | |||
public List<BizContent> singleEquity;//单项权益 | |||
public List<BizContent> list; //申请单列表(更换ETC时使用) | |||
public List<BizContent> customers; //用户信息查询列表 | |||
public List<BizContent> vehicles; //车辆信息查询列表 | |||
@@ -335,7 +345,7 @@ public class ResultBean<T> { | |||
public long aggregateAmount; //总金额 | |||
public String ossFilePath; //下载 文件服务地址 | |||
public String originalFileName; //下载 文件服务地址名称 output.xlsx | |||
public String cardType; //卡类型 | |||
public String[] cardType; //卡类型 | |||
public String tel; //用户手机 | |||
public boolean hasMore; //是否有更多数据 | |||
@@ -93,7 +93,7 @@ public class AddPurchaseChooseActivity extends AppActivity { | |||
} | |||
}); | |||
LinearLayoutManager layoutManager = new LinearLayoutManager(this, RecyclerView.VERTICAL,false); | |||
CommonItemDecoration itemDecoration = new CommonItemDecoration(0,40,40,0,40,0); | |||
CommonItemDecoration itemDecoration = new CommonItemDecoration(0,40,40,0,40,40); | |||
binding.recycler.setLayoutManager(layoutManager); | |||
binding.recycler.addItemDecoration(itemDecoration); | |||
binding.recycler.setAdapter(adapter); |
@@ -71,15 +71,15 @@ public class ContractActivity extends AppActivity { | |||
intent.setClass(ContractActivity.this, ETCHandleActivity.class); | |||
startActivity(intent); | |||
finish();*/ | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("bizContent", getIntent().getStringExtra("bizContent")); | |||
bundle.putString("orderId", getIntent().getStringExtra("orderId")); | |||
bundle.putString("isSign",getIntent().getStringExtra("isSign")); | |||
jumpToPage(AddPurchaseChooseActivity.class,bundle); | |||
finish(); | |||
if (true){ | |||
return; | |||
} | |||
// Bundle bundle = new Bundle(); | |||
// bundle.putString("bizContent", getIntent().getStringExtra("bizContent")); | |||
// bundle.putString("orderId", getIntent().getStringExtra("orderId")); | |||
// bundle.putString("isSign",getIntent().getStringExtra("isSign")); | |||
// jumpToPage(AddPurchaseChooseActivity.class,bundle); | |||
// finish(); | |||
// if (true){ | |||
// return; | |||
// } | |||
//签约检测 | |||
FatherBean<SendTheVerificationCodeBean> fatherBean = new FatherBean<>(); | |||
fatherBean.bizContent = new SendTheVerificationCodeBean(); |
@@ -24,6 +24,7 @@ import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeB | |||
import com.huntersun.vkyes.etcopencard.project.tool.QRCode; | |||
import com.huntersun.vkyes.etcopencard.project.tool.Utils; | |||
import com.huntersun.vkyes.etcopencard.project.utils.Constants; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.action.StatusAction; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
@@ -77,7 +78,7 @@ public class DefrayActivity extends AppActivity {//implements StatusAction | |||
Drawable drawable = new BitmapDrawable(bitmap); | |||
binding.image.setImageDrawable(drawable); | |||
try { | |||
binding.text.setText("¥ " + (Double.valueOf(bizContent.getTotalFee()) * 0.01)); | |||
binding.text.setText("¥ " + (FunHelper.changeF2Y(Long.valueOf(bizContent.getTotalFee())))); | |||
} catch (Exception ignored) { | |||
Log.e("log", "打印标题:" + ignored.getMessage()); | |||
} |
@@ -113,9 +113,35 @@ public class ETCHandleActivity extends AppActivity implements OnRefreshLoadMoreL | |||
@SuppressLint("UseCompatLoadingForDrawables") | |||
@Override | |||
protected void convert(BaseViewHolder helper, ResultBean.BizContent items) { | |||
String cardName = ""; | |||
for (String i : items.cardType){ | |||
switch (i){ | |||
case "1": | |||
if ("".equals(cardName)){ | |||
cardName = cardName + "记账卡"; | |||
}else { | |||
cardName = cardName + ",记账卡"; | |||
} | |||
break; | |||
case "2": | |||
if ("".equals(cardName)){ | |||
cardName = cardName + "储值卡"; | |||
}else { | |||
cardName = cardName + ",储值卡"; | |||
} | |||
break; | |||
case "3": | |||
if ("".equals(cardName)){ | |||
cardName = cardName + "预存卡"; | |||
}else { | |||
cardName = cardName + ",预存卡"; | |||
} | |||
break; | |||
} | |||
} | |||
helper.setText(R.id.text1, items.promoteName); // 产品名称 | |||
helper.setText(R.id.text2, "1".equals(items.cardType) ? "记账卡" : "储值卡"); // 产品介绍 | |||
helper.setText(R.id.text3, items.getFee() * 0.01 + ""); // 金额 | |||
helper.setText(R.id.text2, cardName); // 产品介绍 | |||
helper.setText(R.id.text3, items.oncePrice * 0.01 + ""); // 金额 | |||
LinearLayout layout = helper.getView(R.id.layout); | |||
if (helper.getPosition() == 1) { | |||
layout.setBackground(getResources().getDrawable(R.mipmap.product_bg2)); | |||
@@ -170,7 +196,7 @@ public class ETCHandleActivity extends AppActivity implements OnRefreshLoadMoreL | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("orderId", getIntent().getStringExtra("orderId")); | |||
params.put("promoteId", items.promoteId); | |||
MyRetrofit.newInstance(IFCode.IFCODE914, params, new MyRetrofit.ReturnResult(){ | |||
MyRetrofit.newInstance(IFCode.IFCODE_PRODUCT_COMMIT, params, new MyRetrofit.ReturnResult(){ | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
@@ -256,5 +282,6 @@ public class ETCHandleActivity extends AppActivity implements OnRefreshLoadMoreL | |||
@Override | |||
public void onRefresh(@NonNull RefreshLayout refreshLayout) { | |||
initData(); | |||
refreshLayout.finishRefresh(); | |||
} | |||
} |
@@ -15,6 +15,7 @@ import com.alibaba.fastjson.JSON; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.chad.library.adapter.base.BaseQuickAdapter; | |||
import com.chad.library.adapter.base.BaseViewHolder; | |||
import com.hjq.base.BaseDialog; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityEtchandleSonBinding; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
@@ -29,6 +30,7 @@ import com.huntersun.vkyes.etcopencard.project.view.CommonItemDecoration; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.huntersun.vkyes.etcopencard.src.http.glide.GlideApp; | |||
import com.huntersun.vkyes.etcopencard.src.ui.dialog.MessageDialog; | |||
import java.util.ArrayList; | |||
import java.util.HashMap; | |||
@@ -47,7 +49,8 @@ public class ETCHandleSonActivity extends AppActivity { | |||
private EquityChooseAdapter adapter; | |||
private ArrayList<ResultBean.BizContent> list = new ArrayList<>(); | |||
private ArrayList<String> equityList = new ArrayList<>(); | |||
private long totalAmountFee = 0; | |||
private long totalAmountFee = 0;//产品总金额 | |||
private long equityAllFee = 0;//权益总金额 | |||
@Override | |||
@@ -61,9 +64,9 @@ public class ETCHandleSonActivity extends AppActivity { | |||
protected void initView() { | |||
setTitle("订单支付"); | |||
initRecyclerview(); | |||
if ("1".equals(getIntent().getStringExtra("isPay"))){ | |||
if ("1".equals(getIntent().getStringExtra("isPay"))) { | |||
binding.tvAddPurchase.setVisibility(View.INVISIBLE); | |||
}else { | |||
} else { | |||
binding.tvAddPurchase.setVisibility(View.VISIBLE); | |||
} | |||
binding.rrelative.getHelper().setBackgroundColorNormalArray(this.getResources().getIntArray(R.array.green_bg_arr)); | |||
@@ -71,43 +74,45 @@ public class ETCHandleSonActivity extends AppActivity { | |||
ResultBean.BizContent biz = | |||
JSON.parseObject(getIntent().getStringExtra("bizContent"), ResultBean.BizContent.class); | |||
if("0".equals(getIntent().getStringExtra("isSign"))){//0不签约 | |||
if ("0".equals(getIntent().getStringExtra("isSign"))) {//0不签约 | |||
binding.lyQiany.setVisibility(View.GONE); | |||
}else {//1签约 | |||
} else {//1签约 | |||
binding.lyQiany.setVisibility(View.VISIBLE); | |||
} | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("id", biz.getId() + ""); | |||
MyRetrofit.newInstance(IFCode.IFCODE9, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
binding.text1.setText(bizContent.getProductName()); | |||
// binding.text2.setText("基础服务"); | |||
totalAmountFee += bizContent.product.fee; | |||
binding.text3.setText(bizContent.product.productMsg); | |||
binding.text4.setText(bizContent.product.fee * 0.01 + ""); | |||
binding.text6.setText("¥" + totalAmountFee * 0.01); | |||
binding.text5.setText("¥" + bizContent.product.fee * 0.01); | |||
} | |||
@Override | |||
public void onError() { | |||
MyRetrofit.ReturnResult.super.onError(); | |||
} | |||
}); | |||
// Map<String, String> params = new HashMap<>(); | |||
// params.put("id", biz.getId() + ""); | |||
// MyRetrofit.newInstance(IFCode.IFCODE9, params, new MyRetrofit.ReturnResult() { | |||
// @Override | |||
// public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
//// binding.text2.setText("基础服务"); | |||
// totalAmountFee += bizContent.product.fee; | |||
// totalAmountFee += equityAllFee; | |||
// binding.text1.setText(bizContent.getProductName()); | |||
// binding.text3.setText(bizContent.product.productMsg); | |||
// binding.text4.setText(bizContent.product.fee * 0.01 + ""); | |||
// binding.tvMoneyJg.setText("¥" +equityAllFee*0.01); | |||
// binding.text6.setText("¥" + totalAmountFee * 0.01); | |||
// binding.text5.setText("¥" + bizContent.product.fee * 0.01); | |||
// } | |||
// | |||
// @Override | |||
// public void onError() { | |||
// MyRetrofit.ReturnResult.super.onError(); | |||
// } | |||
// }); | |||
binding.tvAddPurchase.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
Intent intent = new Intent(); | |||
intent.putExtra("orderId",getIntent().getStringExtra("orderId")); | |||
intent.putExtra("bizContent",getIntent().getStringExtra("bizContent")); | |||
intent.putExtra("isSign",getIntent().getStringExtra("isSign")); | |||
if (list.size()>0){ | |||
intent.putExtra("purchase", JSON.toJSONString(list)); | |||
intent.putExtra("orderId", getIntent().getStringExtra("orderId")); | |||
intent.putExtra("bizContent", getIntent().getStringExtra("bizContent")); | |||
intent.putExtra("isSign", getIntent().getStringExtra("isSign")); | |||
if (list.size() > 0) { | |||
intent.putExtra("purchase", JSON.toJSONString(list)); | |||
} | |||
intent.setClass(ETCHandleSonActivity.this,AddPurchaseChooseActivity.class); | |||
intent.setClass(ETCHandleSonActivity.this, AddPurchaseChooseActivity.class); | |||
ETCHandleSonActivity.this.startActivity(intent); | |||
} | |||
}); | |||
@@ -116,22 +121,47 @@ public class ETCHandleSonActivity extends AppActivity { | |||
@Override | |||
@SingleClick | |||
public void onClick(View v) { | |||
if (equityList.size()>0){ | |||
HashMap<String,String> params = new HashMap<>(); | |||
if (equityList.size() > 0) { | |||
HashMap<String, String> params = new HashMap<>(); | |||
params.put("orderId", getIntent().getStringExtra("orderId")); | |||
params.put("openId",(String) MyShared.getInstance().get(MyShared.OPENID,"")); | |||
params.put("equityId", TextUtils.join(",",equityList)); | |||
params.put("totalAmount",totalAmountFee+""); | |||
params.put("isRepeatPurchase","0"); | |||
params.put("openId", (String) MyShared.getInstance().get(MyShared.OPENID, "")); | |||
params.put("equityId", TextUtils.join(",", equityList)); | |||
params.put("totalAmount", totalAmountFee + ""); | |||
params.put("isRepeatPurchase", "0"); | |||
MyRetrofit.newInstance(IFCode.IFCODE_JGOUCHOOSE, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
Intent intent = new Intent(); | |||
intent.putExtra("orderId", getIntent().getStringExtra("orderId")); | |||
intent.putExtra("id", biz.getId() + ""); | |||
intent.setClass(ETCHandleSonActivity.this, DefrayActivity.class); | |||
startActivity(intent); | |||
ETCHandleSonActivity.this.finish(); | |||
if ("1".equals(getIntent().getStringExtra("isPay"))) { | |||
Intent intent = new Intent(); | |||
intent.putExtra("orderId", getIntent().getStringExtra("orderId")); | |||
intent.putExtra("id", biz.getId() + ""); | |||
intent.setClass(ETCHandleSonActivity.this, DefrayActivity.class); | |||
startActivity(intent); | |||
ETCHandleSonActivity.this.finish(); | |||
}else { | |||
new MessageDialog.Builder(getActivity()) | |||
// 标题可以不用填写 | |||
.setTitle("提示") | |||
// 内容必须要填写 | |||
.setMessage("是否确认提交信息,生成支付二维码") | |||
.setListener(new MessageDialog.OnListener() { | |||
@Override | |||
public void onConfirm(BaseDialog dialog) { | |||
Intent intent = new Intent(); | |||
intent.putExtra("orderId", getIntent().getStringExtra("orderId")); | |||
intent.putExtra("id", biz.getId() + ""); | |||
intent.setClass(ETCHandleSonActivity.this, DefrayActivity.class); | |||
startActivity(intent); | |||
ETCHandleSonActivity.this.finish(); | |||
} | |||
@Override | |||
public void onCancel(BaseDialog dialog) { | |||
} | |||
}) | |||
.show(); | |||
} | |||
} | |||
@Override | |||
@@ -139,7 +169,7 @@ public class ETCHandleSonActivity extends AppActivity { | |||
MyRetrofit.ReturnResult.super.onError(resp); | |||
} | |||
}); | |||
}else { | |||
} else { | |||
Intent intent = new Intent(); | |||
intent.putExtra("orderId", getIntent().getStringExtra("orderId")); | |||
intent.putExtra("id", biz.getId() + ""); | |||
@@ -160,11 +190,17 @@ public class ETCHandleSonActivity extends AppActivity { | |||
adapter = new EquityChooseAdapter(this, R.layout.item_euqity_2, new EquityChooseAdapter.OnDelClickListener() { | |||
@Override | |||
public void onDelClick(View view, int position) { | |||
equityList.remove(list.get(position).equityId); | |||
if (equityList.size() > 0) { | |||
equityList.remove(list.get(position).equityId); | |||
} | |||
totalAmountFee -= list.get(position).discountPrice; | |||
equityAllFee -= list.get(position).discountPrice; | |||
binding.tvMoneyJg.setText("¥" + equityAllFee * 0.01); | |||
binding.text6.setText("¥" + totalAmountFee * 0.01); | |||
adapter.remove(position); | |||
list.remove(position); | |||
if (list.size() > 0) { | |||
list.remove(position); | |||
} | |||
} | |||
@Override | |||
@@ -172,8 +208,8 @@ public class ETCHandleSonActivity extends AppActivity { | |||
} | |||
}); | |||
LinearLayoutManager layoutManager = new LinearLayoutManager(this, RecyclerView.VERTICAL,false); | |||
CommonItemDecoration itemDecoration = new CommonItemDecoration(0,40,0,0,0,0); | |||
LinearLayoutManager layoutManager = new LinearLayoutManager(this, RecyclerView.VERTICAL, false); | |||
CommonItemDecoration itemDecoration = new CommonItemDecoration(0, 40, 0, 0, 0, 0); | |||
binding.recyclerJg.setLayoutManager(layoutManager); | |||
binding.recyclerJg.addItemDecoration(itemDecoration); | |||
binding.recyclerJg.setAdapter(adapter); | |||
@@ -186,17 +222,54 @@ public class ETCHandleSonActivity extends AppActivity { | |||
} | |||
private void getData() { | |||
if (list.size()>0){ | |||
if (list.size() > 0) { | |||
list.clear(); | |||
} | |||
if (null!=getIntent().getStringExtra("purchase")){ | |||
if (null != getIntent().getStringExtra("purchase")) { | |||
list.addAll(JSONObject.parseArray(getIntent().getStringExtra("purchase"), ResultBean.BizContent.class)); | |||
Log.e("listSize",list.size()+""); | |||
for (ResultBean.BizContent biz : list){ | |||
totalAmountFee += biz.discountPrice; | |||
Log.e("listSize", list.size() + ""); | |||
for (ResultBean.BizContent biz : list) { | |||
equityAllFee += biz.discountPrice; | |||
equityList.add(biz.equityId); | |||
} | |||
adapter.replaceData(list); | |||
} | |||
Map<String, String> params2 = new HashMap<>(); | |||
params2.put("orderId", getIntent().getStringExtra("orderId")); | |||
MyRetrofit.newInstance(IFCode.IFCODE8, params2, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
Log.e("result11111",resultBean.toString()); | |||
if ("1".equals(getIntent().getStringExtra("isPay"))) { | |||
if (bizContent.multipleeEquity.size() > 0) { | |||
list.addAll(bizContent.multipleeEquity); | |||
} | |||
if (bizContent.singleEquity.size() > 0) { | |||
list.addAll(bizContent.singleEquity); | |||
} | |||
for (ResultBean.BizContent biz : list) { | |||
equityAllFee += biz.discountPrice; | |||
} | |||
adapter.setCanChanged(false); | |||
} | |||
totalAmountFee += bizContent.product.oncePrice; | |||
totalAmountFee += equityAllFee; | |||
adapter.replaceData(list); | |||
binding.text1.setText(bizContent.getProductName()); | |||
binding.text3.setText(bizContent.releaseProduct.remarks); | |||
binding.text4.setText(FunHelper.changeF2Y(bizContent.product.oncePrice)); | |||
binding.tvMoneyJg.setText("¥"+FunHelper.changeF2Y(equityAllFee)); | |||
binding.text6.setText("¥"+FunHelper.changeF2Y(totalAmountFee)); | |||
binding.text5.setText("¥"+FunHelper.changeF2Y(bizContent.product.oncePrice)); | |||
// binding.tvMoneyJg.setText("¥" +equityAllFee*0.01); | |||
// binding.text6.setText("¥" + totalAmountFee * 0.01); | |||
} | |||
@Override | |||
public void onError() { | |||
MyRetrofit.ReturnResult.super.onError(); | |||
} | |||
}); | |||
} | |||
} |
@@ -51,7 +51,7 @@ public class InformationConfirmedActivity extends AppActivity implements StatusA | |||
Log.e("log", "打印标题:" + s); | |||
initView(); | |||
}); | |||
if ("1".equals(getIntent().getStringExtra("type"))) { | |||
if ("2".equals(getIntent().getStringExtra("type"))) { | |||
binding.lyHzzl.setVisibility(View.VISIBLE);//核载质量 | |||
binding.layoutCzs.setVisibility(View.VISIBLE);//车轴数 | |||
}else { |
@@ -166,7 +166,7 @@ public class MainActivity extends AppActivity implements | |||
.onClick(new PersonalCompanyDialog.Result() { | |||
@Override | |||
public void success() { | |||
intent.putExtra("type", "1"); //货车 | |||
intent.putExtra("type", "2"); //货车 | |||
// intent.setClass(MainActivity.this, FillOutMessage.class); | |||
intent.setClass(MainActivity.this, ETCHandleActivity.class); | |||
startActivity(intent); | |||
@@ -174,7 +174,7 @@ public class MainActivity extends AppActivity implements | |||
@Override | |||
public void fail() { | |||
intent.putExtra("type", "0"); //客车 | |||
intent.putExtra("type", "1"); //客车 | |||
intent.setClass(MainActivity.this, ETCHandleActivity.class); | |||
startActivity(intent); | |||
} |
@@ -81,7 +81,7 @@ public class VehicleInformationActivity extends AppActivity { | |||
binding.text14.setOnClickListener(this); | |||
binding.text15.setOnClickListener(this); | |||
binding.text16.setOnClickListener(this); | |||
if ("1".equals(getIntent().getStringExtra("type"))){ | |||
if ("2".equals(getIntent().getStringExtra("type"))){ | |||
binding.layout90.setVisibility(View.VISIBLE); | |||
binding.layout3.setVisibility(View.VISIBLE); | |||
binding.layout4.setVisibility(View.VISIBLE); | |||
@@ -117,7 +117,7 @@ public class VehicleInformationActivity extends AppActivity { | |||
return; | |||
} | |||
//货车内容校验 | |||
if ("1".equals(getIntent().getStringExtra("type"))) { | |||
if ("2".equals(getIntent().getStringExtra("type"))) { | |||
if (isSky(binding.text5.getText() + "", "总质量", binding.text5) || | |||
isSky(binding.text6.getText() + "", "装备质量", binding.text6) || | |||
isSky(binding.text11.getText() + "", "核定载质量", binding.text11) || |
@@ -146,7 +146,8 @@ public class OrderUtils { | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
btnConfirmInfo.setVisibility(View.VISIBLE); | |||
break; | |||
// case Constants.ORDER_STATUS_WAIT_PAY://完成签约。待支付 | |||
case Constants.ORDER_STATUS_WAIT_PAY://完成签约。待支付 | |||
case Constants.ORDER_STATUS_ALREADYJGQY_CODE://完成加购。待支付 | |||
// LLBtns.setVisibility(View.VISIBLE); | |||
// btnPay.setVisibility(View.VISIBLE); | |||
// btnCancelOrder.setVisibility(View.VISIBLE); | |||
@@ -297,18 +298,21 @@ public class OrderUtils { | |||
productBean.setFee(orderData.product.fee); | |||
productBean.setIsSign(orderData.getIsSign()); | |||
} | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("bizContent", JSON.toJSONString(productBean)); | |||
bundle.putString("orderId", orderData.getOrderId()); | |||
bundle.putString("id", orderData.getId() + ""); | |||
bundle.putString("isPay","1"); | |||
Intent intent = new Intent(); | |||
intent.putExtra("bizContent", JSON.toJSONString(productBean)); | |||
intent.putExtra("orderId", orderData.getOrderId()); | |||
intent.putExtra("id", orderData.getId() + ""); | |||
if(Integer.parseInt(orderData.getOrderStep())==Constants.ORDER_STATUS_WAIT_PAY){ | |||
//签约完未生成支付二维码,可以更改加购权益 | |||
intent.putExtra("isPay","0"); | |||
}else {//已生成支付二维码不能更改 | |||
intent.putExtra("isPay","1"); | |||
} | |||
if (null==orderData.getProductId()||"".equals(orderData.getProductId())){//未绑定成功订单,重新跳转绑定 | |||
intent.setClass(context,ETCHandleActivity.class); | |||
}else { | |||
intent.setClass(context, ETCHandleSonActivity.class); | |||
} | |||
intent.putExtras(bundle); | |||
context.startActivity(intent); | |||
} | |||
}); |
@@ -49,7 +49,7 @@ public class CheckRunningCardListAdapter extends BaseQuickAdapter<ResultBean.Biz | |||
} | |||
holder.setText(R.id.tvCardId, FunHelper.isEmpty(bizContent.getCardId()) ? "" : bizContent.getCardId()); | |||
holder.setText(R.id.tvCardType, FunHelper.isEmpty(bizContent.cardType) ? "" : (bizContent.cardType.startsWith("1") ? "记账卡" : "储值卡")); | |||
holder.setText(R.id.tvCardType, FunHelper.isEmpty(bizContent.cardType[0]) ? "" : ("1".equals(bizContent.cardType[0]) ? "记账卡" : "储值卡")); | |||
holder.setText(R.id.tvCardStatus, FunHelper.isEmpty(bizContent.getCardStatus()) ? "" : EnumBean.backValue(bizContent.getCardStatus(), EnumBean.ETC_STATUS)); | |||
beforeBean = bizContent; | |||
@@ -35,6 +35,15 @@ public class EquityChooseAdapter extends BaseQuickAdapter<ResultBean.BizContent, | |||
private OnDelClickListener listener2; | |||
private LeftSlideView mMenu = null; | |||
private Activity context; | |||
private boolean canChanged = true; | |||
public void setCanChanged(boolean changed) { | |||
this.canChanged = changed; | |||
} | |||
public boolean getCanChanged() { | |||
return canChanged; | |||
} | |||
public interface OnCBCheckedChangedListener { | |||
void onCheckChanged(ResultBean.BizContent bean, boolean b); | |||
@@ -42,6 +51,7 @@ public class EquityChooseAdapter extends BaseQuickAdapter<ResultBean.BizContent, | |||
public interface OnDelClickListener { | |||
void onDelClick(View view, int position); | |||
void onContentClick(View view, int position); | |||
} | |||
@@ -61,7 +71,7 @@ public class EquityChooseAdapter extends BaseQuickAdapter<ResultBean.BizContent, | |||
protected void convert(@NonNull BaseViewHolder helper, ResultBean.BizContent item) { | |||
helper.setText(R.id.equity_title, item.getProductName());//权益 | |||
helper.setText(R.id.tv_money_num, item.discountPrice * 0.01 + "");//金额 | |||
helper.setText(R.id.tv_productIntro,item.productIntro); | |||
helper.setText(R.id.tv_productIntro, item.productIntro); | |||
RecyclerView recyclerView = helper.getView(R.id.recycler); | |||
ImageView img = helper.getView(R.id.img1); | |||
if (null != item.getChildren()) { | |||
@@ -92,7 +102,7 @@ public class EquityChooseAdapter extends BaseQuickAdapter<ResultBean.BizContent, | |||
} | |||
} | |||
}); | |||
}else { | |||
} else { | |||
img.setVisibility(View.INVISIBLE); | |||
} | |||
RCheckBox rcb = helper.getView(R.id.cb_equity); | |||
@@ -102,15 +112,25 @@ public class EquityChooseAdapter extends BaseQuickAdapter<ResultBean.BizContent, | |||
//点击事件处理 | |||
if (null != tvDelete && null != leftSlideView && null != lyContent) { | |||
// leftSlideView.setOnTouchListener(new View.OnTouchListener() { | |||
// @Override | |||
// public boolean onTouch(View view, MotionEvent motionEvent) { | |||
// return true; | |||
// } | |||
// }); | |||
if (!canChanged) { | |||
leftSlideView.setOnTouchListener(new View.OnTouchListener() { | |||
@Override | |||
public boolean onTouch(View view, MotionEvent motionEvent) { | |||
return true; | |||
} | |||
}); | |||
}else { | |||
leftSlideView.setOnTouchListener(new View.OnTouchListener() { | |||
@Override | |||
public boolean onTouch(View view, MotionEvent motionEvent) { | |||
return false; | |||
} | |||
}); | |||
} | |||
RelativeLayout relativeLayout = (RelativeLayout) leftSlideView.findViewById(R.id.rly_relative); | |||
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) relativeLayout.getLayoutParams(); | |||
params.width = (int) (getScreenWidth() - dpToPx(30f, context)); | |||
params.width = (int) (getScreenWidth() - dpToPx(28f, context)); | |||
params.height = ViewGroup.LayoutParams.WRAP_CONTENT; | |||
relativeLayout.setLayoutParams(params); | |||
tvDelete.setOnClickListener(new View.OnClickListener() { | |||
@@ -138,7 +158,7 @@ public class EquityChooseAdapter extends BaseQuickAdapter<ResultBean.BizContent, | |||
} | |||
@Override | |||
public void onDownOrMove(LeftSlideView leftSlideView,RecyclerView recyclerView1) { | |||
public void onDownOrMove(LeftSlideView leftSlideView, RecyclerView recyclerView1) { | |||
if (menuIsOpen()) { | |||
if (mMenu != leftSlideView) { | |||
closeMenu(); | |||
@@ -147,7 +167,7 @@ public class EquityChooseAdapter extends BaseQuickAdapter<ResultBean.BizContent, | |||
} | |||
}); | |||
} | |||
if (item.isSelected){ | |||
if (item.isSelected) { | |||
rcb.setChecked(true); | |||
} | |||
rcb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { |
@@ -207,7 +207,7 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
helper.setText(R.id.text4, "PERSONAL_USER".equals(item.getUserType()) ? "个人用户" : "单位用户"); | |||
helper.setText(R.id.text6, "0".equals(item.getType()) ? "客车办理" : "货车办理"); | |||
helper.setText(R.id.text7, "0".equals(item.getType()) ? "客车" : "货车"); | |||
helper.setText(R.id.text8, item.getAmount() == null ? "0.00元" : Integer.parseInt(item.getAmount()) * 0.01 + "元"); | |||
helper.setText(R.id.text8, item.getAmount() == null ? "0.00元" : FunHelper.changeF2Y(Long.valueOf(item.getAmount())) + "元"); | |||
helper.setGone(R.id.tvLine,helper.getLayoutPosition() == getData().size() - 1 ? true : false); | |||
new OrderUtils(getActivity(), item, true, helper.getView(R.id.LLBtns), |
@@ -38,6 +38,7 @@ public class Constants { | |||
public static final int ORDER_STATUS_RETURN_GOODS_SUCCESS = 17; //退货成功 | |||
public static final int ORDER_STATUS_EX_RECOVER = 18; //换货-设备已回收 | |||
public static final int ORDER_STATUS_ALREADY_CODE = 26; //已经生成二维码但未支付 | |||
public static final int ORDER_STATUS_ALREADYJGQY_CODE = 27; //加购完权益但未支付 | |||
//******************************欠费补缴类型********************************// |
@@ -3,6 +3,9 @@ package com.huntersun.vkyes.etcopencard.src.app; | |||
import android.annotation.SuppressLint; | |||
import android.bluetooth.BluetoothAdapter; | |||
import android.content.Intent; | |||
import android.graphics.ColorMatrix; | |||
import android.graphics.ColorMatrixColorFilter; | |||
import android.graphics.Paint; | |||
import android.os.Bundle; | |||
import android.text.TextUtils; | |||
import android.util.Log; | |||
@@ -77,6 +80,11 @@ public abstract class AppActivity extends BaseActivity | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
Log.e("currentActivity",this.getClass().getName()); | |||
// Paint paint = new Paint(); | |||
// ColorMatrix cm =new ColorMatrix(); | |||
// cm.setSaturation(0f);//灰度效果 | |||
// paint.setColorFilter(new ColorMatrixColorFilter(cm)); | |||
// getWindow().getDecorView().setLayerType(View.LAYER_TYPE_HARDWARE,paint); | |||
} | |||
/** |