1
yangpeixing
2 天以前 c69b6892e9e004db9cf5d0edc69bbd2fcc1d83db
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoService.cs
@@ -34,6 +34,7 @@
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;
@@ -124,11 +125,11 @@
            }
            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()
@@ -201,7 +202,7 @@
                }
                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);
@@ -607,5 +608,38 @@
        }
    }
    /// <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
}