StockInSameMaterialStrategyService.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. 
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using wms.dto.response.hj;
  7. using wms.service.IService;
  8. namespace wms.service.Service
  9. {
  10. /// <summary>
  11. /// 同种物料放一起入库策略
  12. /// </summary>
  13. public class StockInSameMaterialStrategyService : IWorkStrategyService
  14. {
  15. public List<LocationForStrategyInfo> Filter(List<LocationForStrategyInfo> listLocation)
  16. {
  17. if (listLocation == null || !listLocation.Any())
  18. {
  19. return listLocation;
  20. }
  21. List<LocationForStrategyInfo> list = null;
  22. if (_isContainer)
  23. {
  24. list = listLocation.ToList();
  25. }
  26. else
  27. {
  28. list = listLocation.ToList();
  29. }
  30. return list;
  31. }
  32. private string _materialCode { get; set; }
  33. private bool _isContainer { get; set; }
  34. private StockInSameMaterialStrategyService() { }
  35. /// <summary>
  36. /// 几天认为是一个同等时间点
  37. /// </summary>
  38. /// <param name="days"></param>
  39. public StockInSameMaterialStrategyService(string materialCode, bool isContainer)
  40. {
  41. _isContainer = isContainer;
  42. _materialCode = materialCode;
  43. }
  44. }
  45. }