| | |
| | | using System; |
| | | //using SqlSugar.Extensions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | { |
| | | return BaseDal.QueryFirst(x => SerialNumbers.Contains(x.SerialNumber)) != null; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æ¹æ¬¡å·ååæ®å·è·ååºåæç»ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="OrderNo">订åå·</param> |
| | | /// <param name="BatchNo">æ¹æ¬¡å·</param> |
| | | /// <returns></returns> |
| | | public Dt_StockInfoDetail Get_StockInfoDetail(string OrderNo, string BatchNo = null) |
| | | { |
| | | Dt_StockInfoDetail stockInfoDetail = null; |
| | | if (BatchNo != null) |
| | | { |
| | | stockInfoDetail = BaseDal.QueryFirst(x => x.OrderNo == OrderNo && x.BatchNo == BatchNo && (x.Status == StockStatusEmun.å
¥åºä¸.ObjToInt() || x.Status == StockStatusEmun.å·²å
¥åº.ObjToInt())); |
| | | } |
| | | else |
| | | { |
| | | stockInfoDetail = BaseDal.QueryFirst(x => x.OrderNo == OrderNo && (x.Status == StockStatusEmun.å
¥åºä¸.ObjToInt() || x.Status == StockStatusEmun.å·²å
¥åº.ObjToInt())); |
| | | } |
| | | return stockInfoDetail; |
| | | } |
| | | /// <summary> |
| | | /// è·åæå®åºå |
| | | /// </summary> |
| | | /// <param name="stockSelectViews"></param> |
| | | /// <returns></returns> |
| | | public List<Dt_StockInfoDetail> GetStockInfosByBatchNoCodes(List<StockSelectViewDTO> stockSelectViews) |
| | | { |
| | | List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>(); |
| | | foreach (var item in stockSelectViews) |
| | | { |
| | | var stockSelectView = BaseDal.QueryData(x => x.BatchNo == item.BatchNo && x.MaterielCode == item.MaterielCode); |
| | | if (stockSelectView.Count > 0) stockInfoDetails.AddRange(stockSelectView); |
| | | } |
| | | return stockInfoDetails; |
| | | } |
| | | public List<Dt_StockInfoDetail> GetStockInfosByBatchNoCodes() |
| | | { |
| | | List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>(); |
| | | |
| | | return stockInfoDetails; |
| | | } |
| | | |
| | | public List<Dt_StockInfoDetail> Get_StockInfoDetails(string OrderNo, string BatchNo = null) |
| | | { |
| | | List<Dt_StockInfoDetail> stockInfoDetails = null; |
| | | if (BatchNo != null) |
| | | { |
| | | stockInfoDetails = BaseDal.QueryData(x => x.OrderNo == OrderNo && x.BatchNo == BatchNo && (x.Status == StockStatusEmun.å
¥åºä¸.ObjToInt() || x.Status == StockStatusEmun.å·²å
¥åº.ObjToInt())); |
| | | } |
| | | else |
| | | { |
| | | stockInfoDetails = BaseDal.QueryData(x => x.OrderNo == OrderNo && (x.Status == StockStatusEmun.å
¥åºä¸.ObjToInt() || x.Status == StockStatusEmun.å·²å
¥åº.ObjToInt())); |
| | | } |
| | | return stockInfoDetails; |
| | | } |
| | | } |
| | | } |