git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493

This commit is contained in:
andrew.gilmore
2012-03-19 11:57:19 +00:00
parent 2a0f4900c3
commit 0e9ca75d77
1587 changed files with 500863 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
SELECT XMLelement("nomination",
XMLelement("contract", cont.contract_number)
, XMLElement("timestamp", TO_CHAR(nom.created_on, 'DD/MM/YYYY-HH24:MI:SS'))
, XMLelement("gas_day_start", TO_CHAR(MIN(nnpcv.gas_day), 'DD/MM/YYYY'))
, XMLElement("gas_day_end", TO_CHAR(MAX(nnpcv.gas_day), 'DD/MM/YYYY'))
, XMLElement("status", 'valid')
, XMLElement("reason", '')
, XMLElement("nomination_body",XMLAgg(XMLELEMENT( "nomination_line"
, XMLELEMENT("gas_day", nnpcv.gas_day)
, xmlelement("network_point_code", np.code)
, xmlelement("category_code", cate.code)
, xmlelement("value", nnpcv.value)
, XMLElement("status", 'valid')
, XMLElement("reason", '')
))
)
)
FROM nominations nom
, contracts cont
, nom_net_point_cat_vals nnpcv
, cont_network_points conp
, network_points np
, contract_categories cc
, categories cate
WHERE nom.nomi_id = 2971
and nom.cont_id = cont.cont_id
AND nom.nomi_id = nnpcv.nomi_id
AND nnpcv.conp_id = conp.conp_id
AND nnpcv.coca_id = cc.coca_id
AND conp.nepo_id = np.nepo_id
AND cc.cate_id = cate.cate_id
group by cont.contract_number, nom.created_on--, nnpcv.gas_day, np.code

View File

@@ -0,0 +1 @@
<nomination><contract>Gas Contract 12345.678</contract><timestamp>20/11/2009-16:29:22</timestamp><gas_day_start>21/11/2009</gas_day_start><gas_day_end>21/11/2009</gas_day_end><nomination_body><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00001</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>1</value></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00001</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>1</value></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00002</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>1</value></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00003</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>2</value></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00004</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>3</value></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00005</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>4</value></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00005</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>4</value></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00004</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>3</value></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00003</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>2</value></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00002</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>1</value></nomination_line></nomination_body></nomination>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="nomination">
<xs:complexType>
<xs:sequence>
<xs:element ref="contract"/>
<xs:element ref="timestamp"/>
<xs:element ref="gas_day_start"/>
<xs:element ref="gas_day_end"/>
<xs:element ref="nomination_body"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="contract" type="xs:string"/>
<xs:element name="timestamp" type="xs:string"/>
<xs:element name="gas_day_start" type="xs:string"/>
<xs:element name="gas_day_end" type="xs:string"/>
<xs:element name="nomination_body">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="nomination_line"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="nomination_line">
<xs:complexType>
<xs:sequence>
<xs:element ref="gas_day"/>
<xs:element ref="network_point_code"/>
<xs:element ref="category_code"/>
<xs:element ref="value"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="gas_day" type="xs:NMTOKEN"/>
<xs:element name="network_point_code" type="xs:NCName"/>
<xs:element name="category_code" type="xs:NCName"/>
<xs:element name="value" type="xs:integer"/>
</xs:schema>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="error" type="xs:string"/>
</xs:schema>

View File

@@ -0,0 +1 @@
<error>Invalid Username/Password</error>

View File

@@ -0,0 +1 @@
<error>Unknown Request</error>

View File

@@ -0,0 +1 @@
<nomination><contract>Gas Contract 12345.678</contract><timestamp>20/11/2009-16:29:22</timestamp><gas_day_start>21/11/2009</gas_day_start><gas_day_end>21/11/2009</gas_day_end><status>valid</status><reason></reason><nomination_body><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00001</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>1</value><status>valid</status><reason></reason></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00001</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>1</value><status>valid</status><reason></reason></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00002</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>1</value><status>valid</status><reason></reason></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00003</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>2</value><status>valid</status><reason></reason></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00004</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>3</value><status>valid</status><reason></reason></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00005</network_point_code><category_code>cat_IntrType1_m3day</category_code><value>4</value><status>valid</status><reason></reason></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00005</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>4</value><status>valid</status><reason></reason></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00004</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>3</value><status>valid</status><reason></reason></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00003</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>2</value><status>valid</status><reason></reason></nomination_line><nomination_line><gas_day>2009-11-21</gas_day><network_point_code>ADNP00002</network_point_code><category_code>cat_IntrType2_m3h</category_code><value>1</value><status>valid</status><reason></reason></nomination_line></nomination_body></nomination>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="nomination">
<xs:complexType>
<xs:sequence>
<xs:element ref="contract"/>
<xs:element ref="timestamp"/>
<xs:element ref="gas_day_start"/>
<xs:element ref="gas_day_end"/>
<xs:element ref="status"/>
<xs:element ref="reason"/>
<xs:element ref="nomination_body"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="contract" type="xs:string"/>
<xs:element name="timestamp" type="xs:string"/>
<xs:element name="gas_day_start" type="xs:string"/>
<xs:element name="gas_day_end" type="xs:string"/>
<xs:element name="nomination_body">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="nomination_line"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="nomination_line">
<xs:complexType>
<xs:sequence>
<xs:element ref="gas_day"/>
<xs:element ref="network_point_code"/>
<xs:element ref="category_code"/>
<xs:element ref="value"/>
<xs:element ref="status"/>
<xs:element ref="reason"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="gas_day" type="xs:NMTOKEN"/>
<xs:element name="network_point_code" type="xs:NCName"/>
<xs:element name="category_code" type="xs:NCName"/>
<xs:element name="value" type="xs:integer"/>
<xs:element name="status" type="xs:NCName"/>
<xs:element name="reason">
<xs:complexType/>
</xs:element>
</xs:schema>