diff --git a/Back/Back.csproj b/Back/Back.csproj index fd97cd7..899d7e4 100644 --- a/Back/Back.csproj +++ b/Back/Back.csproj @@ -36,7 +36,7 @@ - ..\..\Dlls\Service.dll + ..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll diff --git a/Back/Controllers/TaxPayerController.cs b/Back/Controllers/TaxPayerController.cs index 71edce1..c7ee5a3 100644 --- a/Back/Controllers/TaxPayerController.cs +++ b/Back/Controllers/TaxPayerController.cs @@ -87,11 +87,11 @@ namespace Back.Controllers public async Task> CheckAuth() { - //var claim = HttpContext.User.Claims.First(c => c.Type == "UserID"); - //var UserID = claim.Value; - //var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID)); - // return Ok(await _actionTaxPayer.login(user.RolUsers.First().CompanyID)); - return Ok(true); + var claim = HttpContext.User.Claims.First(c => c.Type == "UserID"); + var UserID = claim.Value; + var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID)); + return Ok(await _actionTaxPayer.login(user.RolUsers.First().CompanyID)); + // return Ok(true); return BadRequest(); @@ -103,8 +103,8 @@ namespace Back.Controllers var claim = HttpContext.User.Claims.First(c => c.Type == "UserID"); var UserID = claim.Value; var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID)); - //if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID)) - // return BadRequest(new List { "خطا در احراز هویت سازمان مالیاتی" }); + if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID)) + return BadRequest(new List { "خطا در احراز هویت سازمان مالیاتی" }); var result = await _servTaxPayer.GetInvoice(user.RolUsers.First().CompanyID, InvoiceID); if (result == null) @@ -497,8 +497,8 @@ namespace Back.Controllers if (string.IsNullOrEmpty(item.uId)) return BadRequest(new List { "کد پیگیری یافت نشد" }); - //if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID)) - // return BadRequest(new List { "خطا در احراز هویت سازمان مالیاتی" }); + if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID)) + return BadRequest(new List { "خطا در احراز هویت سازمان مالیاتی" }); DataInSendTaxDto desData = new DataInSendTaxDto(); if (item.SentStatus == SentStatus.Send diff --git a/Back/Services/ActionTaxPayer.cs b/Back/Services/ActionTaxPayer.cs index 6cb0064..2e9c7e9 100644 --- a/Back/Services/ActionTaxPayer.cs +++ b/Back/Services/ActionTaxPayer.cs @@ -22,24 +22,24 @@ namespace Back.Services } public string GenerateTaxid(string FactorNo, string InvoiceDate) { - return "testTaxid"; + // return "testTaxid"; return TaxApiService.Instance.TaxIdGenerator.GenerateTaxId(_UniqueMemory, Convert.ToInt64(FactorNo), InvoiceDate.ToMiladi()); } public async Task GetResultByUid(int CompanyID, string uid) { - return new InquiryResultModel("18084a18-1eb4-41cd-8bd3-2cad73c45398", "0a4a4ab2-8047-4c31-b765-456ddf0e9c53", "SUCCESS", - new DataInSendTaxDto() - { - error=new List() - { - new MessageInSendTaxDto() - { - code="21001",message="یک خطای تست" - } - } - } - , "receive_invoice_confirm", "A2FFKZ"); + //return new InquiryResultModel("18084a18-1eb4-41cd-8bd3-2cad73c45398", "0a4a4ab2-8047-4c31-b765-456ddf0e9c53", "SUCCESS", + // new DataInSendTaxDto() + // { + // error=new List() + // { + // new MessageInSendTaxDto() + // { + // code="21001",message="یک خطای تست" + // } + // } + // } + // , "receive_invoice_confirm", "A2FFKZ"); if (!await login(CompanyID)) return null; var uidAndFiscalId = new UidAndFiscalId(uid, _UniqueMemory); @@ -50,11 +50,11 @@ namespace Back.Services } public async Task> SendInvoice(int CompanyID,InvoiceHeaderDto header, List InvoiceBody, PaymentDto payment) { - return new TaxCollectData.Library.Dto.HttpResponse - ( body: new AsyncResponseModel( - 1702299112 - ,new HashSet(new List { new PacketResponse("5d0c7198-e2fd-4cc1-8802-fe498d6ccf73", "a70444a4-1810-4cea-8bcc-7acb4bc75645", null,null)}) - ,new List()), 200); + //return new TaxCollectData.Library.Dto.HttpResponse + // ( body: new AsyncResponseModel( + // 1702299112 + // ,new HashSet(new List { new PacketResponse("5d0c7198-e2fd-4cc1-8802-fe498d6ccf73", "a70444a4-1810-4cea-8bcc-7acb4bc75645", null,null)}) + // ,new List()), 200); if (!await login(CompanyID)) return null; diff --git a/TaxPayerFull/Pages/BlogDetails.razor b/TaxPayerFull/Pages/BlogDetails.razor index 9cb7c12..b03d75c 100644 --- a/TaxPayerFull/Pages/BlogDetails.razor +++ b/TaxPayerFull/Pages/BlogDetails.razor @@ -64,10 +64,9 @@
- -

- @Item?.Text -

+ + @((MarkupString)Item?.Text) +
@@ -133,11 +132,13 @@ public List collectionitem { get; set; } = new List(); public BlogDtoFull? Item { get; set; } + protected override async Task OnParametersSetAsync() { if (ItemID != null) { Item = await GetItems(); + // Item.Text = "

RTHH

"; if (Item==null) Navigation.NavigateTo("/"); diff --git a/TaxPayerFull/Program.cs b/TaxPayerFull/Program.cs index ea0270a..670070e 100644 --- a/TaxPayerFull/Program.cs +++ b/TaxPayerFull/Program.cs @@ -37,10 +37,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO() //builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") }); //Home -builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") }); +//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") }); //farzan -//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") }); +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") }); CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");