@@ -0,0 +1,174 @@ | |||
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-12-14 16:36 | |||
/// 描 述:RecruitStuPlan | |||
/// </summary> | |||
public class RecruitStuPlanController : MvcControllerBase | |||
{ | |||
private RecruitStuPlanIBLL recruitStuPlanIBLL = new RecruitStuPlanBLL(); | |||
#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 IndexPlan() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormPlan() | |||
{ | |||
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 = recruitStuPlanIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListPlan(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = recruitStuPlanIBLL.GetPageListPlan(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 RecruitStuPlanData = recruitStuPlanIBLL.GetRecruitStuPlanEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
RecruitStuPlan = RecruitStuPlanData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
recruitStuPlanIBLL.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) | |||
{ | |||
RecruitStuPlanEntity entity = strEntity.ToObject<RecruitStuPlanEntity>(); | |||
recruitStuPlanIBLL.SaveEntity(keyValue, entity); | |||
if (keyValue != null) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用/禁用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Lock(string keyValue, string status) | |||
{ | |||
recruitStuPlanIBLL.DisableEntity(keyValue, status); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "RecruitStuPlan"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">计划年月<font face="宋体">*</font></div> | |||
<div id="PlanYearMonth" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">招生科类<font face="宋体">*</font></div> | |||
<div id="RecruitStuSubject" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">省份<font face="宋体">*</font></div> | |||
<div id="ProvinceNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">教务专业码</div> | |||
<input id="GovMajorNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">教委专业名称</div> | |||
<input id="GovMajorName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">计划招生人数<font face="宋体">*</font></div> | |||
<input id="RecruitNum" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.js") |
@@ -0,0 +1,64 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-12-14 16:36 | |||
* 描 述:RecruitStuPlan | |||
*/ | |||
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 () { | |||
//学年 | |||
$('#PlanYearMonth').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' }); | |||
$('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE',value: 'pcode',text: 'pname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/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]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#RecruitNum').val('0'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('#form').lrGetFormData()) | |||
}; | |||
console.log(postData,"postData") | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,43 @@ | |||
@{ | |||
ViewBag.Title = "RecruitStuPlan"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">计划年月<font face="宋体">*</font></div> | |||
<div id="PlanYearMonth" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">年级<font face="宋体">*</font></div> | |||
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">招生科类<font face="宋体">*</font></div> | |||
<div id="RecruitStuSubject" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">教务专业码</div> | |||
<input id="GovMajorNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">教委专业名称</div> | |||
<input id="GovMajorName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">本专科</div> | |||
<div id="CollegeScience"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RecruitStuPlan"> | |||
<div class="lr-form-item-title">计划招生人数<font face="宋体">*</font></div> | |||
<input id="RecruitNum" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.js") |
@@ -0,0 +1,72 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-12-14 16:36 | |||
* 描 述:RecruitStuPlan | |||
*/ | |||
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 () { | |||
//学年 | |||
$('#PlanYearMonth').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//年级 | |||
$('#Grade').lrselect({ | |||
placeholder: "请选择年级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' }); | |||
$('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE',value: 'pcode',text: 'pname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); | |||
$('#CollegeScience').lrDataItemSelect({ code: 'CollegeType' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/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]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#RecruitNum').val('0'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,50 @@ | |||
@{ | |||
ViewBag.Title = "RecruitStuPlan"; | |||
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-12 lr-form-item"> | |||
<div class="lr-form-item-title">计划年月</div> | |||
<div id="PlanYearMonth"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">招生科类</div> | |||
<div id="RecruitStuSubject"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">省份</div> | |||
<div id="ProvinceNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></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 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> | |||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.js") |
@@ -0,0 +1,213 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-12-14 16:36 | |||
* 描 述:RecruitStuPlan | |||
*/ | |||
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); | |||
}, 220, 400); | |||
//学年 | |||
$('#PlanYearMonth').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' }); | |||
$('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PlanID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark != 0) { | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PlanID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//审核 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PlanID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark != 0) { | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '1' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//去审核 | |||
$('#lr_unlock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PlanID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark != 1) { | |||
learun.alert.warning("选中记录中包含未审核审核项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认去审核该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '0' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/GetPageList', | |||
headData: [ | |||
{ label: "计划年月", name: "PlanYearMonth", width: 100, align: "left", }, | |||
{ | |||
label: "招生科类", name: "RecruitStuSubject", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'MidTermSubject', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "省份编码", name: "ProvinceNo", width: 100, align: "left", }, | |||
{ | |||
label: "省份", name: "ProvinceNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE', | |||
key: value, | |||
keyId: 'pcode', | |||
callback: function (_data) { | |||
callback(_data['pname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "系部编号", name: "DeptNo", width: 100, align: "left", | |||
}, | |||
{ | |||
label: "系部名称", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业编号", name: "MajorNo", width: 100, align: "left", | |||
}, | |||
{ | |||
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: "GovMajorNo", width: 100, align: "left" }, | |||
{ label: "教委专业名称", name: "GovMajorName", width: 100, align: "left" }, | |||
{ label: "计划招生人数", name: "RecruitNum", width: 100, align: "left" }, | |||
{ | |||
label: "状态", name: "CheckMark", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
//return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
return cellvalue == true ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||
} | |||
}, | |||
], | |||
mainId: 'PlanID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,50 @@ | |||
@{ | |||
ViewBag.Title = "RecruitStuPlan"; | |||
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-12 lr-form-item"> | |||
<div class="lr-form-item-title">计划年月</div> | |||
<div id="PlanYearMonth"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">招生科类</div> | |||
<div id="RecruitStuSubject"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">省份</div> | |||
<div id="ProvinceNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></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 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> | |||
@*<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a>*@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.js") |
@@ -0,0 +1,219 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-12-14 16:36 | |||
* 描 述:RecruitStuPlan | |||
*/ | |||
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); | |||
}, 220, 400); | |||
//学年 | |||
$('#PlanYearMonth').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//年级 | |||
$('#Grade').lrselect({ | |||
placeholder: "请选择年级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' }); | |||
$('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/FormPlan', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PlanID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark != 0) { | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/FormPlan?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PlanID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark.indexOf('true') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//审核 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PlanID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark != 0) { | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '1' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//去审核 | |||
$('#lr_unlock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PlanID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark != 1) { | |||
learun.alert.warning("选中记录中包含未审核审核项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认去审核该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '0' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/GetPageListPlan', | |||
headData: [ | |||
{ label: "计划年月", name: "PlanYearMonth", width: 100, align: "left", }, | |||
{ | |||
label: "招生科类", name: "RecruitStuSubject", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'MidTermSubject', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "系部代码", name: "DeptNo", width: 100, align: "left", | |||
}, | |||
{ | |||
label: "系部名称", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业代码", name: "MajorNo", width: 100, align: "left", | |||
}, | |||
{ | |||
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: "CollegeScience", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'CollegeType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "教务专业码", name: "GovMajorNo", width: 100, align: "left" }, | |||
{ label: "教委专业名称", name: "GovMajorName", width: 100, align: "left" }, | |||
{ label: "计划招生人数", name: "RecruitNum", width: 100, align: "left" }, | |||
//{ | |||
// label: "状态", name: "CheckMark", width: 100, align: "left", | |||
// formatter: function (cellvalue) { | |||
// //return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
// return cellvalue == true ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||
// } | |||
//}, | |||
], | |||
mainId: 'PlanID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -847,6 +847,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\WorkStaffController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\TalentsJoinInfoController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\SunshineEducationController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\RecruitStuPlanController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -1063,6 +1064,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\FormPlan.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\IndexPlan.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\ClassReport.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\DeptReport.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\Form.js" /> | |||
@@ -6410,6 +6413,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\TalentsJoinInfo\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -7707,6 +7714,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\IndexSuggest.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\UserForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\FormPlan.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\IndexPlan.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -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-12-14 16:36 | |||
/// 描 述:RecruitStuPlan | |||
/// </summary> | |||
public class RecruitStuPlanMap : EntityTypeConfiguration<RecruitStuPlanEntity> | |||
{ | |||
public RecruitStuPlanMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("RECRUITSTUPLAN"); | |||
//主键 | |||
this.HasKey(t => t.PlanID); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -603,6 +603,7 @@ | |||
<Compile Include="EducationalAdministration\WorkStaffMap.cs" /> | |||
<Compile Include="EducationalAdministration\TalentsJoinInfoMap.cs" /> | |||
<Compile Include="EducationalAdministration\SunshineEducationMap.cs" /> | |||
<Compile Include="EducationalAdministration\RecruitStuPlanMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,170 @@ | |||
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-12-14 16:36 | |||
/// 描 述:RecruitStuPlan | |||
/// </summary> | |||
public class RecruitStuPlanBLL : RecruitStuPlanIBLL | |||
{ | |||
private RecruitStuPlanService recruitStuPlanService = new RecruitStuPlanService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<RecruitStuPlanEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return recruitStuPlanService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取RecruitStuPlan表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public RecruitStuPlanEntity GetRecruitStuPlanEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return recruitStuPlanService.GetRecruitStuPlanEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<RecruitStuPlanEntity> GetPageListPlan(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return recruitStuPlanService.GetPageListPlan(pagination, queryJson); | |||
} | |||
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 | |||
{ | |||
recruitStuPlanService.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, RecruitStuPlanEntity entity) | |||
{ | |||
try | |||
{ | |||
recruitStuPlanService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DisableEntity(string keyValue, string status) | |||
{ | |||
try | |||
{ | |||
recruitStuPlanService.DisableEntity(keyValue,status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,121 @@ | |||
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-12-14 16:36 | |||
/// 描 述:RecruitStuPlan | |||
/// </summary> | |||
public class RecruitStuPlanEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 唯一键 | |||
/// </summary> | |||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] | |||
[Column("PLANID")] | |||
public int? PlanID { get; set; } | |||
/// <summary> | |||
/// PlanYearMonth计划年月 | |||
/// </summary> | |||
[Column("PLANYEARMONTH")] | |||
public string PlanYearMonth { get; set; } | |||
/// <summary> | |||
/// 招生科类(关联表CdRecruitStuSubject) | |||
/// </summary> | |||
[Column("RECRUITSTUSUBJECT")] | |||
public string RecruitStuSubject { get; set; } | |||
/// <summary> | |||
/// 年级 | |||
/// </summary> | |||
[Column("GRADE")] | |||
public string Grade { get; set; } | |||
/// <summary> | |||
/// 专业代码 | |||
/// </summary> | |||
[Column("MAJORNO")] | |||
public string MajorNo { get; set; } | |||
/// <summary> | |||
/// 专业名称 | |||
/// </summary> | |||
[Column("MAJORNAME")] | |||
public string MajorName { get; set; } | |||
/// <summary> | |||
/// 系所代码 | |||
/// </summary> | |||
[Column("DEPTNO")] | |||
public string DeptNo { get; set; } | |||
/// <summary> | |||
/// 系名 | |||
/// </summary> | |||
[Column("DEPTNAME")] | |||
public string DeptName { get; set; } | |||
/// <summary> | |||
/// 教委专业代码 | |||
/// </summary> | |||
[Column("GOVMAJORNO")] | |||
public string GovMajorNo { get; set; } | |||
/// <summary> | |||
/// 教委专业名称 | |||
/// </summary> | |||
[Column("GOVMAJORNAME")] | |||
public string GovMajorName { get; set; } | |||
/// <summary> | |||
/// 省市码 | |||
/// </summary> | |||
[Column("PROVINCENO")] | |||
public string ProvinceNo { get; set; } | |||
/// <summary> | |||
/// 省市简称 | |||
/// </summary> | |||
[Column("PROVINCEBRIEF")] | |||
public string ProvinceBrief { get; set; } | |||
/// <summary> | |||
/// 招生人数 | |||
/// </summary> | |||
[Column("RECRUITNUM")] | |||
public int? RecruitNum { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 审查标志 | |||
/// </summary> | |||
[Column("CHECKMARK")] | |||
public string CheckMark { get; set; } | |||
/// <summary> | |||
/// 本专科 | |||
/// </summary> | |||
[Column("COLLEGESCIENCE")] | |||
public string CollegeScience { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.PlanID = Convert.ToInt32(keyValue); | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,56 @@ | |||
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-12-14 16:36 | |||
/// 描 述:RecruitStuPlan | |||
/// </summary> | |||
public interface RecruitStuPlanIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<RecruitStuPlanEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<RecruitStuPlanEntity> GetPageListPlan(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取RecruitStuPlan表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
RecruitStuPlanEntity GetRecruitStuPlanEntity(string keyValue); | |||
#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, RecruitStuPlanEntity entity); | |||
void DisableEntity(string keyValue, string status); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,271 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
using System.Linq; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-12-14 16:36 | |||
/// 描 述:RecruitStuPlan | |||
/// </summary> | |||
public class RecruitStuPlanService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<RecruitStuPlanEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" t.* "); | |||
strSql.Append(" FROM RecruitStuPlan t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["PlanYearMonth"].IsEmpty()) | |||
{ | |||
dp.Add("PlanYearMonth", queryParam["PlanYearMonth"].ToString(), DbType.String); | |||
strSql.Append(" AND t.PlanYearMonth = @PlanYearMonth "); | |||
} | |||
if (!queryParam["RecruitStuSubject"].IsEmpty()) | |||
{ | |||
dp.Add("RecruitStuSubject", queryParam["RecruitStuSubject"].ToString(), DbType.String); | |||
strSql.Append(" AND t.RecruitStuSubject = @RecruitStuSubject "); | |||
} | |||
if (!queryParam["ProvinceNo"].IsEmpty()) | |||
{ | |||
dp.Add("ProvinceNo", queryParam["ProvinceNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ProvinceNo = @ProvinceNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<RecruitStuPlanEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取RecruitStuPlan表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public RecruitStuPlanEntity GetRecruitStuPlanEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<RecruitStuPlanEntity>(keyValue.ToInt()); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<RecruitStuPlanEntity> GetPageListPlan(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append(@"select PlanYearMonth, RecruitStuSubject, Grade, MajorNo, MajorName, | |||
DeptNo, DeptName, GovMajorNo, GovMajorName,CollegeScience, count(RecruitNum) as RecruitNum from RecruitStuPlan t"); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["PlanYearMonth"].IsEmpty()) | |||
{ | |||
dp.Add("PlanYearMonth", queryParam["PlanYearMonth"].ToString(), DbType.String); | |||
strSql.Append(" AND t.PlanYearMonth = @PlanYearMonth "); | |||
} | |||
if (!queryParam["RecruitStuSubject"].IsEmpty()) | |||
{ | |||
dp.Add("RecruitStuSubject", queryParam["RecruitStuSubject"].ToString(), DbType.String); | |||
strSql.Append(" AND t.RecruitStuSubject = @RecruitStuSubject "); | |||
} | |||
if (!queryParam["ProvinceNo"].IsEmpty()) | |||
{ | |||
dp.Add("ProvinceNo", queryParam["ProvinceNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ProvinceNo = @ProvinceNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
strSql.Append(@"group by PlanYearMonth, RecruitStuSubject, Grade, MajorNo, MajorName, | |||
DeptNo, DeptName, GovMajorNo, GovMajorName,CollegeScience "); | |||
return this.BaseRepository("CollegeMIS").FindList<RecruitStuPlanEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
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) | |||
{ | |||
try | |||
{ | |||
var Id = keyValue.ToInt(); | |||
this.BaseRepository("CollegeMIS").Delete<RecruitStuPlanEntity>(t => t.PlanID == Id); | |||
} | |||
catch (Exception ex) | |||
{ | |||
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, RecruitStuPlanEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
entity.CheckMark = "0"; | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DisableEntity(string keyValue, string status) | |||
{ | |||
var db = BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
List<string> Ids = keyValue.Split(',').ToList(); | |||
List<RecruitStuPlanEntity> AwardandPEntity = new List<RecruitStuPlanEntity>(); | |||
if (status == "1") | |||
{ | |||
foreach (var item in Ids) | |||
{ | |||
var ID = item.ToInt(); | |||
var list = this.BaseRepository("CollegeMIS").FindEntity<RecruitStuPlanEntity>(x => x.PlanID == ID); | |||
if (list != null) | |||
{ | |||
list.CheckMark = status; | |||
AwardandPEntity.Add(list); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
foreach (var item in Ids) | |||
{ | |||
var ID = item.ToInt(); | |||
var list = this.BaseRepository("CollegeMIS").FindEntity<RecruitStuPlanEntity>(x => x.PlanID == ID); | |||
if (list != null) | |||
{ | |||
list.CheckMark = status; | |||
AwardandPEntity.Add(list); | |||
} | |||
} | |||
} | |||
db.Update(AwardandPEntity); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1847,6 +1847,10 @@ | |||
<Compile Include="EducationalAdministration\SunshineEducation\SunshineEducationService.cs" /> | |||
<Compile Include="EducationalAdministration\SunshineEducation\SunshineEducationIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\SunshineEducation\SunshineEducationBLL.cs" /> | |||
<Compile Include="EducationalAdministration\RecruitStuPlan\RecruitStuPlanEntity.cs" /> | |||
<Compile Include="EducationalAdministration\RecruitStuPlan\RecruitStuPlanService.cs" /> | |||
<Compile Include="EducationalAdministration\RecruitStuPlan\RecruitStuPlanBLL.cs" /> | |||
<Compile Include="EducationalAdministration\RecruitStuPlan\RecruitStuPlanIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||