导航菜单

页面标题

页面副标题

⁡⁡⁡⁡⁡⁡⁡鲸⁡⁡⁡⁡⁡⁡⁡⁡鱼⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡借⁡条⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡ v4.1.2 - MTT3ACT.java 源代码

正在查看: ⁡⁡⁡⁡⁡⁡⁡鲸⁡⁡⁡⁡⁡⁡⁡⁡鱼⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡借⁡条⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡ v4.1.2 应用的 MTT3ACT.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.yuxianghua.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.alibaba.fastjson.support.spring.FastJsonJsonView;
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.yuxianghua.mjyp.app.api.Api;
import com.yuxianghua.mjyp.app.api.AppConfig;
import com.yuxianghua.mjyp.app.base.BaseBindActivity;
import com.yuxianghua.mjyp.app.base.RxSubscriber;
import com.yuxianghua.ui.bean.PostponeBean;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.HashMap;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import rx.Subscriber;
import yhgjgdf.ijnhjfyd.ikbujfjfnjkif.R;

public class MTT3ACT extends BaseBindActivity {

    @BindView(R.id.all_money)
    TextView allMoney;

    @BindView(R.id.btn_go_cash)
    Button btnGoCash;
    private BigDecimal interDays;
    String orderNo;
    private BigDecimal overdueFine;
    private PostponeBean postponeBean;
    private OptionsPickerView<String> pvOptions;

    @BindView(R.id.rl_znj)
    RelativeLayout rl;

    @BindView(R.id.title)
    TitleLayout title;

    @BindView(R.id.xq_day)
    TextView xqDay;

    @BindView(R.id.xq_money)
    TextView xqMoney;

    @BindView(R.id.yq_money)
    TextView yqMoney;
    private String postponePeriod = "6";
    private int payType = 6;

    @Override
    protected boolean canLoadMore() {
        return false;
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_renewal;
    }

    @Override
    public void initPresenter() {
    }

    @Override
    protected void loadMore() {
    }

    @Override
    protected void refresh() {
    }

    @Override
    public void initView(Bundle bundle) {
        Intent intent = getIntent();
        if (intent.getExtras() != null) {
            Bundle extras = intent.getExtras();
            this.orderNo = extras.getString(AppConfig.ORDERID);
            this.payType = extras.getInt(AppConfig.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(FastJsonJsonView.DEFAULT_CONTENT_TYPE), new Gson().toJson(hashMap))).compose(RxHelper.handleResult()).subscribe((Subscriber<? super R>) new RxSubscriber<PostponeBean>(this.mContext, true) {
            @Override
            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.overdueFine + MTT3ACT.this.getString(R.string.day));
                    }
                    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(R.string.day));
                    MTT3ACT.this.xqMoney.setText(MTT3ACT.this.interDays + MTT3ACT.this.getString(R.string.yuan));
                    MTT3ACT.this.allMoney.setText(scale + MTT3ACT.this.getString(R.string.yuan));
                }
            }

            @Override
            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(R.string.money_fh), "")));
            this.postponeBean.setOrderNo(this.orderNo);
            this.postponeBean.setCountDay(Integer.valueOf(Integer.parseInt(this.xqDay.getText().toString().replace(getString(R.string.day), ""))));
            Bundle bundle = new Bundle();
            bundle.putInt("TYPE", 2);
            bundle.putSerializable("myBorrow", this.postponeBean);
            startActivity(MTM0ACT.class, bundle);
            return;
        }
        getPostData();
    }
}