# Conflicts: # Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.cshtml西昌分支
@@ -89,6 +89,30 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageListCol(string pagination, string queryJson) | |||||
{ | |||||
//pagination = "{page:1,rows:1}"; | |||||
queryJson = "{Year:2023,Month:12}"; | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = gz_AmountsIBLL.GetPageListCol(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取表单数据 | /// 获取表单数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -101,6 +125,14 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
var data = gz_AmountsIBLL.GetEntity(keyValue); | var data = gz_AmountsIBLL.GetEntity(keyValue); | ||||
return Success(data); | 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 | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -115,6 +115,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
gz_ItemsIBLL.SaveEntity(keyValue, entity); | gz_ItemsIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 展示/取消 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult Show(string keyValue) | |||||
{ | |||||
gz_ItemsIBLL.ShowOrHidden(keyValue); | |||||
return Success("操作成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -11,12 +11,12 @@ | |||||
</head> | </head> | ||||
<body> | <body> | ||||
<div id="app" style="height:100%"> | <div id="app" style="height:100%"> | ||||
<el-row :gutter="10" style="margin-bottom:12px"> | |||||
<el-row :gutter="14" style="margin-bottom:12px"> | |||||
<el-col :span="4"> | <el-col :span="4"> | ||||
<el-input placeholder="请输入教职工编号/姓名进行查询" v-model="query.keyword" clearable size="small"></el-input> | <el-input placeholder="请输入教职工编号/姓名进行查询" v-model="query.keyword" clearable size="small"></el-input> | ||||
</el-col> | </el-col> | ||||
<el-col :span="4"> | <el-col :span="4"> | ||||
<el-select v-model="query.department" clearable size="small" filterable placeholder="请选择部门"> | |||||
<el-select v-model="query.department" filterable clearable size="small" placeholder="请选择部门"> | |||||
<el-option v-for="item in departmentOptions" :label="item.label" :value="item.value"></el-option> | <el-option v-for="item in departmentOptions" :label="item.label" :value="item.value"></el-option> | ||||
</el-select> | </el-select> | ||||
</el-col> | </el-col> | ||||
@@ -36,7 +36,7 @@ | |||||
<a v-on:click="refresh" class="btn btn-default" style="margin-right:8px;font-size:14px"><i class="el-icon-refresh"></i></a> | <a v-on:click="refresh" class="btn btn-default" style="margin-right:8px;font-size:14px"><i class="el-icon-refresh"></i></a> | ||||
<a class="btn btn-default" v-on:click="detailShow"><i class="el-icon-edit-outline" style="margin-right:4px"></i>查看</a> | <a class="btn btn-default" v-on:click="detailShow"><i class="el-icon-edit-outline" style="margin-right:4px"></i>查看</a> | ||||
<a class="btn btn-default" v-on:click="importantData"><i class="el-icon-download" style="margin-right:4px"></i>导入</a> | <a class="btn btn-default" v-on:click="importantData"><i class="el-icon-download" style="margin-right:4px"></i>导入</a> | ||||
<a class="btn btn-default" v-on:click="del"><i class="el-icon-delete" style="margin-right:4px"></i>删除</a> | |||||
@*<a class="btn btn-default" v-on:click="del"><i class="el-icon-delete" style="margin-right:4px"></i>删除</a>*@ | |||||
</el-col> | </el-col> | ||||
</el-row> | </el-row> | ||||
<div style="height:calc(100% - 80px)"> | <div style="height:calc(100% - 80px)"> | ||||
@@ -122,11 +122,11 @@ | |||||
border | border | ||||
show-overflow-tooltip | show-overflow-tooltip | ||||
height="500"> | height="500"> | ||||
<template v-for="item in fixedColumn"> | |||||
@*<template v-for="item in fixedColumn"> | |||||
<el-table-column :prop="item.prop" | <el-table-column :prop="item.prop" | ||||
:label="item.label"> | :label="item.label"> | ||||
</el-table-column> | </el-table-column> | ||||
</template> | |||||
</template>*@ | |||||
<template v-for="item in trendsColumn"> | <template v-for="item in trendsColumn"> | ||||
<el-table-column :prop="item.prop" | <el-table-column :prop="item.prop" | ||||
:label="item.label"> | :label="item.label"> | ||||
@@ -154,21 +154,20 @@ | |||||
departmentOptions:[], | departmentOptions:[], | ||||
//固定列 | //固定列 | ||||
fixedColumn: [ | fixedColumn: [ | ||||
{ prop: 'UserNo', label: '部门名称' }, | |||||
{ prop: 'UserNo', label: '部门名称' }, | |||||
{ prop: 'UserNo', label: '职员类型代码' }, | |||||
{ prop: 'UserNo', label: '职员类型' }, | |||||
{ prop: 'DeptCode', label: '部门代码' }, | |||||
{ prop: 'DeptName', label: '部门名称' }, | |||||
{ prop: 'PersonTypeCode', label: '职员类型代码' }, | |||||
{ prop: 'PersonType', label: '职员类型' }, | |||||
{ prop: 'UserNo', label: '职员代码' }, | { prop: 'UserNo', label: '职员代码' }, | ||||
{ prop: 'UserNo', label: '职员姓名' }, | |||||
{ prop: 'CreateTime', label: '发放时间' }, | |||||
{ prop: 'UserNo', label: '发放次数' }, | |||||
{ prop: 'UserNo', label: '扣款合计' }, | |||||
{ prop: 'UserNo', label: '职员类型代码' }, | |||||
{ prop: 'RealName', label: '职员姓名' }, | |||||
{ prop: 'SendDate', label: '发放时间' }, | |||||
{ prop: 'SendCount', label: '发放次数' }, | |||||
{ prop: 'TotalDeduction', label: '扣款合计' }, | |||||
{ prop: 'Year', label: '发放年份' }, | { prop: 'Year', label: '发放年份' }, | ||||
{ prop: 'Month', label: '发放月份' }, | { prop: 'Month', label: '发放月份' }, | ||||
{ prop: 'Amount', label: '实发合计' }, | |||||
{ prop: 'UserNo', label: '备注' }, | |||||
{ prop: 'UserNo', label: '审核人' } | |||||
{ prop: 'TotalSend', label: '实发合计' }, | |||||
{ prop: 'Remark', label: '备注' }, | |||||
{ prop: 'Reviewer', label: '审核人' } | |||||
], | ], | ||||
// 导入 | // 导入 | ||||
dialogVisible: false, | dialogVisible: false, | ||||
@@ -247,7 +246,7 @@ | |||||
}), | }), | ||||
queryJson: JSON.stringify(this.query) | queryJson: JSON.stringify(this.query) | ||||
} | } | ||||
let result = await this.NetRequest('/PersonnelManagement/Gz_Amounts/GetPageList', $.param(getParams), 'get') | |||||
let result = await this.NetRequest('/PersonnelManagement/Gz_Amounts/GetPageListCol', $.param(getParams), 'get') | |||||
this.tableData = result.rows | this.tableData = result.rows | ||||
this.total = result.records | this.total = result.records | ||||
}, | }, | ||||
@@ -260,7 +259,7 @@ | |||||
}, | }, | ||||
// 删除 | // 删除 | ||||
del() { | del() { | ||||
let ids = this.multipleSelection.map(e => e.Id).toString() | |||||
let ids = this.multipleSelection.map(e => e.id).toString() | |||||
if (!ids) { | if (!ids) { | ||||
this.$message.warning('请选择需要删除的数据!') | this.$message.warning('请选择需要删除的数据!') | ||||
return | return | ||||
@@ -391,8 +390,10 @@ | |||||
return | return | ||||
} | } | ||||
this.detailData = [] | this.detailData = [] | ||||
let result = await this.NetRequest('/PersonnelManagement/Gz_Amounts/SaveForm', $.param({ keyValue: this.multipleSelection[0].Id }), 'get') | |||||
this.trendsColumn = [{ porp: 'aaa', label: '动态1' }] | |||||
let result = await this.NetRequest('/PersonnelManagement/Gz_Amounts/GetDetail', $.param({ userNo: this.multipleSelection[0].UserNo, year: this.multipleSelection[0].Year, month: this.multipleSelection[0].Month }), 'get') | |||||
debugger | |||||
this.detailData = result; | |||||
this.trendsColumn = [{ porp: 'Item2', label: 'Item1' }] | |||||
this.dialogVisible1 = true | this.dialogVisible1 = true | ||||
}, | }, | ||||
} | } | ||||
@@ -88,14 +88,14 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/PersonnelManagement/Gz_Amounts/GetPageList', | |||||
url: top.$.rootUrl + '/PersonnelManagement/Gz_Amounts/GetPageListCol', | |||||
headData: [ | headData: [ | ||||
//{ label: 'Id', name: 'Id', width: 200, align: "left" }, | //{ label: 'Id', name: 'Id', width: 200, align: "left" }, | ||||
{ label: '年份', name: 'Year', width: 200, align: "left" }, | { label: '年份', name: 'Year', width: 200, align: "left" }, | ||||
{ label: '月份', name: 'Month', width: 200, align: "left" }, | { label: '月份', name: 'Month', width: 200, align: "left" }, | ||||
{ label: 'ItemId', name: 'ItemId', width: 200, align: "left" }, | { label: 'ItemId', name: 'ItemId', width: 200, align: "left" }, | ||||
{ label: 'UserNo', name: 'UserNo', 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" }, | { label: 'CreateTime', name: 'CreateTime', width: 200, align: "left" }, | ||||
], | ], | ||||
mainId: 'Id', | mainId: 'Id', | ||||
@@ -3,25 +3,26 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
<div class="col-xs-6 lr-form-item"> | |||||
@*<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">Id<font face="宋体">*</font></div> | <div class="lr-form-item-title">Id<font face="宋体">*</font></div> | ||||
<input id="Id" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="Id" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item"> | <div class="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">Name<font face="宋体">*</font></div> | <div class="lr-form-item-title">Name<font face="宋体">*</font></div> | ||||
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">展示<font face="宋体">*</font></div> | |||||
@*<input id="IsShow" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />*@ | |||||
<div id="IsShow" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">IsShow<font face="宋体">*</font></div> | |||||
<input id="IsShow" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">ShowOrder<font face="宋体">*</font></div> | |||||
<input id="ShowOrder" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">排序<font face="宋体">*</font></div> | |||||
<input id="ShowOrder" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item"> | |||||
@*<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">CreateTime<font face="宋体">*</font></div> | <div class="lr-form-item-title">CreateTime<font face="宋体">*</font></div> | ||||
<input id="CreateTime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="CreateTime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | |||||
</div>*@ | |||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/Gz_Items/Form.js") | @Html.AppendJsFile("/Areas/PersonnelManagement/Views/Gz_Items/Form.js") |
@@ -11,9 +11,11 @@ var bootstrap = function ($, learun) { | |||||
var selectedRow = learun.frameTab.currentIframe().selectedRow; | var selectedRow = learun.frameTab.currentIframe().selectedRow; | ||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.bind(); | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#IsShow').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!selectedRow) { | if (!!selectedRow) { | ||||
@@ -26,9 +26,10 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_show" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 展示/取消</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -60,24 +60,38 @@ var bootstrap = function ($, learun) { | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | learun.layerConfirm('是否确认删除该项!', function (res) { | ||||
if (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 () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/PersonnelManagement/Gz_Items/GetPageList', | url: top.$.rootUrl + '/PersonnelManagement/Gz_Items/GetPageList', | ||||
headData: [ | 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 | isPage: true | ||||
}); | }); | ||||
page.search(); | page.search(); | ||||
@@ -178,5 +178,5 @@ | |||||
<!--触发excel开票任务的url--> | <!--触发excel开票任务的url--> | ||||
<add key="ExcelInvoice" value="http://localhost:60037/api/PayFeeResult/SetUnInvoiceHandle"/> | <add key="ExcelInvoice" value="http://localhost:60037/api/PayFeeResult/SetUnInvoiceHandle"/> | ||||
<!--工资导入EXCEL列忽略项--> | <!--工资导入EXCEL列忽略项--> | ||||
<add key="GzColumn" value="年份,月份,职员代码"/> | |||||
<add key="GzColumn" value="发放年份,发放月份,职员代码"/> | |||||
</appSettings> | </appSettings> |
@@ -400,6 +400,7 @@ | |||||
<Compile Include="PersonnelManagement\BC_PublishManagement\BC_PublishManagementEntity.cs" /> | <Compile Include="PersonnelManagement\BC_PublishManagement\BC_PublishManagementEntity.cs" /> | ||||
<Compile Include="PersonnelManagement\BC_PublishManagement\BC_PublishManagementIBLL.cs" /> | <Compile Include="PersonnelManagement\BC_PublishManagement\BC_PublishManagementIBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\BC_PublishManagement\BC_PublishManagementService.cs" /> | <Compile Include="PersonnelManagement\BC_PublishManagement\BC_PublishManagementService.cs" /> | ||||
<Compile Include="PersonnelManagement\Gz_Amounts\Gz_AmountsCols.cs" /> | |||||
<Compile Include="PersonnelManagement\MP_PerformanceTracking\MP_PerformanceTrackingBLL.cs" /> | <Compile Include="PersonnelManagement\MP_PerformanceTracking\MP_PerformanceTrackingBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\MP_PerformanceTracking\MP_PerformanceTrackingIBLL.cs" /> | <Compile Include="PersonnelManagement\MP_PerformanceTracking\MP_PerformanceTrackingIBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\MP_PerformanceTracking\MP_PerformanceTrackingService.cs" /> | <Compile Include="PersonnelManagement\MP_PerformanceTracking\MP_PerformanceTrackingService.cs" /> | ||||
@@ -2,6 +2,7 @@ | |||||
using System; | using System; | ||||
using System.Data; | using System.Data; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using Learun.Application.TwoDevelopment.PersonnelManagement.Gz_Amounts; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | namespace Learun.Application.TwoDevelopment.PersonnelManagement | ||||
{ | { | ||||
@@ -170,6 +171,44 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<Gz_AmountsCols> 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); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Tuple<string, string>> GetAmountsDetail(string userNo, int year, int month) | |||||
{ | |||||
try | |||||
{ | |||||
return gz_AmountsService.GetAmountsDetail(userNo, year, month); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -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; } | |||||
/// <summary> | |||||
/// UserNo | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public string UserNo { get; set; } | |||||
/// <summary> | |||||
/// 姓名 | |||||
/// </summary> | |||||
public string RealName { get; set; } | |||||
/// <summary> | |||||
/// 部门编码 | |||||
/// </summary> | |||||
public string DeptCode { get; set; } | |||||
/// <summary> | |||||
/// 部门 | |||||
/// </summary> | |||||
public string DeptName { get; set; } | |||||
/// <summary> | |||||
/// 职员类型编码 | |||||
/// </summary> | |||||
public string PersonTypeCode { get; set; } | |||||
/// <summary> | |||||
/// 职员类型 | |||||
/// </summary> | |||||
public string PersonType { get; set; } | |||||
/// <summary> | |||||
/// 发放时间 | |||||
/// </summary> | |||||
public string SendDate { get; set; } | |||||
/// <summary> | |||||
/// 发放次数 | |||||
/// </summary> | |||||
public string SendCount { get; set; } | |||||
/// <summary> | |||||
/// 扣款合计 | |||||
/// </summary> | |||||
public string TotalDeduction { get; set; } | |||||
/// <summary> | |||||
/// 实发合计 | |||||
/// </summary> | |||||
public string TotalSend { get; set; } | |||||
/// <summary> | |||||
/// 备注 | |||||
/// </summary> | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// 审核人 | |||||
/// </summary> | |||||
public string Reviewer { get; set; } | |||||
#endregion | |||||
} | |||||
} |
@@ -1,6 +1,8 @@ | |||||
using Learun.Util; | using Learun.Util; | ||||
using System.Data; | using System.Data; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using Learun.Application.TwoDevelopment.PersonnelManagement.Gz_Amounts; | |||||
using System; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | namespace Learun.Application.TwoDevelopment.PersonnelManagement | ||||
{ | { | ||||
@@ -54,6 +56,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
#region 自定义 | #region 自定义 | ||||
(DataTable failDt, int snum, int fnum) ExecuteImportExcel(DataTable dt, string[] ignoreCol, List<string> cols, List<Gz_ItemsEntity> itemList, string fileGuid); | (DataTable failDt, int snum, int fnum) ExecuteImportExcel(DataTable dt, string[] ignoreCol, List<string> cols, List<Gz_ItemsEntity> itemList, string fileGuid); | ||||
IEnumerable<Gz_AmountsCols> GetPageListCol(Pagination pagination, string queryJson); | |||||
IEnumerable<Tuple<string, string>> GetAmountsDetail(string userNo, int year, int month); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -1,4 +1,5 @@ | |||||
using Dapper; | using Dapper; | ||||
using Learun.Application.TwoDevelopment.PersonnelManagement.Gz_Amounts; | |||||
using Learun.Cache.Base; | using Learun.Cache.Base; | ||||
using Learun.Cache.Factory; | using Learun.Cache.Factory; | ||||
using Learun.DataBase.Repository; | using Learun.DataBase.Repository; | ||||
@@ -225,8 +226,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
try | try | ||||
{ | { | ||||
num++; | 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(); | var u = dr["职员代码"].ToString().Trim(); | ||||
if (y.IsEmpty() || m.IsEmpty() || u.IsEmpty() || !int.TryParse(y, out var year) || !int.TryParse(m, out var month)) | if (y.IsEmpty() || m.IsEmpty() || u.IsEmpty() || !int.TryParse(y, out var year) || !int.TryParse(m, out var month)) | ||||
@@ -312,6 +313,77 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<Gz_AmountsCols> 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<Gz_ItemsEntity>(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<Gz_AmountsEntity>(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); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Tuple<string,string>> GetAmountsDetail(string userNo, int year, int month) | |||||
{ | |||||
try | |||||
{ | |||||
var items = this.BaseRepository("CollegeMIS").FindList<Gz_ItemsEntity>(x => x.IsShow != true).ToList(); | |||||
var itemId = items.Select(x => x.Id).ToArray(); | |||||
var query = this.BaseRepository("CollegeMIS").FindList<Gz_AmountsEntity>(x => itemId.Contains(x.ItemId) && x.Year == year && x.Month == month && x.UserNo == userNo).Join(items, a => a.ItemId, b => b.Id, (a, b) => new Tuple<string, string>(b.Name, a.OriVal)); | |||||
return query; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -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 | #endregion | ||||
} | } | ||||
} | } |
@@ -53,6 +53,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
#region 自定义 | #region 自定义 | ||||
List<Gz_ItemsEntity> SyncColumn(List<string> cols); | List<Gz_ItemsEntity> SyncColumn(List<string> cols); | ||||
void ShowOrHidden(string keyValue); | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -26,7 +26,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// </summary> | /// </summary> | ||||
public Gz_ItemsService() | public Gz_ItemsService() | ||||
{ | { | ||||
fieldSql=@" | |||||
fieldSql = @" | |||||
t.Id, | t.Id, | ||||
t.Name, | t.Name, | ||||
t.IsShow, | t.IsShow, | ||||
@@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// </summary> | /// </summary> | ||||
/// <param name="queryJson">条件参数</param> | /// <param name="queryJson">条件参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<Gz_ItemsEntity> GetList( string queryJson ) | |||||
public IEnumerable<Gz_ItemsEntity> GetList(string queryJson) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
@@ -136,7 +136,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<Gz_ItemsEntity>(t=>t.Id == keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<Gz_ItemsEntity>(t => t.Id == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -200,7 +200,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
var lsName = ls.Select(x => x.Name).ToList(); | var lsName = ls.Select(x => x.Name).ToList(); | ||||
var exc = cols.Except(lsName); | var exc = cols.Except(lsName); | ||||
var addLs = new List<Gz_ItemsEntity>(); | var addLs = new List<Gz_ItemsEntity>(); | ||||
if(exc.Any()) | |||||
if (exc.Any()) | |||||
{ | { | ||||
addLs = exc.Select(x => new Gz_ItemsEntity { Name = x, Id = Guid.NewGuid().ToString() }).ToList(); | addLs = exc.Select(x => new Gz_ItemsEntity { Name = x, Id = Guid.NewGuid().ToString() }).ToList(); | ||||
var r = this.BaseRepository("CollegeMIS").Insert<Gz_ItemsEntity>(addLs); | var r = this.BaseRepository("CollegeMIS").Insert<Gz_ItemsEntity>(addLs); | ||||
@@ -219,6 +219,31 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void ShowOrHidden(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
var dbm = this.BaseRepository("CollegeMIS").FindEntity<Gz_ItemsEntity>(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 | #endregion | ||||
} | } | ||||
} | } |