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

85 lines
3.4 KiB

using JHReport.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Warehouse.Models.mesModel;
namespace Warehouse.DAL.Report
{
public class PopoutdataDal : ApiController
{
public List<dynamic> Popoutdata(string workshop, string workorder, string field)
{
using (var context = new mesModel())
{
string sql = string.Empty;
ReportDal report = new ReportDal();
if (field == "bz")
{
sql = @"exec [wh].[dbo].[sp_wo_BatchRate_zx] ";
sql += string.IsNullOrEmpty(workorder) ? " @v_workorder=N''" : " @v_workorder =N'" + workorder + "'";
sql += string.IsNullOrEmpty(workshop) ? " ,@v_area_code=N''" : " ,@v_area_code=N'" + workshop + "'";
}
else
{
sql = report.PopoutDataSql(workshop, workorder, field);
}
var res = context.DynamicListFromSql(sql, null);
return res.ToList();
}
}
public List<dynamic> Produinc(string workshop, string workorder, string saleorder, string station, string bt, string et, string field,string worktime)
{
using (var context = new mesModel())
{
string sql = string.Empty;
ReportDal report = new ReportDal();
sql = report.ProduincSql(workshop, workorder, saleorder, station, bt, et, field,worktime);
var res = context.DynamicListFromSql(sql, null);
return res.ToList();
}
}
public List<dynamic> Produincnew(string workshop, string workorder, string saleorder, string station, string bt, string et, string field)
{
using (var context = new mesModel())
{
string sql = string.Empty;
ReportDal report = new ReportDal();
sql = report.ProduincSqlnew(workshop, workorder, saleorder, station, bt, et, field);
var res = context.DynamicListFromSql(sql, null);
return res.ToList();
}
}
public List<dynamic> Produinc2(string workshop, string workorder, string saleorder, string station, string wksid,string bt, string et, string field,string worktime)
{
using (var context = new mesModel())
{
string sql = string.Empty;
ReportDal report = new ReportDal();
sql = report.ProduincSql2(workshop, workorder, saleorder, station,wksid,bt, et, field,worktime);
var res = context.DynamicListFromSql(sql, null);
return res.ToList();
}
}
public List<dynamic> Produinc2new(string workshop, string workorder, string saleorder, string station, string wksid, string bt, string et, string field)
{
using (var context = new mesModel())
{
string sql = string.Empty;
ReportDal report = new ReportDal();
sql = report.ProduincSql2new(workshop, workorder, saleorder, station, wksid, bt, et, field);
var res = context.DynamicListFromSql(sql, null);
return res.ToList();
}
}
}
}