Правки проверки руководителя и бухгалтера Организации
This commit is contained in:
parent
e1f7b4b42f
commit
8333c02b42
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user