|  |  | 
 |  |  | using WIDESEA_Model.Models; | 
 |  |  | using WIDESEA_Core.Helper; | 
 |  |  | using WIDESEA_Common.CommonEnum; | 
 |  |  | using WIDESEA_Core.Caches; | 
 |  |  |  | 
 |  |  | namespace WIDESEA_BasicService | 
 |  |  | { | 
 |  |  |     public partial class WarehouseService : ServiceBase<Dt_Warehouse, IWarehouseRepository>, IWarehouseService | 
 |  |  |     { | 
 |  |  |         public WarehouseService(IWarehouseRepository BaseDal) : base(BaseDal) | 
 |  |  |         private readonly ICacheService _cacheService; | 
 |  |  |         private readonly IPalletTypeInfoRepository _palletTypeInfoRepository; | 
 |  |  |  | 
 |  |  |         public WarehouseService(IWarehouseRepository BaseDal,ICacheService cacheService, IPalletTypeInfoRepository palletTypeInfoRepository) : base(BaseDal) | 
 |  |  |         { | 
 |  |  |             _cacheService = cacheService; | 
 |  |  |             _palletTypeInfoRepository = palletTypeInfoRepository; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public IWarehouseRepository Repository => BaseDal; | 
 |  |  |  | 
 |  |  |         public override WebResponseContent AddData(SaveModel saveModel) | 
 |  |  |         { | 
 |  |  |             Dt_Warehouse warehouse = saveModel.MainData.DicToModel<Dt_Warehouse>(); | 
 |  |  |             return base.AddData(warehouse); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public override WebResponseContent UpdateData(SaveModel saveModel) | 
 |  |  |         { | 
 |  |  |             return base.UpdateData(saveModel); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public override WebResponseContent DeleteData(object[] keys) | 
 |  |  |         { | 
 |  |  |             return base.DeleteData(keys); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 鎵归噺鍚敤浠撳簱 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="keys">浠撳簱涓婚敭鏁扮粍</param> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public WebResponseContent WarehouseEnableStatus(int[] keys) | 
 |  |  |         { | 
 |  |  |             List<Dt_Warehouse> warehouses = Repository.QueryData(x => keys.Contains(x.WarehouseId)); | 
 |  |  | 
 |  |  |             return WebResponseContent.Instance.OK(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 鎵归噺绂佺敤浠撳簱 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="keys">浠撳簱涓婚敭鏁扮粍</param> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public WebResponseContent WarehouseDisableStatus(int[] keys) | 
 |  |  |         { | 
 |  |  |             List<Dt_Warehouse> warehouses = Repository.QueryData(x => keys.Contains(x.WarehouseId)); | 
 |  |  | 
 |  |  |             return WebResponseContent.Instance.OK(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 鍗曚釜鍚敤浠撳簱 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="key">浠撳簱涓婚敭</param> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public WebResponseContent WarehouseEnableStatus(int key) | 
 |  |  |         { | 
 |  |  |             return WarehouseEnableStatus(new int[] { key }); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 鍗曚釜绂佺敤浠撳簱 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="key">浠撳簱涓婚敭</param> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public WebResponseContent WarehouseDisableStatus(int key) | 
 |  |  |         { | 
 |  |  |             return WarehouseDisableStatus(new int[] { key }); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     } | 
 |  |  | } |