From 17852f2dd4c8a22c24aad6e3c47388e4d9f72131 Mon Sep 17 00:00:00 2001 From: dao Date: Tue, 7 May 2024 09:23:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E6=A3=80=E7=B4=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E5=B7=A5=E8=B5=84=E9=A1=B9=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Gz_AmountsController.cs | 2 +- .../Gz_Amounts/Gz_AmountsService.cs | 15 ++++++++++++++- .../Gz_Items/Gz_ItemsService.cs | 9 +++++---- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_AmountsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_AmountsController.cs index 8a3195018..35d5904aa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_AmountsController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_AmountsController.cs @@ -216,7 +216,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers #region 导入 /// - /// 成绩导入 + /// 导入 /// /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsService.cs index 75bfab582..684bee68a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsService.cs @@ -643,7 +643,20 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement var itemId = items.Select(x => x.Id).ToArray(); - var q = this.BaseRepository("CollegeMIS").FindList(x => itemId.Contains(x.ItemId) && ((yearStart == yearEnd && x.Year == yearStart && x.Month >= monthStart && x.Month <= monthEnd) || (yearStart < yearEnd && (x.Year == yearStart && x.Month >= monthStart) || (x.Year == yearEnd && x.Month <= monthEnd) || (x.Year > yearStart && x.Year < yearEnd)))); + var q = this.BaseRepository("CollegeMIS").FindList(x => itemId.Contains(x.ItemId)); + if(yearStart== yearEnd) + { + q = q.Where(x => x.Year == yearStart && x.Month >= monthStart && x.Month <= monthEnd); + } + else if(yearStart < yearEnd) + { + q = q.Where(x => (x.Year == yearStart && x.Month >= monthStart) || (x.Year == yearEnd && x.Month <= monthEnd) || (x.Year > yearStart && x.Year < yearEnd)); + } + else + { + total = 0; + return new List(); + } if (!userNo.IsEmpty()) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsService.cs index 257eadd43..aefa27196 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsService.cs @@ -85,14 +85,14 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement var qj = queryJson.ToJObject(); var query = this.BaseRepository("CollegeMIS").FindList(); - if(!qj["keyword"].IsEmpty()) + if (!qj["keyword"].IsEmpty()) { var k = qj["keyword"].ToString(); query = query.Where(x => x.Name.Contains(k)); } pagination.records = query.Count(); - query = query.OrderBy(x=>x.ShowOrder).Skip(skip).Take(pagination.rows); + query = query.OrderBy(x => x.ShowOrder).Skip(skip).Take(pagination.rows); return query; } @@ -216,7 +216,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement foreach (var x in exc) { i++; - var adm = new Gz_ItemsEntity { Name = x, Id = Guid.NewGuid().ToString(), ShowOrder = i }; + var o = cols.IndexOf(x) + 100; + var adm = new Gz_ItemsEntity { Name = x, Id = Guid.NewGuid().ToString(), ShowOrder = o }; addLs.Add(adm); } //addLs = exc.Select(x => new Gz_ItemsEntity { Name = x, Id = Guid.NewGuid().ToString() }).ToList(); @@ -243,7 +244,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var dbm = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == keyValue); - if(dbm!=null) + if (dbm != null) { dbm.IsShow = !dbm.IsShow; this.BaseRepository("CollegeMIS").Update(dbm);