正在查看: 大众借. v4.1.2 应用的 MTT3ACT.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 大众借. v4.1.2 应用的 MTT3ACT.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.shiliuj.ui.activitys;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.BindView;
import com.base.commonlibrary.base.baserx.RxHelper;
import com.base.commonlibrary.views.TitleLayout;
import com.bigkoo.pickerview.view.OptionsPickerView;
import com.google.gson.Gson;
import com.shiliuj.mjyp.app.api.Api;
import com.shiliuj.mjyp.app.base.BaseBindActivity;
import com.shiliuj.mjyp.app.base.RxSubscriber;
import com.shiliuj.ui.bean.PostponeBean;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.HashMap;
import okhttp3.MediaType;
import okhttp3.RequestBody;
public class MTT3ACT extends BaseBindActivity {
@BindView(2131296342)
TextView allMoney;
@BindView(2131296387)
Button btnGoCash;
private BigDecimal interDays;
String orderNo;
private BigDecimal overdueFine;
private PostponeBean postponeBean;
private OptionsPickerView<String> pvOptions;
@BindView(2131296848)
RelativeLayout rl;
@BindView(2131296998)
TitleLayout title;
@BindView(2131297071)
TextView xqDay;
@BindView(2131297072)
TextView xqMoney;
@BindView(2131297077)
TextView yqMoney;
private String postponePeriod = "6";
private int payType = 6;
protected boolean canLoadMore() {
return false;
}
public int getLayoutId() {
return 2131492919;
}
public void initPresenter() {
}
protected void loadMore() {
}
protected void refresh() {
}
public void initView(Bundle bundle) {
Intent intent = getIntent();
if (intent.getExtras() != null) {
Bundle extras = intent.getExtras();
this.orderNo = extras.getString("ORDERID");
this.payType = extras.getInt("payType");
}
getPostData();
this.btnGoCash.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MTT3ACT.this.lambda$initView$0$MTT3ACT(view);
}
});
}
public void lambda$initView$0$MTT3ACT(View view) {
xQData();
}
private void getPostData() {
HashMap hashMap = new HashMap();
hashMap.put("orderNo", this.orderNo + "");
this.mRxManager.add(Api.getDefault().postponeInit(RequestBody.create(MediaType.parse("application/json;charset=UTF-8"), new Gson().toJson(hashMap))).compose(RxHelper.handleResult()).subscribe(new RxSubscriber<PostponeBean>(this.mContext, true) {
public void _onNext(PostponeBean postponeBean) {
if (postponeBean != null) {
MTT3ACT.this.postponeBean = postponeBean;
MTT3ACT.this.overdueFine = postponeBean.getOverdueFine();
MTT3ACT.this.payType = postponeBean.getPayType();
MTT3ACT.this.postponePeriod = postponeBean.getPostponePeriod();
if (MTT3ACT.this.overdueFine == null || MTT3ACT.this.overdueFine.compareTo(new BigDecimal(0.0d)) == 0) {
MTT3ACT.this.overdueFine = new BigDecimal(0);
MTT3ACT.this.rl.setVisibility(8);
} else {
MTT3ACT.this.rl.setVisibility(0);
MTT3ACT.this.yqMoney.setText(MTT3ACT.this.getString(2131689824) + MTT3ACT.this.overdueFine);
}
MTT3ACT.this.interDays = postponeBean.getInterestDays() == null ? new BigDecimal("0.0") : postponeBean.getInterestDays();
BigDecimal scale = MTT3ACT.this.interDays.add(MTT3ACT.this.overdueFine).setScale(2, RoundingMode.DOWN);
MTT3ACT.this.xqDay.setText(MTT3ACT.this.postponePeriod + MTT3ACT.this.getString(2131689633));
MTT3ACT.this.xqMoney.setText(MTT3ACT.this.getString(2131689824) + MTT3ACT.this.interDays);
MTT3ACT.this.allMoney.setText(MTT3ACT.this.getString(2131689824) + scale);
}
}
protected void _onError(String str) {
MTT3ACT.this.showShortToast(str);
MTT3ACT.this.finish();
}
}));
}
private void xQData() {
if (this.postponeBean != null) {
this.postponeBean.setPostponeAmount(new BigDecimal(this.allMoney.getText().toString().replaceAll(getString(2131689824), "")));
this.postponeBean.setOrderNo(this.orderNo);
this.postponeBean.setCountDay(Integer.valueOf(Integer.parseInt(this.xqDay.getText().toString().replace(getString(2131689633), ""))));
Bundle bundle = new Bundle();
bundle.putInt("TYPE", 2);
bundle.putSerializable("myBorrow", this.postponeBean);
startActivity(MTM0ACT.class, bundle);
return;
}
getPostData();
}
}