| | |
| | | |
| | | public class StockInfoService : ServiceBase<DtStockInfo, IStockInfoRepository>, IStockInfoService |
| | | { |
| | | private readonly LogFactory LogFactory = new LogFactory(); |
| | | private readonly ILocationStatusChangeRecordRepository _locationStatusChangeRecordRepository; |
| | | private readonly IDt_InboundOrderRepository _inboundOrderRepository; |
| | | private readonly IDt_InboundOrderService _inboundOrderService; |
| | |
| | | } |
| | | else if (item.Name.Contains("materielCode")) |
| | | { |
| | | materielCode = x => x.StockInfoDetails.Any(d => d.MaterielCode == item.Value); |
| | | materielCode = x => x.StockInfoDetails.Any(d => d.MaterielCode.Contains(item.Value)); |
| | | } |
| | | else if (item.Name.Contains("materielName")) |
| | | { |
| | | materielName = x => x.StockInfoDetails.Any(d => d.MaterielName == item.Value); |
| | | materielName = x => x.StockInfoDetails.Any(d => d.MaterielName.Contains(item.Value)); |
| | | } |
| | | } |
| | | //.IncludesAllFirstLayer() |
| | |
| | | } |
| | | locationsNew.Add(item); |
| | | } |
| | | else if (item.AreaId == 2) |
| | | else if (item.AreaId == 2 || item.AreaId == 7) |
| | | { |
| | | var locationLateral = _locationRepository.QueryData(x => x.Row == item.Row && x.Column > item.Column && x.Remark == item.Remark); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç¹æ®åºåº |
| | | /// </summary> |
| | | /// <param name="details"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | |
| | | public WebResponseContent UpdateDataStockDetail(List<DtStockInfoDetail> details) |
| | | { |
| | | try |
| | | { |
| | | List<DtStockInfoDetail> dtStockInfoDetails = new List<DtStockInfoDetail>(); |
| | | |
| | | foreach (var item in details) |
| | | { |
| | | DtStockInfoDetail dtStockInfoDetail = new DtStockInfoDetail(); |
| | | dtStockInfoDetail = _stockInfoDetailRepository.QueryFirst(it => it.Id == item.Id); |
| | | dtStockInfoDetails.Add(dtStockInfoDetail); |
| | | } |
| | | LogFactory.GetLog("ç¹æ®ä»»å¡").InfoFormat(true, "ç¹æ®ä»»å¡å", JsonConvert.SerializeObject(dtStockInfoDetails)); |
| | | if (_stockInfoDetailRepository.UpdateData(details)) |
| | | { |
| | | //è®°å½æ¥å¿ |
| | | LogFactory.GetLog("ç¹æ®ä»»å¡").InfoFormat(true, "ç¹æ®ä»»å¡å", JsonConvert.SerializeObject(details)); |
| | | } |
| | | } |
| | | catch(Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error("åºåºå¤±è´¥"); |
| | | } |
| | | return WebResponseContent.Instance.OK("åºåºæå"); |
| | | } |
| | | |
| | | #endregion |
| | | } |