WebAPI/Controllers/WebAPIController.cs
@@ -1281,6 +1281,55 @@
                return objjson;
            }
        }
        /// <summary>
        /// 获取生产资源列表
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetSouceList_Json")]
        [HttpGet]
        public object GetSouceList_Json(string HMaterID,string Value, Int64 HOrgID)
        {
            sWhere = " and HStopFlag=0 and HUSEORGID =" + HOrgID + "";
            if (Value != "" && Value != null)
            {
                sWhere = sWhere + " and ( HNumber like '%" + Value + "%' or HName like '%" + Value + "%' or HUSEORGID like '%" + HOrgID + "%' ) ";
            }
            try
            {
                string sql = "EXEC h_p_Gy_SouceViewList " + HMaterID+",'"+ sWhere + "'";
                ds = oCN.RunProcReturn(sql, "h_p_Gy_SouceViewList");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo;
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "0";
                    objjson.count = 1;
                    objjson.Message = "获取成功!";
                    objjson.data = ds.Tables[0];
                    return objjson;
                }
            }
            catch (Exception ex)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + ex.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        /// <summary>
        /// 获取职员列表
        /// </summary>