yangle
2023-12-25 14fdd4d979f0306b79bb638576b341ed13f4780a
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)
                {
@@ -4541,6 +4546,12 @@
                    case "WX":
                        HView = "h_v_Sb_EquipRepairCheckBillList";
                        break;
                    case "GZ":
                        HView = "h_v_Sb_EquipConkBookBillList";
                        break;
                    case "YS":
                        HView = "h_v_Sb_EquipRepairCheckBillList";
                        break;
                    default:
                        objjson.code = "0";
                        objjson.count = 0;
@@ -4550,7 +4561,7 @@
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select * from " + HView + " where 1 = 1 ");
                string sql = string.Format(@"select * from " + HView + " where 1 = 1 " + sWhere);
                ds = oCN.RunProcReturn(sql, HView);
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
@@ -4561,9 +4572,9 @@
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败,查无数据" + DBUtility.ClsPub.sErrInfo;
                    objjson.code = "1";
                    objjson.count = 1;
                    objjson.Message = "获取失败,查无数据";
                    objjson.data = null;
                    objjson.list = columnNameList;
                    return objjson;