Add supply contract project import
This commit is contained in:
@ -62,6 +62,7 @@ namespace Hcs.TestApp
|
||||
//houseManagementScenario.ImportMeteringDeviceData();
|
||||
//houseManagementScenario.ImportNotificationData();
|
||||
//houseManagementScenario.ImportSupplyResourceContractData();
|
||||
//houseManagementScenario.ImportSupplyResourceContractProject();
|
||||
|
||||
//nsiScenario.ExportDataProviderNsiItem1();
|
||||
//nsiScenario.ExportDataProviderNsiItem51();
|
||||
|
||||
@ -365,5 +365,104 @@ namespace Hcs.TestApp.Scenario
|
||||
var result = client.HouseManagement.ImportSupplyResourceContractDataAsync(payload).Result;
|
||||
Console.WriteLine("Scenario execution " + (result != null ? "succeeded" : "failed"));
|
||||
}
|
||||
|
||||
internal void ImportSupplyResourceContractProject()
|
||||
{
|
||||
var signingDate = new DateTime(2017, 01, 01);
|
||||
var effectiveDate = new DateTime(2017, 01, 01);
|
||||
var comptetionDate = new DateTime(2078, 12, 31);
|
||||
|
||||
var contractSubjectGuid = Guid.NewGuid().ToString();
|
||||
|
||||
var payload = new ImportSupplyResourceContractProjectPayload()
|
||||
{
|
||||
isContract = false,
|
||||
contractNumber = "88005553535",
|
||||
signingDate = signingDate,
|
||||
effectiveDate = effectiveDate,
|
||||
automaticRollOverOneYear = true,
|
||||
comptetionDate = comptetionDate,
|
||||
period = new SupplyResourceContractProjectTypePeriod()
|
||||
{
|
||||
Start = new SupplyResourceContractProjectTypePeriodStart()
|
||||
{
|
||||
StartDate = 20
|
||||
},
|
||||
End = new SupplyResourceContractProjectTypePeriodEnd()
|
||||
{
|
||||
EndDate = 25
|
||||
}
|
||||
},
|
||||
counterparty = true,
|
||||
isPlannedVolume = false,
|
||||
contractSubject = [new SupplyResourceContractProjectTypeContractSubject()
|
||||
{
|
||||
TransportGUID = contractSubjectGuid,
|
||||
ServiceType = new ContractSubjectTypeServiceType()
|
||||
{
|
||||
Code = Registry3.Element6.Code,
|
||||
GUID = Registry3.Element6.GUID
|
||||
},
|
||||
MunicipalResource = new ContractSubjectTypeMunicipalResource()
|
||||
{
|
||||
Code = Registry239.Element4.Code,
|
||||
GUID = Registry239.Element4.GUID
|
||||
},
|
||||
StartSupplyDate = effectiveDate,
|
||||
EndSupplyDate = comptetionDate,
|
||||
EndSupplyDateSpecified = true
|
||||
}],
|
||||
specifyingQualityIndicators = SupplyResourceContractProjectTypeSpecifyingQualityIndicators.D,
|
||||
quality = [new SupplyResourceContractProjectTypeQuality()
|
||||
{
|
||||
PairKey = contractSubjectGuid,
|
||||
QualityIndicator = new nsiRef()
|
||||
{
|
||||
Code = Registry276.Element4.Code,
|
||||
GUID = Registry276.Element4.GUID
|
||||
},
|
||||
IndicatorValue = new SupplyResourceContractProjectTypeQualityIndicatorValue()
|
||||
{
|
||||
Items = [9.76m, 10m, "214"],
|
||||
ItemsElementName = [ItemsChoiceType10.StartRange, ItemsChoiceType10.EndRange, ItemsChoiceType10.OKEI]
|
||||
}
|
||||
}, new SupplyResourceContractProjectTypeQuality()
|
||||
{
|
||||
PairKey = contractSubjectGuid,
|
||||
QualityIndicator = new nsiRef()
|
||||
{
|
||||
Code = Registry276.Element10.Code,
|
||||
GUID = Registry276.Element10.GUID
|
||||
},
|
||||
IndicatorValue = new SupplyResourceContractProjectTypeQualityIndicatorValue()
|
||||
{
|
||||
Items = [0.05m, 0.3m, "298"],
|
||||
ItemsElementName = [ItemsChoiceType10.StartRange, ItemsChoiceType10.EndRange, ItemsChoiceType10.OKEI]
|
||||
}
|
||||
}],
|
||||
billingDate = new SupplyResourceContractProjectTypeBillingDate()
|
||||
{
|
||||
Date = 1,
|
||||
DateType = SupplyResourceContractProjectTypeBillingDateDateType.N
|
||||
},
|
||||
paymentDate = new SupplyResourceContractProjectTypePaymentDate()
|
||||
{
|
||||
Date = 10,
|
||||
DateType = SupplyResourceContractProjectTypePaymentDateDateType.N
|
||||
},
|
||||
meteringDeviceInformation = true,
|
||||
volumeDepends = false,
|
||||
oneTimePayment = false,
|
||||
// TODO: Пока не понятно, откуда берется NormGUID
|
||||
//norm = [new SupplyResourceContractTypeNorm()
|
||||
//{
|
||||
// PairKey = contractSubjectGuid,
|
||||
// Items = [true],
|
||||
// NormGUID = ""
|
||||
//}]
|
||||
};
|
||||
var result = client.HouseManagement.ImportSupplyResourceContractProjectAsync(payload).Result;
|
||||
Console.WriteLine("Scenario execution " + (result != null ? "succeeded" : "failed"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user