예제 #1
0
        public List <RefundEntity> GetList(Pagination pagination, string queryJson)
        {
            var expression = ExtLinq.True <RefundEntity>();
            var queryParam = queryJson.ToJObject();

            if (!queryParam["ComCode"].IsEmpty())
            {
                string ComCode = queryParam["ComCode"].ToString();
                expression = expression.And(t => t.OnRefund00.Contains(ComCode));
            }
            if (!queryParam["ComName"].IsEmpty())
            {
                string ComName = queryParam["ComName"].ToString();
                expression = expression.And(t => t.OnRefund01.Contains(ComName));
            }
            if (!queryParam["TstartTime"].IsEmpty())
            {
                DateTime strart = TimeFormat.StarTime(queryParam["TstartTime"].ToString());
                expression = expression.And(t => t.OnRefund03 >= strart);
            }
            if (!queryParam["TendTime"].IsEmpty())
            {
                DateTime end = TimeFormat.StarTime(queryParam["TendTime"].ToString());
                expression = expression.And(t => t.OnRefund03 <= end);
            }
            return(service.FindList(expression, pagination));
        }