Правки проверки руководителя и бухгалтера Организации

This commit is contained in:
AnboevDD 2025-01-30 16:22:00 +05:00
parent e1f7b4b42f
commit 8333c02b42
3 changed files with 14 additions and 7 deletions

View File

@ -19,7 +19,7 @@ var odataClient = odata.Client;
// .Filter("Department/BusinessUnit/Name eq 'Бакырчикское горнодобывающее предприятие ТОО' and Status eq 'Active'")
// .FindEntriesAsync();
//var responsePath = @"C:\ОШС_logs_backup\2025_01_22\2025_01_22_03_03_08_response.json";
//var responsePath = @"C:\Users\anboevdd\Desktop\other\test_response.json";
//var resp = File.ReadAllText(responsePath);
//var arr = JArray.Parse(resp);

View File

@ -15,13 +15,13 @@ namespace JSONParser.QDocWrapper
//private const string Login = "Administrator";
//private const string Password = "11111";
//private const string IntegrationServiceUrl = "https://astsrvqtest.solidcore-resources.com/Integration/odata/";
//private const string Login = "Administrator";
//private const string Password = "D3cTXol8Se";
private const string IntegrationServiceUrl = "https://qdoc.solidcore-resources.com/Integration/odata/";
private const string IntegrationServiceUrl = "https://astsrvqtest.solidcore-resources.com/Integration/odata/";
private const string Login = "Administrator";
private const string Password = "MQVuEw9avO";
private const string Password = "D3cTXol8Se";
//private const string IntegrationServiceUrl = "https://qdoc.solidcore-resources.com/Integration/odata/";
//private const string Login = "Administrator";
//private const string Password = "MQVuEw9avO";
#endif
#if RELEASE

View File

@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.ConstrainedExecution;
using System.Text;
using System.Threading.Tasks;
@ -106,8 +107,11 @@ namespace JSONParser.Structure
dynamic bu = await client
.For("IBusinessUnits")
.Filter($"ExternalId eq '{Sid}'")
.Expand($"CEO")
.FindEntryAsync();
string ceo = bu["CEO"]["ExternalId"];
if (emp != null && ceo.Equals(NCEO.Sid)) return bu["Id"];
if (emp != null && bu != null)
{
@ -139,8 +143,11 @@ namespace JSONParser.Structure
dynamic bu = await client
.For("IBusinessUnits")
.Filter($"ExternalId eq '{Sid}'")
.Expand("CAO")
.FindEntryAsync();
string account = bu["CAO"]["ExternalId"];
if (emp != null && account.Equals(Account.Sid)) return bu["Id"];
if (emp != null && bu != null)
{