Browse Source

解决冲突

yanshi
zhangli 3 years ago
parent
commit
230291886a
18 changed files with 1055 additions and 52 deletions
  1. +164
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtStayInSchoolController.cs
  2. +1
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtStuLeaveController.cs
  3. +47
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStayInSchool/Form.cshtml
  4. +59
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStayInSchool/Form.js
  5. +54
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStayInSchool/Index.cshtml
  6. +230
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStayInSchool/Index.js
  7. +0
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.js
  8. +2
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.js
  9. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  10. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/DtStayInSchoolMap.cs
  11. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  12. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStayInSchool/DtStayInSchoolBLL.cs
  13. +105
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStayInSchool/DtStayInSchoolEntity.cs
  14. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStayInSchool/DtStayInSchoolIBLL.cs
  15. +180
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStayInSchool/DtStayInSchoolService.cs
  16. +0
    -30
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStuLeave/DtStuLeaveEntity.cs
  17. +1
    -14
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStuLeave/DtStuLeaveService.cs
  18. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 164
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtStayInSchoolController.cs View File

@@ -0,0 +1,164 @@
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-07-21 12:08
/// 描 述:学生留校
/// </summary>
public class DtStayInSchoolController : MvcControllerBase
{
private DtStayInSchoolIBLL dtStayInSchoolIBLL = new DtStayInSchoolBLL();

#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 = dtStayInSchoolIBLL.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 DtStayInSchoolData = dtStayInSchoolIBLL.GetDtStayInSchoolEntity(keyValue);
var jsonData = new
{
DtStayInSchool = DtStayInSchoolData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
dtStayInSchoolIBLL.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)
{
DtStayInSchoolEntity entity = strEntity.ToObject<DtStayInSchoolEntity>();
if (string.IsNullOrEmpty(keyValue))
{
entity.State = "0";
entity.CreateTime = DateTime.Now;
}
dtStayInSchoolIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion

#region 扩展数据
/// <summary>
/// 提交数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SubmitList(string keyValue)
{
var Model = dtStayInSchoolIBLL.GetDtStayInSchoolEntity(keyValue);
if (Model != null)
{
Model.State = "1";
Model.CreateTime = DateTime.Now;
dtStayInSchoolIBLL.SaveEntity(keyValue, Model);
}
return Success("提交成功!");
}

#region 教师审核
/// <summary>
/// 提交数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult TeacherAudit(string keyValue)
{
var Model = dtStayInSchoolIBLL.GetDtStayInSchoolEntity(keyValue);
if (Model != null)
{
Model.State = "2";
Model.CreateTime = DateTime.Now;
dtStayInSchoolIBLL.SaveEntity(keyValue, Model);
}
return Success("审核成功!");
}
#endregion

#endregion

}
}

+ 1
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtStuLeaveController.cs View File

