From 6ee35d97c90d5aa8860b9c9d6df22f76315515f1 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 28 六月 2021 12:44:13 +0800
Subject: [PATCH] 提交
---
zhengcaioa/Services/SimService.cs | 35 ++++++++++++++++++++++++++---------
1 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/zhengcaioa/Services/SimService.cs b/zhengcaioa/Services/SimService.cs
index 5278ed0..07fdc0e 100644
--- a/zhengcaioa/Services/SimService.cs
+++ b/zhengcaioa/Services/SimService.cs
@@ -289,19 +289,25 @@
ResultDataEntity<SimCostView> data = new ResultDataEntity<SimCostView>();
try
{
- var codedata = (from e in _context.SysCodes
- join c in _context.SysCodeDtls
- on e.Id equals c.CodeId
- where e.RecStatus == "A"
- && c.RecStatus == "A"
- && e.CodeTable == "t_sim_bind"
- && e.CodeField == "cardpro"
- select c).OrderBy(x => x.Sort).ToList();
+ //var codedata = (from e in _context.SysCodes
+ // join c in _context.SysCodeDtls
+ // on e.Id equals c.CodeId
+ // where e.RecStatus == "A"
+ // && c.RecStatus == "A"
+ // && e.CodeTable == "t_sim_bind"
+ // && e.CodeField == "cardpro"
+ // select c).OrderBy(x => x.Sort).ToList();
var dt = _context.SimCostView.OrderByDescending(c => c.accounted_time).ToList();
if (!string.IsNullOrEmpty(searchEntity.searchtime))
{
- //dt = dt.Where(c => c.simcard.Contains(searchEntity.simcard)).ToList();
+ var times = searchEntity.searchtime.Split('|');
+ if(times.Length==2)
+ {
+ DateTime d1 = DateTime.Parse(times[0]);
+ DateTime d2 = DateTime.Parse(times[1]);
+ dt = dt.Where(c => c.accounted_time > d1 && c.accounted_time < d2).ToList();
+ }
}
if (!string.IsNullOrEmpty(searchEntity.searchsim))
{
@@ -332,6 +338,17 @@
return data;
}
+
+ public SimCostView GetSimCost(string userid, int bill_year, int bill_month)
+ {
+
+ var entity = _context.SimCostView.Where(x => x.user_id == userid && x.bill_year == bill_year && x.bill_month == bill_month).FirstOrDefault();
+
+
+
+ return entity;
+ }
+
#endregion
}
}
--
Gitblit v1.9.1