username@email.com
2025-05-14 99ddfbcecf0fa2881eb3a91028257eef87dab6de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
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);
        }
    }
}