证件过期优化,内容不一致问题优化
This commit is contained in:
parent
10f9be36c5
commit
e161aed122
@ -31,6 +31,10 @@ class CarsAdapter() :
|
||||
}吨"""
|
||||
)
|
||||
|
||||
setGone(R.id.tvNotic,
|
||||
!(item?.roadLicenseValidityOverdue=="1"||item?.licenseValidityOverdue=="1")
|
||||
)
|
||||
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(context, item?.carUrl, 6, getView<ImageView>(R.id.ivHead))
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ data class CarBean(
|
||||
val carHeight: String="",
|
||||
var carId: String="",
|
||||
var driverId: String="",
|
||||
var roadLicenseValidityOverdue: String="",
|
||||
var licenseValidityOverdue: String="",
|
||||
val carLong: String="",
|
||||
val carUrl: String="",
|
||||
val carWidth: String="",
|
||||
|
@ -108,6 +108,13 @@ data class CardInfo(
|
||||
val licenseEffectiveEnd: String,
|
||||
val licenseEffectiveOverdue: String,
|
||||
val qualificationCertificateEffectiveEnd: String,
|
||||
val qualificationCertificateEffectiveOverdue: String
|
||||
val qualificationCertificateEffectiveOverdue: String,
|
||||
|
||||
|
||||
//车辆
|
||||
val carId: String,
|
||||
val roadLicenseValidityOverdue: String,//道路运输证是否过期
|
||||
val vehicleNum: String,
|
||||
val licenseValidityOverdue: String//驾驶证是否过期
|
||||
)
|
||||
|
||||
|
@ -222,6 +222,13 @@ interface Api {
|
||||
@GET(BASE_URL + "driver/driver/getDriverExpiredDocuments")
|
||||
fun getDriverExpiredDocuments(): Observable<CommonResponseBean<CardInfo>>
|
||||
|
||||
/**
|
||||
*查询车辆证件过期情况
|
||||
* @return Observable<CommonResponseBean<UserDetail>>
|
||||
*/
|
||||
@GET(BASE_URL + "driver/car/getCarExpiredDocumentsByDriverId")
|
||||
fun getCarExpiredDocumentsByDriverId(): Observable<CommonResponseBean<MutableList<CardInfo>>>
|
||||
|
||||
|
||||
/**
|
||||
* 司机认证成为车队长
|
||||
|
@ -10,6 +10,7 @@ import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.oss.OssServiceUtil
|
||||
import com.dahe.gldriver.ui.HomeActivity
|
||||
import com.dahe.gldriver.utils.CommonPopUtils
|
||||
import com.dahe.gldriver.utils.OcrUtils
|
||||
import com.dahe.mylibrary.utils.PickerUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
@ -95,13 +96,14 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
||||
}
|
||||
if (driverInfoBean.licenseName.isNullOrBlank() || driverInfoBean.licensePhotoBackUrl.isNullOrBlank() ||
|
||||
driverInfoBean.licenseNo.isNullOrBlank() || driverInfoBean.licenseType.isNullOrBlank() ||
|
||||
driverInfoBean.licenseEffectiveStart.isNullOrBlank()||driverInfoBean.licenseEffectiveEnd.isNullOrBlank()) {
|
||||
driverInfoBean.licenseEffectiveStart.isNullOrBlank() || driverInfoBean.licenseEffectiveEnd.isNullOrBlank()
|
||||
) {
|
||||
ToastUtils.showToast(mContext, "请完善信息")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (driverInfoBean.licenseName != backLicName) {
|
||||
CommonPopUtils.getInstance().showCommCenterPop(mContext, content = "检测到主副页识别姓名不一致,是否继续上传?") {
|
||||
DataManager.getInstance().setUpDriverLicense(driverInfoBean)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -123,6 +125,9 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
||||
finish()
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.ui.HomeActivity
|
||||
import com.dahe.gldriver.ui.account.AuthSuccActivity
|
||||
import com.dahe.gldriver.utils.CommonPopUtils
|
||||
import com.dahe.gldriver.utils.DicUtils
|
||||
import com.dahe.gldriver.utils.OcrUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
@ -48,6 +49,11 @@ class AuthDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
subMit()
|
||||
}
|
||||
binding.run {
|
||||
tvCarColor.text = "黄色"
|
||||
upDrivingInfoBean.run {
|
||||
plateColorCode = "2"
|
||||
plateColor = "黄色"
|
||||
}
|
||||
ivFront.setOnClickListener {
|
||||
selFrontPic()
|
||||
}
|
||||
@ -180,15 +186,15 @@ class AuthDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
||||
return@ocrDriveing
|
||||
}
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||
upDrivingInfoBean.licenseBackUrl = picPath.picPath//行驶证照片(反面)
|
||||
|
||||
|
||||
result?.data?.back?.data?.let {
|
||||
backLicCarNum = it.licensePlateNumber
|
||||
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||
upDrivingInfoBean.run {
|
||||
inspectionRecord = it.inspectionRecord
|
||||
licenseBackUrl = picPath.picPath//行驶证照片(反面)
|
||||
recordNumber = it.recordNumber
|
||||
barcodeNumber = it.barcodeNumber
|
||||
passengerCapacity = it.passengerCapacity
|
||||
@ -261,12 +267,13 @@ class AuthDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
owner = binding.etOwner.text.trim().toString()
|
||||
useNature = binding.etUseNature.text.trim().toString()
|
||||
}
|
||||
|
||||
if (upDrivingInfoBean.vehicleNum!=backLicCarNum){
|
||||
ToastUtils.showToast(mContext,"主副页车牌号码不一致,请重新上传")
|
||||
return
|
||||
if (upDrivingInfoBean.licenseBackUrl.isNullOrEmpty()){
|
||||
showToast("请完善车辆信息")
|
||||
return@subMit
|
||||
}
|
||||
|
||||
if (upDrivingInfoBean.vehicleNum!=backLicCarNum){
|
||||
CommonPopUtils.getInstance().showCommCenterPop(mContext, content = "检测到主副页识别车牌号内容不一致,是否继续上传?"){
|
||||
DataManager.getInstance().addCar(upDrivingInfoBean)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -290,6 +297,10 @@ class AuthDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -10,6 +10,7 @@ import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.ui.account.AuthSuccActivity
|
||||
import com.dahe.gldriver.utils.CommonPopUtils
|
||||
import com.dahe.gldriver.utils.DicUtils
|
||||
import com.dahe.gldriver.utils.OcrUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
@ -32,6 +33,7 @@ class AuthTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
|
||||
var carId: String = ""
|
||||
var upDrivingInfoBean = UpDrivingInfoBean()
|
||||
var backLicCarNum = ""
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
setStatusBarColor(R.color.white)
|
||||
setTitleBar("实名认证", true)
|
||||
@ -48,7 +50,12 @@ class AuthTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
tvCarType.setOnClickListener {
|
||||
//车辆类型
|
||||
DicUtils.getInstance()
|
||||
.selectDicCarType(mContext, this@AuthTrailerActivity,"重型自卸半挂车",true) { position, item ->
|
||||
.selectDicCarType(
|
||||
mContext,
|
||||
this@AuthTrailerActivity,
|
||||
"重型自卸半挂车",
|
||||
true
|
||||
) { position, item ->
|
||||
var data = item as DiCarColor
|
||||
tvCarType.text = data.dictLabel
|
||||
upDrivingInfoBean.run {
|
||||
@ -142,19 +149,24 @@ class AuthTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
||||
return@ocrDriveing
|
||||
}
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||
upDrivingInfoBean.licenseBackUrl = picPath.picPath//行驶证照片(反面)
|
||||
|
||||
|
||||
result?.data?.back?.data?.let {
|
||||
backLicCarNum = it.licensePlateNumber
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||
upDrivingInfoBean.run {
|
||||
inspectionRecord = it.inspectionRecord
|
||||
recordNumber = it.recordNumber
|
||||
licenseBackUrl = picPath.picPath//行驶证照片(反面)
|
||||
barcodeNumber = it.barcodeNumber
|
||||
passengerCapacity = it.passengerCapacity
|
||||
totalWeight = if (it.totalWeight.contains("kg")) it.totalWeight.split("kg")[0] else ""
|
||||
curbWeight = if (it.curbWeight.contains("kg")) it.curbWeight.split("kg")[0] else ""
|
||||
approvedLoad = if (it.permittedWeight.contains("kg")) it.permittedWeight.split("kg")[0] else ""
|
||||
totalWeight =
|
||||
if (it.totalWeight.contains("kg")) it.totalWeight.split("kg")[0] else ""
|
||||
curbWeight =
|
||||
if (it.curbWeight.contains("kg")) it.curbWeight.split("kg")[0] else ""
|
||||
approvedLoad =
|
||||
if (it.permittedWeight.contains("kg")) it.permittedWeight.split("kg")[0] else ""
|
||||
}
|
||||
|
||||
//车长
|
||||
@ -162,9 +174,12 @@ class AuthTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
var overall = it.overallDimension.replace("mm", "")
|
||||
var splits = overall.split("×")
|
||||
if (splits.size == 3) {
|
||||
upDrivingInfoBean.carLong = if (splits[0].toIntOrNull()!=null) splits[0] else ""
|
||||
upDrivingInfoBean.carWidth = if (splits[1].toIntOrNull()!=null) splits[1] else ""
|
||||
upDrivingInfoBean.carHeight = if (splits[2].toIntOrNull()!=null) splits[2] else ""
|
||||
upDrivingInfoBean.carLong =
|
||||
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
||||
upDrivingInfoBean.carWidth =
|
||||
if (splits[1].toIntOrNull() != null) splits[1] else ""
|
||||
upDrivingInfoBean.carHeight =
|
||||
if (splits[2].toIntOrNull() != null) splits[2] else ""
|
||||
}
|
||||
}
|
||||
if (it.inspectionRecord.length > 19) {
|
||||
@ -203,6 +218,8 @@ class AuthTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
carId = this@AuthTrailerActivity.carId
|
||||
}
|
||||
|
||||
if (upDrivingInfoBean.vehicleNum != backLicCarNum) {
|
||||
CommonPopUtils.getInstance().showCommCenterPop(mContext, content = "检测到主副页识别车牌号内容不一致,是否继续上传?") {
|
||||
DataManager.getInstance().addTrailer(upDrivingInfoBean)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -214,3 +231,7 @@ class AuthTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.oss.OssServiceUtil
|
||||
import com.dahe.gldriver.utils.CommonPopUtils
|
||||
import com.dahe.gldriver.utils.OcrUtils
|
||||
import com.dahe.glex.bean.UserDetail
|
||||
import com.dahe.mylibrary.utils.PickerUtils
|
||||
@ -34,7 +35,7 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
||||
|
||||
|
||||
var driverInfoBean = UserDetail()
|
||||
|
||||
var backLicName = ""
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
setStatusBarColor(R.color.white)
|
||||
setTitleBar("实名认证", true)
|
||||
@ -103,14 +104,25 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
||||
|
||||
binding.run {
|
||||
etName.setText(driverInfoBean.licenseName)
|
||||
backLicName = driverInfoBean.licenseName
|
||||
etId.setText(driverInfoBean.licenseNo)
|
||||
tvStart.text = driverInfoBean.licenseEffectiveStart
|
||||
tvEnd.text = driverInfoBean.licenseEffectiveEnd
|
||||
tvCarType.text = driverInfoBean.licenseType
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, driverInfoBean.licensePhotoFaceUrl, 12, ivFront)
|
||||
.loadRoundImage(
|
||||
mContext,
|
||||
driverInfoBean.licensePhotoFaceUrl,
|
||||
12,
|
||||
ivFront
|
||||
)
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, driverInfoBean.licensePhotoBackUrl, 12, ivBack)
|
||||
.loadRoundImage(
|
||||
mContext,
|
||||
driverInfoBean.licensePhotoBackUrl,
|
||||
12,
|
||||
ivBack
|
||||
)
|
||||
}
|
||||
}
|
||||
}))
|
||||
@ -128,13 +140,14 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
||||
}
|
||||
if (driverInfoBean.licenseName.isNullOrBlank() || driverInfoBean.licensePhotoBackUrl.isNullOrBlank() ||
|
||||
driverInfoBean.licenseNo.isNullOrBlank() || driverInfoBean.licenseType.isNullOrBlank() ||
|
||||
driverInfoBean.licenseEffectiveStart.isNullOrBlank()||driverInfoBean.licenseEffectiveEnd.isNullOrBlank()) {
|
||||
driverInfoBean.licenseEffectiveStart.isNullOrBlank() || driverInfoBean.licenseEffectiveEnd.isNullOrBlank()
|
||||
) {
|
||||
ToastUtils.showToast(mContext, "请完善信息")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (driverInfoBean.licenseName != backLicName) {
|
||||
CommonPopUtils.getInstance()
|
||||
.showCommCenterPop(mContext, content = "检测到主副页识别姓名不一致,是否继续上传?") {
|
||||
DataManager.getInstance().reUpDriverLicense(driverInfoBean)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -146,6 +159,9 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
||||
finish()
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.ui.account.AuthSuccActivity
|
||||
import com.dahe.gldriver.utils.CommonPopUtils
|
||||
import com.dahe.gldriver.utils.DicUtils
|
||||
import com.dahe.gldriver.utils.OcrUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
@ -44,6 +45,11 @@ class EditDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
}
|
||||
binding.run {
|
||||
btnOk.text = "确定"
|
||||
tvCarColor.text = "黄色"
|
||||
upDrivingInfoBean.run {
|
||||
plateColorCode = "2"
|
||||
plateColor = "黄色"
|
||||
}
|
||||
ivFront.setOnClickListener {
|
||||
selFrontPic()
|
||||
}
|
||||
@ -157,6 +163,7 @@ class EditDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
.loadRoundImage(mContext, data.roadLicensePhotoUrl, 12, ivRoadFront)
|
||||
|
||||
etCarNum.setText(data.vehicleNum)
|
||||
backLicCarNum = data.vehicleNum
|
||||
tvCarType.text = data.vehicleType
|
||||
|
||||
etOwner.setText(data.owner)
|
||||
@ -230,21 +237,26 @@ class EditDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
||||
return@ocrDriveing
|
||||
}
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||
upDrivingInfoBean.licenseBackUrl = picPath.picPath//行驶证照片(反面)
|
||||
|
||||
|
||||
result?.data?.back?.data?.let {
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||
backLicCarNum = it.licensePlateNumber
|
||||
upDrivingInfoBean.run {
|
||||
inspectionRecord = it.inspectionRecord
|
||||
recordNumber = it.recordNumber
|
||||
licenseBackUrl = picPath.picPath//行驶证照片(反面)
|
||||
barcodeNumber = it.barcodeNumber
|
||||
passengerCapacity = it.passengerCapacity
|
||||
totalWeight = if (it.totalWeight.contains("kg")) it.totalWeight.split("kg")[0] else ""//总质量
|
||||
curbWeight = if (it.curbWeight.contains("kg")) it.curbWeight.split("kg")[0] else ""//整备质量
|
||||
approvedLoad = if (it.permittedWeight.contains("kg")) it.permittedWeight.split("kg")[0] else ""//核定载质量
|
||||
tractionWeight = if (it.tractionWeight.contains("kg")) it.tractionWeight.split("kg")[0] else ""//牵引总质量
|
||||
totalWeight =
|
||||
if (it.totalWeight.contains("kg")) it.totalWeight.split("kg")[0] else ""//总质量
|
||||
curbWeight =
|
||||
if (it.curbWeight.contains("kg")) it.curbWeight.split("kg")[0] else ""//整备质量
|
||||
approvedLoad =
|
||||
if (it.permittedWeight.contains("kg")) it.permittedWeight.split("kg")[0] else ""//核定载质量
|
||||
tractionWeight =
|
||||
if (it.tractionWeight.contains("kg")) it.tractionWeight.split("kg")[0] else ""//牵引总质量
|
||||
}
|
||||
|
||||
if (it.inspectionRecord.length > 13) {
|
||||
@ -263,9 +275,12 @@ class EditDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
var overall = it.overallDimension.replace("mm", "")
|
||||
var splits = overall.split("×")
|
||||
if (splits.size == 3) {
|
||||
upDrivingInfoBean.carLong = if (splits[0].toIntOrNull()!=null) splits[0] else ""
|
||||
upDrivingInfoBean.carWidth = if (splits[1].toIntOrNull()!=null) splits[1] else ""
|
||||
upDrivingInfoBean.carHeight = if (splits[2].toIntOrNull()!=null) splits[2] else ""
|
||||
upDrivingInfoBean.carLong =
|
||||
if (splits[0].toIntOrNull() != null) splits[0] else ""
|
||||
upDrivingInfoBean.carWidth =
|
||||
if (splits[1].toIntOrNull() != null) splits[1] else ""
|
||||
upDrivingInfoBean.carHeight =
|
||||
if (splits[2].toIntOrNull() != null) splits[2] else ""
|
||||
}
|
||||
}
|
||||
upDrivingInfoBean.run {
|
||||
@ -309,10 +324,10 @@ class EditDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
}
|
||||
|
||||
if (upDrivingInfoBean.vehicleNum != backLicCarNum) {
|
||||
ToastUtils.showToast(mContext,"主副页车牌号码不一致,请重新上传")
|
||||
return
|
||||
}
|
||||
|
||||
CommonPopUtils.getInstance().showCommCenterPop(
|
||||
mContext,
|
||||
content = "检测到主副页识别车牌号内容不一致,是否继续上传?"
|
||||
) {
|
||||
DataManager.getInstance().editCar(upDrivingInfoBean)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -325,6 +340,10 @@ class EditDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@ import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.ui.account.AuthSuccActivity
|
||||
import com.dahe.gldriver.utils.CommonPopUtils
|
||||
import com.dahe.gldriver.utils.DicUtils
|
||||
import com.dahe.gldriver.utils.OcrUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
@ -33,6 +34,7 @@ class EditTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
|
||||
var carId: String = ""
|
||||
var upDrivingInfoBean = UpDrivingInfoBean()
|
||||
var backLicCarNum = ""
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
setStatusBarColor(R.color.white)
|
||||
setTitleBar("实名认证", true)
|
||||
@ -135,6 +137,8 @@ class EditTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
tvCarColor.text = data.trailerPlateColor
|
||||
// tvEnd.text = data.licenseValidity
|
||||
|
||||
backLicCarNum = data.vehicleNum
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -193,15 +197,16 @@ class EditTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
||||
return@ocrDriveing
|
||||
}
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||
upDrivingInfoBean.licenseBackUrl = picPath.picPath//行驶证照片(反面)
|
||||
|
||||
|
||||
result?.data?.back?.data?.let {
|
||||
|
||||
backLicCarNum = it.licensePlateNumber
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||
upDrivingInfoBean.run {
|
||||
inspectionRecord = it.inspectionRecord
|
||||
recordNumber = it.recordNumber
|
||||
licenseBackUrl = picPath.picPath//行驶证照片(反面)
|
||||
barcodeNumber = it.barcodeNumber
|
||||
passengerCapacity = it.passengerCapacity
|
||||
totalWeight =
|
||||
@ -265,6 +270,11 @@ class EditTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
if (this@EditTrailerActivity.carId.toIntOrNull() != null) this@EditTrailerActivity.carId else ""
|
||||
}
|
||||
|
||||
if (upDrivingInfoBean.vehicleNum != backLicCarNum) {
|
||||
CommonPopUtils.getInstance().showCommCenterPop(
|
||||
mContext,
|
||||
content = "检测到主副页识别车牌号内容不一致,是否继续上传?"
|
||||
) {
|
||||
if (this@EditTrailerActivity.carId.toIntOrNull() != null) {
|
||||
DataManager.getInstance().addTrailer(upDrivingInfoBean)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@ -290,6 +300,9 @@ class EditTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -272,6 +272,7 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
||||
}
|
||||
}))
|
||||
|
||||
//司机证件缺失过期提醒
|
||||
val userInfo = SPUtils.instance.getUserInfo(mContext)
|
||||
if (userInfo?.isCarCaptain == "1") {//是否是车队长(0=否,1=是,9=未选择)
|
||||
binding.llNotic.visibility = View.GONE
|
||||
|
@ -12,6 +12,7 @@ import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.ui.account.authperson.EditDrivingActivity
|
||||
import com.dahe.gldriver.ui.account.authperson.EditRoadActivity
|
||||
import com.dahe.gldriver.ui.account.authperson.EditTrailerActivity
|
||||
import com.dahe.glex.bean.CardInfo
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
@ -157,6 +158,25 @@ class CarDetailActivity : BaseActivity<ActivityCarDetailBinding>(), View.OnClick
|
||||
initViewByData(t.data)
|
||||
}
|
||||
}))
|
||||
|
||||
//判断车辆证件是否过期
|
||||
DataManager.getInstance().getCarExpiredDocumentsByDriverId()
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<MutableList<CardInfo>>() {
|
||||
override fun onSuccess(t: CommonResponseBean<MutableList<CardInfo>>) {
|
||||
super.onSuccess(t)
|
||||
if (t.data != null && t.data.size > 0) {
|
||||
t.data.find { it.carId == carId }.let {
|
||||
binding.run {
|
||||
tvNotic1.visibility =
|
||||
if (it?.licenseValidityOverdue == "1") View.VISIBLE else View.GONE
|
||||
tvNotic3.visibility =
|
||||
if (it?.roadLicenseValidityOverdue == "1") View.VISIBLE else View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
private fun initViewByData(data: CarDetail) {
|
||||
|
@ -127,6 +127,26 @@
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/tvNotic1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/ivIcon"
|
||||
android:layout_marginLeft="@dimen/dp_70"
|
||||
android:layout_toRightOf="@+id/ivIcon"
|
||||
android:background="#FFEDE5"
|
||||
android:maxLines="1"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingTop="@dimen/dp_3"
|
||||
android:paddingRight="@dimen/dp_6"
|
||||
android:paddingBottom="@dimen/dp_3"
|
||||
android:singleLine="true"
|
||||
android:text="证件即将过期"
|
||||
android:textColor="@color/main_red"
|
||||
android:textSize="@dimen/dp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInfo"
|
||||
android:layout_width="wrap_content"
|
||||
@ -395,6 +415,26 @@
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/tvNotic3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/ivIcon3"
|
||||
android:layout_marginLeft="@dimen/dp_130"
|
||||
android:layout_toRightOf="@+id/ivIcon3"
|
||||
android:background="#FFEDE5"
|
||||
android:maxLines="1"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingTop="@dimen/dp_3"
|
||||
android:paddingRight="@dimen/dp_6"
|
||||
android:paddingBottom="@dimen/dp_3"
|
||||
android:singleLine="true"
|
||||
android:text="证件即将过期"
|
||||
android:textColor="@color/main_red"
|
||||
android:textSize="@dimen/dp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvQualiInfo"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:background="@color/white"
|
||||
@ -31,6 +31,13 @@
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCarNum"
|
||||
android:layout_width="wrap_content"
|
||||
@ -39,6 +46,24 @@
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_18" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNotic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_6"
|
||||
android:background="#FFEDE5"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingTop="@dimen/dp_3"
|
||||
android:paddingRight="@dimen/dp_6"
|
||||
android:paddingBottom="@dimen/dp_3"
|
||||
android:text="证件即将过期"
|
||||
android:textColor="@color/main_red"
|
||||
android:textSize="@dimen/dp_10"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -58,11 +83,11 @@
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:gravity="center"
|
||||
android:id="@+id/tvCarLen"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="16米"
|
||||
@ -75,9 +100,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="right"
|
||||
tools:text="30吨"
|
||||
android:textColor="@color/color_9"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="30吨" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user