소스 검색

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

临城职教中职
ndbs 2 년 전
부모
커밋
cf13104ec4
25개의 변경된 파일1714개의 추가작업 그리고 12개의 파일을 삭제
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml
  2. +245
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/DormitoryReturnController.cs
  3. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Form.cshtml
  4. +59
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Form.js
  5. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/FormOut.cshtml
  6. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/FormOut.js
  7. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/FormReturn.cshtml
  8. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/FormReturn.js
  9. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Index.cshtml
  10. +159
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Index.js
  11. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.cshtml
  12. +131
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.js
  13. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  14. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js
  15. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  16. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryReturnMap.cs
  17. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  18. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs
  19. +64
    -9
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs
  20. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs
  21. +75
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs
  22. +104
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/Acc_DormitoryReturnEntity.cs
  23. +210
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnBLL.cs
  24. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnIBLL.cs
  25. +273
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnService.cs

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml 파일 보기

@@ -5,11 +5,11 @@
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="Book_borrowinfo">
<div class="lr-form-item-title">借书时间</div>
<input id="BorrowTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#BorrowTime').trigger('change'); } })" />
<input id="BorrowTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#BorrowTime').trigger('change'); } })" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_borrowinfo">
<div class="lr-form-item-title">还书时间</div>
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" />
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_borrowinfo" >
<div class="lr-form-item-title">借书证</div>


+ 245
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/DormitoryReturnController.cs 파일 보기

@@ -0,0 +1,245 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LogisticsManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;
using System;

namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-10 10:06
/// 描 述:学生归宿管理
/// </summary>
public class DormitoryReturnController : MvcControllerBase
{
private DormitoryReturnIBLL dormitoryReturnIBLL = new DormitoryReturnBLL();
private AccommodationIBLL accommodationIBLL = new AccommodationBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormOut()
{
return View();
}

/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormReturn()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexReport()
{
return View();
}

#endregion

#region 获取数据
/// <summary>
/// 获取左侧树形数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree()
{
var data = dormitoryReturnIBLL.GetTree();
return Success(data);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = dormitoryReturnIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Acc_DormitoryReturnData = dormitoryReturnIBLL.GetAcc_DormitoryReturnEntity(keyValue);
var jsonData = new
{
Acc_DormitoryReturn = Acc_DormitoryReturnData,
};
return Success(jsonData);
}
/// <summary>
/// 获取下拉框数据
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult GetDept()
{
var data = accommodationIBLL.GetDept();
return Success(data);
}
/// <summary>
/// 获取下拉框数据
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult GetMajor(string strWhere)
{
var data = accommodationIBLL.GetMajor(strWhere);

return Success(data);
}
/// <summary>
/// 获取下拉框数据
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult GetClass(string strWhere)
{
var data = accommodationIBLL.GetClass(strWhere);

return Success(data);
}

[HttpGet]
public ActionResult GetReportList(string queryJson)
{
List<Acc_DormitoryBuildEntity> data = dormitoryReturnIBLL.GetReportList(queryJson).ToList();
var list = data.GroupBy(a => a.IsReturn).Select(a => new { a.Key, num = a.Count() }).ToList();
List<object> list2 = new List<object>();
foreach (var item in list)
{
var name = item.Key == 1 ? "已归宿" : "未归宿";
list2.Add(new { name = name, value = item.num });

}
return JsonResult(list2);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public ActionResult GetReportData(string queryJson)
{
List<Acc_DormitoryBuildEntity> data = dormitoryReturnIBLL.GetReportList(queryJson).ToList();
var list = data.GroupBy(a => a.IsReturn).Select(a => new { a.Key, num = a.Count() }).ToList();
List<object> list2 = new List<object>();
List<String> list1 = new List<String>();
foreach (var item in list)
{
var name = item.Key == 1 ? "已归宿" : "未归宿";
list2.Add(new { name = name, value = item.num });
list1.Add(name);

}
return Success(new { list1, list2 });
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
dormitoryReturnIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveData(string keyValue, string strEntity)
{
Acc_DormitoryReturnEntity entity = strEntity.ToObject<Acc_DormitoryReturnEntity>();
dormitoryReturnIBLL.SaveData(keyValue, entity);

return Success("保存成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string type, string strEntity)
{
Acc_DormitoryReturnEntity entity = strEntity.ToObject<Acc_DormitoryReturnEntity>();
dormitoryReturnIBLL.SaveEntity(type, entity);

return Success("保存成功!");
}


#endregion

}
}

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Form.cshtml 파일 보기

@@ -0,0 +1,23 @@
@{
ViewBag.Title = "学生归宿管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">床位</div>
<div id="DormitoryBuildId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">出宿时间</div>
<input id="OutTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#OutTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">归宿时间</div>
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" />
</div>
@*<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">检查日期</div>
<input id="CheckDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#CheckDate').trigger('change'); } })" />
</div>*@
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/Form.js")

+ 59
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Form.js 파일 보기

@@ -0,0 +1,59 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-10 10:06
* 描 述:学生归宿管理
*/
var acceptClick;
var keyValue = request('keyValue');
var ParentId = request('ParentId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#DormitoryBuildId').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
param: { code: 'DormitoryInfo', strWhere: "ParentID='" + ParentId + "' and BuildType='5' and (StudentID is not null and len(StudentID)>0) order by name" },
text: 'name',
value: 'id',
allowSearch: true
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetFormData?keyValue=' + keyValue, function (data) {
console.log('data', data);
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/SaveData?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/FormOut.cshtml 파일 보기

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "学生出宿";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">床位<font face="宋体">*</font></div>
<div id="DormitoryBuildId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">出宿时间<font face="宋体">*</font></div>
<input id="OutTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#OutTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/FormOut.js")

+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/FormOut.js 파일 보기

@@ -0,0 +1,61 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-10 10:06
* 描 述:学生归宿管理
*/
var acceptClick;
var keyValue = request('keyValue');
var ParentId = request('ParentId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#DormitoryBuildId').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
param: { code: 'DormitoryInfo', strWhere: "ParentID='" + ParentId + "' and BuildType='5' and (StudentID is not null and len(StudentID)>0) order by name" },
text: 'name',
value: 'id',
allowSearch: true
});

},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var strEntity = $('body').lrGetFormData();
strEntity.ParentId = ParentId;
var postData = {
strEntity: JSON.stringify(strEntity)
};
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/SaveForm?type=1', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/FormReturn.cshtml 파일 보기

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "学生出宿";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">床位<font face="宋体">*</font></div>
<div id="DormitoryBuildId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">归宿时间<font face="宋体">*</font></div>
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/FormReturn.js")

