chenhaozhe
2025-09-24 56e69237fcfd7d7841c60981728f0190ae48ef32
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -4373,6 +4373,10 @@
                {
                    websLsmain.HMainSourceBillType = "退料通知单";
                }
                else if (lsmain[0].HMainSourceBillType == "1201")
                {
                    websLsmain.HMainSourceBillType = "采购入库单";
                }
                else
                {
                    websLsmain.HMainSourceBillType = "手工录入";
@@ -4454,6 +4458,10 @@
                if (lsmain[0].HMainSourceBillType == "3720")
                {
                    websLsmain.HMainSourceBillType = "生产用料清单";
                }
                else if (lsmain[0].HMainSourceBillType == "1204")
                {
                    websLsmain.HMainSourceBillType = "生产领料单";
                }
                else
                {
@@ -7583,6 +7591,55 @@
        #endregion
        #region æ ¡éªŒæ¨¡å—    è¿”回源单列表信息
        /// <summary>
        /// æºå•列表信息,根据单据类型、组织ID返回源单列表信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetCheckBillList_Json")]
        [HttpGet]
        public object GetCheckBillList_Json(string HBillType, Int64 HStockOrgID, string HBillNo, string HMater, string HCustom)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_GetCheckBillList '" + HBillType  + "'," + HStockOrgID.ToString() + ",'" + HBillNo + "','" + HMater + "','" + HCustom + "'", "h_p_WMS_GetCheckBillList");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何源单信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取源单单据信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取源单单据信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion