You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.0 KiB
41 lines
1.0 KiB
2 years ago
|
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);
|
||
|
}
|
||
|
}
|
||
|
}
|