Browse Source

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

临城职教中职
ndbs 2 years ago
parent
commit
cabe018728
11 changed files with 893 additions and 2 deletions
  1. +100
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs
  2. +97
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.cshtml
  3. +164
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js
  4. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml
  5. +54
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
  6. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexClassify.cshtml
  7. +184
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexClassify.js
  8. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs
  10. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs
  11. +150
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs

+ 100
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs View File

@@ -139,6 +139,60 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers



/// <summary>
/// 分配专业和班级
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormClass()
{
return View();
}
/// <summary>
/// 分配宿舍
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormRoom()
{
return View();
}
/// <summary>
/// 床位管理
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexBed()
{
return View();
}
/// <summary>
/// 床位管理
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormBed()
{
return View();
}
/// <summary>
/// 分类管理
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormClassify()
{
return View();
}
/// <summary>
/// 分类管理
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexClassify()
{
return View();
}



@@ -167,7 +221,39 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
return Success(jsonData);
}


/// <summary>
/// 获取床位数据
/// <summary>
/// <param name="RoomId">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetBedListByRoomId(string RoomId)
{
var data = accommodationIBLL.GetBedListByRoomId(RoomId).OrderBy(x => x.DNo);
return Success(data);
}
/// <summary>
/// 获取分类数据
/// <summary>
/// <param name="queryJson"></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetClassifyList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = accommodationIBLL.GetClassifyList(paginationobj,queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取宿舍楼数据
/// </summary>
@@ -269,6 +355,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
var data = accommodationIBLL.GetTreeNew();
return Success(data);
}
/// <summary>
/// 获取上级树形数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetClassifyTree()
{
var data = accommodationIBLL.GetClassifyTree();
return Success(data);
}

#endregion

#region 提交数据


+ 97
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.cshtml View File

@@ -0,0 +1,97 @@
@{
ViewBag.Title = "学生宿舍管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">上级</div>
<div id="ParentID" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">名称<font face="宋体">*</font></div>
<input id="Name" type="text" 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">编号<font face="宋体">*</font></div>
<input id="DNo" 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>
<input id="Address" type="text" class="form-control"/>
</div>
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">类别<font face="宋体">*</font></div>
<div id="BuildType" isvalid="yes" checkexpession="NotNull" ></div>
</div>

<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">校区</div>
<div id="Campus"></div>
</div>
@*<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">系</div>
<div id="Dept"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">专业</div>
<div id="Major"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">班级</div>
<div id="Class"></div>
</div>*@
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">负责人</div>
<input id="Functionary" 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>
<input id="Phone" 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>
<input id="Price" 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>
<input id="sort" type="number" class="form-control"/>
</div>*@

@if (ViewBag.BuildType == "3")
{
//寝室信息
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">性别</div>
<div id="Sex"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">舍长</div>
<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">几人寝<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>
<input id="Starred" 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="HasToilet"></div>
</div>
}
@if (ViewBag.BuildType == "4")
{
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">学生名字</div>
<input id="StudentID" type="text" class="form-control" />
</div>
}
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js")

+ 164
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js View File

@@ -0,0 +1,164 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-26 15:02
* 描 述:学生宿舍管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
page.initSelect();
},
bind: function () {
$('#BuildType').lrDataItemSelect({ code: 'BuildType' });
// 上级
$('#ParentID').lrselect({
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetClassifyTree',
type: 'tree',
allowSearch: true,
maxHeight: 225,
select: function (item) {
if (item&&item.id!='-1') {
$('#BuildType').lrselectSet(item.title);
$('#BuildType').attr('readonly', 'readonly');
} else {
$('#BuildType').lrselectSet('1');
$('#BuildType').removeAttr('readonly');
}
}
});

$('#Sex').lrRadioCheckbox({
type: 'radio',
code: 'usersex',
});
$("#HasToilet").lrRadioCheckbox({
type: 'radio',
code: 'HasToilet',
})
//$('#StudentID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' });
//$('#StudentID').lrDataSourceSelect({ code: 'StuInfoTwo', value: 'stuid', text: 'stuname' });
$('#StudentID').lrselect({
value: "stuid",
text: "stuname",
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic'
});
$('#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('请先选择系和专业');
}
});
},
initData: function () {

if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
},
initSelect: function () {
var dfop = {
type: 'tree',
// 展开最大高度
maxHeight: 200,
// 是否允许搜索
allowSearch: true,
// 访问数据接口地址
url: top.$.rootUrl + '/LR_OrganizationModule/Company/GetTree',
// 访问数据接口参数
param: { parentId: '0' },
}
$('#Campus').lrselect(dfop);

}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var strEntity = $('body').lrGetFormData();
if (!strEntity.ParentID && strEntity.BuildType != '1') {
return learun.alert.warning("请选择上级!");
}
var postData = {
strEntity: JSON.stringify(strEntity)
};
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 4
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml View File

@@ -69,11 +69,14 @@
<a id="lr_allocation" class="btn btn-default"><i class="fa fa-pencil-square"></i>&nbsp;自动分配宿舍</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;录入</a>
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增宿舍</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_Classify" class="btn btn-default"><i class="fa fa-tags"></i>&nbsp;<span class="lrlt">分类管理</span></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>


+ 54
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js View File

@@ -29,6 +29,9 @@ var bootstrap = function ($, learun) {
});
// 新增
$('#lr_add').on('click', function () {
if (selectedParent.BuildType != '3') {
return learun.alert.warning("请选择楼层!");
}
var url = "";
if (selectedParent.ID != null) {
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?ParentID=' + selectedParent.ID + '&ParentName=' + selectedParent.Name;
@@ -126,6 +129,57 @@ var bootstrap = function ($, learun) {
});

});
// 同步宿舍信息
$('#lr_syncdata').on('click', function () {
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认同步!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/SyncData', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});


//床位管理
$("#lr_bedManage").on("click", function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录!");
return false;
}
learun.layerForm({
id: 'indexBed',
title: '床位管理',
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/IndexBed?ParentID=' + keyValue,
width: 700,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}

});
//分类管理
$("#lr_Classify").on("click", function () {
learun.layerForm({
id: 'indexBed',
title: '分类管理',
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/IndexClassify',
width: 1200,
height: 780,
btn:null,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
},
//初始化左侧树
initTree: function () {


+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexClassify.cshtml View File

@@ -0,0 +1,69 @@
@{
ViewBag.Title = "学生宿舍管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">名称</div>
<input id="Name" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">宿舍楼</div>
<div id="ApartmentId"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">单元</div>
<div id="UnitId"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">楼层</div>
<div id="FloorId"></div>
</div>
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">类别</div>
<input id="BuildType" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">系</div>
<div id="Dept"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="Major"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">班级</div>
<div id="Class"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">性别</div>
<div id="Sex"></div>
</div>*@
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;录入</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>

@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/IndexClassify.js")

+ 184
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexClassify.js View File

@@ -0,0 +1,184 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-26 15:02
* 描 述:学生宿舍管理
*/
var refreshGirdData;
var acceptClick;
var selectedParent = {};
//var ParentID = request('ParentID');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);

// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
//宿舍楼
$('#ApartmentId').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo',
param: { strWhere: " BuildType='1' " },
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 });

// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify',
width: 700,
height: 400,
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/FormClassify?keyValue=' + keyValue,
width: 700,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});


},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetClassifyList',
headData: [
{ label: "名称", name: "Name", width: 150, 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: "BuildType", width: 100, align: "left",
formatter: function (value, row) {
if (value == '1') return '宿舍楼';
else if (value == '2') return '单元';
else if (value == '3') return '楼层';
else if (value == '4') return '房间';
}
},
{ 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: "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 ',
});
page.search();
},
search: function (param) {
param = param || {};
//param.SqlParameter = " AND t.BuildType <>'5' ";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
// 保存数据
acceptClick = function (callBack) {
if (!!callBack) {
callBack();
}
};
page.init();
}

+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -1300,8 +1300,16 @@
<Content Include="Areas\EducationalAdministration\Views\TeachPlan\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachSwitch\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachSwitch\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\FormClassify.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\FormBed.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\FormRoom.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\FormClass.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\FormDept.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\Allocation.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\DormitoryAdd.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexClassify.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexBed.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexDistribution.js" />
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\AttendanceReportByWeek.js" />
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\StatisticDetailIndex.js" />
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\StatisticIndex.js" />


+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs View File

@@ -61,6 +61,25 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

