1
duhe
2023-12-13 0a6224c1f057e83ed90b75d0c71286c30d8e01ab
WebAPI/Controllers/WebAPIController.cs
@@ -1756,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 != "")
            {
@@ -1792,6 +1793,48 @@
                return objjson;
            }
        }
        /// <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>
        /// 获取工序列表
@@ -4503,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;
@@ -4512,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)
@@ -4523,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;