智云SRM-WEBAPI(目前客户通用API)
WebAPI/Controllers/PODemandPlanController.cs
@@ -27,11 +27,11 @@
        /// <param name="OnePage"></param>
        /// <returns></returns>
        [Route("GetPODemandPlanBill")]
        [HttpGet]
        [HttpPost]
        //采购订单列表
        public object GetPODemandPlanBill(string HSupNo, string sqlWhere)
        public object GetPODemandPlanBill([FromBody] JObject msg)
        {
            string msg = "";
            string HSupNo = msg["HSupNo"].ToString(); string sqlWhere = msg["sqlWhere"].ToString();
            try
            {
                string VsWhere = "";
@@ -39,18 +39,10 @@
                SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM();
                DataSet ds;
                //其他过滤
                if (msg.Trim() == "")
                {
                    msg = " Where hsupid in (select HSupID from h_v_Gy_UserSupplierList where 用户=^^" + HSupNo.Trim() + "^^) " + sqlWhere;
                    // msg = " Where   hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)";
                }
                else
                {
                    msg = msg + " and   hsupid in (select HSupID from h_v_Gy_UserSupplierList where 用户=^^" + HSupNo.Trim() + "^^) " + sqlWhere;
                    // msg = msg + " Where   hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)";
                }
               string sql = " Where hsupid in (select HSupID from h_v_Gy_UserSupplierList where 用户=^^" + HSupNo.Trim() + "^^) " + sqlWhere;
                //转换特殊字符
                if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false)
                if (Common.SQLtoChange(sql, ref VsWhere, ref PcWhere) == false)
                {
                    objjson.code = "0";
                    objjson.count = 0;