schangxiang@126.com
2025-08-25 aa383c30e4f1053e97c6a33ccf9a899fca26dd20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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;
        }
    }
}