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.1 KiB
41 lines
1.1 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;
|
||
|
|
||
|
namespace Warehouse.WebApi
|
||
|
{
|
||
|
[RoutePrefix("api/PressureResistant")]
|
||
|
public class PressureResistantController : ApiController
|
||
|
{
|
||
|
|
||
|
PressureResistant db = new PressureResistant();
|
||
|
//真实数据
|
||
|
[Route("QueryData")]
|
||
|
[HttpPost]
|
||
|
public IHttpActionResult QueryData(dynamic para)
|
||
|
{
|
||
|
// string bt = para.benging;
|
||
|
string et = para.endtime;
|
||
|
string lots = para.serialno;
|
||
|
string bt = para.begintime;
|
||
|
string lot = string.Empty;
|
||
|
if (lots == "")
|
||
|
{
|
||
|
lot = "";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
string trim1 = Regex.Replace(lots, @"\s", " ");
|
||
|
lot = "'" + trim1.Replace(" ", "','") + "'";
|
||
|
}
|
||
|
var res = db.QueryData(lot, bt, et);
|
||
|
return Json<dynamic>(res);
|
||
|
//return Json<dynamic>(new { AA = "aa", BB = "cc" });
|
||
|
}
|
||
|
}
|
||
|
}
|