旧版报表、仓库
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.
 
 
 
 
 

66 lines
1.8 KiB

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/CTMReport")]
public class CTMReportController : ApiController
{
CTMReportDal ctm = new CTMReportDal();
//真实数据
[Route("QueryData")]
[HttpPost]
public IHttpActionResult QueryData(dynamic para)
{
// string bt = para.benging;
string et = para.endtime;
string wo = para.workorder;
string lots = para.serialno;
string pallet_nb = para.pallet_nbr;
string bt = para.begintime;
string lot = string.Empty;
if (lots == "")
{
lot = "";
}
else
{
string trim1 = Regex.Replace(lots, @"\s", " ");
lot = "'" + trim1.Replace(" ", "','") + "'";
}
var res = ctm.CTMQueryData(lot, wo, bt, et, pallet_nb);
return Json<dynamic>(res);
//return Json<dynamic>(new { AA = "aa", BB = "cc" });
}
}
}
//namespace Warehouse.WebApi
//{
// public class BatchRateController : ApiController
// {
// BatchRateDal DT = new BatchRateDal();
// [Route("api/BatchRate/BatchRate")]
// [HttpPost]
// public IHttpActionResult Repair(dynamic para)
// {
// string sale_order = para.sale_order;
// string workorder = para.workorder;
// string workshop = para.workshop;
// var res = DT.BatchRate(sale_order, workorder, workshop);
// return Json(res);
// }
// }
//}