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.
62 lines
2.5 KiB
62 lines
2.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using Warehouse.Models.mesModel;
|
|
|
|
namespace Warehouse.DAL.Report
|
|
{
|
|
public class ComprehensiveYieldDal
|
|
{
|
|
public List<dynamic> ComprehensiveYield(string area_code)
|
|
{
|
|
using (var context = new mesModel())
|
|
{
|
|
string sql = @"exec [wh].[dbo].[sp_ComprehensiveYield] ";
|
|
sql += string.IsNullOrEmpty(area_code) ? " @v_area_code = N''" : " @v_area_code =N'" + area_code + "'";
|
|
//sql += string.IsNullOrEmpty(shift) ? " ,@v_shift=N''" : " ,@v_shift=N'" + shift + "'";
|
|
var res = context.DynamicListFromSql(sql, null);
|
|
return res.ToList();
|
|
}
|
|
}
|
|
|
|
//成品率
|
|
public List<dynamic> ComprehensiveYieldFinalYield(string area_code)
|
|
{
|
|
using (var context = new mesModel())
|
|
{
|
|
string sql = @"exec [wh].[dbo].[sp_ComprehensiveYield_finalyield] ";
|
|
sql += string.IsNullOrEmpty(area_code) ? " @v_area_code = N''" : " @v_area_code =N'" + area_code + "'";
|
|
//sql += string.IsNullOrEmpty(shift) ? " ,@v_shift=N''" : " ,@v_shift=N'" + shift + "'";
|
|
var res = context.DynamicListFromSql(sql, null);
|
|
return res.ToList();
|
|
}
|
|
}
|
|
|
|
//叠返
|
|
public List<dynamic> ComprehensiveYieldFoldBack(string area_code)
|
|
{
|
|
using (var context = new mesModel())
|
|
{
|
|
string sql = @"exec [wh].[dbo].[sp_ComprehensiveYield_Foldback] ";
|
|
sql += string.IsNullOrEmpty(area_code) ? " @v_area_code = N''" : " @v_area_code =N'" + area_code + "'";
|
|
//sql += string.IsNullOrEmpty(shift) ? " ,@v_shift=N''" : " ,@v_shift=N'" + shift + "'";
|
|
var res = context.DynamicListFromSql(sql, null);
|
|
return res.ToList();
|
|
}
|
|
}
|
|
|
|
//串返
|
|
public List<dynamic> ComprehensiveYieldWeldBack(string area_code)
|
|
{
|
|
using (var context = new mesModel())
|
|
{
|
|
string sql = @"exec [wh].[dbo].[sp_ComprehensiveYield_Weldback] ";
|
|
sql += string.IsNullOrEmpty(area_code) ? " @v_area_code = N''" : " @v_area_code =N'" + area_code + "'";
|
|
//sql += string.IsNullOrEmpty(shift) ? " ,@v_shift=N''" : " ,@v_shift=N'" + shift + "'";
|
|
var res = context.DynamicListFromSql(sql, null);
|
|
return res.ToList();
|
|
}
|
|
}
|
|
}
|
|
}
|