| | |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models.Basic; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | using WIDESEA_Model.Models.Stock; |
| | | using WIDESEAWCS_Model.Models.TaskInfo; |
| | | |
| | |
| | | { |
| | | public class OutstockinfoService : ServiceBase<Dt_Outstockinfo, IRepository<Dt_Outstockinfo>>, IOutstockinfoService |
| | | { |
| | | public OutstockinfoService(IRepository<Dt_Outstockinfo> BaseDal) : base(BaseDal) |
| | | |
| | | private readonly IRepository<Dt_Warehouse> _WarehouseRepository; |
| | | public OutstockinfoService(IRepository<Dt_Outstockinfo> BaseDal,IRepository<Dt_Warehouse> WarehouseRepository) : base(BaseDal) |
| | | { |
| | | _WarehouseRepository = WarehouseRepository; |
| | | } |
| | | |
| | | public IRepository<Dt_Outstockinfo> Repository => BaseDal; |
| | | |
| | | //空桶å
¥åºè®¾ç½® |
| | | public WebResponseContent EmptyOutSet(string Code) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | |
| | | if (Code !=null && !Code.Equals("")) |
| | | { |
| | | Dt_Warehouse Warehouse = _WarehouseRepository.QueryFirst(x => x.MateriaCode == Code); |
| | | if (Warehouse == null) |
| | | { |
| | | Dt_Outstockinfo Outstockinfo = selectOutstockinfo(); |
| | | Outstockinfo.EmptyOutSet = Code; |
| | | BaseDal.UpdateData(Outstockinfo); |
| | | } |
| | | else |
| | | { |
| | | content.Message = "æ æ¤ç±»åç空桶"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | content.Message = "è¾å
¥ç弿 ¼å¼é误"; |
| | | } |
| | | |
| | | return content; |
| | | } |
| | | |
| | | //å·æ°é¦é¡µè®¾ç½® |
| | | public Dt_Outstockinfo Refresh() |
| | | { |