| | |
| | | /// |
| | | /// </summary> |
| | | public CustomerService(SysCacheService cacheService, CustomerManagerS managerS,SqlSugarRepository<FBS_Customer> repository |
| | | , SqlSugarRepository<FBS_EnterpriseType> fbsenrep,IMapper mapper ) |
| | | , SqlSugarRepository<FBS_EnterpriseType> fbsenrep,IMapper mapper,SqlSugarRepository<FBS_ExRole> exroles , SqlSugarRepository<FBS_CusExtend> cusrep) |
| | | { |
| | | _sysCacheService= cacheService; |
| | | _customerManager = managerS; |
| | | _fBS_CustomerRep = repository; |
| | | _fBS_EnterpriseTypeRep = fbsenrep; |
| | | _fBS_ExRoleRep = exroles; |
| | | _fBS_CusExtendRep = cusrep; |
| | | _mapper = mapper; |
| | | } |
| | | |
| | |
| | | [AllowAnonymous] |
| | | public async Task<List<EnterpriseTypeVM>> EnterpriseTypes() |
| | | { |
| | | return await _fBS_EnterpriseTypeRep.AsQueryable().Select<EnterpriseTypeVM>().ToTreeAsync(x=>x.Child,x=>x.ParentId,null,x=>x.Id); |
| | | return await _fBS_EnterpriseTypeRep.AsQueryable().Select<EnterpriseTypeVM>().ToTreeAsync(x=>x.Child,x=>x.ParentId,0,x=>x.Id); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | throw Oops.Oh("交易主体不存在"); |
| | | } |
| | | |
| | | if(user.CoutomerExRols.Any(x=>x.ExRole.Code==cusExtend.TransactionCode&& x.HasFlsh==true)) |
| | | if(user.CoutomerExRols?.Any(x=>x.ExRole.Code==cusExtend.TransactionCode&& x.HasFlsh==true)==true) |
| | | { |
| | | throw Oops.Oh("用户已经注册了该主体"); |
| | | } |
| | |
| | | tab.RegisteredCapital = tab.RegisteredCapital; |
| | | tab.Residence = tab.Residence; |
| | | tab.MainBusiness = InParam.MainBusiness; |
| | | tab.EnterpriseType = InParam.EnterpriseType; |
| | | |
| | | tab.EnterpriseName = InParam.EnterpriseName; |
| | | tab.BusinessLicense = InParam.BusinessLicense; |
| | | //重新审核? |
| | | tab.steps = CusExtendStep.Change; |
| | | } |
| | | |
| | | tab.EnterpriseType = InParam.EnterpriseType; |
| | | |
| | | //联系电话 |
| | | tab.EnterprisePhone = InParam.EnterprisePhone; |
| | |
| | | tab.OperatorName = InParam.OperatorName; |
| | | tab.OperatorPhone = InParam.OperatorPhone; |
| | | } |
| | | |
| | | |
| | | return await _fBS_CusExtendRep.UpdateAsync(tab); |
| | | |