| | |
| | | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | |
| | | /// <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 |
| | | } |