从业资格显示优化
This commit is contained in:
parent
3fabb4df22
commit
2037daaa15
@ -27,10 +27,12 @@ data class UpDriverInfoBean(
|
|||||||
var licenseType: String = "",
|
var licenseType: String = "",
|
||||||
var licenseName: String = "",
|
var licenseName: String = "",
|
||||||
var licenseRecordNumber: String = "",
|
var licenseRecordNumber: String = "",
|
||||||
|
var licenseRegisterDate: String = "",
|
||||||
var licenseEffectiveStart: String = "",
|
var licenseEffectiveStart: String = "",
|
||||||
var licenseEffectiveEnd: String = "",
|
var licenseEffectiveEnd: String = "",
|
||||||
var licensePhotoFaceUrl: String = "",
|
var licensePhotoFaceUrl: String = "",
|
||||||
var licensePhotoBackUrl: String = "",
|
var licensePhotoBackUrl: String = "",
|
||||||
|
var recordNumber: String = "",
|
||||||
var licenseFirstGetDate: String = "",
|
var licenseFirstGetDate: String = "",
|
||||||
var licenseApproveOrganization: String = ""
|
var licenseApproveOrganization: String = ""
|
||||||
)
|
)
|
||||||
|
@ -105,10 +105,18 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
|
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
|
||||||
override fun onSuccess(t: CommonResponseBean<Any>) {
|
override fun onSuccess(t: CommonResponseBean<Any>) {
|
||||||
super.onSuccess(t)
|
super.onSuccess(t)
|
||||||
|
if (driverInfoBean.licenseType.contains("C")){//C证
|
||||||
|
ActivityUtils.startActivity(
|
||||||
|
mContext,
|
||||||
|
AuthBankCardActivity::class.java
|
||||||
|
)
|
||||||
|
}else{
|
||||||
ActivityUtils.startActivity(
|
ActivityUtils.startActivity(
|
||||||
mContext,
|
mContext,
|
||||||
AuthQualificationActivity::class.java
|
AuthQualificationActivity::class.java
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
@ -128,6 +136,7 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
driverInfoBean.licensePhotoFaceUrl = picPath.picPath
|
driverInfoBean.licensePhotoFaceUrl = picPath.picPath
|
||||||
it?.run {
|
it?.run {
|
||||||
driverInfoBean.run {
|
driverInfoBean.run {
|
||||||
|
licenseRegisterDate = initialIssueDate
|
||||||
licenseApproveOrganization =
|
licenseApproveOrganization =
|
||||||
issueAuthority //发证机关
|
issueAuthority //发证机关
|
||||||
}
|
}
|
||||||
@ -160,7 +169,9 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
ImageLoader.getInstance()
|
ImageLoader.getInstance()
|
||||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||||
driverInfoBean.licensePhotoBackUrl = picPath.picPath
|
driverInfoBean.licensePhotoBackUrl = picPath.picPath
|
||||||
ToastUtils.showToast(mContext, "驾驶证副页上传成功")
|
it?.run {
|
||||||
|
driverInfoBean.recordNumber = recordNumber
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(), RefreshCallBack {
|
|||||||
}
|
}
|
||||||
|
|
||||||
llNotic.setOnClickListener {
|
llNotic.setOnClickListener {
|
||||||
ActivityUtils.startActivity(mContext,PersonInfoActivity::class.java)
|
ActivityUtils.startActivity(mContext, PersonInfoActivity::class.java)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initData()
|
initData()
|
||||||
@ -177,12 +177,17 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(), RefreshCallBack {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
DataManager.getInstance().getUserDetail()
|
DataManager.getInstance().getDriverDocIntegrity()
|
||||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserDetail>() {
|
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserDetail>() {
|
||||||
override fun onSuccess(t: CommonResponseBean<UserDetail>) {
|
override fun onSuccess(t: CommonResponseBean<UserDetail>) {
|
||||||
super.onSuccess(t)
|
super.onSuccess(t)
|
||||||
if (t.data.auditStatus == "100001")
|
if (t == null || t.data == null)
|
||||||
|
return
|
||||||
|
if (t.data.idcardNo.isNullOrEmpty() || t.data.licenseNo.isNullOrEmpty() ||
|
||||||
|
(if (t.data.licenseType.contains("C")) false else t.data.qualificationCertificateEffectiveEnd.isNullOrEmpty()) || t.data.driverBankcardNumber.isNullOrEmpty() ||
|
||||||
|
t.data.isRealName == "0"
|
||||||
|
)
|
||||||
binding.llNotic.visibility = View.VISIBLE
|
binding.llNotic.visibility = View.VISIBLE
|
||||||
else
|
else
|
||||||
binding.llNotic.visibility = View.GONE
|
binding.llNotic.visibility = View.GONE
|
||||||
|
@ -33,6 +33,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers
|
|||||||
class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnClickListener {
|
class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnClickListener {
|
||||||
private var doneInfoCount = 0
|
private var doneInfoCount = 0
|
||||||
private var firstMissingInfo = -1
|
private var firstMissingInfo = -1
|
||||||
|
private var allInfoCount = 4
|
||||||
override fun initView(savedInstanceState: Bundle?) {
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
setStatusHeightParams(binding.rlTop)
|
setStatusHeightParams(binding.rlTop)
|
||||||
setTitleBar("实名认证", true)
|
setTitleBar("实名认证", true)
|
||||||
@ -202,10 +203,18 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
|||||||
tvDriverInfo.text = """${data.licenseName} ${data.licenseNo}"""
|
tvDriverInfo.text = """${data.licenseName} ${data.licenseNo}"""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.licenseType.contains("C")) {
|
||||||
|
cvQua.visibility = View.GONE
|
||||||
|
allInfoCount = 4
|
||||||
|
} else {
|
||||||
|
cvQua.visibility = View.VISIBLE
|
||||||
|
allInfoCount = 5
|
||||||
if (data.qualificationCertificateEffectiveEnd.isNullOrEmpty()) {
|
if (data.qualificationCertificateEffectiveEnd.isNullOrEmpty()) {
|
||||||
tvQualiInfo.text = "证件缺失将无法进行接单"
|
tvQualiInfo.text = "证件缺失将无法进行接单"
|
||||||
missInfo =
|
missInfo =
|
||||||
if (missInfo.isNullOrEmpty()) missInfo.plus("从业资格证") else missInfo.plus("、从业资格证")
|
if (missInfo.isNullOrEmpty()) missInfo.plus("从业资格证") else missInfo.plus(
|
||||||
|
"、从业资格证"
|
||||||
|
)
|
||||||
if (firstMissingInfo == -1) {
|
if (firstMissingInfo == -1) {
|
||||||
firstMissingInfo = 3
|
firstMissingInfo = 3
|
||||||
}
|
}
|
||||||
@ -213,6 +222,8 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
|||||||
doneInfoCount++
|
doneInfoCount++
|
||||||
tvQualiInfo.text = """${data.qualificationCertificateNo}"""
|
tvQualiInfo.text = """${data.qualificationCertificateNo}"""
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (data.driverBankcardNumber.isNullOrEmpty()) {
|
if (data.driverBankcardNumber.isNullOrEmpty()) {
|
||||||
tvBankInfo.text = "证件缺失将无法进行接单"
|
tvBankInfo.text = "证件缺失将无法进行接单"
|
||||||
@ -240,7 +251,7 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
|||||||
tvFaceInfo.text = "实名认证成功"
|
tvFaceInfo.text = "实名认证成功"
|
||||||
}
|
}
|
||||||
|
|
||||||
btnNext.text = if (doneInfoCount == 5) "已完成" else "继续认证"
|
btnNext.text = if (doneInfoCount == allInfoCount) "已完成" else "继续认证"
|
||||||
tvContent.text =
|
tvContent.text =
|
||||||
if (missInfo.isNullOrEmpty() && data.auditStatus == "100003") "信息审核通过!!!"
|
if (missInfo.isNullOrEmpty() && data.auditStatus == "100003") "信息审核通过!!!"
|
||||||
else if (missInfo.isNullOrEmpty() && data.auditStatus == "100004") "审核未通过!!!"
|
else if (missInfo.isNullOrEmpty() && data.auditStatus == "100004") "审核未通过!!!"
|
||||||
@ -266,7 +277,7 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
|||||||
|
|
||||||
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 / 5
|
circleBarView2.progress = doneInfoCount * 100 / allInfoCount
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,16 +150,21 @@ class OrderUtils private constructor() {
|
|||||||
ToastUtils.showToast(context, "暂未查询到车辆")
|
ToastUtils.showToast(context, "暂未查询到车辆")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (t.data.size > 1) {//多辆车需选择车辆,单个车辆直接接单
|
|
||||||
CommonPopUtils.getInstance()
|
CommonPopUtils.getInstance()
|
||||||
.showCarList(context, t.data, false,selDriverId,selCarId) {
|
.showCarList(context, t.data, false,selDriverId,selCarId) {
|
||||||
//接单接口
|
//接单接口
|
||||||
receivingOrders(context, orderId, it, listener)
|
receivingOrders(context, orderId, it, listener)
|
||||||
}
|
}
|
||||||
} else {
|
// if (t.data.size > 1) {//多辆车需选择车辆,单个车辆直接接单
|
||||||
//单量车,直接默认当前车辆 ,接单接口
|
// CommonPopUtils.getInstance()
|
||||||
receivingOrders(context, orderId, t.data[0], listener)
|
// .showCarList(context, t.data, false,selDriverId,selCarId) {
|
||||||
}
|
// //接单接口
|
||||||
|
// receivingOrders(context, orderId, it, listener)
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// //单量车,直接默认当前车辆 ,接单接口
|
||||||
|
// receivingOrders(context, orderId, t.data[0], listener)
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -361,6 +361,8 @@
|
|||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/cvQua"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
|
Loading…
Reference in New Issue
Block a user