@@ -0,0 +1,112 @@ | |||||
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-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-08-11 16:55 | |||||
/// 描 述:寝室日常考核管理 | |||||
/// </summary> | |||||
public class Acc_DailyAssessController : MvcControllerBase | |||||
{ | |||||
private Acc_DailyAssessIBLL acc_DailyAssessIBLL = new Acc_DailyAssessBLL(); | |||||
#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="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = acc_DailyAssessIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var Acc_DailyAssessData = acc_DailyAssessIBLL.GetAcc_DailyAssessEntity( keyValue ); | |||||
var jsonData = new { | |||||
Acc_DailyAssess = Acc_DailyAssessData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
acc_DailyAssessIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
Acc_DailyAssessEntity entity = strEntity.ToObject<Acc_DailyAssessEntity>(); | |||||
acc_DailyAssessIBLL.SaveEntity(keyValue,entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,70 @@ | |||||
@{ | |||||
ViewBag.Title = "寝室日常考核管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap"> | |||||
<div id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">宿舍楼</div> | |||||
<div id="Dormitory"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">单元</div> | |||||
<div id="Unit"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">楼层</div> | |||||
<div id="Floor"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">宿舍<font face="宋体">*</font></div> | |||||
<div id="RId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | |||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">学生<font face="宋体">*</font></div> | |||||
<div id="StuNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">日期<font face="宋体">*</font></div> | |||||
<input id="Date" type="text" isvalid="yes" checkexpession="NotNull" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">卫生奖分</div> | |||||
<input id="AddScoreHealth" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">卫生扣分</div> | |||||
<input id="MinusScoreHealth" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">纪律奖分</div> | |||||
<input id="AddScore" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">纪律扣分</div> | |||||
<input id="MinusScore" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">奖扣分原因<font face="宋体">*</font></div> | |||||
<textarea id="Reason" class="form-control" isvalid="yes" checkexpession="NotNull" style="height:100px;"></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="Files"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DailyAssess/Form.js") |
@@ -0,0 +1,147 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-08-11 16:55 | |||||
* 描 述:寝室日常考核管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var selectedRow = learun.frameTab.currentIframe().selectedRow; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#Dormitory').lrDataSourceSelect({ | |||||
code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { | |||||
if (item) { | |||||
$('#Unit').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Unit').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#Floor').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Floor').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#RId').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#RId').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
allowSearch: true | |||||
}); | |||||
$('#DeptNo').lrselect({ | |||||
allowSearch: true, | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#MajorNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
value: "majorno", | |||||
text: "majorname", | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); | |||||
$('#Files').lrUploader(); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/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]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
if (!!selectedRow) { | |||||
$('#form').lrSetFormData(selectedRow); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,70 @@ | |||||
@{ | |||||
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="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">宿舍楼</div> | |||||
<div id="Dormitory"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">单元</div> | |||||
<div id="Unit"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">楼层</div> | |||||
<div id="Floor"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">宿舍</div> | |||||
<div id="RId" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业部</div> | |||||
<div id="DeptNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学生姓名</div> | |||||
<input id="StuName" 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> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_addQuickly" class="btn btn-default"><i class="fa fa-plus"></i> 快速新增</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DailyAssess/Index.js") |
@@ -0,0 +1,340 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-08-11 16:55 | |||||
* 描 述:寝室日常考核管理 | |||||
*/ | |||||
var selectedRow; | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var startTime; | |||||
var endTime; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 300, 400); | |||||
// 时间搜索框 | |||||
$('#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(); | |||||
} | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
$('#Dormitory').lrDataSourceSelect({ | |||||
code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { | |||||
if (item) { | |||||
$('#Unit').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Unit').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#Floor').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Floor').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#RId').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#RId').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
allowSearch: true | |||||
}); | |||||
$('#DeptNo').lrselect({ | |||||
allowSearch: true, | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#MajorNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
value: "majorno", | |||||
text: "majorname", | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
selectedRow = null; | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form', | |||||
width: 800, | |||||
height: 600, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
selectedRow = null; | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 600, | |||||
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_DailyAssess/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 快速新增 | |||||
$('#lr_addQuickly').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
//console.log(selectedRow); | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '快速新增', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form', | |||||
width: 800, | |||||
height: 600, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/GetPageList', | |||||
headData: [ | |||||
{ | |||||
label: "专业部", name: "DeptNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
key: value, | |||||
keyId: 'deptno', | |||||
callback: function (_data) { | |||||
callback(_data['deptname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "班级", name: "ClassNo", 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: "Dormitory", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_DormitoryData', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "单元", name: "Unit", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_UnitData', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "楼层", name: "Floor", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_FloorData', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "寝室号", name: "RId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_RoomData', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "学生姓名", name: "StuNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||||
key: value, | |||||
keyId: 'stuno', | |||||
callback: function (_data) { | |||||
callback(_data['stuname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "日期", name: "Date", width: 130, align: "left" }, | |||||
{ label: "卫生奖分", name: "AddScoreHealth", width: 100, align: "left" }, | |||||
{ label: "卫生扣分", name: "MinusScoreHealth", width: 100, align: "left" }, | |||||
{ label: "纪律奖分", name: "AddScore", width: 100, align: "left" }, | |||||
{ label: "纪律扣分", name: "MinusScore", width: 100, align: "left" }, | |||||
{ label: "奖扣分原因", name: "Reason", width: 200, align: "left" }, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -382,6 +382,7 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\TeachSwitchController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\TeachSwitchController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\EducationalAdministrationAreaRegistration.cs" /> | <Compile Include="Areas\EducationalAdministration\EducationalAdministrationAreaRegistration.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\Acc_PublicAreaHealthController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\Acc_PublicAreaHealthController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\Acc_DailyAssessController.cs" /> | |||||
<Compile Include="Areas\LogisticsManagement\Controllers\Acc_StuDayRoutineController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\Acc_StuDayRoutineController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\APAppointmentPsychologistController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\APAppointmentPsychologistController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\CompanyNewsController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\CompanyNewsController.cs" /> | ||||
@@ -1482,6 +1483,8 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexBed.js" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexBed.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexClassify.js" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexClassify.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexDistribution.js" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexDistribution.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Form.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Index.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Form.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Index.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Index.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_StuDayRoutine\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_StuDayRoutine\Form.js" /> | ||||
@@ -7871,6 +7874,8 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\Acc_StuDayRoutine\Index.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_StuDayRoutine\Index.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Form.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Form.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Index.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Index.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Form.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Index.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -127,6 +127,7 @@ | |||||
<Compile Include="EvaluationTeach\Eval_QuestionMap.cs" /> | <Compile Include="EvaluationTeach\Eval_QuestionMap.cs" /> | ||||
<Compile Include="EvaluationTeach\Eval_QuestionResultMap.cs" /> | <Compile Include="EvaluationTeach\Eval_QuestionResultMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Acc_PublicAreaHealthMap.cs" /> | <Compile Include="LogisticsManagement\Acc_PublicAreaHealthMap.cs" /> | ||||
<Compile Include="LogisticsManagement\Acc_DailyAssessMap.cs" /> | |||||
<Compile Include="LogisticsManagement\Acc_StuDayRoutineMap.cs" /> | <Compile Include="LogisticsManagement\Acc_StuDayRoutineMap.cs" /> | ||||
<Compile Include="LogisticsManagement\ProjectDataManageMap.cs" /> | <Compile Include="LogisticsManagement\ProjectDataManageMap.cs" /> | ||||
<Compile Include="LogisticsManagement\ProjectPhaseManageMap.cs" /> | <Compile Include="LogisticsManagement\ProjectPhaseManageMap.cs" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-08-11 16:55 | |||||
/// 描 述:学生日常规管理 | |||||
/// </summary> | |||||
public class Acc_DailyAssessMap : EntityTypeConfiguration<Acc_DailyAssessEntity> | |||||
{ | |||||
public Acc_DailyAssessMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("ACC_DAILYASSESS"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -373,6 +373,10 @@ | |||||
<Compile Include="LogisticsManagement\Acc_PublicAreaHealth\Acc_PublicAreaHealthEntity.cs" /> | <Compile Include="LogisticsManagement\Acc_PublicAreaHealth\Acc_PublicAreaHealthEntity.cs" /> | ||||
<Compile Include="LogisticsManagement\Acc_PublicAreaHealth\Acc_PublicAreaHealthIBLL.cs" /> | <Compile Include="LogisticsManagement\Acc_PublicAreaHealth\Acc_PublicAreaHealthIBLL.cs" /> | ||||
<Compile Include="LogisticsManagement\Acc_PublicAreaHealth\Acc_PublicAreaHealthService.cs" /> | <Compile Include="LogisticsManagement\Acc_PublicAreaHealth\Acc_PublicAreaHealthService.cs" /> | ||||
<Compile Include="LogisticsManagement\Acc_DailyAssess\Acc_DailyAssessBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Acc_DailyAssess\Acc_DailyAssessEntity.cs" /> | |||||
<Compile Include="LogisticsManagement\Acc_DailyAssess\Acc_DailyAssessIBLL.cs" /> | |||||
<Compile Include="LogisticsManagement\Acc_DailyAssess\Acc_DailyAssessService.cs" /> | |||||
<Compile Include="LogisticsManagement\Acc_StuDayRoutine\Acc_StuDayRoutineBLL.cs" /> | <Compile Include="LogisticsManagement\Acc_StuDayRoutine\Acc_StuDayRoutineBLL.cs" /> | ||||
<Compile Include="LogisticsManagement\Acc_StuDayRoutine\Acc_StuDayRoutineEntity.cs" /> | <Compile Include="LogisticsManagement\Acc_StuDayRoutine\Acc_StuDayRoutineEntity.cs" /> | ||||
<Compile Include="LogisticsManagement\Acc_StuDayRoutine\Acc_StuDayRoutineIBLL.cs" /> | <Compile Include="LogisticsManagement\Acc_StuDayRoutine\Acc_StuDayRoutineIBLL.cs" /> | ||||
@@ -0,0 +1,124 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-08-11 16:55 | |||||
/// 描 述:寝室日常考核管理 | |||||
/// </summary> | |||||
public class Acc_DailyAssessBLL : Acc_DailyAssessIBLL | |||||
{ | |||||
private Acc_DailyAssessService acc_DailyAssessService = new Acc_DailyAssessService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Acc_DailyAssessEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return acc_DailyAssessService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Acc_DailyAssess表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Acc_DailyAssessEntity GetAcc_DailyAssessEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return acc_DailyAssessService.GetAcc_DailyAssessEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
acc_DailyAssessService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Acc_DailyAssessEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
acc_DailyAssessService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,146 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-08-11 16:55 | |||||
/// 描 述:寝室日常考核管理 | |||||
/// </summary> | |||||
public class Acc_DailyAssessEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 编号 | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 宿舍楼 | |||||
/// </summary> | |||||
[Column("DORMITORY")] | |||||
public string Dormitory { get; set; } | |||||
/// <summary> | |||||
/// 单元 | |||||
/// </summary> | |||||
[Column("UNIT")] | |||||
public string Unit { get; set; } | |||||
/// <summary> | |||||
/// 楼层 | |||||
/// </summary> | |||||
[Column("FLOOR")] | |||||
public string Floor { get; set; } | |||||
/// <summary> | |||||
/// 宿舍号 | |||||
/// </summary> | |||||
[Column("RID")] | |||||
public string RId { get; set; } | |||||
/// <summary> | |||||
/// 系 | |||||
/// </summary> | |||||
[Column("DEPTNO")] | |||||
public string DeptNo { get; set; } | |||||
/// <summary> | |||||
/// 专业 | |||||
/// </summary> | |||||
[Column("MAJORNO")] | |||||
public string MajorNo { get; set; } | |||||
/// <summary> | |||||
/// 班级 | |||||
/// </summary> | |||||
[Column("CLASSNO")] | |||||
public string ClassNo { get; set; } | |||||
/// <summary> | |||||
/// 学号 | |||||
/// </summary> | |||||
[Column("STUNO")] | |||||
public string StuNo { get; set; } | |||||
/// <summary> | |||||
/// 日期 | |||||
/// </summary> | |||||
[Column("DATE")] | |||||
public DateTime? Date { get; set; } | |||||
/// <summary> | |||||
/// 卫生奖分 | |||||
/// </summary> | |||||
[Column("ADDSCOREHEALTH")] | |||||
public decimal? AddScoreHealth { get; set; } | |||||
/// <summary> | |||||
/// 卫生扣分 | |||||
/// </summary> | |||||
[Column("MINUSSCOREHEALTH")] | |||||
public decimal? MinusScoreHealth { get; set; } | |||||
/// <summary> | |||||
/// 奖分 | |||||
/// </summary> | |||||
[Column("ADDSCORE")] | |||||
public decimal? AddScore { get; set; } | |||||
/// <summary> | |||||
/// 扣分 | |||||
/// </summary> | |||||
[Column("MINUSSCORE")] | |||||
public decimal? MinusScore { get; set; } | |||||
/// <summary> | |||||
/// 奖扣分原因 | |||||
/// </summary> | |||||
[Column("REASON")] | |||||
public string Reason { get; set; } | |||||
/// <summary> | |||||
/// 创建人 | |||||
/// </summary> | |||||
[Column("CREATEUSERID")] | |||||
public string CreateUserId { get; set; } | |||||
/// <summary> | |||||
/// 创建时间 | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// 编辑人 | |||||
/// </summary> | |||||
[Column("MODIFYUSERID")] | |||||
public string ModifyUserId { get; set; } | |||||
/// <summary> | |||||
/// 编辑时间 | |||||
/// </summary> | |||||
[Column("MODIFYTIME")] | |||||
public DateTime? ModifyTime { get; set; } | |||||
/// <summary> | |||||
/// 附件上传 | |||||
/// </summary> | |||||
[Column("FILES")] | |||||
public string Files { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
this.CreateTime = DateTime.Now; | |||||
UserInfo userInfo = LoginUserInfo.Get(); | |||||
this.CreateUserId = userInfo.userId; | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
this.ModifyTime = DateTime.Now; | |||||
UserInfo userInfo = LoginUserInfo.Get(); | |||||
this.ModifyUserId = userInfo.userId; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,49 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-08-11 16:55 | |||||
/// 描 述:寝室日常考核管理 | |||||
/// </summary> | |||||
public interface Acc_DailyAssessIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Acc_DailyAssessEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Acc_DailyAssess表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
Acc_DailyAssessEntity GetAcc_DailyAssessEntity(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void SaveEntity(string keyValue, Acc_DailyAssessEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,188 @@ | |||||
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-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-08-11 16:55 | |||||
/// 描 述:寝室日常考核管理 | |||||
/// </summary> | |||||
public class Acc_DailyAssessService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Acc_DailyAssessEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM Acc_DailyAssess t "); | |||||
strSql.Append(" left join StuInfoBasic s on t.StuNo=s.StuNo "); | |||||
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.Date >= @startTime AND t.Date <= @endTime ) "); | |||||
} | |||||
if (!queryParam["DeptNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||||
} | |||||
if (!queryParam["MajorNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||||
} | |||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||||
} | |||||
if (!queryParam["Dormitory"].IsEmpty()) | |||||
{ | |||||
dp.Add("Dormitory", queryParam["Dormitory"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Dormitory = @Dormitory "); | |||||
} | |||||
if (!queryParam["Unit"].IsEmpty()) | |||||
{ | |||||
dp.Add("Unit", queryParam["Unit"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Unit = @Unit "); | |||||
} | |||||
if (!queryParam["Floor"].IsEmpty()) | |||||
{ | |||||
dp.Add("Floor", queryParam["Floor"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Floor = @Floor "); | |||||
} | |||||
if (!queryParam["RId"].IsEmpty()) | |||||
{ | |||||
dp.Add("RId", queryParam["RId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.RId = @RId "); | |||||
} | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuName", "%"+queryParam["StuName"].ToString()+"%", DbType.String); | |||||
strSql.Append(" AND s.StuName like @StuName "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Acc_DailyAssessEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Acc_DailyAssess表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Acc_DailyAssessEntity GetAcc_DailyAssessEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Acc_DailyAssessEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").Delete<Acc_DailyAssessEntity>(t=>t.Id == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Acc_DailyAssessEntity 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 | |||||
} | |||||
} |