WebAPI/Controllers/WebAPIController.cs
@@ -1188,16 +1188,21 @@
        [HttpGet]
        public object GetSupplierList_Json(string Supplier, Int64 HOrgID)
        {
            sWhere = " Where HStopFlag=0  and HEndFlag=1 and HUSEORGID =" + HOrgID + "";
            sWhere = " Where HStopFlag=0 and HUSEORGID =" + HOrgID + "";
            //sWhere = " Where HStopFlag=0  and HEndFlag=1 and HUSEORGID =" + HOrgID + "";
            //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
            if (Supplier != "")
            if (Supplier != "" && Supplier != null)
            {
                sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + HOrgID + "%' ) ";
                //sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + HOrgID + "%' ) ";
            }
            try
            {
                WebS.WebService1 oWeb = new WebS.WebService1();
                ds = oWeb.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                string sql = "select HItemID,HNumber,HName from Gy_Supplier " + sWhere;
                ds = oCN.RunProcReturn(sql, "Gy_Supplier");
                //WebS.WebService1 oWeb = new WebS.WebService1();
                //ds = oWeb.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                //ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
@@ -1751,7 +1756,8 @@
        [HttpGet]
        public object GetCustomerList_Json(string Customer)
        {
            sWhere = " Where HStopFlag=0  and HEndFlag=1";
            sWhere = " Where HStopFlag=0 ";
            //sWhere = " Where HStopFlag=0  and HEndFlag=1";
            //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
            if (Customer != "")
            {
@@ -1789,6 +1795,48 @@
        }
        /// <summary>
        /// 获取客户列表
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetCustomerList_Json_New1")]
        [HttpGet]
        public object GetCustomerList_Json_New1(string sWhere)
        {
            try
            {
                ds = webserver.GetCustomerList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                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>
        ///参数:string sql。