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.
130 lines
4.9 KiB
130 lines
4.9 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.WarehouseReport;
|
||
|
|
||
|
namespace Warehouse.WebApi.WarehouseReport
|
||
|
{
|
||
|
public class LCLReportController : ApiController
|
||
|
{
|
||
|
LCLreportDal DT = new LCLreportDal();
|
||
|
|
||
|
//正拼柜报表
|
||
|
[Route("api/LCLreport/LCLReport")]
|
||
|
[HttpPost]
|
||
|
public IHttpActionResult LCLReport(dynamic para)
|
||
|
{
|
||
|
//string workorder = para.workorder;
|
||
|
string StartDateTime = para.StartDateTime;
|
||
|
string EndDateTime = para.EndDateTime;
|
||
|
string powergrade = para.powergrade;
|
||
|
string palletno = para.palletno;
|
||
|
string state = para.state;
|
||
|
string containerno = para.containerno;
|
||
|
var res = DT.LCL(StartDateTime,EndDateTime,powergrade, palletno,state,containerno);
|
||
|
return Json(res);
|
||
|
}
|
||
|
|
||
|
//库位报表(存在问题)
|
||
|
[Route("api/LCLreport/Tobeputinstorage")]
|
||
|
[HttpPost]
|
||
|
public IHttpActionResult Tobeputinstorage(dynamic para)
|
||
|
{
|
||
|
//string workorder = para.workorder;
|
||
|
string StartDateTime = para.StartDateTime;
|
||
|
string EndDateTime = para.EndDateTime;
|
||
|
string locationname = para.locationname;
|
||
|
string type = para.type;
|
||
|
string pallet = para.pallet;
|
||
|
string name = para.name;
|
||
|
string containerno = para.containerno;
|
||
|
var res = DT.Tobeputinstorage(StartDateTime, EndDateTime,locationname,type,pallet,name,containerno);
|
||
|
return Json(res);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
//待拼柜
|
||
|
[Route("api/LCLreport/Tospellark")]
|
||
|
[HttpPost]
|
||
|
public IHttpActionResult Tospellark(dynamic para)
|
||
|
{
|
||
|
//string workorder = para.workorder;
|
||
|
string StartDateTime = para.StartDateTime;
|
||
|
string EndDateTime = para.EndDateTime;
|
||
|
string workorder = para.workorder;
|
||
|
string trim = Regex.Replace(workorder, @"\s", " ");
|
||
|
workorder = "'" + trim.Replace(" ", "','") + "'";
|
||
|
string power_grade = para.power_grade;
|
||
|
string pallet_nbr = para.pallet_nbr;
|
||
|
trim = Regex.Replace(pallet_nbr, @"\s", " ");
|
||
|
pallet_nbr = "'" + trim.Replace(" ", "','") + "'";
|
||
|
string product_code = para.product_code;
|
||
|
string final_grade = para.final_grade;
|
||
|
string current_grade = para.current_grade;
|
||
|
var res = DT.Tospellark(StartDateTime,EndDateTime,workorder,power_grade,pallet_nbr,product_code,final_grade,current_grade);
|
||
|
return Json(res);
|
||
|
}
|
||
|
|
||
|
|
||
|
//移库记录
|
||
|
[Route("api/LCLreport/tmovestocklog")]
|
||
|
[HttpPost]
|
||
|
public IHttpActionResult tmovestocklog(dynamic para)
|
||
|
{
|
||
|
//string workorder = para.workorder;
|
||
|
string StartDateTime = para.StartDateTime;
|
||
|
string EndDateTime = para.EndDateTime;
|
||
|
string workorder = para.workorder;
|
||
|
//string power_grade = para.power_grade;
|
||
|
//string pallet_nbr = para.pallet_nbr;
|
||
|
string oldstoragelocationid = para.oldstoragelocationid;
|
||
|
string newstoragelocationid = para.newstoragelocationid;
|
||
|
string pallet = para.pallet;
|
||
|
string trim = Regex.Replace(pallet, @"\s", " ");
|
||
|
pallet = "'" + trim.Replace(" ", "','") + "'";
|
||
|
var res = DT.tmovestocklog(StartDateTime, EndDateTime, oldstoragelocationid, newstoragelocationid, pallet);
|
||
|
return Json(res);
|
||
|
}
|
||
|
|
||
|
//删柜记录
|
||
|
[Route("api/LCLreport/delcontainerlog")]
|
||
|
[HttpPost]
|
||
|
public IHttpActionResult delcontainerlog(dynamic para)
|
||
|
{
|
||
|
//string workorder = para.workorder;
|
||
|
string StartDateTime = para.StartDateTime;
|
||
|
string EndDateTime = para.EndDateTime;
|
||
|
string container = para.container;
|
||
|
string pallet = para.pallet;
|
||
|
string trim = Regex.Replace(pallet, @"\s", " ");
|
||
|
pallet = "'" + trim.Replace(" ", "','") + "'";
|
||
|
var res = DT.delcontainerlog(StartDateTime,EndDateTime,container,pallet);
|
||
|
return Json(res);
|
||
|
}
|
||
|
|
||
|
//退库记录
|
||
|
[Route("api/LCLreport/returnstocklog")]
|
||
|
[HttpPost]
|
||
|
public IHttpActionResult returnstocklog(dynamic para)
|
||
|
{
|
||
|
//string workorder = para.workorder;
|
||
|
string StartDateTime = para.StartDateTime;
|
||
|
string EndDateTime = para.EndDateTime;
|
||
|
//string container = para.container;
|
||
|
string pallet = para.pallet;
|
||
|
string trim = Regex.Replace(pallet, @"\s", " ");
|
||
|
pallet = "'" + trim.Replace(" ", "','") + "'";
|
||
|
var res = DT.returnstocklog(StartDateTime, EndDateTime, pallet);
|
||
|
return Json(res);
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|