Ver código fonte

宿舍分配系 专业 班级

西昌缴费二期
zhangli 2 anos atrás
pai
commit
0f7ea19863
9 arquivos alterados com 1015 adições e 911 exclusões
  1. +41
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.cshtml
  3. +8
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
  4. +251
    -296
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js
  5. +638
    -581
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  6. +13
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs
  7. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs
  8. +1
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs
  9. +38
    -8
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs

+ 41
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs Ver arquivo

@@ -33,15 +33,15 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
return View();
}
///// <summary>
///// 表单页
///// <summary>
///// <returns></returns>
//[HttpGet]
//public ActionResult Form()
//{
// return View();
//}
/// <summary>
/// 分配宿舍
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexDistribution()
{
return View();
}

/// <summary>
/// 带参数的表单页
@@ -143,7 +143,15 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
return View();
}


/// <summary>
/// 分配系
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormDept()
{
return View();
}

/// <summary>
/// 分配专业和班级
@@ -200,6 +208,15 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
return View();
}

/// <summary>
/// 分配专业和班级
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormClass()
{
return View();
}


#endregion
@@ -385,6 +402,20 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
return Success("保存成功!");
}

/// <summary>
/// 寝室分配系
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveDeptClass(string keyValue, string strEntity,int type)
{
Acc_DormitoryBuildEntity entity = strEntity.ToObject<Acc_DormitoryBuildEntity>();
accommodationIBLL.SaveDeptClass(keyValue, entity, type);
return Success("保存成功!");
}

/// <summary>
/// 学生宿舍的单元、楼层、房间、床位添加


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.cshtml Ver arquivo

@@ -76,8 +76,8 @@
<input id="Leader" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">类型</div>
<div id="RoomType"></div>
<div class="lr-form-item-title">几人寝<font face="宋体">*</font></div>
<input id="RoomType" type="number" class="form-control" isvalid="yes" checkexpession="NotNull"/>
</div>
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">星级</div>


+ 8
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js Ver arquivo

@@ -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) {


+ 251
- 296
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js Ver arquivo

@@ -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) });
}
};


+ 638
- 581
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 13
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs Ver arquivo

@@ -24,7 +24,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// </summary>
[Column("DNO")]
public string DNo { get; set; }
/// <summary>
/// 名称
/// </summary>
@@ -166,9 +166,21 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// </summary>
[Column("PLANBEDNUM")]
public int? PlanBedNum { get; set; }
/// <summary>
/// 寝室类型(几人寝)
/// </summary>
[Column("ROOMTYPE")]
public int? RoomType { get; set; }
/// <summary>
/// 入住人数
/// </summary>
[Column("CHECKINSTU")]
public int? CheckInStu { get; set; }
#endregion

#region 扩展字段

[NotMapped]
public string ApartmentName { get; set; }
[NotMapped]


+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs Ver arquivo

@@ -607,6 +607,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

/// <summary>
/// 分配系
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity"></param>
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);
}
}
}

/// <summary>
/// 批量添加单元、楼层、宿舍、床位


+ 1
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs Ver arquivo

@@ -71,7 +71,6 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// <summary>
/// <returns></returns>
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
/// <summary>
/// <returns></returns>
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<Acc_DormitoryBuildEntity> list);

/// <summary>
/// 批量添加单元、楼层、房间、床位
@@ -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);


+ 38
- 8
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs Ver arquivo

@@ -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<Acc_DormitoryBuildEntity>(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 提交数据
}

Carregando…
Cancelar
Salvar