| | |
| | | throw Oops.Oh("没有完成信息录入"); |
| | | } |
| | | |
| | | |
| | | bool isChangeData = false; |
| | | if (tab.steps== CusExtendStep.Change) |
| | | { |
| | | isChangeData = true; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | //重新审核? |
| | | tab.steps = CusExtendStep.Change; |
| | | } |
| | | if (tab.EnterpriseType != InParam.EnterpriseType) |
| | | { |
| | | tab.EnterpriseType = InParam.EnterpriseType; |
| | | tab.steps = CusExtendStep.Change; |
| | | } |
| | | |
| | | //联系电话 |
| | | tab.EnterprisePhone = InParam.EnterprisePhone; |
| | | tab.EnterpriseEmail = InParam.EnterpriseEmail; |
| | | //银行是否需要修改 |
| | | |
| | | if (tab.BankAccount != InParam.BankAccount) |
| | | { |
| | | //联系电话 |
| | | tab.BankAccount = InParam.BankAccount; |
| | | tab.steps = CusExtendStep.Change; |
| | | |
| | | } |
| | | if (tab.BankName != InParam.BankName) |
| | | { |
| | | tab.BankName = InParam.BankName; |
| | | tab.steps = CusExtendStep.Change; |
| | | } |
| | | //银行是否需要修改 |
| | | //tab.BankAccount = InParam.BankAccount; |
| | | //tab.BankName = InParam.BankName; |
| | | |
| | | // 经办人 |
| | | if (tab.OperatorIdCard != InParam.OperatorIdCard) |
| | |
| | | } |
| | | |
| | | |
| | | return await _fBS_CusExtendRep.UpdateAsync(tab); |
| | | await _fBS_CusExtendRep.AsTenant().BeginTranAsync(); |
| | | try |
| | | { |
| | | if((!isChangeData)&&tab.steps== CusExtendStep.Change) |
| | | { |
| | | //是更改,需要工改cer的值 |
| | | var exrolerep= await _fBS_CustomerExRoleRep.GetFirstAsync(x=>x.ExRoleId== rols.Id&&x.CustomerId==tab.CustomerId); |
| | | if(exrolerep!=null) |
| | | { |
| | | if (exrolerep.HasFlsh != false) |
| | | { |
| | | exrolerep.HasFlsh = false; |
| | | |
| | | //改变状态 |
| | | await _fBS_CustomerExRoleRep.UpdateAsync(exrolerep); |
| | | }; |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | await _fBS_CustomerExRoleRep.InsertAsync(new FBS_CoutomerExRole |
| | | { |
| | | CustomerId = tab.CustomerId, |
| | | ExRoleId = rols.Id, |
| | | HasFlsh = false |
| | | |
| | | }); |
| | | } |
| | | |
| | | } |
| | | await _fBS_CusExtendRep.UpdateAsync(tab); |
| | | await _fBS_CusExtendRep.AsTenant().CommitTranAsync(); |
| | | |
| | | } |
| | | catch (Exception) |
| | | { |
| | | await _fBS_CusExtendRep.AsTenant().RollbackTranAsync(); |
| | | throw; |
| | | } |
| | | |
| | | return true; |
| | | |
| | | } |
| | | |