Jaatuli

From ICO wiki
Jump to navigationJump to search

Meeskond

  • Tarmo Luugus
  • Leho Kivistik
  • Hannes Mäeorg
  • Marten Tammeleht

Analüüs

Kirjeldus

Luua klientrakendus ja veebiteenus, millega saab restoran registreerida müüki ja sellega seotud elementaarseid asju hallata ehk kassa programm.

Eesmärk - kiirendada müüki ning tekitada mobiilne kassa. Saab lauast otse tellimusi teha. Tekib vähem vigu tellimuse vastuvõtmisel. Tulevased kliendid saavad ise ehitada endale sobiva liidese meie veebiteenusele. Personaalsed lahendused ning kliendi enda kujundus.

Funktsionaalsus

Must have

Veebiteenuse kaudu saab:

  • sisestada müüdavaid tooteid - omanik
  • tooterühmu teha - omanik
  • tooted ära jagada tooterühmadesse - omanik
  • erinevaid makseviise luua- omanik
  • arveid luua - teenindaja,omanik
  • arveid sulgeda/maksta - teenindaja,omanik
  • müügiaruandeid vaadata - TOP tooted mida on müüdud etteantud perioodi lõikes - omanik
  • luua teenindajatele kasutajaid - omanik

Nice to have

  • soodustustuste loomine - omanik
  • soodustuse määramine arvele - teenindaja
  • kliendikaardid/klientide haldus - omanik
  • laoseisu vaadata toodetel - omanik
  • laoseisu sisestada/tooteid sisse võtta lattu - omanik

Tegevuste logi

22.03.2018 Meeskonna moodustamine.


XML

Andmefail

<?xml version="1.0" encoding="utf-8"?>
<Bills>
  <BillDTO BillID="7010" State="Open">
    <BillRows>
      <BillRowDTO BillRowID="7021" FinalPrice="1" Quantity="3" >
        <Price PriceID="7010" PriceValue="2"/>
        <Product ProductID="7011">
          <ProductName><![CDATA[Fanta]]></ProductName>
          <ProductType ProductTypeID="3">
            <ProductTypeName><![CDATA[karastusjook]]></ProductTypeName>
          </ProductType>
        </Product>
      </BillRowDTO>
      <BillRowDTO BillRowID="8019" FinalPrice="5" Quantity="1">
        <Price PriceID="8009" PriceValue="5"/>
        <Product ProductID="8010">
          <ProductName><![CDATA[lõheleib]]></ProductName>
          <ProductType ProductTypeID="1003">
            <ProductTypeName><![CDATA[võileib]]></ProductTypeName>
          </ProductType>
        </Product>
      </BillRowDTO>
    </BillRows>
    <Waiter ApplicationUserID="385e090c-bb13-4f89-be77-3596657311c1" Role="Manager">
      <Email><![CDATA[tiina@kohvik.ee]]></Email>
    </Waiter>
  </BillDTO>
  <BillDTO BillID="7011" State="Open">
    <BillRows>
      <BillRowDTO BillRowID="7022" FinalPrice="1" Quantity="4" >
        <Price PriceID="7010" PriceValue="2"/>
        <Product ProductID="7011">
          <ProductName><![CDATA[Fanta]]></ProductName>
          <ProductType ProductTypeID="3">
            <ProductTypeName><![CDATA[karastusjook]]></ProductTypeName>
          </ProductType>
        </Product>
      </BillRowDTO>
      <BillRowDTO BillRowID="8020" FinalPrice="5" Quantity="1">
        <Price PriceID="8091" PriceValue="5"/>
        <Product ProductID="8011">
          <ProductName><![CDATA[kokteilsalat]]></ProductName>
          <ProductType ProductTypeID="1004">
            <ProductTypeName><![CDATA[salat]]></ProductTypeName>
          </ProductType>
        </Product>
      </BillRowDTO>
      <BillRowDTO BillRowID="8021" FinalPrice="5" Quantity="1">
        <Price PriceID="8092" PriceValue="5"/>
        <Product ProductID="8012">
          <ProductName><![CDATA[Seafilee ahjukartulitega]]></ProductName>
          <ProductType ProductTypeID="1004">
            <ProductTypeName><![CDATA[praad]]></ProductTypeName>
          </ProductType>
        </Product>
      </BillRowDTO>
    </BillRows>
    <Waiter ApplicationUserID="385e090c-bb13-4f89-be77-3596657311c1" Role="Manager">
      <Email><![CDATA[tiina@kohvik.ee]]></Email>
    </Waiter>
  </BillDTO>
</Bills>

