@@ -0,0 +1,206 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.IO; | |||
using System.Web.Mvc; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-11-07 11:54 | |||
/// 描 述:工资条 | |||
/// </summary> | |||
public class WageScheduleController : MvcControllerBase | |||
{ | |||
private WageScheduleIBLL wageScheduleIBLL = new WageScheduleBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 我的工资条 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexMy() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 导入页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult ImportForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 人员类别 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult PeopleType() | |||
{ | |||
var data = wageScheduleIBLL.GetPeopleType(); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 岗位类别 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult PostType() | |||
{ | |||
var data = wageScheduleIBLL.GetPostType(); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 薪级 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult PayGrade() | |||
{ | |||
var data = wageScheduleIBLL.GetPayGrade(); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetList(string queryJson) | |||
{ | |||
var data = wageScheduleIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = wageScheduleIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var WageScheduleData = wageScheduleIBLL.GetEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
WageSchedule = WageScheduleData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
wageScheduleIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, WageScheduleEntity entity) | |||
{ | |||
wageScheduleIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展代码 | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult CheckForm(string keyValue,string Status) | |||
{ | |||
wageScheduleIBLL.CheckEntity(keyValue, Status); | |||
return Success("审核成功!"); | |||
} | |||
/// <summary> | |||
/// 下载文件 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult DownTemplate() | |||
{ | |||
FileStreamResult result = null; | |||
try | |||
{ | |||
var path = Server.MapPath("~/Content/excel/"); | |||
var pathoffull = path + "SalarySheetImport.xls"; | |||
FileStream fsread = fsread = new FileStream(pathoffull, FileMode.OpenOrCreate, FileAccess.ReadWrite); | |||
result = File(fsread, "application/ms-excel", "工资条导入.xls"); | |||
return result; | |||
} | |||
catch (Exception ex) | |||
{ | |||
return null; | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,160 @@ | |||
@{ | |||
ViewBag.Title = "工资条"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">序号</div> | |||
<input id="No" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="ClassInfo"> | |||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||
<div id="EmpName" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">人员类别</div> | |||
<input id="PeopleType" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">岗位等级</div> | |||
<input id="PostType" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">薪级</div> | |||
<input id="PayGrade" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">岗位工资</div> | |||
<input id="PostWage" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">薪级工资</div> | |||
<input id="PayGradeWage" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">百分之十</div> | |||
<input id="TenPercent" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title" style="width: 40%;">基础性绩效(绩效)</div> | |||
<input id="BasicsPerformance" type="text" class="form-control" style="width: 80%; float: right;" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">奖励绩效(绩效)</div> | |||
<input id="AwardPerformance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title" style="width: 40%;">基础性绩效(单列)</div> | |||
<input id="SeparateBasicsPerformance" type="text" class="form-control" style="width: 80%; float: right;" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">奖励绩效(单列)</div> | |||
<input id="SeparateAwardPerformance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-3 lr-form-item"> | |||
<div class="lr-form-item-title">艰边津贴</div> | |||
<input id="RoughEdgeAllowance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-3 lr-form-item"> | |||
<div class="lr-form-item-title">民族津贴</div> | |||
<input id="NationAllowance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-3 lr-form-item"> | |||
<div class="lr-form-item-title">教龄津贴</div> | |||
<input id="TeachAllowance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-3 lr-form-item"> | |||
<div class="lr-form-item-title">特级教师津贴</div> | |||
<input id="SuperfineTeacherResearch" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">交通补贴</div> | |||
<input id="Transportation" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">物业补贴</div> | |||
<input id="RealeState" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">工改保留补贴</div> | |||
<input id="WorkKeep" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">女职工卫生费</div> | |||
<input id="GirlStaffSanitation" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">乡镇补贴</div> | |||
<input id="TeacherAndTown" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">住房补贴</div> | |||
<input id="HousingAllowance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">住房公积金</div> | |||
<input id="HousingFundAllowance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">其他</div> | |||
<input id="OtherOne" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">应发合计</div> | |||
<input id="TotalGrossPay" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">代扣合计</div> | |||
<input id="DeductionsSubtotal" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">公积金</div> | |||
<input id="AccumulationFund" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">养老保险</div> | |||
<input id="EndowmentInsurance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">职业年金</div> | |||
<input id="OccupationalAnnuities" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">医疗保险</div> | |||
<input id="MedicalInsurance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">失业保险</div> | |||
<input id="UnemploymentInsurance" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">工会工费</div> | |||
<input id="LaborUnionWage" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">个人所得税</div> | |||
<input id="PersonalIncomeTax" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">其他</div> | |||
<input id="Other" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">实发合计</div> | |||
<input id="NetCombined" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">工资卡号<font face="宋体">*</font></div> | |||
<input id="WageCardNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">发放年份<font face="宋体">*</font></div> | |||
<div id="IssueYear" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">发放月份<font face="宋体">*</font></div> | |||
<div id="IssueMonth" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/WageSchedule/Form.js") |
@@ -0,0 +1,66 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-11-07 11:54 | |||
* 描 述:工资条 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
//var selectedRow = learun.frameTab.currentIframe().selectedRow; | |||
var page = { | |||
init: function () { | |||
page.initData(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
//年份 | |||
$('#IssueYear').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#IssueMonth').lrDataItemSelect({ code: 'MPMonth' }); | |||
$('#EmpName').lrDataSourceSelect({ | |||
allowSearch: true, | |||
Height: 200, | |||
code: 'teacheruserdata', value: 'f_realname', text: 'f_realname' | |||
}); | |||
}, | |||
initData: function () { | |||
//if (!!selectedRow) { | |||
// $('#form').lrSetFormData(selectedRow); | |||
//} | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
//$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
$('#form').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
$("#EmpName").val($("#EmpName").find(".lr-select-placeholder").text()); | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,25 @@ | |||
@{ | |||
ViewBag.Title = "Form"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<link href="~/Content/webuploader/webuploader.css" rel="stylesheet" /> | |||
<script src="~/Content/webuploader/webuploader.nolog.min.js"></script> | |||
@Html.AppendCssFile("/Areas/EducationalAdministration/Views/WageSchedule/ImportForm.css") | |||
<div class="lr-form-layout lr-form-layout-top-bottom"> | |||
<div class="lr-form-layout-header"> | |||
<div id="lr_add_file_btn"><i class="fa fa-cloud-upload"></i><span class="lrlt">上传文件</span></div> | |||
<div class="webuploader-pick" id="lr_down_file_btn"><i class="fa fa-download"></i><span class="lrlt">下载模板</span></div> | |||
</div> | |||
<div class="lr-form-layout-body"> | |||
<div class="lr-form-file-queue-wrap" id="lr_form_file_queue"> | |||
<div class="lr-form-file-queue" id="lr_form_file_queue_list"> | |||
</div> | |||
<div class="lr-form-file-queue-bg"> | |||
<h1><span class="lrlt">试试将电脑里的文件拖拽到此上传</span></h1> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/WageSchedule/ImportForm.js") |
@@ -0,0 +1,136 @@ | |||
.lr-form-layout-body { | |||
padding:0 5px 5px 5px; | |||
} | |||
.lr-form-file-queue-wrap { | |||
position:relative; | |||
width:100%; | |||
height:100%; | |||
border:1px solid #ddd; | |||
border-radius:4px; | |||
} | |||
.lr-form-file-queue { | |||
position:relative; | |||
} | |||
.lr-form-file-queue { | |||
position:relative; | |||
} | |||
.lr-form-file-queue-item { | |||
position:relative; | |||
width:100%; | |||
height:50px; | |||
border-bottom:1px solid #ddd; | |||
padding-left:60px; | |||
} | |||
.lr-file-image { | |||
position:absolute; | |||
top:5px; | |||
left:5px; | |||
} | |||
.lr-file-image img { | |||
width:40px; | |||
height:40px; | |||
} | |||
.lr-file-name{ | |||
line-height:50px; | |||
} | |||
.lr-msg { | |||
position:absolute; | |||
top:0; | |||
right:5px; | |||
font-size: 25px; | |||
line-height:50px; | |||
} | |||
.lr-msg .fa-check-circle{ | |||
color: #5cb85c; | |||
} | |||
.lr-msg .fa-exclamation-circle { | |||
color: #b94a48; | |||
} | |||
.lr-msg2 { | |||
position:absolute; | |||
top:0; | |||
right:5px; | |||
line-height:50px; | |||
} | |||
.lr-msg2 span { | |||
color:#333; | |||
font-size:14px; | |||
margin-right:5px; | |||
} | |||
.lr-tool-bar { | |||
position:absolute; | |||
top:0; | |||
right:35px; | |||
font-size: 25px; | |||
line-height:50px; | |||
color:#666; | |||
cursor:pointer; | |||
} | |||
.lr-tool-bar > i { | |||
margin-left:8px; | |||
} | |||
.lr-tool-bar .fa-minus-circle { | |||
color: #b94a48; | |||
} | |||
.lr-tool-bar .fa-cloud-download { | |||
color: #3498db; | |||
} | |||
.lr-uploader-progress { | |||
position:absolute; | |||
bottom:2px; | |||
left:60px; | |||
height:4px; | |||
width:500px; | |||
width:calc(100% - 90px); | |||
} | |||
.lr-uploader-progress-bar { | |||
position:relative; | |||
height:100%; | |||
background-color:#039cfd; | |||
border-radius:4px; | |||
} | |||
.lr-form-file-queue-bg { | |||
position:absolute; | |||
top:50%; | |||
left:50%; | |||
width:300px; | |||
height:30px; | |||
line-height:30px; | |||
margin:-15px 0 0 -150px; | |||
} | |||
.lr-form-file-queue-bg h1 { | |||
color: #666; | |||
font-size: 20px; | |||
font-family: Microsoft Yahei; | |||
padding-bottom: 2px; | |||
margin: 0; | |||
} | |||
#lr_down_file_btn { | |||
position:absolute; | |||
right:5px; | |||
background:#fff; | |||
border:1px solid #ddd; | |||
color:#333; | |||
} | |||
#lr_down_file_btn:hover { | |||
color:#337ab7; | |||
} | |||
/*对百度插件的样式重写*/ | |||
.webuploader-container { | |||
position:absolute; | |||
} | |||
.webuploader-pick { | |||
padding:8px 15px; | |||
background-color:#039cfd; | |||
} | |||
.webuploader-pick-hover { | |||
background-color:#027dcb; | |||
} |
@@ -0,0 +1,242 @@ | |||
/* | |||
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:陈彬彬 | |||
* 日 期:2017.04.11 | |||
* 描 述:导入Excel | |||
*/ | |||
var id = request('id'); | |||
var keyVaule = ''; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page1 = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#lr_add_format').on('click', function () { | |||
currentColRow = null; | |||
learun.layerForm({ | |||
id: 'FormatForm', | |||
title: '添加', | |||
url: top.$.rootUrl + '/LR_SystemModule/CodeRule/FormatForm', | |||
width: 450, | |||
height: 310, | |||
callBack: function (id) { | |||
return top[id].acceptClick(function (data) { | |||
$('#gridtable').jfGridSet('addRow', { row: data }); | |||
}); | |||
} | |||
}); | |||
}); | |||
$('#lr_edit_format').on('click', function () { | |||
currentColRow = $('#gridtable').jfGridGet('rowdata'); | |||
var _id = currentColRow ? currentColRow.itemTypeName : ''; | |||
if (learun.checkrow(_id)) { | |||
learun.layerForm({ | |||
id: 'FormatForm', | |||
title: '修改', | |||
url: top.$.rootUrl + '/LR_SystemModule/CodeRule/FormatForm', | |||
width: 450, | |||
height: 310, | |||
callBack: function (id) { | |||
return top[id].acceptClick(function (data) { | |||
$('#gridtable').jfGridSet('updateRow', { row: data }); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
$('#lr_delete_format').on('click', function () { | |||
currentColRow = null; | |||
var row = $('#gridtable').jfGridGet('rowdata'); | |||
var _id = row ? row.itemTypeName : ''; | |||
if (learun.checkrow(_id)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$('#gridtable').jfGridSet('removeRow'); | |||
top.layer.close(index); //再执行关闭 | |||
} | |||
}); | |||
} | |||
}); | |||
$('#gridtable').jfGrid({ | |||
headData: [ | |||
{ label: "前缀", name: "itemTypeName", width: 120, align: "left" }, | |||
{ label: "格式", name: "formatStr", width: 120, align: "left" }, | |||
{ label: "步长", name: "stepValue", width: 100, align: "left" }, | |||
{ label: "初始值", name: "initValue", width: 120, align: "left" }, | |||
{ label: "说明", name: "description", width: 180, align: "left" } | |||
] | |||
}); | |||
/*检测重复项*/ | |||
$('#F_EnCode').on('blur', function () { | |||
$.lrExistField(keyValue, 'F_EnCode', top.$.rootUrl + '/LR_SystemModule/CodeRule/ExistEnCode'); | |||
}); | |||
$('#F_FullName').on('blur', function () { | |||
$.lrExistField(keyValue, 'F_FullName', top.$.rootUrl + '/LR_SystemModule/CodeRule/ExistFullName'); | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!selectedRow) { | |||
keyValue = selectedRow.F_RuleId; | |||
$('#form').lrSetFormData(selectedRow); | |||
var formatdata = JSON.parse(selectedRow.F_RuleFormatJson); | |||
$('#gridtable').jfGridSet('refreshdata', formatdata); | |||
} | |||
} | |||
}; | |||
var fileInfo = {}; | |||
// 触发合并文件碎片 | |||
var mergeFileChunks = function (file) { | |||
var param = {}; | |||
param['__RequestVerificationToken'] = $.lrToken; | |||
param['fileId'] = fileInfo[file.id].fileGuid; | |||
param['chunks'] = fileInfo[file.id].chunks; | |||
param['ext'] = file.ext; | |||
param['templateId'] = id; | |||
learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/ExcelImport/SalarySheetImport", param, function (res) { | |||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||
$fileItem.find('.lr-uploader-progress').remove(); | |||
if (res.code == learun.httpCode.success) { | |||
if (res.data.Success != '0') { | |||
learun.alert.success('导入成功' + res.data.Success + '条'); | |||
} | |||
// 文件保存成功后 | |||
$fileItem.append('<div class="lr-msg2"><span>' + res.data.Success + '</span><span>/</span><span style="color:#b94a48;" >' + res.data.Fail + '</span></div>'); | |||
// 如果有失败 | |||
if (res.data.Fail != '0') | |||
{ | |||
learun.download({ url: top.$.rootUrl + '/LR_SystemModule/ExcelImport/DownImportErrorFile', param: { fileId: fileInfo[file.id].fileGuid, fileName: fileInfo[file.id].name, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||
} | |||
} | |||
else { | |||
$fileItem.append('<div class="lr-msg"><i class="fa fa-exclamation-circle"></i></div>'); | |||
} | |||
}); | |||
} | |||
// 触发清楚文件碎片 | |||
var reomveFileChunks = function (file) { | |||
var param = {}; | |||
param['__RequestVerificationToken'] = $.lrToken; | |||
param['fileGuid'] = fileInfo[file.id].fileGuid; | |||
param['chunks'] = fileInfo[file.id].chunks; | |||
learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/MergeAnnexesFile", param, function (res) { }); | |||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||
$fileItem.find('.lr-uploader-progress').remove(); | |||
$fileItem.append('<div class="lr-msg"><i class="fa fa-exclamation-circle"></i></div>'); | |||
} | |||
var page = { | |||
uploader: null, | |||
init: function () { | |||
/*模板下载*/ | |||
$('#lr_down_file_btn').on('click', function () { | |||
learun.download({ url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/DownTemplate', param: { keyValue: id, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||
}); | |||
if (!WebUploader.Uploader.support()) { | |||
alert('Web Uploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器'); | |||
throw new Error('WebUploader does not support the browser you are using.'); | |||
} | |||
page.uploader = WebUploader.create({ | |||
auto: true, | |||
swf: top.$.rootUrl + '/Content/webuploader/Uploader.swf', | |||
// 文件接收服务端。 | |||
server: top.$.rootUrl + "/LR_SystemModule/Annexes/UploadAnnexesFileChunk", | |||
// 选择文件的按钮。可选。 | |||
// 内部根据当前运行是创建,可能是input元素,也可能是flash. | |||
pick: '#lr_add_file_btn', | |||
dnd: '#lr_form_file_queue', | |||
paste: 'document.body', | |||
disableGlobalDnd: true, | |||
accept: { | |||
extensions: "xls,xlsx" | |||
}, | |||
multiple: true, | |||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传! | |||
resize: false, | |||
// 文件分片上传 | |||
chunked: true, | |||
chunkRetry: 3, | |||
prepareNextFile: true, | |||
chunkSize: '1048576', | |||
// 上传参数 | |||
formData: { | |||
__RequestVerificationToken: $.lrToken | |||
} | |||
}); | |||
page.uploader.on('fileQueued', page.fileQueued); | |||
page.uploader.on('uploadStart', page.uploadStart); | |||
page.uploader.on('uploadBeforeSend', page.uploadBeforeSend); | |||
page.uploader.on('uploadProgress', page.uploadProgress); | |||
page.uploader.on('uploadSuccess', page.uploadSuccess); | |||
page.uploader.on('uploadError', page.uploadError); | |||
page.uploader.on('uploadComplete', page.uploadComplete); | |||
page.uploader.on('error', page.error); | |||
$('#lr_form_file_queue').lrscroll(); | |||
}, | |||
fileQueued: function (file) {// 文件加载到队列 | |||
fileInfo[file.id] = { name: file.name }; | |||
$('#lr_form_file_queue .lr-form-file-queue-bg').hide(); | |||
// 添加一条文件记录 | |||
var $item = $('<div class="lr-form-file-queue-item" id="lr_filequeue_' + file.id + '" ></div>'); | |||
$item.append('<div class="lr-file-image"><img src="' + top.$.rootUrl + '/Content/images/filetype/' + file.ext + '.png"></div>'); | |||
$item.append('<span class="lr-file-name">' + file.name + '(' + learun.countFileSize(file.size) + ')</span>'); | |||
$('#lr_form_file_queue_list').append($item); | |||
}, | |||
uploadStart: function (file) { | |||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||
$fileItem.append('<div class="lr-uploader-progress"><div class="lr-uploader-progress-bar" style="width:0%;"></div></div>'); | |||
}, | |||
uploadBeforeSend: function (object, data, headers) { | |||
data.chunk = data.chunk || 0; | |||
data.chunks = data.chunks || 1; | |||
fileInfo[data.id].fileGuid = fileInfo[data.id].fileGuid || WebUploader.Base.guid(); | |||
data.fileGuid = fileInfo[data.id].fileGuid; | |||
fileInfo[data.id].chunks = data.chunks; | |||
}, | |||
uploadProgress: function (file, percentage) { | |||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||
$fileItem.find('.lr-uploader-progress-bar').css('width', (percentage * 100 + '%')); | |||
}, | |||
uploadSuccess: function (file, res) { | |||
if (res.code == 200) {// 上传成功 | |||
mergeFileChunks(file); | |||
} | |||
else {// 上传失败 | |||
reomveFileChunks(file); | |||
} | |||
}, | |||
uploadError: function (file, code) { | |||
reomveFileChunks(file); | |||
}, | |||
uploadComplete: function (file) { | |||
}, | |||
error: function (type) { | |||
switch (type) { | |||
case 'Q_TYPE_DENIED': | |||
learun.alert.error('当前文件类型不允许上传'); | |||
break; | |||
}; | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,64 @@ | |||
@{ | |||
ViewBag.Title = "工资条"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">年份</div> | |||
<div id="IssueYear"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">月份</div> | |||
<div id="IssueMonth"></div> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">人员类别</div> | |||
<div id="PeopleType"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">岗位等级</div> | |||
<div id="PostType"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">薪级</div> | |||
<div id="PayGrade"></div> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">身份证号</div> | |||
<input id="WageCardNo" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_checkall" class="btn btn-default"><i class="fa fa-print"></i> 审核全部</a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | |||
<a id="lr_import" class="btn btn-default"><i class="fa fa-share-square-o"></i> 导入</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/WageSchedule/Index.js") |
@@ -0,0 +1,238 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-11-07 11:54 | |||
* 描 述:工资条 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
//年份 | |||
$('#IssueYear').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#IssueMonth').lrDataItemSelect({ code: 'MPMonth' }); | |||
//$('#PeopleType').lrselect({ | |||
// placeholder: "请选择人员类别", | |||
// allowSearch: true, | |||
// url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/PeopleType', | |||
// value: 'PeopleType', | |||
// text: 'PeopleType' | |||
//}); | |||
//$('#PostType').lrselect({ | |||
// placeholder: "请选择岗位等级", | |||
// allowSearch: true, | |||
// url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/PostType', | |||
// value: 'PostType', | |||
// text: 'PostType' | |||
//}); | |||
//$('#PayGrade').lrselect({ | |||
// placeholder: "请选择薪级", | |||
// allowSearch: true, | |||
// url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/PayGrade', | |||
// value: 'PayGrade', | |||
// text: 'PayGrade' | |||
//}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/Form', | |||
width: 800, | |||
height: 800, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark'); | |||
if (CheckMark.indexOf('1') != -1) { | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/Form?keyValue=' + keyValue, | |||
width: 800, | |||
height: 800, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark'); | |||
if (learun.checkrow(keyValue)) { | |||
if (CheckMark.indexOf('1') != -1) { | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//审核 | |||
$('#lr_check').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark'); | |||
if (CheckMark.indexOf('1') != -1) { | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认审核该项?', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/CheckForm', { keyValue: keyValue, Status: '1' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//去审 | |||
$('#lr_uncheck').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark'); | |||
var CheckMarkArr = CheckMark.split(','); | |||
if ($.inArray('0', CheckMarkArr) != -1 || $.inArray('', CheckMarkArr) != -1) { | |||
learun.alert.warning("选中记录中包含未审核项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认取消审核该项?', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/CheckForm', { keyValue: keyValue, Status: '2' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//审核全部 | |||
$('#lr_checkall').on('click', function () { | |||
learun.layerConfirm('是否确认全部审核?', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/CheckForm', { keyValue: null, Status: '0' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
}); | |||
///上传 | |||
$('#lr_import').on('click', | |||
function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '导入', | |||
url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/ImportForm', | |||
width: 600, | |||
height: 400, | |||
btn: null, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/GetPageList', | |||
headData: [ | |||
{ label: '年', name: 'IssueYear', width: 70, align: "left" }, | |||
{ label: '月', name: 'IssueMonth', width: 70, align: "left" }, | |||
{ label: '序号', name: 'No', width: 70, align: "left" }, | |||
{ label: '姓名', name: 'EmpName', width: 70, align: "left" }, | |||
{ label: '身份证号', name: 'WageCardNo', width: 130, align: "left" }, | |||
{ label: '岗位工资', name: 'PostWage', width: 70, align: "left", statistics: true }, | |||
{ label: '薪级工资', name: 'PayGradeWage', width: 70, align: "left", statistics: true }, | |||
{ label: '基础绩效奖', name: 'BasicsPerformance', width: 70, align: "left", statistics: true }, | |||
{ label: '保留地区补贴', name: 'WorkKeep', width: 90, align: "left", statistics: true }, | |||
{ label: '保留地区补贴保留额', name: 'NationAllowance', width: 120, align: "left", statistics: true }, | |||
{ label: '艰苦边远地区津贴', name: 'RoughEdgeAllowance', width: 120, align: "left", statistics: true }, | |||
{ label: '增补抵交临时性补贴', name: 'Transportation', width: 120, align: "left", statistics: true }, | |||
{ label: '(备选3)', name: 'Other', width: 70, align: "left", statistics: true }, | |||
{ label: '纳入绩效工资的活工资', name: 'AwardPerformance', width: 130, align: "left", statistics: true }, | |||
{ label: '基础性绩效工资', name: 'SeparateBasicsPerformance', width: 120, align: "left", statistics: true }, | |||
{ label: '岗位津贴补贴', name: 'TeachAllowance', width: 90, align: "left", statistics: true }, | |||
{ label: '其它津贴补贴', name: 'RealeState', width: 90, align: "left", statistics: true }, | |||
{ label: '奖励性绩效工资', name: 'SeparateAwardPerformance', width: 100, align: "left", statistics: true }, | |||
{ label: '补发工资', name: 'SuperfineTeacherResearch', width: 70, align: "left", statistics: true }, | |||
{ label: '应发工资', name: 'TotalGrossPay', width: 70, align: "left", statistics: true }, | |||
{ label: '住房公积金', name: 'HousingFundAllowance', width: 80, align: "left", statistics: true }, | |||
{ label: '个人所得税', name: 'PersonalIncomeTax', width: 70, align: "left", statistics: true }, | |||
{ label: '医疗保险金', name: 'MedicalInsurance', width: 70, align: "left", statistics: true }, | |||
{ label: '养老保险金', name: 'EndowmentInsurance', width: 70, align: "left", statistics: true }, | |||
{ label: '职业年金', name: 'OccupationalAnnuities', width: 70, align: "left", statistics: true }, | |||
{ label: '失业保险金', name: 'UnemploymentInsurance', width: 70, align: "left", statistics: true }, | |||
{ label: '其它扣款2', name: 'OtherOne', width: 70, align: "left", statistics: true }, | |||
{ label: '基本代扣合计', name: 'DeductionsSubtotal', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款1', name: 'TenPercent', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款2', name: 'GirlStaffSanitation', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款3', name: 'TeacherAndTown', width: 70, align: "center", statistics: true }, | |||
{ label: '单位扣款4', name: 'HousingAllowance', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款5', name: 'AccumulationFund', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款6', name: 'LaborUnionWage', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款7', name: 'FiscalDirect', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款合计', name: 'BankWithholding', width: 90, align: "left", statistics: true }, | |||
{ label: '个人实发工资', name: 'NetCombined', width: 90, align: "left", statistics: true }, | |||
//{ label: '人员类别', name: 'PeopleType', width: 70, align: "left" }, | |||
//{ label: '岗位等级', name: 'PostType', width: 70, align: "left" }, | |||
//{ label: '薪级', name: 'PayGrade', width: 50, align: "left" }, | |||
//{ label: '创建用户', name: 'CreateUser', width: 70, align: "left" }, | |||
//{ label: '创建时间', name: 'CreateTime', width: 130, align: "left" }, | |||
{ | |||
label: "审核状态", name: "F_EnabledMark", width: 70, align: "center", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
rows: 300, | |||
sidx: 'IssueYear desc, IssueMonth desc, CreateTime desc ', | |||
isMultiselect: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.Sqlparam = ""; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
ViewBag.Title = "工资条"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">年份</div> | |||
<div id="IssueYear"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">月份</div> | |||
<div id="IssueMonth"></div> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">身份证号</div> | |||
<input id="WageCardNo" type="text" class="form-control" /> | |||
</div>*@ | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/WageSchedule/IndexMy.js") |
@@ -0,0 +1,95 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-11-07 11:54 | |||
* 描 述:工资条 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
//年份 | |||
$('#IssueYear').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#IssueMonth').lrDataItemSelect({ code: 'MPMonth' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//// 打印 | |||
//$('#lr_print').on('click', function () { | |||
// $('#gridtable').jqprintTable(); | |||
//}); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/GetPageList', | |||
headData: [ | |||
{ label: '年', name: 'IssueYear', width: 70, align: "left" }, | |||
{ label: '月', name: 'IssueMonth', width: 70, align: "left" }, | |||
{ label: '序号', name: 'No', width: 70, align: "left" }, | |||
{ label: '姓名', name: 'EmpName', width: 70, align: "left" }, | |||
{ label: '身份证号', name: 'WageCardNo', width: 130, align: "left" }, | |||
{ label: '岗位工资', name: 'PostWage', width: 70, align: "left", statistics: true }, | |||
{ label: '薪级工资', name: 'PayGradeWage', width: 70, align: "left", statistics: true }, | |||
{ label: '基础绩效奖', name: 'BasicsPerformance', width: 70, align: "left", statistics: true }, | |||
{ label: '保留地区补贴', name: 'WorkKeep', width: 90, align: "left", statistics: true }, | |||
{ label: '保留地区补贴保留额', name: 'NationAllowance', width: 120, align: "left", statistics: true }, | |||
{ label: '艰苦边远地区津贴', name: 'RoughEdgeAllowance', width: 120, align: "left", statistics: true }, | |||
{ label: '增补抵交临时性补贴', name: 'Transportation', width: 120, align: "left", statistics: true }, | |||
{ label: '(备选3)', name: 'Other', width: 70, align: "left", statistics: true }, | |||
{ label: '纳入绩效工资的活工资', name: 'AwardPerformance', width: 130, align: "left", statistics: true }, | |||
{ label: '基础性绩效工资', name: 'SeparateBasicsPerformance', width: 120, align: "left", statistics: true }, | |||
{ label: '岗位津贴补贴', name: 'TeachAllowance', width: 90, align: "left", statistics: true }, | |||
{ label: '其它津贴补贴', name: 'RealeState', width: 90, align: "left", statistics: true }, | |||
{ label: '奖励性绩效工资', name: 'SeparateAwardPerformance', width: 100, align: "left", statistics: true }, | |||
{ label: '补发工资', name: 'SuperfineTeacherResearch', width: 70, align: "left", statistics: true }, | |||
{ label: '应发工资', name: 'TotalGrossPay', width: 70, align: "left", statistics: true }, | |||
{ label: '住房公积金', name: 'HousingFundAllowance', width: 80, align: "left", statistics: true }, | |||
{ label: '个人所得税', name: 'PersonalIncomeTax', width: 70, align: "left", statistics: true }, | |||
{ label: '医疗保险金', name: 'MedicalInsurance', width: 70, align: "left", statistics: true }, | |||
{ label: '养老保险金', name: 'EndowmentInsurance', width: 70, align: "left", statistics: true }, | |||
{ label: '职业年金', name: 'OccupationalAnnuities', width: 70, align: "left", statistics: true }, | |||
{ label: '失业保险金', name: 'UnemploymentInsurance', width: 70, align: "left", statistics: true }, | |||
{ label: '其它扣款2', name: 'OtherOne', width: 70, align: "left", statistics: true }, | |||
{ label: '基本代扣合计', name: 'DeductionsSubtotal', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款1', name: 'TenPercent', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款2', name: 'GirlStaffSanitation', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款3', name: 'TeacherAndTown', width: 70, align: "center", statistics: true }, | |||
{ label: '单位扣款4', name: 'HousingAllowance', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款5', name: 'AccumulationFund', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款6', name: 'LaborUnionWage', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款7', name: 'FiscalDirect', width: 70, align: "left", statistics: true }, | |||
{ label: '单位扣款合计', name: 'BankWithholding', width: 90, align: "left", statistics: true }, | |||
{ label: '个人实发工资', name: 'NetCombined', width: 90, align: "left", statistics: true }, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
rows: 300, | |||
sidx: 'CreateTime', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.Sqlparam = "1"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -358,6 +358,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookOutController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubDetailController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\WageScheduleController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\YKTStateMentController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonSyncController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonTermAttemperController.cs" /> | |||
@@ -1118,6 +1119,12 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResultForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\InitScoreForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\StatisticsIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\ImportForm.css" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\ImportForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\IndexMy.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\IndexPrint.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\AnalysisByMonthForStudent.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\ManageIndexTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\IndexForTeacher.js" /> | |||
@@ -8424,6 +8431,12 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuPunishment\StuIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\StatisticsIndex.cshtml" /> | |||
<Content Include="Areas\LR_OAModule\Views\ResourceFile\FileStatistic.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\ImportForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\IndexMy.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WageSchedule\IndexPrint.cshtml" /> | |||
<Content Include="Content\excel\SalarySheetImport.xls" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -303,6 +303,7 @@ | |||
<Compile Include="Modules\TimeTable.cs" /> | |||
<Compile Include="Modules\TransferApi.cs" /> | |||
<Compile Include="Modules\UtilityApi.cs" /> | |||
<Compile Include="Modules\WageScheduleApi.cs" /> | |||
<Compile Include="Modules\WeixinApi.cs" /> | |||
<Compile Include="Modules\WorkFlowApi.cs" /> | |||
<Compile Include="Program.cs" /> | |||
@@ -0,0 +1,79 @@ | |||
using Nancy; | |||
using Learun.Util; | |||
using System.Collections.Generic; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using static Learun.Application.WebApi.Modules.StuInfoFreshApi; | |||
using System; | |||
using System.IO; | |||
using System.Linq; | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.OA; | |||
using Learun.Application.OA.File.FileInfo; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using Learun.Application.WorkFlow; | |||
using Microsoft.Ajax.Utilities; | |||
namespace Learun.Application.WebApi | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2018 上海力软信息技术有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-08-19 17:50 | |||
/// 描 述:工资条 | |||
/// </summary> | |||
public class WageScheduleApi : BaseApi | |||
{ | |||
private WageScheduleIBLL wageScheduleIBLL = new WageScheduleBLL(); | |||
/// <summary> | |||
/// 一卡通接口 | |||
/// <summary> | |||
public WageScheduleApi() | |||
: base("/Learun/adms/WageSchedule") | |||
{ | |||
Get["/getlist"] = GetList; | |||
Get["/form"] = GetForm; | |||
} | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表分页数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetList(dynamic _) | |||
{ | |||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||
var data = wageScheduleIBLL.GetPageList(parameter.pagination, parameter.queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = parameter.pagination.total, | |||
page = parameter.pagination.page, | |||
records = parameter.pagination.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
var WageScheduleData = wageScheduleIBLL.GetEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
WageSchedule = WageScheduleData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-11-07 11:54 | |||
/// 描 述:工资条 | |||
/// </summary> | |||
public class WageScheduleMap : EntityTypeConfiguration<WageScheduleEntity> | |||
{ | |||
public WageScheduleMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("WAGESCHEDULE"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -135,6 +135,7 @@ | |||
<Compile Include="EducationalAdministration\TextBookSolSubMap.cs" /> | |||
<Compile Include="EducationalAdministration\ThermographyMap.cs" /> | |||
<Compile Include="EducationalAdministration\VaccinationInfoMap.cs" /> | |||
<Compile Include="EducationalAdministration\WageScheduleMap.cs" /> | |||
<Compile Include="EvaluationTeach\Eval_MainMap.cs" /> | |||
<Compile Include="EvaluationTeach\Eval_QuestionItemsMap.cs" /> | |||
<Compile Include="EvaluationTeach\Eval_QuestionMap.cs" /> | |||
@@ -0,0 +1,247 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-11-07 11:54 | |||
/// 描 述:工资条 | |||
/// </summary> | |||
public class WageScheduleBLL : WageScheduleIBLL | |||
{ | |||
private WageScheduleService wageScheduleService = new WageScheduleService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<WageScheduleEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return wageScheduleService.GetList(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<WageScheduleEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return wageScheduleService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public WageScheduleEntity GetEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return wageScheduleService.GetEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public List<WageScheduleEntity> GetPeopleType() | |||
{ | |||
try | |||
{ | |||
return wageScheduleService.GetPeopleType().Select(x => new WageScheduleEntity { Id = x.PeopleType, PeopleType = x.PeopleType }).Distinct().ToList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public List<WageScheduleEntity> GetPostType() | |||
{ | |||
try | |||
{ | |||
return wageScheduleService.GetPostType().Select(x => new WageScheduleEntity { Id = x.PostType, PostType = x.PostType }).Distinct().ToList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public List<WageScheduleEntity> GetPayGrade() | |||
{ | |||
try | |||
{ | |||
return wageScheduleService.GetPayGrade().Select(x => new WageScheduleEntity { Id = x.PayGrade, PayGrade = x.PayGrade }).Distinct().ToList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
wageScheduleService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, WageScheduleEntity entity) | |||
{ | |||
try | |||
{ | |||
wageScheduleService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void CheckEntity(string keyValue,string Status) | |||
{ | |||
try | |||
{ | |||
wageScheduleService.CheckEntity(keyValue, Status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 工资条导入 | |||
/// </summary> | |||
/// <param name="dt"></param> | |||
/// <param name="fileId"></param> | |||
/// <returns></returns> | |||
public string SalarySheelImport(DataTable dt, string fileId) | |||
{ | |||
try | |||
{ | |||
return wageScheduleService.SalarySheelImport(dt, fileId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,341 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-11-07 11:54 | |||
/// 描 述:工资条 | |||
/// </summary> | |||
public class WageScheduleEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 序号 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("NO")] | |||
public string No { get; set; } | |||
/// <summary> | |||
/// 姓名 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("EMPNAME")] | |||
public string EmpName { get; set; } | |||
/// <summary> | |||
/// 人员类别 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("PEOPLETYPE")] | |||
public string PeopleType { get; set; } | |||
/// <summary> | |||
/// 岗位等级 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("POSTTYPE")] | |||
public string PostType { get; set; } | |||
/// <summary> | |||
/// 薪级 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("PAYGRADE")] | |||
public string PayGrade { get; set; } | |||
/// <summary> | |||
/// 应发工资 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("TOTALGROSSPAY")] | |||
public decimal? TotalGrossPay { get; set; } | |||
/// <summary> | |||
/// 岗位工资 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("POSTWAGE")] | |||
public decimal? PostWage { get; set; } | |||
/// <summary> | |||
/// 薪级工资 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("PAYGRADEWAGE")] | |||
public decimal? PayGradeWage { get; set; } | |||
/// <summary> | |||
/// 单位扣款1 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("TENPERCENT")] | |||
public decimal? TenPercent { get; set; } | |||
/// <summary> | |||
/// 基本工资小计 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("BASEPAY")] | |||
public decimal? BasePay { get; set; } | |||
/// <summary> | |||
/// 艰苦边远地区津贴 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ROUGHEDGEALLOWANCE")] | |||
public decimal? RoughEdgeAllowance { get; set; } | |||
/// <summary> | |||
/// 保留地区补贴保留额 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("NATIONALLOWANCE")] | |||
public decimal? NationAllowance { get; set; } | |||
/// <summary> | |||
/// 岗位津贴补贴 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("TEACHALLOWANCE")] | |||
public decimal? TeachAllowance { get; set; } | |||
/// <summary> | |||
/// 津贴补贴小计 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("SUBSIDIESALLOWANCES")] | |||
public decimal? SubsidiesAllowances { get; set; } | |||
/// <summary> | |||
/// 基础绩效奖 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("BASICSPERFORMANCE")] | |||
public decimal? BasicsPerformance { get; set; } | |||
/// <summary> | |||
/// 单位扣款2 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("GIRLSTAFFSANITATION")] | |||
public decimal? GirlStaffSanitation { get; set; } | |||
/// <summary> | |||
/// 增补抵交临时性补贴 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("TRANSPORTATION")] | |||
public decimal? Transportation { get; set; } | |||
/// <summary> | |||
/// 其它津贴补贴 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("REALESTATE")] | |||
public decimal? RealeState { get; set; } | |||
/// <summary> | |||
/// 保留地区补贴 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("WORKKEEP")] | |||
public decimal? WorkKeep { get; set; } | |||
/// <summary> | |||
/// 改革性补贴小计 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("REFORMSUBSIDYSUM")] | |||
public decimal? ReformSubsidySum { get; set; } | |||
/// <summary> | |||
/// 单位扣款4 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("HOUSINGALLOWANCE")] | |||
public decimal? HousingAllowance { get; set; } | |||
/// <summary> | |||
/// 住房公积金 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("HOUSINGFUNDALLOWANCE")] | |||
public decimal? HousingFundAllowance { get; set; } | |||
/// <summary> | |||
/// 单位扣款3 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("TEACHERANDTOWN")] | |||
public decimal? TeacherAndTown { get; set; } | |||
/// <summary> | |||
/// 基本代扣合计 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("DEDUCTIONSSUBTOTAL")] | |||
public decimal? DeductionsSubtotal { get; set; } | |||
/// <summary> | |||
/// 单位扣款5 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ACCUMULATIONFUND")] | |||
public decimal? AccumulationFund { get; set; } | |||
/// <summary> | |||
/// 单位扣款6 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("LABORUNIONWAGE")] | |||
public decimal? LaborUnionWage { get; set; } | |||
/// <summary> | |||
/// 个人所得税 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("PERSONALINCOMETAX")] | |||
public decimal? PersonalIncomeTax { get; set; } | |||
/// <summary> | |||
/// 养老保险金 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ENDOWMENTINSURANCE")] | |||
public decimal? EndowmentInsurance { get; set; } | |||
/// <summary> | |||
/// 职业年金 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("OCCUPATIONALANNUITIES")] | |||
public decimal? OccupationalAnnuities { get; set; } | |||
/// <summary> | |||
/// 医疗保险金 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("MEDICALINSURANCE")] | |||
public decimal? MedicalInsurance { get; set; } | |||
/// <summary> | |||
/// 失业保险金 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("UNEMPLOYMENTINSURANCE")] | |||
public decimal? UnemploymentInsurance { get; set; } | |||
/// <summary> | |||
/// (备选3) | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("OTHER")] | |||
public decimal? Other { get; set; } | |||
/// <summary> | |||
/// 其它扣款2 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("OTHERONE")] | |||
public decimal? OtherOne { get; set; } | |||
/// <summary> | |||
/// 单位扣款7 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("FISCALDIRECT")] | |||
public decimal? FiscalDirect { get; set; } | |||
/// <summary> | |||
/// 单位扣款合计 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("BANKWITHHOLDING")] | |||
public decimal? BankWithholding { get; set; } | |||
/// <summary> | |||
/// 个人实发工资 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("NETCOMBINED")] | |||
public decimal? NetCombined { get; set; } | |||
/// <summary> | |||
/// 身份证号 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("WAGECARDNO")] | |||
public string WageCardNo { get; set; } | |||
/// <summary> | |||
/// CreateUser | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CREATEUSER")] | |||
public string CreateUser { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// UpdateUser | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("UPDATEUSER")] | |||
public string UpdateUser { get; set; } | |||
/// <summary> | |||
/// UpdateTime | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("UPDATETIME")] | |||
public DateTime? UpdateTime { get; set; } | |||
/// <summary> | |||
/// 发放月份 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ISSUEMONTH")] | |||
public int? IssueMonth { get; set; } | |||
/// <summary> | |||
/// 发放年份 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ISSUEYEAR")] | |||
public string IssueYear { get; set; } | |||
/// <summary> | |||
/// 纳入绩效工资的活工资 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("AWARDPERFORMANCE")] | |||
public decimal? AwardPerformance { get; set; } | |||
/// <summary> | |||
/// 发放年份 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("TOWNSHIPSUBSIDY")] | |||
public decimal? TownshipSubsidy { get; set; } | |||
/// <summary> | |||
/// 基础性绩效工资 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("SEPARATEBASICSPERFORMANCE")] | |||
public decimal? SeparateBasicsPerformance { get; set; } | |||
/// <summary> | |||
/// 奖励性绩效工资 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("SEPARATEAWARDPERFORMANCE")] | |||
public decimal? SeparateAwardPerformance { get; set; } | |||
/// <summary> | |||
/// 补发工资 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("SUPERFINETEACHERRESEARCH")] | |||
public decimal? SuperfineTeacherResearch { get; set; } | |||
/// <summary> | |||
/// 审核标识 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("F_ENABLEDMARK")] | |||
public string F_EnabledMark { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.CreateUser = LoginUserInfo.Get().userId; | |||
this.F_EnabledMark = "0"; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,70 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-11-07 11:54 | |||
/// 描 述:工资条 | |||
/// </summary> | |||
public interface WageScheduleIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<WageScheduleEntity> GetList( string queryJson ); | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<WageScheduleEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
WageScheduleEntity GetEntity(string keyValue); | |||
List<WageScheduleEntity> GetPeopleType(); | |||
List<WageScheduleEntity> GetPostType(); | |||
List<WageScheduleEntity> GetPayGrade(); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, WageScheduleEntity entity); | |||
void CheckEntity(string keyValue,string Status); | |||
/// <summary> | |||
/// 工资条导入 | |||
/// </summary> | |||
/// <param name="dt"></param> | |||
/// <param name="fileId"></param> | |||
/// <returns></returns> | |||
string SalarySheelImport(DataTable dt, string fileId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,464 @@ | |||
using Dapper; | |||
using Learun.Cache.Base; | |||
using Learun.Cache.Factory; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-11-07 11:54 | |||
/// 描 述:工资条 | |||
/// </summary> | |||
public class WageScheduleService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">条件参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<WageScheduleEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
//参考写法 | |||
//var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
//var dp = new DynamicParameters(new { }); | |||
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append("t.*"); | |||
strSql.Append(" FROM WageSchedule t "); | |||
return this.BaseRepository("CollegeMIS").FindList<WageScheduleEntity>(strSql.ToString()); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">条件参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<WageScheduleEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var baseDataName = this.BaseRepository().getDbConnection().Database; | |||
var strSql = new StringBuilder(); | |||
strSql.Append(" SELECT t.*,u.F_Account,u.F_RealName FROM WageSchedule t "); | |||
strSql.Append($" left join {baseDataName}.dbo.LR_Base_User u on t.empname=u.F_RealName and t.WageCardNo=u.F_IdentityCardNo "); | |||
strSql.Append(" where 1=1 and u.F_Description='教师' and u.F_DeleteMark = 0"); | |||
var userInfo = LoginUserInfo.Get(); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
//sql条件 | |||
if (!queryParam["Sqlparam"].IsEmpty()) | |||
{ | |||
strSql.Append(" and t.F_EnabledMark = '1' "); | |||
strSql.Append(" AND u.F_Account = '" + userInfo.account + "' "); | |||
} | |||
if (!queryParam["EmpName"].IsEmpty()) | |||
{ | |||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.EmpName like @EmpName "); | |||
} | |||
if (!queryParam["PeopleType"].IsEmpty()) | |||
{ | |||
dp.Add("PeopleType", queryParam["PeopleType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.PeopleType = @PeopleType "); | |||
} | |||
if (!queryParam["PayGrade"].IsEmpty()) | |||
{ | |||
dp.Add("PayGrade", queryParam["PayGrade"].ToString(), DbType.String); | |||
strSql.Append(" AND t.PayGrade = @PayGrade "); | |||
} | |||
if (!queryParam["PostType"].IsEmpty()) | |||
{ | |||
dp.Add("PostType", queryParam["PostType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.PostType = @PostType "); | |||
} | |||
if (!queryParam["WageCardNo"].IsEmpty()) | |||
{ | |||
dp.Add("WageCardNo", "%" + queryParam["WageCardNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.WageCardNo like @WageCardNo "); | |||
} | |||
if (!queryParam["IssueMonth"].IsEmpty()) | |||
{ | |||
dp.Add("IssueMonth", queryParam["IssueMonth"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IssueMonth = @IssueMonth "); | |||
} | |||
if (!queryParam["IssueYear"].IsEmpty()) | |||
{ | |||
dp.Add("IssueYear", queryParam["IssueYear"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IssueYear = @IssueYear "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<WageScheduleEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public WageScheduleEntity GetEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<WageScheduleEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public List<WageScheduleEntity> GetPeopleType() | |||
{ | |||
try | |||
{ | |||
string sql = " select distinct PeopleType from WageSchedule where 1=1 and PeopleType is not null order by PeopleType asc "; | |||
return this.BaseRepository("CollegeMIS").FindList<WageScheduleEntity>(sql).ToList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public List<WageScheduleEntity> GetPostType() | |||
{ | |||
try | |||
{ | |||
string sql = " select distinct PostType from WageSchedule where 1=1 and PostType is not null order by PostType asc "; | |||
return this.BaseRepository("CollegeMIS").FindList<WageScheduleEntity>(sql).ToList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 薪级 | |||
/// </summary> | |||
/// <param name="PayGrade"></param> | |||
/// <returns></returns> | |||
public List<WageScheduleEntity> GetPayGrade() | |||
{ | |||
try | |||
{ | |||
string sql = " select distinct PayGrade from WageSchedule where 1=1 and PayGrade is not null order by PayGrade asc"; | |||
return this.BaseRepository("CollegeMIS").FindList<WageScheduleEntity>(sql).ToList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
//多个启用 | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
db.Delete<WageScheduleEntity>(t => t.Id == item); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void CheckEntity(string keyValue, string Status) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
if (Status == "0")//审核全部 | |||
{ | |||
db.ExecuteBySql("update WageSchedule set F_EnabledMark=1 "); | |||
} | |||
//多个 | |||
var keyValueArr = keyValue.Split(','); | |||
if (Status == "1") | |||
{ | |||
foreach (var item in keyValueArr) | |||
{ | |||
db.ExecuteBySql("update WageSchedule set F_EnabledMark=1 where Id = '" + item + "' "); | |||
} | |||
} | |||
else if (Status == "2") | |||
{ | |||
foreach (var item in keyValueArr) | |||
{ | |||
db.ExecuteBySql("update WageSchedule set F_EnabledMark=0 where Id = '" + item + "' "); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// </summary> | |||
public void SaveEntity(string keyValue, WageScheduleEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#region 缓存定义 | |||
private ICache cache = CacheFactory.CaChe(); | |||
private string cacheKey = "Learun_adms_excelError_"; // +公司主键 | |||
#endregion | |||
/// <summary> | |||
/// 工资条导入 | |||
/// </summary> | |||
/// <param name="dt"></param> | |||
/// <param name="fileId"></param> | |||
/// <returns></returns> | |||
public string SalarySheelImport(DataTable dt, string fileId) | |||
{ | |||
try | |||
{ | |||
int snum = 0; | |||
int fnum = 0; | |||
if (dt.Rows.Count > 0) | |||
{ | |||
DataTable failDt = new DataTable(); | |||
dt.Columns.Add("导入错误", typeof(string)); | |||
foreach (DataColumn dc in dt.Columns) | |||
{ | |||
failDt.Columns.Add(dc.ColumnName, dc.DataType); | |||
} | |||
IEnumerable<EmpInfoEntity> EmpInfoEntities = this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>("select * from empinfo"); | |||
//修改学生list | |||
List<WageScheduleEntity> wageScheduleEntityList = new List<WageScheduleEntity>(); | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
// 循环遍历导入 | |||
foreach (DataRow dr in dt.Rows) | |||
{ | |||
try | |||
{ | |||
//检测是否有空值 | |||
if (dr[0].ToString() == "" || dr[1].ToString() == "" || dr[3].ToString() == "" || dr[4].ToString() == "" || dr[19].ToString() == "" || dr[27].ToString() == "" || dr[36].ToString() == "") | |||
{ | |||
throw (new Exception("行内必填项数据有空值,不能为空!")); | |||
} | |||
if (EmpInfoEntities.Count(m => m.EmpName.ToUpper() == dr[3].ToString().ToUpper() && m.IdentityCardNo == dr[4].ToString()) == 0) | |||
{ | |||
throw (new Exception("【姓名、身份证号】不存在,请核对!")); | |||
} | |||
if (wageScheduleEntityList.Count(x => x.IssueYear == dr[0].ToString() && x.IssueMonth == dr[1].ToInt() && x.EmpName == dr[3].ToString() && x.WageCardNo == dr[4].ToString()) > 0) | |||
{ | |||
throw (new Exception("导入信息已重复,信息已忽略")); | |||
} | |||
//写入要导入的数据 | |||
WageScheduleEntity wageScheduleEntity = new WageScheduleEntity | |||
{ | |||
IssueYear = dr[0].ToString(), | |||
IssueMonth = dr[1].ToInt(), | |||
No = dr[2].ToString(), | |||
EmpName = dr[3].ToString(), | |||
WageCardNo = dr[4].ToString(), | |||
PostWage = dr[5].ToDecimalOrNull(), | |||
PayGradeWage = dr[6].ToDecimalOrNull(), | |||
BasicsPerformance = dr[7].ToDecimalOrNull(), | |||
WorkKeep = dr[8].ToDecimalOrNull(), | |||
NationAllowance = dr[9].ToDecimalOrNull(), | |||
RoughEdgeAllowance = dr[10].ToDecimalOrNull(), | |||
Transportation = dr[11].ToDecimalOrNull(), | |||
Other = dr[12].ToDecimalOrNull(), | |||
AwardPerformance = dr[13].ToDecimalOrNull(), | |||
SeparateBasicsPerformance = dr[14].ToDecimalOrNull(), | |||
TeachAllowance = dr[15].ToDecimalOrNull(), | |||
RealeState = dr[16].ToDecimalOrNull(), | |||
SeparateAwardPerformance = dr[17].ToDecimalOrNull(), | |||
SuperfineTeacherResearch = dr[18].ToDecimalOrNull(), | |||
TotalGrossPay = dr[19].ToDecimalOrNull(), | |||
HousingFundAllowance = dr[20].ToDecimalOrNull(), | |||
PersonalIncomeTax = dr[21].ToDecimalOrNull(), | |||
MedicalInsurance = dr[22].ToDecimalOrNull(), | |||
EndowmentInsurance = dr[23].ToDecimalOrNull(), | |||
OccupationalAnnuities = dr[24].ToDecimalOrNull(), | |||
UnemploymentInsurance = dr[25].ToDecimalOrNull(), | |||
OtherOne = dr[26].ToDecimalOrNull(), | |||
DeductionsSubtotal = dr[27].ToDecimalOrNull(), | |||
TenPercent = dr[28].ToDecimalOrNull(), | |||
GirlStaffSanitation = dr[29].ToDecimalOrNull(), | |||
TeacherAndTown = dr[30].ToDecimalOrNull(), | |||
HousingAllowance = dr[31].ToDecimalOrNull(), | |||
AccumulationFund = dr[32].ToDecimalOrNull(), | |||
LaborUnionWage = dr[33].ToDecimalOrNull(), | |||
FiscalDirect = dr[34].ToDecimalOrNull(), | |||
BankWithholding = dr[35].ToDecimalOrNull(), | |||
NetCombined = dr[36].ToDecimalOrNull(), | |||
}; | |||
wageScheduleEntity.Create(); | |||
wageScheduleEntityList.Add(wageScheduleEntity); | |||
//删除表中旧数据 及同年同月同名同姓之人 | |||
db.Delete<WageScheduleEntity>(x => x.EmpName == wageScheduleEntity.EmpName && x.WageCardNo == wageScheduleEntity.WageCardNo && x.IssueMonth == wageScheduleEntity.IssueMonth && x.IssueYear == wageScheduleEntity.IssueYear); | |||
snum++; | |||
} | |||
catch (Exception ex) | |||
{ | |||
fnum++; | |||
dr["导入错误"] = ex.Message; | |||
failDt.Rows.Add(dr.ItemArray); | |||
} | |||
} | |||
//执行导入 | |||
db.Insert(wageScheduleEntityList); | |||
db.Commit(); | |||
if (failDt.Rows.Count > 0) | |||
{ | |||
string errordt = failDt.ToJson(); | |||
cache.Write<string>(cacheKey + fileId, errordt, CacheId.excel); | |||
} | |||
} | |||
return snum + "|" + fnum; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -160,6 +160,10 @@ | |||
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubEntity.cs" /> | |||
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubService.cs" /> | |||
<Compile Include="EducationalAdministration\WageSchedule\WageScheduleBLL.cs" /> | |||
<Compile Include="EducationalAdministration\WageSchedule\WageScheduleEntity.cs" /> | |||
<Compile Include="EducationalAdministration\WageSchedule\WageScheduleIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\WageSchedule\WageScheduleService.cs" /> | |||
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentBLL.cs" /> | |||
<Compile Include="EducationalAdministration\YKTStateMent\DoorEntity.cs" /> | |||
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentEntity.cs" /> | |||