@@ -0,0 +1,117 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-02-14 11:09 | |||
/// 描 述:学生报名(官网) | |||
/// </summary> | |||
public class StuEnrollOfficialController : MvcControllerBase | |||
{ | |||
private StuEnrollOfficialIBLL stuEnrollOfficialIBLL = new StuEnrollOfficialBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
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 = stuEnrollOfficialIBLL.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 StuEnrollOfficialData = stuEnrollOfficialIBLL.GetStuEnrollOfficialEntity( keyValue ); | |||
var jsonData = new { | |||
StuEnrollOfficial = StuEnrollOfficialData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
stuEnrollOfficialIBLL.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) | |||
{ | |||
StuEnrollOfficialEntity entity = strEntity.ToObject<StuEnrollOfficialEntity>(); | |||
stuEnrollOfficialIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,71 @@ | |||
@{ | |||
ViewBag.Title = "学生报名(官网)"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Gender"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">民族<font face="宋体">*</font></div> | |||
<div id="Nationals" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">出生日期</div> | |||
<input id="Birthday" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Birthday').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">高考报名省份<font face="宋体">*</font></div> | |||
<div id="Province" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">报考专业(一)<font face="宋体">*</font></div> | |||
<div id="MajorNo1" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">报考专业(二)<font face="宋体">*</font></div> | |||
<div id="MajorNo2" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">报考专业(三)<font face="宋体">*</font></div> | |||
<div id="MajorNo3" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">报考专业(四)<font face="宋体">*</font></div> | |||
<div id="MajorNo4" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">报考专业(五)<font face="宋体">*</font></div> | |||
<div id="MajorNo5" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">考生类别<font face="宋体">*</font></div> | |||
<div id="StuType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">毕业学校</div> | |||
<input id="FromSchool" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">户籍所在省市区<font face="宋体">*</font></div> | |||
<div id="HomeProvince" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">市<font face="宋体">*</font></div> | |||
<div id="HomeCity" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">区<font face="宋体">*</font></div> | |||
<div id="HomeCounty" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuEnrollOfficial" > | |||
<div class="lr-form-item-title">是否服从调剂</div> | |||
<div id="IsAdjust"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnrollOfficial/Form.js") |
@@ -0,0 +1,69 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-02-14 11:09 | |||
* 描 述:学生报名(官网) | |||
*/ | |||
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 () { | |||
$('#Gender').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'usersexbit', | |||
}); | |||
$('#Nationals').lrDataItemSelect({ code: 'National' }); | |||
$('#Province').lrDataSourceSelect({ code: 'DIC_PROVINCE',value: 'pcode',text: 'pname' }); | |||
$('#MajorNo1').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||
$('#MajorNo2').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||
$('#MajorNo3').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||
$('#MajorNo4').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||
$('#MajorNo5').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||
$('#StuType').lrDataItemSelect({ code: 'ExamineeType_tlm' }); | |||
$('#HomeProvince').lrDataSourceSelect({ code: 'DIC_PROVINCE',value: 'pcode',text: 'pname' }); | |||
$('#HomeCity').lrDataSourceSelect({ code: 'DIC_CITY',value: 'ccode',text: 'cname' }); | |||
$('#HomeCounty').lrDataSourceSelect({ code: 'DIC_AREA',value: 'acode',text: 'aname' }); | |||
$('#IsAdjust').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/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/StuEnrollOfficial/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,80 @@ | |||
@{ | |||
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> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Gender"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">民族</div> | |||
<div id="Nationals"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">出生日期</div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">高考报名省份</div> | |||
<div id="Province"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">报考专业(一)</div> | |||
<div id="MajorNo1"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考生类别</div> | |||
<div id="StuType"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">毕业学校</div> | |||
<input id="FromSchool" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">户籍所在省市区</div> | |||
<div id="HomeProvince"></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">市</div> | |||
<div id="HomeCity"></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item"> | |||
<div class="lr-form-item-title">区</div> | |||
<div id="HomeCounty"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">是否服从调剂</div> | |||
<div id="IsAdjust"></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_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuEnrollOfficial/Index.js") |
@@ -0,0 +1,308 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-02-14 11:09 | |||
* 描 述:学生报名(官网) | |||
*/ | |||
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); | |||
$('#Gender').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'usersex', | |||
}); | |||
$('#Nationals').lrDataItemSelect({ code: 'National' }); | |||
$('#Province').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' }); | |||
$('#MajorNo1').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#StuType').lrDataItemSelect({ code: 'ExamineeType_tlm' }); | |||
$('#HomeProvince').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' }); | |||
$('#HomeCity').lrDataSourceSelect({ code: 'DIC_CITY', value: 'ccode', text: 'cname' }); | |||
$('#HomeCounty').lrDataSourceSelect({ code: 'DIC_AREA', value: 'acode', text: 'aname' }); | |||
$('#IsAdjust').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/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)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/GetPageList', | |||
headData: [ | |||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Gender", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'usersex', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "民族", name: "Nationals", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'National', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "出生日期", name: "Birthday", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
return learun.formatDate(value, 'yyyy-MM-dd'); | |||
} | |||
}, | |||
{ | |||
label: "政治面貌", name: "Political", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'PolityStatus', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "身份证号码", name: "IDCard", width: 100, align: "left" }, | |||
{ | |||
label: "考生科类", name: "SubjectType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'StuSubjectType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "考生类别", name: "StuType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'ExamineeType_tlm', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "毕业类别", name: "GraduateType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'StuGraduateType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "应试外语语种", name: "English", width: 100, align: "left" }, | |||
{ label: "毕业学校", name: "FromSchool", width: 100, align: "left" }, | |||
{ | |||
label: "高考报名省份", name: "Province", 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: "MajorNo1", 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: "MajorNo2", 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: "MajorNo3", 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: "MajorNo4", 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: "MajorNo5", 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: "HomeProvince", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
var str = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE', | |||
key: value, | |||
keyId: 'pcode', | |||
callback: function (_data) { | |||
str += _data['pname']; | |||
} | |||
}); | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||
key: row.HomeCity, | |||
keyId: 'ccode', | |||
callback: function (_data) { | |||
str += _data['cname']; | |||
} | |||
}); | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA', | |||
key: row.HomeCounty, | |||
keyId: 'acode', | |||
callback: function (_data) { | |||
str += _data['aname']; | |||
} | |||
}); | |||
return str; | |||
} | |||
}, | |||
{ | |||
label: "是否服从调剂", name: "IsAdjust", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'YesOrNoInt', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -850,6 +850,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\OLPElectiveStuSelectCountController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuSubsidizeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuSubsidizeTypeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuEnrollOfficialController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6646,6 +6647,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuSubsidizeType\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSubsidizeType\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSubsidizeType\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollOfficial\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollOfficial\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollOfficial\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollOfficial\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -192,6 +192,8 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Compile Include="Bootstraper.cs" /> | |||
<Compile Include="Modules\StuEnrollOfficialApi.cs" /> | |||
<Compile Include="Modules\AnnexesNoLoginApi.cs" /> | |||
<Compile Include="Modules\AssetManagementSystem\Ass_AssetsInfoItemApi.cs" /> | |||
<Compile Include="Modules\AttendanceApi.cs" /> | |||
<Compile Include="Modules\EnrollTemplateApi.cs" /> | |||
@@ -0,0 +1,117 @@ | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Util; | |||
using Nancy; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.IO; | |||
namespace Learun.Application.WebApi.Modules | |||
{ | |||
public class AnnexesNoLoginApi : BaseNoLoginApi | |||
{ | |||
public AnnexesNoLoginApi() | |||
: base("/learun/nologin/adms/annexes") | |||
{ | |||
Get["/list"] = GetList; | |||
Get["/down"] = DownAnnexesFile; | |||
Post["/upload"] = Upload; | |||
Post["/delete"] = DeleteFile; | |||
} | |||
private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | |||
/// <summary> | |||
/// 获取附件列表 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetList(dynamic _) | |||
{ | |||
var keyValue = this.GetReqData(); | |||
var list = annexesFileIBLL.GetList(keyValue); | |||
return Success(list); | |||
} | |||
/// <summary> | |||
/// 上传附件图片文件 | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response Upload(dynamic _) | |||
{ | |||
var files = (List<HttpFile>)this.Context.Request.Files; | |||
var folderId = this.GetReqData(); | |||
string filePath = Config.GetValue("AnnexesFile"); | |||
string uploadDate = DateTime.Now.ToString("yyyyMMdd"); | |||
string FileEextension = Path.GetExtension(files[0].Name); | |||
string fileGuid = Guid.NewGuid().ToString(); | |||
string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, FileEextension); | |||
//创建文件夹 | |||
string path = Path.GetDirectoryName(virtualPath); | |||
Directory.CreateDirectory(path); | |||
AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); | |||
if (!System.IO.File.Exists(virtualPath)) | |||
{ | |||
byte[] bytes = new byte[files[0].Value.Length]; | |||
files[0].Value.Read(bytes, 0, bytes.Length); | |||
FileInfo file = new FileInfo(virtualPath); | |||
FileStream fs = file.Create(); | |||
fs.Write(bytes, 0, bytes.Length); | |||
fs.Close(); | |||
//文件信息写入数据库 | |||
fileAnnexesEntity.F_Id = fileGuid; | |||
fileAnnexesEntity.F_FileName = files[0].Name; | |||
fileAnnexesEntity.F_FilePath = virtualPath; | |||
fileAnnexesEntity.F_FileSize = files[0].Value.Length.ToString(); | |||
fileAnnexesEntity.F_FileExtensions = FileEextension; | |||
fileAnnexesEntity.F_FileType = FileEextension.Replace(".", ""); | |||
fileAnnexesEntity.F_CreateUserId = userInfo.userId; | |||
fileAnnexesEntity.F_CreateUserName = userInfo.realName; | |||
annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); | |||
} | |||
return SuccessString(fileGuid); | |||
} | |||
/// <summary> | |||
/// 删除文件 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response DeleteFile(dynamic _) | |||
{ | |||
var fileId = this.GetReqData(); | |||
AnnexesFileEntity fileInfoEntity = annexesFileIBLL.GetEntity(fileId); | |||
annexesFileIBLL.DeleteEntity(fileId); | |||
//删除文件 | |||
if (System.IO.File.Exists(fileInfoEntity.F_FilePath)) | |||
{ | |||
System.IO.File.Delete(fileInfoEntity.F_FilePath); | |||
} | |||
return Success("删除成功"); | |||
} | |||
/// <summary> | |||
/// 下载文件 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response DownAnnexesFile(dynamic _) { | |||
string name = this.GetReqData(); | |||
string fileId = name.Split('.')[0]; | |||
var data = annexesFileIBLL.GetEntity(fileId); | |||
string filepath = data.F_FilePath; | |||
if (FileDownHelper.FileExists(filepath)) | |||
{ | |||
FileDownHelper.DownLoadnew(filepath); | |||
} | |||
return Success(""); | |||
} | |||
} | |||
} |
@@ -21,6 +21,7 @@ namespace Learun.Application.WebApi.Modules | |||
{ | |||
Get["/map"] = GetDataTable;// 获取数据表数据 | |||
Get["/datas"] = GetDataList;// 获取数据表数据 | |||
Get["/datasByWhere"] = GetDataListByWhere;// 获取数据表数据(带条件) | |||
Get["/details"] = GetDetailList;// 获取数据字典详细列表 | |||
Get["/itemmap"] = GetMap;// 获取映射数据 | |||
@@ -64,6 +65,17 @@ namespace Learun.Application.WebApi.Modules | |||
var data = dataSourceIBLL.GetDataTable(req, ""); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取数据表数据(带条件) | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
private Response GetDataListByWhere(dynamic _) | |||
{ | |||
reqModel req = this.GetReqData<reqModel>(); | |||
var data = dataSourceIBLL.GetDataTable(req.code, req.strWhere); | |||
return Success(data); | |||
} | |||
@@ -114,6 +126,10 @@ namespace Learun.Application.WebApi.Modules | |||
/// 版本 | |||
/// </summary> | |||
public string ver { get; set; } | |||
/// <summary> | |||
/// 条件 | |||
/// </summary> | |||
public string strWhere { get; set; } | |||
} | |||
} | |||
} |
@@ -0,0 +1,50 @@ | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Util; | |||
using Nancy; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.IO; | |||
namespace Learun.Application.WebApi.Modules | |||
{ | |||
/// <summary> | |||
/// 塔里木官网学生报名 | |||
/// </summary> | |||
public class StuEnrollOfficialApi : BaseNoLoginApi | |||
{ | |||
public StuEnrollOfficialApi() | |||
: base("/learun/nologin/adms/stuenrollofficial") | |||
{ | |||
Post["/save"] = SaveForm; | |||
} | |||
private StuEnrollOfficialIBLL stuEnrollOfficialIBLL = new StuEnrollOfficialBLL(); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response SaveForm(dynamic _) | |||
{ | |||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||
StuEnrollOfficialEntity entity = parameter.strEntity.ToObject<StuEnrollOfficialEntity>(); | |||
stuEnrollOfficialIBLL.SaveEntity(parameter.keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#region 私有类 | |||
/// <summary> | |||
/// 表单实体类 | |||
/// <summary> | |||
private class ReqFormEntity | |||
{ | |||
public string keyValue { get; set; } | |||
public string strEntity { get; set; } | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-02-14 11:09 | |||
/// 描 述:学生报名(官网) | |||
/// </summary> | |||
public class StuEnrollOfficialMap : EntityTypeConfiguration<StuEnrollOfficialEntity> | |||
{ | |||
public StuEnrollOfficialMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("STUENROLLOFFICIAL"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -604,6 +604,7 @@ | |||
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCountMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuSubsidizeMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuSubsidizeTypeMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuEnrollOfficialMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,125 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-02-14 11:09 | |||
/// 描 述:学生报名(官网) | |||
/// </summary> | |||
public class StuEnrollOfficialBLL : StuEnrollOfficialIBLL | |||
{ | |||
private StuEnrollOfficialService stuEnrollOfficialService = new StuEnrollOfficialService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<StuEnrollOfficialEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return stuEnrollOfficialService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuEnrollOfficial表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public StuEnrollOfficialEntity GetStuEnrollOfficialEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return stuEnrollOfficialService.GetStuEnrollOfficialEntity(keyValue); | |||
} | |||
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 | |||
{ | |||
stuEnrollOfficialService.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, StuEnrollOfficialEntity entity) | |||
{ | |||
try | |||
{ | |||
stuEnrollOfficialService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,224 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-02-14 11:09 | |||
/// 描 述:学生报名(官网) | |||
/// </summary> | |||
public class StuEnrollOfficialEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 姓名 | |||
/// </summary> | |||
[Column("STUNAME")] | |||
public string StuName { get; set; } | |||
/// <summary> | |||
/// 性别 | |||
/// </summary> | |||
[Column("GENDER")] | |||
public bool? Gender { get; set; } | |||
/// <summary> | |||
/// 民族 | |||
/// </summary> | |||
[Column("NATIONALS")] | |||
public string Nationals { get; set; } | |||
/// <summary> | |||
/// 出生年月 | |||
/// </summary> | |||
[Column("BIRTHDAY")] | |||
public DateTime? Birthday { get; set; } | |||
/// <summary> | |||
/// 政治面貌 | |||
/// </summary> | |||
[Column("POLITICAL")] | |||
public string Political { get; set; } | |||
/// <summary> | |||
/// 身份证 | |||
/// </summary> | |||
[Column("IDCARD")] | |||
public string IDCard { get; set; } | |||
/// <summary> | |||
/// 联系电话 | |||
/// </summary> | |||
[Column("PHONE")] | |||
public string Phone { get; set; } | |||
/// <summary> | |||
/// 考生科类(文、理)StuSubjectType | |||
/// </summary> | |||
[Column("SUBJECTTYPE")] | |||
public string SubjectType { get; set; } | |||
/// <summary> | |||
/// 考生类别(农村应届,往届;城市应届\往届)ExamineeType_tlm | |||
/// </summary> | |||
[Column("STUTYPE")] | |||
public string StuType { get; set; } | |||
/// <summary> | |||
/// 毕业类别(普通高中、中等师范、职业高中、技工学校、其他中等专业学校、中等学历教育毕业)StuGraduateType | |||
/// </summary> | |||
[Column("GRADUATETYPE")] | |||
public string GraduateType { get; set; } | |||
/// <summary> | |||
/// 应试外语语种(英语\不应试外语;选项之外的语种自行填写)StuEnglish | |||
/// </summary> | |||
[Column("ENGLISH")] | |||
public string English { get; set; } | |||
/// <summary> | |||
/// 毕业学校 | |||
/// </summary> | |||
[Column("FROMSCHOOL")] | |||
public string FromSchool { get; set; } | |||
/// <summary> | |||
/// 高考报名省份 | |||
/// </summary> | |||
[Column("PROVINCE")] | |||
public string Province { get; set; } | |||
/// <summary> | |||
/// 报考专业 | |||
/// </summary> | |||
[Column("MAJORNO1")] | |||
public string MajorNo1 { get; set; } | |||
/// <summary> | |||
/// 报考专业 | |||
/// </summary> | |||
[Column("MAJORNO2")] | |||
public string MajorNo2 { get; set; } | |||
/// <summary> | |||
/// 报考专业 | |||
/// </summary> | |||
[Column("MAJORNO3")] | |||
public string MajorNo3 { get; set; } | |||
/// <summary> | |||
/// 报考专业 | |||
/// </summary> | |||
[Column("MAJORNO4")] | |||
public string MajorNo4 { get; set; } | |||
/// <summary> | |||
/// 报考专业 | |||
/// </summary> | |||
[Column("MAJORNO5")] | |||
public string MajorNo5 { get; set; } | |||
/// <summary> | |||
/// 户籍省份 | |||
/// </summary> | |||
[Column("HOMEPROVINCE")] | |||
public string HomeProvince { get; set; } | |||
/// <summary> | |||
/// 户籍市 | |||
/// </summary> | |||
[Column("HOMECITY")] | |||
public string HomeCity { get; set; } | |||
/// <summary> | |||
/// 户籍县 | |||
/// </summary> | |||
[Column("HOMECOUNTY")] | |||
public string HomeCounty { get; set; } | |||
/// <summary> | |||
/// 户籍详细地址 | |||
/// </summary> | |||
[Column("HOMEADDR")] | |||
public string HomeAddr { get; set; } | |||
/// <summary> | |||
/// 考生号 | |||
/// </summary> | |||
[Column("STUCODE")] | |||
public string StuCode { get; set; } | |||
/// <summary> | |||
/// 收件人 | |||
/// </summary> | |||
[Column("RECIPIENT")] | |||
public string Recipient { get; set; } | |||
/// <summary> | |||
/// 接收录取通知书地址 | |||
/// </summary> | |||
[Column("ACCEPTANCEPROVINCE")] | |||
public string AcceptanceProvince { get; set; } | |||
/// <summary> | |||
/// 接收录取通知书地址 | |||
/// </summary> | |||
[Column("ACCEPTANCECITY")] | |||
public string AcceptanceCity { get; set; } | |||
/// <summary> | |||
/// 接收录取通知书地址 | |||
/// </summary> | |||
[Column("ACCEPTANCECOUNTY")] | |||
public string AcceptanceCounty { get; set; } | |||
/// <summary> | |||
/// 接收录取通知书地址 | |||
/// </summary> | |||
[Column("ACCEPTANCEADDR")] | |||
public string AcceptanceAddr { get; set; } | |||
/// <summary> | |||
/// 邮政编码 | |||
/// </summary> | |||
[Column("ZIPCODE")] | |||
public string ZipCode { get; set; } | |||
/// <summary> | |||
/// 收件人电话 | |||
/// </summary> | |||
[Column("RECIPIENTPHONE")] | |||
public string RecipientPhone { get; set; } | |||
/// <summary> | |||
/// 家长电话 | |||
/// </summary> | |||
[Column("PARENTPHONE")] | |||
public string ParentPhone { get; set; } | |||
/// <summary> | |||
/// 是否服从调剂 | |||
/// </summary> | |||
[Column("ISADJUST")] | |||
public int? IsAdjust { get; set; } | |||
/// <summary> | |||
/// 个人照片 | |||
/// </summary> | |||
[Column("PHOTO")] | |||
public string Photo { get; set; } | |||
/// <summary> | |||
/// 身份证扫描件 | |||
/// </summary> | |||
[Column("IDCARDPHOTO")] | |||
public string IdCardPhoto { get; set; } | |||
/// <summary> | |||
/// 创建时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,48 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-02-14 11:09 | |||
/// 描 述:学生报名(官网) | |||
/// </summary> | |||
public interface StuEnrollOfficialIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<StuEnrollOfficialEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取StuEnrollOfficial表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
StuEnrollOfficialEntity GetStuEnrollOfficialEntity(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, StuEnrollOfficialEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,217 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-02-14 11:09 | |||
/// 描 述:学生报名(官网) | |||
/// </summary> | |||
public class StuEnrollOfficialService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<StuEnrollOfficialEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.StuName, | |||
t.Gender, | |||
t.Province, | |||
t.MajorNo1, | |||
t.MajorNo2, | |||
t.MajorNo3, | |||
t.MajorNo4, | |||
t.MajorNo5, | |||
t.StuType, | |||
t.HomeProvince, | |||
t.HomeCity, | |||
t.HomeCounty, | |||
t.IsAdjust | |||
"); | |||
strSql.Append(" FROM StuEnrollOfficial t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["Gender"].IsEmpty()) | |||
{ | |||
dp.Add("Gender",queryParam["Gender"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Gender = @Gender "); | |||
} | |||
if (!queryParam["Nationals"].IsEmpty()) | |||
{ | |||
dp.Add("Nationals",queryParam["Nationals"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Nationals = @Nationals "); | |||
} | |||
if (!queryParam["Birthday"].IsEmpty()) | |||
{ | |||
dp.Add("Birthday",queryParam["Birthday"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Birthday = @Birthday "); | |||
} | |||
if (!queryParam["Province"].IsEmpty()) | |||
{ | |||
dp.Add("Province",queryParam["Province"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Province = @Province "); | |||
} | |||
if (!queryParam["MajorNo1"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo1",queryParam["MajorNo1"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo1 = @MajorNo1 "); | |||
} | |||
if (!queryParam["StuType"].IsEmpty()) | |||
{ | |||
dp.Add("StuType",queryParam["StuType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.StuType = @StuType "); | |||
} | |||
if (!queryParam["FromSchool"].IsEmpty()) | |||
{ | |||
dp.Add("FromSchool", "%" + queryParam["FromSchool"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.FromSchool Like @FromSchool "); | |||
} | |||
if (!queryParam["HomeProvince"].IsEmpty()) | |||
{ | |||
dp.Add("HomeProvince",queryParam["HomeProvince"].ToString(), DbType.String); | |||
strSql.Append(" AND t.HomeProvince = @HomeProvince "); | |||
} | |||
if (!queryParam["HomeCity"].IsEmpty()) | |||
{ | |||
dp.Add("HomeCity",queryParam["HomeCity"].ToString(), DbType.String); | |||
strSql.Append(" AND t.HomeCity = @HomeCity "); | |||
} | |||
if (!queryParam["HomeCounty"].IsEmpty()) | |||
{ | |||
dp.Add("HomeCounty",queryParam["HomeCounty"].ToString(), DbType.String); | |||
strSql.Append(" AND t.HomeCounty = @HomeCounty "); | |||
} | |||
if (!queryParam["IsAdjust"].IsEmpty()) | |||
{ | |||
dp.Add("IsAdjust",queryParam["IsAdjust"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsAdjust = @IsAdjust "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<StuEnrollOfficialEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuEnrollOfficial表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public StuEnrollOfficialEntity GetStuEnrollOfficialEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<StuEnrollOfficialEntity>(keyValue); | |||
} | |||
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 | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<StuEnrollOfficialEntity>(t=>t.Id == keyValue); | |||
} | |||
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, StuEnrollOfficialEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1843,6 +1843,10 @@ | |||
<Compile Include="EducationalAdministration\StuSubsidizeType\StuSubsidizeTypeService.cs" /> | |||
<Compile Include="EducationalAdministration\StuSubsidizeType\StuSubsidizeTypeBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuSubsidizeType\StuSubsidizeTypeIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuEnrollOfficial\StuEnrollOfficialEntity.cs" /> | |||
<Compile Include="EducationalAdministration\StuEnrollOfficial\StuEnrollOfficialService.cs" /> | |||
<Compile Include="EducationalAdministration\StuEnrollOfficial\StuEnrollOfficialBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuEnrollOfficial\StuEnrollOfficialIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||