Skeemifail

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Bills">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="BillDTO">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="BillRows">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element maxOccurs="unbounded" name="BillRowDTO">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="Price">
                            <xs:complexType>
                              <xs:attribute name="PriceID" type="xs:unsignedInt" use="required" />
                              <xs:attribute name="PriceValue" type="xs:decimal" use="required" />
                            </xs:complexType>
                          </xs:element>
                          <xs:element name="Product">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="ProductName" type="xs:string" />
                                <xs:element name="ProductType">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element name="ProductTypeName" type="xs:string" />
                                    </xs:sequence>
                                    <xs:attribute name="ProductTypeID" type="xs:unsignedInt" use="required" />
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                              <xs:attribute name="ProductID" type="xs:unsignedInt" use="required" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attribute name="BillRowID" type="xs:unsignedInt" use="required" />
                        <xs:attribute name="FinalPrice" type="xs:decimal" use="required" />
                        <xs:attribute name="Quantity" type="xs:unsignedInt" use="required" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Waiter">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Email" type="xs:string" />
                  </xs:sequence>
                  <xs:attribute name="ApplicationUserID" type="xs:string" use="required" />
                  <xs:attribute name="Role" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="BillID" type="xs:unsignedInt" use="required" />
            <xs:attribute name="State" type="xs:string" use="required" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

XML HTMLi (XSLT)

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:output method="html" indent="yes"/>
  <xsl:template match="/Bills">
    <html>
      <head>
        <title>Arved</title>
      </head>
      <body>
        <xsl:for-each select="BillDTO">
          <h1>
            <xsl:value-of select="@BillID"/>
          </h1>
          <table Width="450">
            <tr>
              <th>Toode</th>
              <th>Toote liik</th>
              <th>Kogus</th>
              <th>Hind</th>
              <th>Lõpp hind</th>
            </tr>
            <xsl:for-each select="BillRows/BillRowDTO">
              <tr align="center">
                <td>
                  <xsl:value-of select="Product/ProductName"/>
                </td>
                <td>
                  <xsl:value-of select="Product/ProductType/ProductTypeName"/>
                </td>
                <td>
                  <xsl:value-of select="@Quantity"/>
                </td>
                <td>
                  <xsl:value-of select="Price/@PriceValue"/>
                </td>
                <td>
                  <xsl:value-of select="@FinalPrice"/>
                </td>
              </tr>
            </xsl:for-each>
          </table>
          <h4 align="middle">
            <xsl:value-of select="Waiter/Email"/>
          </h4>
        </xsl:for-each>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

XML teisendus XSLT

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:output method="xml" indent="yes"/>
  <xsl:template match="/Bills">
    <xsl:element name="Bills">
      <xsl:for-each select="BillDTO">
        <xsl:element name="Bill">
          <xsl:attribute name="BillID">
            <xsl:value-of select="@BillID"/>
          </xsl:attribute>
          <xsl:for-each select="BillRows/BillRowDTO">
            <xsl:element name="BillRow">
              <xsl:attribute name="BillRowID">
                <xsl:value-of select="@BillRowID"/>
              </xsl:attribute>
              <xsl:attribute name="FinalPrice">
                <xsl:value-of select="@FinalPrice"/>
              </xsl:attribute>
              <xsl:attribute name="Quantity">
                <xsl:value-of select="@Quantity"/>
              </xsl:attribute>
              <xsl:element name="Product">
                <xsl:attribute name="ProductID">
                  <xsl:value-of select="Product/@ProductID"/>
                </xsl:attribute>
                <xsl:element name="ProductName">
                  <xsl:value-of select="Product/ProductName"/>
                </xsl:element>
                <xsl:element name="ProductType">
                  <xsl:attribute name ="ProductTypeID">
                    <xsl:value-of select="Product/ProductType/@ProductTypeID"/>
                  </xsl:attribute>
                  <xsl:element name="ProductTypeName">
                    <xsl:value-of select="Product/ProductType/ProductTypeName"/>
                  </xsl:element>
                </xsl:element>
              </xsl:element>
              <xsl:element name="Price">
                <xsl:attribute name="PriceID">
                  <xsl:value-of select="Price/@PriceID"/>
                </xsl:attribute>
                <xsl:attribute name="PriceValue">
                  <xsl:value-of select="Price/@PriceValue"/>
                </xsl:attribute>
              </xsl:element>
            </xsl:element>
          </xsl:for-each>
          <xsl:element name="Waiter">
            <xsl:attribute name="WaiterID">
              <xsl:value-of select="Waiter/@ApplicationUserID"/>
            </xsl:attribute>
            <xsl:element name="Email">
              <xsl:value-of select="Waiter/Email"/>
            </xsl:element>
          </xsl:element>
        </xsl:element>
      </xsl:for-each>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>