public IEnumerable<Acc_DormitoryBuildEntity> GetClassifyList(Pagination paginationobj, string queryJson)
{
try
{
return accommodationService.GetClassifyList(paginationobj,queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public object GetDormitoryList()
{
try
@@ -340,7 +359,49 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

public List<TreeModel> GetClassifyTree()
{
try
{
List<Acc_DormitoryBuildEntity> list = accommodationService.GetClassifyTree();
List<TreeModel> treeList = new List<TreeModel>();
foreach (Acc_DormitoryBuildEntity item in list)
{
TreeModel node = new TreeModel
{
id = item.ID.ToString(),
text = item.Name.ToString(),
value = item.ID.ToString(),
showcheck = false,
checkstate = 0,
isexpand = false,
parentId = item.ParentID == null ? "" : item.ParentID,
title =string.IsNullOrEmpty(item.BuildType)?"":(Convert.ToInt32(item.BuildType)+1).ToString() ,

};


treeList.Add(node);


}


return treeList.ToTree();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


/// <summary>


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs View File

@@ -22,6 +22,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// <returns></returns>
IEnumerable<Acc_DormitoryBuildEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<Acc_DormitoryBuildEntity> GetAllList();
IEnumerable<Acc_DormitoryBuildEntity> GetClassifyList(Pagination paginationobj,string queryJson);
/// <summary>
/// 获取Acc_DormitoryBuild表实体数据
/// <param name="keyValue">主键</param>
@@ -50,6 +51,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
string GetDormitoryInfoByStuNo(string val);
List<TreeModel> GetTree();
List<TreeModel> GetTreeNew();
List<TreeModel> GetClassifyTree();

bool MatchDormitoryInfo(string stuNo, string dormitory, string unit, string floor, string room, string bed,List<Acc_DormitoryBuildEntity> data);



+ 150
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs View File

@@ -104,6 +104,53 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
dp.Add("Leader", "%" + queryParam["Leader"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Leader Like @Leader ");
}

if (!queryParam["NoDistribution"].IsEmpty())
{
var noDistribution = queryParam["NoDistribution"].ToString();
if (noDistribution.Contains("dept"))
{
strSql.Append(" AND (t.Dept is null or len(t.Dept)=0) ");
}
if (noDistribution.Contains("major"))
{
strSql.Append(" AND (t.Major is null or len(t.Major)=0) ");
}
if (noDistribution.Contains("class"))
{
strSql.Append(" AND (t.Class is null or len(t.Class)=0) ");
}
if (noDistribution.Contains("room"))
{
strSql.Append(" AND (t.CheckInStu is null or len(t.CheckInStu)=0 or t.CheckInStu=0) ");
}
}
if (!queryParam["Distribution"].IsEmpty())
{
var distribution = queryParam["Distribution"].ToString();
if (distribution.Contains("dept"))
{
strSql.Append(" AND len(t.Dept)>0 ");
}
if (distribution.Contains("major"))
{
strSql.Append(" AND len(t.Major)>0 ");
}
if (distribution.Contains("class"))
{
strSql.Append(" AND len(t.Class)>0 ");
}
if (distribution.Contains("room"))
{
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)
@@ -137,6 +184,89 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}


public IEnumerable<Acc_DormitoryBuildEntity> GetClassifyList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.Name,
t.Address,
t.Campus,
t.Dept,
t.BuildType,
t.Major,
t.Class,
t.Sex,
t.Functionary,
t.Phone,
t.Price,
t.Leader,
t.StudentID,
t.PlanStudentID,
t.ParentID,
t.Remark,
t.Starred,
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 ");
strSql.Append(@" left join (select * FROM Acc_DormitoryBuild where BuildType='1') a on t.ApartmentId=a.ID
left join(select * FROM Acc_DormitoryBuild where BuildType = '2') b on t.UnitId = b.ID
left join(select * FROM Acc_DormitoryBuild where BuildType = '3') c on t.FloorId = c.ID ");
strSql.Append(" WHERE 1=1 and (t.BuildType<>'5' and t.BuildType<>'4') ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["ParentID"].IsEmpty())
{
dp.Add("ParentID", queryParam["ParentID"].ToString(), DbType.String);
strSql.Append(" AND t.ParentID =@ParentID ");
}
if (!queryParam["keyword"].IsEmpty())
{
strSql.Append($" AND t.Name like '%{queryParam["keyword"].ToString()}%' ");
}
if (!queryParam["ApartmentId"].IsEmpty())
{
dp.Add("ApartmentId", queryParam["ApartmentId"].ToString(), DbType.String);
strSql.Append(" AND t.ApartmentId =@ApartmentId ");
}
if (!queryParam["UnitId"].IsEmpty())
{
dp.Add("UnitId", queryParam["UnitId"].ToString(), DbType.String);
strSql.Append(" AND t.UnitId =@UnitId ");
}
if (!queryParam["FloorId"].IsEmpty())
{
dp.Add("FloorId", queryParam["FloorId"].ToString(), DbType.String);
strSql.Append(" AND t.FloorId =@FloorId ");
}

if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
return this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryBuildEntity>(strSql.ToString(), dp, pagination).ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

internal string GetBuildType(string parentID)
{
try
@@ -510,6 +640,25 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

public List<Acc_DormitoryBuildEntity> GetClassifyTree()
{
try
{
return this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryBuildEntity>(x => ( x.BuildType == "2" || x.BuildType == "1")).ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Acc_DormitoryBuild表实体数据
/// <param name="keyValue">主键</param>
@@ -1295,6 +1444,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
rootEntity.CreateTime = DateTime.Now;
rootEntity.UpdateBy = currentUser.realName;
rootEntity.UpdateTime = DateTime.Now;
rootEntity.ApartmentId = rootEntity.ID;
entity.ParentID = rootEntity.ID;
this.BaseRepository("CollegeMIS").Insert(rootEntity);
}


Loading…
Cancel
Save