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

121 lines
3.8 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Warehouse.DAL.PackOutput;
using Warehouse.DAL.Report;
namespace Warehouse.WebApi
{
public class ProductionReportController : ApiController
{
ProductionReportDal DT = new ProductionReportDal();
[Route("api/ProductionReport/StationNbrAndGoing")]
[HttpPost]
public IHttpActionResult QueryInfo(dynamic para)
{
string workorder = para.workorder;
string workshop = para.workshop;
//string wks_id = para.wks_id;
string behintime = para.behintime;
string endtime = para.endtime;
string station = para.station;
string saleorder = para.saleorder;
string worktime = para.worktime;
var res = DT.StationNbrAndGoing(behintime, endtime, workshop, station, workorder, saleorder,worktime);
return Json(res);
//return Json<dynamic>(new { AA = "aa", BB = "cc" });
}
[Route("api/ProductionReport/StationNbrAndGoingWKS")]
[HttpPost]
public IHttpActionResult QueryInfoWKS(dynamic para)
{
string workorder = para.workorder;
string workshop = para.workshop;
string wks_id = para.wks_id;
string behintime = para.behintime;
string endtime = para.endtime;
string station = para.station;
string saleorder = para.saleorder;
string worktime = para.worktime;
var res = DT.StationNbrAndGoingtest(behintime, endtime, workshop, station, wks_id, workorder, saleorder,worktime);
return Json(res);
//return Json<dynamic>(new { AA = "aa", BB = "cc" });
}
[Route("api/ProductionReport/StationDetailed")]
[HttpPost]
public IHttpActionResult QueryStatus(dynamic para)
{
string workorder = para.workorder;
string workshop = para.workshop;
string wks_id = para.wks_id;
string behintime = para.behintime;
string endtime = para.endtime;
string station = para.station;
string saleorder = para.saleorder;
string worktime = para.worktime;
var res = DT.StationDetailed(behintime, endtime, workshop, station,wks_id, workorder, saleorder,worktime);
return Json(res);
}
//[Route("QueryStatus")]
//[HttpPost]
//public FileResult tt()
//{
// return FileResult();
//}
}
}
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Net;
//using System.Net.Http;
//using System.Web.Http;
//using Warehouse.DAL.QC;
//using OfficeOpenXml;
//using System.Data;
//using Dapper;
//using System.Net.Http.Headers;
////using System.Web.Mvc;
//using System.Data.SqlClient;
//using System.IO;
//using Warehouse.DAL.Report;
//namespace Warehouse.WebApi
//{
// public class ProductionReportController : ApiController
// {
// ProductionReportDal DT = new ProductionReportDal();
// [Route("api/ProductionReport/StationNbrAndGoing")]
// [HttpPost]
// public IHttpActionResult Station_capacity(dynamic para)
// {
// string workorder = para.workorder;
// string workshop = para.workshop;
// string wks_id = para.wks_id;
// string behintime = para.behintime;
// string endtime = para.endtime;
// var res = DT.StationNbrAndGoing(para);
// return Json(res);
// }
// [Route("api/ProductionReport/StationNbrAndGoing")]
// [HttpPost]
// public IHttpActionResult StationDetailed(dynamic para)
// {
// var res = DT.StationDetailed(para);
// return Json(res);
// }
// }
//}