优化从业资格证判断逻辑

This commit is contained in:
lijia 2024-12-30 16:55:19 +08:00
parent 55ae6f863f
commit c9b561537f
6 changed files with 26 additions and 27 deletions

View File

@ -122,18 +122,18 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
override fun onSuccess(t: CommonResponseBean<Any>) {
super.onSuccess(t)
if (driverInfoBean.licenseType.contains("C")) {//C证
ActivityUtils.startActivity(
mContext,
AuthBankCardActivity::class.java
)
} else {
//驾驶证类型包含A B类需要上传从业资格证
if (driverInfoBean.licenseType.contains("A")||driverInfoBean.licenseType.contains("B")) {
ActivityUtils.startActivity(
mContext,
AuthQualificationActivity::class.java
)
}else{
ActivityUtils.startActivity(
mContext,
AuthBankCardActivity::class.java
)
}
}
}))
}

View File

@ -70,7 +70,6 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
}
ivFront.setOnClickListener {
if (driverInfoBean.licensePhotoFaceUrl.isNullOrEmpty()){
selFrontPic()
}else{

View File

@ -206,7 +206,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(), RefreshCallBack {
)
getLocation()
// getLocation()
ALProcess.verification(mContext)
//证件过期判断+轨迹上传判断
DataManager.getInstance().getUserInfo()

View File

@ -323,19 +323,19 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
}
}))
DataManager.getInstance().getDriverBalance()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<WalletInfo>() {
override fun onSuccess(t: CommonResponseBean<WalletInfo>) {
super.onSuccess(t)
binding.run {
tvWalletBa.text = t.data.acctBal
tvBankNum.text = t.data.bankCountNum
tvIncome.text = t.data.accumulatedRevenue
}
}
}))
// DataManager.getInstance().getDriverBalance()
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(BaseObserver(mContext, object : RxHttpCallBack<WalletInfo>() {
// override fun onSuccess(t: CommonResponseBean<WalletInfo>) {
// super.onSuccess(t)
// binding.run {
// tvWalletBa.text = t.data.acctBal
// tvBankNum.text = t.data.bankCountNum
// tvIncome.text = t.data.accumulatedRevenue
// }
// }
// }))
//司机证件缺失过期提醒
val userInfo = SPUtils.instance.getUserInfo(mContext)

View File

@ -222,7 +222,7 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
tvDriverInfo.text = """${data.licenseName} ${data.licenseNo}"""
}
if (data.licenseType.contains("C")) {
if (!data.licenseType.contains("A")&&!data.licenseType.contains("B")) {
cvQua.visibility = View.GONE
allInfoCount = 4
} else {
@ -239,7 +239,7 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
}
} else {
doneInfoCount++
tvQualiInfo.text = """${data.qualificationCertificateNo}"""
tvQualiInfo.text = data.qualificationCertificateNo
}
}
@ -253,7 +253,7 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
}
} else {
doneInfoCount++
tvBankInfo.text = """${data.driverBankcardNumber}"""
tvBankInfo.text = data.driverBankcardNumber
}
@ -294,7 +294,7 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
if (data.driverBankcardNumber.isNullOrEmpty()) View.VISIBLE else View.GONE
btnFace.visibility = if (data?.isRealName == "0") View.VISIBLE else View.GONE
btnFace.visibility = if (data.isRealName == "0") View.VISIBLE else View.GONE
circleBarView2.progress = doneInfoCount * 100 / allInfoCount
}

View File

@ -88,7 +88,7 @@
android:layout_height="wrap_content"
android:text="郑州"
android:textColor="@color/white"
android:textSize="@dimen/sp_16"></TextView>
android:textSize="@dimen/sp_16" />
<EditText
android:layout_width="match_parent"