141 lines
4.5 KiB
C#
141 lines
4.5 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Data;
|
|||
|
|
using WMS.Model.Stock;
|
|||
|
|
using WMS.IData;
|
|||
|
|
using WMS.Common;
|
|||
|
|
|
|||
|
|
namespace WMS.Business.Report
|
|||
|
|
{
|
|||
|
|
public class BussMIStockSearch : IBussFactory
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 用于库存查看窗体查询
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="model"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public List<MIStockModel> GetMiStockForLookUp()
|
|||
|
|
{
|
|||
|
|
MIStockModel model = new MIStockModel();
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetMiStockForLookUp(model);
|
|||
|
|
if(table!=null)
|
|||
|
|
{
|
|||
|
|
List<MIStockModel> MIStockModel = new List<MIStockModel>();
|
|||
|
|
MIStockModel = ConvertHelper<MIStockModel>.ConvertToList(table);
|
|||
|
|
return MIStockModel;
|
|||
|
|
}
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
public DataTable GetMiStockForLookUp2()
|
|||
|
|
{
|
|||
|
|
MIStockModel model = new MIStockModel();
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetMiStockForLookUp(model);
|
|||
|
|
return table;
|
|||
|
|
}
|
|||
|
|
//查询预出库任务
|
|||
|
|
public List<MIStockModel> GetMiStockForLookUp(string tasksts)
|
|||
|
|
{
|
|||
|
|
MIStockModel model = new MIStockModel();
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetMiStockForLookUp(model,tasksts);
|
|||
|
|
if (table != null)
|
|||
|
|
{
|
|||
|
|
List<MIStockModel> MIStockModel = new List<MIStockModel>();
|
|||
|
|
MIStockModel = ConvertHelper<MIStockModel>.ConvertToList(table);
|
|||
|
|
return MIStockModel;
|
|||
|
|
}
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
public DataTable GetMoveLot(string row, string cln, string layer, string area)
|
|||
|
|
{
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetMoveLot(row,cln,layer,area);
|
|||
|
|
|
|||
|
|
return table;
|
|||
|
|
}
|
|||
|
|
public DataTable GetMoveLot2(string row, string cln, string layer, string area, string ABC_ID)
|
|||
|
|
{
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetMoveLot2(row, cln, layer, area,ABC_ID);
|
|||
|
|
|
|||
|
|
return table;
|
|||
|
|
}
|
|||
|
|
/// <summary>
|
|||
|
|
/// 根据商品编号和年份 获得某年12个月库存量走向趋势
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="goods_id"></param>
|
|||
|
|
/// <param name="year"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public List<MIStockBackModel> MonthReportData(MIStockBackModel year)
|
|||
|
|
{
|
|||
|
|
DataTable dt = DataProvider.Instance.MIStockSearch.MonthReportData(year);
|
|||
|
|
List<MIStockBackModel> mis = new List<MIStockBackModel>();
|
|||
|
|
mis = ConvertHelper<MIStockBackModel>.ConvertToList(dt);
|
|||
|
|
if (DataLogErrWrite(dt, "获取某年12个月份每个月份的库存量"))
|
|||
|
|
{
|
|||
|
|
return mis;
|
|||
|
|
}
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public List<MIStockBackModel> DayReportData(MIStockBackModel mo)
|
|||
|
|
{
|
|||
|
|
DataTable dt = DataProvider.Instance.MIStockSearch.DayReportData(mo);
|
|||
|
|
List<MIStockBackModel> mi = new List<MIStockBackModel>();
|
|||
|
|
mi = ConvertHelper<MIStockBackModel>.ConvertToList(dt);
|
|||
|
|
if (DataLogErrWrite(dt, ""))
|
|||
|
|
{
|
|||
|
|
return mi;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
public DataTable GetVendorsSite()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetVendorsSite();
|
|||
|
|
|
|||
|
|
return table;
|
|||
|
|
}
|
|||
|
|
public DataTable GetVendors()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetVendors();
|
|||
|
|
|
|||
|
|
return table;
|
|||
|
|
}
|
|||
|
|
public DataTable GetSubinventory()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetSubinventory();
|
|||
|
|
|
|||
|
|
return table;
|
|||
|
|
}
|
|||
|
|
public DataTable GetItems()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetItems();
|
|||
|
|
|
|||
|
|
return table;
|
|||
|
|
}
|
|||
|
|
public DataTable GetReason()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DataTable table = DataProvider.Instance.MIStockSearch.GetReason();
|
|||
|
|
|
|||
|
|
return table;
|
|||
|
|
}
|
|||
|
|
public string DeleteReason(string id,string reason)
|
|||
|
|
{
|
|||
|
|
string errtext = string.Empty;
|
|||
|
|
errtext=DataProvider.Instance.MIStockSearch.DeleteReason(id,reason);
|
|||
|
|
return errtext;
|
|||
|
|
}
|
|||
|
|
public void AddReason(string id,string reason)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DataProvider.Instance.MIStockSearch.AddReason(id,reason);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|