123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using wms.dto.response.hj;
- using wms.service.IService;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace wms.service.Service
- {
- public class FILOStrategyService: IWorkStrategyService
- {
- public List<LocationForStrategyInfo> Filter(List<LocationForStrategyInfo> listLocation)
- {
- if (listLocation == null || !listLocation.Any())
- {
- return listLocation;
- }
- List<LocationForStrategyInfo> list = null;
- if (_isContainer)
- {
- list = listLocation.OrderByDescending(p => p.StockList.Select(q => q.LastInTime)).ToList();
- }
- else
- {
- list = listLocation.OrderByDescending(p => p.StockList.Select(q => q.InTime)).ToList();
- }
-
- if (_days > 0)
- {
- //根据天数进行处理结果集
- }
- return list;
- }
- private int _days { get; set; }
- private bool _isContainer { get; set; }
- private FILOStrategyService() { }
- /// <summary>
- /// 几天认为是一个同等时间点
- /// </summary>
- /// <param name="days"></param>
- public FILOStrategyService(int days,bool isContainer)
- {
- _days = days;
- _isContainer = isContainer;
- }
- }
- }
|