From 2037daaa15dceef1a592df85eb7c48e890d26c4a Mon Sep 17 00:00:00 2001 From: lijia Date: Thu, 18 Apr 2024 16:58:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=8E=E4=B8=9A=E8=B5=84=E6=A0=BC=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dahe/gldriver/bean/UpInfoBean.kt | 2 ++ .../account/authperson/AuthDriverActivity.kt | 21 +++++++++--- .../com/dahe/gldriver/ui/home/HomeFragment.kt | 11 +++++-- .../ui/mine/activity/PersonInfoActivity.kt | 33 ++++++++++++------- .../com/dahe/gldriver/utils/OrderUtils.kt | 25 ++++++++------ .../main/res/layout/activity_person_info.xml | 2 ++ 6 files changed, 65 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/com/dahe/gldriver/bean/UpInfoBean.kt b/app/src/main/java/com/dahe/gldriver/bean/UpInfoBean.kt index 9e51b5a..6c3099c 100644 --- a/app/src/main/java/com/dahe/gldriver/bean/UpInfoBean.kt +++ b/app/src/main/java/com/dahe/gldriver/bean/UpInfoBean.kt @@ -27,10 +27,12 @@ data class UpDriverInfoBean( var licenseType: String = "", var licenseName: String = "", var licenseRecordNumber: String = "", + var licenseRegisterDate: String = "", var licenseEffectiveStart: String = "", var licenseEffectiveEnd: String = "", var licensePhotoFaceUrl: String = "", var licensePhotoBackUrl: String = "", + var recordNumber: String = "", var licenseFirstGetDate: String = "", var licenseApproveOrganization: String = "" ) diff --git a/app/src/main/java/com/dahe/gldriver/ui/account/authperson/AuthDriverActivity.kt b/app/src/main/java/com/dahe/gldriver/ui/account/authperson/AuthDriverActivity.kt index 5c5ae53..a2ed2d9 100644 --- a/app/src/main/java/com/dahe/gldriver/ui/account/authperson/AuthDriverActivity.kt +++ b/app/src/main/java/com/dahe/gldriver/ui/account/authperson/AuthDriverActivity.kt @@ -105,10 +105,18 @@ class AuthDriverActivity : BaseActivity() { .subscribe(BaseObserver(mContext, object : RxHttpCallBack() { override fun onSuccess(t: CommonResponseBean) { super.onSuccess(t) - ActivityUtils.startActivity( - mContext, - AuthQualificationActivity::class.java - ) + if (driverInfoBean.licenseType.contains("C")){//C证 + ActivityUtils.startActivity( + mContext, + AuthBankCardActivity::class.java + ) + }else{ + ActivityUtils.startActivity( + mContext, + AuthQualificationActivity::class.java + ) + } + finish() } })) @@ -128,6 +136,7 @@ class AuthDriverActivity : BaseActivity() { driverInfoBean.licensePhotoFaceUrl = picPath.picPath it?.run { driverInfoBean.run { + licenseRegisterDate = initialIssueDate licenseApproveOrganization = issueAuthority //发证机关 } @@ -160,7 +169,9 @@ class AuthDriverActivity : BaseActivity() { ImageLoader.getInstance() .loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack) driverInfoBean.licensePhotoBackUrl = picPath.picPath - ToastUtils.showToast(mContext, "驾驶证副页上传成功") + it?.run { + driverInfoBean.recordNumber = recordNumber + } } } diff --git a/app/src/main/java/com/dahe/gldriver/ui/home/HomeFragment.kt b/app/src/main/java/com/dahe/gldriver/ui/home/HomeFragment.kt index 9f913cb..4fffdca 100644 --- a/app/src/main/java/com/dahe/gldriver/ui/home/HomeFragment.kt +++ b/app/src/main/java/com/dahe/gldriver/ui/home/HomeFragment.kt @@ -139,7 +139,7 @@ class HomeFragment : BaseFragment(), RefreshCallBack { } llNotic.setOnClickListener { - ActivityUtils.startActivity(mContext,PersonInfoActivity::class.java) + ActivityUtils.startActivity(mContext, PersonInfoActivity::class.java) } } initData() @@ -177,12 +177,17 @@ class HomeFragment : BaseFragment(), RefreshCallBack { }) ) - DataManager.getInstance().getUserDetail() + DataManager.getInstance().getDriverDocIntegrity() .subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()) .subscribe(BaseObserver(mContext, object : RxHttpCallBack() { override fun onSuccess(t: CommonResponseBean) { 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 else binding.llNotic.visibility = View.GONE diff --git a/app/src/main/java/com/dahe/gldriver/ui/mine/activity/PersonInfoActivity.kt b/app/src/main/java/com/dahe/gldriver/ui/mine/activity/PersonInfoActivity.kt index 8c33d67..a7abe6d 100644 --- a/app/src/main/java/com/dahe/gldriver/ui/mine/activity/PersonInfoActivity.kt +++ b/app/src/main/java/com/dahe/gldriver/ui/mine/activity/PersonInfoActivity.kt @@ -33,6 +33,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers class PersonInfoActivity : BaseActivity(), View.OnClickListener { private var doneInfoCount = 0 private var firstMissingInfo = -1 + private var allInfoCount = 4 override fun initView(savedInstanceState: Bundle?) { setStatusHeightParams(binding.rlTop) setTitleBar("实名认证", true) @@ -202,18 +203,28 @@ class PersonInfoActivity : BaseActivity(), View.OnCli tvDriverInfo.text = """${data.licenseName} ${data.licenseNo}""" } - if (data.qualificationCertificateEffectiveEnd.isNullOrEmpty()) { - tvQualiInfo.text = "证件缺失将无法进行接单" - missInfo = - if (missInfo.isNullOrEmpty()) missInfo.plus("从业资格证") else missInfo.plus("、从业资格证") - if (firstMissingInfo == -1) { - firstMissingInfo = 3 - } + if (data.licenseType.contains("C")) { + cvQua.visibility = View.GONE + allInfoCount = 4 } else { - doneInfoCount++ - tvQualiInfo.text = """${data.qualificationCertificateNo}""" + cvQua.visibility = View.VISIBLE + allInfoCount = 5 + if (data.qualificationCertificateEffectiveEnd.isNullOrEmpty()) { + tvQualiInfo.text = "证件缺失将无法进行接单" + missInfo = + if (missInfo.isNullOrEmpty()) missInfo.plus("从业资格证") else missInfo.plus( + "、从业资格证" + ) + if (firstMissingInfo == -1) { + firstMissingInfo = 3 + } + } else { + doneInfoCount++ + tvQualiInfo.text = """${data.qualificationCertificateNo}""" + } } + if (data.driverBankcardNumber.isNullOrEmpty()) { tvBankInfo.text = "证件缺失将无法进行接单" missInfo = @@ -240,7 +251,7 @@ class PersonInfoActivity : BaseActivity(), View.OnCli tvFaceInfo.text = "实名认证成功" } - btnNext.text = if (doneInfoCount == 5) "已完成" else "继续认证" + btnNext.text = if (doneInfoCount == allInfoCount) "已完成" else "继续认证" tvContent.text = if (missInfo.isNullOrEmpty() && data.auditStatus == "100003") "信息审核通过!!!" else if (missInfo.isNullOrEmpty() && data.auditStatus == "100004") "审核未通过!!!" @@ -266,7 +277,7 @@ class PersonInfoActivity : BaseActivity(), View.OnCli btnFace.visibility = if (data?.isRealName == "0") View.VISIBLE else View.GONE - circleBarView2.progress = doneInfoCount * 100 / 5 + circleBarView2.progress = doneInfoCount * 100 / allInfoCount } } diff --git a/app/src/main/java/com/dahe/gldriver/utils/OrderUtils.kt b/app/src/main/java/com/dahe/gldriver/utils/OrderUtils.kt index fdcd3b5..9057acc 100644 --- a/app/src/main/java/com/dahe/gldriver/utils/OrderUtils.kt +++ b/app/src/main/java/com/dahe/gldriver/utils/OrderUtils.kt @@ -150,16 +150,21 @@ class OrderUtils private constructor() { ToastUtils.showToast(context, "暂未查询到车辆") return } - if (t.data.size > 1) {//多辆车需选择车辆,单个车辆直接接单 - CommonPopUtils.getInstance() - .showCarList(context, t.data, false,selDriverId,selCarId) { - //接单接口 - receivingOrders(context, orderId, it, listener) - } - } else { - //单量车,直接默认当前车辆 ,接单接口 - receivingOrders(context, orderId, t.data[0], listener) - } + CommonPopUtils.getInstance() + .showCarList(context, t.data, false,selDriverId,selCarId) { + //接单接口 + receivingOrders(context, orderId, it, listener) + } +// if (t.data.size > 1) {//多辆车需选择车辆,单个车辆直接接单 +// CommonPopUtils.getInstance() +// .showCarList(context, t.data, false,selDriverId,selCarId) { +// //接单接口 +// receivingOrders(context, orderId, it, listener) +// } +// } else { +// //单量车,直接默认当前车辆 ,接单接口 +// receivingOrders(context, orderId, t.data[0], listener) +// } } }) ) diff --git a/app/src/main/res/layout/activity_person_info.xml b/app/src/main/res/layout/activity_person_info.xml index 21df587..7f35442 100644 --- a/app/src/main/res/layout/activity_person_info.xml +++ b/app/src/main/res/layout/activity_person_info.xml @@ -361,6 +361,8 @@