From 8e1661b420e5c0807f8811c1d3a9bc1412dcaa97 Mon Sep 17 00:00:00 2001 From: liujiaqiang <1448951783@qq.com> Date: Mon, 3 Jul 2023 11:04:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=B9=A6=E7=AD=BE=E6=94=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=AB=AF=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=8C=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 24Hour/Controllers/Common/DocumentController.cs | 4 +++- 24Hour/Controllers/system/SystemControllerController.cs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/24Hour/Controllers/Common/DocumentController.cs b/24Hour/Controllers/Common/DocumentController.cs index b8f9ca3..b286526 100644 --- a/24Hour/Controllers/Common/DocumentController.cs +++ b/24Hour/Controllers/Common/DocumentController.cs @@ -94,8 +94,10 @@ namespace _24Hour.Controllers.Common .ToPageListAsync(Documentdata.PageIndex, Documentdata.PageSize, totalNumber); Documentdata.RowsCount = totalNumber; list.ForEach(q => { + if(!string.IsNullOrEmpty(q.djsj)) q.djsj = unixStartTime.AddMilliseconds(long.Parse(q.djsj)).ToString("yyyy-MM-dd HH:mm"); - q.sdsj = unixStartTime.AddMilliseconds(long.Parse(q.sdsj)).ToString("yyyy-MM-dd HH:mm"); + if (!string.IsNullOrEmpty(q.sdsj)) + q.sdsj = unixStartTime.AddMilliseconds(long.Parse(q.sdsj)).ToString("yyyy-MM-dd HH:mm"); }); var data = new QueryResult(Documentdata, list.OrderByDescending(q => q.sdsj).ToList()); diff --git a/24Hour/Controllers/system/SystemControllerController.cs b/24Hour/Controllers/system/SystemControllerController.cs index e24b3d2..f466ebd 100644 --- a/24Hour/Controllers/system/SystemControllerController.cs +++ b/24Hour/Controllers/system/SystemControllerController.cs @@ -61,7 +61,7 @@ namespace _24Hour.Controllers.system [Route("QueryUserlist")] public async Task QueryUserlist() { - var Unitlist = await _db.Queryable().Where(q => q.IsDeleted == 0 && q.isdeactivate == 0 && q.usertype == 0 && q.unitCode == _userdata.unitCode && q.phone != "admin").ToListAsync(); + var Unitlist = await _db.Queryable().Where(q => q.IsDeleted == 0 && q.isdeactivate == 0 && q.usertype == 0 && q.unitCode == _userdata.unitCode && q.phone != "admin"&& q.usertype == 0).ToListAsync(); result.IsSucceed = true; result.result = Unitlist.OrderByDescending(q => q.createtime).ToList(); return result; @@ -85,7 +85,7 @@ namespace _24Hour.Controllers.system .WhereIF(!UserModel.phone.IsNull(), q => q.phone.Contains(UserModel.phone)) .WhereIF(!UserModel.duties.IsNull(), q => q.duties.Contains(UserModel.duties)) .WhereIF(!UserModel.cardId.IsNull(), q => q.cardId.Contains(UserModel.cardId)) - .Where(q => q.IsDeleted == 0 &&q.phone!="admin") + .Where(q => q.IsDeleted == 0 &&q.phone!="admin" && q.usertype == 0) .ToPageListAsync(UserModel.PageIndex, UserModel.PageSize, totalNumber); UserModel.RowsCount = totalNumber; list.ForEach(q =>