From 2f848af7b25c9fc0b64e9f32ccd6317e6d86e635 Mon Sep 17 00:00:00 2001 From: zzj <31836194@qq.com> Date: Fri, 19 Jan 2024 08:55:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=98=8E=E7=BB=86=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=EF=BC=8C=E5=B1=95=E7=A4=BA=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Gz_AmountsController.cs | 24 +++++++ .../Controllers/Gz_ItemsController.cs | 13 ++++ .../Views/Gz_Amounts/Index.js | 4 +- .../Views/Gz_Items/Form.cshtml | 21 ++++--- .../Views/Gz_Items/Form.js | 2 + .../Views/Gz_Items/Index.cshtml | 5 +- .../Views/Gz_Items/Index.js | 28 ++++++--- .../XmlConfig/system.config | 2 +- .../Learun.Application.TwoDevelopment.csproj | 1 + .../Gz_Amounts/Gz_AmountsBLL.cs | 20 ++++++ .../Gz_Amounts/Gz_AmountsCols.cs | 63 +++++++++++++++++++ .../Gz_Amounts/Gz_AmountsIBLL.cs | 2 + .../Gz_Amounts/Gz_AmountsService.cs | 53 +++++++++++++++- .../Gz_Items/Gz_ItemsBLL.cs | 19 ++++++ .../Gz_Items/Gz_ItemsIBLL.cs | 2 + .../Gz_Items/Gz_ItemsService.cs | 33 ++++++++-- 16 files changed, 264 insertions(+), 28 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsCols.cs 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 4ba188ade..0413a9933 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 @@ -89,6 +89,30 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers }; return Success(jsonData); } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListCol(string pagination, string queryJson) + { + pagination = "{page:1,rows:1}"; + queryJson = "{Year:2023,Month:12}"; + Pagination paginationobj = pagination.ToObject(); + var data = gz_AmountsIBLL.GetPageListCol(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } /// /// 获取表单数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_ItemsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_ItemsController.cs index 78643af04..c4695487f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_ItemsController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_ItemsController.cs @@ -115,6 +115,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers gz_ItemsIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + + /// + /// 展示/取消 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult Show(string keyValue) + { + gz_ItemsIBLL.ShowOrHidden(keyValue); + return Success("操作成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.js index 0b5927f93..a3f6cbf60 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.js @@ -88,14 +88,14 @@ var bootstrap = function ($, learun) { }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/PersonnelManagement/Gz_Amounts/GetPageList', + url: top.$.rootUrl + '/PersonnelManagement/Gz_Amounts/GetPageListCol', headData: [ //{ label: 'Id', name: 'Id', width: 200, align: "left" }, { label: '年份', name: 'Year', width: 200, align: "left" }, { label: '月份', name: 'Month', width: 200, align: "left" }, { label: 'ItemId', name: 'ItemId', width: 200, align: "left" }, { label: 'UserNo', name: 'UserNo', width: 200, align: "left" }, - { label: '金额', name: 'Amount', width: 200, align: "left" }, + { label: 'ItemVal', name: 'OriVal', width: 200, align: "left" }, { label: 'CreateTime', name: 'CreateTime', width: 200, align: "left" }, ], mainId: 'Id', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Form.cshtml index 7e0d26100..453c7ec3b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Form.cshtml @@ -3,25 +3,26 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+ @*
Id*
Name*
+
*@ +
+
展示*
+ @**@ +
-
-
IsShow*
- -
-
-
ShowOrder*
- +
+
排序*
+
-
+ @*
CreateTime*
-
+
*@
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/Gz_Items/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Form.js index b4c6b1b26..297b481a2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Form.js @@ -11,9 +11,11 @@ var bootstrap = function ($, learun) { var selectedRow = learun.frameTab.currentIframe().selectedRow; var page = { init: function () { + page.bind(); page.initData(); }, bind: function () { + $('#IsShow').lrDataItemSelect({ code: 'YesOrNoBit' }); }, initData: function () { if (!!selectedRow) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.cshtml index 0abfdaf52..0fd1374dc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.cshtml @@ -26,9 +26,10 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.js index de4937c3c..b7ad5f494 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.js @@ -60,24 +60,38 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/Gz_Items/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/Gz_Items/DeleteForm', { keyValue: keyValue }, function () { }); } }); } }); + // 展示/取消 + $('#lr_show').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.httpPost(top.$.rootUrl + '/PersonnelManagement/Gz_Items/Show', { keyValue: keyValue }, function (res) { + learun.alert.success(res.info); + }) + } + }); }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/Gz_Items/GetPageList', headData: [ - { label: 'Id', name: 'Id', width: 200, align: "left" }, - { label: 'Name', name: 'Name', width: 200, align: "left" }, - { label: 'IsShow', name: 'IsShow', width: 200, align: "left" }, - { label: 'ShowOrder', name: 'ShowOrder', width: 200, align: "left" }, - { label: 'CreateTime', name: 'CreateTime', width: 200, align: "left" }, + { label: '编号', name: 'Id', width: 200, align: "left" }, + { label: '名称', name: 'Name', width: 200, align: "left" }, + { + label: '固定展示', name: 'IsShow', width: 200, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否"; + } + }, + { label: '排序', name: 'ShowOrder', width: 200, align: "left" }, + { label: '同步时间', name: 'CreateTime', width: 200, align: "left" }, ], - mainId:'Id', + mainId: 'Id', isPage: true }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index 81da9fa77..0aeb7a018 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -178,5 +178,5 @@ - + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 21a121219..2f581d224 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -400,6 +400,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsBLL.cs index c9ce4e691..380b9dcd7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsBLL.cs @@ -2,6 +2,7 @@ using System; using System.Data; using System.Collections.Generic; +using Learun.Application.TwoDevelopment.PersonnelManagement.Gz_Amounts; namespace Learun.Application.TwoDevelopment.PersonnelManagement { @@ -170,6 +171,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + + public IEnumerable GetPageListCol(Pagination pagination, string queryJson) + { + try + { + return gz_AmountsService.GetPageListCol(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsCols.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsCols.cs new file mode 100644 index 000000000..3b634ca85 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsCols.cs @@ -0,0 +1,63 @@ +namespace Learun.Application.TwoDevelopment.PersonnelManagement.Gz_Amounts +{ + public class Gz_AmountsCols + { + + #region + + public int Year { get; set; } + + public int Month { get; set; } + + /// + /// UserNo + /// + /// + public string UserNo { get; set; } + /// + /// 姓名 + /// + public string RealName { get; set; } + /// + /// 部门编码 + /// + public string DeptCode { get; set; } + /// + /// 部门 + /// + public string DeptName { get; set; } + /// + /// 职员类型编码 + /// + public string PersonTypeCode { get; set; } + /// + /// 职员类型 + /// + public string PersonType { get; set; } + /// + /// 发放时间 + /// + public string SendDate { get; set; } + /// + /// 发放次数 + /// + public string SendCount { get; set; } + /// + /// 扣款合计 + /// + public string TotalDeduction { get; set; } + /// + /// 实发合计 + /// + public string TotalSend { get; set; } + /// + /// 备注 + /// + public string Remark { get; set; } + /// + /// 审核人 + /// + public string Reviewer { get; set; } + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsIBLL.cs index 43d02455a..d42f437c3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsIBLL.cs @@ -1,6 +1,7 @@ using Learun.Util; using System.Data; using System.Collections.Generic; +using Learun.Application.TwoDevelopment.PersonnelManagement.Gz_Amounts; namespace Learun.Application.TwoDevelopment.PersonnelManagement { @@ -54,6 +55,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement #region 自定义 (DataTable failDt, int snum, int fnum) ExecuteImportExcel(DataTable dt, string[] ignoreCol, List cols, List itemList, string fileGuid); + IEnumerable GetPageListCol(Pagination pagination, string queryJson); #endregion } 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 a3df1f097..9cf99c7b0 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 @@ -1,4 +1,5 @@ using Dapper; +using Learun.Application.TwoDevelopment.PersonnelManagement.Gz_Amounts; using Learun.Cache.Base; using Learun.Cache.Factory; using Learun.DataBase.Repository; @@ -225,8 +226,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { num++; - var y = dr["年份"].ToString().Trim(); - var m = dr["月份"].ToString().Trim(); + var y = dr["发放年份"].ToString().Trim(); + var m = dr["发放月份"].ToString().Trim(); var u = dr["职员代码"].ToString().Trim(); if (y.IsEmpty() || m.IsEmpty() || u.IsEmpty() || !int.TryParse(y, out var year) || !int.TryParse(m, out var month)) @@ -312,6 +313,54 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + + public IEnumerable GetPageListCol(Pagination pagination, string queryJson) + { + try + { + var skip = pagination.rows * (pagination.page - 1); + + var qj = queryJson.ToJObject(); + + var year = Convert.ToInt32(qj["Year"]); + var month= Convert.ToInt32(qj["Month"]); + + var items = this.BaseRepository("CollegeMIS").FindList(x => x.IsShow == true).ToList(); + + var xmId = items.FirstOrDefault(x => x.Name == "职员姓名").Id; + var deptCodeId= items.FirstOrDefault(x => x.Name == "部门代码").Id; + var deptId = items.FirstOrDefault(x => x.Name == "部门名称").Id; + var ptcId = items.FirstOrDefault(x => x.Name == "职员类型代码").Id; + var ptId = items.FirstOrDefault(x => x.Name == "职员类型").Id; + var sendId = items.FirstOrDefault(x => x.Name == "发放时间").Id; + var sendCountId = items.FirstOrDefault(x => x.Name == "发放次数").Id; + var kchjId = items.FirstOrDefault(x => x.Name == "扣款合计").Id; + var sfhjId = items.FirstOrDefault(x => x.Name == "实发合计").Id; + var bzId = items.FirstOrDefault(x => x.Name == "备注").Id; + var shrId = items.FirstOrDefault(x => x.Name == "审核人").Id; + + var itemId = items.Select(x => x.Id).ToArray(); + + var query = this.BaseRepository("CollegeMIS").FindList(x => itemId.Contains(x.ItemId) && x.Year == year && x.Month == month).GroupBy(x => new { x.UserNo, x.Year, x.Month }); + pagination.records = query.Count(); + + var ls = query.Skip(skip).Take(pagination.rows).Select(x=>new Gz_AmountsCols {UserNo=x.Key.UserNo,Year=x.Key.Year??0,Month=x.Key.Month??0 ,RealName=x.FirstOrDefault(a=>a.ItemId==xmId)?.OriVal??"",DeptCode= x.FirstOrDefault(a => a.ItemId == deptCodeId)?.OriVal ?? "", DeptName= x.FirstOrDefault(a => a.ItemId == deptId)?.OriVal ?? "", PersonTypeCode= x.FirstOrDefault(a => a.ItemId == ptcId)?.OriVal ?? "", PersonType= x.FirstOrDefault(a => a.ItemId == ptId)?.OriVal ?? "", SendDate= x.FirstOrDefault(a => a.ItemId == sendId)?.OriVal ?? "", SendCount= x.FirstOrDefault(a => a.ItemId == sendCountId)?.OriVal ?? "", TotalDeduction= x.FirstOrDefault(a => a.ItemId == kchjId)?.OriVal ?? "", TotalSend= x.FirstOrDefault(a => a.ItemId == sfhjId)?.OriVal ?? "", Remark= x.FirstOrDefault(a => a.ItemId == bzId)?.OriVal ?? "", Reviewer= x.FirstOrDefault(a => a.ItemId == shrId)?.OriVal ?? "" }).ToList(); + + return ls; + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsBLL.cs index 8647e7fc0..5db4a1ca9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsBLL.cs @@ -169,6 +169,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + public void ShowOrHidden(string keyValue) + { + try + { + gz_ItemsService.ShowOrHidden(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsIBLL.cs index 14be2ba20..b7d855d0b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsIBLL.cs @@ -53,6 +53,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement #region 自定义 List SyncColumn(List cols); + + void ShowOrHidden(string keyValue); #endregion } } 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 01b1f402c..a0f309d19 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 @@ -26,7 +26,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// public Gz_ItemsService() { - fieldSql=@" + fieldSql = @" t.Id, t.Name, t.IsShow, @@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// 条件参数 /// - public IEnumerable GetList( string queryJson ) + public IEnumerable GetList(string queryJson) { try { @@ -136,7 +136,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); } catch (Exception ex) { @@ -200,7 +200,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement var lsName = ls.Select(x => x.Name).ToList(); var exc = cols.Except(lsName); var addLs = new List(); - if(exc.Any()) + if (exc.Any()) { addLs = exc.Select(x => new Gz_ItemsEntity { Name = x, Id = Guid.NewGuid().ToString() }).ToList(); var r = this.BaseRepository("CollegeMIS").Insert(addLs); @@ -219,6 +219,31 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + + + public void ShowOrHidden(string keyValue) + { + try + { + var dbm = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == keyValue); + if(dbm!=null) + { + dbm.IsShow = !dbm.IsShow; + this.BaseRepository("CollegeMIS").Update(dbm); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } } From 32aeb289ec01bffd529fa7b74544830c4630e70a Mon Sep 17 00:00:00 2001 From: zzj <31836194@qq.com> Date: Fri, 19 Jan 2024 14:19:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Gz_AmountsController.cs | 10 ++++- .../Views/Gz_Amounts/Index.cshtml | 37 ++++++++++--------- .../Gz_Amounts/Gz_AmountsBLL.cs | 19 ++++++++++ .../Gz_Amounts/Gz_AmountsIBLL.cs | 3 ++ .../Gz_Amounts/Gz_AmountsService.cs | 23 ++++++++++++ 5 files changed, 73 insertions(+), 19 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 0413a9933..68a86c4c3 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 @@ -100,7 +100,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult GetPageListCol(string pagination, string queryJson) { - pagination = "{page:1,rows:1}"; + //pagination = "{page:1,rows:1}"; queryJson = "{Year:2023,Month:12}"; Pagination paginationobj = pagination.ToObject(); var data = gz_AmountsIBLL.GetPageListCol(paginationobj, queryJson); @@ -125,6 +125,14 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers var data = gz_AmountsIBLL.GetEntity(keyValue); return Success(data); } + + [HttpGet] + [AjaxOnly] + public ActionResult GetDetail(string userNo,int year,int month) + { + var data = gz_AmountsIBLL.GetAmountsDetail(userNo, year, month); + return Success(data); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.cshtml index 837494f80..480fe188c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.cshtml @@ -37,7 +37,7 @@ 查看 导入 - 删除 + @*删除*@
@@ -123,11 +123,11 @@ border show-overflow-tooltip height="500"> - *@