diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DailyAssessController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DailyAssessController.cs index 814ee2fcf..e2e12f300 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DailyAssessController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DailyAssessController.cs @@ -38,6 +38,25 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { return View(); } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult IndexDorm() + { + return View(); + } + /// + /// 全部 + /// + /// + [HttpGet] + public ActionResult IndexAll() + { + return View(); + } + #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs index 235142697..0b7660752 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs @@ -256,6 +256,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return Success(jsonData); } + /// + /// 获取床位数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetDormStu(string keyValue) + { + var data = accommodationIBLL.GetDromStu(keyValue).OrderBy(x => x.Class); + return Success(data); + } + /// /// 获取床位数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.cshtml index 01911c853..912b25587 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.cshtml @@ -4,43 +4,55 @@ }
-
-
宿舍楼
-
-
-
-
单元
-
-
-
-
楼层
-
-
-
-
宿舍*
-
-
- -
-
专业部*
-
-
-
-
专业*
-
+ @*
+
宿舍楼
+
+
+
+
单元
+
+
+
+
楼层
+
+
+
+
宿舍*
+
+
+
+
专业部*
+
+
+
+
专业*
+
+
+
+
班级*
+
+
*@ +
+
选择学生*
+
-
班级*
-
+
学号*
+
-
学生*
-
+
姓名*
+ + + + + +
日期*
- +
卫生奖分
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.js index 44d856991..85eaf5458 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.js @@ -6,6 +6,11 @@ */ var acceptClick; var keyValue = request('keyValue'); +var HkeyValue = request('HkeyValue'); +var Dormitory = request('Dormitory'); +var Unit = request('Unit'); +var Floor = request('Floor'); +var RId = request('RId'); var bootstrap = function ($, learun) { "use strict"; var selectedRow = learun.frameTab.currentIframe().selectedRow; @@ -16,113 +21,127 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#Dormitory').lrDataSourceSelect({ - code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { - if (item) { - $('#Unit').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } - }); - } - } - }); - $('#Unit').lrselect({ - text: 'name', - value: 'id', - select: function (item) { - if (item) { - $('#Floor').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } - }); - } - } - }); - $('#Floor').lrselect({ - text: 'name', - value: 'id', - select: function (item) { - if (item) { - $('#RId').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } - }); - } - } - }); - $('#RId').lrselect({ - text: 'name', - value: 'id', - allowSearch: true - }); - - $('#DeptNo').lrselect({ + //$('#Dormitory').lrDataSourceSelect({ + // code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { + // if (item) { + // $('#Unit').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + // param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } + // }); + // } + // } + //}); + //$('#Unit').lrselect({ + // text: 'name', + // value: 'id', + // select: function (item) { + // if (item) { + // $('#Floor').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + // param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } + // }); + // } + // } + //}); + //$('#Floor').lrselect({ + // text: 'name', + // value: 'id', + // select: function (item) { + // if (item) { + // $('#RId').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + // param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } + // }); + // } + // } + //}); + //$('#RId').lrselect({ + // text: 'name', + // value: 'id', + // allowSearch: true + //}); + //$('#DeptNo').lrselect({ + // allowSearch: true, + // value: "deptno", + // text: "deptname", + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + // select: function (item) { + // if (item) { + // $('#MajorNo').lrselectRefresh({ + // allowSearch: true, + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + // param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } + // }); + // } else { + // $('#MajorNo').lrselectRefresh({ + // allowSearch: true, + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + // param: { strWhere: "1=1 AND CheckMark=1" } + // }); + // } + // } + //}); + //$('#MajorNo').lrselect({ + // allowSearch: true, + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + // value: "majorno", + // text: "majorname", + // param: { strWhere: "1=1 AND CheckMark=1" }, + // select: function (item) { + // if (item) { + // $('#ClassNo').lrselectRefresh({ + // allowSearch: true, + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + // param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } + // }); + // } else { + // $('#ClassNo').lrselectRefresh({ + // allowSearch: true, + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + // param: { strWhere: "1=1 AND CheckMark=1" } + // }); + // } + // } + //}); + //$('#ClassNo').lrselect({ + // allowSearch: true, + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + // param: { strWhere: "1=1 AND CheckMark=1" }, + // value: "classno", + // text: "classname", + // select: function (item) { + // if (item) { + // $('#StuNo').lrselectRefresh({ + // allowSearch: true, + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', + // param: { strWhere: "classno='" + item.classno + "'" } + // }); + // } else { + // $('#StuNo').lrselectRefresh({ + // allowSearch: true, + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', + // param: { strWhere: "1=1" } + // }); + // } + // } + //}); + //$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); + $('#NewStuNo').lrselect({ + placeholder: "请选择学生", allowSearch: true, - value: "deptno", - text: "deptname", - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetDormStu?keyValue=' + HkeyValue, + value: 'StuNo', + text: 'StuName', select: function (item) { - if (item) { - $('#MajorNo').lrselectRefresh({ - allowSearch: true, - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', - param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } - }); - } else { - $('#MajorNo').lrselectRefresh({ - allowSearch: true, - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', - param: { strWhere: "1=1 AND CheckMark=1" } - }); - } - - } - }); - $('#MajorNo').lrselect({ - allowSearch: true, - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', - value: "majorno", - text: "majorname", - param: { strWhere: "1=1 AND CheckMark=1" }, - select: function (item) { - if (item) { - $('#ClassNo').lrselectRefresh({ - allowSearch: true, - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', - param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } - }); - } else { - $('#ClassNo').lrselectRefresh({ - allowSearch: true, - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', - param: { strWhere: "1=1 AND CheckMark=1" } - }); - } - } - }); - $('#ClassNo').lrselect({ - allowSearch: true, - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', - param: { strWhere: "1=1 AND CheckMark=1" }, - value: "classno", - text: "classname", - select: function (item) { - if (item) { - $('#StuNo').lrselectRefresh({ - allowSearch: true, - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', - param: { strWhere: "classno='" + item.classno + "'" } - }); - } else { - $('#StuNo').lrselectRefresh({ - allowSearch: true, - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', - param: { strWhere: "1=1" } - }); - } + $("#StuName").val(item.StuName); + $("#StuNo").val(item.StudentID); + $("#BuildId").val(HkeyValue); + $("#Dormitory").val(Dormitory); + $("#Unit").val(Unit); + $("#Floor").val(Floor); + $("#RId").val(RId); } }); - $('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); $('#Files').lrUploader(); }, initData: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.cshtml index efbe2b52c..18eafaa2b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.cshtml @@ -13,7 +13,7 @@
-
+ @*
宿舍楼
@@ -28,7 +28,7 @@
宿舍
-
+
*@
专业部
@@ -51,16 +51,14 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.js index efb227770..75de2d901 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.js @@ -6,6 +6,11 @@ */ var selectedRow; var refreshGirdData; +var HkeyValue = request('keyValue'); +var Dormitory = request('Dormitory'); +var Unit = request('Unit'); +var Floor = request('Floor'); +var RId = request('RId'); var bootstrap = function ($, learun) { "use strict"; var startTime; @@ -50,45 +55,45 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); - $('#Dormitory').lrDataSourceSelect({ - code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { - if (item) { - $('#Unit').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } - }); - } - } - }); - $('#Unit').lrselect({ - text: 'name', - value: 'id', - select: function (item) { - if (item) { - $('#Floor').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } - }); - } - } - }); - $('#Floor').lrselect({ - text: 'name', - value: 'id', - select: function (item) { - if (item) { - $('#RId').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } - }); - } - } - }); - $('#RId').lrselect({ - text: 'name', - value: 'id', - allowSearch: true - }); + //$('#Dormitory').lrDataSourceSelect({ + // code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { + // if (item) { + // $('#Unit').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + // param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } + //}); + //} + //} + //}); + //$('#Unit').lrselect({ + // text: 'name', + //value: 'id', + //select: function (item) { + // if (item) { + // $('#Floor').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + // param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } + //}); + //} + //} + //}); + //$('#Floor').lrselect({ + // text: 'name', + //value: 'id', + //select: function (item) { + // if (item) { + // $('#RId').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + // param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } + //}); + //} + //} + //}); + //$('#RId').lrselect({ + // text: 'name', + //value: 'id', + //allowSearch: true + //}); $('#DeptNo').lrselect({ allowSearch: true, value: "deptno", @@ -147,7 +152,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'form', title: '新增', - url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form?HkeyValue=' + HkeyValue + '&Dormitory=' + Dormitory + '&Unit=' + Unit + '&Floor=' + Floor + '&RId=' + RId, width: 800, height: 600, callBack: function (id) { @@ -163,7 +168,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'form', title: '编辑', - url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form?keyValue=' + keyValue, + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form?keyValue=' + keyValue + '&HkeyValue=' + HkeyValue + '&Dormitory=' + Dormitory + '&Unit=' + Unit + '&Floor=' + Floor + '&RId=' + RId, width: 800, height: 600, callBack: function (id) { @@ -322,7 +327,8 @@ var bootstrap = function ($, learun) { { label: "奖扣分原因", name: "Reason", width: 200, align: "left" }, ], mainId: 'Id', - isPage: true + isPage: true, + sidx: 'Date desc' }); page.search(); }, @@ -330,6 +336,7 @@ var bootstrap = function ($, learun) { param = param || {}; param.StartTime = startTime; param.EndTime = endTime; + param.SqlParameter = "and BuildId ='" + HkeyValue + "'"; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexAll.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexAll.cshtml new file mode 100644 index 000000000..ef48be9b2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexAll.cshtml @@ -0,0 +1,65 @@ +@{ + ViewBag.Title = "寝室日常考核管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
宿舍楼
+
+
+
+
单元
+
+
+
+
楼层
+
+
+
+
宿舍
+
+
+
+
专业部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
学生姓名
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexAll.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexAll.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexAll.js new file mode 100644 index 000000000..e6a114a0c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexAll.js @@ -0,0 +1,295 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-08-11 16:55 + * 描 述:寝室日常考核管理 + */ +var selectedRow; +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 300, 400); + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#Dormitory').lrDataSourceSelect({ + code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { + if (item) { + $('#Unit').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } + }); + } + } + }); + $('#Unit').lrselect({ + text: 'name', + value: 'id', + select: function (item) { + if (item) { + $('#Floor').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } + }); + } + } + }); + $('#Floor').lrselect({ + text: 'name', + value: 'id', + select: function (item) { + if (item) { + $('#RId').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } + }); + } + } + }); + $('#RId').lrselect({ + text: 'name', + value: 'id', + allowSearch: true + }); + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } + }); + } else { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + + } + }); + $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + value: "majorno", + text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, + select: function (item) { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" }, + value: "classno", + text: "classname" + }); + // 快速新增 + $('#lr_addQuickly').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + selectedRow = $('#gridtable').jfGridGet('rowdata'); + //console.log(selectedRow); + learun.layerForm({ + id: 'form', + title: '快速新增', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/GetPageList', + headData: [ + { + 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: "Dormitory", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_DormitoryData', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "单元", name: "Unit", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_UnitData', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "楼层", name: "Floor", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_FloorData', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "寝室号", name: "RId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_RoomData', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + 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: "Date", width: 130, align: "left" }, + { label: "卫生奖分", name: "AddScoreHealth", width: 100, align: "left" }, + { label: "卫生扣分", name: "MinusScoreHealth", width: 100, align: "left" }, + { label: "纪律奖分", name: "AddScore", width: 100, align: "left" }, + { label: "纪律扣分", name: "MinusScore", width: 100, align: "left" }, + { label: "奖扣分原因", name: "Reason", width: 200, align: "left" }, + ], + mainId: 'Id', + isPage: true, + sidx: 'Date desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexDorm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexDorm.cshtml new file mode 100644 index 000000000..466f83c3e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexDorm.cshtml @@ -0,0 +1,80 @@ +@{ + ViewBag.Title = "寝室日常"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+ 树形列表 + 刷新 +
+
+
+
+
+
+
+ 列表信息 +
+
+
+
+
+
+
+
名称
+ +
+
+
宿舍楼
+
+
+
+
单元
+
+
+
+
楼层
+
+
+ @*
+
类别
+ +
*@ +
+
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
性别
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+ +@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexDorm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexDorm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexDorm.js new file mode 100644 index 000000000..d96a91cae --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexDorm.js @@ -0,0 +1,374 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-26 15:02 + * 描 述:学生宿舍管理 + */ +var refreshGirdData; +var selectedParent = {}; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initTree(); + page.initGird(); + page.search({ ParentID: '' }); + page.bind(); + + }, + bind: function () { + + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 420, 400); + //宿舍楼 + $('#ApartmentId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', + param: { strWhere: " BuildType='1' order by Name asc" }, + value: "id", + text: "name", + select: function (item) { + if (!!item) { + //单元 + $('#UnitId').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', + param: { strWhere: " BuildType='2' and ApartmentId='" + item.id + "'" }, + value: "id", + text: "name", + select: function (item) { + if (!!item) { + //楼层 + $('#FloorId').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', + param: { strWhere: " BuildType='3' and UnitId='" + item.id + "'" }, + value: "id", + text: "name" + }); + } + } + }); + } + } + }); + $('#UnitId').lrselect({ allowSearch: true }); + $('#FloorId').lrselect({ allowSearch: true }); + + $('#Sex').lrDataItemSelect({ code: 'usersex' }); + //.lrRadioCheckbox({ + // type: 'radio', + // code: 'usersex', + //}); + + $('#Class').lrselect({ + value: "classno", + text: "classname" + }); + + $('#Dept').lrselect({ + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#Major').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } + }); + } + else { + $('#Major').lrselectRefresh({ + url: "", + data: [] + }); + } + $('#Class').lrselectRefresh({ + url: "", + data: [] + }); + } + }); + $('#Major').lrselect({ + value: "majorno", + text: "majorname", + select: function (item) { + if (item) { + $('#Class').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } + }); + } + + } + }); + + + $('#Major').on("click", + function () { + var data = $('#Dept').lrselectGet(); + if (!data) { + learun.alert.error('请先选择系'); + } + }); + $('#Class').on("click", + function () { + var data1 = $('#Dept').lrselectGet(); + var data2 = $('#Major').lrselectGet(); + if (!data1 || !data2) { + learun.alert.error('请先选择系和专业'); + } + }); + + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_view').on('click', function () { + var BuildType = $('#gridtable').jfGridValue('BuildType'); + var Dormitory = $('#gridtable').jfGridValue('ApartmentId'); + var Unit = $('#gridtable').jfGridValue('UnitId'); + var Floor = $('#gridtable').jfGridValue('FloorId'); + var RId = $('#gridtable').jfGridValue('ID'); + var keyValue = $('#gridtable').jfGridValue('ID'); + if (BuildType != '4') { + return learun.alert.warning("请选择宿舍!"); + } + learun.layerForm({ + id: 'index', + title: '查看', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Index?keyValue=' + keyValue + '&Dormitory=' + Dormitory + '&Unit=' + Unit + '&Floor=' + Floor + '&RId=' + RId, + width: 1200, + height: 800, + btn: null, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 查看 + $('#lr_viewall').on('click', function () { + learun.layerForm({ + id: 'indexall', + title: '查看全部', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/IndexAll', + width: 1200, + height: 800, + btn: null, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return false; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + keyValue, + width: 900, + height: 550, + 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 + '/LogisticsManagement/Accommodation/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + + //刷新左侧的树 + $("#tree_refresh").on("click", function () { + page.initTree(); + + }); + }, + //初始化左侧树 + initTree: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetTree', + nodeClick: function (item) { + selectedParent.ID = item.value; + selectedParent.Name = item.text; + selectedParent.BuildType = item.title; + if (item.parent) { + if (!item.parent.parentId) { + selectedParent.ChildType = "2"; + } else { + selectedParent.ChildType = "0"; + } + } + else { + selectedParent.ChildType = "1"; + } + if (item.text.indexOf("室") > -1) { + selectedParent.ChildType = "5"; + } + var param = {}; + + if (item.title == '1') + param.ApartmentId = item.value; + else if (item.title == '2') + param.UnitId = item.value; + else if (item.title == '3') + param.FloorId = item.value; + + //page.initGird(); + //page.search({ ParentID: item.value }); + page.search(param); + } + }); + }, + // 初始化列表 + initGird: function () { + //宿舍数据 + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList', + headData: [ + { label: "名称", name: "Name", width: 100, align: "left" }, + { + label: "宿舍楼", name: "ApartmentName", width: 100, align: "left" + }, + { + label: "单元", name: "UnitName", width: 100, align: "left" + }, + { + label: "楼层", name: "FloorName", width: 100, align: "left" + }, + //{ + // label: "学生", name: "StudentID", 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: 'stuid', + // callback: function (_data) { + // callback(_data['stuname']); + // } + // }); + // } + //}, + { label: "位置", name: "Address", width: 100, align: "left" }, + { + label: "校区", name: "Campus", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { + label: "系", name: "Dept", 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: "Major", 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: "Class", 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: "RoomType", width: 100, align: "left", + formatter: function (value, row) { + if (value) { + return value + '人寝'; + } else { + return ''; + } + } + }, + { label: "入住人数", name: "CheckInStu", width: 100, align: "left" }, + { + label: "性别", name: "Sex", width: 100, align: "left", + formatter: function (value, row) { + if (value == '0') + return '女'; + else if (value == '1') + return '男'; + else + return ''; + } + }, + { label: "负责人", name: "Functionary", width: 100, align: "left" }, + { label: "负责人电话", name: "Phone", width: 100, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', + }); + }, + search: function (param) { + param = param || {}; + param.SqlParameter = " AND t.BuildType ='4' "; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + if (!!selectedParent.ID) { + //var param = { ParentID: selectedParent.ID }; + //$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + page.initTree(); + page.search({ ParentID: selectedParent.ID }); + } else { + page.initTree(); + page.search(); + } + }; + page.init(); +} 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 46cdf18ea..4f4db9329 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 @@ -1494,7 +1494,9 @@ + + @@ -7890,6 +7892,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/LogisticsManagement/Acc_DailyAssessApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/LogisticsManagement/Acc_DailyAssessApi.cs index 56ec8b6eb..6c6e7f824 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/LogisticsManagement/Acc_DailyAssessApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/LogisticsManagement/Acc_DailyAssessApi.cs @@ -2,6 +2,7 @@ using Learun.Util; using System.Collections.Generic; using System; +using System.Linq; using Learun.Application.TwoDevelopment.LogisticsManagement; namespace Learun.Application.WebApi @@ -16,6 +17,7 @@ namespace Learun.Application.WebApi public class Acc_DailyAssessApi : BaseApi { private Acc_DailyAssessIBLL acc_DailyAssessIBLL = new Acc_DailyAssessBLL(); + private AccommodationIBLL accommodationIBLL = new AccommodationBLL(); /// /// 注册接口 @@ -27,6 +29,8 @@ namespace Learun.Application.WebApi Get["/form"] = GetForm; Post["/delete"] = DeleteForm; Post["/save"] = SaveForm; + Get["/getdormstu"] = GetDormStu; + } #region 获取数据 @@ -63,6 +67,18 @@ namespace Learun.Application.WebApi }; return Success(jsonData); } + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetDormStu(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + var data = accommodationIBLL.GetDromStu(parameter.keyValue).OrderBy(x => x.Class); + return Success(data); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessEntity.cs index e303a6851..e0ac0f834 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessEntity.cs @@ -20,6 +20,12 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement [Column("ID")] public string Id { get; set; } /// + /// 关联宿舍主键 + /// + [Column("BUILDID")] + public string BuildId { get; set; } + /// + /// /// 宿舍楼 /// [Column("DORMITORY")] @@ -60,6 +66,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement [Column("STUNO")] public string StuNo { get; set; } /// + /// 学号 + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// /// 日期 /// [Column("DATE")] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessService.cs index 258176b1b..76f9d00f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DailyAssess/Acc_DailyAssessService.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Text; +using Learun.Application.TwoDevelopment.EducationalAdministration; namespace Learun.Application.TwoDevelopment.LogisticsManagement { @@ -79,10 +80,15 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } if (!queryParam["StuName"].IsEmpty()) { - dp.Add("StuName", "%"+queryParam["StuName"].ToString()+"%", DbType.String); + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); strSql.Append(" AND s.StuName like @StuName "); } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + //添加sql条件 + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -134,7 +140,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); } catch (Exception ex) { @@ -158,6 +164,13 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement { try { + var Stulist = this.BaseRepository("CollegeMIS").FindEntity(x => x.StuNo == entity.StuNo); + if (Stulist != null) + { + entity.ClassNo = Stulist.ClassNo; + entity.MajorNo = Stulist.MajorNo; + entity.DeptNo = Stulist.DeptNo; + } if (!string.IsNullOrEmpty(keyValue)) { entity.Modify(keyValue); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs index a78a58e04..44f017ca3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs @@ -44,6 +44,25 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + public IEnumerable GetDromStu(string keyValue) + { + try + { + return accommodationService.GetDromStu(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetBedListByRoomId(string RoomId) { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs index 88eab9997..5421c22d5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs @@ -22,6 +22,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetDromStu(string kevValue); IEnumerable GetBedListByRoomId(string RoomId); IEnumerable GetAllList(); IEnumerable GetClassifyList(Pagination paginationobj,string queryJson); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs index 7700554a1..ec25aceea 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs @@ -206,6 +206,28 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName } } + public IEnumerable GetDromStu(string keyValue) + { + try + { + string sql = @"select ID,Name,DNo,StudentID,fb.stuNo,fb.stuname,fb.classno,fb.majorno,fb.deptno from Acc_DormitoryBuild zb + left join StuInfoBasic fb on fb.Stuno = zb.StudentID + where zb.BuildType = '5' and zb.ParentID = '" + keyValue + "'"; + return this.BaseRepository("CollegeMIS").FindList(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public IEnumerable GetBedListByRoomId(string RoomId) { try