Bläddra i källkod

学生成绩考核记载功能

临城职教中职
ndbs 2 år sedan
förälder
incheckning
f54f88db00
17 ändrade filer med 1617 tillägg och 0 borttagningar
  1. +164
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs
  2. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.cshtml
  3. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js
  4. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.cshtml
  5. +66
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.js
  6. +42
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.cshtml
  7. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.js
  8. +68
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml
  9. +331
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js
  10. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  11. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScoreCheckInfoMap.cs
  12. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  13. +190
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs
  14. +155
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoEntity.cs
  15. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs
  16. +261
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs
  17. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 164
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs Visa fil

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-09-19 14:37
/// 描 述:学业成绩考核记录表
/// </summary>
public class ScoreCheckInfoController : MvcControllerBase
{
private ScoreCheckInfoIBLL scoreCheckInfoIBLL = new ScoreCheckInfoBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 一键生成表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormGene()
{
return View();
}
/// <summary>
/// 教师评价
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormTeach()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = scoreCheckInfoIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var ScoreCheckInfoData = scoreCheckInfoIBLL.GetScoreCheckInfoEntity(keyValue);
var jsonData = new
{
ScoreCheckInfo = ScoreCheckInfoData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
scoreCheckInfoIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
ScoreCheckInfoEntity entity = strEntity.ToObject<ScoreCheckInfoEntity>();
var model = scoreCheckInfoIBLL.GetStuNoEntity(entity.StuNo, entity.AcademicYearNo, entity.Semester);
if (string.IsNullOrEmpty(keyValue))
{
if (model != null)
{
return Fail("学生编号已存在!");
}
}
else
{
if (model != null && model.ID != keyValue)
{
return Fail("学生编号已存在!");
}
}
scoreCheckInfoIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
[HttpPost]
[AjaxOnly]
public ActionResult SaveGeneForm(string AcademicYearNo, string Semester)
{
int res = scoreCheckInfoIBLL.SaveGeneEntity(AcademicYearNo, Semester);
return Success("本次生成" + res + "条数据!");
}

[HttpPost]
[AjaxOnly]
public ActionResult SubmitFrom(string keyValue)
{
scoreCheckInfoIBLL.SubmitEntity(keyValue);
return Success("提交成功!");
}

#endregion

}
}

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

@@ -0,0 +1,23 @@
@{
ViewBag.Title = "学业成绩考核记录表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div>
<div id="StuNo"></div>
<input id="StuName" type="text" style="display: none;" />
<input id="DeptNo" type="text" style="display: none;" />
<input id="MajorNo" type="text" style="display: none;" />
<input id="ClassNo" type="text" style="display: none;" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js")

+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js Visa fil

@@ -0,0 +1,128 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-09-19 14:37
* 描 述:学业成绩考核记录表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
//学年
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorno' });
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
$('#StuNo').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic',
selectWord: 'stuname',
value: 'stuno',
text: 'stuname',
headData:
[
{ label: "学号", name: "stuno", width: 100, align: "left" },
{ label: "姓名", name: "stuname", width: 100, align: "left" },
{
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: "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: "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']);
}
});
}
}
],
select: function (item) {
$("#StuNo").val(item.stuno);
$("#StuName").val(item.stuname);
$("#MajorNo").val(item.majorno);
$("#DeptNo").val(item.deptno);
$("#ClassNo").val(item.classno);
}
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
console.log(postData,"postData")
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.cshtml Visa fil

