1
yangpeixing
昨天 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;
@@ -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
}