From 0f7ea1986391159fefa9c871f3765e53ad488556 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 18 Feb 2022 10:43:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=BF=E8=88=8D=E5=88=86=E9=85=8D=E7=B3=BB?= =?UTF-8?q?=20=20=E4=B8=93=E4=B8=9A=20=E7=8F=AD=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AccommodationController.cs | 51 +- .../Views/Accommodation/Form.cshtml | 4 +- .../Views/Accommodation/Index.js | 17 +- .../Views/Accommodation/IndexDistribution.js | 547 ++++---- .../Learun.Application.Web.csproj | 1219 +++++++++-------- .../Accommodation/Acc_DormitoryBuildEntity.cs | 14 +- .../Accommodation/AccommodationBLL.cs | 23 + .../Accommodation/AccommodationIBLL.cs | 5 +- .../Accommodation/AccommodationService.cs | 46 +- 9 files changed, 1015 insertions(+), 911 deletions(-) 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 26194b945..64c1ec87e 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 @@ -33,15 +33,15 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { return View(); } - ///// - ///// 表单页 - ///// - ///// - //[HttpGet] - //public ActionResult Form() - //{ - // return View(); - //} + /// + /// 分配宿舍 + /// + /// + [HttpGet] + public ActionResult IndexDistribution() + { + return View(); + } /// /// 带参数的表单页 @@ -143,7 +143,15 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return View(); } - + /// + /// 分配系 + /// + /// + [HttpGet] + public ActionResult FormDept() + { + return View(); + } /// /// 分配专业和班级 @@ -200,6 +208,15 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return View(); } + /// + /// 分配专业和班级 + /// + /// + [HttpGet] + public ActionResult FormClass() + { + return View(); + } #endregion @@ -385,6 +402,20 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return Success("保存成功!"); } + /// + /// 寝室分配系 + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveDeptClass(string keyValue, string strEntity,int type) + { + Acc_DormitoryBuildEntity entity = strEntity.ToObject(); + accommodationIBLL.SaveDeptClass(keyValue, entity, type); + return Success("保存成功!"); + } /// /// 学生宿舍的单元、楼层、房间、床位添加 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.cshtml index bf8ed99d3..970177fa4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.cshtml @@ -76,8 +76,8 @@
-
类型
-
+
几人寝*
+
星级
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js index 749e04695..3d4756ee6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js @@ -56,7 +56,7 @@ var bootstrap = function ($, learun) { $('#UnitId').lrselect({ allowSearch: true }); $('#FloorId').lrselect({ allowSearch: true }); - $('#Sex').lrDataItemSelect({code: 'usersex'}); + $('#Sex').lrDataItemSelect({ code: 'usersex' }); //.lrRadioCheckbox({ // type: 'radio', // code: 'usersex', @@ -384,16 +384,15 @@ var bootstrap = function ($, learun) { { label: "班级", name: "Class", width: 100, align: "left" }, { label: "寝室类型", name: "RoomType", width: 100, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'RoomType', - callback: function (_data) { - callback(_data.text); - } - }); + 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 (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js index 3ddb84289..86bfb5bce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js @@ -62,10 +62,10 @@ var bootstrap = function ($, learun) { //}); $('#NoDistribution').lrRadioCheckbox({ - type: 'checkbox', + type: 'checkbox', code: 'NoDistribution' }); - + $('#Distribution').lrRadioCheckbox({ type: 'checkbox', code: 'NoDistribution' @@ -260,14 +260,13 @@ var bootstrap = function ($, learun) { if (arr.some(x => x != '4')) { return learun.alert.warning("只能选择宿舍进行分配!"); } - var arrDept = Dept.split(','); - if (arrDept.some(function (value, index) { - return value.length === 0; - })) { - return learun.alert.warning("选中记录包含未分配系的数据!"); - } - + var arrDept = Dept.split(','); if (keyValue.indexOf(',') > 0) { + if (arrDept.some(function(value, index) { + return value.length == 0; + })) { + return learun.alert.warning("选中记录包含未分配专业的数据!"); + } if (arrDept.some(function (value, index) { return value != arrDept[0]; })) { @@ -275,7 +274,7 @@ var bootstrap = function ($, learun) { } } learun.layerForm({ - id: 'formClass', + id: 'formDept', title: '分配专业班级', url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClass?keyValue=' + keyValue + '&Dept=' + arrDept[0], width: 400, @@ -285,37 +284,6 @@ var bootstrap = function ($, learun) { } }); }); - - - //分配宿舍 - $("#lr_Bed").on("click", function () { - var keyValue = $('#gridtable').jfGridValue('ID'); - var Sex = $('#gridtable').jfGridValue('Sex'); - var BuildType = $('#gridtable').jfGridValue('BuildType'); - var Name = $('#gridtable').jfGridValue('Name'); - var Class = $('#gridtable').jfGridValue('Class'); - var arr = BuildType.split(','); - if (arr.some(x => x != '4')) { - return learun.alert.warning("只能选择宿舍进行分配!"); - } - if (keyValue.indexOf(',') != -1) { - return learun.alert.warning("只能选择一条记录进行分配!"); - } - if (Class.length == 0) { - return learun.alert.warning("请先分配班级!"); - } - learun.layerForm({ - id: 'formRoom', - title: '分配宿舍--' + Name, - url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormRoom?keyValue=' + keyValue + '&Class=' + Class + '&Sex=' + Sex, - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - }); - }, //初始化左侧树 initTree: function () { @@ -339,273 +307,260 @@ var bootstrap = function ($, learun) { 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); + page.initGird(); + page.search({ ParentID: item.value }); } }); }, // 初始化列表 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']); + $("#gridtable").empty(); + $("#gridtable")[0].dfop = undefined; + if (selectedParent.BuildType == undefined || selectedParent.BuildType === "3") { + //宿舍数据 + $('#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: "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: "CheckInStu", width: 100, align: "left" }, + { + label: "性别", name: "Sex", width: 100, align: "left", + formatter: function (callback, value, row, op, $cell) { + 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, + isMultiselect: true, + sidx: 'CheckInStu desc,ApartmentId asc,UnitId asc ,FloorId asc ', + //sord: 'ASC', + isSubGrid: true, // 是否有子表 + subGridExpanded: function (subContentId, rowItem) { + $('#' + subContentId).jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + rowItem.ID, + headData: [ + { label: "名称", name: "Name", 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']); + } + }); + } + }, + ], + mainId: 'ID', + isPage: false, + //sidx: 'DNo', + //sord: 'ASC', + }); + //var param; + //param = param || {}; + //param.ParentID = rowItem.Id; + $('#' + subContentId).jfGridSet('reload'); }, - { 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, - isMultiselect: true, - sidx: 'CheckInStu asc,ApartmentId asc,UnitId asc ,FloorId asc ', - //sord: 'ASC', - isSubGrid: true, // 是否有子表 - subGridExpanded: function (subContentId, rowItem) { - $('#' + subContentId).jfGrid({ - url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + rowItem.ID, - headData: [ - { label: "名称", name: "Name", 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']); - } - }); - } - }, - ], - mainId: 'ID', - isPage: false, - //sidx: 'DNo', - //sord: 'ASC', - }); - //var param; - //param = param || {}; - //param.ParentID = rowItem.Id; - $('#' + subContentId).jfGridSet('reload'); - }, - subGridHeight: 250, - }); - - - //$("#gridtable").empty(); - //$("#gridtable")[0].dfop = undefined; - //if (selectedParent.BuildType == undefined || selectedParent.BuildType === "3") { - - //} else { - // //lrAuthorizeJfGridLei - // $('#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: 'id', - // // callback: function (_data) { - // // callback(_data['majorname']); - // // } - // // }); - // // } - // //}, - // //{ label: "班级", name: "Class", width: 100, align: "left" }, - // //{ - // // label: "性别", name: "Sex", width: 100, align: "left", - // // formatterAsync: function (callback, value, row, op, $cell) { - // // learun.clientdata.getAsync('dataItem', { - // // key: value, - // // code: 'usersex', - // // callback: function (_data) { - // // callback(_data.text); - // // } - // // }); - // // } - // //}, - // { 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, - // //isMultiselect: true - // //sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', - // //sord: 'ASC', - // }); - //} - + subGridHeight: 250, + }); + } else { + //lrAuthorizeJfGridLei + $('#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: 'id', + // callback: function (_data) { + // callback(_data['majorname']); + // } + // }); + // } + //}, + //{ label: "班级", name: "Class", width: 100, align: "left" }, + //{ + // label: "性别", name: "Sex", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'usersex', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, + { 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, + //isMultiselect: true + //sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', + //sord: 'ASC', + }); + } + //page.search(); }, search: function (param) { + //console.log(param); + param = param || {}; - param.SqlParameter = " AND t.BuildType ='4' "; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; 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 06b26bd37..b836e691e 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 @@ -226,7 +226,7 @@ - + ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll @@ -315,30 +315,39 @@ + + + - - + - - + + + + + + - + + + + @@ -363,6 +372,8 @@ + + @@ -392,17 +403,11 @@ - - - - - - @@ -427,9 +432,9 @@ - + @@ -482,26 +487,19 @@ - - + - - + - - - - - + - @@ -712,6 +710,7 @@ + @@ -749,6 +748,7 @@ + @@ -813,15 +813,31 @@ + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -855,6 +871,9 @@ + + + @@ -868,13 +887,18 @@ + + + + + @@ -888,7 +912,10 @@ + + + @@ -931,11 +958,21 @@ - - + + + + + - + + + + + + + + @@ -946,24 +983,26 @@ + + + + + + + + + - + + - - - - - - - - @@ -979,10 +1018,8 @@ - - - + @@ -991,6 +1028,10 @@ + + + + @@ -1003,24 +1044,46 @@ + + + + + + + + + + + + + + - + + + - + + + + + + + @@ -1037,6 +1100,8 @@ + + @@ -1054,20 +1119,29 @@ + + + + + + + + + + + - - + - - - + + @@ -1083,14 +1157,20 @@ + - - + + + + + + + @@ -1220,6 +1300,8 @@ + + @@ -1227,6 +1309,7 @@ + @@ -1237,6 +1320,16 @@ + + + + + + + + + + @@ -1314,27 +1407,16 @@ - - - - - - - - - + - - - - + @@ -1362,8 +1444,15 @@ + + + + + + + @@ -1371,17 +1460,19 @@ + - + + @@ -1418,6 +1509,7 @@ + @@ -1429,8 +1521,6 @@ - - @@ -1447,44 +1537,32 @@ - - + - - - + + + + - - - - - - - - - - - - - - - + + + - - - + - - - - - + + + + + + + @@ -1510,6 +1588,14 @@ + + + + + + + + @@ -1832,6 +1918,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1942,8 +2176,6 @@ - - @@ -2125,6 +2357,7 @@ + @@ -3028,10 +3261,12 @@ + + @@ -3166,12 +3401,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3884,6 +4161,16 @@ + + + + + + + + + + @@ -5062,6 +5349,7 @@ + @@ -5862,6 +6150,10 @@ + + + + @@ -6010,6 +6302,10 @@ + + + + @@ -6248,8 +6544,8 @@ - - + + @@ -6261,45 +6557,105 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6314,348 +6670,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - Designer - + Designer @@ -6787,10 +6805,18 @@ {1d192591-b85a-41db-ae3a-4bf9765786c1} Learun.Workflow.Engine + + {65cc5cdc-9638-4dd0-b2d6-3182cc16d2da} + Quanjiang.DigitalScholl.SendSms + {4D841EAD-3FD8-4FAC-BC67-C4CE6C0D1181} Quanjiang.DigitalScholl.WebLicense + + {767d20c4-b983-4940-bf97-74d5479ca558} + Quanjiang.DigitalSchool.Aspose + @@ -7398,64 +7424,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - + + + + @@ -7464,58 +7445,143 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - @@ -7587,29 +7653,20 @@ + - + - + - - - - - - - - - - - - - + + + - + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs index 928e0866e..3ea342fb6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs @@ -24,7 +24,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement ///
[Column("DNO")] public string DNo { get; set; } - + /// /// 名称 /// @@ -166,9 +166,21 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement ///
[Column("PLANBEDNUM")] public int? PlanBedNum { get; set; } + + /// + /// 寝室类型(几人寝) + /// + [Column("ROOMTYPE")] + public int? RoomType { get; set; } + /// + /// 入住人数 + /// + [Column("CHECKINSTU")] + public int? CheckInStu { get; set; } #endregion #region 扩展字段 + [NotMapped] public string ApartmentName { get; set; } [NotMapped] 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 73cd25a42..f03a49428 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 @@ -607,6 +607,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + /// + /// 分配系 + /// + /// + /// + public void SaveDeptClass(string keyValue, Acc_DormitoryBuildEntity entity,int type) + { + try + { + accommodationService.SaveDeptClass(keyValue, entity, type); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 批量添加单元、楼层、宿舍、床位 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 0f72b5a99..a98a181e2 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 @@ -71,7 +71,6 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// /// void DeleteEntity(string keyValue); - void DeleteBed(string keyValue, string ParentID); string GetBuildType(string parentID); string GetParentBuildType(string keyValue); @@ -81,9 +80,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// /// void SaveEntity(string keyValue, Acc_DormitoryBuildEntity entity); - void SaveBedEntity(string keyValue,string ParentID, Acc_DormitoryBuildEntity entity); void SaveDeptClass(string keyValue, Acc_DormitoryBuildEntity entity,int type); - void SaveRoom(string RoomId, List list); + /// /// 批量添加单元、楼层、房间、床位 @@ -97,7 +95,6 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement void Automatic_allocation_accommodation(bool noNation, bool noPlace); - void SyncData(); object GetDormitoryList(); object GetUnitList(string ParentID); object GetFloorList(string parentID); 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 de062fcc6..de48bd784 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 @@ -51,8 +51,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement t.ParentID, t.Remark, t.Starred, - t.HasToilet, -t.ApartmentId,t.UnitId,t.FloorId, + t.HasToilet,t.RoomType, +t.ApartmentId,t.UnitId,t.FloorId,t.CheckInStu, a.name as ApartmentName,b.name as UnitName,c.Name as FloorName "); strSql.Append(" FROM Acc_DormitoryBuild t "); @@ -170,12 +170,6 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName strSql.Append(" AND t.CheckInStu>0 "); } } - - if (!queryParam["SqlParameter"].IsEmpty()) - { - strSql.Append(queryParam["SqlParameter"].ToString()); - } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination).OrderBy(a => a.Name).ThenBy(a => a.Name).ToList(); } catch (Exception ex) @@ -1146,6 +1140,7 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName Major = dormitory.Major, Phone = dormitory.Phone, Price = dormitory.Price, + RoomType = bedNum, UpdateBy = currentUser.realName, UpdateTime = DateTime.Now, Starred = "3", @@ -1584,6 +1579,41 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName } } + public void SaveDeptClass(string keyValue, Acc_DormitoryBuildEntity entity, int type) + { + try + { + if (keyValue.Contains(",")) + { + keyValue = string.Join("','", keyValue.Split(',')); + } + string sql = $"update Acc_DormitoryBuild set "; + if (type == 1) + { + sql += $" Dept='{entity.Dept}' "; + } + else + { + sql += $"Major='{entity.Major}',Class='{entity.Class}'"; + } + + sql += $" where ID in ('{keyValue}')"; + + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion 提交数据 }