@@ -0,0 +1,15 @@
@{
ViewBag.Title = "学业成绩考核记录表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ScoreCheckInfo" >
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ScoreCheckInfo" >
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.js")

+ 66
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.js Visa fil

@@ -0,0 +1,66 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-09-19 14:37
* 描 述:学业成绩考核记录表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
AcademicYearNo: $('#AcademicYearNo').lrselectGet(),
Semester: $('#Semester').lrselectGet(),
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SaveGeneForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 42
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.cshtml Visa fil

@@ -0,0 +1,42 @@
@{
ViewBag.Title = "学业成绩考核记录表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">学号<font face="宋体">*</font></div>
<input id="StuNo" type="text" class="form-control" readonly="readonly"/>
</div>
<div class="col-xs-6 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div>
<input id="StuName" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div>
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">班级<font face="宋体">*</font></div>
<div id="ClassNo" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">操作等级<font face="宋体">*</font></div>
<div id="OperatingLevel" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ScoreCheckInfo">
<div class="lr-form-item-title">班主任评语<font face="宋体">*</font></div>
<textarea id="TeacherDemo" class="form-control" style="height: 100px;"></textarea> </div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.js")

+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.js Visa fil

@@ -0,0 +1,69 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-09-19 14:37
* 描 述:学业成绩考核记录表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorno' });
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
$('#OperatingLevel').lrDataItemSelect({ code: 'OperatingLevel' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 68
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml Visa fil

@@ -0,0 +1,68 @@
@{
ViewBag.Title = "学业成绩考核记录表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></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-6 lr-form-item">
<div class="lr-form-item-title">学号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 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>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_generate" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 一键生成</a>
<a id="lr_Coordinator" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 教师评语</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 提交</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 审核</a>
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 去审核</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js")

+ 331
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js Visa fil

@@ -0,0 +1,331 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-09-19 14:37
* 描 述:学业成绩考核记录表
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 250, 400);
//学年
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学期",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#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_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return;
}
var CheckMark = $('#gridtable').jfGridValue('CheckStatus');
if (CheckMark === "1") {
learun.alert.warning("当前项目已审核不能编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/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)) {
var CheckMark = $('#gridtable').jfGridValue('CheckStatus');
if (CheckMark.indexOf('1') != -1) {
learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
//  审核
$('#lr_lock').on('click', function () {
});
//  去审核
$('#lr_unlock').on('click', function () {
});
//  教师评语
$('#lr_Coordinator').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return;
}
var CheckMark = $('#gridtable').jfGridValue('CheckStatus');
if (CheckMark === "1") {
learun.alert.warning("当前项目已审核不能编辑!");
return;
}
learun.layerForm({
id: 'formTeach',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/FormTeach?keyValue=' + keyValue,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
//  一键生成
$('#lr_generate').on('click', function () {
learun.layerForm({
id: 'form_import',
title: '生成信息',
url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/FormGene',
width: 400,
height: 300,
btn: ['一键生成', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
//  提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckStatus');
if (CheckMark.indexOf('1') != -1) {
learun.alert.warning("选中记录中包含已提交项目,不可重复提交!");
return;
}
learun.layerConfirm('是否确认提交选择项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SubmitFrom', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 60, align: "left" },
{ label: "学期", name: "Semester", width: 50, align: "left" },
{ label: "学号", name: "StuNo", width: 140, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" },
{
label: "专业部", name: "DeptNo", width: 130, 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: 130, 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: 130, 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: "OperatingLevel", width: 60, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'OperatingLevel',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "评语填写人", name: "Signed", 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: "TeacherDemo", width: 200, align: "left" },
{
label: "评价时间", name: "TDate", width: 100, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
{ label: "学校教务部门审核意见", name: "CheckOpinion", width: 200, align: "left" },
{
label: "审核时间", name: "CheckTime", width: 100, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
{
label: "审核状态", name: "CheckStatus", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue == 1) {
return '<span class=\"label label-warning\" >审核中</span>';
} else if (cellvalue == 2) {
return '<span class=\"label label-success\" >审核通过</span>';
} else {
return '<span class=\"label label-default\" >草稿</span>';
}
}
},
],
mainId: 'ID',
isPage: true,
sidx: 'CreateTime desc',
isMultiselect: true,
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Visa fil

@@ -872,6 +872,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\TE_ConsumerGoodsApplyController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TE_MaterialPutInController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TE_MaterialOutboundController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ScoreCheckInfoController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -1131,6 +1132,8 @@
<Content Include="Areas\EducationalAdministration\Views\Scholarship\IndexZxj.js" />
<Content Include="Areas\EducationalAdministration\Views\SchoolNews\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\SchoolNews\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormTeach.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormGene.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\StuAttendanceLeave\IndexInStudent.js" />
@@ -1240,6 +1243,8 @@
<Content Include="Areas\EducationalAdministration\Views\StuGraduateStatistic\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StudentCertificate\FormScore.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\IndexStatistic.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormGene.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\FormTeach.cshtml" />
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" />
@@ -6899,6 +6904,10 @@
<Content Include="Areas\EducationalAdministration\Views\TE_MaterialOutbound\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TE_MaterialOutbound\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TE_MaterialOutbound\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ScoreCheckInfo\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScoreCheckInfoMap.cs Visa fil

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-09-19 14:37
/// 描 述:学业成绩考核记录表
/// </summary>
public class ScoreCheckInfoMap : EntityTypeConfiguration<ScoreCheckInfoEntity>
{
public ScoreCheckInfoMap()
{
#region 表、主键
//表
this.ToTable("SCORECHECKINFO");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


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

@@ -629,6 +629,7 @@
<Compile Include="EducationalAdministration\TE_ConsumerGoodsApplyMap.cs" />
<Compile Include="EducationalAdministration\TE_MaterialPutInMap.cs" />
<Compile Include="EducationalAdministration\TE_MaterialOutboundMap.cs" />
<Compile Include="EducationalAdministration\ScoreCheckInfoMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 190
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs Visa fil

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-09-19 14:37
/// 描 述:学业成绩考核记录表
/// </summary>
public class ScoreCheckInfoBLL : ScoreCheckInfoIBLL
{
private ScoreCheckInfoService scoreCheckInfoService = new ScoreCheckInfoService();

#region 获取数据

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

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


public ScoreCheckInfoEntity GetStuNoEntity(string keyValue, string AcademicYearNo, string Semester)
{
try
{
return scoreCheckInfoService.GetStuNoEntity(keyValue, AcademicYearNo, Semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
scoreCheckInfoService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, ScoreCheckInfoEntity entity)
{
try
{
scoreCheckInfoService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 一键生成
/// </summary>
/// <param name="AcademicYearNo">学年</param>
/// <param name="Semester">学期</param>
public int SaveGeneEntity(string AcademicYearNo, string Semester)
{
try
{
return scoreCheckInfoService.SaveGeneEntity(AcademicYearNo, Semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 提交选中项
/// </summary>
/// <param name="keyValue"></param>
public void SubmitEntity(string keyValue)
{
try
{
scoreCheckInfoService.SubmitEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 155
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoEntity.cs Visa fil

@@ -0,0 +1,155 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-09-19 14:37
/// 描 述:学业成绩考核记录表
/// </summary>
public class ScoreCheckInfoEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 学年
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// StuNo
/// </summary>
[Column("STUNO")]
public string StuNo { get; set; }
/// <summary>
/// StuName
/// </summary>
[Column("STUNAME")]
public string StuName { get; set; }
/// <summary>
/// DeptNo
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// MajorNo
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// ClassNo
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// EmpNo
/// </summary>
[Column("EMPNO")]
public string EmpNo { get; set; }
/// <summary>
/// 班主任评语
/// </summary>
[Column("TEACHERDEMO")]
public string TeacherDemo { get; set; }
/// <summary>
/// 评语日期
/// </summary>
[Column("TDATE")]
public DateTime? TDate { get; set; }
/// <summary>
/// 评语填写人
/// </summary>
[Column("SIGNED")]
public string Signed { get; set; }
/// <summary>
/// 操作等级
/// </summary>
[Column("OPERATINGLEVEL")]
public string OperatingLevel { get; set; }
/// <summary>
/// 意见盖章
/// </summary>
[Column("FILEPATH")]
public string FilePath { get; set; }
/// <summary>
/// 审核意见
/// </summary>
[Column("CHECKOPINION")]
public string CheckOpinion { get; set; }
/// <summary>
/// 审核日期
/// </summary>
[Column("CHECKTIME")]
public DateTime? CheckTime { get; set; }
/// <summary>
/// 审核用户
/// </summary>
[Column("CHECKUSER")]
public string CheckUser { get; set; }
/// <summary>
/// 审核状态
/// </summary>
[Column("CHECKSTATUS")]
public string CheckStatus { get; set; }
/// <summary>
/// CreateUser
/// </summary>
[Column("CREATEUSER")]
public string CreateUser { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// UpdateUser
/// </summary>
[Column("UPDATEUSER")]
public string UpdateUser { get; set; }
/// <summary>
/// UpdateTime
/// </summary>
[Column("UPDATETIME")]
public DateTime? UpdateTime { get; set; }
/// <summary>
/// Demo
/// </summary>
[Column("DEMO")]
public string Demo { get; set; }
#endregion

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


+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs Visa fil

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-09-19 14:37
/// 描 述:学业成绩考核记录表
/// </summary>
public interface ScoreCheckInfoIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ScoreCheckInfoEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取ScoreCheckInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
ScoreCheckInfoEntity GetScoreCheckInfoEntity(string keyValue);
ScoreCheckInfoEntity GetStuNoEntity(string keyValue,string AcademicYearNo,string Semester);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, ScoreCheckInfoEntity entity);
/// <summary>
/// 一键生成
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <returns></returns>
int SaveGeneEntity(string AcademicYearNo, string Semester);
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
void SubmitEntity(string keyValue);

#endregion

}
}

+ 261
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs Visa fil

@@ -0,0 +1,261 @@
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.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-09-19 14:37
/// 描 述:学业成绩考核记录表
/// </summary>
public class ScoreCheckInfoService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ScoreCheckInfoEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM ScoreCheckInfo t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuNo Like @StuNo ");
}
if (!queryParam["StuName"].IsEmpty())
{
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuName Like @StuName ");
}
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 ");
}
return this.BaseRepository("CollegeMIS").FindList<ScoreCheckInfoEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ScoreCheckInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ScoreCheckInfoEntity GetScoreCheckInfoEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ScoreCheckInfoEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
public ScoreCheckInfoEntity GetStuNoEntity(string keyValue, string AcademicYearNo, string Semester)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ScoreCheckInfoEntity>(x => x.StuName == keyValue && x.Semester == Semester && x.AcademicYearNo == AcademicYearNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
//多个删除
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
db.Delete<ScoreCheckInfoEntity>(t => t.ID == item);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, ScoreCheckInfoEntity entity)
{
try
{
var userlogin = LoginUserInfo.Get();
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
entity.UpdateTime = DateTime.Now;
entity.UpdateUser = userlogin.userId;
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
entity.CreateTime = DateTime.Now;
entity.UpdateUser = userlogin.userId;
entity.UpdateTime = DateTime.Now;
entity.UpdateUser = userlogin.userId;
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public int SaveGeneEntity(string AcademicYearNo, string Semester)
{
try
{
var userlogin = LoginUserInfo.Get();
var sql = $" insert into ScoreCheckInfo (ID, AcademicYearNo, Semester, StuNo, StuName, DeptNo, MajorNo,ClassNo,CheckStatus,CreateUser,CreateTime,UpdateUser,UpdateTime) "
+ $" select newid(),'{AcademicYearNo}','{Semester}',stuno,stuname,DeptNo, MajorNo,ClassNo,0,'{userlogin.userId}','{DateTime.Now}','{userlogin.userId}','{DateTime.Now}' from StuinfoBasic "
+ $" where CheckMark =1 and StuNo not in(select StuNo from ScoreCheckInfo where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}') ";
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
public void SubmitEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
//多个提交
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = db.FindEntity<ScoreCheckInfoEntity>(x => x.ID == item);
entity.CheckStatus = "1";
db.Update(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

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

@@ -1942,6 +1942,10 @@
<Compile Include="EducationalAdministration\TE_MaterialOutbound\TE_MaterialOutboundService.cs" />
<Compile Include="EducationalAdministration\TE_MaterialOutbound\TE_MaterialOutboundBLL.cs" />
<Compile Include="EducationalAdministration\TE_MaterialOutbound\TE_MaterialOutboundIBLL.cs" />
<Compile Include="EducationalAdministration\ScoreCheckInfo\ScoreCheckInfoEntity.cs" />
<Compile Include="EducationalAdministration\ScoreCheckInfo\ScoreCheckInfoService.cs" />
<Compile Include="EducationalAdministration\ScoreCheckInfo\ScoreCheckInfoBLL.cs" />
<Compile Include="EducationalAdministration\ScoreCheckInfo\ScoreCheckInfoIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Laddar…
Avbryt
Spara