@@ -121,13 +121,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
DtStuLeaveEntity entity = strEntity.ToObject<DtStuLeaveEntity>();
entity.FlowNo = "0";
entity.LastUpTime = DateTime.Now;
if (string.IsNullOrEmpty(keyValue))
{
entity.LeaveAddTime = DateTime.Now;
@@ -152,7 +150,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
if (Model != null)
{
Model.FlowNo = "1";
Model.LastUpTime = DateTime.Now;
dtStuLeaveIBLL.SaveEntity(keyValue, Model);
}
return Success("提交成功!");
@@ -160,6 +157,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
#endregion

#region 教师审核

/// <summary>
/// 提交数据
/// </summary>
@@ -173,7 +171,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
if (Model != null)
{
Model.FlowNo = "2";
Model.LastUpTime = DateTime.Now;
dtStuLeaveIBLL.SaveEntity(keyValue, Model);
}
return Success("审核成功!");


+ 47
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStayInSchool/Form.cshtml View File

@@ -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="DtStayInSchool">
<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="DtStayInSchool">
<div class="lr-form-item-title">班级<font face="宋体">*</font></div>
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="DtStayInSchool">
<div class="lr-form-item-title">性别<font face="宋体">*</font></div>
<div id="Sex" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="DtStayInSchool">
<div class="lr-form-item-title">联系电话<font face="宋体">*</font></div>
<input id="Phone" type="text" class="form-control" isvalid="yes" checkexpession="Mobile" />
</div>
<div class="col-xs-6 lr-form-item" data-table="DtStayInSchool">
<div class="lr-form-item-title">班主任<font face="宋体">*</font></div>
<div id="ClassTeacher" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="DtStayInSchool">
<div class="lr-form-item-title">留校假期<font face="宋体">*</font></div>
<div id="HoildayType" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="DtStayInSchool">
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div>
<input id="BeginTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#BeginTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="DtStayInSchool">
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div>
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="DtStayInSchool" style="display: none; ">
<div class="lr-form-item-title">创建用户</div>
<input id="CreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="DtStayInSchool" style="display: none; ">
<div class="lr-form-item-title">创建时间</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtStayInSchool/Form.js")

+ 59
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStayInSchool/Form.js View File

@@ -0,0 +1,59 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-07-20 17:19
* 描 述:假期留校
*/
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 () {
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#Grade').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
$('#Sex').lrDataItemSelect({ code: 'usersex' });
$('#ClassTeacher').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_userid', text: 'f_realname' });
$('#HoildayType').lrDataItemSelect({ code: 'StayInSchoolNo' });
$('#CreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUserId').val(learun.clientdata.get(['userinfo']).realName);
//$('#CreateTime')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
//$('#CreateTime').val(learun.clientdata.get(['userinfo']).realName);
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DtStayInSchool/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/DtStayInSchool/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 54
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStayInSchool/Index.cshtml View File

@@ -0,0 +1,54 @@
@{
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="Sex"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">班主任</div>
<div id="ClassTeacher"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">留校假期</div>
<div id="HoildayType"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">创建时间</div>
<div id="CreateTime"></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>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp; 提交</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i>审核</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtStayInSchool/Index.js")

+ 230
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStayInSchool/Index.js View File

@@ -0,0 +1,230 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-07-20 17:19
* 描 述:假期留校
*/
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);
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#Sex').lrDataItemSelect({ code: 'usersex' });
$('#ClassTeacher').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_userid', text: 'f_realname' });
$('#HoildayType').lrDataItemSelect({ code: 'StayInSchoolNo' });
//$('#CreateTime').lrUserSelect(0);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/DtStayInSchool/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)) {
var State = $('#gridtable').jfGridValue('State');
if (State != 0) {
learun.alert.warning("当前项目已提交不能编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/DtStayInSchool/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 State = $('#gridtable').jfGridValue('State');
if (State != 0) {
learun.alert.warning("当前项目已提交不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/DtStayInSchool/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State != 0) {
learun.alert.warning("当前项目已提交,请勿重复提交!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/DtStayInSchool/SubmitList', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//审核
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State != 1) {
learun.alert.warning("当前项目未提交,不能审核!");
return;
}
learun.layerConfirm('是否确认审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/DtStayInSchool/TeacherAudit', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/DtStayInSchool/GetPageList',
headData: [
{
label: "专业", name: "MajorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "班级", name: "Grade", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{
label: "性别", name: "Sex", 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: "Phone", width: 100, align: "left" },
{
label: "班主任", name: "ClassTeacher", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "留校假期", name: "HoildayType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'StayInSchoolNo',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "开始时间", name: "BeginTime", width: 150, align: "left" },
{ label: "结束时间", name: "EndTime", width: 150, align: "left" },
{
label: "创建用户", name: "CreateUserId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{
label: "创建时间", name: "CreateTime", width: 200, align: "left"
},
{
label: "当前状态", name: "State", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue == 0) {
return '<span class=\"label label-warning\">草稿</span>';
}
if (cellvalue == 1) {
return '<span class=\"label label-warning\">已提交</span>';
} else if (cellvalue == 2) {
return '<span class=\"label label-success\">审核完成</span>';
}
}
}
],
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();
}

+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Form.js View File

@@ -49,7 +49,6 @@ var bootstrap = function ($, learun) {
$('#CreateUserClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' });
$('#LeaveType').lrDataItemSelect({ code: 'LeaveType' });
$('#LeaveAddTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#LastUpTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
},
initData: function () {
if (!!keyValue) {


+ 2
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtStuLeave/Index.js View File

@@ -120,7 +120,7 @@ var bootstrap = function ($, learun) {
if (learun.checkrow(keyValue)) {
var FlowNo = $('#gridtable').jfGridValue('FlowNo');
if (FlowNo != 0) {
learun.alert.warning("当前项目已提交不能编辑!");
learun.alert.warning("当前项目已提交不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
@@ -204,8 +204,7 @@ var bootstrap = function ($, learun) {
return '<span class=\"label label-success\">审核完成</span>';
}
}
},
{ label: "修改时间", name: "LastUpTime", width: 150, align: "left" }
}
],
mainId: 'Id',
isPage: true


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -826,6 +826,7 @@
<Compile Include="Areas\CustomFunction\Controllers\ArchiveInfoController.cs" />
<Compile Include="Areas\CustomFunction\Controllers\ArchiveRecordInfoController.cs" />
<Compile Include="Areas\CustomFunction\Controllers\ArchiveUserController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\DtStayInSchoolController.cs" />
<Compile Include="Areas\CustomFunction\Controllers\VehicleFormationController.cs" />
<Compile Include="Areas\CustomFunction\Controllers\VehicleInfoController.cs" />
</ItemGroup>
@@ -6461,6 +6462,10 @@
<Content Include="Areas\CustomFunction\Views\ArchiveUser\Index.js" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\Form.cshtml" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\DtStayInSchool\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\DtStayInSchool\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\DtStayInSchool\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\DtStayInSchool\Form.js" />
<Content Include="Areas\CustomFunction\Views\VehicleFormation\Index.cshtml" />
<Content Include="Areas\CustomFunction\Views\VehicleFormation\Index.js" />
<Content Include="Areas\CustomFunction\Views\VehicleFormation\Form.cshtml" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/DtStayInSchoolMap.cs View File

@@ -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-07-21 12:08
/// 描 述:学生留校
/// </summary>
public class DtStayInSchoolMap : EntityTypeConfiguration<DtStayInSchoolEntity>
{
public DtStayInSchoolMap()
{
#region 表、主键
//表
this.ToTable("DTSTAYINSCHOOL");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj View File

@@ -575,6 +575,7 @@
<Compile Include="CustomFunction\ArchiveInfoMap.cs" />
<Compile Include="CustomFunction\ArchiveRecordInfoMap.cs" />
<Compile Include="CustomFunction\ArchiveUserMap.cs" />
<Compile Include="EducationalAdministration\DtStayInSchoolMap.cs" />
<Compile Include="CustomFunction\VehicleFormationMap.cs" />
<Compile Include="CustomFunction\VehicleInfoMap.cs" />
</ItemGroup>


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStayInSchool/DtStayInSchoolBLL.cs View File

@@ -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-07-21 12:08
/// 描 述:学生留校
/// </summary>
public class DtStayInSchoolBLL : DtStayInSchoolIBLL
{
private DtStayInSchoolService dtStayInSchoolService = new DtStayInSchoolService();

#region 获取数据

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

/// <summary>
/// 获取DtStayInSchool表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public DtStayInSchoolEntity GetDtStayInSchoolEntity(string keyValue)
{
try
{
return dtStayInSchoolService.GetDtStayInSchoolEntity(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
{
dtStayInSchoolService.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, DtStayInSchoolEntity entity)
{
try
{
dtStayInSchoolService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 105
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStayInSchool/DtStayInSchoolEntity.cs View File

@@ -0,0 +1,105 @@
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-07-21 12:08
/// 描 述:学生留校
/// </summary>
public class DtStayInSchoolEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 专业
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 年级
/// </summary>
[Column("GRADE")]
public string Grade { get; set; }
/// <summary>
/// 性别
/// </summary>
[Column("SEX")]
public string Sex { get; set; }
/// <summary>
/// 联系电话
/// </summary>
[Column("PHONE")]
public string Phone { get; set; }
/// <summary>
/// 假期类型
/// </summary>
[Column("HOILDAYTYPE")]
public string HoildayType { get; set; }
/// <summary>
/// 开始时间
/// </summary>
[Column("BEGINTIME")]
public DateTime? BeginTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
[Column("ENDTIME")]
public DateTime? EndTime { get; set; }
/// <summary>
/// 班主任
/// </summary>
[Column("CLASSTEACHER")]
public string ClassTeacher { get; set; }
/// <summary>
/// 申请人
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 申请时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("DEMO")]
public string Demo { get; set; }
/// <summary>
/// 状态 0 草稿 1 老师
/// </summary>
[Column("STATE")]
public string State { 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
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStayInSchool/DtStayInSchoolIBLL.cs View File

@@ -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-07-21 12:08
/// 描 述:学生留校
/// </summary>
public interface DtStayInSchoolIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<DtStayInSchoolEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取DtStayInSchool表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
DtStayInSchoolEntity GetDtStayInSchoolEntity(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, DtStayInSchoolEntity entity);
#endregion

}
}

+ 180
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStayInSchool/DtStayInSchoolService.cs View File

@@ -0,0 +1,180 @@
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-07-21 12:08
/// 描 述:学生留校
/// </summary>
public class DtStayInSchoolService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<DtStayInSchoolEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.MajorNo,
t.Grade,
t.Sex,
t.Phone,
t.ClassTeacher,
t.HoildayType,
t.BeginTime,
t.EndTime,
t.CreateUserId,
t.CreateTime,
t.State
");
strSql.Append(" FROM DtStayInSchool t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["Sex"].IsEmpty())
{
dp.Add("Sex", queryParam["Sex"].ToString(), DbType.String);
strSql.Append(" AND t.Sex = @Sex ");
}
if (!queryParam["ClassTeacher"].IsEmpty())
{
dp.Add("ClassTeacher", queryParam["ClassTeacher"].ToString(), DbType.String);
strSql.Append(" AND t.ClassTeacher = @ClassTeacher ");
}
if (!queryParam["HoildayType"].IsEmpty())
{
dp.Add("HoildayType", queryParam["HoildayType"].ToString(), DbType.String);
strSql.Append(" AND t.HoildayType = @HoildayType ");
}
if (!queryParam["CreateTime"].IsEmpty())
{
dp.Add("CreateTime", queryParam["CreateTime"].ToString(), DbType.String);
strSql.Append(" AND t.CreateTime = @CreateTime ");
}
return this.BaseRepository("CollegeMIS").FindList<DtStayInSchoolEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取DtStayInSchool表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public DtStayInSchoolEntity GetDtStayInSchoolEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<DtStayInSchoolEntity>(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<DtStayInSchoolEntity>(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, DtStayInSchoolEntity 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
- 30
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStuLeave/DtStuLeaveEntity.cs View File

@@ -60,11 +60,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 申请人编号
/// </summary>
[Column("CREATEUSERNO")]
public string CreateUserNo { get; set; }
/// <summary>
/// 申请人
/// </summary>
[Column("CREATEUSERNAME")]
@@ -80,31 +75,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("CREATEUSERCLASSNO")]
public string CreateUserClassNo { get; set; }
/// <summary>
/// 审核人ID
/// </summary>
[Column("AUDITUSERID")]
public string AuditUserId { get; set; }
/// <summary>
/// 审核人编号
/// </summary>
[Column("AUDITUSERNO")]
public string AuditUserNo { get; set; }
/// <summary>
/// 审核时间
/// </summary>
[Column("AUDITTIME")]
public DateTime? AuditTime { get; set; }
/// <summary>
/// 审核备注
/// </summary>
[Column("CHECKREMARK")]
public string CheckRemark { get; set; }
/// <summary>
/// 申请时间
/// </summary>
[Column("LASTUPTIME")]
public DateTime? LastUpTime { get; set; }
/// <summary>
/// 审核状态
/// </summary>
[Column("FLOWNO")]


+ 1
- 14
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtStuLeave/DtStuLeaveService.cs View File

@@ -31,20 +31,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.CreateUserName,
t.CreateUserDeptNo,
t.CreateUserClassNo,
t.LeaveType,
t.BeginDate,
t.EndDate,
t.LeaveDay,
t.LeaveReason,
t.LeaveAddTime,
t.FlowNo,
t.LastUpTime
");
strSql.Append(@" t.* ");
strSql.Append(" FROM DtStuLeave t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj View File

@@ -1718,6 +1718,10 @@
<Compile Include="CustomFunction\ArchiveUser\ArchiveUserService.cs" />
<Compile Include="CustomFunction\ArchiveUser\ArchiveUserBLL.cs" />
<Compile Include="CustomFunction\ArchiveUser\ArchiveUserIBLL.cs" />
<Compile Include="EducationalAdministration\DtStayInSchool\DtStayInSchoolEntity.cs" />
<Compile Include="EducationalAdministration\DtStayInSchool\DtStayInSchoolService.cs" />
<Compile Include="EducationalAdministration\DtStayInSchool\DtStayInSchoolBLL.cs" />
<Compile Include="EducationalAdministration\DtStayInSchool\DtStayInSchoolIBLL.cs" />
<Compile Include="CustomFunction\VehicleFormation\VehicleFormationEntity.cs" />
<Compile Include="CustomFunction\VehicleFormation\VehicleFormationService.cs" />
<Compile Include="CustomFunction\VehicleFormation\VehicleFormationBLL.cs" />


Loading…
Cancel
Save