From a81f9e265e36d0ff1c1378fdc004503053db2087 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 27 May 2024 16:36:50 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=B7=A5?= =?UTF-8?q?=E8=B5=84=E6=9D=A1=E7=AE=A1=E7=90=86=EF=BC=9A=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/WageSchedule/Index.js | 6 ++-- .../Controllers/ExcelImportController.cs | 31 +++++++++++++++++++ .../Learun.Application.Web.csproj | 2 -- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.js index 37551da90..c4ef2f1e3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WageSchedule/Index.js @@ -158,8 +158,8 @@ var bootstrap = function ($, learun) { width: 600, height: 400, btn: null, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); + end: function () { + refreshGirdData(); } }); }); @@ -195,7 +195,7 @@ var bootstrap = function ($, learun) { { 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: '基本代扣合计', name: 'DeductionsSubtotal', width: 100, 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 }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs index d9de38493..477f78852 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs @@ -24,6 +24,7 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); private Ass_FixAssetsIBLL ass_FixAssetsIBLL = new Ass_FixAssetsBLL(); + private WageScheduleIBLL wageScheduleIBLL = new WageScheduleBLL(); #region 视图功能 /// @@ -354,6 +355,36 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers } } + /// + /// 工资条导入 + /// + /// 模板Id + /// 文件主键 + /// 分片数 + /// 文件扩展名 + /// + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult SalarySheetImport(string fileId, int chunks, string ext) + { + UserInfo userInfo = LoginUserInfo.Get(); + string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "." + ext, chunks, userInfo); + if (!string.IsNullOrEmpty(path)) + { + DataTable dt = ExcelHelper.ExcelImport(path); + string res = wageScheduleIBLL.SalarySheelImport(dt, fileId); + var data = new + { + Success = res.Split('|')[0], + Fail = res.Split('|')[1] + }; + return JsonResult(data); + } + else + { + return Fail("导入数据失败!"); + } + } /// /// 下载文件(导入文件未被导入的数据) /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 5a1e0d6d6..d6259964a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1124,7 +1124,6 @@ - @@ -8435,7 +8434,6 @@ -