Bläddra i källkod

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

临城职教中职
ndbs 2 år sedan
förälder
incheckning
0b25e3178a
24 ändrade filer med 1189 tillägg och 70 borttagningar
  1. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.cshtml
  2. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.js
  3. +16
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.cshtml
  4. +124
    -32
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js
  5. +36
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.cshtml
  6. +102
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.js
  7. +0
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFSchemeController.cs
  8. +136
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DormitoryRuleController.cs
  9. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.cshtml
  10. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js
  11. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.cshtml
  12. +138
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js
  13. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  14. +3
    -0
      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_DormitoryRuleMap.cs
  17. +7
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorEntity.cs
  18. +9
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorService.cs
  19. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  20. +148
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs
  21. +85
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleEntity.cs
  22. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleIBLL.cs
  23. +172
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleService.cs
  24. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs

+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.cshtml Visa fil

@@ -3,13 +3,13 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="EvaDormitoryInterior">
@*<div class="col-xs-12 lr-form-item" data-table="EvaDormitoryInterior">
<div class="lr-form-item-title">班级</div>
<div id="Class"></div>
</div>
</div>*@
<div class="col-xs-12 lr-form-item" data-table="EvaDormitoryInterior" >
<div class="lr-form-item-title">分数</div>
<input id="Fraction" type="text" class="form-control" />
<input id="Fraction" type="number" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="EvaDormitoryInterior" >
<div class="lr-form-item-title">日期</div>


+ 4
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.js Visa fil

@@ -6,6 +6,7 @@
*/
var acceptClick;
var keyValue = request('keyValue');
var DormitoryBuildId = request('DormitoryBuildId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -37,8 +38,10 @@ var bootstrap = function ($, learun) {
if (!$('body').lrValidform()) {
return false;
}
var strEntity = $('body').lrGetFormData();
strEntity.DormitoryBuildId = DormitoryBuildId;
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
strEntity: JSON.stringify(strEntity)
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调


+ 16
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.cshtml Visa fil

@@ -1,22 +1,24 @@
@{
ViewBag.Title = "宿舍内务日考核";
ViewBag.Title = "学生归宿管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<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 lr-layout-wrap-notitle ">
<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="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="Class" type="text" class="form-control" />
</div>
</div>
</div>
</div>
@*<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>*@
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
@@ -26,6 +28,7 @@
<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>
</div>


+ 124
- 32
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js Visa fil

@@ -1,18 +1,58 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2019-11-20 11:34
* 描 述:宿舍内务日考核
* 日 期:2022-03-10 10:06
* 描 述:学生归宿管理
*/
var refreshGirdData;
var DormitoryBuildId = '';
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') {
DormitoryBuildId = item.value;
page.search({ DormitoryBuildId: 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);
@@ -22,16 +62,20 @@ var bootstrap = function ($, learun) {
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
if (!!DormitoryBuildId) {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form?DormitoryBuildId=' + DormitoryBuildId,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning('请选择宿舍!');
}
});
// 编辑
$('#lr_edit').on('click', function () {
@@ -40,7 +84,7 @@ var bootstrap = function ($, learun) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form?keyValue=' + keyValue,
url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form?keyValue=' + keyValue + '&DormitoryBuildId=' + DormitoryBuildId,
width: 600,
height: 400,
callBack: function (id) {
@@ -62,41 +106,89 @@ var bootstrap = function ($, learun) {
});
}
});
// 学生出宿
$('#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_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,
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').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/GetPageList',
headData: [
{ label: "分数", name: "Fraction", width: 100, align: "left" },
{
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: "Data", width: 130, align: "left",
formatter: function (value, row) {
if (!!value) {
return learun.formatDate(value, 'yyyy-MM-dd');
} else {
return '';
}
}
},
{ label: "分数", name: "Fraction", width: 100, align: "left" },
{ label: "日期", name: "Data", width: 130, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true
mainId: 'Id',
isPage: true,
sidx: 'Data desc',
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });

}
};
refreshGirdData = function () {
page.search();
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 36
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.cshtml Visa fil

@@ -0,0 +1,36 @@
@{
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="Class" type="text" class="form-control" />
</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/EducationalAdministration/Views/EvaDormitoryInterior/Index.js")

+ 102
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.js Visa fil

@@ -0,0 +1,102 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-11-20 11:34
* 描 述:宿舍内务日考核
*/
var refreshGirdData;
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();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form?keyValue=' + keyValue,
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 + '/EducationalAdministration/EvaDormitoryInterior/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/GetPageList',
headData: [
{
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: "Fraction", width: 100, align: "left" },
{ label: "日期", name: "Data", width: 130, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 0
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFSchemeController.cs Visa fil

@@ -251,19 +251,6 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
{
item.imgUrl = null;
}

if (item.F_Id == "3a9e9db8-a928-435b-a9d2-4a4660b4cdeb")
{
item.F_Name = "采购申请(普通)";
item.F_CodeUrl = "/AssetManagementSystem/Ass_AssetsInfoApply/IndexJY";
item.F_Code = "caigoupt";
}
else if (item.F_Id == "307b2c75-174f-424d-84d8-e0f8374ec6d1")
{
item.F_Name = "采购申请(耗材)";
item.F_CodeUrl = "/AssetManagementSystem/Ass_AssetsInfoApply/IndexJYHC";
item.F_Code = "caigouhc";
}
}
return Success(data);
}


+ 136
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DormitoryRuleController.cs Visa fil

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

namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-14 12:05
/// 描 述:宿舍晚归规则
/// </summary>
public class Acc_DormitoryRuleController : MvcControllerBase
{
private Acc_DormitoryRuleIBLL acc_DormitoryRuleIBLL = new Acc_DormitoryRuleBLL();

#region 视图功能

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

#region 获取数据

/// <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 = acc_DormitoryRuleIBLL.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_DormitoryRuleData = acc_DormitoryRuleIBLL.GetAcc_DormitoryRuleEntity(keyValue);
var jsonData = new
{
Acc_DormitoryRule = Acc_DormitoryRuleData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
acc_DormitoryRuleIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Acc_DormitoryRuleEntity entity = strEntity.ToObject<Acc_DormitoryRuleEntity>();
DateTime time;
bool flag = DateTime.TryParse(entity.LateReturnTime, out time);
if (!flag)
{
return Fail("晚归时间格式不正确!");
}

var model = acc_DormitoryRuleIBLL.GetEnableEntity();
if (entity.IsEnable == 1)
{
if (string.IsNullOrEmpty(keyValue) && model != null)
{
return Fail("只能有一个启用的规则!");
}
else if (!string.IsNullOrEmpty(keyValue) && model != null && model.Id != keyValue)
{
return Fail("只能有一个启用的规则!");
}
}
acc_DormitoryRuleIBLL.SaveEntity(keyValue, entity);

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

}
}

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.cshtml Visa fil

@@ -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_DormitoryRule">
<div class="lr-form-item-title">晚归时间<font face="宋体">*</font></div>
<input id="LateReturnTime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:22:00" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryRule" >
<div class="lr-form-item-title">推送人<font face="宋体">*</font></div>
<div id="PushUser" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryRule" >
<div class="lr-form-item-title">推送班主任<font face="宋体">*</font></div>
<div id="ClassDiredctor"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryRule" >
<div class="lr-form-item-title">启用<font face="宋体">*</font></div>
<div id="IsEnable"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js")

+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js Visa fil

@@ -0,0 +1,62 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-14 12:05
* 描 述:宿舍晚归规则
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#PushUser').lrDataSourceSelect({
code: 'teacheruserdata', value: 'f_userid', text: 'f_realname', type: 'multiple'
});

$('#ClassDiredctor').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoInt',
});
$('#IsEnable').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoInt',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/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 postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.cshtml Visa fil

@@ -0,0 +1,27 @@
@{
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>
<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>
<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/Acc_DormitoryRule/Index.js")

+ 138
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js Visa fil

@@ -0,0 +1,138 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-14 12:05
* 描 述:宿舍晚归规则
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/Form?keyValue=' + keyValue,
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/Acc_DormitoryRule/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/GetPageList',
headData: [
{ label: "晚归时间", name: "LateReturnTime", width: 100, align: "left" },
{
label: "推送人", name: "PushUser", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
if (value.indexOf(',') != -1) {
var content = '';
var timearr = value.split(',');
for (var i = 0; i < timearr.length; i++) {
learun.clientdata.getAsync('custmerData',
{
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: timearr[i],
keyId: 'f_userid',
callback: function (_data) {
content += _data['f_realname'];
}
});
}
content = content.substring(0, content.length - 1);
callback(content);
} else {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
}
},
{
label: "推送班主任", name: "ClassDiredctor", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'YesOrNoInt',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "启用", name: "IsEnable", width: 100, align: "left",
formatter: function (cellvalue, rowObject) {
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}

},
],
mainId: 'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Visa fil

@@ -847,6 +847,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookOutController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuCardInfoController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\DormitoryReturnController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\Acc_DormitoryRuleController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -1023,6 +1024,7 @@
<Content Include="Areas\EducationalAdministration\Views\EvaCodeOfContuct\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaDormitoryInterior\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaDormitoryInterior\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaDormitoryInterior\Indexold.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" />
@@ -6701,6 +6703,10 @@
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\Form.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\Form.js" />
<Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Index.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Form.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />
@@ -7116,7 +7122,7 @@
<Content Include="Areas\EducationalAdministration\Views\EvaCodeOfContuct\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EvaCodeOfContuct\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EvaDormitoryInterior\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EvaDormitoryInterior\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EvaDormitoryInterior\Indexold.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.cshtml" />
@@ -7547,6 +7553,7 @@
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\IndexLessonTerm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EvaDormitoryInterior\Index.cshtml" />
<None Include="Areas\EducationalAdministration\Views\SchoolNews\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\StuTuition.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\IsHelpForm.cshtml" />


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js Visa fil

@@ -460,6 +460,9 @@
if (!op.code) {
return $(this);
}
if (!!op.type) {
dfop.type = op.type;
}
var $select = $(this).lrselect(dfop);

learun.clientdata.getAllAsync('sourceData', {


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Visa fil

@@ -600,6 +600,7 @@
<Compile Include="EducationalAdministration\TextBookOutMap.cs" />
<Compile Include="EducationalAdministration\StuCardInfoMap.cs" />
<Compile Include="LogisticsManagement\Acc_DormitoryReturnMap.cs" />
<Compile Include="LogisticsManagement\Acc_DormitoryRuleMap.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_DormitoryRuleMap.cs Visa fil

@@ -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-14 12:05
/// 描 述:宿舍晚归规则
/// </summary>
public class Acc_DormitoryRuleMap : EntityTypeConfiguration<Acc_DormitoryRuleEntity>
{
public Acc_DormitoryRuleMap()
{
#region 表、主键
//表
this.ToTable("ACC_DORMITORYRULE");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 7
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorEntity.cs Visa fil

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 日 期:2019-11-20 11:34
/// 描 述:宿舍内务日考核
/// </summary>
public class EvaDormitoryInteriorEntity
public class EvaDormitoryInteriorEntity
{
#region 实体成员
/// <summary>
@@ -19,6 +19,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("ID")]
public string ID { get; set; }

/// <summary>
/// 宿舍Id
/// </summary>
[Column("DORMITORYBUILDID")]
public string DormitoryBuildId { get; set; }
/// <summary>
/// 班级
/// </summary>


+ 9
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorService.cs Visa fil

@@ -35,7 +35,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
t.Class,
t.Fraction,
t.Data,
t.Remark
t.Remark,
t.DormitoryBuildId
");
strSql.Append(" FROM EvaDormitoryInterior t ");
strSql.Append(" WHERE 1=1 ");
@@ -47,7 +48,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("Class", "%" + queryParam["Class"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Class Like @Class ");
}
return this.BaseRepository("CollegeMIS").FindList<EvaDormitoryInteriorEntity>(strSql.ToString(),dp, pagination);
if (!queryParam["DormitoryBuildId"].IsEmpty())
{
dp.Add("DormitoryBuildId", queryParam["DormitoryBuildId"].ToString(), DbType.String);
strSql.Append(" AND t.DormitoryBuildId = @DormitoryBuildId ");
}
return this.BaseRepository("CollegeMIS").FindList<EvaDormitoryInteriorEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -99,7 +105,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository("CollegeMIS").Delete<EvaDormitoryInteriorEntity>(t=>t.ID == keyValue);
this.BaseRepository("CollegeMIS").Delete<EvaDormitoryInteriorEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Visa fil

@@ -1830,6 +1830,10 @@
<Compile Include="LogisticsManagement\DormitoryReturn\DormitoryReturnService.cs" />
<Compile Include="LogisticsManagement\DormitoryReturn\DormitoryReturnBLL.cs" />
<Compile Include="LogisticsManagement\DormitoryReturn\DormitoryReturnIBLL.cs" />
<Compile Include="LogisticsManagement\Acc_DormitoryRule\Acc_DormitoryRuleEntity.cs" />
<Compile Include="LogisticsManagement\Acc_DormitoryRule\Acc_DormitoryRuleService.cs" />
<Compile Include="LogisticsManagement\Acc_DormitoryRule\Acc_DormitoryRuleBLL.cs" />
<Compile Include="LogisticsManagement\Acc_DormitoryRule\Acc_DormitoryRuleIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 148
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs Visa fil

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

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-14 12:05
/// 描 述:宿舍晚归规则
/// </summary>
public class Acc_DormitoryRuleBLL : Acc_DormitoryRuleIBLL
{
private Acc_DormitoryRuleService acc_DormitoryRuleService = new Acc_DormitoryRuleService();

#region 获取数据

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

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

/// <summary>
/// 获取Acc_DormitoryRule表实体数据
/// </summary>
/// <returns></returns>
public Acc_DormitoryRuleEntity GetEnableEntity()
{
try
{
return acc_DormitoryRuleService.GetEnableEntity();
}
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
{
acc_DormitoryRuleService.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 keyValue, Acc_DormitoryRuleEntity entity)
{
try
{
acc_DormitoryRuleService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 85
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleEntity.cs Visa fil

@@ -0,0 +1,85 @@
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-14 12:05
/// 描 述:宿舍晚归规则
/// </summary>
public class Acc_DormitoryRuleEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 晚归时间
/// </summary>
[Column("LATERETURNTIME")]
public string LateReturnTime { get; set; }
/// <summary>
/// 推送人员
/// </summary>
[Column("PUSHUSER")]
public string PushUser { get; set; }
/// <summary>
/// 是否推送班主任
/// </summary>
[Column("CLASSDIREDCTOR")]
public int? ClassDiredctor { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[Column("ISENABLE")]
public int? IsEnable { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateUserId
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// UpdateTime
/// </summary>
[Column("UPDATETIME")]
public DateTime? UpdateTime { get; set; }
/// <summary>
/// UpdateUserId
/// </summary>
[Column("UPDATEUSERID")]
public string UpdateUserId { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleIBLL.cs Visa fil

@@ -0,0 +1,49 @@
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-14 12:05
/// 描 述:宿舍晚归规则
/// </summary>
public interface Acc_DormitoryRuleIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Acc_DormitoryRuleEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Acc_DormitoryRule表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Acc_DormitoryRuleEntity GetAcc_DormitoryRuleEntity(string keyValue);
Acc_DormitoryRuleEntity GetEnableEntity();
#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 keyValue, Acc_DormitoryRuleEntity entity);
#endregion

}
}

+ 172
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleService.cs Visa fil

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

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Acc_DormitoryRuleEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.LateReturnTime,
t.PushUser,
t.ClassDiredctor,
t.IsEnable
");
strSql.Append(" FROM Acc_DormitoryRule t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryRuleEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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


/// <summary>
/// 获取Acc_DormitoryRule表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Acc_DormitoryRuleEntity GetEnableEntity()
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Acc_DormitoryRuleEntity>(x => x.IsEnable == 1);
}
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_DormitoryRuleEntity>(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 keyValue, Acc_DormitoryRuleEntity 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

}
}

+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs Visa fil

@@ -101,17 +101,17 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName
}
if (!queryParam["Dept"].IsEmpty())
{
dp.Add("Dept", "%" + queryParam["Dept"].ToString() + "%", DbType.String);
dp.Add("Dept", queryParam["Dept"].ToString(), DbType.String);
strSql.Append(" AND t.Dept=@Dept ");
}
if (!queryParam["Class"].IsEmpty())
{
dp.Add("Class", "%" + queryParam["Class"].ToString() + "%", DbType.String);
dp.Add("Class", queryParam["Class"].ToString(), DbType.String);
strSql.Append(" AND t.Class=@Class ");
}
if (!queryParam["Major"].IsEmpty())
{
dp.Add("Major", "%" + queryParam["Major"].ToString() + "%", DbType.String);
dp.Add("Major", queryParam["Major"].ToString(), DbType.String);
strSql.Append(" AND t.Major=@Major ");
}
if (!queryParam["Sex"].IsEmpty())


Laddar…
Avbryt
Spara