public List <ReportPurchase> ReportOrderRetrun(int depid, int staffid, int depotid, int status, int valid, int supplier, string no, string m, string start, string end, int less, int big)
        {
            var list = _stockoutRepository.ReportOrderRetrun();

            if (depid != 0)
            {
                list = list.Where(p => p.depId == depid);
            }
            if (staffid != 0)
            {
                list = list.Where(p => p.staffId == staffid);
            }
            if (depotid != 0)
            {
                list = list.Where(p => p.depotId == depotid);
            }
            if (supplier != 0)
            {
                list = list.Where(p => p.supplierId == supplier);
            }
            if (status != -1)
            {
                list = list.Where(p => p.status == status);
            }
            if (valid == 1)
            {
                list = list.Where(p => p.valid == true);
            }
            if (valid == 0)
            {
                list = list.Where(p => p.valid == false);
            }
            if (no != "")
            {
                list = list.Where(p => p.returnNo.Contains(no) || p.purchaseNo.Contains(no) || p.stockinNo.Contains(no));
            }
            if (m != "")
            {
                list = list.Where(p => p.materialName.Contains(m) || p.materialModel.Contains(m) || p.materialUnit.Contains(m) || p.materialNo.Contains(m));
            }
            if (less != -404)
            {
                list = list.Where(p => p.returnAmount >= less);
            }
            if (big != -404)
            {
                list = list.Where(p => p.returnAmount < big);
            }
            if (start != "")
            {
                var ds = Convert.ToDateTime(start);
                list = list.Where(x => DateTime.Compare(x.createDate, ds) >= 0);
            }
            if (end != "")
            {
                var de = Convert.ToDateTime(end);
                list = list.Where(x => DateTime.Compare(x.createDate, de) < 0);
            }
            return(list.ToList());
        }