@@ -30,6 +30,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
private UserIBLL userIbll = new UserBLL(); | private UserIBLL userIbll = new UserBLL(); | ||||
private WeChatConfigIBLL weChatConfigIbll = new WeChatConfigBLL(); | private WeChatConfigIBLL weChatConfigIbll = new WeChatConfigBLL(); | ||||
private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL(); | private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL(); | ||||
private CdDeptIBLL cdDeptIBLL = new CdDeptBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -83,6 +84,32 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 课时统计打印 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult PrintCourseStatistic(string weeks, string deptNo, string StartTime, string EndTime) | |||||
{ | |||||
Pagination paginationobj = new Pagination() { rows = 100000, page = 1, sidx = "empno ", sord = "asc" }; | |||||
var queryJson = "{\"weeks\":\"" + weeks + "\",\"deptNo\":\"" + deptNo + "\",\"StartTime\":\"" + StartTime + "\",\"EndTime\":\"" + EndTime + "\"}"; | |||||
var data = arrangeLessonTermIBLL.GetcoursestatictisList(paginationobj, queryJson); | |||||
ViewBag.data = data; | |||||
ViewBag.startTime = StartTime; | |||||
ViewBag.endTime = EndTime; | |||||
ViewBag.deptName = ""; | |||||
if (!string.IsNullOrEmpty(deptNo)) | |||||
{ | |||||
var deptEntity = cdDeptIBLL.GetCdDeptEntityByNo(deptNo); | |||||
if (deptEntity != null) | |||||
{ | |||||
ViewBag.deptName = deptEntity.DeptName; | |||||
} | |||||
} | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -0,0 +1,82 @@ | |||||
@using Learun.Application.TwoDevelopment.EducationalAdministration | |||||
@{ | |||||
ViewBag.Title = "打印课时费统计"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<!DOCTYPE html> | |||||
<html lang="en"> | |||||
<head> | |||||
<meta charset="UTF-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |||||
<title>Document</title> | |||||
</head> | |||||
@Html.AppendCssFile("/Areas/EducationalAdministration/Views/ArrangeLessonTerm/PrintCourseStatistic.css") | |||||
<body> | |||||
<div> | |||||
<div class="tableTop"> | |||||
2023年黑龙江艺术职业学院______<span>@ViewBag.deptName</span>______系(部)校内专任教师_____月份课时费报表(@ViewBag.startTime.Substring(0, 10)-@ViewBag.endTime.Substring(0, 10)) | |||||
</div> | |||||
@{ | |||||
var now = DateTime.Now; | |||||
} | |||||
<div class="makeTime">制表时间:@now.Year 年 @now.Month 月 @now.Day 日</div> | |||||
<table border="1"> | |||||
<tr> | |||||
<td><div style="min-width: 36px;">序号</div></td> | |||||
<td><div style="min-width: 44px;">姓名</div></td> | |||||
<td>教师职务</td> | |||||
<td>周任务课时(节)</td> | |||||
<td>月课时(节)</td> | |||||
<td>折算后月课时(节)</td> | |||||
<td>课时费标准(元/节)</td> | |||||
<td>实发课时费(元)</td> | |||||
<td>备注</td> | |||||
</tr> | |||||
@{ | |||||
List<LessonStatictisEntity> dataList = ViewBag.data; | |||||
} | |||||
@foreach (LessonStatictisEntity entity in dataList) | |||||
{ | |||||
<tr> | |||||
<td>@(dataList.IndexOf(entity) + 1)</td> | |||||
<td><div>@entity.empname</div></td> | |||||
<td>@entity.zhiwu</td> | |||||
<td>@entity.weekcourses</td> | |||||
<td>@entity.monthactcourses</td> | |||||
<td>@entity.zhesuan_monthactcourses</td> | |||||
@if (string.IsNullOrEmpty(entity.feestandard)) | |||||
{ | |||||
<td>@entity.feestandard</td> | |||||
} | |||||
else | |||||
{ | |||||
<td>¥@entity.feestandard</td> | |||||
} | |||||
<td>¥@entity.actfeestandard</td> | |||||
<td></td> | |||||
</tr> | |||||
} | |||||
</table> | |||||
<div class="tableBottom"> | |||||
<ul> | |||||
<li>院长:</li> | |||||
<li>主管院长:</li> | |||||
<li>财务处长:</li> | |||||
<li>教务处长:</li> | |||||
<li>系主任:</li> | |||||
</ul> | |||||
</div> | |||||
<div class="btnBox noprint"> | |||||
<button id="print" onclick="printFn()">打印</button> | |||||
</div> | |||||
</div> | |||||
<script> | |||||
function printFn() { | |||||
window.print() | |||||
} | |||||
</script> | |||||
</body> | |||||
</html> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeLessonTerm/PrintCourseStatistic.js") |
@@ -0,0 +1,71 @@ | |||||
@media print { | |||||
.noprint { | |||||
display: none !important; | |||||
} | |||||
} | |||||
body{ | |||||
padding:10px; | |||||
} | |||||
table { | |||||
text-align: center; | |||||
width: 100%; | |||||
font-size: 14px; | |||||
color: #464646; | |||||
background: #fff; | |||||
border: 1px solid #d0d9e8; | |||||
border-spacing: 0px; | |||||
border-collapse: collapse; | |||||
} | |||||
table td, | |||||
table th { | |||||
padding: 14px 6px; | |||||
border: 1px solid #d0d9e8; | |||||
} | |||||
table th { | |||||
color: #000; | |||||
font-weight: normal; | |||||
} | |||||
.btnBox { | |||||
display: flex; | |||||
justify-content: center; | |||||
margin-top: 20px; | |||||
} | |||||
.btnBox #print { | |||||
background-color: #d05051; | |||||
border: none; | |||||
color: #fff; | |||||
width: 80px; | |||||
line-height: 32px; | |||||
letter-spacing: 4px; | |||||
cursor: pointer; | |||||
} | |||||
.tableTop { | |||||
color: #464646; | |||||
font-size: 14px; | |||||
margin-bottom: 6px; | |||||
} | |||||
.makeTime { | |||||
text-align: right; | |||||
color: #666; | |||||
font-size: 14px; | |||||
line-height: 28px; | |||||
} | |||||
.tableBottom ul { | |||||
display: flex; | |||||
flex-wrap: nowrap; | |||||
list-style-type: none; | |||||
padding-left: 0; | |||||
color: #464646; | |||||
font-size: 14px; | |||||
} | |||||
.tableBottom ul li { | |||||
flex: 1; | |||||
} |
@@ -0,0 +1 @@ | |||||
|
@@ -1,5 +1,5 @@ | |||||
@{ | @{ | ||||
ViewBag.Title = "排课"; | |||||
ViewBag.Title = "课时费统计"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<div class="lr-layout"> | <div class="lr-layout"> | ||||
@@ -24,6 +24,9 @@ | |||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-refresh"></i> 打印</a> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -2,7 +2,7 @@ | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | * Copyright (c) 2013-2018 北京泉江科技有限公司 | ||||
* 创建人:超级管理员 | * 创建人:超级管理员 | ||||
* 日 期:2019-02-27 11:05 | * 日 期:2019-02-27 11:05 | ||||
* 描 述:排课 | |||||
* 描 述:课时费统计 | |||||
*/ | */ | ||||
var selectedRow; | var selectedRow; | ||||
var refreshGirdData; | var refreshGirdData; | ||||
@@ -16,69 +16,77 @@ var bootstrap = function ($, learun) { | |||||
page.bind(); | page.bind(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
// 时间搜索框 | |||||
$('#weeks').lrselect({ | $('#weeks').lrselect({ | ||||
placeholder:"请选择本月周数", | |||||
data: [{ text: "1周", value: "1" },{ text: "2周", value: "2" },{ text: "3周", value: "3" }, { text: "4周", value: "4" }], | |||||
text: "text", | |||||
value: "value", | |||||
}) | |||||
var monthdata = [] | |||||
for (var i = 1; i <= 12; i++) { | |||||
monthdata.push({ text: i+"月", value: i }) | |||||
} | |||||
$('#datesearch').lrselect({ | |||||
data: monthdata, | |||||
placeholder: "请选择本月周数", | |||||
data: [{ text: "1周", value: "1" }, { text: "2周", value: "2" }, { text: "3周", value: "3" }, { text: "4周", value: "4" }, { text: "5周", value: "5" }], | |||||
text: "text", | text: "text", | ||||
value: "value", | value: "value", | ||||
}) | }) | ||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | ||||
//$('#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: '3', | |||||
// selectfn: function (begin, end) { | |||||
// startTime = begin; | |||||
// endTime = end; | |||||
// //page.search(); | |||||
// } | |||||
//}); | |||||
$('#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: '0', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
} | |||||
}); | |||||
// 查询 | // 查询 | ||||
$('#btn_Search').on('click', function () { | $('#btn_Search').on('click', function () { | ||||
var month = $('#datesearch').lrselectGet(); | |||||
var weeks = $('#weeks').lrselectGet(); | var weeks = $('#weeks').lrselectGet(); | ||||
if (weeks == null || weeks == "" || weeks == undefined) { | |||||
learun.alert.warning("请选择本月周数!"); | |||||
return false; | |||||
} | |||||
var deptNo = $('#DeptNo').lrselectGet(); | var deptNo = $('#DeptNo').lrselectGet(); | ||||
page.search({ month: month, weeks: weeks, deptNo: deptNo }); | |||||
page.search({ weeks: weeks, deptNo: deptNo }); | |||||
}); | }); | ||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
var weeks = $('#weeks').lrselectGet(); | |||||
if (weeks == null || weeks == "" || weeks == undefined) { | |||||
learun.alert.warning("请选择本月周数!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'PrintCourseStatistic', | |||||
title: '打印', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/PrintCourseStatistic?weeks=' + weeks + '&deptNo=' + $('#DeptNo').lrselectGet() + '&StartTime=' + startTime + '&EndTime=' + endTime, | |||||
width: 1200, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
}); | |||||
}, | }, | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').jfGrid({ | $('#gridtable').jfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetcoursestatictisList', | url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetcoursestatictisList', | ||||
headData: [ | headData: [ | ||||
//{ label: '序号', name: 'ALTId', width: 200, align: "left" }, | //{ label: '序号', name: 'ALTId', width: 200, align: "left" }, | ||||
{ label: '姓名', name: 'empname', width: 200, align: "left" }, | |||||
{ label: '姓名', name: 'empname', width: 100, align: "left" }, | |||||
{ | { | ||||
label: '教师职务', name: 'zhiwu', width: 200, align: "left", | |||||
label: '教师职务', name: 'zhiwu', width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('dataItem', { | learun.clientdata.getAsync('dataItem', { | ||||
key: value, | key: value, | ||||
@@ -90,7 +98,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: '部门', name: 'dept', width: 200, align: "left", | |||||
label: '部门', name: 'dept', width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | ||||
@@ -100,7 +108,8 @@ var bootstrap = function ($, learun) { | |||||
callback(_data['name']); | callback(_data['name']); | ||||
} | } | ||||
}); | }); | ||||
} }, | |||||
} | |||||
}, | |||||
{ label: '周任务课时(节)', name: 'weekcourses', width: 200, align: "left" }, | { label: '周任务课时(节)', name: 'weekcourses', width: 200, align: "left" }, | ||||
{ label: '实际月课时量(节)', name: 'monthactcourses', width: 200, align: "left" }, | { label: '实际月课时量(节)', name: 'monthactcourses', width: 200, align: "left" }, | ||||
{ label: '折算后月课时量(节)', name: 'zhesuan_monthactcourses', width: 200, align: "left" }, | { label: '折算后月课时量(节)', name: 'zhesuan_monthactcourses', width: 200, align: "left" }, | ||||
@@ -108,14 +117,14 @@ var bootstrap = function ($, learun) { | |||||
{ label: '实发课时费(元)', name: 'actfeestandard', width: 200, align: "left" }, | { label: '实发课时费(元)', name: 'actfeestandard', width: 200, align: "left" }, | ||||
], | ], | ||||
mainId: 'ALTId', | mainId: 'ALTId', | ||||
isPage: true | |||||
isPage: true, | |||||
sidx: 'empno' | |||||
}); | }); | ||||
page.search(); | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
//param.StartTime = startTime; | |||||
//param.EndTime = endTime; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -1022,6 +1022,8 @@ | |||||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Index.js" /> | <Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\FormView.js" /> | <Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\FormView.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\coursestatictis.js" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\coursestatictis.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\PrintCourseStatistic.css" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\PrintCourseStatistic.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\FormProvince.js" /> | <Content Include="Areas\EducationalAdministration\Views\CdMajor\FormProvince.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexOfElectiveOnline.js" /> | <Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexOfElectiveOnline.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexProvince.js" /> | <Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexProvince.js" /> | ||||
@@ -8350,6 +8352,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexInStuScoreOfStudent.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexInStuScoreOfStudent.cshtml" /> | ||||
<Content Include="Content\excel\ArrangeLessonTermImport.xls" /> | <Content Include="Content\excel\ArrangeLessonTermImport.xls" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TimeTable\ImportForm.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\TimeTable\ImportForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\PrintCourseStatistic.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" /> | ||||
@@ -2225,13 +2225,11 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
int month = queryParam["month"] == null ? DateTime.Now.Month : queryParam["month"].ToInt(); | |||||
if (month < 1 || month > 12) month = DateTime.Now.Month; | |||||
int weeks = queryParam["weeks"] == null ? 4 : queryParam["weeks"].ToInt(); | int weeks = queryParam["weeks"] == null ? 4 : queryParam["weeks"].ToInt(); | ||||
if (weeks < 1 || weeks > 4) weeks = 4; | if (weeks < 1 || weeks > 4) weeks = 4; | ||||
var deptNo = queryParam["deptNo"] == null ? string.Empty : queryParam["deptNo"].ToString(); | var deptNo = queryParam["deptNo"] == null ? string.Empty : queryParam["deptNo"].ToString(); | ||||
string starttime = DateTime.Now.Year.ToString() + "-" + month + "-1 00:00:00"; | |||||
string endtime = DateTime.Now.Year.ToString() + "-" + month + "-" + DateTime.DaysInMonth(DateTime.Now.Year, month) + " 23:59:59"; | |||||
string starttime = queryParam["StartTime"].IsEmpty() ? DateTime.Now.Date.ToString() : queryParam["StartTime"].ToString(); | |||||
string endtime = queryParam["EndTime"].IsEmpty() ? DateTime.Now.Date.ToString() : queryParam["EndTime"].ToString(); | |||||
strSql.Append("select a.*,b.jobrank as zhiwu,b.F_DepartmentId as dept,b.feestandard,b.Weekcourses,ta.actcourses as monthactcourses,ta.actcourses-(" + weeks + "*b.Weekcourses) as zhesuan_monthactcourses, "); | strSql.Append("select a.*,b.jobrank as zhiwu,b.F_DepartmentId as dept,b.feestandard,b.Weekcourses,ta.actcourses as monthactcourses,ta.actcourses-(" + weeks + "*b.Weekcourses) as zhesuan_monthactcourses, "); | ||||
strSql.Append(" case when b.jobrank in(5,6) then (ta.actcourses-" + weeks + "*b.Weekcourses)*b.feestandard "); | strSql.Append(" case when b.jobrank in(5,6) then (ta.actcourses-" + weeks + "*b.Weekcourses)*b.feestandard "); | ||||
strSql.Append(" when b.jobrank in(1,2,3,4) then (case when ta.actcourses<=(" + weeks + "*b.weekcourses)/2 then ta.actcourses*b.feestandard else " + weeks + "*b.weekcourses*b.feestandard/2 end) "); | strSql.Append(" when b.jobrank in(1,2,3,4) then (case when ta.actcourses<=(" + weeks + "*b.weekcourses)/2 then ta.actcourses*b.feestandard else " + weeks + "*b.weekcourses*b.feestandard/2 end) "); | ||||
@@ -2250,17 +2248,6 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les | |||||
strSql.Append("where a.empno is not null "); | strSql.Append("where a.empno is not null "); | ||||
return this.BaseRepository("CollegeMIS").FindList<LessonStatictisEntity>(strSql.ToString(), pagination); | return this.BaseRepository("CollegeMIS").FindList<LessonStatictisEntity>(strSql.ToString(), pagination); | ||||
//todo:获取当前时间所在月的周数,待使用??? | |||||
DateTime date = new DateTime(2021, 9, 3); // 设置为想要查询的日期 | |||||
int firstDayOfWeekIndex = (int)date.Date.DayOfWeek; // 获取当前日期对应的星期索引(从0开始) | |||||
int daysInMonth = DateTime.DaysInMonth(date.Year, date.Month); // 获取指定月份的天数 | |||||
int weeksCount = Math.DivRem(daysInMonth + firstDayOfWeekIndex - 1, 7, out int remainingDays); // 计算总共的周数及剩余的天数 | |||||
if (remainingDays > 0 && firstDayOfWeekIndex != 6) // 若最后一周不完整或者起始日为星期六则加上一周 | |||||
weeksCount++; | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||