@@ -0,0 +1,121 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 12:13 | |||
/// 描 述:竞赛管理 | |||
/// </summary> | |||
public class DtRaceInfoController : MvcControllerBase | |||
{ | |||
private DtRaceInfoIBLL dtRaceInfoIBLL = new DtRaceInfoBLL(); | |||
#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 = dtRaceInfoIBLL.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 DtRaceInfoData = dtRaceInfoIBLL.GetDtRaceInfoEntity( keyValue ); | |||
var jsonData = new { | |||
DtRaceInfo = DtRaceInfoData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
dtRaceInfoIBLL.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) | |||
{ | |||
var userInfo = LoginUserInfo.Get(); | |||
DtRaceInfoEntity entity = strEntity.ToObject<DtRaceInfoEntity>(); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.CreateTime = DateTime.Now; | |||
entity.CreateUser = userInfo.userId; | |||
} | |||
dtRaceInfoIBLL.SaveEntity(keyValue,entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,123 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 11:48 | |||
/// 描 述:竞赛类型 | |||
/// </summary> | |||
public class DtRaceTypeController : MvcControllerBase | |||
{ | |||
private DtRaceTypeIBLL dtRaceTypeIBLL = new DtRaceTypeBLL(); | |||
#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="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetList(string queryJson) | |||
{ | |||
var data = dtRaceTypeIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var DtRaceTypeData = dtRaceTypeIBLL.GetDtRaceTypeEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
DtRaceType = DtRaceTypeData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
dtRaceTypeIBLL.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) | |||
{ | |||
DtRaceTypeEntity entity = strEntity.ToObject<DtRaceTypeEntity>(); | |||
var NoList = dtRaceTypeIBLL.GetNoList(keyValue, entity.ItemId); | |||
var NameList = dtRaceTypeIBLL.GetNameList(keyValue, entity.ItemName); | |||
if (NoList == null && NameList == null) | |||
{ | |||
if (string.IsNullOrEmpty(entity.ParentId)) | |||
{ | |||
entity.ParentId = "0"; | |||
} | |||
dtRaceTypeIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
} | |||
else | |||
{ | |||
return Fail("保存失败,类型或名称不能重复"); | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
ViewBag.Title = "竞赛管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="DtRaceInfo"> | |||
<div class="lr-form-item-title">县市<font face="宋体">*</font></div> | |||
<div id="City" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtRaceInfo"> | |||
<div class="lr-form-item-title">地区<font face="宋体">*</font></div> | |||
<div id="Area" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtRaceInfo"> | |||
<div class="lr-form-item-title">带队老师</div> | |||
<input id="LedPeople" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtRaceInfo"> | |||
<div class="lr-form-item-title">竞赛类型<font face="宋体">*</font></div> | |||
<div id="ItemId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="DtRaceInfo"> | |||
<div class="lr-form-item-title">参加地点</div> | |||
<input id="Address" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="DtRaceInfo" > | |||
<div class="lr-form-item-title">日期框<font face="宋体">*</font></div> | |||
<input id="JoinTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#JoinTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtRaceInfo"> | |||
<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="DtRaceInfo"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item" data-table="DtRaceInfo"> | |||
<div class="lr-form-item-title">人员<font face="宋体">*</font></div> | |||
<div id="JoinPeoPole" isvalid="yes" checkexpession="NotNull"></div> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item" data-table="DtRaceType"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Demo" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtRaceInfo/Form.js") |
@@ -0,0 +1,120 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-06 12:13 | |||
* 描 述:竞赛管理 | |||
*/ | |||
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 () { | |||
$('#City').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||
value: 'ccode', | |||
text: 'cname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var Citys = $("#City").lrselectGet(); | |||
if (Citys != null && Citys != "" && Citys != undefined) { | |||
$('#Area').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||
param: { strWhere: " 1=1 and aparent in (" + Citys + ")" }, | |||
value: "acode", | |||
text: "aname", | |||
maxHeight: 200 | |||
}); | |||
} else { | |||
$('#Area').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||
param: { strWhere: " 1=1 and aparent ='' " }, | |||
value: "acode", | |||
text: "aname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}) | |||
$("#Area").lrselect(); | |||
$('#ItemId').lrDataSourceSelect({ code: 'DtRaceType', value: 'itemid', text: 'itemname' }); | |||
$('#ItemId').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DtRaceType', | |||
value: "itemid", | |||
text: "itemname", | |||
maxHeight: 200 | |||
}); | |||
$('#MajorNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', | |||
value: 'deptno', | |||
text: 'deptname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var DeptNo = $("#MajorNo").lrselectGet(); | |||
if (DeptNo != null && DeptNo != "" && DeptNo != undefined) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and deptno in (" + DeptNo + ")" }, | |||
value: "classno", | |||
text: "classname", | |||
allowSearch: false, | |||
maxHeight: 200, | |||
select: function (item) { | |||
var ClassNo = $("#ClassNo").lrselectGet(); | |||
if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { | |||
$('#StuNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuList', | |||
param: { strWhere: " 1=1 and classno in (" + ClassNo + ")" }, | |||
value: "stuid", | |||
text: "stuname", | |||
maxHeight: 200, | |||
allowSearch: true | |||
}); | |||
} | |||
} | |||
}); | |||
} else { | |||
$("#ClassNo").lrselect(); | |||
} | |||
} | |||
}); | |||
$("#ClassNo").lrselect(); | |||
$('#JoinPeoPole').lrDataItemSelect({ code: '' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DtRaceInfo/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/DtRaceInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
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-12 lr-form-item"> | |||
<div class="lr-form-item-title">竞赛类型</div> | |||
<div id="ItemId"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></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> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtRaceInfo/Index.js") |
@@ -0,0 +1,218 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-06 12:13 | |||
* 描 述:竞赛管理 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#ItemId').lrDataSourceSelect({ code: 'DtRaceType', value: 'itemid', text: 'itemname' }); | |||
$('#ItemId').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DtRaceType', | |||
//param: { strWhere: " 1=1 and aparent in (" + Citys + ")" }, | |||
value: "itemid", | |||
text: "itemname", | |||
maxHeight: 200 | |||
}); | |||
$('#MajorNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', | |||
value: 'deptno', | |||
text: 'deptname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var DeptNo = $("#MajorNo").lrselectGet(); | |||
if (DeptNo != null && DeptNo != "" && DeptNo != undefined) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and deptno in (" + DeptNo + ")" }, | |||
value: "classno", | |||
text: "classname", | |||
allowSearch: false, | |||
maxHeight: 200, | |||
select: function (item) { | |||
var ClassNo = $("#ClassNo").lrselectGet(); | |||
if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { | |||
$('#StuNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuList', | |||
param: { strWhere: " 1=1 and classno in (" + ClassNo + ")" }, | |||
value: "stuid", | |||
text: "stuname", | |||
maxHeight: 200, | |||
allowSearch: true | |||
}); | |||
} | |||
} | |||
}); | |||
} else { | |||
$("#ClassNo").lrselect(); | |||
} | |||
} | |||
}); | |||
$("#ClassNo").lrselect(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/DtRaceInfo/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/DtRaceInfo/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/DtRaceInfo/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/DtRaceInfo/GetPageList', | |||
headData: [ | |||
{ | |||
label: "竞赛类型", name: "ItemId", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DtRaceType', | |||
key: value, | |||
keyId: 'itemid', | |||
callback: function (_data) { | |||
callback(_data['itemname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "地区", name: "City", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||
key: value, | |||
keyId: 'ccode', | |||
callback: function (_data) { | |||
callback(_data['cname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "县市", name: "Area", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA', | |||
key: value, | |||
keyId: 'acode', | |||
callback: function (_data) { | |||
callback(_data['aname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "带队老师", name: "LedPeople", width: 200, align: "left" }, | |||
{ label: "参加地点", name: "Address", width: 300, align: "left" }, | |||
{ | |||
label: "参加时间", name: "JoinTime", width: 150, align: "left", | |||
formatter: function (cellvalue) { | |||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
//{ | |||
// label: "人员", name: "JoinPeoPole", width: 400, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: '', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "备注", name: "Demo", width: 300, align: "left:" }, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.search(); | |||
page.init(); | |||
} |
@@ -0,0 +1,27 @@ | |||
@{ | |||
ViewBag.Title = "竞赛类型"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
@*<div class="col-xs-12 lr-form-item" data-table="DtRaceType" > | |||
<div class="lr-form-item-title">上级</div> | |||
<div id="ParentId" ></div> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item" data-table="DtRaceType" > | |||
<div class="lr-form-item-title">编码<font face="宋体">*</font></div> | |||
<input id="ItemId" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="DtRaceType" > | |||
<div class="lr-form-item-title">名称<font face="宋体">*</font></div> | |||
<input id="ItemName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="DtRaceType" > | |||
<div class="lr-form-item-title">有效<font face="宋体">*</font></div> | |||
<div id="IsValid" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="DtRaceType" > | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Demo" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtRaceType/Form.js") |
@@ -0,0 +1,56 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-06 11:48 | |||
* 描 述:竞赛类型 | |||
*/ | |||
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 () { | |||
$('#ParentId').lrDataSourceSelect({ | |||
code: 'DtRaceType',value: 'itemid',text: 'itemname', | |||
param: { Isvalid : true} | |||
}); | |||
$('#IsValid').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#IsValid').lrselectSet("true"); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DtRaceType/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/DtRaceType/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,40 @@ | |||
@{ | |||
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-12 lr-form-item"> | |||
<div class="lr-form-item-title">编码</div> | |||
<input id="ItemId" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">名称</div> | |||
<input id="ItemName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</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> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtRaceType/Index.js") |
@@ -0,0 +1,102 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-06 11:48 | |||
* 描 述:竞赛类型 | |||
*/ | |||
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); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/DtRaceType/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/DtRaceType/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)) { | |||
var IsValid = $('#gridtable').jfGridValue('IsValid'); | |||
if (IsValid) { | |||
learun.alert.warning("当前项有效,不可删除!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/DtRaceType/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/DtRaceType/GetList', | |||
headData: [ | |||
{ label: "编码", name: "ItemId", width: 300, align: "left"}, | |||
{ label: "名称", name: "ItemName", width: 300, align: "left"}, | |||
{ | |||
label: "有效", name: "IsValid", width: 300, align: "left", | |||
formatter: function (cellvalue, options, rowObject) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
{ label: "备注", name: "Demo", width: 300, align: "left:"}, | |||
], | |||
mainId: 'Id', | |||
isTree: true, | |||
parentId: 'ParentId', | |||
sord: 'asc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -49,6 +49,14 @@ namespace Learun.Application.Web.Areas.StudentWork.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult Statistics() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult CheckPaper(string VID, string SMId) | |||
{ | |||
@@ -267,6 +275,23 @@ namespace Learun.Application.Web.Areas.StudentWork.Controllers | |||
var data = ask_MainIBLL.GetStudentPageList(null, queryJson).ToList().OrderByDescending(x => x.CreateDate); | |||
return Success(data); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetStatisList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = ask_MainIBLL.GetStatisList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
@@ -0,0 +1,42 @@ | |||
@{ | |||
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-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
</div> | |||
</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_submit" class="btn btn-default"><i class="fa fa-lock"></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/StudentWork/Views/SW_Ask_Main/Statistics.js") |
@@ -0,0 +1,85 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-05 17:41 | |||
* 描 述:统计 | |||
*/ | |||
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); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/StudentWork/SW_Ask_Main/GetStatisList', | |||
headData: [ | |||
{ | |||
label: "专业", name: "MajorNo", width: 400, align: "center", | |||
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['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 400, align: "center", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "学生编码", name: "stuNo", width: 400, align: "center" }, | |||
{ label: "学生名称", name: "stuName", width: 400, align: "center" }, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
//if (res.code == 200) { | |||
// // 发起流程 | |||
// var postData = { | |||
// schemeCode: 'Dispatch',// 填写流程对应模板编号 | |||
// processId: processId, | |||
// level: '1', | |||
// }; | |||
// learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
// learun.loading(false); | |||
// }); | |||
page.search(); | |||
//} | |||
}; | |||
page.init(); | |||
} |
@@ -843,6 +843,8 @@ | |||
<Compile Include="Areas\CustomFunction\Controllers\RetireForecastController.cs" /> | |||
<Compile Include="Areas\CustomFunction\Controllers\ContractInfoController.cs" /> | |||
<Compile Include="Areas\CustomFunction\Controllers\ContractChangeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\DtRaceTypeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\DtRaceInfoController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -1472,6 +1474,7 @@ | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerQuery.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\Form.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\ApplyIndex.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\Statistics.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\Index.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\Paper.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\PaperAdminView.js" /> | |||
@@ -6561,6 +6564,14 @@ | |||
<Content Include="Areas\CustomFunction\Views\ContractChange\Index.js" /> | |||
<Content Include="Areas\CustomFunction\Views\ContractChange\Form.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\ContractChange\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceType\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceType\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceType\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceType\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceInfo\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceInfo\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceInfo\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceInfo\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\LR_Desktop\Models\" /> | |||
@@ -7393,6 +7404,7 @@ | |||
<Content Include="Areas\LR_NewWorkFlow\Views\Index.cshtml" /> | |||
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\ApplyForIndex.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\ContractInfo\IndexSign.cshtml" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\Statistics.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 12:13 | |||
/// 描 述:竞赛管理 | |||
/// </summary> | |||
public class DtRaceInfoMap : EntityTypeConfiguration<DtRaceInfoEntity> | |||
{ | |||
public DtRaceInfoMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("DTRACEINFO"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 11:48 | |||
/// 描 述:竞赛类型 | |||
/// </summary> | |||
public class DtRaceTypeMap : EntityTypeConfiguration<DtRaceTypeEntity> | |||
{ | |||
public DtRaceTypeMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("DTRACETYPE"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -592,6 +592,8 @@ | |||
<Compile Include="CustomFunction\RetireForecastMap.cs" /> | |||
<Compile Include="CustomFunction\ContractInfoMap.cs" /> | |||
<Compile Include="CustomFunction\ContractChangeMap.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceTypeMap.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceInfoMap.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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 12:13 | |||
/// 描 述:竞赛管理 | |||
/// </summary> | |||
public class DtRaceInfoBLL : DtRaceInfoIBLL | |||
{ | |||
private DtRaceInfoService dtRaceInfoService = new DtRaceInfoService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<DtRaceInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return dtRaceInfoService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取DtRaceInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DtRaceInfoEntity GetDtRaceInfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return dtRaceInfoService.GetDtRaceInfoEntity(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 | |||
{ | |||
dtRaceInfoService.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, DtRaceInfoEntity entity) | |||
{ | |||
try | |||
{ | |||
dtRaceInfoService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,110 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 12:13 | |||
/// 描 述:竞赛管理 | |||
/// </summary> | |||
public class DtRaceInfoEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// ItemId | |||
/// </summary> | |||
[Column("ITEMID")] | |||
public string ItemId { get; set; } | |||
/// <summary> | |||
/// 项目奖项 | |||
/// </summary> | |||
[Column("ITEMNAME")] | |||
public string ItemName { get; set; } | |||
/// <summary> | |||
/// 地市 | |||
/// </summary> | |||
[Column("CITY")] | |||
public string City { get; set; } | |||
/// <summary> | |||
/// 县区 | |||
/// </summary> | |||
[Column("AREA")] | |||
public string Area { get; set; } | |||
/// <summary> | |||
/// 参加地点 | |||
/// </summary> | |||
[Column("ADDRESS")] | |||
public string Address { get; set; } | |||
/// <summary> | |||
/// JoinPeoPole | |||
/// </summary> | |||
[Column("JOINPEOPOLE")] | |||
public string JoinPeoPole { get; set; } | |||
/// <summary> | |||
/// 负责人 | |||
/// </summary> | |||
[Column("LEDPEOPLE")] | |||
public string LedPeople { get; set; } | |||
/// <summary> | |||
/// 参加时间 | |||
/// </summary> | |||
[Column("JOINTIME")] | |||
public DateTime? JoinTime { get; set; } | |||
/// <summary> | |||
/// 班级 | |||
/// </summary> | |||
[Column("CLASSNO")] | |||
public string ClassNo { get; set; } | |||
/// <summary> | |||
/// 专业 | |||
/// </summary> | |||
[Column("MAJORNO")] | |||
public string MajorNo { get; set; } | |||
/// <summary> | |||
/// 创建用户 | |||
/// </summary> | |||
[Column("CREATEUSER")] | |||
public string CreateUser { get; set; } | |||
/// <summary> | |||
/// 创建时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("DEMO")] | |||
public string Demo { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 12:13 | |||
/// 描 述:竞赛管理 | |||
/// </summary> | |||
public interface DtRaceInfoIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<DtRaceInfoEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取DtRaceInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
DtRaceInfoEntity GetDtRaceInfoEntity(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, DtRaceInfoEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,157 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 12:13 | |||
/// 描 述:竞赛管理 | |||
/// </summary> | |||
public class DtRaceInfoService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<DtRaceInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" * "); | |||
strSql.Append(" FROM DtRaceInfo t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["ItemId"].IsEmpty()) | |||
{ | |||
dp.Add("ItemId",queryParam["ItemId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ItemId = @ItemId "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo",queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo",queryParam["ClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<DtRaceInfoEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取DtRaceInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DtRaceInfoEntity GetDtRaceInfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<DtRaceInfoEntity>(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<DtRaceInfoEntity>(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, DtRaceInfoEntity 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 | |||
} | |||
} |
@@ -0,0 +1,172 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 11:48 | |||
/// 描 述:竞赛类型 | |||
/// </summary> | |||
public class DtRaceTypeBLL : DtRaceTypeIBLL | |||
{ | |||
private DtRaceTypeService dtRaceTypeService = new DtRaceTypeService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<DtRaceTypeEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return dtRaceTypeService.GetList(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取DtRaceType表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DtRaceTypeEntity GetDtRaceTypeEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return dtRaceTypeService.GetDtRaceTypeEntity(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 | |||
{ | |||
dtRaceTypeService.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, DtRaceTypeEntity entity) | |||
{ | |||
try | |||
{ | |||
dtRaceTypeService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 判断编码不能重复 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DtRaceTypeEntity GetNoList(string keyValue,string ItemNo) | |||
{ | |||
try | |||
{ | |||
return dtRaceTypeService.GetNoList(keyValue, ItemNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 判断名称不能重复 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DtRaceTypeEntity GetNameList(string keyValue, string ItemName) | |||
{ | |||
try | |||
{ | |||
return dtRaceTypeService.GetNameList(keyValue, ItemName); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,75 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 11:48 | |||
/// 描 述:竞赛类型 | |||
/// </summary> | |||
public class DtRaceTypeEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// ParentId | |||
/// </summary> | |||
[Column("PARENTID")] | |||
public string ParentId { get; set; } | |||
/// <summary> | |||
/// ParentName | |||
/// </summary> | |||
[Column("PARENTNAME")] | |||
public string ParentName { get; set; } | |||
/// <summary> | |||
/// ItemId | |||
/// </summary> | |||
[Column("ITEMID")] | |||
public string ItemId { get; set; } | |||
/// <summary> | |||
/// ItemName | |||
/// </summary> | |||
[Column("ITEMNAME")] | |||
public string ItemName { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("DEMO")] | |||
public string Demo { get; set; } | |||
/// <summary> | |||
/// IsValid | |||
/// </summary> | |||
[Column("ISVALID")] | |||
public bool? IsValid { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,61 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 11:48 | |||
/// 描 述:竞赛类型 | |||
/// </summary> | |||
public interface DtRaceTypeIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<DtRaceTypeEntity> GetList(string queryJson); | |||
/// <summary> | |||
/// 获取DtRaceType表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
DtRaceTypeEntity GetDtRaceTypeEntity(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, DtRaceTypeEntity entity); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
DtRaceTypeEntity GetNoList(string keyValue,string ItemNo); | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
DtRaceTypeEntity GetNameList(string keyValue, string ItemName); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,24 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration.DtRaceType | |||
{ | |||
public class DtRaceTypeModel | |||
{ | |||
/// <summary> | |||
/// 部门上级id | |||
/// </summary> | |||
public string parentId { get; set; } | |||
/// <summary> | |||
/// 公司主键 | |||
/// </summary> | |||
public string companyId { get; set; } | |||
/// <summary> | |||
/// 公司名字 | |||
/// </summary> | |||
public string name { get; set; } | |||
} | |||
} |
@@ -0,0 +1,206 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-06 11:48 | |||
/// 描 述:竞赛类型 | |||
/// </summary> | |||
public class DtRaceTypeService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<DtRaceTypeEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.ParentId, | |||
t.ItemId, | |||
t.ItemName, | |||
t.IsValid, | |||
t.Demo | |||
"); | |||
strSql.Append(" FROM DtRaceType t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["ItemId"].IsEmpty()) | |||
{ | |||
dp.Add("ItemId", "%" + queryParam["ItemId"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ItemId Like @ItemId "); | |||
} | |||
if (!queryParam["ItemName"].IsEmpty()) | |||
{ | |||
dp.Add("ItemName", "%" + queryParam["ItemName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ItemName Like @ItemName "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<DtRaceTypeEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取DtRaceType表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DtRaceTypeEntity GetDtRaceTypeEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<DtRaceTypeEntity>(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<DtRaceTypeEntity>(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, DtRaceTypeEntity 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 | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 判断编码不能重复 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DtRaceTypeEntity GetNoList(string keyValue, string ItemNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<DtRaceTypeEntity>(o => o.Id != keyValue && o.ItemId == ItemNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 判断名称不能重复 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DtRaceTypeEntity GetNameList(string keyValue, string ItemName) | |||
{ | |||
try | |||
{ | |||
// return this.BaseRepository("CollegeMIS").FindEntity<DtStuTypeEntity>(o => o.Id != keyValue && o.TypeNo == TypeNo); | |||
return this.BaseRepository("CollegeMIS").FindEntity<DtRaceTypeEntity>(o => o.Id != keyValue && o.ItemName == ItemName); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -132,6 +132,7 @@ | |||
<Compile Include="EducationalAdministration\CertificateResult\CertificateResultEntity.cs" /> | |||
<Compile Include="EducationalAdministration\CertificateResult\CertificateResultIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\CertificateResult\CertificateResultService.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceType\DtRaceTypeModel.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeBLL.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeEntity.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeIBLL.cs" /> | |||
@@ -1786,6 +1787,14 @@ | |||
<Compile Include="CustomFunction\ContractChange\ContractChangeService.cs" /> | |||
<Compile Include="CustomFunction\ContractChange\ContractChangeBLL.cs" /> | |||
<Compile Include="CustomFunction\ContractChange\ContractChangeIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceType\DtRaceTypeEntity.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceType\DtRaceTypeService.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceType\DtRaceTypeBLL.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceType\DtRaceTypeIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceInfo\DtRaceInfoEntity.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceInfo\DtRaceInfoService.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceInfo\DtRaceInfoBLL.cs" /> | |||
<Compile Include="EducationalAdministration\DtRaceInfo\DtRaceInfoIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -313,6 +313,29 @@ namespace Learun.Application.TwoDevelopment.StudentWork | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<SW_Ask_MainEntity> GetStatisList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return ask_MainService.GetStatisList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void SaveSW_Ask_QuestionResultEntity(List<SW_Ask_QuestionResultEntity> entity, string vid, string smid, string userinfoIPAddress) | |||
{ | |||
try | |||
@@ -69,6 +69,12 @@ namespace Learun.Application.TwoDevelopment.StudentWork | |||
void ChangeFormStatus(string keyValue, bool status); | |||
IEnumerable<SW_Ask_MainEntity> GetStudentPageList(Pagination pagination, string queryJson); | |||
IEnumerable<SW_Ask_MainEntity> GetTeacherPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<SW_Ask_MainEntity> GetStatisList(Pagination pagination, string queryJson); | |||
void SaveSW_Ask_QuestionResultEntity(List<SW_Ask_QuestionResultEntity> entity, string vid, string smid, string userinfoIPAddress); | |||
/// <summary> | |||
/// 提交答卷 | |||
@@ -217,6 +217,60 @@ namespace Learun.Application.TwoDevelopment.StudentWork | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<SW_Ask_MainEntity> GetStatisList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
//select bb.* ,cc.* from( | |||
// select c.stuNo, c.StuName, c.MajorNo, c.ClassNo from SW_Ask_Student b left join [CollegeMIS_演示].dbo.StuInfoBasic c on b.StuNo = c.StuNo-- bb | |||
// | |||
// left join( | |||
// select distinct asa.VID, asa.UID from SW_Ask_StudentMain asa | |||
//left join ( | |||
//select *from SW_Ask_StudentMain a where a.IsAnswer = 'True'and a.Status = 2) aa on aa.UID = asa.UID | |||
// )cc on cc.UID = bb.StuNo where 1 = 1 and cc.VID is Not NUll | |||
strSql.Append(" select bb.* ,cc.* from( "); | |||
strSql.Append(" select c.stuNo, c.StuName, c.MajorNo, c.ClassNo from SW_Ask_Student b left join [CollegeMIS_演示].dbo.StuInfoBasic c on b.StuNo = c.StuNo "); | |||
strSql.Append(" ) bb "); | |||
strSql.Append(" left join( "); | |||
strSql.Append(" select distinct asa.VID, asa.UID from SW_Ask_StudentMain asa "); | |||
strSql.Append(" left join( "); | |||
strSql.Append(" select *from SW_Ask_StudentMain a where a.IsAnswer = 'True'and a.Status = 2) aa on aa.UID = asa.UID "); | |||
strSql.Append(" )cc on cc.UID = bb.StuNo where 1 = 1 and cc.VID is Not NUll "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND bb.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND bb.ClassNo Like @ClassNo "); | |||
} | |||
return this.BaseRepository().FindList<SW_Ask_MainEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取SW_Ask_Main表实体数据 | |||
/// <param name="keyValue">主键</param> | |||