diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermAttemperController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermAttemperController.cs index c7c59cf3d..9a69cf7a5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermAttemperController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermAttemperController.cs @@ -157,7 +157,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers int index = 0; foreach (var item in jo["predata"]) { - index++; + //index++; if (string.IsNullOrEmpty(lastdata) || lastdata != item["LessonTime"].ToString()) { lastdata = item["LessonTime"].ToString(); @@ -177,6 +177,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers NewLessonTime = newlessontime }; query.Add(term); + index++; } entity.query = query; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuCancelDisciplineManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuCancelDisciplineManagementController.cs index c9b82a7bf..5161ba466 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuCancelDisciplineManagementController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuCancelDisciplineManagementController.cs @@ -4,6 +4,7 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using Learun.Application.TwoDevelopment.LR_CodeDemo; using System.Collections.Generic; +using System; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -47,6 +48,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 主页面-学工查看 + /// + /// + [HttpGet] + public ActionResult IndexOfTeacher() + { + return View(); + } #endregion #region 获取数据 @@ -72,6 +82,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListOfTeacher(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuCancelDisciplineManagementIBLL.GetPageListOfTeacher(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } /// /// 获取表单数据 /// @@ -129,8 +161,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult SaveForm(string keyValue, string strEntity) { + var userInfo = LoginUserInfo.Get(); StuCancelDisciplineManagementEntity entity = strEntity.ToObject(); entity.CheckStatus = "0"; + entity.CreateTime = DateTime.Now; + entity.CreateUserId = userInfo.userId; + entity.CreateUserNo = userInfo.account; stuCancelDisciplineManagementIBLL.SaveEntity(keyValue,entity); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuDisciplineManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuDisciplineManagementController.cs index 071e8e932..acb165ca9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuDisciplineManagementController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuDisciplineManagementController.cs @@ -48,6 +48,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 主页面-学生查看 + /// + /// + [HttpGet] + public ActionResult IndexOfStudent() + { + return View(); + } #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs index 07d0b303b..31ee5c1b8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs @@ -121,6 +121,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } /// + /// 全院班级成绩查看页面 + /// + /// + [HttpGet] + public ActionResult StuScoreRank() + { + return View(); + } + /// /// 新版成绩录入 /// /// @@ -855,6 +864,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success(data); } + /// + /// 学生成绩排名 + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetScoreListRank(string queryJson) + { + var data = stuScoreIBLL.GetScoreListRank(queryJson); + if (data.Any()) + { + data = data.OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonSortNo).ThenBy(x => x.LessonNo); + } + return Success(data); + } + public ActionResult GetScoreCharts(string AcademicYearNo, string Semester, string ClassNo, string LessonNo) { var data = stuScoreIBLL.GetScoreCharts(AcademicYearNo, Semester, ClassNo, LessonNo); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js index 1b48e5f73..9e86788d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js @@ -484,7 +484,7 @@ var bootstrap = function ($, learun) { learun.alert.warning("校区、学年、学期不一致!"); return false; } - } else if (formData.AttemperType == "01") { //调课:调度时间比较;教师或教室必填一个; + } else if (formData.AttemperType == "01") { //换课:调度时间比较;教师或教室必填一个; if ((formData.NewEmpNo == null || formData.NewEmpNo == "") && (formData.NewClassroomNo == null || formData.NewClassroomNo == "")) { learun.alert.warning("课程新安排中教师或教室不能为空!"); return false; @@ -493,7 +493,7 @@ var bootstrap = function ($, learun) { learun.alert.warning("调度结束时间不能小于调度开始时间!"); return false; } - } else if (formData.AttemperType == "04") { + } else if (formData.AttemperType == "04") { //调课 if (formData) { formData.predata = JSON.parse($('#gridtable').attr("data-val")); formData.tardata = JSON.parse( $('#gridtable1').attr("data-val")); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml index 32f15fa52..b53f159d8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml @@ -142,11 +142,13 @@
调度开始时间*
-
+ @*
*@ +
调度结束时间*
-
+ @*
*@ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js index 2787d6e1c..f4909c22f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js @@ -189,7 +189,7 @@ var bootstrap = function ($, learun) { $('#NewEmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); $('#ClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); $('#NewClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); - + }, initData: function () { if (!!keyValue) { @@ -274,7 +274,7 @@ var bootstrap = function ($, learun) { } html1 += '日期:' + oldtime + '
节次:' + oldjieci.join(';') + '
课程:' + course + '
教师:' + teacher + ';
班级:' + class_.join(';') + '
教室:' + classroom; html2 += '调整到:' + newtime + '的' + newjieci.join(';'); - console.log(html1) + //console.log(html1) $("#gridtable").html(html1); //{"targettime":"2023-6-24","targetjieci":"1节;2节;"} var target_json = { "targettime": newtime, "targetjieci": newjieci.join(';') } @@ -282,7 +282,7 @@ var bootstrap = function ($, learun) { $("#gridtable1").html(html2) } } - + } }); } @@ -290,15 +290,30 @@ var bootstrap = function ($, learun) { }; bindData = function (temprow) { if (!!temprow) { - //$('#F_SchoolId').lrselectSet(temprow.schooldId); - $('#AcademicYearNo').lrselectSet(temprow.academicyear); - $('#Semester').lrselectSet(temprow.semester); - $('#DeptNo').lrselectSet(temprow.deptNo); - $('#MajorNo').lrselectSet(temprow.majorNo); - $('#LessonNo').lrselectSet(temprow.lessonNo); - $('#TeachClassNo').lrselectSet(temprow.teachClassNo); - $('#EmpNo').lrselectSet(temprow.empno); - $('#ClassroomNo').lrselectSet(temprow.classRoomNo); + if ($("#AttemperType").lrselectGet() == "04") { + //console.log(temprow) + var dataparams = temprow.predata; + //$('#gridtable').jfGridSet('refreshdata', temprow.predata); + var datahtml = temprow.predatastr;//tardata.targettime + '的' + tardata.targetjieci; + $('#gridtable').html(datahtml); + $('#gridtable').attr("data-val", JSON.stringify(dataparams)) + var tardata = (temprow.tardata); + var html = '调整到:' + tardata.targettime + '的' + tardata.targetjieci; + $('#gridtable1').html(html); + $('#gridtable1').attr("data-val", JSON.stringify(tardata)) + //$('#gridtable1').jfGridSet('refreshdata', temprow.predata); + //$('#gridtable'). + } else { + //$('#F_SchoolId').lrselectSet(temprow.schooldId); + $('#AcademicYearNo').lrselectSet(temprow.academicyear); + $('#Semester').lrselectSet(temprow.semester); + $('#DeptNo').lrselectSet(temprow.deptNo); + $('#MajorNo').lrselectSet(temprow.majorNo); + $('#LessonNo').lrselectSet(temprow.lessonNo); + $('#TeachClassNo').lrselectSet(temprow.teachClassNo); + $('#EmpNo').lrselectSet(temprow.empno); + $('#ClassroomNo').lrselectSet(temprow.classRoomNo); + } page.query(); } }; @@ -402,7 +417,7 @@ var bootstrap = function ($, learun) { } html1 += '日期:' + oldtime + '
节次:' + oldjieci.join(';') + '
课程:' + course + '
教师:' + teacher + ';
班级:' + class_.join(';') + '
教室:' + classroom; html2 += '调整到:' + newtime + '的' + newjieci.join(';'); - console.log(html1) + //console.log(html1) $("#gridtable").html(html1); //{"targettime":"2023-6-24","targetjieci":"1节;2节;"} var target_json = { "targettime": newtime, "targetjieci": newjieci.join(';') } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js index 408b977cf..1e12860ea 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js @@ -254,7 +254,8 @@ var bootstrap = function ($, learun) { }); } }, - { label: "日期", name: "AcademicYearNo", width: 100, align: "left", + { + label: "日期", name: "AcademicYearNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.httpAsyncGet('/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) { if (res.code == learun.httpCode.success) { @@ -275,7 +276,7 @@ var bootstrap = function ($, learun) { learun.httpAsyncGet('/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) { if (res.code == learun.httpCode.success) { var t_data = []; - var t_w=[] + var t_w = [] for (var i = 0; i < res.data.length; i++) { if (t_data.indexOf(res.data[i].LessonTime.substring(1)) < 0) { t_data.push(res.data[i].LessonTime.substring(1)) @@ -285,7 +286,7 @@ var bootstrap = function ($, learun) { } } if (row.AttemperType == '04') { - callback("星期" + weekChina[t_w.join(',') - 1]+'第'+t_data.join(',')+'节'); + callback("星期" + weekChina[t_w.join(',') - 1] + '第' + t_data.sort((a, b) => { return a - b; }).join(',') + '节'); } else { callback(''); } @@ -301,7 +302,7 @@ var bootstrap = function ($, learun) { if (res.code == learun.httpCode.success) { var t_data = []; for (var i = 0; i < res.data.length; i++) { - if (t_data.indexOf(res.data[i].NewLessonDate.substring(0,10)) < 0) { + if (t_data.indexOf(res.data[i].NewLessonDate.substring(0, 10)) < 0) { t_data.push(res.data[i].NewLessonDate.substring(0, 10)) } } @@ -317,7 +318,7 @@ var bootstrap = function ($, learun) { { label: "调课星期/节次", name: "AcademicYearNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.httpAsyncGet( '/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) { + learun.httpAsyncGet('/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) { if (res.code == learun.httpCode.success) { var t_data = []; var t_w = [] @@ -330,21 +331,10 @@ var bootstrap = function ($, learun) { } } if (row.AttemperType == '04') { - callback("星期" + weekChina[t_w.join(',') - 1] + '第' + t_data.join(',') + '节'); + callback("星期" + weekChina[t_w.join(',') - 1] + '第' + t_data.sort((a, b) => { return a - b; }).join(',') + '节'); } else { callback(''); } - //var t_data = []; - //for (var i = 0; i < res.data.length; i++) { - // if (t_data.indexOf(res.data[i].NewLessonTime.substring(1)) < 0) { - // t_data.push(res.data[i].NewLessonTime.substring(1)) - // } - //} - //if (row.AttemperType == '04') { - // callback(t_data.join(',') + '节'); - //} else { - // callback(''); - //} } }); } @@ -543,6 +533,9 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") { + param.CreateUserId = learun.clientdata.get(['userinfo']).userId; + } $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.cshtml index ef4717d42..422c1d0c8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.cshtml @@ -3,21 +3,17 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
申请人
- +
+
事情经过*
+
-
-
申请时间
- +
+
撤销原因*
+
-
-
事情经过
- -
-
-
撤销原因
- +
+
证明材料
+
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.js index 3eea3b2d7..1dce80031 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.js @@ -6,6 +6,7 @@ */ var acceptClick; var keyValue = request('keyValue'); +var DisciplineId = request('DisciplineId');//违纪表主键 // 设置权限 var setAuthorize; // 设置表单数据 @@ -42,9 +43,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#CreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; - $('#CreateUserId').val(learun.clientdata.get(['userinfo']).realName); - $('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); + $('#Files').lrUploader(); }, initData: function () { if (!!keyValue) { @@ -90,6 +89,8 @@ var bootstrap = function ($, learun) { // 保存数据 save = function (processId, callBack, i) { var formData = $('body').lrGetFormData(); + //违纪表主键 + formData.DisciplineId = DisciplineId; if (!!processId) { formData.ProcessId = processId; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.cshtml index 9484d6089..08441eb11 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.cshtml @@ -3,21 +3,17 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
申请人
- -
-
-
申请时间
- +
+
事情经过*
+
-
事情经过
- +
撤销原因*
+
-
撤销原因
- +
证明材料
+
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.js index 0a7cdd8e0..96b38add2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.js @@ -6,6 +6,7 @@ */ var acceptClick; var keyValue = request('keyValue'); +var DisciplineId = request('DisciplineId');//违纪表主键 // 设置权限 var setAuthorize; // 设置表单数据 @@ -43,9 +44,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#CreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; - $('#CreateUserId').val(learun.clientdata.get(['userinfo']).realName); - $('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); + $('#Files').lrUploader(); }, initData: function () { if (!!keyValue) { @@ -90,6 +89,8 @@ var bootstrap = function ($, learun) { // 保存数据 save = function (processId, callBack, i) { var formData = $('body').lrGetFormData(); + //违纪表主键 + formData.DisciplineId = DisciplineId; if(!!processId){ formData.ProcessId =processId; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml index e7161b238..18368171e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml @@ -13,8 +13,8 @@
-
学生姓名
- +
处分类别
+
@@ -25,7 +25,7 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.js index 11e31e4ba..8f2b21ba0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.js @@ -21,27 +21,43 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + $('#SType').lrDataItemSelect({ code: 'DisType' }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ - id: 'form', - title: '新增', - url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/Form', - width: 1000, - height: 600, - callBack: function (id) { - var res = false; - // 验证数据 - res = top[id].validForm(); - // 保存数据 - if (res) { - res = top[id].save('', function () { - page.search(); - }); - } - return res; + var DisciplineId = $('#gridtable').jfGridValue('DisciplineId'); + if (learun.checkrow(DisciplineId)) { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (keyValue != null) { + learun.alert.warning("已申请撤销,请点击编辑!"); + return false; } - }); + //判断违纪的审核时间,达到半年后,才可申请撤销; + var DisciplineCheckTime = $('#gridtable').jfGridValue('DisciplineCheckTime'); + var DisciplineCheckTimeDate = new Date(DisciplineCheckTime); + if (new Date() <= DisciplineCheckTimeDate.setMonth(DisciplineCheckTimeDate.getMonth()+6)) { + learun.alert.warning("违纪的审核时间未达到半年,不可以申请撤销!"); + return false; + } + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/Form?DisciplineId=' + DisciplineId, + width: 800, + height: 600, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } }); // 编辑 $('#lr_edit').on('click', function () { @@ -56,7 +72,7 @@ var bootstrap = function ($, learun) { id: 'form', title: '编辑', url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/Form?keyValue=' + keyValue, - width: 1000, + width: 800, height: 600, callBack: function (id) { var res = false; @@ -99,7 +115,7 @@ var bootstrap = function ($, learun) { id: 'formview', title: '查看', url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/FormView?keyValue=' + keyValue, - width: 1000, + width: 800, height: 600, btn: null }); @@ -127,26 +143,54 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/GetPageList', headData: [ { - label: "申请人", name: "CreateUserId", width: 100, align: "left", + label: "违纪学生", name: "StuNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('user', { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', key: value, + keyId: 'stuno', callback: function (_data) { - callback(_data.name); + callback(_data['stuname']); } }); } }, - { label: "申请时间", name: "CreateTime", width: 120, align: "left" }, - { label: "事情经过", name: "Things", width: 150, align: "left" }, + { + label: "处分类别", name: "SType", width: 80, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'DisType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "违纪审核时间", name: "DisciplineCheckTime", width: 120, align: "left" }, + { label: "违纪事情经过", name: "DisciplineThings", width: 200, align: "left" }, + { label: "申请撤销时间", name: "CreateTime", width: 120, align: "left" }, + { label: "撤销事情经过", name: "Things", width: 200, align: "left" }, { label: "撤销原因", name: "Reason", width: 150, align: "left" }, { - label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { - return cellvalue == "1" ? "审核中" : cellvalue == "2" ? "审核通过" : cellvalue == "3" ? "审核未通过" : "草稿"; + label: "撤销审核状态", name: "CheckStatus", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + if (row.Id == null || row.Id == undefined || row.Id == "") { + callback(""); + } else { + if (value == "1") { + callback("审核中"); + } else if (value == "2") { + callback("审核通过"); + } else if (value == "3") { + callback("审核未通过"); + } else { + callback("草稿"); + } + } } }, ], @@ -158,6 +202,7 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.StuNo = learun.clientdata.get(['userinfo']).account; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/IndexOfTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/IndexOfTeacher.cshtml new file mode 100644 index 000000000..c382e2c04 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/IndexOfTeacher.cshtml @@ -0,0 +1,40 @@ +@{ + /**/ + + ViewBag.Title = "学生撤销违纪管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
处分类别
+ +
+
+
违纪学生
+
+
+
+
+
+
+
+
+ +
+
+  查看 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/IndexOfTeacher.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/IndexOfTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/IndexOfTeacher.js new file mode 100644 index 000000000..8ae149435 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/IndexOfTeacher.js @@ -0,0 +1,128 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-04-14 11:52 + * 描 述:学生撤销违纪管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#SType').lrDataItemSelect({ code: 'DisType' }); + $('#StuNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetAllList', + param: { strWhere: "1=1 " }, + value: "StuNo", + text: "StuName" + }); + //  查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/FormView?keyValue=' + keyValue, + width: 800, + height: 600, + btn: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/GetPageListOfTeacher', + headData: [ + { + label: "违纪学生", name: "StuNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + key: value, + keyId: 'stuno', + callback: function (_data) { + callback(_data['stuname']); + } + }); + } + }, + { + label: "处分类别", name: "SType", width: 80, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'DisType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "违纪审核时间", name: "DisciplineCheckTime", width: 120, align: "left" }, + { label: "违纪事情经过", name: "DisciplineThings", width: 200, align: "left" }, + { label: "申请撤销时间", name: "CreateTime", width: 120, align: "left" }, + { label: "撤销事情经过", name: "Things", width: 200, align: "left" }, + { label: "撤销原因", name: "Reason", width: 150, align: "left" }, + { + label: "撤销审核状态", name: "CheckStatus", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + if (row.Id == null || row.Id == undefined || row.Id == "") { + callback(""); + } else { + if (value == "1") { + callback("审核中"); + } else if (value == "2") { + callback("审核通过"); + } else if (value == "3") { + callback("审核未通过"); + } else { + callback("草稿"); + } + } + } + }, + ], + mainId: 'Id', + isPage: true, + sidx: "CreateTime desc" + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (!!res) { + if (res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'StuCancelDisciplineManagement',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + page.search(); + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.cshtml index 4765dd35f..acd11235a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.cshtml @@ -24,8 +24,8 @@
-
事情经过
- +
事情经过*
+
学生态度
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/FormView.cshtml index e12cb74a4..8c7fa9253 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/FormView.cshtml @@ -24,8 +24,8 @@
-
事情经过
- +
事情经过*
+
学生态度
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js index 3f6c2b43c..f4f31b1c7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js @@ -94,7 +94,7 @@ var bootstrap = function ($, learun) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); + page.search(); }); } }); @@ -109,7 +109,7 @@ var bootstrap = function ($, learun) { title: '查看', url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/FormView?keyValue=' + keyValue, width: 1000, - height: 600, + height: 800, btn: null }); } @@ -235,6 +235,11 @@ var bootstrap = function ($, learun) { return cellvalue == "1" ? "审核中" : cellvalue == "2" ? "审核通过" : cellvalue == "3" ? "审核未通过" : "草稿"; } }, + { + label: "是否申请撤销", name: "CancelId", width: 100, align: "left", formatter: function (cellvalue) { + return (cellvalue != null && cellvalue != undefined && cellvalue != "") ? "是" : "否"; + } + }, ], mainId: 'Id', isPage: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/IndexOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/IndexOfStudent.cshtml new file mode 100644 index 000000000..50248a389 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/IndexOfStudent.cshtml @@ -0,0 +1,36 @@ +@{ + /**/ + + ViewBag.Title = "学生违纪管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
处理老师
+
+
+
+
+
+
+
+
+ +
+
+  查看 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuDisciplineManagement/IndexOfStudent.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/IndexOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/IndexOfStudent.js new file mode 100644 index 000000000..8992c5934 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/IndexOfStudent.js @@ -0,0 +1,159 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-03-26 15:23 + * 描 述:学生违纪管理 + */ +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //  查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/FormView?keyValue=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/GetPageList', + headData: [ + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { + label: "处分类别", name: "SType", width: 80, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'DisType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "违纪学生", name: "StuNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + key: value, + keyId: 'stuno', + callback: function (_data) { + callback(_data['stuname']); + } + }); + } + }, + { + label: "性别", name: "GenderNo", width: 50, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { label: "电话", name: "Mobile", width: 100, align: "left" }, + { + label: "院系", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "majorno", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "classno", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { + label: "处理老师", name: "EmpNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { label: "处理时间", name: "DealTime", width: 120, align: "left" }, + { label: "事情经过", name: "Things", width: 200, align: "left" }, + { label: "学生态度", name: "StudentAttitude", width: 100, align: "left" }, + { label: "班主任意见", name: "TeacherOpinion", width: 100, align: "left" }, + { label: "家长意见", name: "ParentsOpinion", width: 100, align: "left" }, + { label: "学院意见", name: "SchoolOpinion", width: 100, align: "left" }, + { + label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == "1" ? "审核中" : cellvalue == "2" ? "审核通过" : cellvalue == "3" ? "审核未通过" : "草稿"; + } + }, + { + label: "是否申请撤销", name: "CancelId", width: 100, align: "left", formatter: function (cellvalue) { + return (cellvalue != null && cellvalue != undefined && cellvalue != "") ? "是" : "否"; + } + }, + ], + mainId: 'Id', + isPage: true, + sidx: "CreateTime desc" + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StuNo = learun.clientdata.get(['userinfo']).account; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml index 064fad2db..9a8fbf3aa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml @@ -7,10 +7,6 @@
学校*
-
-
学号*
- -
学籍号
@@ -20,101 +16,141 @@
-
通知书号*
- -
-
-
身份证号*
- +
学号*
+
+ @*
+
通知书号*
+ +
*@
姓名*
-
-
民族*
-
-
性别*
-
疫情状态
-
+
身份证号*
+ +
+
+
出生日期*
+ +
+
+
民族*
+
+ @*
+
疫情状态
+
+
*@
政治面貌
+ @*
+
健康状况
+
+
*@
-
出生日期*
- +
档案自带
+
-
健康状况
-
-
-
户口分类
-
-
籍贯
-
-
-
-
-
+
+
系所*
+
-
-
照片
-
+
+
专业*
+
-
联系电话*
- +
班级*
+
-
E-mail
- +
年级*
+
-
开户银行*
-
+
学制
+
-
开户卡账号*
- +
学习形式
+
-
开户银行位置
- +
入学年月*
+
-
通信地址*
+
通讯地址*
-
邮政编码*
- +
照片
+
-
-
户口所在地
- +
+
联系电话*
+
-
-
档案所在地
- +
+
生源地
+
+ @*
+
E-mail
+ +
*@ + @*
+
户口所在地
+ +
+
+
档案所在地
+ +
*@
户籍所在地
+
+
籍贯
+
+
+
+
+
+
-
是否单亲
-
+
邮政编码*
+ +
+
+
开户银行*
+
+
+
+
开户卡账号*
+ +
+
+
开户银行位置
+
+ @*
+
是否单亲
+
+
*@
父亲姓名
@@ -139,22 +175,22 @@
母亲电话
-
-
户籍地址
- -
-
-
户籍地址
- -
-
-
现住址
- -
-
-
现住址
- -
+ @*
+
户籍地址
+ +
+
+
户籍地址
+ +
+
+
现住址
+ +
+
+
现住址
+ +
*@
监护人姓名
@@ -167,10 +203,10 @@
监护人电话
-
-
监护人户籍地址
- -
+ @*
+
监护人户籍地址
+ +
*@
监护人现住址
@@ -184,77 +220,53 @@
-
年级*
-
+
培养层次
+
+ @*
+
本专科
+
+
+
报到日期*
+ +
*@
-
本专科
-
-
-
-
学制
-
-
-
-
报到日期*
- -
-
-
学习形式
-
-
-
-
毕业证号
- -
-
-
毕业日期
+
预计毕业日期
-
-
毕业证书备注
- -
-
-
系所*
-
-
-
-
专业*
-
-
-
-
班级*
-
-
-
-
入学年月*
- -
-
-
入党时间
- -
-
-
入团时间
- -
-
-
校内地址
- -
-
-
校内电话
- -
-
-
QQ
- -
-
-
特长
- -
+ @*
+
毕业证号
+ +
+
+
毕业证书备注
+ +
+
+
入党时间
+ +
+
+
入团时间
+ +
+
+
校内地址
+ +
+
+
校内电话
+ +
+
+
QQ
+ +
+
+
特长
+ +
*@
备注
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js index dc23b2a78..55ef9d04f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js @@ -72,6 +72,9 @@ var bootstrap = function ($, learun) { }, bind: function () { $('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); + $('#StuPlaceCode').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' }); + $('#IsArchives').lrDataItemSelect({ code: 'YesOrNoInt' }); + $('#PieceCultivateWay').lrDataItemSelect({ code: 'EducationLevel' }); $('#F_ProvinceId').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', select: function (item) { @@ -119,7 +122,7 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); - $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); + $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); $('#NationalityNo').lrDataItemSelect({ code: 'National' }); $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index f6436a682..646ec661c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js @@ -235,10 +235,8 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList', headData: [ - { label: "学号", name: "StuNo", width: 100, align: "left" }, - //{ label: "学籍号", name: "StuCode", width: 100, align: "left" }, { label: "考生号", name: "ksh", width: 100, align: "left" }, - { label: "通知书号", name: "NoticeNo", width: 100, align: "left" }, + { label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "姓名", name: "StuName", width: 100, align: "left" }, { label: "性别", name: "GenderNo", width: 80, align: "left", @@ -334,14 +332,39 @@ var bootstrap = function ($, learun) { }); } }, - { label: "报到日期", name: "RegisterDate", width: 100, align: "left" }, + //{ label: "报到日期", name: "RegisterDate", width: 100, align: "left" }, { label: "入学年月", name: "EntranceDate", width: 100, align: "left" }, //{ label: "余额", name: "Balance", width: 100, align: "left" }, { label: "通讯地址", name: "MailAddress", width: 100, align: "left" }, { label: "联系电话", name: "mobile", width: 100, align: "left" }, - { label: "户口所在地", name: "FatherUnit", width: 100, align: "left" }, - { label: "档案所在地", name: "MatherUnit", width: 100, align: "left" }, + { + label: "生源地", name: "StuPlaceCode", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', + key: value, + keyId: 'ccode', + callback: function (_data) { + callback(_data['cname']); + } + }); + } + }, + //{ label: "户口所在地", name: "FatherUnit", width: 100, align: "left" }, + //{ label: "档案所在地", name: "MatherUnit", width: 100, align: "left" }, { label: "户籍所在地", name: "Domicile", width: 100, align: "left" }, + { + label: "档案是否自带", name: "IsArchives", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'YesOrNoInt', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, { label: "户口分类", name: "ResidenceNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -393,6 +416,7 @@ var bootstrap = function ($, learun) { }); } }, + { label: "邮政编码", name: "PostalCode", width: 100, align: "center" }, //{ label: "E-mail", name: "E-mail", width: 100, align: "center" }, { label: "开户银行", name: "DepositBank", width: 100, align: "center", @@ -408,32 +432,31 @@ var bootstrap = function ($, learun) { }, { label: "开户卡账号", name: "BankCard", width: 100, align: "center" }, { label: "开户银行位置", name: "BankLocation", width: 100, align: "center" }, - { label: "邮政编码", name: "PostalCode", width: 100, align: "center" }, - { - label: "是否单亲", name: "IsSingle", width: 100, align: "left", - formatter: function (value, row) { - if (value == true) { - return '是'; - } - else if (value == false) { - return '否'; - } - } - }, + //{ + // label: "是否单亲", name: "IsSingle", width: 100, align: "left", + // formatter: function (value, row) { + // if (value == true) { + // return '是'; + // } + // else if (value == false) { + // return '否'; + // } + // } + //}, { label: "父亲姓名", name: "FatherName", width: 100, align: "center" }, { label: "身份证号", name: "OneIdCardNo", width: 100, align: "center" }, { label: "父亲电话", name: "FatherPhone", width: 100, align: "center" }, - { label: "户籍地址", name: "OneDomicile", width: 100, align: "center" }, - { label: "现住址", name: "OneAddress", width: 100, align: "center" }, + //{ label: "户籍地址", name: "OneDomicile", width: 100, align: "center" }, + //{ label: "现住址", name: "OneAddress", width: 100, align: "center" }, { label: "母亲姓名", name: "MatherName", width: 100, align: "center" }, { label: "身份证号", name: "TwoIdCardNo", width: 100, align: "center" }, { label: "母亲电话", name: "MatherPhone", width: 100, align: "center" }, - { label: "户籍地址", name: "TwoDomicile", width: 100, align: "center" }, - { label: "现住址", name: "TwoAddress", width: 100, align: "center" }, + //{ label: "户籍地址", name: "TwoDomicile", width: 100, align: "center" }, + //{ label: "现住址", name: "TwoAddress", width: 100, align: "center" }, { label: "监护人姓名", name: "GuardianName", width: 100, align: "center" }, { label: "身份证号", name: "GuardianIdCardNo", width: 100, align: "center" }, { label: "监护人电话", name: "GuardianPhone", width: 100, align: "center" }, - { label: "户籍地址", name: "GuardianDomicile", width: 100, align: "center" }, + //{ label: "户籍地址", name: "GuardianDomicile", width: 100, align: "center" }, { label: "现住址", name: "GuardianAddress", width: 100, align: "center" }, { label: "家庭出身", name: "FamilyOriginNo", width: 100, align: "center", @@ -460,25 +483,38 @@ var bootstrap = function ($, learun) { } }, { - label: "本专科", name: "GraduateNo", width: 100, align: "center", + label: "培养层次", name: "PieceCultivateWay", width: 100, align: "center", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, - code: 'CollegeType', + code: 'EducationLevel', callback: function (_data) { callback(_data.text); } }); } }, - { label: "毕业证号", name: "DiplomaNo", width: 100, align: "center" }, + + //{ + // label: "本专科", name: "GraduateNo", width: 100, align: "center", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'CollegeType', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, { label: "毕业日期", name: "GraduateYear", width: 100, align: "center", formatter: function (cellvalue) { return learun.formatDate(cellvalue, 'yyyy-MM-dd'); } }, - { label: "毕业证书备注", name: "DiplomaRemark", width: 100, align: "center" }, + //{ label: "毕业证号", name: "DiplomaNo", width: 100, align: "center" }, + //{ label: "毕业证书备注", name: "DiplomaRemark", width: 100, align: "center" }, //{ // label: "入党时间", name: "BankCard", width: 100, align: "center", // formatter: function (cellvalue) { @@ -491,10 +527,10 @@ var bootstrap = function ($, learun) { // return learun.formatDate(cellvalue, 'yyyy-MM-dd'); // } //}, - { label: "校内地址", name: "InSchoolAddress", width: 100, align: "center" }, - { label: "校内电话", name: "InSchoolTelephone", width: 100, align: "center" }, - { label: "QQ", name: "QQ", width: 100, align: "center" }, - { label: "特长", name: "GoodAt", width: 100, align: "center" }, + //{ label: "校内地址", name: "InSchoolAddress", width: 100, align: "center" }, + //{ label: "校内电话", name: "InSchoolTelephone", width: 100, align: "center" }, + //{ label: "QQ", name: "QQ", width: 100, align: "center" }, + //{ label: "特长", name: "GoodAt", width: 100, align: "center" }, { label: "备注", name: "Remark", width: 200, align: "center" }, { label: "异动状态", name: "MoveStatus", width: 80, align: "center", diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/IndexCenter.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/IndexCenter.js index d59f83dd8..89b99e680 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/IndexCenter.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/IndexCenter.js @@ -235,10 +235,8 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList', headData: [ - { label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "学籍号", name: "StuCode", width: 100, align: "left" }, - //{ label: "考生号", name: "ksh", width: 100, align: "left" }, - { label: "通知书号", name: "NoticeNo", width: 100, align: "left" }, + { label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "姓名", name: "StuName", width: 100, align: "left" }, { label: "性别", name: "GenderNo", width: 80, align: "left", @@ -334,14 +332,39 @@ var bootstrap = function ($, learun) { }); } }, - { label: "报到日期", name: "RegisterDate", width: 100, align: "left" }, + //{ label: "报到日期", name: "RegisterDate", width: 100, align: "left" }, { label: "入学年月", name: "EntranceDate", width: 100, align: "left" }, //{ label: "余额", name: "Balance", width: 100, align: "left" }, { label: "通讯地址", name: "MailAddress", width: 100, align: "left" }, { label: "联系电话", name: "mobile", width: 100, align: "left" }, - { label: "户口所在地", name: "FatherUnit", width: 100, align: "left" }, - { label: "档案所在地", name: "MatherUnit", width: 100, align: "left" }, + { + label: "生源地", name: "StuPlaceCode", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', + key: value, + keyId: 'ccode', + callback: function (_data) { + callback(_data['cname']); + } + }); + } + }, + //{ label: "户口所在地", name: "FatherUnit", width: 100, align: "left" }, + //{ label: "档案所在地", name: "MatherUnit", width: 100, align: "left" }, { label: "户籍所在地", name: "Domicile", width: 100, align: "left" }, + { + label: "档案是否自带", name: "IsArchives", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'YesOrNoInt', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, { label: "户口分类", name: "ResidenceNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -393,6 +416,7 @@ var bootstrap = function ($, learun) { }); } }, + { label: "邮政编码", name: "PostalCode", width: 100, align: "center" }, //{ label: "E-mail", name: "E-mail", width: 100, align: "center" }, { label: "开户银行", name: "DepositBank", width: 100, align: "center", @@ -408,32 +432,31 @@ var bootstrap = function ($, learun) { }, { label: "开户卡账号", name: "BankCard", width: 100, align: "center" }, { label: "开户银行位置", name: "BankLocation", width: 100, align: "center" }, - { label: "邮政编码", name: "PostalCode", width: 100, align: "center" }, - { - label: "是否单亲", name: "IsSingle", width: 100, align: "left", - formatter: function (value, row) { - if (value == true) { - return '是'; - } - else if (value == false) { - return '否'; - } - } - }, + //{ + // label: "是否单亲", name: "IsSingle", width: 100, align: "left", + // formatter: function (value, row) { + // if (value == true) { + // return '是'; + // } + // else if (value == false) { + // return '否'; + // } + // } + //}, { label: "父亲姓名", name: "FatherName", width: 100, align: "center" }, { label: "身份证号", name: "OneIdCardNo", width: 100, align: "center" }, { label: "父亲电话", name: "FatherPhone", width: 100, align: "center" }, - { label: "户籍地址", name: "OneDomicile", width: 100, align: "center" }, - { label: "现住址", name: "OneAddress", width: 100, align: "center" }, + //{ label: "户籍地址", name: "OneDomicile", width: 100, align: "center" }, + //{ label: "现住址", name: "OneAddress", width: 100, align: "center" }, { label: "母亲姓名", name: "MatherName", width: 100, align: "center" }, { label: "身份证号", name: "TwoIdCardNo", width: 100, align: "center" }, { label: "母亲电话", name: "MatherPhone", width: 100, align: "center" }, - { label: "户籍地址", name: "TwoDomicile", width: 100, align: "center" }, - { label: "现住址", name: "TwoAddress", width: 100, align: "center" }, + //{ label: "户籍地址", name: "TwoDomicile", width: 100, align: "center" }, + //{ label: "现住址", name: "TwoAddress", width: 100, align: "center" }, { label: "监护人姓名", name: "GuardianName", width: 100, align: "center" }, { label: "身份证号", name: "GuardianIdCardNo", width: 100, align: "center" }, { label: "监护人电话", name: "GuardianPhone", width: 100, align: "center" }, - { label: "户籍地址", name: "GuardianDomicile", width: 100, align: "center" }, + //{ label: "户籍地址", name: "GuardianDomicile", width: 100, align: "center" }, { label: "现住址", name: "GuardianAddress", width: 100, align: "center" }, { label: "家庭出身", name: "FamilyOriginNo", width: 100, align: "center", @@ -460,25 +483,37 @@ var bootstrap = function ($, learun) { } }, { - label: "本专科", name: "GraduateNo", width: 100, align: "center", + label: "培养层次", name: "PieceCultivateWay", width: 100, align: "center", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, - code: 'CollegeType', + code: 'EducationLevel', callback: function (_data) { callback(_data.text); } }); } }, - { label: "毕业证号", name: "DiplomaNo", width: 100, align: "center" }, + //{ + // label: "本专科", name: "GraduateNo", width: 100, align: "center", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'CollegeType', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, { label: "毕业日期", name: "GraduateYear", width: 100, align: "center", formatter: function (cellvalue) { return learun.formatDate(cellvalue, 'yyyy-MM-dd'); } }, - { label: "毕业证书备注", name: "DiplomaRemark", width: 100, align: "center" }, + //{ label: "毕业证号", name: "DiplomaNo", width: 100, align: "center" }, + //{ label: "毕业证书备注", name: "DiplomaRemark", width: 100, align: "center" }, //{ // label: "入党时间", name: "BankCard", width: 100, align: "center", // formatter: function (cellvalue) { @@ -491,10 +526,10 @@ var bootstrap = function ($, learun) { // return learun.formatDate(cellvalue, 'yyyy-MM-dd'); // } //}, - { label: "校内地址", name: "InSchoolAddress", width: 100, align: "center" }, - { label: "校内电话", name: "InSchoolTelephone", width: 100, align: "center" }, - { label: "QQ", name: "QQ", width: 100, align: "center" }, - { label: "特长", name: "GoodAt", width: 100, align: "center" }, + //{ label: "校内地址", name: "InSchoolAddress", width: 100, align: "center" }, + //{ label: "校内电话", name: "InSchoolTelephone", width: 100, align: "center" }, + //{ label: "QQ", name: "QQ", width: 100, align: "center" }, + //{ label: "特长", name: "GoodAt", width: 100, align: "center" }, { label: "备注", name: "Remark", width: 200, align: "center" }, { label: "异动状态", name: "MoveStatus", width: 80, align: "center", diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreRank.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreRank.cshtml new file mode 100644 index 000000000..577aaaf8a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreRank.cshtml @@ -0,0 +1,50 @@ +@{ ViewBag.Title = "全院学生成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; } + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+  查询 +
+
+
+
+ + 0 +
+
+
+
+ + 0 +
+
+
+
+  打印 +
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScore/StuScoreRank.js") \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreRank.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreRank.js new file mode 100644 index 000000000..7576ef0c9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreRank.js @@ -0,0 +1,126 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-14 11:02 + * 描 述:全院学生成绩查看 + */ +var selectedRow; +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.bind(); + page.bindSelect(); + }, + bind: function () { + // 查询 + $('#btn_Search').on('click', function () { + var p = {}; + p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + p.Semester = $('#Semester').lrselectGet(); + p.StuNo = $.trim($('#StuNo').val()); + if (p.StuNo == null || p.StuNo == "") { + learun.alert.warning("请输入学号!"); + return; + } + + page.initGird(); + page.search(p); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //打印 + $('#lr_print').on('click', function () { + var AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + var Semester = $('#Semester').lrselectGet(); + var StuNo = $.trim($('#StuNo').val()); + if (StuNo == null || StuNo == "") { + learun.alert.warning("请输入学号!"); + return; + } + learun.layerForm({ + id: 'AllStuScoreQueryPrint', + title: '学生成绩单', + url: top.$.rootUrl + '/EducationalAdministration/StuScore/AllStuScoreQueryPrint?StuNo=' + StuNo + '&AcademicYearNo=' + AcademicYearNo + '&Semester=' + Semester, + width: 1200, + height: 800, + btn: null + }); + }); + }, + bindSelect: function () { + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListRank', + headData: [ + { label: '学号', name: 'StuNo', width: 100, align: "left" }, + { label: '姓名', name: 'StuName', width: 200, align: "left" }, + { label: '专业', name: 'MajorName', width: 100, align: "left" }, + { label: '班级', name: 'ClassName', width: 100, align: "left" }, + { label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, + { label: '学期', name: 'Semester', width: 50, align: "left" }, + { label: '课程分类', name: 'LessonSortName', width: 60, align: "left" }, + { label: '课程类型', name: 'LessonTypeName', width: 100, align: "left" }, + { label: '科目', name: 'LessonName', width: 300, align: "left" }, + { label: '学分', name: 'StudyScore', width: 50, align: "left" }, + { label: '成绩', name: 'Score', width: 100, align: "left" }, + { label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, + { label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, + { label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, + { label: '班级排名', name: 'RankInClass', width: 100, align: "left" }, + { label: '系排名', name: 'RankIndept', width: 100, align: "left" }, + ], + mainId: 'StuNo', + isPage: false, + sidx: '', + sord: '', + onRenderComplete: function (data) { + var studyscoreall = 0; + var studyscore = 0; + for (var i = 0; i < data.length; i++) { + if (!!data[i].LessonSortNo && data[i].LessonSortNo == "1") { + if (!!data[i].StudyScore) { + studyscoreall += data[i].StudyScore; + } + } + if (!!data[i].Score && data[i].Score >= 60) { + studyscore += data[i].StudyScore; + } + } + $("#spanstudyscoreall").html(studyscoreall + 10); + $("#spanstudyscore").html(studyscore); + } + }); + + //page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs index 60130b163..6dd7932ba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs @@ -193,6 +193,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers { dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("@@@userId", "'" + loginUserInfo.userId + "'"); } + dtListEntity.F_Sql += " order by F_time desc"; var reqDataTable = databaseLinkIbll.FindTable(dtListEntity.F_DataSourceId.Trim(), dtListEntity.F_Sql); if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587") { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs index d14ddcb56..a311c1cb5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs @@ -6,6 +6,9 @@ using System.Collections.Generic; using System.Collections; using System; using System.Linq; +using Learun.Application.OA; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.WorkFlow; namespace Learun.Application.Web.Areas.LR_Desktop.Controllers { @@ -91,6 +94,98 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers return Success(count); } + + + private SYS_ReceiveMessageIBLL sYS_ReceiveMessageIBLL = new SYS_ReceiveMessageBLL(); + private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL(); + private NoticeIBLL newsIBLL = new NoticeBLL(); + private Sys_ReceiveFileIBLL sys_ReceiveFileIBLL = new Sys_ReceiveFileBLL(); + /// + /// 获取未读的消息的数量 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetCountFortotalUnread() + { + int totalcount = 0; + #region 待办 + var userinfo = LoginUserInfo.Get(); + Pagination paginationobj = new Pagination() { rows = 100, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" }; + //未读邮件 + int UnreadMail = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userinfo.userId + "\"}").Count(m => m.READFLAG == 0); + //办公事项 + paginationobj.sidx = "F_CreateDate"; + int UnreadTask = nWFProcessIBLL.GetMyTaskPageList(userinfo, paginationobj, "{}").Count(); + //公告 + List outnewslist = new List(); + var newsList = newsIBLL.GetPageList(paginationobj, ""); + foreach (var newsitemEntity in newsList) + { + if (!string.IsNullOrEmpty(newsitemEntity.F_SendPostId)) + { + if (!string.IsNullOrEmpty(userinfo.postIds)) + { + if (userinfo.postIds.Contains(",")) + { + foreach (var postid in userinfo.postIds.Split(',')) + { + if (newsitemEntity.F_SendPostId.Contains(postid)) + { + outnewslist.Add(newsitemEntity); + break; + } + } + } + else + { + if (newsitemEntity.F_SendPostId.Contains(userinfo.postIds)) + { + outnewslist.Add(newsitemEntity); + } + } + } + } + else + { + if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId)) + { + if (userinfo.departmentId != null && newsitemEntity.F_SendDeptId.Contains(userinfo.departmentId)) + { + outnewslist.Add(newsitemEntity); + } + } + else + { + outnewslist.Add(newsitemEntity); + } + } + } + //var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); + var readnewslist = readbll.GetListOfSelf().Select(m => m.NewsId).ToList(); + int UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); + paginationobj.sidx = "SendTime"; + int UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count(); + //普通教师请假-未归档数 + int UnfileLeave = 0; + //中层领导请假-未归档数 + int UnfileLeaveZC = 0; + + totalcount = UnreadFile + UnreadNews + UnreadTask + UnreadMail + UnfileLeave + UnfileLeaveZC; + #endregion + var data = new + { + UnreadTask= UnreadTask, + UnreadNews= UnreadNews, + UnfileLeave= UnfileLeave, + UnfileLeaveZC= UnfileLeaveZC, + totalcount = totalcount + }; + return Success(data); + } + private static LR_OA_NewsReadBLL readbll = new LR_OA_NewsReadBLL(); /// /// 获取未读的消息 /// @@ -245,11 +340,32 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers else { messageRindIBLL.SaveReadSigns(keyValue); + + + //var loginUserInfo = LoginUserInfo.Get(); + + //var model = messageRindIBLL.GetMessageRemindEntity(keyValue); + ////判断当前用户是否阅读当前通知公告 + //var entity = lR_OA_NewsReadIBLL.GetLR_OA_NewsReadEntityByNewsIdAndUserId(model.InstanceId, loginUserInfo.userId); + //if (entity == null) + //{ + // var lR_OA_NewsRead = new LR_OA_NewsReadEntity() + // { + // NewsId = model.InstanceId, + // RUserId = loginUserInfo.userId, + // RUserName = loginUserInfo.realName, + // RTime = DateTime.Now + // }; + // lR_OA_NewsReadIBLL.SaveEntity("", lR_OA_NewsRead); + + // //修改当前通知公告的浏览量 + // lR_OA_NewsReadIBLL.UpdateNewsPV(model.InstanceId); + //} } } return Success("保存成功!"); } - + private static LR_OA_NewsReadBLL lR_OA_NewsReadIBLL = new LR_OA_NewsReadBLL(); /// /// 更改状态为已读 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/WeChatTemplet/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/WeChatTemplet/Index.cshtml index a8599c269..a75f586e0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/WeChatTemplet/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/WeChatTemplet/Index.cshtml @@ -12,7 +12,7 @@
-
+
 录入  修改  删除 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/WeChatTemplet/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/WeChatTemplet/Index.js index 99e630fb1..98529dbce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/WeChatTemplet/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/WeChatTemplet/Index.js @@ -65,7 +65,7 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/LR_Desktop/WeChatTemplet/GetPageList', headData: [ { label: "模板名称", name: "TName", width: 100, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs index b0efa1a9e..b126a4503 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs @@ -250,6 +250,13 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers /// public ActionResult SignForm() { + ViewBag.IsHaveStampRight = false; + var loginUserInfo = LoginUserInfo.Get(); + if (loginUserInfo.Description.Contains("管理员") || loginUserInfo.roleIds.Split(',').Contains(Config.GetValue("StampRightRoleId"))) + { + ViewBag.IsHaveStampRight = true; + } + return View(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs index 6adad10d0..e89691a1e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs @@ -47,6 +47,31 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers { return View(); } + + /// + /// 管理页面【个人印章】 + /// + /// + public ActionResult IndexInPersonal() + { + return View("~/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.cshtml"); + } + /// + /// 表单页面【个人印章】 + /// + /// + public ActionResult FormInPersonal() + { + return View("~/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.cshtml"); + } + /// + /// 流程审批-个人印章【个人印章】 + /// + /// + public ActionResult StampDetailIndexInPersonal() + { + return View("~/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.cshtml"); + } #endregion #region 获取数据 @@ -80,9 +105,9 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers /// [HttpGet] [AjaxOnly] - public ActionResult GetList(string keyword) + public ActionResult GetList(string keyword, string userId, string category) { - var data = lr_StampManageIBLL.GetList(keyword); + var data = lr_StampManageIBLL.GetList(keyword,userId,category); return Success(data); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml index 65d50ce89..f1c537fcd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.cshtml @@ -18,7 +18,9 @@ @Html.AppendCssFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.css")
- 打印表单 + @*打印表单*@ + @*流程任务-打印表单*@ + 打印表单
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js index 3181196a6..82eeb68ce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorForm.js @@ -8,6 +8,7 @@ var processId = request('processId'); // 流程实例主键 var nodeId = request('nodeId'); // 流程节点 var schemeObj2; +var nodeInfoList = []; //审核节点部分,流程任务-打印表单需要使用 var bootstrap = function ($, learun) { "use strict"; @@ -240,6 +241,36 @@ var bootstrap = function ($, learun) { $.print('.lr-layout-panel'); }); $('#print').show(); + // 流程任务-打印表单 + $('#print2').on('click', function () { + var $iframes = $('#form_list_iframes'); + var iframeId = $iframes.find('.form-list-iframe.active').attr('id'); + //表单部分 + let res = []; + if (iframeId) { + var $iframe = learun.iframe(iframeId, frames); + res = $iframe.$('body').lrGetFormShow(); + } else { + res = $iframes.lrGetFormShow(); + } + //审核部分 + let anodeinfoList = []; + for (var i = 0; i < nodeInfoList.length; i++) { + var nodeItem = nodeInfoList[i]; + if (nodeItem.title != "开始") { + var anodeinfo = { + type: 'anodeinfo', + title: nodeItem.title, + content: nodeItem.content, + date: nodeItem.time, + user: nodeItem.people, + }; + anodeinfoList.push(anodeinfo); + } + } + $.jqprintForm(res.concat(anodeinfoList)); + }); + $('#print2').show(); }, // iframe 加载 iframeLoad: function (iframeId, url, callback, formData) { @@ -256,7 +287,11 @@ var bootstrap = function ($, learun) { } if (!!iframeObj.$) { - callback(iframeObj, formData); + //callback(iframeObj, formData); + //优化系统表单中的数据无法回显问题; + setTimeout(function () { + callback(iframeObj, formData); + }, 10); } }; @@ -405,6 +440,7 @@ var bootstrap = function ($, learun) { nodelist.push(point); } + nodeInfoList = nodelist; $('#wf_timeline').lrtimelineEsc(nodelist); } }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.cshtml index beddb3d8f..fba3e170c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.cshtml @@ -74,8 +74,8 @@
-
审批意见*
- +
审批意见
+
创建流程 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.css index a0606381a..c04724b98 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.css @@ -132,7 +132,7 @@ .form-list-tabs .nav-tabs > li { white-space: nowrap; - display: inline-block !important; + /*display: inline-block !important;*/ float: initial; } @@ -236,13 +236,13 @@ .auditinfo-s { position: absolute; - top: 0; - right: 200px; - height: 100px; + top: 25px; + right: 225px; + height: 50px; } .auditinfo-s img { - height: 100px; + height: 50px; } .auditinfo-sg { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js index e961cc2ba..6e8d12e53 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js @@ -86,11 +86,11 @@ var bootstrap = function ($, learun) { nwflow.initAgainCreate(); break; case 'audit':// 审批 - $("#des").attr('isvalid', 'yes'); + //$("#des").attr('isvalid', 'yes'); nwflow.initAudit(); break; case 'signAudit':// 加签审批 - $("#des").attr('isvalid', 'yes'); + //$("#des").attr('isvalid', 'yes'); nwflow.initSignAudit(); break; case 'refer': // 查阅 @@ -673,6 +673,13 @@ var bootstrap = function ($, learun) { // } //}); + //需要填写审批意见时,验证审批意见的必填性 + var des = $('#des').val(); + if (btnData.isOpinion == '1' && !des) { + learun.alert.warning('请签署审批意见!'); + return false; + } + top.flowAuditfn = function (signUrl, stamp) { // 下个流程是否需要可以手动选择审核人 getNextUsers(btnData, nwflow.currentNode, '', nwflow.processId, nwflow.taskId, function (data) { @@ -709,7 +716,7 @@ var bootstrap = function ($, learun) { operationName: btnData.name, processId: nwflow.processId, taskId: nwflow.taskId, - des: $('#des').val(), + des: des, auditors: JSON.stringify(auditers), signUrl: signUrl, stamp: stamp @@ -736,7 +743,7 @@ var bootstrap = function ($, learun) { operationName: btnData.name, processId: nwflow.processId, taskId: nwflow.taskId, - des: $('#des').val(), + des: des, signUrl: signUrl, stamp: stamp }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml index 3aeb76732..cd5570622 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml @@ -4,18 +4,30 @@ }
-
+
- @Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js") + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js index 5e4a3dce0..f22cc710d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js @@ -22,6 +22,7 @@ var bootstrap = function ($, learun) { $('#stamp').hide(); stampUrl = ''; }); + //学校公章 $('#btn_stamp').on('click', function () { learun.layerForm({ id: 'StampDetailIndex', @@ -39,6 +40,45 @@ var bootstrap = function ($, learun) { } }); }); + //个人印章 + $('#btn_stampPersonal').on('click', function () { + learun.layerForm({ + id: 'StampDetailIndexInPersonal', + title: '印章列表', + url: top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/StampDetailIndexInPersonal', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(function (imgutl) { + $('#stamp').find('img').attr('src', top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetImg?keyValue=' + imgutl); + $('#stamp').show(); + stampUrl = imgutl; + console.log(stampUrl); + }); + } + }); + }); + + function debounce(fn, delay) { + let time = null; + return function () { + if (time !== null) { + clearTimeout(time); + } + time = setTimeout(() => { + fn.call(this); + }, delay) + } + } + + //$('#btn_finish').on('click', debounce(function () { + // console.log('123456') + + // var datapair = $sigdiv.jsignature("getdata"); + // top.flowauditfn(datapair,stampurl); + // learun.layerclose(window.name); + + //},500)) function debounce(fn, delay) { let time = null; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js index 4521e022a..cd75f1022 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js @@ -54,6 +54,8 @@ var bootstrap = function ($, learun) { return false; } + postData.F_Category = 1; + var f = document.getElementById('uploadFile').files[0]; //是否上传图片 if (!!f) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js index 4b278fec3..9dc067685 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js @@ -198,6 +198,7 @@ var bootstrap = function ($, learun) { param = param || {}; param.F_StampType = F_StampType; param.F_EnabledMark = F_EnabledMark; + param.F_Category = 1; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.cshtml index bf2a6b395..840ace914 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.cshtml @@ -11,7 +11,7 @@  查询
- +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js index 9c09a4ce1..34958b12e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js @@ -38,14 +38,14 @@ var bootstrap = function ($, learun) { }); }, initData: function () { - $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + '', function (data) { + $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + '' +'&category=1', function (data) { $('.lr-layout-wrap').lrSetFormData(data.data); $('#datagird').jfGridSet('refreshdata', data); }); }, search: function (param) { param = param || {}; - $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + keyword, function (data) { + $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + keyword+'&category=1', function (data) { $('.lr-layout-wrap').lrSetFormData(data.data); $('#datagird').jfGridSet('refreshdata', data); @@ -54,14 +54,35 @@ var bootstrap = function ($, learun) { }; acceptClick = function (callBack) { var keyValue = $("#datagird").jfGridValue("F_StampId"); + if (!keyValue) { + learun.alert.error("请选择印章!"); + return false; + } if (!$('.lr-item').lrValidform()) { return false; } var postData = $('.lr-item').lrGetFormData(); var F_Password = $.md5(postData.F_Password); - learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/EqualForm', { keyValue: keyValue, Password: F_Password }, function (res) { - callBack(keyValue); + + //learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/EqualForm', { keyValue: keyValue, Password: F_Password }, function (res) { + // callBack(keyValue); + //}); + + learun.loading(true, '正在提交数据'); + learun.httpAsyncPost(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/EqualForm', { keyValue: keyValue, Password: F_Password }, function (res) { + learun.loading(false); + if (res.code == learun.httpCode.success) { + callBack(keyValue); + learun.alert.success(res.info); + top.layer.close(top.layer.index); + } + else { + learun.alert.error(res.info); + learun.httpErrorLog(res.info); + location.reload(); + } }); + }; page.init(); } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.cshtml new file mode 100644 index 000000000..86d7091e8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.cshtml @@ -0,0 +1,43 @@ + +@{ + ViewBag.Title = "个人印章操作"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +@Html.AppendCssFile("/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.css") +
+
+
印章名称*
+ +
+
+
印章分类*
+
+
+ +
+
密码*
+ +
+
+
排序*
+ +
+
+
图片文件
+
+ +
+
+ 上传图片尺寸为200x200,大小不超过1M。 +
+
+
+
备注
+ +
+ +
+ +@Html.AppendJsFile("/Views/LR_Content/script/lr-fileupload.js", "/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js") + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.css new file mode 100644 index 000000000..9f775b33a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.css @@ -0,0 +1,21 @@ +.fileEx { + width: 100%; + height: 120px; + position: relative; + overflow: hidden; +} + + .fileEx input { + position: absolute; + font-size: 120px; + right: 0; + top: 0; + opacity: 0; + cursor: pointer !important; + } + + .fileEx img { + width: 120px; + height: 120px; + cursor: pointer; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js new file mode 100644 index 000000000..79e01085c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js @@ -0,0 +1,88 @@ +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:力软-前端开发组 + * 日 期:2022.12.05 + * 描 述:个人印章管理 + */ + +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + + function uploadImg() { + var f = document.getElementById("uploadFile").files[0];//获取文件 + var src = window.URL.createObjectURL(f); + document.getElementById('uploadPreview').src = src; + } + var page = { + init: function () { + page.bind(); + page.initData(); + }, + bind: function () { + // 印章分类 + $('#F_StampType').lrDataItemSelect({ code: 'StampType' }); + //图片显示 + $('#uploadFile').on('change', uploadImg); + $('.fileEx').prepend(''); + }, + initData: function () { + if (!!selectedRow) { + selectedRow.F_Password = '*****'; + $('#form').lrSetFormData(selectedRow); + + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(keyValue); + if (postData.F_Password != '*****' || !keyValue) { + postData.F_Password = $.md5(postData.F_Password); + } + else { + delete postData.F_Password; + } + if (!keyValue && !postData.uploadFile) { + learun.alert.error("请选择图片"); + return false; + } + + postData.F_Category = 2; + + var f = document.getElementById('uploadFile').files[0]; + //是否上传图片 + if (!!f) { + learun.loading(true, '正在保存...'); + $.ajaxFileUpload({ + data: postData, + url: top.$.rootUrl + "/LR_NewWorkFlow/StampInfo/UploadFile?keyValue=" + keyValue, + secureuri: false, + fileElementId: 'uploadFile', + dataType: 'json', + success: function (data) { + if (!!callBack) { + callBack(); + } + learun.loading(false); + learun.layerClose(window.name); + } + }); + } + else { + $.lrSaveForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } + }; + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.cshtml new file mode 100644 index 000000000..169252463 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.cshtml @@ -0,0 +1,61 @@ + +@{ + ViewBag.Title = "个人印章管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
印章分类信息
+
+
+
+
+
+
+ 印章管理 - 未选择分类 +
+
+
+
+
+ + +
+
+
+ +
+
+  查询 +
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js new file mode 100644 index 000000000..cc22a7e98 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js @@ -0,0 +1,210 @@ +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人: + * 日 期:2022.12.05 + * 描 述:个人印章管理 + */ +var selectedRow; +var refreshGirdData; +var F_StampType; +var F_StampName; +var F_EnabledMark; +var acceptClick; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGrid(); + page.bind(); + }, + bind: function () { + // 左侧数据加载 + $('#lr_left_tree').lrtree({ + url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailTree', + param: { itemCode: 'StampType' }, + nodeClick: function (item) { + F_StampType = item.value; + F_StampName = null;//将文本框数据设置为null,如果不设置,那么不能按照左侧分类查询 + F_EnabledMark = null;//将文本框数据设置为null,如果不设置,那么不能按照左侧分类查询 + $('#titleinfo').text(item.text); + page.search(); + } + }); + //查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + F_StampType = null; + page.search({ F_StampName: keyword }); + }); + + $('[name="isEnabled"]').on('click', function () { + var value = $(this).val(); //状态查询 + if (value == 1) { + F_EnabledMark = value; + page.search(); + } + else { + F_EnabledMark = value; + page.search(); + } + }); + //刷新 + $("#lr_refresh").on('click', function () { + location.reload(); + }); + //新增 + $("#lr_add").on('click', function () { + selectedRow = null; + learun.layerForm({ + id: 'form', + title: '添加印章', + url: top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/FormInPersonal', + width: 700, + height: 500, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + //编辑 + $("#lr_edit").on("click", function () { + selectedRow = $("#gridtable").jfGridGet("rowdata");//获取选中的当前行数据 + var keyValue = $("#gridtable").jfGridValue("F_StampId");//获取当前选中的主键值 + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'Form', + title: '编辑印章', + url: top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/FormInPersonal?keyValue=' + keyValue, + width: 750, + height: 500, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + //删除 + $("#lr_delete").on("click", function () { + var keyValue = $('#gridtable').jfGridValue('F_StampId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 启用 + $('#lr_enable').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_StampId'); + var enabledMark = $('#gridtable').jfGridValue('F_EnabledMark'); + if (learun.checkrow(keyValue)) { + if (enabledMark != 1) { + learun.layerConfirm('是否确认启用该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/UpDateSate', { keyValue: keyValue, state: 1 }, function () { + refreshGirdData(); + }); + } + }); + } + else { + learun.alert.warning('该项已启用!'); + } + } + }); + // 禁用 + $('#lr_disabled').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_StampId'); + var enabledMark = $('#gridtable').jfGridValue('F_EnabledMark'); + + if (learun.checkrow(keyValue)) { + if (enabledMark == 1) { + learun.layerConfirm('是否确认禁用该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/UpDateSate', { keyValue: keyValue, state: 0 }, function () { + refreshGirdData(); + }); + } + }); + } + else { + learun.alert.warning('该项已禁用!'); + } + } + }); + /*分类管理*/ + $('#lr_category').on('click', function () { + learun.layerForm({ + id: 'ClassifyIndex', + title: '分类管理', + url: top.$.rootUrl + '/LR_SystemModule/DataItem/DetailIndex?itemCode=StampType', + width: 800, + height: 500, + maxmin: true, + btn: null, + end: function () { + learun.clientdata.update('dataItem'); + location.reload(); + } + }); + }); + }, + initGrid: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetPageList', + headData: [ + { label: '印章名称', name: 'F_StampName', width: 150, align: "center" }, + { + label: '印章分类', name: 'F_StampType', width: 100, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'StampType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: '图片', name: 'F_ImgFile', width: 110, align: "center", + formatter: function (value, row, op, $cell) { + return ''; + } + }, + { + label: '状态', name: 'F_EnabledMark', width: 60, align: "center", formatter: function (value, row, op, $cell) { + if (value == 1) { + return '启用'; + } else if (value == 0) { + return '禁用'; + } + } + }, + { label: '备注', name: 'F_Description', width: 200, align: "left" } + ], + mainId: 'F_StampId', + isPage: true, + rowHeight: 110, + sidx: 'F_EnabledMark Desc,F_Sort ASC' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.F_StampType = F_StampType; + param.F_EnabledMark = F_EnabledMark; + param.F_Category = 2; + param.F_CreateUserId = learun.clientdata.get(['userinfo']).userId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + } + refreshGirdData = function () { + page.search(); + }; + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.cshtml new file mode 100644 index 000000000..00e9f547a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.cshtml @@ -0,0 +1,64 @@ +@{ + ViewBag.Title = "个人印章管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
+ +
+
+  查询 +
+
+ +
+
+
+
+ +@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js") + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js new file mode 100644 index 000000000..a6df6c2ff --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js @@ -0,0 +1,88 @@ +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人: + * 日 期:2022.12.05 + * 描 述:个人印章管理 + */ +var keyword; +var acceptClick; +var path = ''; +var bootstrap = function ($, learun) { + "use strict"; + // 保存数据 + var page = { + init: function () { + page.bind(); + page.initData(); + }, + bind: function () { + // 订单产品信息 + $('#datagird').jfGrid({ + headData: [ + { label: '名称', name: 'F_StampName', width: 150, align: "center" }, + { + label: '印章', name: 'F_ImgFile', width: 110, align: "left", + formatter: function (value, row, op, $cell) { + return ''; + } + } + ], + mainId: 'F_StampId', + rowHeight: 110, + }); + //查询 + $('#btn_Search').on('click', function () { + keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); + }); + }, + initData: function () { + $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + '' + '&category=2&userId=' + learun.clientdata.get(['userinfo']).userId, function (data) { + $('.lr-layout-wrap').lrSetFormData(data.data); + $('#datagird').jfGridSet('refreshdata', data); + }); + }, + search: function (param) { + param = param || {}; + $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + keyword + '&category=2&userId=' + learun.clientdata.get(['userinfo']).userId, function (data) { + $('.lr-layout-wrap').lrSetFormData(data.data); + $('#datagird').jfGridSet('refreshdata', data); + + }); + } + }; + acceptClick = function (callBack) { + var keyValue = $("#datagird").jfGridValue("F_StampId"); + if (!keyValue) { + learun.alert.error("请选择印章!"); + return false; + } + if (!$('.lr-item').lrValidform()) { + return false; + } + var postData = $('.lr-item').lrGetFormData(); + var F_Password = $.md5(postData.F_Password); + + //learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/EqualForm', { keyValue: keyValue, Password: F_Password }, function (res) { + // callBack(keyValue); + //}); + + learun.loading(true, '正在提交数据'); + learun.httpAsyncPost(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/EqualForm', { keyValue: keyValue, Password: F_Password }, function (res) { + learun.loading(false); + if (res.code == learun.httpCode.success) { + callBack(keyValue); + learun.alert.success(res.info); + top.layer.close(top.layer.index); + } + else { + learun.alert.error(res.info); + learun.httpErrorLog(res.info); + location.reload(); + } + }); + + }; + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs index 0a4e65137..699f9c605 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs @@ -42,6 +42,12 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return View(); } + [HttpGet] + public ActionResult FormView() + { + return View(); + } + [HttpGet] public ActionResult AttendanceReportByWeek() { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Form.cshtml index 327d9852f..b63473ef5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Form.cshtml @@ -21,12 +21,26 @@
打卡状态
-
+
+
+
+
+
是否外勤
+
打卡地点
+
+
照片
+
+
+
+
+
备注
+ +
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ADR_Record/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Form.js index c8b67bb9f..ed8e4f021 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Form.js @@ -23,6 +23,8 @@ var bootstrap = function ($, learun) { }); $('#ADType').lrDataItemSelect({ code: 'ADType' }); $('#ClockStatus').lrDataItemSelect({ code: 'ADStatus' }); + $('#AIsOut').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#ADPhoto').lrUploader(); $('#UserNo').lrDataSourceSelect({ code: 'BaseUser', value: 'f_account', text: 'f_realname' }); }, initData: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/FormView.cshtml new file mode 100644 index 000000000..8e2d7cb9b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/FormView.cshtml @@ -0,0 +1,46 @@ +@{ + ViewBag.Title = "考勤记录"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
员工名字
+
+
+
+
考勤类型
+
+
+
+
考勤时间
+ +
+
+
打卡时间
+ +
+
+
打卡状态
+
+
+
+
+
是否外勤
+
+
+
+
+
打卡地点
+ +
+
+
照片
+
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ADR_Record/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/FormView.js new file mode 100644 index 000000000..fd182d4bf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/FormView.js @@ -0,0 +1,48 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-08-28 18:09 + * 描 述:考勤记录 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#Department').lrselect({ + type: 'tree', + allowSearch: true, + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', + param: {} + }); + $('#ADType').lrDataItemSelect({ code: 'ADType' }); + $('#ClockStatus').lrDataItemSelect({ code: 'ADStatus' }); + $('#AIsOut').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#ADPhoto').lrUploader({ isUpload: false}); + $('#UserNo').lrDataSourceSelect({ code: 'BaseUser', value: 'f_account', text: 'f_realname' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ADR_Record/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]); + } + $("#ADTime").val(data[id].ADTime); + $("#ClockTime").val(data[id].ClockTime); + } + }); + } + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.cshtml index 637ed439b..25657abd9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.cshtml @@ -42,8 +42,9 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js index 41086592b..61e199c55 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js @@ -47,7 +47,7 @@ var bootstrap = function ($, learun) { }, 250, 400); $('#Department').lrDepartmentSelect(); $('#ADR_Device').lrDataSourceSelect({ code: 'ADR_Device', value: 'dname', text: 'dname' }); - $('#ADStatus').lrDataItemSelect({ code: 'ADStatus'}); + $('#ADStatus').lrDataItemSelect({ code: 'ADStatus' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -81,6 +81,19 @@ var bootstrap = function ($, learun) { }); } }); + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '查看', + url: top.$.rootUrl + '/LogisticsManagement/ADR_Record/FormView?keyValue=' + keyValue, + width: 600, + height: 400, + btn: null + }); + } + }); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); @@ -97,7 +110,7 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/LogisticsManagement/ADR_Record/GetPageList', headData: [ { @@ -157,7 +170,12 @@ var bootstrap = function ($, learun) { }); } }, - { label: "打卡地点", name: "ClockPlace", width: 100, align: "left" }, + { + label: "是否外勤", name: "AIsOut", width: 100, align: "left", formatter: function (value) { + return value == true ? "是" : "否"; + } + }, + { label: "打卡地点", name: "ClockPlace", width: 200, align: "left" }, { label: "考勤数据上传时间", name: "ADTime", width: 150, align: "left" } ], mainId: 'ID', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js index 38eb89978..a4adc7a7a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js @@ -54,9 +54,9 @@ var bootstrap = function ($, learun) { }); } }, - { label: "日期", name: "ClockDate", width: 100, align: "left" }, - { label: "班次", name: "BanCi", width: 60, align: "left" }, - { label: "时间段", name: "TimePeriod", width: 150, align: "left" }, + { label: "日期", name: "ClockDate", width: 100, align: "left", sort: true }, + { label: "班次", name: "BanCi", width: 60, align: "left", sort: true }, + { label: "时间段", name: "TimePeriod", width: 150, align: "left", sort: true }, { label: "上班状态", name: "ADStatusWork", width: 60, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { @@ -76,7 +76,7 @@ var bootstrap = function ($, learun) { } }); - } + }, sort: true }, { label: "下班状态", name: "ADStatusClose", width: 60, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -96,16 +96,16 @@ var bootstrap = function ($, learun) { } }); - } + }, sort: true }, - { label: "签到时间", name: "ClockTimeWork", width: 80, align: "left" }, - { label: "签退时间", name: "ClockTimeClose", width: 80, align: "left" }, - { label: "迟到(分钟)", name: "ChidaoMinutes", width: 80, align: "left" }, - { label: "早退(分钟)", name: "ZaoTuiMinutes", width: 80, align: "left" }, - { label: "出勤(分钟)", name: "ChuQinMinutes", width: 80, align: "left" }, - { label: "缺勤(分钟)", name: "QueQinMinutes", width: 80, align: "left" }, - { label: "工作(分钟)", name: "WorkMinutes", width: 80, align: "left" }, - { label: "休息(分钟)", name: "RestMinutes", width: 80, align: "left" }, + { label: "签到时间", name: "ClockTimeWork", width: 80, align: "left", sort: true }, + { label: "签退时间", name: "ClockTimeClose", width: 80, align: "left", sort: true}, + { label: "迟到(分钟)", name: "ChidaoMinutes", width: 80, align: "left", sort: true }, + { label: "早退(分钟)", name: "ZaoTuiMinutes", width: 80, align: "left", sort: true}, + { label: "出勤(分钟)", name: "ChuQinMinutes", width: 80, align: "left", sort: true }, + //{ label: "缺勤(分钟)", name: "QueQinMinutes", width: 80, align: "left",sort: true }, + { label: "工作(分钟)", name: "WorkMinutes", width: 80, align: "left",sort: true }, + { label: "休息(分钟)", name: "RestMinutes", width: 80, align: "left", sort: true }, ], mainId: '', isPage: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ConferenceRoomController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ConferenceRoomController.cs index 9ada6b114..87c88b9d6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ConferenceRoomController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ConferenceRoomController.cs @@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } #endregion @@ -61,6 +61,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList() + { + var data = conferenceRoomIBLL.GetList(); + return Success(data); + } /// /// 获取表单数据 /// @@ -69,8 +82,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var ConferenceRoomData = conferenceRoomIBLL.GetConferenceRoomEntity( keyValue ); - var jsonData = new { + var ConferenceRoomData = conferenceRoomIBLL.GetConferenceRoomEntity(keyValue); + var jsonData = new + { ConferenceRoom = ConferenceRoomData, }; return Success(jsonData); @@ -102,9 +116,21 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { ConferenceRoomEntity entity = strEntity.ToObject(); - conferenceRoomIBLL.SaveEntity(keyValue,entity); + conferenceRoomIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + /// + /// 启用禁用实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoEnable(string keyValue, string status) + { + conferenceRoomIBLL.DoEnable(keyValue, status); + return Success("操作成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs index 04e2bc2b4..afd25fe52 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs @@ -57,7 +57,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return View(); } /// - /// 主页面-我参加的会议 + /// 主页面-我申请的会议 /// /// [HttpGet] @@ -65,13 +65,13 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { return View(); } - - /// - /// 报表统计 - /// - /// [HttpGet] - public ActionResult IndexStatistics() + public ActionResult IndexAll() + { + return View(); + } + [HttpGet] + public ActionResult qrCode() { return View(); } @@ -113,18 +113,6 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return Success(data); } /// - /// 获取报表数据 - /// - /// 查询参数 - /// - [HttpGet] - [AjaxOnly] - public ActionResult GetStatisticList(string queryJson) - { - var data = meetingManagementIBLL.GetStatisticList(queryJson); - return Success(data); - } - /// /// 获取表单数据 /// /// @@ -182,6 +170,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { UserInfo userInfo = LoginUserInfo.Get(); MeetingManagementEntity entity = strEntity.ToObject(); + //判断会议场地是否被占用 + var isOccupy = meetingManagementIBLL.JudgeIsOccupy(entity); + if (isOccupy) + { + return Fail("会议场地当前时间段已被占用!"); + } entity.CreateUser = userInfo.userId; entity.CreateTime = DateTime.Now; entity.CheckStatus = "0"; @@ -212,6 +206,13 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult DoSubmit(string keyValue, string status, string processId) { + //判断会议场地是否被占用 + var entity = meetingManagementIBLL.GetMeetingManagementEntity(keyValue); + var isOccupy = meetingManagementIBLL.JudgeIsOccupy(entity); + if (isOccupy) + { + return Fail("会议场地当前时间段已被占用!"); + } meetingManagementIBLL.DoSubmit(keyValue, status, processId); return Success("操作成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingMinutesController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingMinutesController.cs new file mode 100644 index 000000000..75c234822 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingMinutesController.cs @@ -0,0 +1,128 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesController : MvcControllerBase + { + private MeetingMinutesIBLL meetingMinutesIBLL = new MeetingMinutesBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = meetingMinutesIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = meetingMinutesIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var MeetingMinutesData = meetingMinutesIBLL.GetMeetingMinutesEntity( keyValue ); + var jsonData = new { + MeetingMinutes = MeetingMinutesData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + meetingMinutesIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + UserInfo userInfo = LoginUserInfo.Get(); + MeetingMinutesEntity entity = strEntity.ToObject(); + entity.CreateTime = DateTime.Now; + entity.CreateUser = userInfo.userId; + meetingMinutesIBLL.SaveEntity(userInfo,keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingNoticeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingNoticeController.cs new file mode 100644 index 000000000..4a6d2da67 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingNoticeController.cs @@ -0,0 +1,128 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeController : MvcControllerBase + { + private MeetingNoticeIBLL meetingNoticeIBLL = new MeetingNoticeBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = meetingNoticeIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = meetingNoticeIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var MeetingNoticeData = meetingNoticeIBLL.GetMeetingNoticeEntity( keyValue ); + var jsonData = new { + MeetingNotice = MeetingNoticeData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + meetingNoticeIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + UserInfo userInfo = LoginUserInfo.Get(); + MeetingNoticeEntity entity = strEntity.ToObject(); + entity.CreateTime = DateTime.Now; + entity.CreateUser = userInfo.userId; + meetingNoticeIBLL.SaveEntity(userInfo,keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingSignInRecordController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingSignInRecordController.cs index 697c4d0cf..f899ed8c9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingSignInRecordController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingSignInRecordController.cs @@ -37,25 +37,6 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { return View(); } - /// - /// 会议考勤 - /// - /// - [HttpGet] - public ActionResult IndexAttendance() - { - return View(); - } - /// - /// 会议考勤-查看 - /// - /// - [HttpGet] - public ActionResult FormViewAttendance() - { - return View(); - } - #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.cshtml index a3fb208a8..1681fddb8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.cshtml @@ -3,25 +3,29 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
名称
- +
+
场地名称*
+
-
-
地点
- +
+
地点*
+
-
+
状态
- +
-
+
可容纳人数
- +
-
+
备注
- + +
+
+
添加时间*
+
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js index b15f2bae5..a120d0a51 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js @@ -15,6 +15,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $("#Status").lrDataItemSelect({ code: 'EnableStatus' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.cshtml index 567b03b95..9fdbd0799 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.cshtml @@ -11,12 +11,12 @@
-
名称
+
场地名称
状态
- +
@@ -31,6 +31,10 @@  修改  删除
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.js index 6a78a0faf..e7eac8a91 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.js @@ -16,18 +16,19 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); + $("#Status").lrDataItemSelect({ code: 'EnableStatus' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ + learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/Form', - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -41,8 +42,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '编辑', url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/Form?keyValue=' + keyValue, - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -53,9 +54,45 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { + learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 启用 + $('#lr_enable').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == "1") { + learun.alert.warning("当前项已启用!"); + return false; + } + learun.layerConfirm('是否确认启用该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/DoEnable', { keyValue: keyValue, status: "1" }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 禁用 + $('#lr_disable').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "1") { + learun.alert.warning("当前项未启用!"); + return false; + } + learun.layerConfirm('是否确认禁用该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/DoEnable', { keyValue: keyValue, status: "0" }, function () { refreshGirdData(); }); } @@ -68,20 +105,25 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/GetPageList', headData: [ - { label: "名称", name: "Name", width: 100, align: "left"}, - { label: "地点", name: "Address", width: 100, align: "left"}, - { label: "状态", name: "Status", width: 100, align: "left"}, - { label: "可容纳人数", name: "Scale", width: 100, align: "left"}, - { label: "备注", name: "Remark", width: 100, align: "left"}, + { label: "场地名称", name: "Name", width: 200, align: "left" }, + { label: "地点", name: "Address", width: 200, align: "left" }, + { + label: "状态", name: "Status", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == 1 ? "启用" : "禁用"; + } + }, + { label: "可容纳人数", name: "Scale", width: 100, align: "left" }, + { label: "添加时间", name: "CreateTime", width: 100, align: "left" }, ], - mainId:'ID', - isPage: true + mainId: 'ID', + isPage: true, + sidx: 'CreateTime desc' }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.cshtml index 949b5ee1e..4eecae013 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.cshtml @@ -21,11 +21,11 @@
会议开始时间*
- +
会议结束时间*
- +
会议记录者
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js index 469b7203c..86247033c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js @@ -93,6 +93,14 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + //验证结束时间必须大于开始时间 + var BeginTime = $("#BeginTime").val(); + var EndTime = $("#EndTime").val(); + if (new Date(EndTime) <= new Date(BeginTime)) { + learun.alert.warning("会议结束时间必须大于会议开始时间!"); + return false; + } + return true; }; // 保存数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.cshtml index cc6d59681..5968422e4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.cshtml @@ -22,11 +22,11 @@
会议开始时间*
- +
会议结束时间*
- +
会议记录者
@@ -44,9 +44,9 @@
联系电话*
-
+ @*
扫码签到
-
+
*@
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js index 5e536ad42..e4cbd9c77 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js @@ -97,19 +97,12 @@ var bootstrap = function ($, learun) { }; // 保存数据 save = function (processId, callBack, i) { - var formData = $('body').lrGetFormData(); - if (!!processId) { - formData.ProcessId = processId; + if (!!callBack) { + var res = { + code: 200, data: {} + }; + callBack(res, i); } - var postData = { - strEntity: JSON.stringify(formData) - }; - $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { - // 保存成功后才回调 - if (!!callBack) { - callBack(res, i); - } - }); }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml index 3cb8f5afb..a4883b7a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml @@ -43,8 +43,8 @@  考勤  纪要  通知 -  审核通过 -  审核不通过 + @* 审核通过 +  审核不通过*@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexAll.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexAll.cshtml new file mode 100644 index 000000000..009986977 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexAll.cshtml @@ -0,0 +1,46 @@ +@{ + /**/ + + ViewBag.Title = "会议管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+
+
+
+
+
+
+
+
会议主题
+ +
+
+
会议场地
+
+
+
+
申请人
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/IndexAll.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexAll.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexAll.js new file mode 100644 index 000000000..973a63287 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexAll.js @@ -0,0 +1,145 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-02-21 10:07 + * 描 述:会议管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#MeetingPlace').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/GetList', + value: "ID", + text: "Name" + }); + $('#CreateUser').lrUserSelect(0); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'viewform', + title: '查看会议工作', + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/FormView?keyValue=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); + // 会议签到情况 + $('#lr_case').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'viewform', + title: '签到情况', + url: top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/Index?MeetID=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); + + + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/GetPageList', + headData: [ + { label: "会议主题", name: "MeetingTitle", width: 150, align: "left" }, + { label: "会议场地", name: "ConferenceRoomName", width: 100, align: "left" }, + { label: "开始时间", name: "BeginTime", width: 120, align: "left" }, + { label: "结束时间", name: "EndTime", width: 120, align: "left" }, + { + label: "会议记录者", name: "RecordPerson", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "联系人", name: "Linkman", width: 100, align: "left" }, + { label: "联系电话", name: "LinkPhone", width: 100, align: "left" }, + { + label: "申请人", name: "CreateUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "申请时间", name: "CreateTime", width: 120, align: "left" }, + { + label: "会议状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == "1" ? "已通过" : cellvalue == "2" ? "未通过" : cellvalue == "3" ? "审核中" : "未审核"; + } + }, + { + label: "审核人", name: "CheckUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + //callback(_data.name); + return row.CheckStatus != "1" && row.CheckStatus != "2" ? "" : callback(_data.name); + } + }); + } + }, + { + label: "审核时间", name: "CheckTime", width: 120, align: "left", formatter: function (value, row) { + return row.CheckStatus != "1" && row.CheckStatus != "2" ? "" : value; + } + }, + ], + mainId: 'Id', + isPage: true, + sidx: 'CreateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (res && res.code && res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'MeetingManagementApply',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml index baa5705a1..46315eff8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml @@ -4,6 +4,7 @@ ViewBag.Title = "会议管理"; Layout = "~/Views/Shared/_Index.cshtml"; } + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js index 9be3e8340..dad876495 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js @@ -137,9 +137,34 @@ var bootstrap = function ($, learun) { }); } }); - // 考勤 // 纪要 + $('#lr_minutes').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'MeetingMinutesIndex', + title: '会议纪要', + url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Index?MeetID=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); // 通知 + $('#lr_notice').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'MeetingNoticeIndex', + title: '会议通知', + url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/Index?MeetID=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); // 审核通过 $('#lr_checkyes').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -176,6 +201,35 @@ var bootstrap = function ($, learun) { }); } }); + // 会议签到情况 + $('#lr_case').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'viewform', + title: '签到情况', + url: top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/Index?MeetID=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); + // 查看 + $('#lr_print').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'viewform', + title: '二维码', + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/qrCode?keyValue=' + keyValue, + width: 700, + height: 800, + btn: null + }); + } + }); + }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.cshtml index a7873c2ad..00e6f0a8d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.cshtml @@ -1,7 +1,7 @@ @{ /**/ - ViewBag.Title = "我参加的会议"; + ViewBag.Title = "会议管理"; Layout = "~/Views/Shared/_Index.cshtml"; }
@@ -34,8 +34,15 @@
+ -
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.js index 36c36c606..ab540e8ed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.js @@ -28,6 +28,79 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'addform', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/Form', + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus == "1") { + learun.alert.warning("当前项已审核通过!"); + return false; + } else if (CheckStatus == "3") { + learun.alert.warning("当前项审核中!"); + return false; + } + learun.layerForm({ + id: 'editform', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/Form?keyValue=' + keyValue, + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus != "0") { + learun.alert.warning("当前项已审核或审核中!"); + return false; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); // 查看 $('#lr_view').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -42,7 +115,106 @@ var bootstrap = function ($, learun) { }); } }); - + //提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus == "1") { + learun.alert.warning("当前项已审核通过!"); + return false; + } else if (CheckStatus == "3") { + learun.alert.warning("当前项审核中!"); + return false; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DoSubmit', { keyValue: keyValue, status: '3', processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + // 纪要 + $('#lr_minutes').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'MeetingMinutesIndex', + title: '会议纪要', + url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Index?MeetID=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); + // 通知 + $('#lr_notice').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'MeetingNoticeIndex', + title: '会议通知', + url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/Index?MeetID=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); + // 审核通过 + $('#lr_checkyes').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus == '1') { + learun.alert.warning("该项已审核通过!"); + return false; + } + learun.layerConfirm('是否确认审核通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DoCheck', { keyValue: keyValue, status: '1' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 审核不通过 + $('#lr_checkno').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus == '2') { + learun.alert.warning("该项已审核不通过!"); + return false; + } + learun.layerConfirm('是否确认审核不通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DoCheck', { keyValue: keyValue, status: '2' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 会议签到情况 + $('#lr_case').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'viewform', + title: '签到情况', + url: top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/Index?MeetID=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); }, // 初始化列表 initGird: function () { @@ -114,6 +286,17 @@ var bootstrap = function ($, learun) { } }; refreshGirdData = function (res, postData) { + if (res && res.code && res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'MeetingManagementApply',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } page.search(); }; page.init(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.cshtml new file mode 100644 index 000000000..e2ced8208 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "会议管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+ 打印 +
+
+
+
会议主题*
+ +
+
+
会议场地*
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.js") +@Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js", "/Content/js/qrcode.min.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.js new file mode 100644 index 000000000..66246133f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.js @@ -0,0 +1,116 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-02-21 10:07 + * 描 述:会议管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#MeetingPlace').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/GetList', + value: "ID", + text: "Name" + }); + $('#subprint').on('click', function () { + $('#form').jqprint(); + }) + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/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]); + } + //扫码签到 + makeCode(data[id].Id); + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'MeetingManagement' && data[id]) { + keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + if (!!callBack) { + var res = { + code: 200, data: {} + }; + callBack(res, i); + } + }; + page.init(); +} +//扫码签到 +var qrcode = new QRCode(document.getElementById("qrCode"), { + width: 550, + height: 550 +}); +function makeCode(urls) { + qrcode.makeCode(urls); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.cshtml new file mode 100644 index 000000000..b8d27e31a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "会议纪要"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
纪要标题*
+ +
+
+
纪要内容
+ +
+
+
附件上传
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingMinutes/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.js new file mode 100644 index 000000000..cb8645f13 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.js @@ -0,0 +1,54 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-03-08 10:36 + * 描 述:会议纪要 + */ +var acceptClick; +var keyValue = request('keyValue'); +var MeetID = request('MeetID');//会议ID +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#Files').lrUploader(); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/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]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var data = $('body').lrGetFormData(); + data.MeetID = MeetID; + var postData = { + strEntity: JSON.stringify(data) + }; + $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.cshtml new file mode 100644 index 000000000..8ddb98ebc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.cshtml @@ -0,0 +1,43 @@ +@{ + /**/ + + ViewBag.Title = "会议纪要"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
会议名称
+ +
+
+
纪要标题
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingMinutes/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.js new file mode 100644 index 000000000..c107383eb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.js @@ -0,0 +1,98 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-03-08 10:36 + * 描 述:会议纪要 + */ +var refreshGirdData; +var MeetID = request('MeetID');//会议ID +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); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'MeetingMinutesform', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Form?MeetID=' + MeetID, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'MeetingMinutesform', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Form?keyValue=' + keyValue + '&MeetID=' + MeetID, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/GetPageList', + headData: [ + { label: "会议", name: "MeetingTitle", width: 150, align: "left" }, + { label: "纪要标题", name: "Title", width: 150, align: "left" }, + { label: "内容", name: "Content", width: 150, align: "left" }, + { label: "创建时间", name: "CreateTime", width: 100, align: "left" }, + { label: "创建人", name: "CreateUser", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'CreateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.MeetID = MeetID; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.cshtml new file mode 100644 index 000000000..655adb1a1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "会议通知"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
通知标题*
+ +
+
+
通知内容
+ +
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingNotice/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.js new file mode 100644 index 000000000..29ae06d53 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.js @@ -0,0 +1,54 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-03-08 10:36 + * 描 述:会议通知 + */ +var acceptClick; +var keyValue = request('keyValue'); +var MeetID = request('MeetID');//会议ID +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + //$('#Files').lrUploader(); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingNotice/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]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var data = $('body').lrGetFormData(); + data.MeetID = MeetID; + var postData = { + strEntity: JSON.stringify(data) + }; + $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/MeetingNotice/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.cshtml new file mode 100644 index 000000000..120f309a3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.cshtml @@ -0,0 +1,43 @@ +@{ + /**/ + + ViewBag.Title = "会议通知"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
会议名称
+ +
+
+
通知标题
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingNotice/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.js new file mode 100644 index 000000000..df6bb776b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.js @@ -0,0 +1,98 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-03-08 10:36 + * 描 述:会议通知 + */ +var refreshGirdData; +var MeetID = request('MeetID');//会议ID +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); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'MeetingNoticeform', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/Form?MeetID=' + MeetID, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'MeetingNoticeform', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/Form?keyValue=' + keyValue + '&MeetID=' + MeetID, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MeetingNotice/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/GetPageList', + headData: [ + { label: "会议", name: "MeetingTitle", width: 150, align: "left" }, + { label: "通知标题", name: "Title", width: 150, align: "left" }, + { label: "内容", name: "Content", width: 150, align: "left" }, + { label: "创建时间", name: "CreateTime", width: 100, align: "left" }, + { label: "创建人", name: "CreateUser", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'CreateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.MeetID = MeetID; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Index.js index 22d437003..71293cb87 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Index.js @@ -5,6 +5,7 @@ * 描 述:会议签到记录 */ var refreshGirdData; +var MeetID = request('MeetID');//会议ID var bootstrap = function ($, learun) { "use strict"; var page = { @@ -126,6 +127,7 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.MeetID = MeetID; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducationSelect_.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducationSelect_.js index 185344e4e..06f7da3bf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducationSelect_.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducationSelect_.js @@ -15,8 +15,7 @@ var bootstrap = function ($, learun) { if ($("#predata").text()) { //当前班级 var dataval = JSON.parse($("#predata .card-box").attr("data-val")) - //var classno = dataval.map(item =>} {}) - param.ClassNo = dataval.map(item => { return item.className }).filter(function (itm, i, a) { + param.ClassNo = dataval.map(item => { return item.teachClassNo }).filter(function (itm, i, a) { return i == a.indexOf(itm); }).join(','); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs index e71d20ee8..8486ced98 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -166,13 +166,15 @@ namespace Learun.Application.Web.Controllers } } } - var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); + //var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); + var readnewslist = readbll.GetListOfSelf().Select(m => m.NewsId).ToList(); ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); paginationobj.sidx = "SendTime"; //ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId); return View(); } + private static LR_OA_NewsReadBLL readbll = new LR_OA_NewsReadBLL(); public ActionResult GoTo() { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UtilityController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UtilityController.cs index 43d49ba4b..6e67524b6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UtilityController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UtilityController.cs @@ -97,7 +97,11 @@ namespace Learun.Application.Web.Controllers case "listfile": return ListFileManager(UeditorConfig.GetString("fileManagerListPath"), UeditorConfig.GetStringList("fileManagerAllowFiles")); case "catchimage": - return CrawlerHandler(); + //return CrawlerHandler();存在漏洞 + return Content(new + { + state = "action 参数为空或者 action 不被支持。" + }.ToJson()); default: return Content(new { 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 05f11e728..e97d7955b 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 @@ -537,6 +537,8 @@ + + @@ -1025,6 +1027,8 @@ + + @@ -1042,6 +1046,7 @@ + @@ -1460,6 +1465,7 @@ + @@ -1647,6 +1653,10 @@ + + + + @@ -1730,9 +1740,15 @@ + + + + + + @@ -8273,6 +8289,19 @@ + + + + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js index e19598913..6319990a8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js @@ -328,4 +328,37 @@ } }); }; + + window.setInterval(gettotalunread, 30000); + //未读消息totalcount + function gettotalunread() { + $.ajax({ + url: top.$.rootUrl + '/LR_Desktop/MessageRind/GetCountFortotalUnread', + type: "get", + dataType: "json", + async: false, + success: function (data) { + if (data.data != 0) { + //document.getElementsByClassName("lr-im-bell2")[0].children[0].children[2].innerText = data.data; + + //UnreadTask = UnreadTask, + // UnreadNews = UnreadNews, + // UnfileLeave = UnfileLeave, + // UnfileLeaveZC = UnfileLeaveZC, + // totalcount = totalcount + + //$("#btn_daiban", window.parent.document).html("11") + //$('#btn_tonggao', window.parent.document).html("<22") + ////$('#btn_gongwen').text(data.totalcount) + //$('body > div.lr-im-bell2.open > ul > li:nth-child(5)', window.parent.document).html("44") + //$('body > div.lr-im-bell2 > a > span:nth-child(3)', window.parent.document).html("123") + $("#btn_daiban", window.parent.document).html("待办事项 " + data.data.UnreadTask + " 条") + $('#btn_tonggao', window.parent.document).html("通告 " + data.data.UnreadNews + " 条") + //$('#btn_gongwen').text(data.totalcount) + $('body > div.lr-im-bell2.open > ul > li:nth-child(5)', window.parent.document).html("共 " + data.data.totalcount+" 条") + $('body > div.lr-im-bell2 > a > span:nth-child(3)', window.parent.document).html(data.data.totalcount) + } + } + }); + }; }); \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js index 0b5fc2ada..d6e87b445 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js @@ -22,7 +22,7 @@ } var _width = 0; var len = data.length; - $.each(data, function (_index, _item) {//_item:label 显示列名 /name 字段名 /width 宽度 /align 对齐方式 /frozen 冻结列 /statistics 统计 /isMerge 合并//ishide 是否隐藏 + $.each(data, function (_index, _item) {//_item:label 显示列名 /name 字段名 /width 宽度 /align 对齐方式 /frozen 冻结列 /statistics 统计 /isMerge 合并//ishide 是否隐藏 /sort 是否禁用当前列的排序 if (!_item.ishide) { //设置列表头数据 var col = { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index 6ec74a1f8..ea0aaf173 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -162,12 +162,14 @@ - + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj index 1d8fe3921..96b9f332c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj @@ -221,9 +221,13 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AttendanceApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AttendanceApi.cs index bd9bedd25..8e0faa69c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AttendanceApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AttendanceApi.cs @@ -19,7 +19,7 @@ namespace Learun.Application.WebApi.Modules { //判断当前时间是否可以打卡 Get["/IsAttendance"] = IsAttendance; - //打卡 + //上下班打卡 Post["/clockin"] = ClockIn; //获取考勤打卡记录 Get["/getrecordpagelist"] = GetRecordPageList; @@ -29,6 +29,11 @@ namespace Learun.Application.WebApi.Modules Post["/clockinStudent"] = ClockInStudent; //打卡记录 Get["/GetTeacherRecord"] = GetTeacherRecord; + + //教师上下课打卡:判断当前打卡状态 + //Get["IsAttendanceTeacher"] = IsAttendanceTeacher; + //教师上下课打卡 + //Post["/clockinTeacher"] = ClockInTeacher; } private ADR_RestrictionIBLL adr_RestrictionBLL = new ADR_RestrictionBLL(); private ADR_RecordIBLL adr_RecordBLL = new ADR_RecordBLL(); @@ -91,7 +96,7 @@ namespace Learun.Application.WebApi.Modules } /// - /// 打卡 + /// 上下班打卡 /// /// /// @@ -103,6 +108,11 @@ namespace Learun.Application.WebApi.Modules return Success("打卡成功"); } + /// + /// 学生打卡 + /// + /// + /// public Response ClockInStudent(dynamic _) { Attendance parameter = this.GetReqData(); @@ -129,5 +139,33 @@ namespace Learun.Application.WebApi.Modules }; return Success(jsonData); } + + /// + /// 教师上下课打卡:判断当前打卡状态 + /// + /// + /// + public Response IsAttendanceTeacher(dynamic _) + { + var res = adr_RestrictionBLL.IsAttendanceTeacher(); + var jsondata = + new + { + data = res + }; + return Success(jsondata); + } + /// + /// 教师上下课打卡 + /// + /// + /// + public Response ClockInTeacher(dynamic _) + { + Attendance parameter = this.GetReqData(); + adr_RestrictionBLL.ClockInTeacher(parameter.ALon, parameter.ALat, parameter.AIsOut, parameter.ARemark, parameter.ADPhoto, parameter.ClockPlace, parameter.LessonSortNo, parameter.ALTId, parameter.ALTOEId); + + return Success("打卡成功"); + } } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseApi.cs index db158f172..7652dd528 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseApi.cs @@ -191,7 +191,7 @@ namespace Learun.Application.WebApi ReqParameter req = this.Bind(); loginMark = req.loginMark; token = req.token; - if (path == "/learun/adms/user/login"|| path == "/learun/adms/user/loginbyIdCard" || path == "/" || path == "/bgimg" || path == "/learun/adms/user/img" || path == "/learun/adms/desktop/img"||path== "/learun/adms/user/imgfordc"||path== "/learun/adms/timetable/timeTableData"||path== "/quanjiang/sso/authorize") + if (path == "/learun/adms/user/login" || path == "/learun/adms/user/loginbyIdCard" || path == "/" || path == "/bgimg" || path == "/learun/adms/user/img" || path == "/learun/adms/desktop/img" || path == "/learun/adms/user/imgfordc" || path == "/learun/adms/timetable/timeTableData" || path == "/quanjiang/sso/authorize" || path == "/learun/adms/StampPersonal/img") {// 登录接口,默认页面接口不做权限验证处理 return null; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseNoLoginApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseNoLoginApi.cs index f035dacb7..2ce743ead 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseNoLoginApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseNoLoginApi.cs @@ -161,7 +161,7 @@ namespace Learun.Application.WebApi ReqParameter req = this.Bind(); loginMark = req.loginMark; token = req.token; - if (path == "/learun/adms/user/login" || path == "/" || path == "/bgimg" || path == "/learun/adms/user/img" || path == "/learun/adms/desktop/img") + if (path == "/learun/adms/user/login" || path == "/" || path == "/bgimg" || path == "/learun/adms/user/img" || path == "/learun/adms/desktop/img" || path == "/learun/adms/StampPersonal/img") {// 登录接口,默认页面接口不做权限验证处理 return null; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs index 18cb62eee..1134f1c33 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs @@ -46,6 +46,9 @@ namespace Learun.Application.WebApi.Modules Post["/revoke"] = RevokeFlow; Post["/refer"] = ReferFlow; + Post["/instance"] = SaveInstanceForms; + Post["/auditors"] = SaveAuditors; + } private NWFSchemeIBLL nWFSchemeIBLL = new NWFSchemeBLL(); private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL(); @@ -296,8 +299,8 @@ namespace Learun.Application.WebApi.Modules { formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData); } - //TODO:移动端传参signUrl??? - nWFProcessIBLL.AuditFlow(parameter.operationCode, parameter.operationName, parameter.processId, parameter.taskId, parameter.des, parameter.auditors, "", parameter.signUrl, userInfo); + //移动端传参signUrl,stamp, + nWFProcessIBLL.AuditFlow(parameter.operationCode, parameter.operationName, parameter.processId, parameter.taskId, parameter.des, parameter.auditors, parameter.stamp, parameter.signUrl, userInfo); return Success("审批成功"); } @@ -379,6 +382,41 @@ namespace Learun.Application.WebApi.Modules nWFProcessIBLL.ReferFlow(parameter.processId, parameter.taskId, userInfo); return Success("确认成功"); } + /// + /// app保存实例 + /// + /// + /// + public Response SaveInstanceForms(dynamic _) + { + List param = this.GetReqData>(); + + foreach (var item in param) + { + formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData); + } + return Success("保存成功!"); + } + /// + /// app保存审核人 + /// + /// + /// + public Response SaveAuditors(dynamic _) + { + var param = this.GetReqData(); + UserInfo userInfo = LoginUserInfo.Get(); + try + { + nWFProcessIBLL.AuditFlow(param.operationCode, param.operationName, param.processId, param.taskId, param.des, param.auditors, param.stamp, param.signUrl, userInfo); + return Success("流程审批成功"); + } + catch (System.Exception ex) + { + + return Fail(ex.Message); + } + } private class flowParam { @@ -443,6 +481,11 @@ namespace Learun.Application.WebApi.Modules /// 签字图片信息 ///
public string signUrl { get; set; } + + /// + /// 签章信息 + /// + public string stamp { get; set; } } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs new file mode 100644 index 000000000..5f39c72f5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs @@ -0,0 +1,182 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System; +using Learun.Application.WorkFlow; + +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-02-21 10:07 + /// 描 述:会议管理 + /// + public class MeetingManagementApi : BaseApi + { + private MeetingManagementIBLL meetingManagementIBLL = new MeetingManagementBLL(); + private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL(); + + /// + /// 注册接口 + /// + public MeetingManagementApi() + : base("/learun/adms/PersonnelManagement/MeetingManagement") + { + Get["/pagelist"] = GetPageList; + Get["/list"] = GetList; + Get["/form"] = GetForm; + Get["/shList"] = GetshList; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; + Post["/submit"] = Submit; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = meetingManagementIBLL.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); + } + /// + /// 获取页面显示列表数据 + /// + /// + /// + public Response GetList(dynamic _) + { + string queryJson = this.GetReqData(); + var data = meetingManagementIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var MeetingManagementData = meetingManagementIBLL.GetMeetingManagementEntity(keyValue); + var jsonData = new + { + MeetingManagement = MeetingManagementData, + }; + return Success(jsonData); + } + + /// + /// 获取页面显示列表数据 + /// + /// + /// + public Response GetshList(dynamic _) + { + MeetingManagementEntity parameter = this.GetReqData(); + var MeetingManagement = meetingManagementIBLL.GetMeetingManagementEntityByProcessId(parameter.ProcessId); + return Success(MeetingManagement); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + meetingManagementIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + MeetingManagementEntity entity = parameter.strEntity.ToObject(); + //判断会议场地是否被占用 + var isOccupy = meetingManagementIBLL.JudgeIsOccupy(entity); + if (isOccupy) + { + return Fail("会议场地当前时间段已被占用!"); + } + entity.CreateUser = userInfo.userId; + entity.CreateTime = DateTime.Now; + entity.CheckStatus = "0"; + string id = meetingManagementIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); ; + var json = new + { + Id = id + }; + return Success(json); + } + ///// + ///// 提交 + ///// + ///// + ///// + //public Response Submit(dynamic _) + //{ + // string keyValue = this.GetReqData(); + // var processId = Guid.NewGuid().ToString(); + // meetingManagementIBLL.DoSubmit(keyValue, "1", processId); + // UserInfo userInfo = LoginUserInfo.Get(); + // nWFProcessIBLL.CreateFlow("MeetingManagementApply", processId, "", 1, "", userInfo); + // return Success("提交成功!"); + //} + + public Response Submit(dynamic _) + { + MeetingManagementEntity parameter = this.GetReqData(); + //判断会议场地是否被占用 + var entity = meetingManagementIBLL.GetMeetingManagementEntity(parameter.Id); + var isOccupy = meetingManagementIBLL.JudgeIsOccupy(entity); + if (isOccupy) + { + return Fail("会议场地当前时间段已被占用!"); + } + + //string keyValue = this.GetReqData(); + //var processId = Guid.NewGuid().ToString(); + meetingManagementIBLL.DoSubmit(parameter.Id, "1", parameter.ProcessId); + //UserInfo userInfo = LoginUserInfo.Get(); + //nWFProcessIBLL.CreateFlow("0.1", processId, "", 1, "", userInfo); + return Success("提交成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity + { + public string keyValue { get; set; } + public string strEntity { get; set; } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingMinutesApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingMinutesApi.cs new file mode 100644 index 000000000..38893dd70 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingMinutesApi.cs @@ -0,0 +1,116 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.PersonnelManagement; +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesApi : BaseApi + { + private MeetingMinutesIBLL meetingMinutesIBLL = new MeetingMinutesBLL(); + + /// + /// 注册接口 + /// + public MeetingMinutesApi() + : base("/Learun/adms/PersonnelManagement/MeetingMinutes") + { + Get["/pagelist"] = GetPageList; + Get["/list"] = GetList; + Get["/form"] = GetForm; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = meetingMinutesIBLL.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); + } + /// + /// 获取页面显示列表数据 + /// + /// + /// + public Response GetList(dynamic _) + { + string queryJson = this.GetReqData(); + var data = meetingMinutesIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var MeetingMinutesData = meetingMinutesIBLL.GetMeetingMinutesEntity( keyValue ); + var jsonData = new { + MeetingMinutes = MeetingMinutesData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + meetingMinutesIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + MeetingMinutesEntity entity = parameter.strEntity.ToObject(); + meetingMinutesIBLL.SaveEntity(this.userInfo,parameter.keyValue,entity); + return Success("保存成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity { + public string keyValue { get; set; } + public string strEntity{ get; set; } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs new file mode 100644 index 000000000..88d79efe0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs @@ -0,0 +1,137 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.PersonnelManagement; +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-02-21 10:16 + /// 描 述:会议签到记录 + /// + public class MeetingSignInRecordApi : BaseApi + { + private MeetingSignInRecordIBLL meetingSignInRecordIBLL = new MeetingSignInRecordBLL(); + + /// + /// 注册接口 + /// + public MeetingSignInRecordApi() + : base("/learun/adms/PersonnelManagement/MeetingSignInRecord") + { + Get["/pagelist"] = GetPageList; + Get["/list"] = GetList; + Get["/form"] = GetForm; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; + Get["/scan"] = Scan; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = meetingSignInRecordIBLL.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); + } + /// + /// 获取页面显示列表数据 + /// + /// + /// + public Response GetList(dynamic _) + { + string queryJson = this.GetReqData(); + var data = meetingSignInRecordIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var MeetingSignInRecordData = meetingSignInRecordIBLL.GetMeetingSignInRecordEntity(keyValue); + var jsonData = new + { + MeetingSignInRecord = MeetingSignInRecordData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + meetingSignInRecordIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + + /// + /// 会议扫码签到 + /// + /// + /// + public Response Scan(dynamic _) + { + ScanParam scanParam = this.GetReqData(); + var result = meetingSignInRecordIBLL.Scan(scanParam.userid, scanParam.meetid); + return Success(new { result }); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + MeetingSignInRecordEntity entity = parameter.strEntity.ToObject(); + meetingSignInRecordIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); + return Success("保存成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity + { + public string keyValue { get; set; } + public string strEntity { get; set; } + } + + private class ScanParam + { + public string userid { get; set; } + public string meetid { get; set; } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StampPersonalApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StampPersonalApi.cs new file mode 100644 index 000000000..76c547731 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StampPersonalApi.cs @@ -0,0 +1,109 @@ +using Learun.Application.AppMagager; +using Learun.Util; +using Nancy; +using System.Collections.Generic; +using System.Linq; +using Learun.Application.Base.SystemModule; +using Learun.Application.TwoDevelopment.LR_Desktop; +using System.Text; +using System.Data; +using Learun.Application.WorkFlow; +using Learun.Application.OA.LR_StampManage; + + +namespace Learun.Application.WebApi.Modules +{ + + public class StampPersonalApi : BaseApi + { + + public StampPersonalApi() + : base("/learun/adms/StampPersonal") + { + Get["/list"] = GetList; + Get["/schoollist"] = GetSchoolList; + Get["/img"] = GetImg; + Post["/equalPassword"] = EqualPassword; + Get["/ishaveright"] = IsHaveStampRight; + } + private LR_StampManageIBLL lr_StampManageIBLL = new LR_StampManageBLL(); + + /// + /// 个人签章 + /// + /// + /// + public Response GetList(dynamic _) + { + SPParam param = this.GetReqData(); + var data = lr_StampManageIBLL.GetList(param.keyword, userInfo.userId, "2"); + return Success(data); + } + /// + /// 学校签章 + /// + /// + /// + public Response GetSchoolList(dynamic _) + { + SPParam param = this.GetReqData(); + var data = lr_StampManageIBLL.GetList(param.keyword, null, "1"); + return Success(data); + } + /// + /// 获取签章图片 + /// + /// + /// + public Response GetImg(dynamic _) + { + string param = this.GetReqData(); + lr_StampManageIBLL.GetImg(param); + return Success(""); + } + /// + /// 验证签章密码 + /// + /// + /// + public Response EqualPassword(dynamic _) + { + var msg = ""; + SPParam param = this.GetReqData(); + var data = lr_StampManageIBLL.EqualPassword(param.F_StampId, param.F_Password); + if (data) + { + msg = "密码验证成功!"; + } + else + { + msg = "密码不正确!"; + } + return Success(new { result = data, msg = msg }); + } + /// + /// 判断登录用户是否有“学校签章”的使用权限 + /// + /// + /// + public Response IsHaveStampRight(dynamic _) + { + var result = false; + if (userInfo.Description.Contains("管理员") || userInfo.roleIds.Split(',').Contains(Config.GetValue("StampRightRoleId"))) + { + result = true; + } + + return Success(new { result = result }); + } + + } + + public class SPParam + { + public string keyword { get; set; } + public string F_StampId { get; set; } + public string F_Password { get; set; } + } + +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/ioc.config index 10679c9f7..48e13fef7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/ioc.config @@ -11,6 +11,8 @@ + + @@ -29,6 +31,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config index 75541c535..8594bbdf1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config @@ -111,6 +111,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 5989d7280..cc022206f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -243,6 +243,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingMinutesMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingMinutesMap.cs new file mode 100644 index 000000000..22f03f183 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingMinutesMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesMap : EntityTypeConfiguration + { + public MeetingMinutesMap() + { + #region 表、主键 + //表 + this.ToTable("MEETINGMINUTES"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingNoticeMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingNoticeMap.cs new file mode 100644 index 000000000..1174c4b1c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingNoticeMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeMap : EntityTypeConfiguration + { + public MeetingNoticeMap() + { + #region 表、主键 + //表 + this.ToTable("MEETINGNOTICE"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs index 9ff55ad46..1639e2311 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs @@ -26,11 +26,11 @@ namespace Learun.Application.OA.LR_StampManage /// /// 查询的关键字 /// - public IEnumerable GetList(string keyWord) + public IEnumerable GetList(string keyWord, string userId, string category) { try { - return lr_StampManageService.GetList(keyWord); + return lr_StampManageService.GetList(keyWord,userId,category); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs index f9a1d9a48..386adc137 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs @@ -55,6 +55,21 @@ namespace Learun.Application.OA.LR_StampManage /// [Column("F_ENABLEDMARK")] public int? F_EnabledMark { get; set; } + /// + /// 创建人 + /// + [Column("F_CREATEUSERID")] + public string F_CreateUserId { get; set; } + /// + /// 时间 + /// + [Column("F_CREATETIME")] + public DateTime? F_CreateTime { get; set; } + /// + /// 印章分类:1学校公章2个人印章 + /// + [Column("F_CATEGORY")] + public int? F_Category { get; set; } #region 扩展方法 @@ -65,7 +80,9 @@ namespace Learun.Application.OA.LR_StampManage public void Modify(string keyValue) { this.F_StampId = keyValue; - + this.F_CreateUserId = LoginUserInfo.Get().userId; //创建人 + this.F_CreateTime = DateTime.Now; + } /// /// 新增调用 @@ -74,6 +91,8 @@ namespace Learun.Application.OA.LR_StampManage { this.F_StampId = Guid.NewGuid().ToString(); //产生印章编号 this.F_EnabledMark = 1;//默认状态为启用 + this.F_CreateUserId = LoginUserInfo.Get().userId; //创建人 + this.F_CreateTime = DateTime.Now; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs index 289b67b4c..d5a7b6286 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs @@ -18,7 +18,7 @@ namespace Learun.Application.OA.LR_StampManage /// /// /// - IEnumerable GetList(string keyWord); + IEnumerable GetList(string keyWord, string userId, string category); /// /// 获取列表分页数据 /// 分页参数 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs index 1a5e3ab06..5d72271d3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs @@ -23,13 +23,7 @@ namespace Learun.Application.OA.LR_StampManage { //sql字段 fieldSql = @" - F_StampId, - F_StampName, - F_Description, - F_StampType, - F_ImgFile, - F_Sort, - F_EnabledMark + * "; } #endregion @@ -40,7 +34,7 @@ namespace Learun.Application.OA.LR_StampManage /// /// 名称/状态 /// - public IEnumerable GetList(string keyWord) + public IEnumerable GetList(string keyWord, string userId,string category) { try { @@ -52,6 +46,14 @@ namespace Learun.Application.OA.LR_StampManage if (!string.IsNullOrEmpty(keyWord)) {// cbb 如果没有查询条件则不需要输入 Sql.AppendFormat(" and s.F_StampName LIKE '%{0}%'", keyWord); } + if (!string.IsNullOrEmpty(userId)) + { + Sql.AppendFormat(" and s.F_CreateUserId = '{0}'", userId); + } + if (!string.IsNullOrEmpty(category)) + { + Sql.AppendFormat(" and s.F_Category = {0}", Convert.ToInt32(category)); + } Sql.Append(" Order by F_Sort"); @@ -102,6 +104,16 @@ namespace Learun.Application.OA.LR_StampManage dp.Add("F_StampType", queryParam["F_StampType"].ToString(), DbType.String); strSql.Append(" AND s.F_StampType = @F_StampType"); } + if (!queryParam["F_CreateUserId"].IsEmpty()) + { + dp.Add("F_CreateUserId", queryParam["F_CreateUserId"].ToString(), DbType.String); + strSql.Append(" AND s.F_CreateUserId = @F_CreateUserId"); + } + if (!queryParam["F_Category"].IsEmpty()) + { + dp.Add("F_Category", queryParam["F_Category"].ToString(), DbType.String); + strSql.Append(" AND s.F_Category = @F_Category"); + } } return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperEntity.cs index d92fac405..7feb07d58 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperEntity.cs @@ -21,7 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("ID")] public string Id { get; set; } /// - /// 调度类型:1调课,2停课,3对调 + /// 调度类型:1换课,2停课,3对调,4调课 /// [Column("ATTEMPERTYPE")] public string AttemperType { get; set; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperService.cs index fd930ff81..2a9ea37c0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperService.cs @@ -89,9 +89,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); strSql.Append(" AND (t.EmpNo = @EmpNo or t.NewEmpNo=@EmpNo) "); - } + } + if (!queryParam["CreateUserId"].IsEmpty()) + { + dp.Add("CreateUserId", queryParam["CreateUserId"].ToString(), DbType.String); + strSql.Append(" AND t.CreateUserId = @CreateUserId "); + } var result = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); - + return result; } catch (Exception ex) @@ -117,15 +122,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var db = this.BaseRepository("CollegeMIS").BeginTrans(); - var result=db.FindEntity(c => c.Id == keyValue); - //result.query = db.FindList(c => c.AttemperId == keyValue).ToList(); - result.query = db.FindList(@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a + var result = db.FindEntity(c => c.Id == keyValue); + if (result != null) + { + result.query = db.FindList($@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a left join arrangelessonterm b on a.LessonId=b.ALTId left join classinfo c on c.classno=replace(b.teachclassno,b.lessonname,'') - left join classroominfo d on d.classroomno=b.ClassroomNo").ToList(); + left join classroominfo d on d.classroomno=b.ClassroomNo + where 1=1 and a.AttemperId='{result.Id}' ").ToList(); + } return result; - - //return this.BaseRepository("CollegeMIS").FindEntity(keyValue); } catch (Exception ex) { @@ -151,13 +157,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var db = this.BaseRepository("CollegeMIS").BeginTrans(); var result = db.FindEntity(t => t.ProcessId == processId); - //result.query = db.FindList(c => c.AttemperId == keyValue).ToList(); - result.query = db.FindList(@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a + if (result != null) + { + result.query = db.FindList($@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a left join arrangelessonterm b on a.LessonId=b.ALTId left join classinfo c on c.classno=replace(b.teachclassno,b.lessonname,'') - left join classroominfo d on d.classroomno=b.ClassroomNo").ToList(); + left join classroominfo d on d.classroomno=b.ClassroomNo + where 1=1 and a.AttemperId='{result.Id}' ").ToList(); + } return result; - //return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId); } catch (Exception ex) { @@ -214,23 +222,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { entity.Modify(keyValue); this.BaseRepository("CollegeMIS").Update(entity); - this.BaseRepository("CollegeMIS").Delete(c => c.AttemperId == keyValue); - foreach (ArrangeLessonTermAttrmperChildEntity item in entity.query) + if (entity.AttemperType == "04") { - item.AttemperId = entity.Id; - item.Create(); - this.BaseRepository("CollegeMIS").Insert(item); + this.BaseRepository("CollegeMIS").Delete(c => c.AttemperId == keyValue); + foreach (ArrangeLessonTermAttrmperChildEntity item in entity.query) + { + item.AttemperId = entity.Id; + item.Create(); + this.BaseRepository("CollegeMIS").Insert(item); + } } + } else { entity.Create(); this.BaseRepository("CollegeMIS").Insert(entity); - foreach (ArrangeLessonTermAttrmperChildEntity item in entity.query) + if (entity.AttemperType == "04") { - item.AttemperId = entity.Id; - item.Create(); - this.BaseRepository("CollegeMIS").Insert(item); + foreach (ArrangeLessonTermAttrmperChildEntity item in entity.query) + { + item.AttemperId = entity.Id; + item.Create(); + this.BaseRepository("CollegeMIS").Insert(item); + } } } } @@ -428,12 +443,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - else if(entity.AttemperType == "04")//调课 + else if (entity.AttemperType == "04")//调课 { - entity.query = db.FindList(@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a + entity.query = db.FindList($@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a left join arrangelessonterm b on a.LessonId=b.ALTId left join classinfo c on c.classno=replace(b.teachclassno,b.lessonname,'') - left join classroominfo d on d.classroomno=b.ClassroomNo").ToList(); + left join classroominfo d on d.classroomno=b.ClassroomNo + where 1=1 and a.AttemperId='{entity.Id}' ").ToList(); foreach (var item in entity.query) { string updatesql = "update ArrangeLessonTerm set LessonDate='" + item.NewLessonDate + "',LessonTime='" + item.NewLessonTime + "' where ALTId='" + item.LessonId + "'"; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementBLL.cs index 675abd0ac..097d0a47e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementBLL.cs @@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageListOfTeacher(Pagination pagination, string queryJson) + { + try + { + return stuCancelDisciplineManagementService.GetPageListOfTeacher(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取StuCancelDisciplineManagement表实体数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementEntity.cs index a8d46b088..b0934655e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementEntity.cs @@ -35,6 +35,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("CREATEUSERID")] public string CreateUserId { get; set; } /// + /// 创建用户编号 + /// + [Column("CREATEUSERNO")] + public string CreateUserNo { get; set; } + /// /// 创建时间 /// [Column("CREATETIME")] @@ -64,6 +69,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("PROCESSID")] public string ProcessId { get; set; } + /// + /// 附件 + /// + [Column("FILES")] + public string Files { get; set; } #endregion #region 扩展操作 @@ -84,6 +94,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + /// + /// 违纪表主键 + /// + [NotMapped] + public string DisciplineId { get; set; } + /// + /// 违纪学生 + /// + [NotMapped] + public string StuNo { get; set; } + /// + /// 违纪时间 + /// + [NotMapped] + public DateTime? DisciplineTime { get; set; } + /// + /// 事情经过 + /// + [NotMapped] + public string DisciplineThings { get; set; } + /// + /// 处分类型 + /// + [NotMapped] + public string SType { get; set; } + /// + /// 违纪审核时间 + /// + [NotMapped] + public DateTime? DisciplineCheckTime { get; set; } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementIBLL.cs index 10de74b7b..52d642d08 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementIBLL.cs @@ -23,6 +23,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetPageList(Pagination pagination, string queryJson); /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageListOfTeacher(Pagination pagination, string queryJson); + /// /// 获取StuCancelDisciplineManagement表实体数据 /// /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementService.cs index ebb8800e9..337dec775 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuCancelDisciplineManagement/StuCancelDisciplineManagementService.cs @@ -29,19 +29,66 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - var basedbname = BaseRepository().getDbConnection().Database; var strSql = new StringBuilder(); - strSql.Append("SELECT t.* "); - strSql.Append(" FROM StuCancelDisciplineManagement t "); - strSql.Append(" left join " + basedbname + ".dbo.LR_Base_User u on t.CreateUserId=u.F_UserId "); - strSql.Append(" WHERE 1=1 "); + strSql.Append("select d.Id as DisciplineId,d.DisciplineTime,d.Things as DisciplineThings,d.SType,d.StuNo,d.CheckTime as DisciplineCheckTime,t.* "); + strSql.Append(" from StuDisciplineManagement d "); + strSql.Append(" left join StuCancelDisciplineManagement t on d.CancelId=t.Id "); + strSql.Append(" WHERE 1=1 and d.CheckStatus='2' "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - if (!queryParam["StuName"].IsEmpty()) + if (!queryParam["StuNo"].IsEmpty()) { - dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); - strSql.Append(" AND u.F_RealName like @StuName "); + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND d.StuNo = @StuNo "); + } + if (!queryParam["SType"].IsEmpty()) + { + dp.Add("SType", queryParam["SType"].ToString(), DbType.String); + strSql.Append(" AND d.SType = @SType "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageListOfTeacher(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("select d.Id as DisciplineId,d.DisciplineTime,d.Things as DisciplineThings,d.SType,d.StuNo,d.CheckTime as DisciplineCheckTime,t.* "); + strSql.Append(" from StuCancelDisciplineManagement t "); + strSql.Append(" left join StuDisciplineManagement d on d.CancelId=t.Id "); + strSql.Append(" WHERE 1=1 and t.CheckStatus='2' "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND d.StuNo = @StuNo "); + } + if (!queryParam["SType"].IsEmpty()) + { + dp.Add("SType", queryParam["SType"].ToString(), DbType.String); + strSql.Append(" AND d.SType = @SType "); } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } @@ -152,6 +199,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { entity.Create(); this.BaseRepository("CollegeMIS").Insert(entity); + //违纪表赋值撤销违纪主键字段 + this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuDisciplineManagement set CancelId='{entity.Id}' where Id='{entity.DisciplineId}' "); } } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementEntity.cs index fb194c213..8389eb12a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementEntity.cs @@ -104,6 +104,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("STYPE")] public string SType { get; set; } + /// + /// 撤销违纪管理主键 + /// + [Column("CANCELID")] + public string CancelId { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs index 5b84f0ab5..a9e1f5794 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs @@ -377,6 +377,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("MATHERNAME")] public string MatherName { get; set; } /// + /// 档案是否自带 + /// + [Column("ISARCHIVES")] + public string IsArchives { get; set; } + /// /// 档案所在地 /// [Column("MATHERUNIT")] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs index 4c6b10392..17bc7e65d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs @@ -782,6 +782,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 根据学号/姓名获取学生成绩列表 + /// + /// + /// + public IEnumerable GetScoreListRank(string queryJson) + { + try + { + return stuScoreService.GetScoreListRank(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public List GetStuGraduateInfo(string queryJson) { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs index e261630d5..736a66358 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs @@ -440,6 +440,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [NotMapped] public int RankInMajor { get; set; } /// + /// 系排名 + /// + [NotMapped] + public int RankIndept { get; set; } + /// /// 班级排名 /// [NotMapped] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs index 4d9020b34..08317fcce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs @@ -192,6 +192,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetScoreListByStuInfo(string queryJson); + /// + /// 根据学号/姓名获取学生成绩列表 + /// + /// + /// + IEnumerable GetScoreListRank(string queryJson); + /// /// 获取个人成绩列表 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs index 793e7669f..0d8c88027 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs @@ -2339,6 +2339,139 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad } } + + /// + /// 根据学号/姓名获取学生成绩列表 + /// + /// + /// + public IEnumerable GetScoreListRank(string queryJson) + { + try + { + //参考写法 + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + var tableName = "StuScore"; + if (!queryParam["TableName"].IsEmpty()) + { + tableName = queryParam["TableName"].ToString(); + } + var strSql = new StringBuilder(); + strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,bb.DeptNo,li.StudyScore,ls.LessonSortName,lt.LessonTypeName,bb.Score,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); + strSql.Append(" from ( "); + strSql.Append($"select s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,s.DeptNo,Max(s.Score) as Score from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); + strSql.Append(" where 1=1 and s.CheckMark='1' "); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" and s.AcademicYearNo=@AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" and s.Semester=@Semester "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" and s.StuNo=@StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", queryParam["StuName"].ToString(), DbType.String); + strSql.Append(" and s.StuName=@StuName "); + } + strSql.Append(" group by s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,s.DeptNo ) as bb "); + strSql.Append(" left join StuScoreNotPass sp on bb.AcademicYearNo=sp.AcademicYearNo and bb.Semester=sp.Semester and bb.LessonSortNo=sp.LessonSortNo and bb.LessonNo=sp.LessonNo and bb.LessonName=sp.LessonName and bb.StuNo=sp.StuNo and sp.CheckMark = '1' "); + strSql.Append(" left join StuScoreNotPassTwo spt on bb.AcademicYearNo=spt.AcademicYearNo and bb.Semester=spt.Semester and bb.LessonSortNo=spt.LessonSortNo and bb.LessonNo=spt.LessonNo and bb.LessonName=spt.LessonName and bb.StuNo=spt.StuNo and spt.CheckMark = '1' "); + strSql.Append(" left join CdLessonSort ls on bb.LessonSortNo= ls.LessonSortNo "); + strSql.Append(" left join LessonInfo li on bb.LessonNo= li.LessonNo and li.CheckMark='1' "); + strSql.Append(" left join CdMajor cm on bb.MajorNo= cm.MajorNo and cm.CheckMark='1' "); + strSql.Append(" left join ClassInfo ci on bb.ClassNo= ci.ClassNo and ci.CheckMark='1' "); + strSql.Append(" left join CdLessonType lt on li.LessonTypeId=lt.ltid and lt.LTEnabled='1' "); + + var result = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + + //计算专业排名,班级排名 + if (result.Any()) + { + var temp = result.GroupBy(x => new { x.AcademicYearNo, x.Semester }).Select(x => new StuScoreEntity() + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + StuNo = x.FirstOrDefault().StuNo, + ClassNo = x.FirstOrDefault().ClassNo, + MajorNo = x.FirstOrDefault().MajorNo, + DeptNo = x.FirstOrDefault().DeptNo, + }).ToList(); + if (temp.Any()) + { + foreach (var item in temp) + { + //专业排名 + var ml = this.BaseRepository("CollegeMIS").FindList(x => x.AcademicYearNo == item.AcademicYearNo && x.Semester == item.Semester && x.LessonSortNo == "1" && x.MajorNo == item.MajorNo && x.CheckMark == "1"); + var mlGroup = ml.GroupBy(x => x.StuNo).Select(x => new + { + StuNo = x.Key, + TotalScore = x.Select(y => y.Score).Sum() + }).OrderByDescending(x => x.TotalScore); + if (mlGroup.Any()) + { + var rank = mlGroup.Select(x => x.StuNo).ToList().IndexOf(item.StuNo); + item.RankInMajor = rank + 1; + } + //班级排名 + var cl = this.BaseRepository("CollegeMIS").FindList(x => x.AcademicYearNo == item.AcademicYearNo && x.Semester == item.Semester && x.LessonSortNo == "1" && x.ClassNo == item.ClassNo && x.CheckMark == "1"); + var clGroup = cl.GroupBy(x => x.StuNo).Select(x => new + { + StuNo = x.Key, + TotalScore = x.Select(y => y.Score).Sum() + }).OrderByDescending(x => x.TotalScore); + if (clGroup.Any()) + { + var rank = clGroup.Select(x => x.StuNo).ToList().IndexOf(item.StuNo); + item.RankInClass = rank + 1; + } + //系排名 + var dl = this.BaseRepository("CollegeMIS").FindList(x => x.AcademicYearNo == item.AcademicYearNo && x.Semester == item.Semester && x.LessonSortNo == "1" && x.DeptNo == item.DeptNo && x.CheckMark == "1"); + var dlGroup = dl.GroupBy(x => x.StuNo).Select(x => new + { + StuNo = x.Key, + TotalScore = x.Select(y => y.Score).Sum() + }).OrderByDescending(x => x.TotalScore); + if (dlGroup.Any()) + { + var rank = dlGroup.Select(x => x.StuNo).ToList().IndexOf(item.StuNo); + item.RankIndept = rank + 1; + } + } + } + foreach (var ii in result) + { + ii.RankInMajor = temp.FirstOrDefault(x => x.AcademicYearNo == ii.AcademicYearNo && x.Semester == ii.Semester).RankInMajor; + ii.RankInClass = temp.FirstOrDefault(x => x.AcademicYearNo == ii.AcademicYearNo && x.Semester == ii.Semester).RankInClass; + ii.RankIndept = temp.FirstOrDefault(x => x.AcademicYearNo == ii.AcademicYearNo && x.Semester == ii.Semester).RankIndept; + } + + } + + return result; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 成绩导入--必修课 选修课 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachAttendance/TeachAttendanceEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachAttendance/TeachAttendanceEntity.cs index 0ecb28ac0..cadaa93dd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachAttendance/TeachAttendanceEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachAttendance/TeachAttendanceEntity.cs @@ -20,30 +20,80 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("ID")] public string ID { get; set; } /// - /// 打卡时间 + /// 教师编号 + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// 教师姓名 + /// + [Column("EMPNAME")] + public string EmpName { get; set; } + /// + /// 必修课表主键 + /// + [Column("ALTID")] + public string ALTId { get; set; } + /// + /// 选修课表主键 + /// + [Column("ALTOEID")] + public string ALTOEId { get; set; } + /// + /// 课程标识:1必修,2选修 + /// + [Column("LESSONSORTNO")] + public string LessonSortNo { get; set; } + /// + /// 考勤类型 0-未定义,1-上课,2-下课, + /// + [Column("ADTYPE")] + public string ADType { get; set; } + /// + /// 考勤时间(服务器时间) + /// + [Column("ADTIME")] + public DateTime? ADTime { get; set; } + /// + /// 打卡时间(考勤机时间) /// [Column("CLOCKTIME")] public DateTime? ClockTime { get; set; } /// - /// 打卡地点 + /// 打卡结果 1正常,2迟到,3早退,6缺勤 + /// + [Column("CLOCKSTATUS")] + public string ClockStatus { get; set; } + /// + /// 打卡地点 /// [Column("CLOCKPLACE")] public string ClockPlace { get; set; } /// - /// 教师编号 + /// 考勤照片 /// - [Column("EMPNO")] - public string EmpNo { get; set; } + [Column("ADPHOTO")] + public string ADPhoto { get; set; } /// - /// 教师姓名 + /// 经度 /// - [Column("EMPNAME")] - public string EmpName { get; set; } + [Column("ALON")] + public decimal ALon { get; set; } + /// + /// 纬度 + /// + [Column("ALAT")] + public decimal ALat { get; set; } + /// + /// 是否外勤 + /// + [Column("AISOUT")] + public bool AIsOut { get; set; } /// /// 备注 /// - [Column("REMARK")] - public string Remark { get; set; } + [Column("AREMARK")] + public string ARemark { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LR_OA_NewsRead/LR_OA_NewsReadBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LR_OA_NewsRead/LR_OA_NewsReadBLL.cs index 6b00e69f2..3f072909b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LR_OA_NewsRead/LR_OA_NewsReadBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LR_OA_NewsRead/LR_OA_NewsReadBLL.cs @@ -41,6 +41,29 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop } } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetListOfSelf() + { + try + { + return lR_OA_NewsReadService.GetListOfSelf(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取LR_OA_NewsRead表实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LR_OA_NewsRead/LR_OA_NewsReadService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LR_OA_NewsRead/LR_OA_NewsReadService.cs index 7ed3af3d4..56853ed83 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LR_OA_NewsRead/LR_OA_NewsReadService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/LR_OA_NewsRead/LR_OA_NewsReadService.cs @@ -130,6 +130,32 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop } } } + + public IEnumerable GetListOfSelf() + { + try + { + var userinfo = LoginUserInfo.Get(); + var userId = userinfo.userId; + var deptId = userinfo.departmentId; + var postIds = userinfo.postIds; + var strSql = new StringBuilder(); + strSql.Append("SELECT t.NewsId,t.RUserId FROM LR_OA_NewsRead t "); + strSql.Append(" WHERE t.RUserId = '"+userinfo.userId+"' "); + return this.BaseRepository().FindList(strSql.ToString(), new { }); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs index 98b4ffc69..9bd8832c0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs @@ -321,6 +321,27 @@ where t.IsRead = 0 and [Description] = '学生' and a.[state] = 7 and t.Account this.BaseRepository().ExecuteBySql(sql); } } + else if (model.TheTitle == "通知公告") + { + var userInfo = LoginUserInfo.Get(); + var existmodel = this.BaseRepository().FindEntity(c=>c.NewsId==model.InstanceId&&c.RUserId==userInfo.userId); + if (existmodel==null) + { + LR_OA_NewsReadEntity insertmodel = new LR_OA_NewsReadEntity(); + insertmodel.NewsId = model.InstanceId; + insertmodel.RUserId = userInfo.userId; + insertmodel.RUserName = userInfo.realName; + insertmodel.RTime = DateTime.Now; + //插入公告查看日志 + insertmodel.Create(); + this.BaseRepository().Insert(insertmodel); + + var readNum = this.BaseRepository().FindList(x => x.NewsId == model.InstanceId).Count(); + var strSql = "update LR_OA_News set F_PV=" + readNum + " where F_NewsId='" + model.InstanceId + "'"; + this.BaseRepository().ExecuteBySql(strSql); + } + this.BaseRepository().ExecuteBySql(sql); + } else { this.BaseRepository().ExecuteBySql(sql); @@ -347,6 +368,9 @@ where t.IsRead = 0 and [Description] = '学生' and a.[state] = 7 and t.Account { try { + var userInfo = LoginUserInfo.Get(); + string unreadnotice_sql = "select * from MessageRemind where thetitle='通知公告' and receiptid='" + userInfo.userId + "' and readsigns=0"; + var unreadnotice_ = this.BaseRepository().FindList(unreadnotice_sql).ToList(); #region 报修待处理 //查询维修通告中没有处理的id //教师报修 @@ -384,6 +408,28 @@ where t.IsRead = 0 and [Description] = '学生' and a.[state] = 7 and t.Account string sql_e = $"update MessageRemind set ReadSigns=0 where ReceiptId='{userId}' and ReadSigns<>0 and instanceid in ('" + ids_e.Replace(",", "','") + "') and TheTitle='评价通知'"; this.BaseRepository().ExecuteBySql(sql_e); } + + + foreach (var item in unreadnotice_) + { + string updatesql = $"update MessageRemind set ReadSigns=1 where MessageId='{item.MessageId}'"; + LR_OA_NewsReadEntity insertmodel = new LR_OA_NewsReadEntity(); + insertmodel.NewsId = item.InstanceId; + insertmodel.RUserId = userInfo.userId; + insertmodel.RUserName = userInfo.realName; + insertmodel.RTime = DateTime.Now; + //插入公告查看日志 + insertmodel.Create(); + this.BaseRepository().Insert(insertmodel); + + var readNum = this.BaseRepository().FindList(x => x.NewsId == item.InstanceId).Count(); + var strSql = "update LR_OA_News set F_PV=" + readNum + " where F_NewsId='" + item + "'"; + this.BaseRepository().ExecuteBySql(strSql); + + this.BaseRepository().ExecuteBySql(updatesql); + + } + } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 9192d228a..b7defa8f1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -482,6 +482,14 @@ + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs index c5d041b73..6d64621f8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs @@ -45,7 +45,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement t.ADYear, t.ADMonth, t.ADDay, - t.ADPhoto + t.ADPhoto,t.AIsOut,t.ARemark "); strSql.Append($" FROM ADR_Record t left JOIN {baseDataName}.dbo.LR_Base_User emp ON t.UserNo=emp.F_Account"); strSql.Append(" WHERE 1=1 "); @@ -83,7 +83,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement dp.Add("ADStatus", queryParam["ADStatus"].ToString(), DbType.String); strSql.Append(" AND t.ClockStatus = @ADStatus "); } - + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -289,69 +289,114 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement ClockStatus = y.ClockStatus }) }); - //启用的考勤规则 - var restrictionEntity = this.BaseRepository("CollegeMIS").FindEntity(m => m.REnable == true); - var WorkTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.WorkTime).ToDate(); - var NoonCloseTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.NoonCloseTime).ToDate(); - var NoonWorkTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.NoonWorkTime).ToDate(); - var CloseTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.CloseTime).ToDate(); - var MorningMinutes = (NoonCloseTimeTemp - WorkTimeTemp).TotalMinutes.ToInt();//上午应工作分钟数 - var AfternoonMinutes = (CloseTimeTemp - NoonWorkTimeTemp).TotalMinutes.ToInt();//下午应工作分钟数 - //结果列表 var result = new List(); - foreach (var item in data) - { - var adtype1 = item.Group.FirstOrDefault(x => x.ADType == "1"); - var adtype8 = item.Group.FirstOrDefault(x => x.ADType == "8"); - var adtype7 = item.Group.FirstOrDefault(x => x.ADType == "7"); - var adtype2 = item.Group.FirstOrDefault(x => x.ADType == "2"); - //上午 - var morning = new ADR_RecordEntity() + //启用的考勤规则 + var restrictionEntity = this.BaseRepository("CollegeMIS").FindEntity(m => m.REnable == true); + if (restrictionEntity != null) + { + //上班时间 + var WorkTimeTemp = string.Format("{0} {1}", date, restrictionEntity.WorkTime).ToDate(); + //下班时间 + var CloseTimeTemp = string.Format("{0} {1}", date, restrictionEntity.CloseTime).ToDate(); + if (restrictionEntity.ClockTime == "二次打卡") { - UserNo = item.UserNo, - UserName = item.UserName, - Department = item.Department, - ClockDate = date, - BanCi = "上下班", - TimePeriodNo = 1, - TimePeriod = string.Format("上午上下班({0}-{1})", restrictionEntity?.WorkTime, restrictionEntity?.NoonCloseTime), - ADStatusWork = adtype1 != null ? adtype1.ClockStatus : "6", - ADStatusClose = adtype8 != null ? adtype8.ClockStatus : "6", - ClockTimeWork = adtype1 != null ? adtype1.ClockTime.ToTimeString() : "-", - ClockTimeClose = adtype8 != null ? adtype8.ClockTime.ToTimeString() : "-", - ChidaoMinutes = adtype1 != null ? adtype1.ClockStatus == "2" ? (adtype1.ClockTime.Value - WorkTimeTemp).TotalMinutes.ToInt() : 0 : 0, - ZaoTuiMinutes = adtype8 != null ? adtype8.ClockStatus == "3" ? (NoonCloseTimeTemp - adtype8.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0, - ChuQinMinutes = adtype1 != null && adtype8 != null ? (adtype8.ClockTime.Value - adtype1.ClockTime.Value).TotalMinutes.ToInt() : 0, - QueQinMinutes = adtype1 != null && adtype8 != null ? 0 : MorningMinutes, - RestMinutes = 0 - }; - morning.WorkMinutes = MorningMinutes == morning.QueQinMinutes ? 0 : MorningMinutes - morning.ChidaoMinutes - morning.ZaoTuiMinutes - morning.QueQinMinutes; - result.Add(morning); - //下午 - var afternoon = new ADR_RecordEntity() + #region 二次打卡 + var WholeMinutes = (CloseTimeTemp - WorkTimeTemp).TotalMinutes.ToInt();//全天应工作分钟数 + + foreach (var item in data) + { + var adtype1 = item.Group.FirstOrDefault(x => x.ADType == "1");//上班 + var adtype2 = item.Group.FirstOrDefault(x => x.ADType == "2");//下班 + //全天 + var whole = new ADR_RecordEntity() + { + UserNo = item.UserNo, + UserName = item.UserName, + Department = item.Department, + ClockDate = date, + BanCi = "上下班", + TimePeriodNo = 0, + TimePeriod = string.Format("上下班({0}-{1})", restrictionEntity.WorkTime, restrictionEntity.CloseTime), + ADStatusWork = adtype1 != null ? adtype1.ClockStatus : "6", + ADStatusClose = adtype2 != null ? adtype2.ClockStatus : "6", + ClockTimeWork = adtype1 != null ? adtype1.ClockTime.ToTimeString() : "-", + ClockTimeClose = adtype2 != null ? adtype2.ClockTime.ToTimeString() : "-", + ChidaoMinutes = adtype1 != null ? adtype1.ClockStatus == "2" ? (adtype1.ClockTime.Value - WorkTimeTemp).TotalMinutes.ToInt() : 0 : 0, + ZaoTuiMinutes = adtype2 != null ? adtype2.ClockStatus == "3" ? (CloseTimeTemp - adtype2.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0, + ChuQinMinutes = adtype1 != null && adtype2 != null ? (adtype2.ClockTime.Value - adtype1.ClockTime.Value).TotalMinutes.ToInt() : 0, + QueQinMinutes = adtype1 != null && adtype2 != null ? 0 : WholeMinutes, + RestMinutes = 0 + }; + whole.WorkMinutes = WholeMinutes == whole.QueQinMinutes ? 0 : WholeMinutes - whole.ChidaoMinutes - whole.ZaoTuiMinutes - whole.QueQinMinutes; + result.Add(whole); + } + #endregion + } + else { - UserNo = item.UserNo, - UserName = item.UserName, - Department = item.Department, - ClockDate = date, - BanCi = "上下班", - TimePeriodNo = 2, - TimePeriod = string.Format("下午上下班({0}-{1})", restrictionEntity?.NoonWorkTime, restrictionEntity?.CloseTime), - ADStatusWork = adtype7 != null ? adtype7.ClockStatus : "6", - ADStatusClose = adtype2 != null ? adtype2.ClockStatus : "6", - ClockTimeWork = adtype7 != null ? adtype7.ClockTime.ToTimeString() : "-", - ClockTimeClose = adtype2 != null ? adtype2.ClockTime.ToTimeString() : "-", - ChidaoMinutes = adtype7 != null ? adtype7.ClockStatus == "2" ? (adtype7.ClockTime.Value - NoonWorkTimeTemp).TotalMinutes.ToInt() : 0 : 0, - ZaoTuiMinutes = adtype2 != null ? adtype2.ClockStatus == "3" ? (CloseTimeTemp - adtype2.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0, - ChuQinMinutes = adtype7 != null && adtype2 != null ? (adtype2.ClockTime.Value - adtype7.ClockTime.Value).TotalMinutes.ToInt() : 0, - QueQinMinutes = adtype7 != null && adtype2 != null ? 0 : AfternoonMinutes, - RestMinutes = 0 - }; - afternoon.WorkMinutes = AfternoonMinutes == afternoon.QueQinMinutes ? 0 : AfternoonMinutes - afternoon.ChidaoMinutes - afternoon.ZaoTuiMinutes - afternoon.QueQinMinutes; - result.Add(afternoon); - } + #region 四次打卡 + //中午下班时间 + var NoonCloseTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.NoonCloseTime).ToDate(); + //中午上班时间 + var NoonWorkTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.NoonWorkTime).ToDate(); + var MorningMinutes = (NoonCloseTimeTemp - WorkTimeTemp).TotalMinutes.ToInt();//上午应工作分钟数 + var AfternoonMinutes = (CloseTimeTemp - NoonWorkTimeTemp).TotalMinutes.ToInt();//下午应工作分钟数 + foreach (var item in data) + { + var adtype1 = item.Group.FirstOrDefault(x => x.ADType == "1");//上班 + var adtype8 = item.Group.FirstOrDefault(x => x.ADType == "8");//中午下班 + var adtype7 = item.Group.FirstOrDefault(x => x.ADType == "7");//中午上班 + var adtype2 = item.Group.FirstOrDefault(x => x.ADType == "2");//下班 + //上午 + var morning = new ADR_RecordEntity() + { + UserNo = item.UserNo, + UserName = item.UserName, + Department = item.Department, + ClockDate = date, + BanCi = "上下班", + TimePeriodNo = 1, + TimePeriod = string.Format("上午上下班({0}-{1})", restrictionEntity.WorkTime, restrictionEntity.NoonCloseTime), + ADStatusWork = adtype1 != null ? adtype1.ClockStatus : "6", + ADStatusClose = adtype8 != null ? adtype8.ClockStatus : "6", + ClockTimeWork = adtype1 != null ? adtype1.ClockTime.ToTimeString() : "-", + ClockTimeClose = adtype8 != null ? adtype8.ClockTime.ToTimeString() : "-", + ChidaoMinutes = adtype1 != null ? adtype1.ClockStatus == "2" ? (adtype1.ClockTime.Value - WorkTimeTemp).TotalMinutes.ToInt() : 0 : 0, + ZaoTuiMinutes = adtype8 != null ? adtype8.ClockStatus == "3" ? (NoonCloseTimeTemp - adtype8.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0, + ChuQinMinutes = adtype1 != null && adtype8 != null ? (adtype8.ClockTime.Value - adtype1.ClockTime.Value).TotalMinutes.ToInt() : 0, + QueQinMinutes = adtype1 != null && adtype8 != null ? 0 : MorningMinutes, + RestMinutes = 0 + }; + morning.WorkMinutes = MorningMinutes == morning.QueQinMinutes ? 0 : MorningMinutes - morning.ChidaoMinutes - morning.ZaoTuiMinutes - morning.QueQinMinutes; + result.Add(morning); + //下午 + var afternoon = new ADR_RecordEntity() + { + UserNo = item.UserNo, + UserName = item.UserName, + Department = item.Department, + ClockDate = date, + BanCi = "上下班", + TimePeriodNo = 2, + TimePeriod = string.Format("下午上下班({0}-{1})", restrictionEntity.NoonWorkTime, restrictionEntity.CloseTime), + ADStatusWork = adtype7 != null ? adtype7.ClockStatus : "6", + ADStatusClose = adtype2 != null ? adtype2.ClockStatus : "6", + ClockTimeWork = adtype7 != null ? adtype7.ClockTime.ToTimeString() : "-", + ClockTimeClose = adtype2 != null ? adtype2.ClockTime.ToTimeString() : "-", + ChidaoMinutes = adtype7 != null ? adtype7.ClockStatus == "2" ? (adtype7.ClockTime.Value - NoonWorkTimeTemp).TotalMinutes.ToInt() : 0 : 0, + ZaoTuiMinutes = adtype2 != null ? adtype2.ClockStatus == "3" ? (CloseTimeTemp - adtype2.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0, + ChuQinMinutes = adtype7 != null && adtype2 != null ? (adtype2.ClockTime.Value - adtype7.ClockTime.Value).TotalMinutes.ToInt() : 0, + QueQinMinutes = adtype7 != null && adtype2 != null ? 0 : AfternoonMinutes, + RestMinutes = 0 + }; + afternoon.WorkMinutes = AfternoonMinutes == afternoon.QueQinMinutes ? 0 : AfternoonMinutes - afternoon.ChidaoMinutes - afternoon.ZaoTuiMinutes - afternoon.QueQinMinutes; + result.Add(afternoon); + } + #endregion + } + } return result.OrderBy(x => x.UserNo).ThenBy(x => x.UserName).ThenBy(x => x.TimePeriodNo); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs index 8c0c13f4d..1c0967481 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs @@ -282,6 +282,62 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 教师上下课打卡:判断当前打卡状态 + /// + /// + public ADR_RestrictionEntity IsAttendanceTeacher() + { + try + { + return aDR_RestrictionService.IsAttendanceTeacher(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 教师上下课打卡 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public bool ClockInTeacher(decimal ALon, decimal ALat, bool AIsOut, string ARemark, string ADPhoto, string ClockPlace, + string LessonSortNo, string ALTId, string AlTOEId) + { + try + { + return aDR_RestrictionService.ClockInTeacher(ALon, ALat, AIsOut, ARemark, ADPhoto, ClockPlace, LessonSortNo, ALTId, AlTOEId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs index 27fd369b3..56ee4b5a7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs @@ -63,5 +63,26 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement void SaveFormDay(string keyValue, List entity); ADR_RestrictionEntity IsAttendanceStudent(); bool ClockInStudent(decimal ALon, decimal ALat, bool AIsOut, string ARemark, string ADPhoto, string ClockPlace, string LessonSortNo, string ALTId, string AlTOEId); + /// + /// 教师上下课打卡:判断当前打卡状态 + /// + /// + ADR_RestrictionEntity IsAttendanceTeacher(); + + /// + /// 教师上下课打卡 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + bool ClockInTeacher(decimal ALon, decimal ALat, bool AIsOut, string ARemark, string ADPhoto, string ClockPlace, string LessonSortNo, string ALTId, string AlTOEId); + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs index 34f08891b..8800fb8b2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs @@ -429,7 +429,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement firstoffworkentity.ADTime = datetimenow; firstoffworkentity.ClockTime = devicetime; firstoffworkentity.ClockStatus = ClockStatus; - + firstoffworkentity.ARemark = ARemark; + firstoffworkentity.ClockPlace = ClockPlace; + firstoffworkentity.ADPhoto = ADPhoto; + firstoffworkentity.AIsOut = AIsOut; this.BaseRepository("CollegeMIS").ExecuteBySql("update ADR_Record set ADTime='" + firstoffworkentity.ADTime + "',ClockTime='" + firstoffworkentity.ClockTime + "',ClockStatus='" + firstoffworkentity.ClockStatus + "',ADPhoto='" + firstoffworkentity.ADPhoto + "' where ID='" + firstoffworkentity.ID + "'"); return true; } @@ -1162,13 +1165,16 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { adrresult.AttendanceType = 3; adrresult.AttendanceTypeString = "早退打卡"; - adrresult.UserWorkTime = attendancerecordList.Where(m => m.ADType == "1").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); - adrresult.UserCloseTime = attendancerecordList.Where(m => m.ADType == "2").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); + var userWorkTime = attendancerecordList.Where(m => m.ADType == "1").OrderByDescending(m => m.ADTime).FirstOrDefault()?.ADTime.Value; + var userCloseTime = attendancerecordList.Where(m => m.ADType == "2").OrderByDescending(m => m.ADTime).FirstOrDefault()?.ADTime.Value; + adrresult.UserWorkTime = userWorkTime != null ? userWorkTime.ToString() : ""; + adrresult.UserCloseTime = userCloseTime != null ? userCloseTime.ToString() : ""; return adrresult; } adrresult.AttendanceType = 3; adrresult.AttendanceTypeString = "早退打卡"; - adrresult.UserWorkTime = attendancerecordList.OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); + var userWorkTime2 = attendancerecordList.OrderByDescending(m => m.ADTime).FirstOrDefault().ADTime.Value; + adrresult.UserWorkTime = userWorkTime2 != null ? userWorkTime2.ToString() : ""; return adrresult; } //超过上班最晚签到时间 小于下班最早签退时间,黄色 @@ -1184,8 +1190,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement //更新最晚下班时间 adrresult.AttendanceType = 1; adrresult.AttendanceTypeString = "正常打卡"; - adrresult.UserWorkTime = attendancerecordList.Where(m => m.ADType == "1").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); - adrresult.UserCloseTime = attendancerecordList.Where(m => m.ADType == "2").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); + var userWorkTime = attendancerecordList.Where(m => m.ADType == "1").OrderByDescending(m => m.ADTime).FirstOrDefault()?.ADTime.Value; + var userCloseTime = attendancerecordList.Where(m => m.ADType == "2").OrderByDescending(m => m.ADTime).FirstOrDefault()?.ADTime.Value; + adrresult.UserWorkTime = userWorkTime != null ? userWorkTime.ToString() : ""; + adrresult.UserCloseTime = userCloseTime != null ? userCloseTime.ToString() : ""; return adrresult; } } @@ -1767,5 +1775,238 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + + /// + /// 教师上下课打卡:判断当前打卡状态 + /// + /// + public ADR_RestrictionEntity IsAttendanceTeacher() + { + try + { + var adrresult = new ADR_RestrictionEntity(); + var userinfo = LoginUserInfo.Get(); + var empInfo = BaseRepository("CollegeMIS").FindEntity(m => m.EmpNo == userinfo.account); + //当前服务器日期 + var datenow = DateTime.Now.ToString("yyyy-MM-dd"); + DateTime datenowdatetime = Convert.ToDateTime(datenow); + var datetimenow = DateTime.Now; + //首先获取考勤规则 + ADR_RestrictionEntity attendancerulEntity = null; + if (empInfo != null) + { + attendancerulEntity = this.BaseRepository("CollegeMIS") + .FindEntity(m => m.REnable == true && m.AType == 2); + } + else + { + adrresult.AttendanceType = 5; + adrresult.AttendanceTypeString = "非教师用户不能签到"; + return adrresult; + } + //考勤范围 + adrresult.GPSLon = attendancerulEntity.GPSLon; + adrresult.GPSLat = attendancerulEntity.GPSLat; + adrresult.GPSRange = attendancerulEntity.GPSRange; + adrresult.GPSAddr = attendancerulEntity.GPSAddr; + //获取课表信息 + //当前学年学期信息 + var say = Common.GetSemesterAndYear(); + //当天课程 + //todo:待完善问题:必修课和选修课时间可能会交叉,不是必修在前,选修在后,则需要必修选修一起根据上课节次升序排序; + //todo:学生打卡也存在待完善问题; + //必修课 + var lessons = BaseRepository("CollegeMIS").FindList(m => m.AcademicYearNo == say.AcademicYearShort && m.Semester == say.Semester + && m.EmpNo == empInfo.EmpNo && m.LessonDate.Value == datenowdatetime).OrderBy(x => Convert.ToInt32(x.LessonTime.Substring(1))); + //当前打卡课程判断 + foreach (var arrangeLessonTermEntity in lessons) + { + TimeSpan start = TimeSpan.Parse(arrangeLessonTermEntity.StartTime); + TimeSpan end = TimeSpan.Parse(arrangeLessonTermEntity.EndTime); + int StuAttendanceEarliestMinute = !string.IsNullOrEmpty(Util.Config.GetValue("StuAttendanceEarliestMinute")) ? Convert.ToInt32(Util.Config.GetValue("StuAttendanceEarliestMinute")) : 0; + //当前时间小于等于上课时间,且大于开课前指定分钟 + if (datetimenow.TimeOfDay <= start && datetimenow.TimeOfDay >= start.Add(-TimeSpan.FromMinutes(StuAttendanceEarliestMinute))) + { + //todo:返回结果集增加班级信息 + adrresult.AttendanceType = 1; + adrresult.AttendanceTypeString = "正常签到"; + adrresult.LessonName = arrangeLessonTermEntity.LessonName; + adrresult.StartTime = arrangeLessonTermEntity.StartTime; + adrresult.EndTime = arrangeLessonTermEntity.EndTime; + adrresult.EmpName = arrangeLessonTermEntity.EmpName; + adrresult.Classroom = BaseRepository("CollegeMIS").FindEntity(m => m.ClassroomNo == arrangeLessonTermEntity.ClassroomNo)?.ClassroomName; + adrresult.LessonSortNo = "1"; + adrresult.ALTId = arrangeLessonTermEntity.ALTId; + //签到记录 + //todo:应该查找上课记录;无则进入正常上课打卡,有则提示已打过卡; + var attendanceEntity = BaseRepository("CollegeMIS").FindEntity(m => m.ALTId == arrangeLessonTermEntity.ALTId && m.EmpNo == arrangeLessonTermEntity.EmpNo); + if (attendanceEntity != null) + { + adrresult.UserWorkTime = attendanceEntity.ClockTime.ToString(); + } + return adrresult; + } + //迟到打卡 + if (datetimenow.TimeOfDay > start && datetimenow.TimeOfDay <= end) + { + adrresult.AttendanceType = 2; + adrresult.AttendanceTypeString = "迟到"; + adrresult.LessonName = arrangeLessonTermEntity.LessonName; + adrresult.StartTime = arrangeLessonTermEntity.StartTime; + adrresult.EndTime = arrangeLessonTermEntity.EndTime; + adrresult.EmpName = arrangeLessonTermEntity.EmpName; + adrresult.Classroom = BaseRepository("CollegeMIS").FindEntity(m => m.ClassroomNo == arrangeLessonTermEntity.ClassroomNo)?.ClassroomName; + adrresult.LessonSortNo = "1"; + adrresult.ALTId = arrangeLessonTermEntity.ALTId; + //签到记录 + //todo:应该查找上课记录;无则进入迟到打卡,有则开始查找下课记录(无则进入早退打卡,有则提示已打过卡;); + var attendanceEntity = BaseRepository("CollegeMIS").FindEntity(m => m.ALTId == arrangeLessonTermEntity.ALTId && m.EmpNo == arrangeLessonTermEntity.EmpNo); + if (attendanceEntity != null) + { + adrresult.UserWorkTime = attendanceEntity.ClockTime.ToString(); + } + return adrresult; + } + //下课打卡 + //todo:当前时间大于下课时间,则查找下课记录;有则进入下一个循环,无则进入下课打卡; + //存在问题:上了一天课都没打卡,时间到了晚上,可以从第一门课开始,每门课都可以一直打下课打卡; + } + //选修课 + var lessonelective = BaseRepository("CollegeMIS").FindList($@"select a.* + from ArrangeLessonTermOfElective a + where a.EmpNo='{empInfo.EmpNo}' + and a.AcademicYearNo='{say.AcademicYearShort}' and a.Semester='{say.Semester}' + and a.LessonDate ='{datenow}' + and a.CheckMark='1' ").OrderBy(x => Convert.ToInt32(x.LessonSection.Substring(1))); + //当前打卡课程判断 + foreach (var arrangeLessonTermEntity in lessonelective) + { + if (arrangeLessonTermEntity.LessonTime.Contains("-")) + { + var lessontime = arrangeLessonTermEntity.LessonTime.Split('-'); + TimeSpan start = TimeSpan.Parse(lessontime[0]); + TimeSpan end = TimeSpan.Parse(lessontime[1]); + int StuAttendanceEarliestMinute = !string.IsNullOrEmpty(Util.Config.GetValue("StuAttendanceEarliestMinute")) ? Convert.ToInt32(Util.Config.GetValue("StuAttendanceEarliestMinute")) : 0; + //当前时间小于等于上课时间,且大于开课前指定分钟 + if (datetimenow.TimeOfDay <= start && datetimenow.TimeOfDay >= start.Add(-TimeSpan.FromMinutes(StuAttendanceEarliestMinute))) + { + adrresult.AttendanceType = 1; + adrresult.AttendanceTypeString = "正常签到"; + adrresult.LessonName = arrangeLessonTermEntity.LessonName; + adrresult.StartTime = lessontime[0]; + adrresult.EndTime = lessontime[1]; + adrresult.EmpName = arrangeLessonTermEntity.EmpName; + adrresult.Classroom = BaseRepository("CollegeMIS").FindEntity(m => m.ClassroomNo == arrangeLessonTermEntity.ClassRoomNo)?.ClassroomName; + adrresult.LessonSortNo = "2"; + adrresult.ALTOEId = arrangeLessonTermEntity.Id; + //签到记录 + var attendanceEntity = BaseRepository("CollegeMIS").FindEntity(m => m.ALTOEId == arrangeLessonTermEntity.Id && m.EmpNo == arrangeLessonTermEntity.EmpNo); + if (attendanceEntity != null) + { + adrresult.UserWorkTime = attendanceEntity.ClockTime.ToString(); + } + return adrresult; + } + //迟到打卡 + if (datetimenow.TimeOfDay > start && datetimenow.TimeOfDay <= end) + { + adrresult.AttendanceType = 2; + adrresult.AttendanceTypeString = "迟到"; + adrresult.LessonName = arrangeLessonTermEntity.LessonName; + adrresult.StartTime = lessontime[0]; + adrresult.EndTime = lessontime[1]; + adrresult.EmpName = arrangeLessonTermEntity.EmpName; + adrresult.Classroom = BaseRepository("CollegeMIS").FindEntity(m => m.ClassroomNo == arrangeLessonTermEntity.ClassRoomNo)?.ClassroomName; + adrresult.LessonSortNo = "2"; + adrresult.ALTOEId = arrangeLessonTermEntity.Id; + //签到记录 + var attendanceEntity = BaseRepository("CollegeMIS").FindEntity(m => m.ALTOEId == arrangeLessonTermEntity.Id && m.EmpNo == arrangeLessonTermEntity.EmpNo); + { + adrresult.UserWorkTime = attendanceEntity.ClockTime.ToString(); + } + return adrresult; + } + } + } + adrresult.AttendanceType = 5; + adrresult.AttendanceTypeString = "不在考勤时间范围"; + return adrresult; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 教师上下课打卡 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public bool ClockInTeacher(decimal aLon, decimal aLat, bool aIsOut, string aRemark, string adPhoto, string clockPlace, string lessonSortNo, string altId, string alToeId) + { + try + { + var userinfo = LoginUserInfo.Get(); + var empinfo = BaseRepository("CollegeMIS").FindEntity(m => m.EmpNo == userinfo.account); + if (empinfo == null) + { + return false; + } + //教学考勤 + Teach_attendanceEntity teach_AttendanceEntity = new Teach_attendanceEntity(); + teach_AttendanceEntity.Create(); + teach_AttendanceEntity.EmpNo = empinfo.EmpNo; + teach_AttendanceEntity.EmpName = empinfo.EmpName; + teach_AttendanceEntity.LessonSortNo = lessonSortNo; + teach_AttendanceEntity.ClockPlace = clockPlace; + teach_AttendanceEntity.ADPhoto = adPhoto; + teach_AttendanceEntity.ALon = aLon; + teach_AttendanceEntity.ALat = aLat; + teach_AttendanceEntity.AIsOut = aIsOut; + teach_AttendanceEntity.ARemark = aRemark; + if (lessonSortNo == "1") + { + teach_AttendanceEntity.ALTId = altId; + //todo:待赋值ADType、ADTime、ClockTime、ClockStatus、 + //todo:判断正常签到、迟到打卡、早退打卡、下课打卡、 + } + if (lessonSortNo == "2") + { + teach_AttendanceEntity.ALTOEId = alToeId; + //todo:待开发ADType、ADTime、ClockTime、ClockStatus + + } + base.BaseRepository("CollegeMIS").Insert(teach_AttendanceEntity); + return true; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomBLL.cs index ca1279998..b63387e01 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomBLL.cs @@ -42,6 +42,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList() + { + try + { + return conferenceRoomService.GetList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取ConferenceRoom表实体数据 /// 主键 @@ -118,6 +141,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 启用禁用实体数据 + /// 主键 + /// + /// + public void DoEnable(string keyValue, string status) + { + try + { + conferenceRoomService.DoEnable(keyValue, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomEntity.cs index 051acded0..5675ffc25 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomEntity.cs @@ -20,7 +20,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement [Column("ID")] public string ID { get; set; } /// - /// 名字 + /// 场地名称 /// [Column("NAME")] public string Name { get; set; } @@ -44,6 +44,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// [Column("REMARK")] public string Remark { get; set; } + /// + /// 添加时间 + /// + [Column("CREATETIME")] + public DateTime CreateTime { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomIBLL.cs index e90950420..a3d867e8c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomIBLL.cs @@ -21,6 +21,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(); /// /// 获取ConferenceRoom表实体数据 /// 主键 @@ -43,6 +50,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// void SaveEntity(string keyValue, ConferenceRoomEntity entity); + + /// + /// 启用禁用实体数据 + /// 主键 + /// + /// + void DoEnable(string keyValue, string status); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomService.cs index 4ca9d204b..c84795e65 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomService.cs @@ -29,15 +29,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.Name, - t.Address, - t.Status, - t.Scale, - t.Remark - "); + strSql.Append("SELECT t.* "); strSql.Append(" FROM ConferenceRoom t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); @@ -50,10 +42,17 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } if (!queryParam["Status"].IsEmpty()) { - dp.Add("Status", "%" + queryParam["Status"].ToString() + "%", DbType.String); - strSql.Append(" AND t.Status Like @Status "); + if (queryParam["Status"].ToString() == "1") + { + dp.Add("Status", queryParam["Status"].ToString(), DbType.String); + strSql.Append(" AND t.Status = @Status "); + } + else + { + strSql.Append(" AND t.Status != '1' "); + } } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -68,6 +67,33 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList() + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM ConferenceRoom t "); + strSql.Append(" WHERE 1=1 and t.Status = '1' "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取ConferenceRoom表实体数据 /// 主键 @@ -105,7 +131,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); } catch (Exception ex) { @@ -153,6 +179,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 启用禁用实体数据 + /// 主键 + /// + /// + public void DoEnable(string keyValue, string status) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update ConferenceRoom set Status='" + status + "' where ID='" + keyValue + "' "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs index c39cfa2a1..ee0a04f39 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs @@ -114,17 +114,20 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + #endregion + + #region 提交数据 /// - /// 获取MeetingManagement表实体数据 + /// 删除实体数据 /// 主键 /// /// - public DataTable GetStatisticList(string queryJson) + public void DeleteEntity(string keyValue) { try { - return meetingManagementService.GetStatisticList(queryJson); + meetingManagementService.DeleteEntity(keyValue); } catch (Exception ex) { @@ -138,21 +141,17 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } - - #endregion - - #region 提交数据 /// - /// 删除实体数据 + /// 保存实体数据(新增、修改) /// 主键 /// /// - public void DeleteEntity(string keyValue) + public string SaveEntity(UserInfo userInfo, string keyValue, MeetingManagementEntity entity) { try { - meetingManagementService.DeleteEntity(keyValue); + return meetingManagementService.SaveEntity(userInfo, keyValue, entity); } catch (Exception ex) { @@ -165,18 +164,19 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement throw ExceptionEx.ThrowBusinessException(ex); } } + return entity.Id; } /// - /// 保存实体数据(新增、修改) + /// 审核实体数据 /// 主键 /// /// - public void SaveEntity(UserInfo userInfo, string keyValue, MeetingManagementEntity entity) + public void DoCheck(UserInfo userInfo, string keyValue, string status) { try { - meetingManagementService.SaveEntity(userInfo, keyValue, entity); + meetingManagementService.DoCheck(userInfo, keyValue, status); } catch (Exception ex) { @@ -192,15 +192,15 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } /// - /// 审核实体数据 + /// 提交实体数据 /// 主键 /// /// - public void DoCheck(UserInfo userInfo, string keyValue, string status) + public void DoSubmit(string keyValue, string status, string processId) { try { - meetingManagementService.DoCheck(userInfo, keyValue, status); + meetingManagementService.DoSubmit(keyValue, status, processId); } catch (Exception ex) { @@ -216,15 +216,15 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } /// - /// 提交实体数据 + /// 判断会议场地是否被占用 /// 主键 /// /// - public void DoSubmit(string keyValue, string status, string processId) + public bool JudgeIsOccupy(MeetingManagementEntity entity) { try { - meetingManagementService.DoSubmit(keyValue, status, processId); + return meetingManagementService.JudgeIsOccupy(entity); } catch (Exception ex) { @@ -262,6 +262,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + public void ReceivedList(string processId) + { + try + { + meetingManagementService.ReceivedList(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs index 744cc0d95..17bfe3c1f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs @@ -40,12 +40,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// MeetingManagementEntity GetMeetingManagementEntityByProcessId(string processId); - /// - /// 获取报表数据 - /// - /// - /// - DataTable GetStatisticList(string queryJson); #endregion #region 提交数据 @@ -61,7 +55,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// 主键 /// /// - void SaveEntity(UserInfo userInfo, string keyValue, MeetingManagementEntity entity); + string SaveEntity(UserInfo userInfo, string keyValue, MeetingManagementEntity entity); /// /// 审核实体数据 @@ -76,12 +70,22 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// void DoSubmit(string keyValue, string status, string processId); + + /// + /// 判断会议场地是否被占用 + /// 主键 + /// + /// + bool JudgeIsOccupy(MeetingManagementEntity entity); /// /// 审核实体数据 /// 主键 /// /// void ChangeStatusByProcessId(string processId, string status, string userId); + + void ReceivedList(string processId); + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs index 23a1c40d0..94b23a4e5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs @@ -1,11 +1,19 @@ using Dapper; using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.TwoDevelopment.LR_Desktop; using Learun.DataBase.Repository; using Learun.Util; +using Microsoft.AspNet.SignalR.Client; +using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Configuration; using System.Data; +using System.Linq; using System.Text; +using System.Threading.Tasks; +using System.Web; namespace Learun.Application.TwoDevelopment.PersonnelManagement { @@ -127,7 +135,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + var data = this.BaseRepository("CollegeMIS").FindEntity(keyValue); + if (data != null) + { + data.ConferenceRoomName = this.BaseRepository("CollegeMIS").FindEntity(data.MeetingPlace).Name; + } + return data; } catch (Exception ex) { @@ -166,55 +179,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } - /// - /// 获取报表数据 - /// - /// 查询参数 - /// - public DataTable GetStatisticList(string queryJson) - { - try - { - var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.meetingtitle, - t.begintime, - t.endtime, - t.正常, - t.未到 - "); - strSql.Append(" FROM (select m.MeetingTitle,isnull(t.正常,0) 正常,isnull(t.未到,0) 未到,m.BeginTime,m.EndTime from MeetingManagement m left join (select meetid,sum(case issignin when 1 then 1 else 0 end) as 正常, sum(case issignin when 0 then 1 else 0 end) as 未到 from MeetingSignInRecord group by meetid) t on t.MeetID=m.Id)t "); - strSql.Append(" WHERE 1=1 "); - var queryParam = queryJson.ToJObject(); - // 虚拟参数 - var dp = new DynamicParameters(new { }); - if (!queryParam["meetingtitle"].IsEmpty()) - { - dp.Add("meetingtitle", "%" + queryParam["meetingtitle"].ToString() + "%", DbType.String); - strSql.Append(" AND t.meetingtitle Like @meetingtitle "); - } - if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) - { - dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); - dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); - strSql.Append(" AND ( t.begintime >= @startTime AND t.begintime <= @endTime ) "); - } - return this.BaseRepository("CollegeMIS").FindTable(strSql.ToString(), dp); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - } - } - #endregion #region 提交数据 @@ -255,7 +219,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// 主键 /// /// - public void SaveEntity(UserInfo userInfo, string keyValue, MeetingManagementEntity entity) + public string SaveEntity(UserInfo userInfo, string keyValue, MeetingManagementEntity entity) { var db = this.BaseRepository("CollegeMIS").BeginTrans(); try @@ -285,6 +249,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement throw ExceptionEx.ThrowServiceException(ex); } } + return entity.Id; } /// @@ -413,6 +378,57 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 判断会议场地是否被占用 + /// 主键 + /// + /// + public bool JudgeIsOccupy(MeetingManagementEntity entity) + { + try + { + var result = false;//默认false,代表未占用 + + //查找已提交/已审核通过的会议场地 + var list = this.BaseRepository("CollegeMIS").FindList(x => x.MeetingPlace == entity.MeetingPlace && (x.CheckStatus == "1" || x.CheckStatus == "3")).OrderBy(x => x.BeginTime); + if (list.Any()) + { + //有则判断时间是否冲突 + foreach (var item in list) + { + //开始时间:小于区间左,则判断结束时间;区间中间,则占用;大于区间右,则不占用; + if (entity.BeginTime < item.BeginTime) + { + //结束时间:小于区间左,则不占用; + if (entity.EndTime > item.BeginTime) + { + result = true; + return result; + } + } + else if(entity.BeginTime < item.EndTime) + { + result = true; + return result; + } + } + } + + return result; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 审核实体数据 /// 主键 @@ -516,7 +532,112 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + public void ReceivedList(string processId) + { + var Received = GetMeetingManagementEntityByProcessId(processId); + List userInfos = new List(); + foreach (var rid in Received.InternalParticipants.Split(',')) + { + var user = this.BaseRepository().FindEntity(m => m.F_UserId == rid); + if (!userInfos.Contains(user)) + { + userInfos.Add(user); + } + } + if (!string.IsNullOrEmpty(Received.RecordPerson)) + { + foreach (var rid in Received.RecordPerson.Split(',')) + { + var user = this.BaseRepository().FindEntity(m => m.F_UserId == rid); + if (!userInfos.Contains(user)) + { + userInfos.Add(user); + } + } + } + //foreach (var uitem in userInfos) + //{ + // SYS_ReceiveMessageEntity receiveMessageEntity = new SYS_ReceiveMessageEntity(); + // receiveMessageEntity.Create(); + // receiveMessageEntity.SENDERID = Received.SENDERID; + // receiveMessageEntity.SENDER = messageentity.SENDER; + // receiveMessageEntity.RECEIVERID = uitem.F_UserId; + // receiveMessageEntity.RECEIVER = uitem.F_RealName; + // receiveMessageEntity.TITLE = messageentity.TITLE; + // receiveMessageEntity.CONTENTS = messageentity.CONTENTS; + // receiveMessageEntity.URL = messageentity.URL; + // receiveMessageEntity.READFLAG = 0; + // receiveMessageEntity.SENDTIME = DateTime.Now; + // receiveMessageEntity.DelFlag = false; + // this.BaseRepository().Insert(receiveMessageEntity); + //} + + //读取信息推送管理-会议申请推送(03)的配置 + var informationPushEntity = this.BaseRepository().FindEntity(x => x.PushItem == "03"); + if (informationPushEntity != null && informationPushEntity.Status == true) + { + //微信推送 + try + { + PushWeixin(userInfos, Received.MeetingTitle); + } + catch (Exception e) + { + } + //飞星推送 + Task.Run(async () => + { + using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"])) + { + var hubProxy = hubConnection.CreateHubProxy("SignalRHub"); + await hubConnection.Start(); + await hubProxy.Invoke("PushAnnouncement", Received.InternalParticipants, Received.MeetingTitle, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)).Substring(0, 20), "mail", string.Join(",", userInfos.Select(m => m.F_UserId)), ""); + } + }); + } + } + public void PushWeixin(List needpostuserlist, string title) + { + var WeChatConfigentity = BaseRepository().FindEntity(m => m.IsEnable == true); + string appid = WeChatConfigentity.APPId; + string secret = WeChatConfigentity.secret; + var wechatemplete = BaseRepository() + .FindEntity(m => m.WeID == WeChatConfigentity.ID && m.TCode == "task"); + string weixintaskurl = wechatemplete.TUrl; + string weixintasktempid = wechatemplete.TempId; + var responsejson = Util.HttpMethods.HttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret); + foreach (UserEntity userinfo in needpostuserlist) + { + if (userinfo != null && !string.IsNullOrEmpty(userinfo.OpenIdForWeixin)) + { + //执行推送任务 + if (!string.IsNullOrEmpty(appid) && !string.IsNullOrEmpty(secret) && !string.IsNullOrEmpty(weixintaskurl) && !string.IsNullOrEmpty(weixintasktempid)) + { + if (!string.IsNullOrEmpty(responsejson)) + { + var weixintokenobj = JsonConvert.DeserializeObject(responsejson); + if (string.IsNullOrEmpty(weixintokenobj.errcode)) + { + string access_token = weixintokenobj.access_token; + string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," + + "\"template_id\":\"" + weixintasktempid + "\"," + + "\"url\":\"" + weixintaskurl + "\"," + + "\"data\":{" + + "\"first\": {\"value\":\"您有新的会议消息\",\"color\":\"#173177\"}," + + "\"keyword1\":{\"value\":\"未读邮件\",\"color\":\"#173177\"}," + + "\"keyword2\": {\"value\":\"" + title + "\",\"color\":\"#173177\"}," + + "\"keyword3\": {\"value\":\"待查看\",\"color\":\"#173177\"}," + + "\"keyword4\": {\"value\":\"您有新的未读会议【" + title + "】\",\"color\":\"#173177\"}" + + "}" + + "}"; + string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata); + } + } + } + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesBLL.cs new file mode 100644 index 000000000..91bbba6ec --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesBLL.cs @@ -0,0 +1,149 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesBLL : MeetingMinutesIBLL + { + private MeetingMinutesService meetingMinutesService = new MeetingMinutesService(); + + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return meetingMinutesService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return meetingMinutesService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取MeetingMinutes表实体数据 + /// 主键 + /// + /// + public MeetingMinutesEntity GetMeetingMinutesEntity(string keyValue) + { + try + { + return meetingMinutesService.GetMeetingMinutesEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + meetingMinutesService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(UserInfo userInfo, string keyValue, MeetingMinutesEntity entity) + { + try + { + meetingMinutesService.SaveEntity(userInfo, keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs new file mode 100644 index 000000000..2b5e62a69 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs @@ -0,0 +1,78 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 会议id + /// + [Column("MEETID")] + public string MeetID { get; set; } + /// + /// 纪要标题 + /// + [Column("TITLE")] + public string Title { get; set; } + /// + /// 纪要内容 + /// + [Column("CONTENT")] + public string Content { get; set; } + /// + /// 附件 + /// + [Column("FILES")] + public string Files { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 创建人 + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create(UserInfo userInfo) + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue, UserInfo userInfo) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + [NotMapped] + public string MeetingTitle { get; set; } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesIBLL.cs new file mode 100644 index 000000000..5ddfa91ac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesIBLL.cs @@ -0,0 +1,56 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public interface MeetingMinutesIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 查询参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(string queryJson); + /// + /// 获取MeetingMinutes表实体数据 + /// 主键 + /// + /// + MeetingMinutesEntity GetMeetingMinutesEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(UserInfo userInfo, string keyValue, MeetingMinutesEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs new file mode 100644 index 000000000..97e8a7250 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs @@ -0,0 +1,198 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*,m.MeetingTitle "); + strSql.Append(" FROM MeetingMinutes t left join MeetingManagement m on t.MeetID=m.Id "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["MeetID"].IsEmpty()) + { + dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); + strSql.Append(" AND t.MeetID = @MeetID "); + } + if (!queryParam["MeetingTitle"].IsEmpty()) + { + dp.Add("MeetingTitle", "%" + queryParam["MeetingTitle"].ToString() + "%", DbType.String); + strSql.Append(" AND m.MeetingTitle Like @MeetingTitle "); + } + if (!queryParam["Title"].IsEmpty()) + { + dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Title Like @Title "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM MeetingMinutes t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["MeetID"].IsEmpty()) + { + dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); + strSql.Append(" AND t.MeetID = @MeetID "); + } + if (!queryParam["Title"].IsEmpty()) + { + dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Title Like @Title "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MeetingMinutes表实体数据 + /// 主键 + /// + /// + public MeetingMinutesEntity GetMeetingMinutesEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity( UserInfo userInfo, string keyValue, MeetingMinutesEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue,userInfo); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(userInfo); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeBLL.cs new file mode 100644 index 000000000..eaed57786 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeBLL.cs @@ -0,0 +1,149 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeBLL : MeetingNoticeIBLL + { + private MeetingNoticeService meetingNoticeService = new MeetingNoticeService(); + + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return meetingNoticeService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return meetingNoticeService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取MeetingNotice表实体数据 + /// 主键 + /// + /// + public MeetingNoticeEntity GetMeetingNoticeEntity(string keyValue) + { + try + { + return meetingNoticeService.GetMeetingNoticeEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + meetingNoticeService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(UserInfo userInfo, string keyValue, MeetingNoticeEntity entity) + { + try + { + meetingNoticeService.SaveEntity(userInfo, keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeEntity.cs new file mode 100644 index 000000000..309e8af08 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeEntity.cs @@ -0,0 +1,73 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 会议id + /// + [Column("MEETID")] + public string MeetID { get; set; } + /// + /// 通知标题 + /// + [Column("TITLE")] + public string Title { get; set; } + /// + /// 通知内容 + /// + [Column("CONTENT")] + public string Content { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 创建人 + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create(UserInfo userInfo) + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue, UserInfo userInfo) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + [NotMapped] + public string MeetingTitle { get; set; } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeIBLL.cs new file mode 100644 index 000000000..7d62b9682 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeIBLL.cs @@ -0,0 +1,56 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public interface MeetingNoticeIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 查询参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(string queryJson); + /// + /// 获取MeetingNotice表实体数据 + /// 主键 + /// + /// + MeetingNoticeEntity GetMeetingNoticeEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(UserInfo userInfo, string keyValue, MeetingNoticeEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeService.cs new file mode 100644 index 000000000..7283d2195 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeService.cs @@ -0,0 +1,198 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*,m.MeetingTitle "); + strSql.Append(" FROM MeetingNotice t left join MeetingManagement m on t.MeetID=m.Id "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["MeetID"].IsEmpty()) + { + dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); + strSql.Append(" AND t.MeetID = @MeetID "); + } + if (!queryParam["MeetingTitle"].IsEmpty()) + { + dp.Add("MeetingTitle", "%" + queryParam["MeetingTitle"].ToString() + "%", DbType.String); + strSql.Append(" AND m.MeetingTitle Like @MeetingTitle "); + } + if (!queryParam["Title"].IsEmpty()) + { + dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Title Like @Title "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM MeetingNotice t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["MeetID"].IsEmpty()) + { + dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); + strSql.Append(" AND t.MeetID = @MeetID "); + } + if (!queryParam["Title"].IsEmpty()) + { + dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Title Like @Title "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MeetingNotice表实体数据 + /// 主键 + /// + /// + public MeetingNoticeEntity GetMeetingNoticeEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity( UserInfo userInfo, string keyValue, MeetingNoticeEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue,userInfo); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(userInfo); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordBLL.cs index 8f0018280..c7acad931 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordBLL.cs @@ -167,7 +167,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } - public bool Scan(string scanParamUserid, string scanParamMeetid) + public string Scan(string scanParamUserid, string scanParamMeetid) { try { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordIBLL.cs index 5f4d427a6..7adcd122e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordIBLL.cs @@ -59,6 +59,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement void DoSignIn(string keyValue, bool isSignIn); #endregion - bool Scan(string scanParamUserid, string scanParamMeetid); + string Scan(string scanParamUserid, string scanParamMeetid); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs index 557dbdef8..bbe1cae66 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs @@ -36,6 +36,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (!queryParam["MeetID"].IsEmpty()) + { + dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); + strSql.Append(" AND t.MeetID = @MeetID "); + } if (!queryParam["MeetingTitle"].IsEmpty()) { dp.Add("MeetingTitle", "%" + queryParam["MeetingTitle"].ToString() + "%", DbType.String); @@ -46,18 +51,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement dp.Add("ParticipantName", "%" + queryParam["ParticipantName"].ToString() + "%", DbType.String); strSql.Append(" AND t.ParticipantName like @ParticipantName "); } - if (!queryParam["IsSignIn"].IsEmpty()) - { - if (queryParam["IsSignIn"].ToString() == "true") - { - strSql.Append(" AND t.IsSignIn=1 "); - } - else - { - strSql.Append(" AND t.IsSignIn=0 "); - } - - } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } @@ -223,20 +216,44 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement #endregion - public bool Scan(string scanParamUserid, string scanParamMeetid) + public string Scan(string scanParamUserid, string scanParamMeetid) { try { - var result = false; - var meetEntity = this.BaseRepository("CollegeMIS") - .FindEntity(a => - a.MeetID == scanParamMeetid && a.ParticipantID == scanParamUserid); - if (meetEntity != null) + var result = ""; + var meetEntity = this.BaseRepository("CollegeMIS").FindEntity(a => a.MeetID == scanParamMeetid && a.ParticipantID == scanParamUserid); + var date = DateTime.Now; + var meetEntityList = this.BaseRepository("CollegeMIS") + .FindEntity(x => x.Id == scanParamMeetid); + DateTime BeginTime = meetEntityList.BeginTime.ToDate(); + if (meetEntityList != null) { - meetEntity.IsSignIn = true; - this.BaseRepository("CollegeMIS").Update(meetEntity); - result = true; - + if (date.Subtract(BeginTime).Duration().Minutes <= 5 && BeginTime > date) + { + if (meetEntity != null) + { + meetEntity.IsSignIn = true; + meetEntity.SignInTime = date; + this.BaseRepository("CollegeMIS").Update(meetEntity); + result = "签到成功"; + } + else + { + result = "当前用户不可签到,签到失败"; + } + } + else if (BeginTime > date) + { + result = "会议未开始,签到失败"; + } + else + { + result = "签到失败!!!会议已开始"; + } + } + else + { + result = "签到失败"; } return result; diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/scanCode.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/scanCode.vue new file mode 100644 index 000000000..6404d64b1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/scanCode.vue @@ -0,0 +1,77 @@ + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index b99095f1f..e0a1722cc 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -7,15 +7,15 @@ export default { "enableSignUp": true, //请求数据的接口地址;可以配置多个,开发环境下登录页会出现选择菜单供您选择 //黑龙江正式地址 - "apiHost": [ - "http://1.190.222.34:9001/" - ], - "webHost":"http://1.190.222.34:9000/", - //本地: // "apiHost": [ - // "http://localhost:9003/" + // "http://1.190.222.34:9001/" // ], - // "webHost":"http://localhost:8000/", + // "webHost":"http://1.190.222.34:9000/", + //本地: + "apiHost": [ + "http://192.168.10.58:8003/" + ], + "webHost":"http://192.168.10.58:8004/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ { username: "system", password: "www.qj.com" } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/list.vue index aae48d1d6..c13045f00 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/list.vue @@ -1,4 +1,4 @@ -