using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Data.SqlClient;
|
using CY.IDAL;
|
using CY.Model;
|
using CY.Infrastructure.Configuration;
|
using CY.Infrastructure.Common;
|
using CY.BLL;
|
using System.Transactions;
|
using CY.Infrastructure.Query;
|
namespace CY.BLL.OA
|
{
|
public class OA_InventoryBLL
|
{
|
OA_ProcurementBLL _OA_ProcurementBLL = null;
|
IOA_InventoryDAL inventoryDAL = null;
|
OA_Inventory Inventory = null;
|
OA_OutOfStorage outOfStorage = null;
|
|
public OA_InventoryBLL()
|
{
|
Inventory = new OA_Inventory();
|
outOfStorage = new OA_OutOfStorage();
|
_OA_ProcurementBLL = new OA_ProcurementBLL();
|
inventoryDAL = AbstractFactory.Factory.GetDALByInterfaceName(AbstractFactory.DALInterface.IOA_InventoryDAL) as IOA_InventoryDAL;
|
|
}
|
|
/// <summary>
|
/// 判断货位中是否已经存在此产品
|
/// </summary>
|
/// <param name="model"></param>
|
/// <returns></returns>
|
public OA_Inventory IfHasModel(OA_Inventory model)
|
{
|
return inventoryDAL.IfHasModel(model);
|
|
}
|
|
/// <summary>
|
/// 更新产品入库信息
|
/// </summary>
|
/// <param name="model"></param>
|
/// <returns></returns>
|
public bool UpdateModel(Model.OA_Inventory model)
|
{
|
return inventoryDAL.UpdateModel(model);
|
|
}
|
|
/// <summary>
|
/// 插入产品入库信息
|
/// </summary>
|
/// <param name="model"></param>
|
/// <returns></returns>
|
public bool InsertModel(Model.OA_Inventory model)
|
{
|
return inventoryDAL.InserModel(model);
|
}
|
|
/// <summary>
|
/// 取得所有的库存信息
|
/// </summary>
|
/// <param name="pa"></param>
|
/// <param name="GoodsName"></param>
|
/// <param name="FirmId"></param>
|
/// <returns></returns>
|
public IEnumerable<Model.OA_Inventory> SelectModelList(Pagination pa, Guid FirmId, string PaperWeightId, string WarehouseId, string SpecificationId, string BrandId, string GoodsTypeId, string GoodsId, string Operator, DateTime? beginTime, DateTime? endTime)
|
{
|
return inventoryDAL.SelectModelList(pa, FirmId, PaperWeightId, WarehouseId, SpecificationId, BrandId, GoodsTypeId, GoodsId, Operator, beginTime, endTime);
|
}
|
|
/// <summary>
|
/// 仓库管理
|
/// </summary>
|
/// <param name="pa"></param>
|
/// <param name="GoodsName"></param>
|
/// <param name="FirmId"></param>
|
/// <returns></returns>
|
public decimal SelectModelListTotalPrice(Pagination pa, Guid FirmId, string PaperWeightId, string WarehouseId, string SpecificationId, string BrandId, string GoodsTypeId, string GoodsId, string Operator, DateTime? beginTime, DateTime? endTime)
|
{
|
return inventoryDAL.SelectModelListTotalPrice(pa, FirmId, PaperWeightId, WarehouseId, SpecificationId, BrandId, GoodsTypeId, GoodsId, Operator, beginTime, endTime);
|
}
|
|
/// <summary>
|
/// 获取库存货品的详细信息
|
/// </summary>
|
/// <param name="pa"></param>
|
/// <param name="FirmId"></param>
|
/// <param name="CargoSpaceName"></param>
|
/// <param name="WarehouseName"></param>
|
/// <param name="GoodsName"></param>
|
/// <param name="CommodityName"></param>
|
/// <param name="BrandName"></param>
|
/// <param name="SpecificationName"></param>
|
/// <returns></returns>
|
public IEnumerable<Model.OA_Inventory> SelecetModelDetailInfoList(Pagination pa, Guid FirmId, string WarehouseName, string GoodsName, string CommodityName, string BrandName, string SpecificationName)
|
{
|
|
return inventoryDAL.SelecetModelDetailInfoList(pa, FirmId, WarehouseName, GoodsName, CommodityName, BrandName, SpecificationName);
|
}
|
|
/// <summary>
|
/// 获取单个库存信息
|
/// </summary>
|
/// <param name="Keyid"></param>
|
/// <returns></returns>
|
public OA_Inventory GetModelByKeyid(int? Keyid)
|
{
|
return inventoryDAL.GetModelByKeyid(Keyid);
|
}
|
|
/// <summary>
|
/// 库存打印列表
|
/// </summary>
|
/// <param name="FirmId"></param>
|
/// <param name="Keyid"></param>
|
/// <returns></returns>
|
public IEnumerable<Model.OA_Inventory> SelectModelListByKeyid(Guid FirmId, string Keyid)
|
{
|
return inventoryDAL.SelectModelListByKeyid(FirmId, Keyid);
|
}
|
|
/// <summary>
|
/// 库存打印列表
|
/// </summary>
|
/// <param name="FirmId"></param>
|
/// <param name="Keyid"></param>
|
/// <returns></returns>
|
public decimal SelectModelListByKeyidTotalPrice(Guid FirmId, string Keyid)
|
{
|
return inventoryDAL.SelectModelListByKeyidTotalPrice(FirmId, Keyid);
|
}
|
}
|
}
|