项目需求 用Java WebService作为数据查询端(服务器端)
用.Net C#作为数据展示端(客户端)现在数据查询出来的数据格式为XML型
<root>
<code>0</code>
<info>success</info>
<count>2</count>
<total>0</total>
<current_page>1</current_page>
<page_size>2</page_size>
<record>
<shopcd>000800</shopcd>
<shopname>双阳店</shopname>
<productcd>1000</productcd>
<productname>软性饮料</productname>
<salesamount>3387.1000</salesamount>
<salesamountpercent>0.004120</salesamountpercent>
<grosspro>171.3500</grosspro>
<grosspropercent>19.7671</grosspropercent>
<quantity>825.0000</quantity>
<quantitypercent>0.02</quantitypercent>
<receiptqty>571.0</receiptqty>
<receiptpi>14.75</receiptpi>
<unitpriceaverage>4.106</unitpriceaverage>
<receiptamountaverage>5.932</receiptamountaverage>
<totalsalesamount>822019.3300</totalsalesamount>
<totalquantity>52423.0000</totalquantity>
<totalreceiptqty>38700.0</totalreceiptqty>
</record>
<record>
<shopcd>000800</shopcd>
<shopname>双阳店</shopname>
<productcd>1001</productcd>
<productname>啤酒</productname>
<salesamount>153.9000</salesamount>
<salesamountpercent>0.000187</salesamountpercent>
<grosspro>4.1400</grosspro>
<grosspropercent>37.1739</grosspropercent>
<quantity>22.0000</quantity>
<quantitypercent>0.00</quantitypercent>
<receiptqty>17.0</receiptqty>
<receiptpi>0.44</receiptpi>
<unitpriceaverage>6.995</unitpriceaverage>
<receiptamountaverage>9.053</receiptamountaverage>
<totalsalesamount>822019.3300</totalsalesamount>
<totalquantity>52423.0000</totalquantity>
<totalreceiptqty>38700.0</totalreceiptqty>
</record>
<record>
<shopcd>000800</shopcd>
<shopname>双阳店</shopname>
<productcd>1002</productcd>
<productname>果酒</productname>
<salesamount>280.0000</salesamount>
<salesamountpercent>0.000341</salesamountpercent>
<grosspro>1.8400</grosspro>
<grosspropercent>152.1739</grosspropercent>
<quantity>30.0000</quantity>
<quantitypercent>0.00</quantitypercent>
<receiptqty>6.0</receiptqty>
<receiptpi>0.16</receiptpi>
<unitpriceaverage>9.333</unitpriceaverage>
<receiptamountaverage>46.667</receiptamountaverage>
<totalsalesamount>822019.3300</totalsalesamount>
<totalquantity>52423.0000</totalquantity>
<totalreceiptqty>38700.0</totalreceiptqty>
</record>
</root>
现在要求客户端显示为对金额进行统计 软性饮料 啤酒 果酒
双阳店 3387.1000 153.9000 280.0000三冲店 2482.1000 553.9000 230.0000 这样类型的,这样的数据转换要在Java中进行操作,返回给客户端调用,
我该怎么办呢?各位有什么好的方法吗?
用.Net C#作为数据展示端(客户端)现在数据查询出来的数据格式为XML型
<root>
<code>0</code>
<info>success</info>
<count>2</count>
<total>0</total>
<current_page>1</current_page>
<page_size>2</page_size>
<record>
<shopcd>000800</shopcd>
<shopname>双阳店</shopname>
<productcd>1000</productcd>
<productname>软性饮料</productname>
<salesamount>3387.1000</salesamount>
<salesamountpercent>0.004120</salesamountpercent>
<grosspro>171.3500</grosspro>
<grosspropercent>19.7671</grosspropercent>
<quantity>825.0000</quantity>
<quantitypercent>0.02</quantitypercent>
<receiptqty>571.0</receiptqty>
<receiptpi>14.75</receiptpi>
<unitpriceaverage>4.106</unitpriceaverage>
<receiptamountaverage>5.932</receiptamountaverage>
<totalsalesamount>822019.3300</totalsalesamount>
<totalquantity>52423.0000</totalquantity>
<totalreceiptqty>38700.0</totalreceiptqty>
</record>
<record>
<shopcd>000800</shopcd>
<shopname>双阳店</shopname>
<productcd>1001</productcd>
<productname>啤酒</productname>
<salesamount>153.9000</salesamount>
<salesamountpercent>0.000187</salesamountpercent>
<grosspro>4.1400</grosspro>
<grosspropercent>37.1739</grosspropercent>
<quantity>22.0000</quantity>
<quantitypercent>0.00</quantitypercent>
<receiptqty>17.0</receiptqty>
<receiptpi>0.44</receiptpi>
<unitpriceaverage>6.995</unitpriceaverage>
<receiptamountaverage>9.053</receiptamountaverage>
<totalsalesamount>822019.3300</totalsalesamount>
<totalquantity>52423.0000</totalquantity>
<totalreceiptqty>38700.0</totalreceiptqty>
</record>
<record>
<shopcd>000800</shopcd>
<shopname>双阳店</shopname>
<productcd>1002</productcd>
<productname>果酒</productname>
<salesamount>280.0000</salesamount>
<salesamountpercent>0.000341</salesamountpercent>
<grosspro>1.8400</grosspro>
<grosspropercent>152.1739</grosspropercent>
<quantity>30.0000</quantity>
<quantitypercent>0.00</quantitypercent>
<receiptqty>6.0</receiptqty>
<receiptpi>0.16</receiptpi>
<unitpriceaverage>9.333</unitpriceaverage>
<receiptamountaverage>46.667</receiptamountaverage>
<totalsalesamount>822019.3300</totalsalesamount>
<totalquantity>52423.0000</totalquantity>
<totalreceiptqty>38700.0</totalreceiptqty>
</record>
</root>
现在要求客户端显示为对金额进行统计 软性饮料 啤酒 果酒
双阳店 3387.1000 153.9000 280.0000三冲店 2482.1000 553.9000 230.0000 这样类型的,这样的数据转换要在Java中进行操作,返回给客户端调用,
我该怎么办呢?各位有什么好的方法吗?
解决方案 »
- 急。。各位大虾来看看,struts1 <action path="/*" parameter="{1}">
- java tomcat 配置SSL
- 如何实现像论坛那样用户只能修改,删除自己发出的帖子的功能
- 方法过时,怎么解决?
- 请问WAP开发中如何获得访问用户的手机型号和手机号码?
- int 与 Integer 的区别
- 如何从hibernate返回的list中提取两个不同的对象?
- 有关内存溢出 (OutOfMemoryError) 的问题
- 哪位强哥能把这个网址上的有声资料下下来,我给100分,快告诉我!!!!
- java 中 两个日期计算相隔天数
- SSH框架中Hibernate对session的管理
- 关于Ext3.3中跨frame的Ext.window的显示,求大神指点
看楼主的xml应该是一个表的3条记录,建议在webService规定字段顺序,然后返回基本类型的2维数组