@@ -40,13 +40,17 @@ import retrofit2.converter.scalars.ScalarsConverterFactory; | |||
public class MyRetrofit { | |||
//是否设置缓存 | |||
private static final boolean Cache = false; | |||
<<<<<<< HEAD | |||
/** | |||
* 修改文件上传地址:VPN访问:192.168.101.145:6001、办公网络访问:222.85.144.89:19003 | |||
* 回显地址: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/"; | |||
>>>>>>> c03e8c06c8c823800a0c6457f50cebd8c5a105ff | |||
// 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 IFCODE = ""; | |||
private final String bizContent = ""; |
@@ -1,6 +1,7 @@ | |||
package com.huntersun.vkyes.etcopencard.project.dialog; | |||
import android.app.Activity; | |||
import android.text.Html; | |||
import android.view.View; | |||
import android.widget.Button; | |||
import android.widget.TextView; | |||
@@ -55,7 +56,7 @@ public class RechargeConfirmDialog { | |||
*/ | |||
public Builder setContent(String payMoney,String balance) { | |||
tvPayMoney.setText("¥ " + payMoney); | |||
tvBalance.setText(balance); | |||
tvBalance.setText(Html.fromHtml(balance)); | |||
return this; | |||
} | |||
} |
@@ -2,6 +2,7 @@ package com.huntersun.vkyes.etcopencard.project.ui.activity.after; | |||
import android.annotation.SuppressLint; | |||
import android.content.Intent; | |||
import android.text.Html; | |||
import android.text.TextUtils; | |||
import android.util.Log; | |||
import android.view.View; | |||
@@ -26,6 +27,7 @@ import com.huntersun.vkyes.etcopencard.project.ui.adapter.interfaces.INRechargeC | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
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.UMWeb; | |||
@@ -41,12 +43,11 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo | |||
private ActivityToEntrapmentBinding binding; | |||
private String cardId, vehiclePlate, vehiclePlateColorStr, name, command; | |||
//模板适配器emo | |||
private RechargeAdapter rechargeMoneyAdapter; | |||
//选择模板事件回调 | |||
private INRechargeChoose inRechargeChoose; | |||
//选择的充值金额 | |||
private RechargeBean moneyInfo; | |||
private String inputValue; | |||
private ResultBean.BizContent rechargeOrder; //充值单 | |||
@@ -96,7 +97,6 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo | |||
list.add(new RechargeBean("500")); | |||
list.add(new RechargeBean("1000")); | |||
moneyInfo = list.get(0); | |||
rechargeMoneyAdapter.setmDatas(list); | |||
binding.gvMoney.setAdapter(rechargeMoneyAdapter); | |||
rechargeMoneyAdapter.notifyDataSetChanged(); | |||
@@ -107,8 +107,10 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo | |||
* @param payMoney | |||
*/ | |||
private void showConfirmDialog(String payMoney){ | |||
String msg = "请确认是否为车牌号为:<font color=\"#FF8000\">" + (vehiclePlate) + "</font>" + | |||
",车牌颜色为:" + "<font color=\"#FF8000\">" + vehiclePlateColorStr + "</font>的车充值"; | |||
new RechargeConfirmDialog.Builder(TopEntrapmentActivity.this) | |||
.setContent(payMoney,"请确认是否为车牌号为:" + vehiclePlate + ",车牌颜色为:" + vehiclePlateColorStr + "的车充值。") | |||
.setContent(payMoney, msg) | |||
.setListener(new RechargeConfirmDialog.InOnConfirmClick() { | |||
@Override | |||
public void onConfirmClick() { | |||
@@ -123,6 +125,7 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo | |||
*/ | |||
@Override | |||
public void chooseRechargeMoney(RechargeBean rechargeBean) { | |||
binding.etInputMoney.setText(""); | |||
this.moneyInfo = rechargeBean; | |||
showConfirmDialog(rechargeBean.payMoney); | |||
} | |||
@@ -136,7 +139,6 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo | |||
调用圈存检测->圈存修复->圈存确认 | |||
*/ | |||
private void doRecharge(){ | |||
toast("马上执行充值" + moneyInfo.payMoney); | |||
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | |||
bean.setCardId(cardId); //卡号(传入) | |||
bean.setFee((long) (Double.parseDouble(moneyInfo.payMoney) * 100L)); //充值金额 | |||
@@ -302,7 +304,7 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo | |||
@SuppressLint("LogNotTimber") | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
/** | |||
/* | |||
* 1-圈存修复COS指令Response信息不足,重新进行修复初始化 | |||
* 2-圈存修复完成,已充值成功 | |||
* 3-圈存修复 , 写卡失败,需要重新进行圈存 | |||
@@ -400,19 +402,43 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo | |||
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() { | |||
@Override | |||
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("请输入充值金额,或者选择需要充值的金额!"); | |||
return; | |||
} | |||
<<<<<<< HEAD | |||
// if(Double.parseDouble(FunHelper.getText(binding.etInputMoney)) < 10){ | |||
// toast("最低充值金额不小于10元!"); | |||
// return; | |||
// } | |||
moneyInfo = new RechargeBean(FunHelper.getText(binding.etInputMoney)); | |||
======= | |||
if(Double.parseDouble(moneyInfo.payMoney) < 10){ | |||
toast("最低充值金额不小于10元!"); | |||
return; | |||
} | |||
>>>>>>> c03e8c06c8c823800a0c6457f50cebd8c5a105ff | |||
doRecharge(); | |||
} | |||
}); |
@@ -1,12 +1,9 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.activity.after; | |||
import android.content.Intent; | |||
import android.os.Bundle; | |||
import android.view.View; | |||
import android.view.animation.AnimationUtils; | |||
import com.alibaba.fastjson.JSON; | |||
import com.blankj.utilcode.util.LogUtils; | |||
import com.google.gson.Gson; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityTopUpBinding; | |||
@@ -21,8 +18,6 @@ import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeB | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import java.util.regex.Pattern; | |||
/** | |||
* 储值卡圈存 | |||
* @author admin |
@@ -57,6 +57,16 @@ public class RechargeAdapter extends CommonAdapter<RechargeBean> { | |||
}); | |||
} | |||
public void clearSelected(){ | |||
if(moneyInfoBefore != null){ | |||
moneyInfoBefore.isSelected = false; | |||
} | |||
if(holderBefore != null){ | |||
setSelected(holderBefore,false); | |||
} | |||
notifyDataSetChanged(); | |||
} | |||
/* | |||
* 设置是否选中 | |||
* |
@@ -1,6 +1,7 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.fragment; | |||
import android.annotation.SuppressLint; | |||
import android.content.Intent; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
@@ -18,7 +19,9 @@ import com.huntersun.vkyes.etcopencard.project.api.RequestParameters; | |||
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.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.UndoLoopActivity; | |||
import com.huntersun.vkyes.etcopencard.project.utils.Constants; | |||
import com.huntersun.vkyes.etcopencard.src.action.StatusAction; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | |||
@@ -159,6 +162,8 @@ public class RechargeRecordFragment extends TitleBarFragment<RechargeRecordActiv | |||
@Override | |||
public void onClick(View view) { | |||
toast("撤销圈存"); | |||
startActivity(new Intent(getActivity(), UndoLoopActivity.class)); | |||
//startActivity(new Intent(getActivity(), ApplyReturnMoneyActivity.class)); | |||
} | |||
}); | |||
@@ -0,0 +1,25 @@ | |||
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) { | |||
} | |||
} |
@@ -4,5 +4,5 @@ | |||
<solid android:color="@color/white"/> | |||
<stroke | |||
android:width="@dimen/dp_0_5" | |||
android:color="#CCCCCC" /> | |||
android:color="@color/common_divider" /> | |||
</shape> |
@@ -128,7 +128,7 @@ | |||
<com.huntersun.vkyes.etcopencard.src.widget.tablayout.SlidingTabLayout | |||
android:id="@+id/tab_title" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_30" | |||
android:layout_height="@dimen/dp_35" | |||
android:background="@color/white" | |||
app:divider_color="@color/transparent" | |||
app:divider_padding="0dp" |
@@ -180,7 +180,6 @@ | |||
</LinearLayout> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:visibility="gone" | |||
android:layout_marginTop="@dimen/dp_12"> | |||
<TextView | |||
@@ -226,7 +225,7 @@ | |||
android:id="@+id/btn_next" | |||
style="@style/BtnShortStyle" | |||
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_marginTop="@dimen/dp_10" | |||
android:text="圈存" |
@@ -54,7 +54,7 @@ | |||
android:id="@+id/balance" | |||
style="@style/WrapWrap" | |||
android:textSize="@dimen/sp_14" | |||
android:textColor="#FF8000"/> | |||
android:textColor="@color/color_333333"/> | |||
</LinearLayout> | |||
<Button |