Add required fields

This commit is contained in:
2025-09-03 17:44:15 +09:00
parent 3bc12bfd75
commit 67d4ce0873
3 changed files with 50 additions and 4 deletions

View File

@ -41,9 +41,15 @@ namespace Hcs.Client.Api.Payload.HouseManagement
/// </summary>
public nsiRef contractBase;
// TODO: DateDetails
/// <summary>
/// Сведения о сроках
/// </summary>
public DateDetailsType dateDetailsType;
// TODO: ContractAttachment
/// <summary>
/// Договор на управление и приложения
/// </summary>
public ContractTypeAgreementAttachment[] contractAttachment;
// TODO: AgreementAttachment

View File

@ -68,7 +68,9 @@ namespace Hcs.Client.Api.Request.HouseManagement
SigningDate = payload.signingDate,
EffectiveDate = payload.effectiveDate,
PlanDateComptetion = payload.planDateComptetion,
ContractBase = payload.contractBase
ContractBase = payload.contractBase,
DateDetails = payload.dateDetailsType,
ContractAttachment = payload.contractAttachment
};
return contract;

View File

@ -102,7 +102,45 @@ namespace Hcs.TestApp.Scenario
signingDate = signingDate,
effectiveDate = effectiveDate,
planDateComptetion = planComptetionDate,
contractBase = Registry58.Element8
contractBase = Registry58.Element8,
dateDetailsType = new DateDetailsType()
{
PeriodMetering = new DateDetailsTypePeriodMetering()
{
StartDate = new DeviceMeteringsDaySelectionType()
{
Item = 20,
IsNextMonth = true
},
EndDate = new DeviceMeteringsDaySelectionType()
{
Item = 25,
IsNextMonth = true
}
},
PaymentDocumentInterval = new DateDetailsTypePaymentDocumentInterval()
{
Item = true,
Item1 = true,
Item1ElementName = Item1ChoiceType4.NextMounth
},
PaymentInterval = new DateDetailsTypePaymentInterval()
{
Item = true,
Item1 = true,
Item1ElementName = Item1ChoiceType5.NextMounth
}
},
contractAttachment = [new ContractTypeAgreementAttachment()
{
Name = "Наименование вложения",
Description = "Описание вложения",
Attachment = new Attachment()
{
AttachmentGUID = Guid.NewGuid().ToString()
},
AttachmentHASH = ""
}]
};
var result = client.HouseManagement.ImportContractDataAsync(payload).Result;
Console.WriteLine("Scenario execution " + (result != null ? "succeeded" : "failed"));