@@ -51,6 +51,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult AnalysisByMonthForStudent() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -77,6 +83,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success(jsonData); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetAnalysisByMonthForStudentPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = yktStateMentIbll.GetAnalysisByMonthForStudentPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetTeacherPageList(string pagination, string queryJson) | |||
@@ -0,0 +1,46 @@ | |||
@{ | |||
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-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> | |||
<div id="Months"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js") |
@@ -0,0 +1,115 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-07-11 14:34 | |||
* 描 述:宿舍调换申请 | |||
*/ | |||
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); | |||
}, 250, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#DeptNo').lrselect({ | |||
value: "deptno", | |||
text: "deptname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||
select: function (item) { | |||
if (item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } | |||
}); | |||
} | |||
else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
$('#ClassNo').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
}); | |||
$('#MajorNo').lrselect({ | |||
value: "majorno", | |||
text: "majorname", | |||
select: function (item) { | |||
if (item) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').on("click", | |||
function () { | |||
var data = $('#DeptNo').lrselectGet(); | |||
if (!data) { | |||
learun.alert.error('请先选择系'); | |||
} | |||
}); | |||
$('#ClassNo').on("click", | |||
function () { | |||
var data1 = $('#DeptNo').lrselectGet(); | |||
var data2 = $('#MajorNo').lrselectGet(); | |||
if (!data1 || !data2) { | |||
learun.alert.error('请先选择系和专业'); | |||
} | |||
}); | |||
$('#ClassNo').lrselect({ | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#Months').lrDataItemSelect({ code: "MonthInt", type:"multiple"}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/YKTStateMent/GetAnalysisByMonthForStudentPageList', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||
{ label: "系部", name: "DeptName", width: 100, align: "left" }, | |||
{ label: "专业", name: "MajorName", width: 100, align: "left" }, | |||
{ label: "班级", name: "ClassName", width: 100, align: "left" }, | |||
{ label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, | |||
{ label: "消费金额", name: "MONEY", width: 100, align: "left", statistics: true }, | |||
{ label: "消费次数", name: "PayTimes", width: 100, align: "left", statistics: true }, | |||
{ label: "平均消费金额", name: "PerMoney", width: 100, align: "left", statistics: true } | |||
], | |||
isPage: true | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartDate = startTime; | |||
param.EndDate = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -990,6 +990,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\FormProvince.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexProvince.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\AnalysisByMonthForStudent.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\ManageIndexTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\IndexForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\IndexForStudent.js" /> | |||
@@ -8058,6 +8059,7 @@ | |||
<Content Include="Areas\LogisticsManagement\Views\Acc_Punishment\IndexStatistics.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\IndexForTeacher.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\ManageIndexTeacher.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\AnalysisByMonthForStudent.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -62,6 +62,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public IEnumerable<YKTStateMentEntity> GetAnalysisByMonthForStudentPageList(Pagination paginationobj, string queryJson) | |||
{ | |||
try | |||
{ | |||
return yKTStateMentService.GetAnalysisByMonthForStudentPageList(paginationobj, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
@@ -56,6 +56,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
public string EmpName { get; set; } | |||
public string DepartmentName { get; set; } | |||
public string PayTimes { get; set; } | |||
public string PerMoney { get; set; } | |||
#endregion | |||
} | |||
@@ -26,7 +26,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
IEnumerable<YKTStateMentEntity> GetTeacherPageList(Pagination pagination, string queryJson); | |||
#endregion | |||
IEnumerable<YKTStateMentEntity> GetAnalysisByMonthForStudentPageList(Pagination paginationobj, string queryJson); | |||
} | |||
} |
@@ -78,6 +78,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 一卡通学生月统计 | |||
/// </summary> | |||
/// <param name="pagination"></param> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
public IEnumerable<YKTStateMentEntity> GetAnalysisByMonthForStudentPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var queryParam = queryJson.ToJObject(); | |||
var strSql = new StringBuilder(); | |||
strSql.Append( | |||
@"SELECT C.StuNo,C.StuName,d.DeptName,f.MajorName,e.ClassName,c.identityno as IdentityCardNo, sum(round(A.OPFARE/100,2)) AS MONEY,count(stuno) as PayTimes,round(sum(round(A.OPFARE/100,2))/count(stuno),2) as PerMoney | |||
FROM M_REC_CONSUME@ykt A LEFT JOIN M_BASE_TERM@ykt B ON A.TERMID = B.TERMID | |||
left join ds_stuinfo C on A.OUTID = C.mobile | |||
left join ds_dept d on c.deptno = d.deptno | |||
left join ds_classinfo e on c.classno = e.classno | |||
left join ds_major f on c.majorno=f.majorno | |||
where 1=1 and stuno is not null "); | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
strSql.Append($" AND C.DeptNo='{queryParam["DeptNo"].ToString()}' "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
strSql.Append($" AND C.MajorNo='{queryParam["MajorNo"].ToString()}' "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
strSql.Append($" AND C.ClassNo ='{queryParam["ClassNo"].ToString()}' "); | |||
} | |||
if (!queryParam["Months"].IsEmpty()) | |||
{ | |||
strSql.Append(" and extract(month from A.OPDT) in("+ queryParam["Months"].ToString() + ")"); | |||
} | |||
strSql.Append("group by C.StuNo, C.StuName,d.DeptNo, d.DeptName, f.MajorName,f.MajorNo, e.ClassNo,e.ClassName, c.identityno"); | |||
return BaseRepository("TLMZYMIDDLEString").FindList<YKTStateMentEntity>(strSql.ToString(), pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<YKTStateMentEntity> GetTeacherPageList(Pagination pagination, string queryJson) | |||
{ | |||
@@ -127,6 +178,56 @@ B.TERMNAME,c.EmpNo,c.EmpName,d.Name as DepartmentName,c.identityno as IdentityCa | |||
} | |||
} | |||
/// <summary> | |||
/// 一卡通教师月统计 | |||
/// </summary> | |||
/// <param name="pagination"></param> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
public IEnumerable<YKTStateMentEntity> GetAnalysisByMonthForTeacherPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var queryParam = queryJson.ToJObject(); | |||
var strSql = new StringBuilder(); | |||
strSql.Append( | |||
@"SELECT c.EmpNo,c.EmpName,d.Name as DepartmentName,c.identityno as IdentityCardNo, sum(round(A.OPFARE/100,2)) AS MONEY,count(EmpNo) as PayTimes,round(sum(round(A.OPFARE/100,2))/count(EmpNo),2) as PerMoney | |||
FROM M_REC_CONSUME@ykt A LEFT JOIN M_BASE_TERM@ykt B ON A.TERMID = B.TERMID | |||
left join ds_empinfo C on A.OUTID = C.mobile | |||
left join ds_department d on c.departmentid=d.id | |||
where 1=1 and EmpNo is not null "); | |||
if (!queryParam["EmpNo"].IsEmpty()) | |||
{ | |||
strSql.Append($" AND C.EmpNo like '%{queryParam["EmpNo"].ToString()}%' "); | |||
} | |||
if (!queryParam["EmpName"].IsEmpty()) | |||
{ | |||
strSql.Append($" AND C.EmpName like '%{queryParam["EmpName"].ToString()}%' "); | |||
} | |||
if (!queryParam["DepartmentId"].IsEmpty()) | |||
{ | |||
strSql.Append($" AND C.DepartmentId='{queryParam["DepartmentId"].ToString()}' "); | |||
} | |||
if (!queryParam["Months"].IsEmpty()) | |||
{ | |||
strSql.Append(" and extract(month from A.OPDT) in(" + queryParam["Months"].ToString() + ")"); | |||
} | |||
strSql.Append("group by c.EmpNo,c.EmpName,d.DepartmentId,d.Name,c.identityno"); | |||
return BaseRepository("TLMZYMIDDLEString").FindList<YKTStateMentEntity>(strSql.ToString(), pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||