Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Authentication;
using System.Threading.Tasks;
using CsQuery;
using Ya.Parser.Properties;
using Nemerle;
using System;
using System.Globalization;
using System.Linq;
using System.Xml.Linq;
using Interfax.SM.ETL.Mapping.Macros.DSL;
using Interfax.SM.ETL.Mapping.Types;
using Interfax.SM.Utils;
namespace Interfax.SM.ETL.Mapping.Goszakupki.Goszakupki44
public enum SmRule
{
/// <summary>
/// Неизвестное правило
/// </summary>
Unknown = 0,
#region Пакеты
PackageBase = 100,
using Interfax.SM.ETL.Mapping.Functions;
using Interfax.SM.ETL.Mapping.Macros.DSL;
using Interfax.SM.ETL.Mapping.Types;
using Interfax.SM.ETL.Mapping.Goszakupki.Goszakupki44.Actual.Common;
using Nemerle.Collections;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml.Linq;
public override Transform() : Seq[IntDoc]
{
yield EntityBuilder(this)
.Create(notificationEF, null, x => x.docPublishDate)
.Create(notificationEP, null, x => x.docPublishDate)
.Create(notificationISM, null, x => x.docPublishDate)
.Create(notificationISO, null, x => x.docPublishDate)
.Create(notificationOK, null, x => x.docPublishDate)
.Create(notificationOKD, null, x => x.docPublishDate)
.Create(notificationOKOU, null, x => x.docPublishDate)
public Prepare(content : XDocument) : XDocument
{
def praparedContent = XDocument.Load(content.CreateReader());
def fakeNamespaces = [ @"http://zakupki.gov.ru/oos/printform/1", @"http://zakupki.gov.ru/oos/integration/1"];
def clean(el)
{
def name = el.Name.LocalName;
def parentName = el.Parent?.Name?.LocalName;
def changes = List();
mutable nsChanged = false;
#region Notifications
[Overloads(src, zfcs_notificationEFType
, zfcs_notificationEPType
, zfcs_notificationISMType
, zfcs_notificationISOType
, zfcs_notificationOKDType
, zfcs_notificationOKOUType
, zfcs_notificationOKType
def makeDeserializer(types)
{
def mapRef = <[ $("map" : usesite)]>;
def mapExprs = types.Map(t => <[ $mapRef.Add($(t.Name), typeof($(ExpandFullName(t.FullName)))); ]>);
<[decl:
public module Deserializer
{
private map : Lazy[Dictionary[string, Type]] = Lazy(getMap, System.Threading.LazyThreadSafetyMode.PublicationOnly);
private getMap() : Dictionary[string, Type]
{
organizerExtendedRole(src : ZakupkiV1.zfcs_responsibleRoleType) : TenderTypeOrganizerExtendedRole
{
| ZakupkiV1.zfcs_responsibleRoleType.RA //Уполномоченный орган;
| ZakupkiV1.zfcs_responsibleRoleType.AI //Уполномоченное учреждение;
| ZakupkiV1.zfcs_responsibleRoleType.OA //Организация, осуществляющая полномочия заказчика на осуществление закупок на основании договора (соглашения);
=> TenderTypeOrganizerExtendedRole.AuthorizedAgency;
| ZakupkiV1.zfcs_responsibleRoleType.CU //Заказчик;
=> TenderTypeOrganizerExtendedRole.Published;
| ZakupkiV1.zfcs_responsibleRoleType.ORA //Уполномоченный орган в качестве организатора совместного конкурса (аукциона) согласно ст. 25 Закона №44ФЗ;
| ZakupkiV1.zfcs_responsibleRoleType.OCU //Заказчик в качестве организатора совместного конкурса (аукциона) согласно ст. 25 Закона №44ФЗ;