using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Text.RegularExpressions; using System.Web.Http; using Warehouse.DAL.Report; using Warehouse.DAL.YL; namespace Warehouse.WebApi.YL { public class DataQueryController : ApiController { DataQueryDal DT = new DataQueryDal(); [Route("api/DataQuery/DataQuery")] [HttpPost] public IHttpActionResult Dataquery(dynamic para) { string wo = para.wo; string bt = para.bt; string et = para.et; string texts = para.text; string text = string.Empty; if (texts == "") { text = ""; } else { string trim1 = Regex.Replace(texts, @"\s", " "); text = "'" + trim1.Replace(" ", "','") + "'"; } var res = DT.Query(wo,bt,et,text); return Json(res); } } }