Commit 8274592a authored by yinjiacheng's avatar yinjiacheng

fix SHQBD-182 SHQBD-183 SHQBD-192 企业认证流程有历史提交数据时,如果修改营业执照信息提交页则身份信息提交页回显清空

parent e744c1a9
...@@ -13,7 +13,7 @@ class LifeAccountMerchantAuthData { ...@@ -13,7 +13,7 @@ class LifeAccountMerchantAuthData {
var registrationCode: String? = null var registrationCode: String? = null
var authRecordId: Long? = null var authRecordId: Long? = null
var lifeAccountId: Long? = null var lifeAccountId: Long? = null
var isRecoverAuthProcess: Boolean = false // 是否为恢复认证流程 var isAuthInfoModify: Boolean = false // 认证信息是否修改
// 营业执照相关信息 // 营业执照相关信息
var type: String? = null var type: String? = null
...@@ -29,4 +29,4 @@ class LifeAccountMerchantAuthData { ...@@ -29,4 +29,4 @@ class LifeAccountMerchantAuthData {
var form: String? = null var form: String? = null
var funding: String? = null var funding: String? = null
var date_issue: String? = null var date_issue: String? = null
} }
\ No newline at end of file
...@@ -261,9 +261,10 @@ class LifeAccountBusinessLicenseAuthFragment : ...@@ -261,9 +261,10 @@ class LifeAccountBusinessLicenseAuthFragment :
// 设置上传区域可点击 // 设置上传区域可点击
viewBinding.clBusinessLicenseUpload.isEnabled = true viewBinding.clBusinessLicenseUpload.isEnabled = true
LifeAccountAuthDataManager.merchantAuthData.isBusinessLicenseUpload = false LifeAccountAuthDataManager.merchantAuthData.isBusinessLicenseUpload = false
LifeAccountAuthDataManager.merchantAuthData.registrationName = "" LifeAccountAuthDataManager.merchantAuthData.registrationName = null
LifeAccountAuthDataManager.merchantAuthData.registrationCode = "" LifeAccountAuthDataManager.merchantAuthData.registrationCode = null
// 标识修改
LifeAccountAuthDataManager.merchantAuthData.isAuthInfoModify = true
} }
override fun onTaskStart() { override fun onTaskStart() {
...@@ -312,6 +313,8 @@ class LifeAccountBusinessLicenseAuthFragment : ...@@ -312,6 +313,8 @@ class LifeAccountBusinessLicenseAuthFragment :
} }
override fun onTextClear(from: LifeAccountAuthBusinessInfoEditView) { override fun onTextClear(from: LifeAccountAuthBusinessInfoEditView) {
// 标识修改
LifeAccountAuthDataManager.merchantAuthData.isAuthInfoModify = true
if (from == viewBinding.evRegistrationName) { if (from == viewBinding.evRegistrationName) {
LifeAccountAuthDataManager.merchantAuthData.registrationName = "" LifeAccountAuthDataManager.merchantAuthData.registrationName = ""
} else { } else {
...@@ -323,8 +326,15 @@ class LifeAccountBusinessLicenseAuthFragment : ...@@ -323,8 +326,15 @@ class LifeAccountBusinessLicenseAuthFragment :
override fun onTextChange(from: LifeAccountAuthBusinessInfoEditView, text: String) { override fun onTextChange(from: LifeAccountAuthBusinessInfoEditView, text: String) {
if (from == viewBinding.evRegistrationName) { if (from == viewBinding.evRegistrationName) {
// 标识修改
if (text != LifeAccountAuthDataManager.merchantAuthData.registrationName) {
LifeAccountAuthDataManager.merchantAuthData.isAuthInfoModify = true
}
LifeAccountAuthDataManager.merchantAuthData.registrationName = text LifeAccountAuthDataManager.merchantAuthData.registrationName = text
} else { } else {
if (text != LifeAccountAuthDataManager.merchantAuthData.registrationCode) {
LifeAccountAuthDataManager.merchantAuthData.isAuthInfoModify = true
}
LifeAccountAuthDataManager.merchantAuthData.registrationCode = text LifeAccountAuthDataManager.merchantAuthData.registrationCode = text
} }
// 检查下一步条件 // 检查下一步条件
......
...@@ -3,8 +3,6 @@ package com.yidian.shenghuoquan.newscontent.ui.auth ...@@ -3,8 +3,6 @@ package com.yidian.shenghuoquan.newscontent.ui.auth
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import com.orhanobut.hawk.Hawk
import com.yidian.common.HawkConfig
import com.yidian.common.XRouterPathConstants import com.yidian.common.XRouterPathConstants
import com.yidian.common.base.BaseActivity import com.yidian.common.base.BaseActivity
import com.yidian.shenghuoquan.newscontent.R import com.yidian.shenghuoquan.newscontent.R
...@@ -307,16 +305,36 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp ...@@ -307,16 +305,36 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
LifeAccountAuthDataManager.merchantAuthData.authRecordId = result?.enterprise_auth_record_id LifeAccountAuthDataManager.merchantAuthData.authRecordId = result?.enterprise_auth_record_id
viewBind.pvAuthProcess.setProcess(++viewBind.pvAuthProcess.curProcess) viewBind.pvAuthProcess.setProcess(++viewBind.pvAuthProcess.curProcess)
viewBind.svMerchantType.enableSelect(false) viewBind.svMerchantType.enableSelect(false)
// 向身份信息fragment传参 if (LifeAccountAuthDataManager.merchantAuthData.isAuthInfoModify) {
val fragment = fragmentList[viewBind.pvAuthProcess.curProcess] // 认证信息修改 清空第二步回显数据
val bundle = Bundle() LifeAccountAuthDataManager.merchantAuthData.isAuthInfoModify = false
bundle.putInt( LifeAccountAuthDataManager.personalAuthData.isIDCardPortraitFaceUpload = false
Constant.TYPE_AUTH, LifeAccountAuthDataManager.personalAuthData.isIDCardNationalEmblemFaceUpload = false
LifeAccountAuthDataManager.merchantAuthData.merchantType LifeAccountAuthDataManager.personalAuthData.realName = null
) LifeAccountAuthDataManager.personalAuthData.idCardNum = null
bundle.putSerializable(LifeAccountIDCardAuthFragment.EXTRA_AUTH_DATA, authData) LifeAccountAuthDataManager.personalAuthData.isFaceAuthPass = false
fragment.arguments = bundle LifeAccountAuthDataManager.personalAuthData.phoneNum = null
switchFragment(fragment) fragmentList.removeAt(viewBind.pvAuthProcess.curProcess)
val fragment = LifeAccountIDCardAuthFragment()
fragmentList.add(viewBind.pvAuthProcess.curProcess, fragment)
val bundle = Bundle()
bundle.putInt(
Constant.TYPE_AUTH,
LifeAccountAuthDataManager.merchantAuthData.merchantType
)
fragment.arguments = bundle
} else {
// 向身份信息fragment传参用于回显
val fragment = fragmentList[viewBind.pvAuthProcess.curProcess]
val bundle = Bundle()
bundle.putInt(
Constant.TYPE_AUTH,
LifeAccountAuthDataManager.merchantAuthData.merchantType
)
bundle.putSerializable(LifeAccountIDCardAuthFragment.EXTRA_AUTH_DATA, authData)
fragment.arguments = bundle
}
switchFragment(fragmentList[viewBind.pvAuthProcess.curProcess])
// 检查下一步条件 // 检查下一步条件
checkNextCondition() checkNextCondition()
} }
......
...@@ -685,6 +685,9 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth ...@@ -685,6 +685,9 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
Pair("liveness_type", Constant.TYPE_MEG_LIVE) Pair("liveness_type", Constant.TYPE_MEG_LIVE)
) )
) )
ApiService.authLiveIdentity(this)
LifeAccountAuthDataManager.personalAuthData.isFaceAuthPass = true
(activity as LifeAccountPersonalAuthActivity).checkNextCondition()
} }
override fun authPersonCheckFailure(code: Int?, message: String?) { override fun authPersonCheckFailure(code: Int?, message: String?) {
...@@ -833,10 +836,34 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth ...@@ -833,10 +836,34 @@ class LifeAccountIDCardAuthFragment : BaseFragment<FragmentLifeAccountIdCardAuth
Pair("liveness_type", Constant.TYPE_MEG_LIVE) Pair("liveness_type", Constant.TYPE_MEG_LIVE)
) )
) )
ApiService.authEnterpriseLiveIdentity(
this,
hashMapOf(
Pair(
"record_id",
LifeAccountAuthDataManager.merchantAuthData.authRecordId.toString()
)
)
)
LifeAccountAuthDataManager.personalAuthData.isFaceAuthPass = true
// 检查下一步条件
(activity as LifeAccountEnterpriseAuthActivity).checkNextCondition()
} }
override fun authIndividualBusinessIdentityCommitFailure(message: String?) { override fun authIndividualBusinessIdentityCommitFailure(message: String?) {
// 展示输入框下错误提示
when (message) {
Constant.ERROR_MESSAGE_REAL_NAME -> {
viewBinding.evRealName.showErrorTips(
resources.getText(R.string.id_card_name_error_tips) as String
)
viewBinding.evRealName.highLightEditContent()
}
Constant.ERROR_MESSAGE_ID_CARD_NUMBER -> {
viewBinding.evIdCardNumber.showErrorTips(resources.getText(R.string.id_card_number_error_tips) as String)
viewBinding.evIdCardNumber.highLightEditContent()
}
}
} }
override fun authEnterpriseLiveIdentitySuccess() { override fun authEnterpriseLiveIdentitySuccess() {
......
...@@ -330,8 +330,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), ...@@ -330,8 +330,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
override fun onLifeAccountSelect(data: LifeAccountItemBean.Response) { override fun onLifeAccountSelect(data: LifeAccountItemBean.Response) {
// 用户切换主体 更新当前生活号信息 // 用户切换主体 更新当前生活号信息
curLifeAccount = data curLifeAccount = data
// 更新本地存储的生活号id
StorageUtil.putLifeAccountId(data.life_account_id)
viewBind.rlRefresh.autoRefresh() viewBind.rlRefresh.autoRefresh()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment