@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -35,7 +35,17 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 统计 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexStatistics() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
@@ -61,6 +71,27 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListForStatistics(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = acc_PunishmentIBLL.GetPageListForStatistics(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
@@ -69,8 +100,9 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Acc_PunishmentData = acc_PunishmentIBLL.GetAcc_PunishmentEntity( keyValue ); | |||
var jsonData = new { | |||
var Acc_PunishmentData = acc_PunishmentIBLL.GetAcc_PunishmentEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Acc_Punishment = Acc_PunishmentData, | |||
}; | |||
return Success(jsonData); | |||
@@ -102,7 +134,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Acc_PunishmentEntity entity = strEntity.ToObject<Acc_PunishmentEntity>(); | |||
acc_PunishmentIBLL.SaveEntity(keyValue,entity); | |||
acc_PunishmentIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
@@ -37,6 +37,16 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 奖励统计 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexStatistics() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -62,6 +72,26 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListForStatistics(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = acc_RewardIBLL.GetPageListForStatistics(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
@@ -4,28 +4,28 @@ | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Punishment"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="SYear"></div> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="SYear" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Punishment"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Punishment"> | |||
<div class="lr-form-item-title">宿舍楼</div> | |||
<div id="Dormitory"></div> | |||
<div class="lr-form-item-title">宿舍楼<font face="宋体">*</font></div> | |||
<div id="Dormitory" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Punishment"> | |||
<div class="lr-form-item-title">单元</div> | |||
<div id="Unit"></div> | |||
<div class="lr-form-item-title">单元<font face="宋体">*</font></div> | |||
<div id="Unit" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Punishment"> | |||
<div class="lr-form-item-title">楼层</div> | |||
<div id="Floor"></div> | |||
<div class="lr-form-item-title">楼层<font face="宋体">*</font></div> | |||
<div id="Floor" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Punishment"> | |||
<div class="lr-form-item-title">宿舍</div> | |||
<div id="RId"></div> | |||
<div class="lr-form-item-title">宿舍<font face="宋体">*</font></div> | |||
<div id="RId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_Punishment"> | |||
<div class="lr-form-item-title">惩罚</div> | |||
@@ -0,0 +1,71 @@ | |||
@{ | |||
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 class="lr-form-item"> | |||
<div class="lr-form-item-title">统计条件</div> | |||
</div> | |||
</div>*@ | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="SYear"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">宿舍楼</div> | |||
<div id="Dormitory"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">单元</div> | |||
<div id="Unit"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">楼层</div> | |||
<div id="Floor"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">宿舍</div> | |||
<div id="RId"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 统计</a> | |||
</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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_Punishment/IndexStatistics.js") |
@@ -0,0 +1,158 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-08-11 16:46 | |||
* 描 述:宿舍奖励 | |||
*/ | |||
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); | |||
}, 420, 400); | |||
$('#SYear').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#SYear').lrselectSet('1'); | |||
$('#Semester').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#Dormitory').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#Unit').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#Floor').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#RId').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
// 时间搜索框 | |||
$('#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(); | |||
}); | |||
//查询 | |||
$('#btn_Search').on('click', function () { | |||
refreshGirdData(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Acc_Punishment/GetPageListForStatistics', | |||
headData: [ | |||
{ label: "学年", name: "SYear", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ | |||
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: "num", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
var $content = $('body').find('.lr-layout-tool-left'); | |||
param = $content.lrGetFormData(); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -4,28 +4,28 @@ | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Reward"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="SYear"></div> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="SYear" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Reward"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Reward"> | |||
<div class="lr-form-item-title">宿舍楼</div> | |||
<div id="Dormitory"></div> | |||
<div class="lr-form-item-title">宿舍楼<font face="宋体">*</font></div> | |||
<div id="Dormitory" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Reward"> | |||
<div class="lr-form-item-title">单元</div> | |||
<div id="Unit"></div> | |||
<div class="lr-form-item-title">单元<font face="宋体">*</font></div> | |||
<div id="Unit" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Reward"> | |||
<div class="lr-form-item-title">楼层</div> | |||
<div id="Floor"></div> | |||
<div class="lr-form-item-title">楼层<font face="宋体">*</font></div> | |||
<div id="Floor" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_Reward"> | |||
<div class="lr-form-item-title">宿舍</div> | |||
<div id="RId"></div> | |||
<div class="lr-form-item-title">宿舍<font face="宋体">*</font></div> | |||
<div id="RId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_Reward"> | |||
<div class="lr-form-item-title">奖励</div> | |||
@@ -0,0 +1,71 @@ | |||
@{ | |||
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 class="lr-form-item"> | |||
<div class="lr-form-item-title">统计条件</div> | |||
</div> | |||
</div>*@ | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="SYear"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">宿舍楼</div> | |||
<div id="Dormitory"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">单元</div> | |||
<div id="Unit"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">楼层</div> | |||
<div id="Floor"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class="lr-form-item"> | |||
<div class="lr-form-item-title">宿舍</div> | |||
<div id="RId"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 统计</a> | |||
</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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_Reward/IndexStatistics.js") |
@@ -0,0 +1,158 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-08-11 16:46 | |||
* 描 述:宿舍奖励 | |||
*/ | |||
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); | |||
}, 420, 400); | |||
$('#SYear').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#SYear').lrselectSet('1'); | |||
$('#Semester').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#Dormitory').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#Unit').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#Floor').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#RId').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
// 时间搜索框 | |||
$('#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(); | |||
}); | |||
//查询 | |||
$('#btn_Search').on('click', function () { | |||
refreshGirdData(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Acc_Reward/GetPageListForStatistics', | |||
headData: [ | |||
{ label: "学年", name: "SYear", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ | |||
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: "num", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
var $content = $('body').find('.lr-layout-tool-left'); | |||
param = $content.lrGetFormData(); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -1390,6 +1390,8 @@ | |||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexImport.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Acc_Punishment\IndexStatistics.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Acc_Reward\IndexStatistics.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\AttendanceReportByWeek.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\StatisticDetailIndex.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\StatisticIndex.js" /> | |||
@@ -8044,6 +8046,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\IndexForStudent.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\SalaryInfo\IndexPersonal.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Acc_Reward\IndexStatistics.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Acc_Punishment\IndexStatistics.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -38,6 +38,7 @@ namespace Learun.Application.WebApi | |||
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) | |||
{ | |||
base.ApplicationStartup(container, pipelines); | |||
StaticConfiguration.DisableErrorTraces = false; | |||
Nancy.Json.JsonSettings.MaxJsonLength = int.MaxValue; | |||
} | |||
@@ -32,7 +32,6 @@ namespace Learun.Application.WebApi.Modules | |||
return Success(list); | |||
} | |||
/// <summary> | |||
/// 上传附件图片文件 | |||
/// <summary> | |||
@@ -40,14 +39,14 @@ namespace Learun.Application.WebApi.Modules | |||
public Response Upload(dynamic _) | |||
{ | |||
var files = (List<HttpFile>)this.Context.Request.Files; | |||
var folderId = this.GetReqData(); | |||
string folderId = Guid.NewGuid().ToString(); | |||
string filePath = Config.GetValue("AnnexesFile"); | |||
string uploadDate = DateTime.Now.ToString("yyyyMMdd"); | |||
string FileEextension = Path.GetExtension(files[0].Name); | |||
string fileEextension = Path.GetExtension(files[0].Name); | |||
string fileType = fileEextension.Replace(".", ""); | |||
string fileGuid = Guid.NewGuid().ToString(); | |||
string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, FileEextension); | |||
string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, "system", uploadDate, fileGuid, fileEextension); | |||
//创建文件夹 | |||
string path = Path.GetDirectoryName(virtualPath); | |||
@@ -67,17 +66,16 @@ namespace Learun.Application.WebApi.Modules | |||
fileAnnexesEntity.F_FileName = files[0].Name; | |||
fileAnnexesEntity.F_FilePath = virtualPath; | |||
fileAnnexesEntity.F_FileSize = files[0].Value.Length.ToString(); | |||
fileAnnexesEntity.F_FileExtensions = FileEextension; | |||
fileAnnexesEntity.F_FileType = FileEextension.Replace(".", ""); | |||
fileAnnexesEntity.F_CreateUserId = userInfo.userId; | |||
fileAnnexesEntity.F_CreateUserName = userInfo.realName; | |||
fileAnnexesEntity.F_FileExtensions = fileEextension; | |||
fileAnnexesEntity.F_FileType = fileType; | |||
fileAnnexesEntity.F_CreateUserId = "system"; | |||
fileAnnexesEntity.F_CreateUserName = "system"; | |||
annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); | |||
} | |||
return SuccessString(fileGuid); | |||
return SuccessString(folderId); | |||
} | |||
/// <summary> | |||
/// 删除文件 | |||
/// </summary> | |||
@@ -42,6 +42,25 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
} | |||
} | |||
public IEnumerable<Acc_PunishmentEntity> GetPageListForStatistics(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return acc_PunishmentService.GetPageListForStatistics(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Acc_Punishment表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
/// 日 期:2020-08-11 16:48 | |||
/// 描 述:惩罚管理 | |||
/// </summary> | |||
public class Acc_PunishmentEntity | |||
public class Acc_PunishmentEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
@@ -112,6 +112,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
[NotMapped] | |||
public string num { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Acc_PunishmentEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<Acc_PunishmentEntity> GetPageListForStatistics(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Acc_Punishment表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -57,6 +57,74 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
} | |||
} | |||
/// <summary> | |||
/// 奖励统计 | |||
/// </summary> | |||
/// <param name="pagination"></param> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
public IEnumerable<Acc_PunishmentEntity> GetPageListForStatistics(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
var filedSql = ""; | |||
var groupSql = ""; | |||
strSql.Append("SELECT "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["SYear"].IsEmpty() && queryParam["SYear"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " SYear,"; | |||
} | |||
if (!queryParam["Semester"].IsEmpty() && queryParam["Semester"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " Semester,"; | |||
} | |||
if (!queryParam["Dormitory"].IsEmpty() && queryParam["Dormitory"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " Dormitory,"; | |||
} | |||
if (!queryParam["Unit"].IsEmpty() && queryParam["Unit"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " Unit,"; | |||
} | |||
if (!queryParam["Floor"].IsEmpty() && queryParam["Floor"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " Floor,"; | |||
} | |||
if (!queryParam["RId"].IsEmpty() && queryParam["RId"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " RId,"; | |||
} | |||
if (!string.IsNullOrEmpty(filedSql)) | |||
{ | |||
strSql.Append(filedSql); | |||
groupSql = " group by " + filedSql.Substring(0, filedSql.Length - 1); | |||
} | |||
strSql.Append(" count(1) as num FROM Acc_Punishment t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
strSql.Append(groupSql); | |||
return this.BaseRepository("CollegeMIS").FindList<Acc_PunishmentEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Acc_Punishment表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -42,6 +42,30 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Acc_RewardEntity> GetPageListForStatistics(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return acc_RewardService.GetPageListForStatistics(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Acc_Reward表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
/// 日 期:2020-08-11 16:46 | |||
/// 描 述:宿舍奖励 | |||
/// </summary> | |||
public class Acc_RewardEntity | |||
public class Acc_RewardEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
@@ -112,6 +112,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
[NotMapped] | |||
public string num { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Acc_RewardEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<Acc_RewardEntity> GetPageListForStatistics(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Acc_Reward表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -57,6 +57,72 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
} | |||
} | |||
/// <summary> | |||
/// 奖励统计 | |||
/// </summary> | |||
/// <param name="pagination"></param> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
public IEnumerable<Acc_RewardEntity> GetPageListForStatistics(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
var filedSql = ""; | |||
var groupSql = ""; | |||
strSql.Append("SELECT "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["SYear"].IsEmpty()&& queryParam["SYear"].ToString().Trim()=="1") | |||
{ | |||
filedSql += " SYear,"; | |||
} | |||
if (!queryParam["Semester"].IsEmpty() && queryParam["Semester"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " Semester,"; | |||
} | |||
if (!queryParam["Dormitory"].IsEmpty() && queryParam["Dormitory"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " Dormitory,"; | |||
} | |||
if (!queryParam["Unit"].IsEmpty() && queryParam["Unit"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " Unit,"; | |||
} | |||
if (!queryParam["Floor"].IsEmpty() && queryParam["Floor"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " Floor,"; | |||
} | |||
if (!queryParam["RId"].IsEmpty() && queryParam["RId"].ToString().Trim() == "1") | |||
{ | |||
filedSql += " RId,"; | |||
} | |||
if (!string.IsNullOrEmpty(filedSql)) | |||
{ | |||
strSql.Append(filedSql); | |||
groupSql = " group by " + filedSql.Substring(0, filedSql.Length - 1); | |||
} | |||
strSql.Append(" count(1) as num FROM Acc_Reward t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
strSql.Append(groupSql); | |||
return this.BaseRepository("CollegeMIS").FindList<Acc_RewardEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Acc_Reward表实体数据 | |||
/// <param name="keyValue">主键</param> | |||