using System;
|
using System.Collections.Generic;
|
using System.Configuration;
|
using System.Data;
|
using System.Linq;
|
using System.Web;
|
using System.Xml;
|
|
namespace iWareWebservice.AppDao
|
{
|
/// <summary>
|
/// 出库Dao
|
/// </summary>
|
public class StockOutPickDAO
|
{
|
private static object Lock = new object();
|
|
private static StockOutPickDAO Instance = null;
|
|
/// <summary>
|
/// 获取单例的方法
|
/// </summary>
|
/// <returns>单例实体</returns>
|
public static StockOutPickDAO GetInstance()
|
{
|
if (Instance == null)
|
{
|
lock (Lock)
|
{
|
if (Instance == null)
|
{
|
Instance = new StockOutPickDAO();
|
}
|
}
|
}
|
return Instance;
|
}
|
|
public string PickMaterialOut(string xmlParas)
|
{
|
string sql = "";
|
string msgSeqNo = "";
|
|
string rspbodyStr = "";
|
string rspStartStr = "";
|
|
string rspEndStr = "</Data></root>";
|
|
string conStr = ConfigurationManager.ConnectionStrings["SysDb"].ConnectionString;
|
try
|
{
|
XmlDocument xml = new XmlDocument();
|
xml.LoadXml(xmlParas);
|
msgSeqNo = xml.SelectSingleNode("/root/MsgSeqNo").InnerText;
|
//出库单号
|
string pickListNo = xml.SelectSingleNode("/root/Data/PickLists/PickList").Attributes["PickListNo"].Value;
|
//
|
XmlNode dataNode = xml.SelectSingleNode("/root/Data/PickLists/PickList/PickListItems");
|
foreach (XmlNode strItemNode in dataNode.ChildNodes)
|
{
|
string articleNumber = strItemNode.Attributes["ArticleNumber"].Value;
|
string strNestingName = strItemNode.Attributes["NestingName"].Value;
|
string strNestingNo = strItemNode.Attributes["Nesting_No"].Value;
|
|
XmlNode firstSubNode = strItemNode.FirstChild;
|
string strLength = firstSubNode.Attributes["Length"].Value;
|
string strwide = firstSubNode.Attributes["WebHeight"].Value;
|
string strThick = firstSubNode.Attributes["WebThickness"].Value;
|
}
|
}
|
catch (Exception ex) {
|
rspbodyStr = "";
|
rspStartStr = new ResponseXmlString().GetResponseHeardStr(msgSeqNo,false,ex.ToString());
|
}
|
return rspStartStr + rspbodyStr + rspEndStr;
|
}
|
}
|
}
|