+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/FormReturn.js 파일 보기

@@ -0,0 +1,61 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-10 10:06
* 描 述:学生归宿管理
*/
var acceptClick;
var keyValue = request('keyValue');
var ParentId = request('ParentId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#DormitoryBuildId').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
param: { code: 'DormitoryInfo', strWhere: "ParentID='" + ParentId + "' and BuildType='5' and (StudentID is not null and len(StudentID)>0) order by name" },
text: 'name',
value: 'id',
allowSearch: true
});

},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var strEntity = $('body').lrGetFormData();
strEntity.ParentId = ParentId;
var postData = {
strEntity: JSON.stringify(strEntity)
};
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/SaveForm?type=2', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Index.cshtml 파일 보기

@@ -0,0 +1,49 @@
@{
ViewBag.Title = "学生归宿管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout" >
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlg ">树形列表</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlg">列表信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
@*<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>
</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_out" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;学生出宿</a>
<a id="lr_return" 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>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/Index.js")

+ 159
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/Index.js 파일 보기

@@ -0,0 +1,159 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-10 10:06
* 描 述:学生归宿管理
*/
var refreshGirdData;
var ParentId = '';
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetTree',
nodeClick: function (item) {
if (item.title == '4') {
ParentId = item.value;
page.search({ ParentId: item.value });
}
}
});
// 时间搜索框
$('#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();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 学生出宿
$('#lr_out').on('click', function () {
if (!!ParentId) {
learun.layerForm({
id: 'formout',
title: '学生出宿',
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/FormOut?ParentId=' + ParentId,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning('请选择宿舍!');
}
});

// 学生出宿
$('#lr_return').on('click', function () {
if (!!ParentId) {
learun.layerForm({
id: 'formreturn',
title: '学生归宿',
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/FormReturn?ParentId=' + ParentId,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning('请选择宿舍!');
}
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/Form?keyValue=' + keyValue + '&ParentId=' + ParentId,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetPageList',
headData: [
{ label: "床位", name: "Name", width: 100, align: "left" },
{ label: "出宿时间", name: "OutTime", width: 200, align: "left" },
{ label: "归宿时间", name: "ReturnTime", width: 200, align: "left" },
],
mainId: 'Id',
isPage: true,
sidx: 'OutTime desc',
});
},
search: function (param) {
param = param || {};
if (!!ParentId) {
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.cshtml 파일 보기

@@ -0,0 +1,49 @@

@{
ViewBag.Title = "学生归宿统计";
Layout = "~/Views/Shared/_ReportTemplate.cshtml";
}
<style>
.lr-select {
width: 150px;
}
</style>
<div class="lr-layout ui-report">
<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="Dept" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="Major" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="Class" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>

</div>
<div class="lr-layout-tool-right">
<div class="btn-group btn-group-sm">
@*<a id="lr-replace" class="btn btn-default"><i class="fa fa-refresh"></i>&nbsp;<span class="lrlt">刷新</span></a>*@
</div>
</div>
</div>
<div class="lr-layout-grid" style="overflow:auto;">
<div class="grid-title">
<div style="overflow: hidden; padding-bottom: 20px; text-align: center; margin-left: auto; margin-right: auto;">
<div id="main" style="float: left; margin-right: 20px; width: 650px; height: 350px;border: 1px solid #ccc;">
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
</div>
<script src="~/Content/echarts/echarts.js"></script>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.js")

+ 131
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.js 파일 보기

@@ -0,0 +1,131 @@
var bootstrap = function ($, learun) {
"use strict";
var year = "";
var page = {
init: function () {
page.bind();
page.initGrid();
page.initChart();
},
bind: function () {
$('#Dept').lrselect({
width: '150px',
placeholder: "请选择系部",
allowSearch: true,
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetDept',
value: 'Dept',
text: 'DeptName',
select: function (item) {
if (item) {
$('#Major').lrselectRefresh({
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetMajor',
param: { strWhere: "m.deptno='" + item.Dept + "'" }
});
$('#Class').lrselectRefresh({
//url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetClass',
//param: { strWhere: "c.majorno=''" }
});
}
}
});
$('#Major').lrselect({
width: '150px',
placeholder: "请选择专业",
allowSearch: true,
//url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetMajor',
value: 'Major',
text: 'MajorName',
select: function (item) {
if (item) {
$('#Class').lrselectRefresh({
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetClass',
param: { strWhere: "c.majorno='" + item.Major + "'" }
});
}
}
});
$('#Class').lrselect({
width: '150px',
placeholder: "请选择班级",
allowSearch: true,
value: 'Class',
text: 'ClassName'
});

//查询
$('#btn_Search').on('click', function () {
page.search({ Dept: $('#Dept').lrselectGet(), Major: $('#Major').lrselectGet(), Class: $('#Class').lrselectGet() });
});

},
initGrid: function () {
$(".lr-layout-grid").height($(window).height() - 110);
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetReportList',
headData: [
{ name: "name", label: "状态", width: 100, align: "center" },
{ name: "value", label: "人数", width: 150, align: "center" }

]
});
page.search();
},
initChart: function (queryJson) {
var myChart1 = echarts.init(document.getElementById('main'));
//var myChart2 = echarts.init(document.getElementById('main1'));
queryJson = {
Dept: $('#Dept').lrselectGet(),
Major: $('#Major').lrselectGet(),
Class: $('#Class').lrselectGet()
};
//console.log('queryJson', queryJson);
learun.httpAsyncPost(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetReportData', { queryJson: JSON.stringify(queryJson) }, function (res) {
if (res.code == 200) {
var option = {
title: {
text: '学生归宿统计',
x: 'center'
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient: 'vertical',
left: 'left',
data: res.data.list1
},
series: [
{
name: '学生归宿',
type: 'pie',
radius: '55%',
center: ['50%', '60%'],
data: res.data.list2,
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};

myChart1.setOption(option);

}
});

},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
page.initChart(param);
}
};
page.init();
}



+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 파일 보기

@@ -845,6 +845,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookOutController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuCardInfoController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\DormitoryReturnController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -1338,6 +1339,9 @@
<Content Include="Areas\LogisticsManagement\Views\APAppointmentPsychologist\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\CompanyNews\Form.js" />
<Content Include="Areas\LogisticsManagement\Views\CompanyNews\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\IndexReport.js" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\FormReturn.js" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\FormOut.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\FormView.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\Form.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\IndexView.js" />
@@ -6692,6 +6696,10 @@
<Content Include="Areas\EducationalAdministration\Views\StuCardInfo\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\StuCardInfo\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuCardInfo\Form.js" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\Index.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\Form.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />
@@ -7639,6 +7647,9 @@
<Content Include="Areas\LR_OAModule\Views\ResourceFile\FileStatistic.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\FormUse.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\IndexInOut.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\FormOut.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\FormReturn.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\IndexReport.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js 파일 보기

@@ -130,7 +130,7 @@
break;
case "datepicker":
var _dateFmt = $obj.attr('data-dateFmt') || 'yyyy-MM-dd';
$obj.val(learun.formatDate(value, _dateFmt));
$obj.val(learun.formatDate(value, _dateFmt.replace('HH','hh')));
break;
case "lr-Uploader":
$obj.lrUploaderSet(value);


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj 파일 보기

@@ -599,6 +599,7 @@
<Compile Include="EducationalAdministration\TextBookInMap.cs" />
<Compile Include="EducationalAdministration\TextBookOutMap.cs" />
<Compile Include="EducationalAdministration\StuCardInfoMap.cs" />
<Compile Include="LogisticsManagement\Acc_DormitoryReturnMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryReturnMap.cs 파일 보기

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.LogisticsManagement;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-10 10:06
/// 描 述:学生归宿管理
/// </summary>
public class Acc_DormitoryReturnMap : EntityTypeConfiguration<Acc_DormitoryReturnEntity>
{
public Acc_DormitoryReturnMap()
{
#region 表、主键
//表
this.ToTable("ACC_DORMITORYRETURN");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj 파일 보기

@@ -1826,6 +1826,10 @@
<Compile Include="EducationalAdministration\StuCardInfo\StuCardInfoService.cs" />
<Compile Include="EducationalAdministration\StuCardInfo\StuCardInfoBLL.cs" />
<Compile Include="EducationalAdministration\StuCardInfo\StuCardInfoIBLL.cs" />
<Compile Include="LogisticsManagement\DormitoryReturn\Acc_DormitoryReturnEntity.cs" />
<Compile Include="LogisticsManagement\DormitoryReturn\DormitoryReturnService.cs" />
<Compile Include="LogisticsManagement\DormitoryReturn\DormitoryReturnBLL.cs" />
<Compile Include="LogisticsManagement\DormitoryReturn\DormitoryReturnIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs 파일 보기

@@ -177,6 +177,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// </summary>
[Column("CHECKINSTU")]
public int? CheckInStu { get; set; }
/// <summary>
/// 是否归宿
/// </summary>
[Column("ISRETURN")]
public int? IsReturn { get; set; }
#endregion

#region 扩展字段
@@ -215,6 +220,13 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
[NotMapped]
public string bedId { get; set; }

[NotMapped]
public string DeptName { get; set; }
[NotMapped]
public string MajorName { get; set; }
[NotMapped]
public string ClassName { get; set; }
#endregion

#region 扩展操作


+ 64
- 9
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs 파일 보기

@@ -85,7 +85,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
try
{
return accommodationService.GetClassifyList(paginationobj,queryJson);
return accommodationService.GetClassifyList(paginationobj, queryJson);
}
catch (Exception ex)
{
@@ -311,6 +311,61 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

public List<Acc_DormitoryBuildEntity> GetDept()
{
try
{
return accommodationService.GetSelectData("").Select(x => new Acc_DormitoryBuildEntity { Dept = x.Dept, DeptName = x.DeptName }).Distinct().ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public List<Acc_DormitoryBuildEntity> GetMajor(string strWhere)
{
try
{
return accommodationService.GetSelectData(strWhere).Select(x => new Acc_DormitoryBuildEntity { Major = x.Major, MajorName = x.MajorName }).Distinct().ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public List<Acc_DormitoryBuildEntity> GetClass(string strWhere)
{
try
{
return accommodationService.GetSelectData(strWhere).Select(x => new Acc_DormitoryBuildEntity { Class = x.Class, ClassName = x.ClassName }).Distinct().ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取左侧树形数据
/// <summary>
@@ -417,7 +472,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
checkstate = 0,
isexpand = false,
parentId = item.ParentID == null ? "" : item.ParentID,
title =string.IsNullOrEmpty(item.BuildType)?"":(Convert.ToInt32(item.BuildType)+1).ToString() ,
title = string.IsNullOrEmpty(item.BuildType) ? "" : (Convert.ToInt32(item.BuildType) + 1).ToString(),

};

@@ -487,7 +542,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

/// <summary>
/// <summary>
/// 根据父id 获取树形数据
/// </summary>
/// <param name="parentID"></param>
@@ -532,11 +587,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement

}
}
public bool MatchDormitoryInfo(string stuNo,string dormitory,string unit,string floor,string room,string bed ,List<Acc_DormitoryBuildEntity> data)
public bool MatchDormitoryInfo(string stuNo, string dormitory, string unit, string floor, string room, string bed, List<Acc_DormitoryBuildEntity> data)
{
try
{
return accommodationService.MatchDormitoryInfo(stuNo,dormitory,unit,floor,room,bed,data);
return accommodationService.MatchDormitoryInfo(stuNo, dormitory, unit, floor, room, bed, data);

}
catch (Exception ex)
@@ -582,7 +637,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
@@ -636,7 +691,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveBedEntity(string keyValue,string ParentID, Acc_DormitoryBuildEntity entity)
public void SaveBedEntity(string keyValue, string ParentID, Acc_DormitoryBuildEntity entity)
{
try
{
@@ -655,14 +710,14 @@ 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)
public void SaveDeptClass(string keyValue, Acc_DormitoryBuildEntity entity, int type)
{
try
{


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs 파일 보기

@@ -44,6 +44,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// <summary>
/// <returns></returns>
List<Acc_DormitoryBuildEntity> GetList();
List<Acc_DormitoryBuildEntity> GetDept();
List<Acc_DormitoryBuildEntity> GetMajor(string strWhere);
List<Acc_DormitoryBuildEntity> GetClass(string strWhere);
/// <summary>
/// 获取左侧树形数据
/// <summary>


+ 75
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs 파일 보기

@@ -823,6 +823,78 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName
}
}

/// <summary>
/// 获取非空床的系部专业 班级
/// </summary>
/// <returns></returns>
public List<Acc_DormitoryBuildEntity> GetSelectData(string strWhere)
{
try
{
string sql =
@"select distinct dept,d.DeptName,major,m.MajorName,class,c.ClassName from [dbo].[Acc_DormitoryBuild] t
join CdDept d on t.dept=d.deptno
join CdMajor m on t.major=m.majorno
join ClassInfo c on t.class=c.classno
where t.ID in (
select parentid from [dbo].[Acc_DormitoryBuild] where BuildType='5' and (studentid is not null and len(studentid)>0)
)";
if (!string.IsNullOrEmpty(strWhere))
{
sql += " and " + strWhere;
}

return this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryBuildEntity>(sql).ToList();

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取树形数据(学生归宿)
/// </summary>
/// <returns></returns>
public List<Acc_DormitoryBuildEntity> GetSqlTreeForReturn()
{
try
{
List<Acc_DormitoryBuildEntity> list = new List<Acc_DormitoryBuildEntity>();
var roomSql = @"select * from [dbo].[Acc_DormitoryBuild] where ID in (
select parentid from [dbo].[Acc_DormitoryBuild] where BuildType='5' and (studentid is not null and len(studentid)>0)
)";
List<Acc_DormitoryBuildEntity> roomList = this.BaseRepository("CollegeMIS")
.FindList<Acc_DormitoryBuildEntity>(roomSql).ToList();
list = roomList.Union(list).ToList();
var apartIds = roomList.Select(x => x.ApartmentId).Distinct().ToList();
var unitIds = roomList.Select(x => x.UnitId).Distinct().ToList();
var floorIds = roomList.Select(x => x.FloorId).Distinct().ToList();
var otherList = this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryBuildEntity>(x =>
apartIds.Contains(x.ID) || unitIds.Contains(x.ID) || floorIds.Contains(x.ID)).ToList();
list = list.Union(otherList).ToList();
return list.OrderBy(x => x.DNo).OrderBy(x => x.Name).ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 根据父id获取数据
/// </summary>
@@ -1187,6 +1259,9 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName
var bedEntity = new Acc_DormitoryBuildEntity
{
ParentID = roomEntity.ID,
ApartmentId = keyValue,
UnitId = elementEntity.ID,
FloorId = floorEntity.ID,
Name = m.ToString() + "床",
DNo = m.ToString(),
BuildType = "5",


+ 104
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/Acc_DormitoryReturnEntity.cs 파일 보기

@@ -0,0 +1,104 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-10 10:06
/// 描 述:学生归宿管理
/// </summary>
public class Acc_DormitoryReturnEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 宿舍id,关联Acc_DormitoryBuild表
/// </summary>
[Column("DORMITORYBUILDID")]
public string DormitoryBuildId { get; set; }
/// <summary>
/// 床位父级
/// </summary>
[Column("PARENTID")]
public string ParentId { get; set; }

/// <summary>
/// 检查日期
/// </summary>
[Column("CHECKDATE")]
public DateTime? CheckDate { get; set; }
/// <summary>
/// 出宿时间
/// </summary>
[Column("OUTTIME")]
public DateTime? OutTime { get; set; }
/// <summary>
/// 归宿时间
/// </summary>
[Column("RETURNTIME")]
public DateTime? ReturnTime { get; set; }

/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 修改时间
/// </summary>
[Column("UPDATETIME")]
public DateTime? UpdateTime { get; set; }
/// <summary>
/// 修改人
/// </summary>
[Column("UPDATEUSERID")]
public string UpdateUserId { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
this.CreateTime = DateTime.Now;
this.CreateUserId = LoginUserInfo.Get().userId;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
this.UpdateTime = DateTime.Now;
this.UpdateUserId = LoginUserInfo.Get().userId;
}
#endregion
#region 扩展字段
[NotMapped]
public string Name { get; set; }

#endregion
}
}


+ 210
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnBLL.cs 파일 보기

@@ -0,0 +1,210 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-10 10:06
/// 描 述:学生归宿管理
/// </summary>
public class DormitoryReturnBLL : DormitoryReturnIBLL
{
private DormitoryReturnService dormitoryReturnService = new DormitoryReturnService();
private AccommodationService accommodationService = new AccommodationService();

#region 获取数据

/// <summary>
/// 获取左侧树形数据
/// <summary>
/// <returns></returns>
public List<TreeModel> GetTree()
{
try
{
List<Acc_DormitoryBuildEntity> list = accommodationService.GetSqlTreeForReturn();
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 = true,
parentId = item.ParentID == null ? "" : item.ParentID,
title = item.BuildType

};


treeList.Add(node);


}


return treeList.ToTree();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Acc_DormitoryReturnEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return dormitoryReturnService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public IEnumerable<Acc_DormitoryBuildEntity> GetReportList(string queryJson)
{
try
{
return dormitoryReturnService.GetReportList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Acc_DormitoryReturn表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Acc_DormitoryReturnEntity GetAcc_DormitoryReturnEntity(string keyValue)
{
try
{
return dormitoryReturnService.GetAcc_DormitoryReturnEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
dormitoryReturnService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string type, Acc_DormitoryReturnEntity entity)
{
try
{
dormitoryReturnService.SaveEntity(type, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SaveData(string keyValue, Acc_DormitoryReturnEntity entity)
{
try
{
dormitoryReturnService.SaveData(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnIBLL.cs 파일 보기

@@ -0,0 +1,50 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-10 10:06
/// 描 述:学生归宿管理
/// </summary>
public interface DormitoryReturnIBLL
{
#region 获取数据
List<TreeModel> GetTree();
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Acc_DormitoryReturnEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<Acc_DormitoryBuildEntity> GetReportList(string queryJson);
/// <summary>
/// 获取Acc_DormitoryReturn表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Acc_DormitoryReturnEntity GetAcc_DormitoryReturnEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string type, Acc_DormitoryReturnEntity entity);
void SaveData(string keyValue, Acc_DormitoryReturnEntity entity);
#endregion

}
}

+ 273
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnService.cs 파일 보기

@@ -0,0 +1,273 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-10 10:06
/// 描 述:学生归宿管理
/// </summary>
public class DormitoryReturnService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Acc_DormitoryReturnEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.*,a.Name
");
strSql.Append(" FROM Acc_DormitoryReturn t ");
strSql.Append(" join Acc_DormitoryBuild a on t.DormitoryBuildId=a.ID ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.CheckDate >= @startTime AND t.CheckDate <= @endTime ) ");
}
if (!queryParam["OutTime"].IsEmpty())
{
dp.Add("OutTime", queryParam["OutTime"].ToString(), DbType.String);
strSql.Append(" AND t.OutTime = @OutTime ");
}
if (!queryParam["ParentId"].IsEmpty())
{
dp.Add("ParentId", queryParam["ParentId"].ToString(), DbType.String);
strSql.Append(" AND t.ParentId = @ParentId ");
}
return this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryReturnEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取统计数据
/// </summary>
/// <param name="queryJson"></param>
/// <returns></returns>
public IEnumerable<Acc_DormitoryBuildEntity> GetReportList(string queryJson)
{
try
{
string sql = @"select t.isreturn,a.Dept,a.Major,a.class from
(
select parentid,isreturn from [dbo].[Acc_DormitoryBuild] where BuildType='5' and (studentid is not null and len(studentid)>0)
) t
join Acc_DormitoryBuild a on a.ID=t.parentid where 1=1
";
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Dept"].IsEmpty())
{
sql += $" AND a.Dept = '{queryParam["Dept"].ToString()}'";
}
if (!queryParam["Major"].IsEmpty())
{
sql += $" AND a.Major = '{queryParam["Major"].ToString()}'";
}
if (!queryParam["Class"].IsEmpty())
{
sql += $" AND a.Class = '{queryParam["Class"].ToString()}'";
}
return this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryBuildEntity>(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Acc_DormitoryReturn表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Acc_DormitoryReturnEntity GetAcc_DormitoryReturnEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Acc_DormitoryReturnEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<Acc_DormitoryReturnEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string type, Acc_DormitoryReturnEntity entity)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
if (type == "1")
{
//学生出宿
entity.Create();
entity.CheckDate = Convert.ToDateTime(entity.OutTime.Value.Date);
db.Insert(entity);

//修改该床位为未归宿
var sql = $"update Acc_DormitoryBuild set IsReturn=0 where ID='{entity.DormitoryBuildId}'";
db.ExecuteBySql(sql);
}
else
{
//学生归宿
//获取今天最后一次出宿的记录
var outsql =
$"select top 1 * from Acc_DormitoryReturn where DormitoryBuildId='{entity.DormitoryBuildId}' and CheckDate='{DateTime.Now.Date}' order by OutTime desc";
var model = db.FindList<Acc_DormitoryReturnEntity>(outsql).FirstOrDefault();
if (model == null)
{
//新增
entity.Create();
entity.ReturnTime = entity.ReturnTime;
entity.CheckDate = Convert.ToDateTime(entity.ReturnTime.Value.Date);
db.Insert(entity);
}
else
{
//修改
model.ReturnTime = entity.ReturnTime;
model.Remark += " " + entity.Remark;
model.Modify(model.Id);
db.Update(model);
}

//修改该床位为未归宿
var sql = $"update Acc_DormitoryBuild set IsReturn=1 where ID='{entity.DormitoryBuildId}'";
db.ExecuteBySql(sql);
}

db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity"></param>
public void SaveData(string keyValue, Acc_DormitoryReturnEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

불러오는 중...
취소
저장