public class MyRetrofit { | public class MyRetrofit { | ||||
//是否设置缓存 | //是否设置缓存 | ||||
private static final boolean Cache = false; | private static final boolean Cache = false; | ||||
<<<<<<< HEAD | |||||
/** | /** | ||||
* 修改文件上传地址:VPN访问:192.168.101.145:6001、办公网络访问:222.85.144.89:19003 | * 修改文件上传地址:VPN访问:192.168.101.145:6001、办公网络访问:222.85.144.89:19003 | ||||
* 回显地址:222.85.144.89:19002/xxxxxx | * 回显地址:222.85.144.89:19002/xxxxxx | ||||
*/ | */ | ||||
// private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/"; | // private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/"; | ||||
======= | |||||
private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/"; | |||||
>>>>>>> c03e8c06c8c823800a0c6457f50cebd8c5a105ff | |||||
// private final String BaseUrl = "http://58.16.58.161:19002/ifzt/api/"; | // private final String BaseUrl = "http://58.16.58.161:19002/ifzt/api/"; | ||||
private final String BaseUrl = "http://222.85.144.89:19002/ifzt/api/"; | |||||
// private final String BaseUrl = "http://222.85.144.89:19002/ifzt/api/"; | |||||
private final String appId = "admin001"; | private final String appId = "admin001"; | ||||
private final String IFCODE = ""; | private final String IFCODE = ""; | ||||
private final String bizContent = ""; | private final String bizContent = ""; |
package com.huntersun.vkyes.etcopencard.project.dialog; | package com.huntersun.vkyes.etcopencard.project.dialog; | ||||
import android.app.Activity; | import android.app.Activity; | ||||
import android.text.Html; | |||||
import android.view.View; | import android.view.View; | ||||
import android.widget.Button; | import android.widget.Button; | ||||
import android.widget.TextView; | import android.widget.TextView; | ||||
*/ | */ | ||||
public Builder setContent(String payMoney,String balance) { | public Builder setContent(String payMoney,String balance) { | ||||
tvPayMoney.setText("¥ " + payMoney); | tvPayMoney.setText("¥ " + payMoney); | ||||
tvBalance.setText(balance); | |||||
tvBalance.setText(Html.fromHtml(balance)); | |||||
return this; | return this; | ||||
} | } | ||||
} | } |
import android.annotation.SuppressLint; | import android.annotation.SuppressLint; | ||||
import android.content.Intent; | import android.content.Intent; | ||||
import android.text.Html; | |||||
import android.text.TextUtils; | import android.text.TextUtils; | ||||
import android.util.Log; | import android.util.Log; | ||||
import android.view.View; | import android.view.View; | ||||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | ||||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | ||||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | ||||
import com.huntersun.vkyes.etcopencard.src.widget.BaseTextWatcher; | |||||
import com.umeng.socialize.media.UMImage; | import com.umeng.socialize.media.UMImage; | ||||
import com.umeng.socialize.media.UMWeb; | import com.umeng.socialize.media.UMWeb; | ||||
private ActivityToEntrapmentBinding binding; | private ActivityToEntrapmentBinding binding; | ||||
private String cardId, vehiclePlate, vehiclePlateColorStr, name, command; | private String cardId, vehiclePlate, vehiclePlateColorStr, name, command; | ||||
//模板适配器emo | |||||
private RechargeAdapter rechargeMoneyAdapter; | private RechargeAdapter rechargeMoneyAdapter; | ||||
//选择模板事件回调 | |||||
private INRechargeChoose inRechargeChoose; | private INRechargeChoose inRechargeChoose; | ||||
//选择的充值金额 | //选择的充值金额 | ||||
private RechargeBean moneyInfo; | private RechargeBean moneyInfo; | ||||
private String inputValue; | |||||
private ResultBean.BizContent rechargeOrder; //充值单 | private ResultBean.BizContent rechargeOrder; //充值单 | ||||
list.add(new RechargeBean("500")); | list.add(new RechargeBean("500")); | ||||
list.add(new RechargeBean("1000")); | list.add(new RechargeBean("1000")); | ||||
moneyInfo = list.get(0); | |||||
rechargeMoneyAdapter.setmDatas(list); | rechargeMoneyAdapter.setmDatas(list); | ||||
binding.gvMoney.setAdapter(rechargeMoneyAdapter); | binding.gvMoney.setAdapter(rechargeMoneyAdapter); | ||||
rechargeMoneyAdapter.notifyDataSetChanged(); | rechargeMoneyAdapter.notifyDataSetChanged(); | ||||
* @param payMoney | * @param payMoney | ||||
*/ | */ | ||||
private void showConfirmDialog(String payMoney){ | private void showConfirmDialog(String payMoney){ | ||||
String msg = "请确认是否为车牌号为:<font color=\"#FF8000\">" + (vehiclePlate) + "</font>" + | |||||
",车牌颜色为:" + "<font color=\"#FF8000\">" + vehiclePlateColorStr + "</font>的车充值"; | |||||
new RechargeConfirmDialog.Builder(TopEntrapmentActivity.this) | new RechargeConfirmDialog.Builder(TopEntrapmentActivity.this) | ||||
.setContent(payMoney,"请确认是否为车牌号为:" + vehiclePlate + ",车牌颜色为:" + vehiclePlateColorStr + "的车充值。") | |||||
.setContent(payMoney, msg) | |||||
.setListener(new RechargeConfirmDialog.InOnConfirmClick() { | .setListener(new RechargeConfirmDialog.InOnConfirmClick() { | ||||
@Override | @Override | ||||
public void onConfirmClick() { | public void onConfirmClick() { | ||||
*/ | */ | ||||
@Override | @Override | ||||
public void chooseRechargeMoney(RechargeBean rechargeBean) { | public void chooseRechargeMoney(RechargeBean rechargeBean) { | ||||
binding.etInputMoney.setText(""); | |||||
this.moneyInfo = rechargeBean; | this.moneyInfo = rechargeBean; | ||||
showConfirmDialog(rechargeBean.payMoney); | showConfirmDialog(rechargeBean.payMoney); | ||||
} | } | ||||
调用圈存检测->圈存修复->圈存确认 | 调用圈存检测->圈存修复->圈存确认 | ||||
*/ | */ | ||||
private void doRecharge(){ | private void doRecharge(){ | ||||
toast("马上执行充值" + moneyInfo.payMoney); | |||||
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | ||||
bean.setCardId(cardId); //卡号(传入) | bean.setCardId(cardId); //卡号(传入) | ||||
bean.setFee((long) (Double.parseDouble(moneyInfo.payMoney) * 100L)); //充值金额 | bean.setFee((long) (Double.parseDouble(moneyInfo.payMoney) * 100L)); //充值金额 | ||||
@SuppressLint("LogNotTimber") | @SuppressLint("LogNotTimber") | ||||
@Override | @Override | ||||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | ||||
/** | |||||
/* | |||||
* 1-圈存修复COS指令Response信息不足,重新进行修复初始化 | * 1-圈存修复COS指令Response信息不足,重新进行修复初始化 | ||||
* 2-圈存修复完成,已充值成功 | * 2-圈存修复完成,已充值成功 | ||||
* 3-圈存修复 , 写卡失败,需要重新进行圈存 | * 3-圈存修复 , 写卡失败,需要重新进行圈存 | ||||
private void initClick(){ | private void initClick(){ | ||||
binding.etInputMoney.addTextChangedListener(new BaseTextWatcher(){ | |||||
@Override | |||||
public void onTextChanged(CharSequence s, int start, int before, int count) { | |||||
super.onTextChanged(s, start, before, count); | |||||
if(!FunHelper.isEmpty(FunHelper.getText(binding.etInputMoney)) || !FunHelper.isEmpty(inputValue)){ | |||||
moneyInfo = null; | |||||
if(rechargeMoneyAdapter != null) rechargeMoneyAdapter.clearSelected(); | |||||
} | |||||
inputValue = FunHelper.getText(binding.etInputMoney); | |||||
} | |||||
}); | |||||
//立即充值 | //立即充值 | ||||
binding.nextStep.setOnClickListener(new View.OnClickListener() { | binding.nextStep.setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
if(FunHelper.isEmpty(FunHelper.getText(binding.etInputMoney))){ | |||||
if(!FunHelper.isEmpty(FunHelper.getText(binding.etInputMoney))){ | |||||
moneyInfo = new RechargeBean(FunHelper.getText(binding.etInputMoney)); | |||||
} | |||||
if(moneyInfo == null){ | |||||
toast("请输入充值金额,或者选择需要充值的金额!"); | toast("请输入充值金额,或者选择需要充值的金额!"); | ||||
return; | return; | ||||
} | } | ||||
<<<<<<< HEAD | |||||
// if(Double.parseDouble(FunHelper.getText(binding.etInputMoney)) < 10){ | // if(Double.parseDouble(FunHelper.getText(binding.etInputMoney)) < 10){ | ||||
// toast("最低充值金额不小于10元!"); | // toast("最低充值金额不小于10元!"); | ||||
// return; | // return; | ||||
// } | // } | ||||
moneyInfo = new RechargeBean(FunHelper.getText(binding.etInputMoney)); | moneyInfo = new RechargeBean(FunHelper.getText(binding.etInputMoney)); | ||||
======= | |||||
if(Double.parseDouble(moneyInfo.payMoney) < 10){ | |||||
toast("最低充值金额不小于10元!"); | |||||
return; | |||||
} | |||||
>>>>>>> c03e8c06c8c823800a0c6457f50cebd8c5a105ff | |||||
doRecharge(); | doRecharge(); | ||||
} | } | ||||
}); | }); |
package com.huntersun.vkyes.etcopencard.project.ui.activity.after; | package com.huntersun.vkyes.etcopencard.project.ui.activity.after; | ||||
import android.content.Intent; | |||||
import android.os.Bundle; | import android.os.Bundle; | ||||
import android.view.View; | import android.view.View; | ||||
import android.view.animation.AnimationUtils; | import android.view.animation.AnimationUtils; | ||||
import com.alibaba.fastjson.JSON; | |||||
import com.blankj.utilcode.util.LogUtils; | |||||
import com.google.gson.Gson; | import com.google.gson.Gson; | ||||
import com.huntersun.vkyes.etcopencard.R; | import com.huntersun.vkyes.etcopencard.R; | ||||
import com.huntersun.vkyes.etcopencard.databinding.ActivityTopUpBinding; | import com.huntersun.vkyes.etcopencard.databinding.ActivityTopUpBinding; | ||||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | ||||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | ||||
import java.util.regex.Pattern; | |||||
/** | /** | ||||
* 储值卡圈存 | * 储值卡圈存 | ||||
* @author admin | * @author admin |
}); | }); | ||||
} | } | ||||
public void clearSelected(){ | |||||
if(moneyInfoBefore != null){ | |||||
moneyInfoBefore.isSelected = false; | |||||
} | |||||
if(holderBefore != null){ | |||||
setSelected(holderBefore,false); | |||||
} | |||||
notifyDataSetChanged(); | |||||
} | |||||
/* | /* | ||||
* 设置是否选中 | * 设置是否选中 | ||||
* | * |
package com.huntersun.vkyes.etcopencard.project.ui.fragment; | package com.huntersun.vkyes.etcopencard.project.ui.fragment; | ||||
import android.annotation.SuppressLint; | import android.annotation.SuppressLint; | ||||
import android.content.Intent; | |||||
import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||
import android.view.View; | import android.view.View; | ||||
import android.view.ViewGroup; | import android.view.ViewGroup; | ||||
import com.huntersun.vkyes.etcopencard.project.api.Result; | import com.huntersun.vkyes.etcopencard.project.api.Result; | ||||
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | ||||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | ||||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.ApplyReturnMoneyActivity; | |||||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.RechargeRecordActivity; | import com.huntersun.vkyes.etcopencard.project.ui.activity.after.RechargeRecordActivity; | ||||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.UndoLoopActivity; | |||||
import com.huntersun.vkyes.etcopencard.project.utils.Constants; | import com.huntersun.vkyes.etcopencard.project.utils.Constants; | ||||
import com.huntersun.vkyes.etcopencard.src.action.StatusAction; | import com.huntersun.vkyes.etcopencard.src.action.StatusAction; | ||||
import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | ||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
toast("撤销圈存"); | toast("撤销圈存"); | ||||
startActivity(new Intent(getActivity(), UndoLoopActivity.class)); | |||||
//startActivity(new Intent(getActivity(), ApplyReturnMoneyActivity.class)); | |||||
} | } | ||||
}); | }); | ||||
package com.huntersun.vkyes.etcopencard.src.widget; | |||||
import android.text.Editable; | |||||
import android.text.TextWatcher; | |||||
/** | |||||
* Date :2023-03-13 | |||||
* Description: | |||||
*/ | |||||
public class BaseTextWatcher implements TextWatcher { | |||||
@Override | |||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { | |||||
} | |||||
@Override | |||||
public void onTextChanged(CharSequence s, int start, int before, int count) { | |||||
} | |||||
@Override | |||||
public void afterTextChanged(Editable s) { | |||||
} | |||||
} |
<solid android:color="@color/white"/> | <solid android:color="@color/white"/> | ||||
<stroke | <stroke | ||||
android:width="@dimen/dp_0_5" | android:width="@dimen/dp_0_5" | ||||
android:color="#CCCCCC" /> | |||||
android:color="@color/common_divider" /> | |||||
</shape> | </shape> |
<com.huntersun.vkyes.etcopencard.src.widget.tablayout.SlidingTabLayout | <com.huntersun.vkyes.etcopencard.src.widget.tablayout.SlidingTabLayout | ||||
android:id="@+id/tab_title" | android:id="@+id/tab_title" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="@dimen/dp_30" | |||||
android:layout_height="@dimen/dp_35" | |||||
android:background="@color/white" | android:background="@color/white" | ||||
app:divider_color="@color/transparent" | app:divider_color="@color/transparent" | ||||
app:divider_padding="0dp" | app:divider_padding="0dp" |
</LinearLayout> | </LinearLayout> | ||||
<LinearLayout | <LinearLayout | ||||
style="@style/MatchWrap.Horizontal" | style="@style/MatchWrap.Horizontal" | ||||
android:visibility="gone" | |||||
android:layout_marginTop="@dimen/dp_12"> | android:layout_marginTop="@dimen/dp_12"> | ||||
<TextView | <TextView | ||||
android:id="@+id/btn_next" | android:id="@+id/btn_next" | ||||
style="@style/BtnShortStyle" | style="@style/BtnShortStyle" | ||||
android:layout_width="@dimen/dp_70" | android:layout_width="@dimen/dp_70" | ||||
android:layout_height="@dimen/dp_25" | |||||
android:layout_height="@dimen/dp_28" | |||||
android:layout_gravity="center_vertical|right" | android:layout_gravity="center_vertical|right" | ||||
android:layout_marginTop="@dimen/dp_10" | android:layout_marginTop="@dimen/dp_10" | ||||
android:text="圈存" | android:text="圈存" |
android:id="@+id/balance" | android:id="@+id/balance" | ||||
style="@style/WrapWrap" | style="@style/WrapWrap" | ||||
android:textSize="@dimen/sp_14" | android:textSize="@dimen/sp_14" | ||||
android:textColor="#FF8000"/> | |||||
android:textColor="@color/color_333333"/> | |||||
</LinearLayout> | </LinearLayout> | ||||
<Button | <Button |