Add new Hcs.Broker to communicate with ГИС ЖКХ via CryptoPro LibCore
This commit is contained in:
@ -0,0 +1,32 @@
|
||||
using Hcs.Service.Async.Bills;
|
||||
|
||||
namespace Hcs.Broker.Api.Type
|
||||
{
|
||||
// http://open-gkh.ru/Bills/PDServiceChargeType/MunicipalService/Consumption/Volume/determiningMethod.html
|
||||
public enum MunicipalServiceVolumeDeterminingMethod
|
||||
{
|
||||
Norm,
|
||||
MeteringDevice,
|
||||
Other
|
||||
}
|
||||
|
||||
internal static class MunicipalServiceVolumeDeterminingMethodExtensions
|
||||
{
|
||||
internal static PDServiceChargeTypeMunicipalServiceVolumeDeterminingMethod ToServiceType(this MunicipalServiceVolumeDeterminingMethod type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MunicipalServiceVolumeDeterminingMethod.Norm:
|
||||
return PDServiceChargeTypeMunicipalServiceVolumeDeterminingMethod.N;
|
||||
|
||||
case MunicipalServiceVolumeDeterminingMethod.MeteringDevice:
|
||||
return PDServiceChargeTypeMunicipalServiceVolumeDeterminingMethod.M;
|
||||
|
||||
case MunicipalServiceVolumeDeterminingMethod.Other:
|
||||
return PDServiceChargeTypeMunicipalServiceVolumeDeterminingMethod.O;
|
||||
}
|
||||
|
||||
throw new NotImplementedException($"Cannot convert {type} to service type");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user