@@ -3,6 +3,8 @@ using Learun.Cache.Factory; | |||||
using Learun.Util; | using Learun.Util; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | |||||
namespace Learun.Application.Organization | namespace Learun.Application.Organization | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
@@ -515,6 +517,24 @@ namespace Learun.Application.Organization | |||||
return res; | return res; | ||||
} | } | ||||
public List<PostEntity> GetAllList() | |||||
{ | |||||
try | |||||
{ | |||||
return postService.GetAllList().ToList(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -94,5 +94,8 @@ namespace Learun.Application.Organization | |||||
/// <param name="level">级数</param> | /// <param name="level">级数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
List<string> GetDownIdList(string strPostIds, int level); | List<string> GetDownIdList(string strPostIds, int level); | ||||
List<PostEntity> GetAllList(); | |||||
} | } | ||||
} | } |
@@ -235,5 +235,33 @@ namespace Learun.Application.Organization | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取部门列表信息(根据公司Id) | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<PostEntity> GetAllList() | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(fieldSql); | |||||
strSql.Append(" FROM LR_BASE_POST t WHERE t.F_DeleteMark = 0 "); | |||||
return this.BaseRepository().FindList<PostEntity>(strSql.ToString()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -1111,15 +1111,15 @@ namespace Learun.Application.Organization | |||||
else | else | ||||
{ | { | ||||
string dbPassword = Md5Helper.Encrypt(DESEncrypt.Encrypt(password.ToLower(), userEntity.F_Secretkey).ToLower(), 32).ToLower(); | string dbPassword = Md5Helper.Encrypt(DESEncrypt.Encrypt(password.ToLower(), userEntity.F_Secretkey).ToLower(), 32).ToLower(); | ||||
string phone = Md5Helper.Encrypt(userEntity.F_Mobile, 32).ToLower(); | |||||
//string phone = Md5Helper.Encrypt(userEntity.F_Mobile, 32).ToLower(); | |||||
if (dbPassword == userEntity.F_Password) | if (dbPassword == userEntity.F_Password) | ||||
{ | { | ||||
userEntity.LoginOk = true; | userEntity.LoginOk = true; | ||||
} | } | ||||
else if (phone == password) | |||||
{ | |||||
userEntity.LoginOk = true; | |||||
} | |||||
//else if (phone == password) | |||||
//{ | |||||
// userEntity.LoginOk = true; | |||||
//} | |||||
else | else | ||||
{ | { | ||||
userEntity.LoginMsg = "密码和账户名不匹配!"; | userEntity.LoginMsg = "密码和账户名不匹配!"; | ||||
@@ -0,0 +1,117 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-29 16:33 | |||||
/// 描 述:毕业信息统计 | |||||
/// </summary> | |||||
public class StuGraduateStatisticController : MvcControllerBase | |||||
{ | |||||
private StuGraduateStatisticIBLL stuGraduateStatisticIBLL = new StuGraduateStatisticBLL(); | |||||
#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 = stuGraduateStatisticIBLL.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 StuGraduateStatisticData = stuGraduateStatisticIBLL.GetStuGraduateStatisticEntity( keyValue ); | |||||
var jsonData = new { | |||||
StuGraduateStatistic = StuGraduateStatisticData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
stuGraduateStatisticIBLL.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) | |||||
{ | |||||
StuGraduateStatisticEntity entity = strEntity.ToObject<StuGraduateStatisticEntity>(); | |||||
stuGraduateStatisticIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -116,7 +116,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
var loginUserInfo = LoginUserInfo.Get(); | var loginUserInfo = LoginUserInfo.Get(); | ||||
entity.CreateTime = DateTime.Now; | entity.CreateTime = DateTime.Now; | ||||
entity.CreateUserId = loginUserInfo.account; | |||||
entity.CreateUserId = loginUserInfo.userId; | |||||
entity.CheckStatus = 0; | entity.CheckStatus = 0; | ||||
stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity); | stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity); | ||||
@@ -0,0 +1,117 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-30 10:49 | |||||
/// 描 述:实训设备管理 | |||||
/// </summary> | |||||
public class TrainEquipmentManageController : MvcControllerBase | |||||
{ | |||||
private TrainEquipmentManageIBLL trainEquipmentManageIBLL = new TrainEquipmentManageBLL(); | |||||
#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 = trainEquipmentManageIBLL.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 TrainEquipmentManageData = trainEquipmentManageIBLL.GetTrainEquipmentManageEntity( keyValue ); | |||||
var jsonData = new { | |||||
TrainEquipmentManage = TrainEquipmentManageData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
trainEquipmentManageIBLL.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) | |||||
{ | |||||
TrainEquipmentManageEntity entity = strEntity.ToObject<TrainEquipmentManageEntity>(); | |||||
trainEquipmentManageIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -48,7 +48,11 @@ var bootstrap = function ($, learun) { | |||||
{ label: '教师编号', name: 'EmpNo', width: 100, align: "left" }, | { label: '教师编号', name: 'EmpNo', width: 100, align: "left" }, | ||||
{ label: '总课时', name: 'lessoncount', width: 90, align: "left" }, | { label: '总课时', name: 'lessoncount', width: 90, align: "left" }, | ||||
{ label: '系数', name: 'coefficient', width: 100, align: "left" }, | { label: '系数', name: 'coefficient', width: 100, align: "left" }, | ||||
{ label: "工作量", name: "lessoncount", width: 100, align: "left" }, | |||||
{ | |||||
label: "工作量", name: "lessoncount2", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
return callback(row.lessoncount); | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId: 'EmpNo', | mainId: 'EmpNo', | ||||
}); | }); | ||||
@@ -7,24 +7,23 @@ | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
<div class="lr-layout-tool-left"> | <div class="lr-layout-tool-left"> | ||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">学号</div> | <div class="lr-form-item-title">学号</div> | ||||
<input id="StuNo" type="text" class="form-control" /> | |||||
<input id="StuNo" type="text" class="form-control"/> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">姓名</div> | <div class="lr-form-item-title">姓名</div> | ||||
<input id="StuName" type="text" class="form-control" /> | |||||
<input id="StuName" type="text" class="form-control"/> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">奖励名称</div> | <div class="lr-form-item-title">奖励名称</div> | ||||
<input id="EncourgeName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">奖励日期</div> | |||||
<input id="EncourgeDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd' })" /> | |||||
<input id="EncourgeName" type="text" class="form-control"/> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -7,15 +7,44 @@ | |||||
var refreshGirdData; | var refreshGirdData; | ||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var startTime; | |||||
var endTime; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.initGird(); | page.initGird(); | ||||
page.bind(); | page.bind(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
// 时间搜索框 | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '3', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 300, 400); | |||||
}, 200, 400); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -68,12 +97,12 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "学号", name: "StuNo", width: 100, align: "left"}, | |||||
{ label: "姓名", name: "StuName", width: 100, align: "left"}, | |||||
{ label: "奖励名称", name: "EncourgeName", width: 100, align: "left"}, | |||||
{ label: "奖励原因", name: "Reason", width: 100, align: "left"}, | |||||
{ label: "奖励金额", name: "Fee", width: 100, align: "left"}, | |||||
{ label: "奖励日期", name: "EncourgeDate", width: 100, align: "left"}, | |||||
{ label: "学号", name: "StuNo", width: 200, align: "left"}, | |||||
{ label: "姓名", name: "StuName", width: 200, align: "left"}, | |||||
{ label: "奖励名称", name: "EncourgeName", width: 200, align: "left"}, | |||||
{ label: "奖励原因", name: "Reason", width: 200, align: "left"}, | |||||
{ label: "奖励金额", name: "Fee", width: 200, align: "left"}, | |||||
{ label: "奖励日期", name: "EncourgeDate", width: 200, align: "left"}, | |||||
], | ], | ||||
mainId:'ID', | mainId:'ID', | ||||
isPage: true | isPage: true | ||||
@@ -82,6 +111,8 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -0,0 +1,79 @@ | |||||
@{ | |||||
ViewBag.Title = "毕业信息统计"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">学生编码<font face="宋体">*</font></div> | |||||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">性别<font face="宋体">*</font></div> | |||||
<div id="GenderNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">身份证号</div> | |||||
<input id="IdentityCardNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">学籍号</div> | |||||
<input id="StuCode" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">学号<font face="宋体">*</font></div> | |||||
<input id="ProvinceCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<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="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">学制<font face="宋体">*</font></div> | |||||
<div id="EduSystem" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">联系电话<font face="宋体">*</font></div> | |||||
<input id="mobile" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">毕业去向<font face="宋体">*</font></div> | |||||
<div id="GraduateGo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">升入高校名称</div> | |||||
<input id="EnterUniversityName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">大学层次</div> | |||||
<div id="UniversityLevel"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">就业单位名称</div> | |||||
<input id="EmployerName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">就业单位所属省</div> | |||||
<div id="EmployerProvince"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">就业单位所属市</div> | |||||
<div id="EmployerCity"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">就业单位所属县</div> | |||||
<div id="EmployerCountry"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuGraduateStatistic"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuGraduateStatistic/Form.js") |
@@ -0,0 +1,153 @@ | |||||
1 | |||||
2 | |||||
3 | |||||
4 | |||||
5 | |||||
6 | |||||
7 | |||||
8 | |||||
9 | |||||
10 | |||||
11 | |||||
12 | |||||
13 | |||||
14 | |||||
15 | |||||
16 | |||||
17 | |||||
18 | |||||
19 | |||||
20 | |||||
21 | |||||
22 | |||||
23 | |||||
24 | |||||
25 | |||||
26 | |||||
27 | |||||
28 | |||||
29 | |||||
30 | |||||
31 | |||||
32 | |||||
33 | |||||
34 | |||||
35 | |||||
36 | |||||
37 | |||||
38 | |||||
39 | |||||
40 | |||||
41 | |||||
42 | |||||
43 | |||||
44 | |||||
45 | |||||
46 | |||||
47 | |||||
48 | |||||
49 | |||||
50 | |||||
51 | |||||
52 | |||||
53 | |||||
54 | |||||
55 | |||||
56 | |||||
57 | |||||
58 | |||||
59 | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-08-29 16:34 | |||||
* 描 述:毕业信息统计 | |||||
*/ | |||||
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 () { | |||||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||||
$('#EduSystem').lrDataItemSelect({ code: 'EduSystem' }); | |||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
$('#GraduateGo').lrDataItemSelect({ code: 'GraduateGo' }); | |||||
$('#UniversityLevel').lrDataItemSelect({ code: 'GraduateLevel' }); | |||||
$('#EmployerProvince').lrDataSourceSelect({ | |||||
code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#EmployerCity').lrselectRefresh({ | |||||
url: top.$.rootUrl + "/DIC_CITY/GetListByProvinceCode", | |||||
param: { ProvinceCode: item.pcode }, | |||||
value: 'CCODE', | |||||
text: 'CNAME' | |||||
}); | |||||
} else { | |||||
$('#EmployerCity').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
$('#EmployerCountry').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
}); | |||||
$('#EmployerCity').lrselect({ | |||||
value: 'ccode', text: 'cname', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#EmployerCountry').lrselectRefresh({ | |||||
url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", | |||||
param: { cityCode: item.CCODE }, | |||||
value: 'ACODE', | |||||
text: 'ANAME' | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#EmployerCountry').lrselect({ | |||||
value: 'ACODE', text: 'ANAME' | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuGraduateStatistic/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/StuGraduateStatistic/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,56 @@ | |||||
@{ | |||||
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="StuName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学生编码</div> | |||||
<input id="StuNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">毕业去向</div> | |||||
<div id="GraduateGo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">大学层次</div> | |||||
<div id="UniversityLevel"></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/StuGraduateStatistic/Index.js") |
@@ -0,0 +1,309 @@ | |||||
1 | |||||
2 | |||||
3 | |||||
4 | |||||
5 | |||||
6 | |||||
7 | |||||
8 | |||||
9 | |||||
10 | |||||
11 | |||||
12 | |||||
13 | |||||
14 | |||||
15 | |||||
16 | |||||
17 | |||||
18 | |||||
19 | |||||
20 | |||||
21 | |||||
22 | |||||
23 | |||||
24 | |||||
25 | |||||
26 | |||||
27 | |||||
28 | |||||
29 | |||||
30 | |||||
31 | |||||
32 | |||||
33 | |||||
34 | |||||
35 | |||||
36 | |||||
37 | |||||
38 | |||||
39 | |||||
40 | |||||
41 | |||||
42 | |||||
43 | |||||
44 | |||||
45 | |||||
46 | |||||
47 | |||||
48 | |||||
49 | |||||
50 | |||||
51 | |||||
52 | |||||
53 | |||||
54 | |||||
55 | |||||
56 | |||||
57 | |||||
58 | |||||
59 | |||||
60 | |||||
61 | |||||
62 | |||||
63 | |||||
64 | |||||
65 | |||||
66 | |||||
67 | |||||
68 | |||||
69 | |||||
70 | |||||
71 | |||||
72 | |||||
73 | |||||
74 | |||||
75 | |||||
76 | |||||
77 | |||||
78 | |||||
79 | |||||
80 | |||||
81 | |||||
82 | |||||
83 | |||||
84 | |||||
85 | |||||
86 | |||||
87 | |||||
88 | |||||
89 | |||||
90 | |||||
91 | |||||
92 | |||||
93 | |||||
94 | |||||
95 | |||||
96 | |||||
97 | |||||
98 | |||||
99 | |||||
100 | |||||
101 | |||||
102 | |||||
103 | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-08-29 16:34 | |||||
* 描 述:毕业信息统计 | |||||
*/ | |||||
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); | |||||
}, 300, 400); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
$('#GraduateGo').lrDataItemSelect({ code: 'GraduateGo' }); | |||||
$('#UniversityLevel').lrDataItemSelect({ code: 'GraduateLevel' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuGraduateStatistic/Form', | |||||
width: 800, | |||||
height: 600, | |||||
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/StuGraduateStatistic/Form?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 600, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuGraduateStatistic/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuGraduateStatistic/GetPageList', | |||||
headData: [ | |||||
{ label: "学生编码", name: "StuNo", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||||
{ | |||||
label: "性别", name: "GenderNo", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == true ? "男" : "女"; | |||||
} | |||||
}, | |||||
{ label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, | |||||
{ label: "学籍号", name: "StuCode", width: 100, align: "left" }, | |||||
{ label: "学号", name: "ProvinceCode", width: 100, align: "left" }, | |||||
{ | |||||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "学制", name: "EduSystem", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'EduSystem', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "联系电话", name: "mobile", width: 100, align: "left" }, | |||||
{ | |||||
label: "毕业去向", name: "GraduateGo", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'GraduateGo', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "升入高校名称", name: "EnterUniversityName", width: 100, align: "left" }, | |||||
{ | |||||
label: "大学层次", name: "UniversityLevel", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'UniversityLevel', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "就业单位名称", name: "EmployerName", width: 100, align: "left" }, | |||||
{ | |||||
label: "就业单位所属省", name: "EmployerProvince", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE', | |||||
key: value, | |||||
keyId: 'pcode', | |||||
callback: function (_data) { | |||||
callback(_data['pname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "就业单位所属市", name: "EmployerCity", width: 100, 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: "EmployerCountry", width: 150, 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: "Remark", width: 100, 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.init(); | |||||
} |
@@ -38,10 +38,43 @@ | |||||
<div class="lr-form-item-title">民族</div> | <div class="lr-form-item-title">民族</div> | ||||
<div id="NationalityNo"></div> | <div id="NationalityNo"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">身份证号</div> | <div class="lr-form-item-title">身份证号</div> | ||||
<input id="IdentityCardNo" type="text" class="form-control" /> | <input id="IdentityCardNo" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">审核状态</div> | |||||
<div id="CheckMark"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学生编号</div> | |||||
<input id="StuNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学籍号</div> | |||||
<input id="StuCode" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">政治面貌</div> | |||||
<div id="PartyFaceNo"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学制</div> | |||||
<div id="EduSystem"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">身体状态</div> | |||||
<div id="HealthStatus"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学习形式</div> | |||||
<div id="StudyModality"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">是否有照片</div> | |||||
<div id="Photo"></div> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -62,7 +95,7 @@ | |||||
<a id="checkall" class="btn btn-default"><i class="fa fa-print"></i> 审核全部</a> | <a id="checkall" class="btn btn-default"><i class="fa fa-print"></i> 审核全部</a> | ||||
<a id="lr_generate" class="btn btn-default"><i class="fa fa-linode"></i> 生成帐号</a> | <a id="lr_generate" class="btn btn-default"><i class="fa fa-linode"></i> 生成帐号</a> | ||||
<a id="lr_update" class="btn btn-default"><i class="fa fa-braille"></i> 更新帐号</a> | <a id="lr_update" class="btn btn-default"><i class="fa fa-braille"></i> 更新帐号</a> | ||||
@*<a id="lr_synPhoto" class="btn btn-default"><i class="fa fa-braille"></i> 同步照片</a>*@ | |||||
<a id="lr_synPhoto" class="btn btn-default"><i class="fa fa-braille"></i> 同步照片</a> | |||||
<a id="lr_searchChange" class="btn btn-default"><i class="fa fa-search"></i> 查看异动</a> | <a id="lr_searchChange" class="btn btn-default"><i class="fa fa-search"></i> 查看异动</a> | ||||
<a id="lr_photo" class="btn btn-default"><i class="fa fa-search"></i> 拍照</a> | <a id="lr_photo" class="btn btn-default"><i class="fa fa-search"></i> 拍照</a> | ||||
<a id="lr_printInfo" class="btn btn-default"><i class="fa fa-print"></i> 学生简历表</a> | <a id="lr_printInfo" class="btn btn-default"><i class="fa fa-print"></i> 学生简历表</a> | ||||
@@ -10,7 +10,7 @@ var bootstrap = function ($, learun) { | |||||
bind: function () { | bind: function () { | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 300, 400); | |||||
}, 450, 400); | |||||
$('#DeptNo').lrselect({ | $('#DeptNo').lrselect({ | ||||
allowSearch: true, | allowSearch: true, | ||||
value: "deptno", | value: "deptno", | ||||
@@ -70,6 +70,13 @@ var bootstrap = function ($, learun) { | |||||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | ||||
$('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); | $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); | ||||
$('#FiveYear').lrDataItemSelect({ code: 'PieceCultivateWay' }); | $('#FiveYear').lrDataItemSelect({ code: 'PieceCultivateWay' }); | ||||
$('#CheckMark').lrselect({ data: [{ id: '1', text: '已审核' }, { id: '0', text: '未审核' }] }); | |||||
$('#PartyFaceNo').lrDataItemSelect({ code: 'PolityStatus' }); | |||||
$('#EduSystem').lrDataItemSelect({ code: 'EduSystem' }); | |||||
$('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); | |||||
$('#StudyModality').lrDataItemSelect({ code: 'StudyModality' }); | |||||
$('#Photo').lrselect({ data: [{ id: '1', text: '是' }, { id: '0', text: '否' }] }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -29,11 +29,11 @@ | |||||
<div class="col-xs-12 text-center">学籍异动前信息</div> | <div class="col-xs-12 text-center">学籍异动前信息</div> | ||||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | <div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | ||||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | <div class="lr-form-item-title">系部<font face="宋体">*</font></div> | ||||
<div id="DeptNo" readonly="readonly"></div> | |||||
<div id="DeptNo" readonly="readonly"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | <div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | ||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | <div class="lr-form-item-title">专业<font face="宋体">*</font></div> | ||||
<div id="MajorNo" readonly="readonly"></div> | |||||
<div id="MajorNo" readonly="readonly"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | <div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | ||||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | <div class="lr-form-item-title">班级<font face="宋体">*</font></div> | ||||
@@ -47,20 +47,20 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | <div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | ||||
<div class="lr-form-item-title" data-title="新专业">新专业</div> | <div class="lr-form-item-title" data-title="新专业">新专业</div> | ||||
<div id="NewMajorNo" class="contentDiv "></div> | |||||
<div id="NewMajorNo" class="contentDiv zhuanzhuanye"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | <div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | ||||
<div class="lr-form-item-title" data-title="新班级">新班级</div> | <div class="lr-form-item-title" data-title="新班级">新班级</div> | ||||
<div id="NewClassNo" class="contentDiv zhuanban"></div> | <div id="NewClassNo" class="contentDiv zhuanban"></div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 text-center">异动说明</div> | |||||
<div class="NewSchool" style="display:none;"> | <div class="NewSchool" style="display:none;"> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasicChange"> | <div class="col-xs-12 lr-form-item" data-table="StuInfoBasicChange"> | ||||
<div class="lr-form-item-title" data-title="转出学校">转出学校</div> | <div class="lr-form-item-title" data-title="转出学校">转出学校</div> | ||||
<input id="OutSchool" type="text" class="form-control" /> | <input id="OutSchool" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 text-center">异动说明</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasicChange"> | <div class="col-xs-12 lr-form-item" data-table="StuInfoBasicChange"> | ||||
<div class="lr-form-item-title">备注</div> | <div class="lr-form-item-title">备注</div> | ||||
<textarea id="StuChangeRemark" class="form-control" style="height:50px;"></textarea> | <textarea id="StuChangeRemark" class="form-control" style="height:50px;"></textarea> | ||||
@@ -32,37 +32,54 @@ var bootstrap = function ($, learun) { | |||||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | ||||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | ||||
$(".NewContainer").show(); | $(".NewContainer").show(); | ||||
$('#OutSchool').removeAttr("isvalid"); | |||||
$('#OutSchool').removeAttr("checkexpession"); | |||||
$("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title')); | |||||
$('#OutSchool').val(''); | |||||
$(".NewSchool").hide(); | $(".NewSchool").hide(); | ||||
if (item.id === "01" ) { //留级 | |||||
$(".NewSchool").hide(); | |||||
if (item.id === "01" || item.id === "07") { //留级、转班 | |||||
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); | $(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); | ||||
$("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); | $("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); | ||||
$("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); | |||||
$('#OutSchool').val(''); | |||||
var timer1 = setInterval(function () { | |||||
if ($("#NewDeptNo").lrselectGet()) { | |||||
$("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); | |||||
console.log("系部赋值后,在赋值专业:" + $("#NewMajorNo").lrselectGet()); | |||||
clearInterval(timer1); | |||||
} | |||||
}, 1000); | |||||
} else if (item.id === "02") {//转校 | } else if (item.id === "02") {//转校 | ||||
$(".NewSchool").show(); | |||||
$(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | $(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | ||||
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | $(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | ||||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | $(".NewContainer").find('.contentDiv').removeAttr('readonly'); | ||||
$(".NewSchool").find('.OutSchool').attr("isvalid", 'yes'); | |||||
$(".NewSchool").find('.OutSchool').attr("checkexpession"); | |||||
$(".NewSchool").find('.OutSchool').attr('readonly'); | |||||
$("#NewDeptNo").siblings('div').html($("#NewDeptNo").siblings('div').attr('data-title')); | $("#NewDeptNo").siblings('div').html($("#NewDeptNo").siblings('div').attr('data-title')); | ||||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | ||||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | ||||
$(".NewContainer").hide(); | $(".NewContainer").hide(); | ||||
$('#OutSchool').attr("isvalid", 'yes'); | |||||
$('#OutSchool').attr("checkexpession", "NotNull"); | |||||
$("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | |||||
$(".NewSchool").show(); | |||||
} else if (item.id === "03") { //复学 | } else if (item.id === "03") { //复学 | ||||
$(".NewSchool").hide(); | |||||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | |||||
$(".NewSchool").find('.OutSchool').attr("isvalid", "Null"); | |||||
$('#OutSchool').val(''); | |||||
} else if (item.id === "04") { //转入 | |||||
$(".NewSchool").hide(); | |||||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | |||||
$(".NewSchool").find('.OutSchool').attr("isvalid", "Null"); | |||||
$('#OutSchool').val(''); | |||||
$("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); | |||||
var timer2 = setInterval(function () { | |||||
if ($("#NewDeptNo").lrselectGet()) { | |||||
$("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); | |||||
console.log("系部赋值后,在赋值专业:" + $("#NewMajorNo").lrselectGet()); | |||||
clearInterval(timer2); | |||||
} | |||||
}, 1000); | |||||
var timer3 = setInterval(function () { | |||||
if ($("#NewMajorNo").lrselectGet()) { | |||||
$("#NewClassNo").lrselectSet($("#ClassNo").lrselectGet()); | |||||
clearInterval(timer3); | |||||
} | |||||
}, 1000); | |||||
} else if (item.id === "04") { //转入/进 | |||||
learun.alert.warning("异动转进请点击学籍信息管理-异动转入按钮!"); | |||||
$("#StuNo").val(""); | |||||
$("#StuName").val(""); | |||||
} | } | ||||
else { //退学、休学、 | |||||
else if (item.id === "05" || item.id === "06") { //退学、休学、 | |||||
$(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | $(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | ||||
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | $(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | ||||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | $(".NewContainer").find('.contentDiv').removeAttr('readonly'); | ||||
@@ -70,8 +87,11 @@ var bootstrap = function ($, learun) { | |||||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | ||||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | ||||
$(".NewContainer").hide(); | $(".NewContainer").hide(); | ||||
$(".NewSchool").hide(); | |||||
$('#OutSchool').val(''); | |||||
} | |||||
else if (item.id === "08") { //转专业、 | |||||
$(".NewContainer").find('.contentDiv.zhuanzhuanye').removeAttr('readonly'); | |||||
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); | |||||
$("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); | |||||
} | } | ||||
} | } | ||||
@@ -83,6 +103,7 @@ var bootstrap = function ($, learun) { | |||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | ||||
$('#NewDeptNo').lrDataSourceSelect({ | $('#NewDeptNo').lrDataSourceSelect({ | ||||
code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { | code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { | ||||
//console.log("选择的系部为:" + JSON.stringify(item)); | |||||
if (item != null && item != undefined) { | if (item != null && item != undefined) { | ||||
$('#NewMajorNo').lrselectRefresh({ | $('#NewMajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
@@ -98,6 +119,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
$('#NewMajorNo').lrDataSourceSelect({ | $('#NewMajorNo').lrDataSourceSelect({ | ||||
code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: function (item) { | code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: function (item) { | ||||
//console.log("选择的专业为:" + JSON.stringify(item)); | |||||
if (item != null && item != undefined) { | if (item != null && item != undefined) { | ||||
$('#NewClassNo').lrselectRefresh({ | $('#NewClassNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | ||||
@@ -171,29 +193,33 @@ var bootstrap = function ($, learun) { | |||||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | ||||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | ||||
$(".NewContainer").show(); | $(".NewContainer").show(); | ||||
if (data[id].StuChangeType == "01") { //降级、转班 | |||||
$('#OutSchool').removeAttr("isvalid"); | |||||
$('#OutSchool').removeAttr("checkexpession"); | |||||
$("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title')); | |||||
$('#OutSchool').val(''); | |||||
$(".NewSchool").hide(); | |||||
if (data[id].StuChangeType == "01" || data[id].StuChangeType == "07") { //留级、转班 | |||||
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); | $(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); | ||||
$(".NewSchool").hide(); | |||||
$('#OutSchool').val(''); | |||||
} | } | ||||
else if (data[id].StuChangeType == "02") {//转校 | else if (data[id].StuChangeType == "02") {//转校 | ||||
$(".NewSchool").show(); | |||||
$(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | $(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | ||||
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | $(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | ||||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | $(".NewContainer").find('.contentDiv').removeAttr('readonly'); | ||||
$(".NewSchool").find('.OutSchool').attr("isvalid"); | |||||
$(".NewSchool").find('.OutSchool').attr("checkexpession"); | |||||
$(".NewSchool").find('.OutSchool').attr('readonly'); | |||||
$("#NewDeptNo").siblings('div').html($("#NewDeptNo").siblings('div').attr('data-title')); | $("#NewDeptNo").siblings('div').html($("#NewDeptNo").siblings('div').attr('data-title')); | ||||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | ||||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | ||||
$(".NewContainer").hide(); | $(".NewContainer").hide(); | ||||
} else if (data[id].StuChangeType == "03") { //转专业 | |||||
$('#OutSchool').attr("isvalid", 'yes'); | |||||
$('#OutSchool').attr("checkexpession", "NotNull"); | |||||
$("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title') + '<font face="宋体">*</font>'); | |||||
$(".NewSchool").show(); | |||||
} else if (data[id].StuChangeType == "03") { //复学 | |||||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | $(".NewContainer").find('.contentDiv').removeAttr('readonly'); | ||||
$(".NewSchool").hide(); | |||||
$('#OutSchool').val(''); | |||||
} | |||||
else { //退学、休学、转校 | |||||
} else if (data[id].StuChangeType == "04") { //转入/进 | |||||
learun.alert.warning("异动转进请点击学籍信息管理-异动转入按钮!"); | |||||
$("#StuNo").val(""); | |||||
$("#StuName").val(""); | |||||
} else if (data[id].StuChangeType == "05" || data[id].StuChangeType == "06") { //退学、休学、 | |||||
$(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | $(".NewContainer").find('.contentDiv').removeAttr("isvalid"); | ||||
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | $(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); | ||||
$(".NewContainer").find('.contentDiv').removeAttr('readonly'); | $(".NewContainer").find('.contentDiv').removeAttr('readonly'); | ||||
@@ -201,8 +227,10 @@ var bootstrap = function ($, learun) { | |||||
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); | ||||
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); | ||||
$(".NewContainer").hide(); | $(".NewContainer").hide(); | ||||
$(".NewSchool").hide(); | |||||
$('#OutSchool').val(''); | |||||
} | |||||
else if (data[id].StuChangeType == "08") { //转专业、 | |||||
$(".NewContainer").find('.contentDiv.zhuanzhuanye').removeAttr('readonly'); | |||||
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -212,6 +240,7 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
// 保存数据 | // 保存数据 | ||||
acceptClick = function (callBack) { | acceptClick = function (callBack) { | ||||
//console.log($('body').lrGetFormData()); | |||||
if (!$('body').lrValidform()) { | if (!$('body').lrValidform()) { | ||||
return false; | return false; | ||||
} | } | ||||
@@ -218,11 +218,11 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "转出学校", name: "OutSchool", width: 200, align: "left" }, | |||||
{ label: "创建时间", name: "CreateTime", width: 130, align: "left" }, | { label: "创建时间", name: "CreateTime", width: 130, align: "left" }, | ||||
{ label: "创建用户", name: "CreateUserId", width: 100, align: "left" }, | { label: "创建用户", name: "CreateUserId", width: 100, align: "left" }, | ||||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | { label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | ||||
{ label: "审核用户", name: "CheckUserId", width: 100, align: "left" }, | { label: "审核用户", name: "CheckUserId", width: 100, align: "left" }, | ||||
{ label: "转出学校", name: "OutSchool", width: 200, align: "left" }, | |||||
{ label: "备注", name: "StuChangeRemark", width: 200, align: "left" }, | { label: "备注", name: "StuChangeRemark", width: 200, align: "left" }, | ||||
{ | { | ||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | label: "审核状态", name: "CheckStatus", width: 100, align: "left", | ||||
@@ -2,6 +2,9 @@ | |||||
ViewBag.Title = "学籍信息异动"; | ViewBag.Title = "学籍信息异动"; | ||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<script> | |||||
var stuId = "@ViewBag.keyValue"; | |||||
</script> | |||||
<div class="lr-layout "> | <div class="lr-layout "> | ||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
@@ -14,16 +17,20 @@ | |||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">字段</div> | |||||
<div class="lr-form-item-title">异动类型</div> | |||||
<div id="StuChangeType"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">修改属性</div> | |||||
<input id="FieldName" type="text" class="form-control" /> | <input id="FieldName" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">学生主键</div> | |||||
<input id="StuID" value="@ViewBag.keyValue" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">学生姓名</div> | |||||
<div id="StuID"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">修改人</div> | <div class="lr-form-item-title">修改人</div> | ||||
<input id="UpdateBy" type="text" class="form-control" /> | |||||
<div id="UpdateBy"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -45,6 +45,10 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#StuChangeType').lrDataItemSelect({ code: 'StuChangeType' }); | |||||
$('#StuID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); | |||||
$('#UpdateBy').lrDataSourceSelect({ code: 'BaseUser', value: 'f_account', text: 'f_realname' }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -98,9 +102,35 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ | |||||
label: "异动类型", name: "StuChangeType", width: 150, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'StuChangeType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "异动备注", name: "StuChangeRemark", width: 250, align: "left" }, | |||||
{ | |||||
label: "学生姓名", name: "StuID", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||||
key: value, | |||||
keyId: 'stuid', | |||||
callback: function (_data) { | |||||
callback(_data['stuname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "修改属性", name: "FieldName", width: 200, align: "left" }, | { label: "修改属性", name: "FieldName", width: 200, align: "left" }, | ||||
{ label: "修改前", name: "BeforeChange", width: 200, align: "left" }, | { label: "修改前", name: "BeforeChange", width: 200, align: "left" }, | ||||
{ label: "修改后", name: "AfterChange", width: 200, align: "left" }, | { label: "修改后", name: "AfterChange", width: 200, align: "left" }, | ||||
@@ -110,7 +140,7 @@ var bootstrap = function ($, learun) { | |||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | ||||
key: value, | key: value, | ||||
keyId: 'f_account', | |||||
keyId: 'f_userid', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['f_realname']); | callback(_data['f_realname']); | ||||
} | } | ||||
@@ -119,7 +149,6 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
{ label: "修改时间", name: "UpdateTime", width: 200, align: "left" }, | { label: "修改时间", name: "UpdateTime", width: 200, align: "left" }, | ||||
{ label: "数据主键", name: "StuID", width: 250, align: "left" }, | |||||
], | ], | ||||
mainId: 'ID', | mainId: 'ID', | ||||
isPage: true, | isPage: true, | ||||
@@ -130,9 +159,18 @@ var bootstrap = function ($, learun) { | |||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
if ($("#StuID").val() != "" && $("#StuID").length > 0) { | |||||
param.StuID = $("#StuID").val(); | |||||
//赋值 | |||||
if (stuId != "" && stuId != undefined && stuId != null) { | |||||
$('#StuID').lrselectSet(stuId); | |||||
$('#StuID').attr('readonly', 'readonly'); | |||||
$('#StuID').parent().attr('display','none'); | |||||
param.StuID = stuId; | |||||
} else { | |||||
$('#StuID').removeAttr('readonly'); | |||||
$('#StuID').parent().attr('display', 'block'); | |||||
} | } | ||||
param.StartTime = startTime; | param.StartTime = startTime; | ||||
param.EndTime = endTime; | param.EndTime = endTime; | ||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
@@ -7,6 +7,9 @@ | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
<div class="lr-layout-tool-left"> | <div class="lr-layout-tool-left"> | ||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
@@ -22,10 +25,6 @@ | |||||
<div class="lr-form-item-title">处分名称</div> | <div class="lr-form-item-title">处分名称</div> | ||||
<div id="PunishNo"></div> | <div id="PunishNo"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">处分日期</div> | |||||
<input id="PunishDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd' })" /> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -7,15 +7,44 @@ | |||||
var refreshGirdData; | var refreshGirdData; | ||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var startTime; | |||||
var endTime; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.initGird(); | page.initGird(); | ||||
page.bind(); | page.bind(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
// 时间搜索框 | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '3', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 300, 400); | |||||
}, 200, 400); | |||||
$('#PunishNo').lrDataItemSelect({ code: 'Punishment' }); | $('#PunishNo').lrDataItemSelect({ code: 'Punishment' }); | ||||
// 刷新 | // 刷新 | ||||
@@ -137,6 +166,8 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -0,0 +1,39 @@ | |||||
@{ | |||||
ViewBag.Title = "实训设备管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="TrainEquipmentManage" > | |||||
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | |||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TrainEquipmentManage" > | |||||
<div class="lr-form-item-title">实训室名称<font face="宋体">*</font></div> | |||||
<input id="TrainName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TrainEquipmentManage" > | |||||
<div class="lr-form-item-title">设备名称<font face="宋体">*</font></div> | |||||
<input id="EquipmentName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TrainEquipmentManage" > | |||||
<div class="lr-form-item-title">设备型号</div> | |||||
<input id="EquipmentModel" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TrainEquipmentManage" > | |||||
<div class="lr-form-item-title">新增</div> | |||||
<input id="AddNum" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TrainEquipmentManage" > | |||||
<div class="lr-form-item-title">损耗</div> | |||||
<input id="LossNum" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TrainEquipmentManage" > | |||||
<div class="lr-form-item-title">现存</div> | |||||
<input id="ExistNum" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TrainEquipmentManage" > | |||||
<div class="lr-form-item-title">设备金额</div> | |||||
<input id="EquipmentMoney" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.js") |
@@ -0,0 +1,51 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-08-30 10:49 | |||||
* 描 述:实训设备管理 | |||||
*/ | |||||
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 () { | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TrainEquipmentManage/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/TrainEquipmentManage/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="DeptNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">实训室名称</div> | |||||
<input id="TrainName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">设备名称</div> | |||||
<input id="EquipmentName" 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/TrainEquipmentManage/Index.js") |
@@ -0,0 +1,105 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-08-30 10:49 | |||||
* 描 述:实训设备管理 | |||||
*/ | |||||
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); | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/TrainEquipmentManage/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/TrainEquipmentManage/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/TrainEquipmentManage/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/TrainEquipmentManage/GetPageList', | |||||
headData: [ | |||||
{ label: "专业部", name: "DeptNo", 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: "TrainName", width: 100, align: "left"}, | |||||
{ label: "设备名称", name: "EquipmentName", width: 100, align: "left"}, | |||||
{ label: "设备型号", name: "EquipmentModel", width: 100, align: "left"}, | |||||
{ label: "新增", name: "AddNum", width: 100, align: "left"}, | |||||
{ label: "损耗", name: "LossNum", width: 100, align: "left"}, | |||||
{ label: "现存", name: "ExistNum", width: 100, align: "left"}, | |||||
{ label: "设备金额", name: "EquipmentMoney", width: 100, 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.init(); | |||||
} |
@@ -3,25 +3,25 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords" > | |||||
<div class="lr-form-item-title">系</div> | |||||
<div id="DeptNo" ></div> | |||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords"> | |||||
<div class="lr-form-item-title">系<font face="宋体">*</font></div> | |||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords" > | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo" ></div> | |||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords" > | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo" ></div> | |||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords"> | |||||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords" > | |||||
<div class="lr-form-item-title">学生</div> | |||||
<div id="Stuno" ></div> | |||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords"> | |||||
<div class="lr-form-item-title">学生<font face="宋体">*</font></div> | |||||
<div id="Stuno" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords" > | |||||
<div class="col-xs-12 lr-form-item" data-table="APStuHealthRecords"> | |||||
<div class="lr-form-item-title">描述</div> | <div class="lr-form-item-title">描述</div> | ||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/APStuHealthRecords/Form.js") | @Html.AppendJsFile("/Areas/LogisticsManagement/Views/APStuHealthRecords/Form.js") |
@@ -4,12 +4,12 @@ | |||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="MSRIntentionManagement"> | <div class="col-xs-12 lr-form-item" data-table="MSRIntentionManagement"> | ||||
<div class="lr-form-item-title">联系方式</div> | |||||
<input id="Mobile" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">联系方式<font face="宋体">*</font></div> | |||||
<input id="Mobile" type="text" class="form-control" isvalid="yes" checkexpession="Mobile"/> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="MSRIntentionManagement"> | <div class="col-xs-12 lr-form-item" data-table="MSRIntentionManagement"> | ||||
<div class="lr-form-item-title">年龄</div> | |||||
<input id="Age" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">年龄<font face="宋体">*</font></div> | |||||
<input id="Age" type="number" class="form-control" isvalid="yes" checkexpession="NotNull"/> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="MSRIntentionManagement"> | <div class="col-xs-12 lr-form-item" data-table="MSRIntentionManagement"> | ||||
<div class="lr-form-item-title">身高</div> | <div class="lr-form-item-title">身高</div> | ||||
@@ -4,8 +4,8 @@ | |||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="MSRMilitaryRecord"> | <div class="col-xs-12 lr-form-item" data-table="MSRMilitaryRecord"> | ||||
<div class="lr-form-item-title">参军记录</div> | |||||
<input id="Record" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">参军记录<font face="宋体">*</font></div> | |||||
<input id="Record" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"/> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="MSRMilitaryRecord"> | <div class="col-xs-12 lr-form-item" data-table="MSRMilitaryRecord"> | ||||
<div class="lr-form-item-title">备注</div> | <div class="lr-form-item-title">备注</div> | ||||
@@ -0,0 +1,127 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
using System; | |||||
namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-25 11:16 | |||||
/// 描 述:课堂巡查 | |||||
/// </summary> | |||||
public class ClassPatrolController : MvcControllerBase | |||||
{ | |||||
private ClassPatrolIBLL classPatrolIBLL = new ClassPatrolBLL(); | |||||
#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 = classPatrolIBLL.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 ClassPatrolData = classPatrolIBLL.GetClassPatrolEntity( keyValue ); | |||||
var jsonData = new { | |||||
ClassPatrol = ClassPatrolData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
classPatrolIBLL.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) | |||||
{ | |||||
ClassPatrolEntity entity = strEntity.ToObject<ClassPatrolEntity>(); | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.CreateUserId = loginUserInfo.userId; | |||||
entity.CreateTime = DateTime.Now; | |||||
} | |||||
else | |||||
{ | |||||
entity.ModifyUserId = loginUserInfo.userId; | |||||
entity.ModifyTime = DateTime.Now; | |||||
} | |||||
classPatrolIBLL.SaveEntity(keyValue,entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,129 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
using System; | |||||
namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-24 14:38 | |||||
/// 描 述:评教评学 | |||||
/// </summary> | |||||
public class EvaluateTeachLearnController : MvcControllerBase | |||||
{ | |||||
private EvaluateTeachLearnIBLL evaluateTeachLearnIBLL = new EvaluateTeachLearnBLL(); | |||||
#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 = evaluateTeachLearnIBLL.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 EvaluateTeachLearnData = evaluateTeachLearnIBLL.GetEvaluateTeachLearnEntity( keyValue ); | |||||
var jsonData = new { | |||||
EvaluateTeachLearn = EvaluateTeachLearnData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
evaluateTeachLearnIBLL.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) | |||||
{ | |||||
EvaluateTeachLearnEntity entity = strEntity.ToObject<EvaluateTeachLearnEntity>(); | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.CreateUserId = loginUserInfo.userId; | |||||
entity.CreateTime = DateTime.Now; | |||||
} | |||||
else | |||||
{ | |||||
entity.ModifyUserId = loginUserInfo.userId; | |||||
entity.ModifyTime = DateTime.Now; | |||||
} | |||||
evaluateTeachLearnIBLL.SaveEntity(keyValue,entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,31 @@ | |||||
@{ | |||||
ViewBag.Title = "课堂巡查"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="ClassPatrol" > | |||||
<div class="lr-form-item-title">时间<font face="宋体">*</font></div> | |||||
<input id="Time" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Time').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ClassPatrol" > | |||||
<div class="lr-form-item-title">课节<font face="宋体">*</font></div> | |||||
<input id="Section" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ClassPatrol" > | |||||
<div class="lr-form-item-title">教师<font face="宋体">*</font></div> | |||||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ClassPatrol" > | |||||
<div class="lr-form-item-title">科目<font face="宋体">*</font></div> | |||||
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ClassPatrol" > | |||||
<div class="lr-form-item-title">情况记载</div> | |||||
<textarea id="Records" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ClassPatrol" > | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ClassPatrol/Form.js") |
@@ -0,0 +1,52 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-08-25 11:16 | |||||
* 描 述:课堂巡查 | |||||
*/ | |||||
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 () { | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); | |||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo',value: 'lessonno',text: 'lessonname' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ClassPatrol/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 + '/PersonnelManagement/ClassPatrol/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> | |||||
<input id="Section" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">教师</div> | |||||
<div id="EmpNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">科目</div> | |||||
<div id="LessonNo"></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/PersonnelManagement/Views/ClassPatrol/Index.js") |
@@ -0,0 +1,114 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-08-25 11:16 | |||||
* 描 述:课堂巡查 | |||||
*/ | |||||
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); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); | |||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo',value: 'lessonno',text: 'lessonname' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/PersonnelManagement/ClassPatrol/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 + '/PersonnelManagement/ClassPatrol/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 + '/PersonnelManagement/ClassPatrol/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/PersonnelManagement/ClassPatrol/GetPageList', | |||||
headData: [ | |||||
{ label: "时间", name: "Time", width: 100, align: "left"}, | |||||
{ label: "课节", name: "Section", width: 100, align: "left"}, | |||||
{ label: "教师", name: "EmpNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "科目", name: "LessonNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||||
key: value, | |||||
keyId: 'lessonno', | |||||
callback: function (_data) { | |||||
callback(_data['lessonname']); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "情况记载", name: "Records", width: 100, align: "left"}, | |||||
{ label: "备注", name: "Remark", width: 100, 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.init(); | |||||
} |
@@ -7,6 +7,15 @@ | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
<div class="lr-layout-tool-left"> | <div class="lr-layout-tool-left"> | ||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||||
</div> | |||||
</div> | </div> | ||||
<div class="lr-layout-tool-right"> | <div class="lr-layout-tool-right"> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
@@ -7,12 +7,46 @@ | |||||
var refreshGirdData; | var refreshGirdData; | ||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var startTime; | |||||
var endTime; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.initGird(); | page.initGird(); | ||||
page.bind(); | page.bind(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
// 时间搜索框 | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '1', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
// 查询 | |||||
$('#btn_Search').on('click', function () { | |||||
var keyword = $('#txt_Keyword').val(); | |||||
page.search({ keyword: keyword }); | |||||
}); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -82,11 +116,15 @@ var bootstrap = function ($, learun) { | |||||
], | ], | ||||
mainId: 'ID', | mainId: 'ID', | ||||
isPage: true, | isPage: true, | ||||
sidx: 'createtime', | |||||
sord: 'desc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -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="EvaluateTeachLearn" > | |||||
<div class="lr-form-item-title">教师<font face="宋体">*</font></div> | |||||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="EvaluateTeachLearn" > | |||||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="EvaluateTeachLearn" > | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="EvaluateTeachLearn" > | |||||
<div class="lr-form-item-title">满意率<font face="宋体">*</font></div> | |||||
<input id="SatisfacteRate" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="EvaluateTeachLearn" > | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.js") |
@@ -0,0 +1,67 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-08-24 14:38 | |||||
* 描 述:评教评学 | |||||
*/ | |||||
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 () { | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||||
//学年 | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "请选择学年", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "请选择学期", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/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 + '/PersonnelManagement/EvaluateTeachLearn/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,48 @@ | |||||
@{ | |||||
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="EmpNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学年</div> | |||||
<div id="AcademicYearNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学期</div> | |||||
<div id="Semester"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">满意率</div> | |||||
<input id="SatisfacteRate" 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/PersonnelManagement/Views/EvaluateTeachLearn/Index.js") |
@@ -0,0 +1,118 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-08-24 14:38 | |||||
* 描 述:评教评学 | |||||
*/ | |||||
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); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||||
//学年 | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "请选择学年", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "请选择学期", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/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 + '/PersonnelManagement/EvaluateTeachLearn/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 + '/PersonnelManagement/EvaluateTeachLearn/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/GetPageList', | |||||
headData: [ | |||||
{ label: "教师", name: "EmpNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left"}, | |||||
{ label: "学期", name: "Semester", width: 100, align: "left"}, | |||||
{ label: "满意率", name: "SatisfacteRate", width: 100, align: "left"}, | |||||
{ label: "备注", name: "Remark", width: 100, 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.init(); | |||||
} |
@@ -44,9 +44,9 @@ | |||||
<div class="lr-form-item-title">联系电话<font face="宋体">*</font></div> | <div class="lr-form-item-title">联系电话<font face="宋体">*</font></div> | ||||
<input id="LinkPhone" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" /> | <input id="LinkPhone" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" /> | ||||
</div> | </div> | ||||
@*<div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | |||||
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | |||||
<div class="lr-form-item-title">扫码签到</div> | <div class="lr-form-item-title">扫码签到</div> | ||||
<div id="qrCode"></div> | <div id="qrCode"></div> | ||||
</div>*@ | |||||
</div> | |||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js") | @Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js") |
@@ -63,7 +63,7 @@ var bootstrap = function ($, learun) { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
} | } | ||||
//扫码签到 | //扫码签到 | ||||
//makeCode(data[id].Id); | |||||
makeCode(data[id].Id); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -862,6 +862,10 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\StuGraduateConditionController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\StuGraduateConditionController.cs" /> | ||||
<Compile Include="Areas\PersonnelManagement\Controllers\TeachManagementController.cs" /> | <Compile Include="Areas\PersonnelManagement\Controllers\TeachManagementController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\StudentCertificateController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\StudentCertificateController.cs" /> | ||||
<Compile Include="Areas\PersonnelManagement\Controllers\EvaluateTeachLearnController.cs" /> | |||||
<Compile Include="Areas\PersonnelManagement\Controllers\ClassPatrolController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\StuGraduateStatisticController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\TrainEquipmentManageController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -1149,6 +1153,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\StuTuition.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuEnroll\StuTuition.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\Peichart.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuEnroll\Peichart.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\StatisticIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuEnroll\StatisticIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuGraduateStatistic\Form.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuGraduateStatistic\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuGrant\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuGrant\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuGrant\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuGrant\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasicChange\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasicChange\Form.js" /> | ||||
@@ -1223,6 +1229,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\FormYearSemester.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\FormYearSemester.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuGraduateStatistic\Form.cshtml" /> | |||||
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | <None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | ||||
@@ -6850,6 +6857,19 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StudentCertificate\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\StudentCertificate\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StudentCertificate\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StudentCertificate\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StudentCertificate\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\StudentCertificate\Form.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\EvaluateTeachLearn\Index.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\EvaluateTeachLearn\Index.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\EvaluateTeachLearn\Form.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\EvaluateTeachLearn\Form.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ClassPatrol\Index.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ClassPatrol\Index.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ClassPatrol\Form.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ClassPatrol\Form.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuGraduateStatistic\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\TrainEquipmentManage\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\TrainEquipmentManage\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\TrainEquipmentManage\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\TrainEquipmentManage\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | <Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | ||||
@@ -89,7 +89,7 @@ | |||||
<img class="inp_icon" src="~/Content/images/Login/default_account0.png" alt=""> <input id="lr_username" type="text" placeholder="身份证号"> | <img class="inp_icon" src="~/Content/images/Login/default_account0.png" alt=""> <input id="lr_username" type="text" placeholder="身份证号"> | ||||
</div> | </div> | ||||
<div class="lr-login-input"> | <div class="lr-login-input"> | ||||
<img class="inp_icon" src="~/Content/images/Login/default_psw0.png" alt=""><input id="lr_password" type="password" placeholder="手机号"> | |||||
<img class="inp_icon" src="~/Content/images/Login/default_psw0.png" alt=""><input id="lr_password" type="password" placeholder="密码"> | |||||
<span id="psw_change"></span> | <span id="psw_change"></span> | ||||
</div> | </div> | ||||
<div class="lr-login-input lr-login-reg"> | <div class="lr-login-input lr-login-reg"> | ||||
@@ -40,8 +40,7 @@ namespace Learun.Application.WebApi.Modules | |||||
public Response WxUpload(dynamic _) | public Response WxUpload(dynamic _) | ||||
{ | { | ||||
var files = (List<HttpFile>)this.Context.Request.Files; | var files = (List<HttpFile>)this.Context.Request.Files; | ||||
//var folderId = this.GetReqData(); | |||||
string folderId = Guid.NewGuid().ToString(); | |||||
string folderId = Request.Form["folderId"]; | |||||
string filePath = Config.GetValue("AnnexesFile"); | string filePath = Config.GetValue("AnnexesFile"); | ||||
string uploadDate = DateTime.Now.ToString("yyyyMMdd"); | string uploadDate = DateTime.Now.ToString("yyyyMMdd"); | ||||
string fileEextension = Path.GetExtension(files[0].Name); | string fileEextension = Path.GetExtension(files[0].Name); | ||||
@@ -21,12 +21,28 @@ namespace Learun.Application.WebApi.Modules | |||||
{ | { | ||||
Get["/scheme"] = GetScheme; | Get["/scheme"] = GetScheme; | ||||
Get["/data"] = GetData; | Get["/data"] = GetData; | ||||
Get["/folderkey"] = GetFolderkey; | |||||
Post["/save"] = Save; | Post["/save"] = Save; | ||||
Post["/delete"] = DeleteForm; | Post["/delete"] = DeleteForm; | ||||
} | } | ||||
private FormSchemeIBLL formSchemeIBLL = new FormSchemeBLL(); | private FormSchemeIBLL formSchemeIBLL = new FormSchemeBLL(); | ||||
private Response GetFolderkey(dynamic _) | |||||
{ | |||||
List<FolderKeyReq> req = this.GetReqData<List<FolderKeyReq>>();// 获取模板请求数据 | |||||
Dictionary<string, string> dic = new Dictionary<string, string>(); | |||||
foreach (var item in req) | |||||
{ | |||||
if (!string.IsNullOrEmpty(item.processIdName)) | |||||
{ | |||||
var data = formSchemeIBLL.GetFolderKey(item.schemeInfoId, item.processIdName, item.keyValue);// | |||||
dic = data; | |||||
} | |||||
} | |||||
return Success(dic); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取表单模板数据 | /// 获取表单模板数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -104,6 +120,35 @@ namespace Learun.Application.WebApi.Modules | |||||
} | } | ||||
#region 请求参数 | #region 请求参数 | ||||
private class FolderKeyReq | |||||
{ | |||||
/// <summary> | |||||
/// 表单请求Id | |||||
/// </summary> | |||||
public string id { get; set; } | |||||
/// <summary> | |||||
/// 当前自定义表单版本号 | |||||
/// </summary> | |||||
public string ver { get; set; } | |||||
/// <summary> | |||||
/// 流程模板id | |||||
/// </summary> | |||||
public string schemeInfoId { get; set; } | |||||
/// <summary> | |||||
/// 关联字段名称 | |||||
/// </summary> | |||||
public string processIdName { get; set; } | |||||
/// <summary> | |||||
/// 数据主键值 | |||||
/// </summary> | |||||
public string keyValue { get; set; } | |||||
/// <summary> | |||||
/// 表单数据 | |||||
/// </summary> | |||||
public string formData { get; set; } | |||||
} | |||||
private class SchemeReq { | private class SchemeReq { | ||||
/// <summary> | /// <summary> | ||||
/// 表单请求Id | /// 表单请求Id | ||||
@@ -48,6 +48,7 @@ namespace Learun.Application.WebApi | |||||
{ | { | ||||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | ||||
var data = mealCardRunTabIBLL.GetPageList(parameter.pagination, parameter.queryJson); | var data = mealCardRunTabIBLL.GetPageList(parameter.pagination, parameter.queryJson); | ||||
data = data.OrderByDescending(x => x.centralTm); | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
rows = data, | rows = data, | ||||
@@ -8,6 +8,8 @@ using Learun.Application.TwoDevelopment.LR_Desktop; | |||||
using System.Text; | using System.Text; | ||||
using System.Data; | using System.Data; | ||||
using Learun.Application.OA; | using Learun.Application.OA; | ||||
using Learun.Application.Organization; | |||||
using System; | |||||
namespace Learun.Application.WebApi.Modules | namespace Learun.Application.WebApi.Modules | ||||
{ | { | ||||
@@ -15,11 +17,17 @@ namespace Learun.Application.WebApi.Modules | |||||
public class NewsApi : BaseApi | public class NewsApi : BaseApi | ||||
{ | { | ||||
private NoticeIBLL noticeIBLL = new NoticeBLL(); | private NoticeIBLL noticeIBLL = new NoticeBLL(); | ||||
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | |||||
private PostIBLL postIBLL = new PostBLL(); | |||||
private LR_OA_NewsReadIBLL lR_OA_NewsReadIBLL = new LR_OA_NewsReadBLL(); | |||||
public NewsApi() | public NewsApi() | ||||
: base("/learun/news") | : base("/learun/news") | ||||
{ | { | ||||
Get["/list"] = GetList; | Get["/list"] = GetList; | ||||
Get["/shList"] = GetshList; | |||||
Post["/newsRead"] = NewsRead; | |||||
} | } | ||||
@@ -32,7 +40,7 @@ namespace Learun.Application.WebApi.Modules | |||||
{ | { | ||||
var userinfo = LoginUserInfo.Get(); | var userinfo = LoginUserInfo.Get(); | ||||
Pagination paginationobj = new Pagination(); | Pagination paginationobj = new Pagination(); | ||||
var newsList = noticeIBLL.GetList("", userinfo.userId,(Request.Query["F_CategoryId"]!=null?Request.Query["F_CategoryId"].ToString():"")); | |||||
var newsList = noticeIBLL.GetList("", userinfo.userId, (Request.Query["F_CategoryId"] != null ? Request.Query["F_CategoryId"].ToString() : "")); | |||||
var newsListOfSelf = new List<NewsEntity>(); | var newsListOfSelf = new List<NewsEntity>(); | ||||
foreach (var newsitemEntity in newsList) | foreach (var newsitemEntity in newsList) | ||||
@@ -85,6 +93,94 @@ namespace Learun.Application.WebApi.Modules | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetshList(dynamic _) | |||||
{ | |||||
NoticeEntity parameter = this.GetReqData<NoticeEntity>(); | |||||
var shlist = noticeIBLL.GetEntityByProcessId(parameter.ProgressId); | |||||
if (!shlist.F_SendDeptId.IsEmpty()) | |||||
{ | |||||
var Array = shlist.F_SendDeptId.Split(','); | |||||
var deept = departmentIBLL.GetAllList(); | |||||
var SendDeptId = ""; | |||||
foreach (var item in Array) | |||||
{ | |||||
for (int i = 0; i < deept.Count; i++) | |||||
{ | |||||
if (item == deept[i].F_DepartmentId) | |||||
{ | |||||
SendDeptId += deept[i].F_FullName + ","; | |||||
} | |||||
} | |||||
} | |||||
SendDeptId.Trim(','); | |||||
shlist.F_SendDeptId = SendDeptId; | |||||
} | |||||
if (!shlist.F_SendPostId.IsEmpty()) | |||||
{ | |||||
var Array1 = shlist.F_SendPostId.Split(','); | |||||
var post = postIBLL.GetAllList(); | |||||
var F_SendPostId = ""; | |||||
foreach (var item in Array1) | |||||
{ | |||||
for (int i = 0; i < post.Count; i++) | |||||
{ | |||||
if (item == post[i].F_PostId) | |||||
{ | |||||
F_SendPostId += post[i].F_Name + ","; | |||||
} | |||||
} | |||||
} | |||||
F_SendPostId.Trim(','); | |||||
shlist.F_SendPostId = F_SendPostId; | |||||
} | |||||
if (!shlist.F_NewsContent.IsEmpty()) | |||||
{ | |||||
shlist.F_NewsContent = WebHelper.HtmlDecode(shlist.F_NewsContent); | |||||
} | |||||
return Success(shlist); | |||||
} | |||||
/// <summary> | |||||
/// 阅读通知公告 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response NewsRead(dynamic _) | |||||
{ | |||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
NoticeEntity parameter = this.GetReqData<NoticeEntity>(); | |||||
//判断当前用户是否阅读当前通知公告 | |||||
var entity = lR_OA_NewsReadIBLL.GetLR_OA_NewsReadEntityByNewsIdAndUserId(parameter.newsId, loginUserInfo.userId); | |||||
if (entity == null) | |||||
{ | |||||
var lR_OA_NewsRead = new LR_OA_NewsReadEntity() | |||||
{ | |||||
NewsId = parameter.newsId, | |||||
RUserId = loginUserInfo.userId, | |||||
RUserName = loginUserInfo.realName, | |||||
RTime = DateTime.Now | |||||
}; | |||||
lR_OA_NewsReadIBLL.SaveEntity("", lR_OA_NewsRead); | |||||
//修改当前通知公告的浏览量 | |||||
lR_OA_NewsReadIBLL.UpdateNewsPV(parameter.newsId); | |||||
} | |||||
return Success("阅读成功!"); | |||||
} | |||||
#region 私有类 | |||||
private class NoticeEntity | |||||
{ | |||||
public string ProgressId { get; set; } | |||||
public string newsId { get; set; } | |||||
} | |||||
#endregion | |||||
} | } | ||||
@@ -1,4 +1,5 @@ | |||||
using Nancy; | |||||
using System; | |||||
using Nancy; | |||||
using Learun.Util; | using Learun.Util; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | using Learun.Application.TwoDevelopment.EducationalAdministration; | ||||
@@ -21,9 +22,13 @@ namespace Learun.Application.WebApi.Modules | |||||
/// 注册接口 | /// 注册接口 | ||||
/// <summary> | /// <summary> | ||||
public DutyScheduleApi() | public DutyScheduleApi() | ||||
: base("/Learun/adms/PersonnelManagement/DutySchedule") | |||||
: base("/learun/adms/PersonnelManagement/DutySchedule") | |||||
{ | { | ||||
Get["/pagelist"] = GetPageList; | Get["/pagelist"] = GetPageList; | ||||
Get["/list"] = GetList; | |||||
Get["/form"] = GetForm; | |||||
Post["/save"] = SaveForm; | |||||
Post["/delete"] = DeleteForm; | |||||
} | } | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -45,6 +50,74 @@ namespace Learun.Application.WebApi.Modules | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetList(dynamic _) | |||||
{ | |||||
string queryJson = this.GetReqData(); | |||||
var data = dutyScheduleIBLL.GetList(); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetForm(dynamic _) | |||||
{ | |||||
string keyValue = this.GetReqData(); | |||||
var ScheduleData = dutyScheduleIBLL.GetDutyScheduleEntity(keyValue); | |||||
//ScheduleData.StartTime = Convert.ToDateTime((ScheduleData.StartTime.ToDate().ToString("yyyy-MM-dd") + " " + ScheduleData.StartTime.Substring(0, 2) + ":" + ScheduleData.StartTime.Substring(2, 2)).ToDate().ToString("yyyy-MM-dd HH:mm")); | |||||
//ScheduleData.EndTime = Convert.ToDateTime((ScheduleData.EndTime.ToDate().ToString("yyyy-MM-dd") + " " + ScheduleData.EndTime.Substring(0, 2) + ":" + ScheduleData.F_EndTime.Substring(2, 2)).ToDate().ToString("yyyy-MM-dd HH:mm")); | |||||
var jsonData = new | |||||
{ | |||||
Schedule = ScheduleData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="_"></param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response SaveForm(dynamic _) | |||||
{ | |||||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||||
DutyScheduleEntity entity = parameter.strEntity.ToObject<DutyScheduleEntity>(); | |||||
dutyScheduleIBLL.SaveEntity(parameter.keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="_"></param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response DeleteForm(dynamic _) | |||||
{ | |||||
string keyValue = this.GetReqData(); | |||||
dutyScheduleIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
#endregion | |||||
#region 私有类 | |||||
/// <summary> | |||||
/// 表单实体类 | |||||
/// <summary> | |||||
private class ReqFormEntity | |||||
{ | |||||
public string keyValue { get; set; } | |||||
public string strEntity { get; set; } | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -26,6 +26,7 @@ namespace Learun.Application.WebApi | |||||
Get["/form"] = GetForm; | Get["/form"] = GetForm; | ||||
Post["/delete"] = DeleteForm; | Post["/delete"] = DeleteForm; | ||||
Post["/save"] = SaveForm; | Post["/save"] = SaveForm; | ||||
Post["/read"] = NewsRead; | |||||
} | } | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -70,13 +71,26 @@ namespace Learun.Application.WebApi | |||||
{ | { | ||||
string keyValue = this.GetReqData(); | string keyValue = this.GetReqData(); | ||||
var SYS_ReceiveMessageData = sYS_ReceiveMessageIBLL.GetUrlSYS_ReceiveMessageEntity(keyValue); | var SYS_ReceiveMessageData = sYS_ReceiveMessageIBLL.GetUrlSYS_ReceiveMessageEntity(keyValue); | ||||
if (SYS_ReceiveMessageData != null) | |||||
{ | |||||
SYS_ReceiveMessageData.CONTENTS = WebHelper.HtmlDecode(SYS_ReceiveMessageData.CONTENTS); | |||||
} | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
SYS_ReceiveMessage = SYS_ReceiveMessageData, | SYS_ReceiveMessage = SYS_ReceiveMessageData, | ||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 查阅收件箱 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response NewsRead(dynamic _) | |||||
{ | |||||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||||
sYS_ReceiveMessageIBLL.Read(parameter.keyValue); | |||||
return Success("查阅成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -28,6 +28,8 @@ namespace Learun.Application.WebApi | |||||
Get["/form"] = GetForm; | Get["/form"] = GetForm; | ||||
Post["/delete"] = DeleteForm; | Post["/delete"] = DeleteForm; | ||||
Post["/save"] = SaveForm; | Post["/save"] = SaveForm; | ||||
Post["/read"] = NewsRead; | |||||
} | } | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -69,6 +71,7 @@ namespace Learun.Application.WebApi | |||||
{ | { | ||||
string keyValue = this.GetReqData(); | string keyValue = this.GetReqData(); | ||||
var Sys_ReceiveFileData = sys_ReceiveFileIBLL.GetSys_ReceiveFileEntity(keyValue); | var Sys_ReceiveFileData = sys_ReceiveFileIBLL.GetSys_ReceiveFileEntity(keyValue); | ||||
Sys_ReceiveFileData.FilePath = Sys_ReceiveFileData.Url; | |||||
if (Sys_ReceiveFileData != null) | if (Sys_ReceiveFileData != null) | ||||
{ | { | ||||
var result = annexesFileIBLL.GetEntityByFolderId(Sys_ReceiveFileData.Url)?.F_FilePath; | var result = annexesFileIBLL.GetEntityByFolderId(Sys_ReceiveFileData.Url)?.F_FilePath; | ||||
@@ -77,7 +80,7 @@ namespace Learun.Application.WebApi | |||||
result = "/" + result.Substring(result.IndexOf("Resource")); | result = "/" + result.Substring(result.IndexOf("Resource")); | ||||
} | } | ||||
Sys_ReceiveFileData.Url = result; | Sys_ReceiveFileData.Url = result; | ||||
Sys_ReceiveFileData.Contents = WebHelper.HtmlDecode(Sys_ReceiveFileData.Contents); | |||||
} | } | ||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
@@ -112,6 +115,17 @@ namespace Learun.Application.WebApi | |||||
sys_ReceiveFileIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | sys_ReceiveFileIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 查阅公文 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response NewsRead(dynamic _) | |||||
{ | |||||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||||
sys_ReceiveFileIBLL.ReadEntity(parameter.keyValue); | |||||
return Success("查阅成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
#region 私有类 | #region 私有类 | ||||
@@ -89,7 +89,7 @@ namespace Learun.Application.WebApi.Modules | |||||
public Response GetStuLessonInfo(dynamic _) | public Response GetStuLessonInfo(dynamic _) | ||||
{ | { | ||||
var param = this.GetReqData<TimeParameter>(); | var param = this.GetReqData<TimeParameter>(); | ||||
var lessonInfos = stuAttendanceIBLL.GetStuLessonInfo(userInfo.account,param.StartDate,param.EndDate); | |||||
var lessonInfos = stuAttendanceIBLL.GetStuLessonInfo(userInfo.account, param.StartDate, param.EndDate); | |||||
var empNos = lessonInfos.Select(a => a.EmpNo).ToList(); | var empNos = lessonInfos.Select(a => a.EmpNo).ToList(); | ||||
var lessonTerms = arrangeLessonTermIBLL.GetListByEmpNo(empNos); | var lessonTerms = arrangeLessonTermIBLL.GetListByEmpNo(empNos); | ||||
@@ -223,10 +223,10 @@ namespace Learun.Application.WebApi.Modules | |||||
else if (param.Description == "教师") | else if (param.Description == "教师") | ||||
{ | { | ||||
//教师 | //教师 | ||||
var empInfo = empInfoIbll.GetAllList().Where(x => x.EmpNo == userInfo.account).FirstOrDefault().EmpNo; | |||||
var empInfo = empInfoIbll.GetAllList().Where(x => x.EmpNo == param.Account).FirstOrDefault().EmpNo; | |||||
if (empInfo != null) | if (empInfo != null) | ||||
{ | { | ||||
Data = arrangeLessonTermIBLL.GetTimeTableInEducation(param.StartDate, param.EndDate, "", param.EmpNo, ""); | |||||
Data = arrangeLessonTermIBLL.GetTimeTableInEducation(param.StartDate, param.EndDate, "", param.Account, ""); | |||||
} | } | ||||
} | } | ||||
@@ -551,7 +551,91 @@ namespace Learun.Application.Form | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public Dictionary<string, string> GetFolderKey(string schemeInfoId, string processIdName, string keyValue) | |||||
{ | |||||
Dictionary<string, DataTable> res = new Dictionary<string, DataTable>(); | |||||
try | |||||
{ | |||||
FormSchemeInfoEntity formSchemeInfoEntity = GetSchemeInfoEntity(schemeInfoId); | |||||
FormSchemeEntity formSchemeEntity = GetSchemeEntity(formSchemeInfoEntity.F_SchemeId); | |||||
FormSchemeModel formSchemeModel = formSchemeEntity.F_Scheme.ToObject<FormSchemeModel>(); | |||||
// 确定主从表之间的关系 | |||||
List<TreeModelEx<FormTableModel>> TableTree = new List<TreeModelEx<FormTableModel>>();// 从表 | |||||
foreach (var table in formSchemeModel.dbTable) | |||||
{ | |||||
TreeModelEx<FormTableModel> treeone = new TreeModelEx<FormTableModel>(); | |||||
treeone.data = table; | |||||
treeone.id = table.name; | |||||
treeone.parentId = table.relationName; | |||||
if (string.IsNullOrEmpty(table.relationName)) | |||||
{ | |||||
treeone.parentId = "0"; | |||||
} | |||||
TableTree.Add(treeone); | |||||
} | |||||
TableTree = TableTree.ToTree(); | |||||
// 确定表与组件之间的关系 | |||||
Dictionary<string, List<FormCompontModel>> tableComponts = new Dictionary<string, List<FormCompontModel>>(); | |||||
foreach (var tab in formSchemeModel.data) | |||||
{ | |||||
foreach (var compont in tab.componts) | |||||
{ | |||||
if (!string.IsNullOrEmpty(compont.table)) | |||||
{ | |||||
if (!tableComponts.ContainsKey(compont.table)) | |||||
{ | |||||
tableComponts[compont.table] = new List<FormCompontModel>(); | |||||
} | |||||
if (compont.type == "upload") | |||||
{ | |||||
tableComponts[compont.table].Add(compont); | |||||
} | |||||
if (compont.type == "guid") | |||||
{ | |||||
tableComponts[compont.table].Add(compont); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
GetInstanceTableData(TableTree, tableComponts, formSchemeModel.dbId, keyValue, processIdName, null, res); | |||||
Dictionary < string,string> uploadfieldkeyvalue=new Dictionary<string, string>(); | |||||
foreach (var itemCompont in tableComponts) | |||||
{ | |||||
foreach (FormCompontModel formitem in itemCompont.Value) | |||||
{ | |||||
if (formitem.type=="upload") | |||||
{ | |||||
foreach (var resitem in res) | |||||
{ | |||||
if (resitem.Value.Rows.Count>0) | |||||
{ | |||||
if (resitem.Value.Rows[0][formitem.field] != null) | |||||
uploadfieldkeyvalue.Add(formitem.id, resitem.Value.Rows[0][formitem.field].ToString()); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
return uploadfieldkeyvalue; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 保存自定义表单数据 | /// 保存自定义表单数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -137,5 +137,7 @@ namespace Learun.Application.Form | |||||
/// <param name="keyValue">数据主键值</param> | /// <param name="keyValue">数据主键值</param> | ||||
void DeleteInstanceForm(string schemeInfoId, string keyValue); | void DeleteInstanceForm(string schemeInfoId, string keyValue); | ||||
#endregion | #endregion | ||||
Dictionary<string, string> GetFolderKey(string itemSchemeInfoId, string itemProcessIdName, string itemKeyValue); | |||||
} | } | ||||
} | } |
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-29 16:33 | |||||
/// 描 述:毕业信息统计 | |||||
/// </summary> | |||||
public class StuGraduateStatisticMap : EntityTypeConfiguration<StuGraduateStatisticEntity> | |||||
{ | |||||
public StuGraduateStatisticMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("STUGRADUATESTATISTIC"); | |||||
//主键 | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-30 10:49 | |||||
/// 描 述:实训设备管理 | |||||
/// </summary> | |||||
public class TrainEquipmentManageMap : EntityTypeConfiguration<TrainEquipmentManageEntity> | |||||
{ | |||||
public TrainEquipmentManageMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("TRAINEQUIPMENTMANAGE"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -619,6 +619,10 @@ | |||||
<Compile Include="EducationalAdministration\StuGraduateConditionMap.cs" /> | <Compile Include="EducationalAdministration\StuGraduateConditionMap.cs" /> | ||||
<Compile Include="PersonnelManagement\TeachManagementMap.cs" /> | <Compile Include="PersonnelManagement\TeachManagementMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StudentCertificateMap.cs" /> | <Compile Include="EducationalAdministration\StudentCertificateMap.cs" /> | ||||
<Compile Include="PersonnelManagement\EvaluateTeachLearnMap.cs" /> | |||||
<Compile Include="PersonnelManagement\ClassPatrolMap.cs" /> | |||||
<Compile Include="EducationalAdministration\StuGraduateStatisticMap.cs" /> | |||||
<Compile Include="EducationalAdministration\TrainEquipmentManageMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-25 11:16 | |||||
/// 描 述:课堂巡查 | |||||
/// </summary> | |||||
public class ClassPatrolMap : EntityTypeConfiguration<ClassPatrolEntity> | |||||
{ | |||||
public ClassPatrolMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("CLASSPATROL"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-24 14:38 | |||||
/// 描 述:评教评学 | |||||
/// </summary> | |||||
public class EvaluateTeachLearnMap : EntityTypeConfiguration<EvaluateTeachLearnEntity> | |||||
{ | |||||
public EvaluateTeachLearnMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("EVALUATETEACHLEARN"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -164,11 +164,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
if (!queryParam["accountName"].IsEmpty()) | if (!queryParam["accountName"].IsEmpty()) | ||||
{ | { | ||||
var IsPhone = queryParam["IsPhone"].ToString(); | |||||
if (IsPhone == "0") | |||||
var IsPhone = ""; | |||||
if (!queryParam["IsPhone"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("accountName", queryParam["accountName"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.accountName = @accountName "); | |||||
IsPhone = queryParam["IsPhone"].ToString(); | |||||
if (IsPhone == "0") | |||||
{ | |||||
var accountName = queryParam["accountName"].ToString(); | |||||
if (accountName != "超级管理员") | |||||
{ | |||||
dp.Add("accountName", queryParam["accountName"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.accountName = @accountName "); | |||||
} | |||||
} | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
@@ -110,6 +110,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string FilePath { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -166,6 +166,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
var result = this.BaseRepository().FindEntity<SYS_ReceiveMessageEntity>(keyValue); | var result = this.BaseRepository().FindEntity<SYS_ReceiveMessageEntity>(keyValue); | ||||
result.FilePath = result.URL; | |||||
result.URL = this.BaseRepository().FindEntity<AnnexesFileEntity>(a => a.F_FolderId == result.URL)?.F_FilePath; | result.URL = this.BaseRepository().FindEntity<AnnexesFileEntity>(a => a.F_FolderId == result.URL)?.F_FilePath; | ||||
if (!string.IsNullOrEmpty(result.URL)) | if (!string.IsNullOrEmpty(result.URL)) | ||||
{ | { | ||||
@@ -82,12 +82,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("EncourgeName", "%" + queryParam["EncourgeName"].ToString() + "%", DbType.String); | dp.Add("EncourgeName", "%" + queryParam["EncourgeName"].ToString() + "%", DbType.String); | ||||
strSql.Append(" AND t.EncourgeName Like @EncourgeName "); | strSql.Append(" AND t.EncourgeName Like @EncourgeName "); | ||||
} | } | ||||
if (!queryParam["EncourgeDate"].IsEmpty()) | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("EncourgeDate", queryParam["EncourgeDate"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EncourgeDate = @EncourgeDate "); | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.EncourgeDate >= @startTime AND t.EncourgeDate <= @endTime ) "); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<StuEncourgementEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<StuEncourgementEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-29 16:33 | |||||
/// 描 述:毕业信息统计 | |||||
/// </summary> | |||||
public class StuGraduateStatisticBLL : StuGraduateStatisticIBLL | |||||
{ | |||||
private StuGraduateStatisticService stuGraduateStatisticService = new StuGraduateStatisticService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuGraduateStatisticEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuGraduateStatisticService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取StuGraduateStatistic表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public StuGraduateStatisticEntity GetStuGraduateStatisticEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return stuGraduateStatisticService.GetStuGraduateStatisticEntity(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 | |||||
{ | |||||
stuGraduateStatisticService.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, StuGraduateStatisticEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
stuGraduateStatisticService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,135 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-29 16:33 | |||||
/// 描 述:毕业信息统计 | |||||
/// </summary> | |||||
public class StuGraduateStatisticEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 学号 | |||||
/// </summary> | |||||
[Column("STUNO")] | |||||
public string StuNo { get; set; } | |||||
/// <summary> | |||||
/// 姓名 | |||||
/// </summary> | |||||
[Column("STUNAME")] | |||||
public string StuName { get; set; } | |||||
/// <summary> | |||||
/// 性别 | |||||
/// </summary> | |||||
[Column("GENDERNO")] | |||||
public bool? GenderNo { get; set; } | |||||
/// <summary> | |||||
/// 身份证号 | |||||
/// </summary> | |||||
[Column("IDENTITYCARDNO")] | |||||
public string IdentityCardNo { get; set; } | |||||
/// <summary> | |||||
/// 学籍号 | |||||
/// </summary> | |||||
[Column("STUCODE")] | |||||
public string StuCode { get; set; } | |||||
/// <summary> | |||||
/// 省编学号 | |||||
/// </summary> | |||||
[Column("PROVINCECODE")] | |||||
public string ProvinceCode { get; set; } | |||||
/// <summary> | |||||
/// 专业 | |||||
/// </summary> | |||||
[Column("MAJORNO")] | |||||
public string MajorNo { get; set; } | |||||
/// <summary> | |||||
/// 学制 | |||||
/// </summary> | |||||
[Column("EDUSYSTEM")] | |||||
public string EduSystem { get; set; } | |||||
/// <summary> | |||||
/// 班级 | |||||
/// </summary> | |||||
[Column("CLASSNO")] | |||||
public string ClassNo { get; set; } | |||||
/// <summary> | |||||
/// 联系电话 | |||||
/// </summary> | |||||
[Column("MOBILE")] | |||||
public string mobile { get; set; } | |||||
/// <summary> | |||||
/// 毕业去向 | |||||
/// </summary> | |||||
[Column("GRADUATEGO")] | |||||
public string GraduateGo { get; set; } | |||||
/// <summary> | |||||
/// 升入高校名称 | |||||
/// </summary> | |||||
[Column("ENTERUNIVERSITYNAME")] | |||||
public string EnterUniversityName { get; set; } | |||||
/// <summary> | |||||
/// 大学层次(本科/专科) | |||||
/// </summary> | |||||
[Column("UNIVERSITYLEVEL")] | |||||
public string UniversityLevel { get; set; } | |||||
/// <summary> | |||||
/// 就业单位名称 | |||||
/// </summary> | |||||
[Column("EMPLOYERNAME")] | |||||
public string EmployerName { get; set; } | |||||
/// <summary> | |||||
/// 就业单位所属省 | |||||
/// </summary> | |||||
[Column("EMPLOYERPROVINCE")] | |||||
public string EmployerProvince { get; set; } | |||||
/// <summary> | |||||
/// 就业单位所属市 | |||||
/// </summary> | |||||
[Column("EMPLOYERCITY")] | |||||
public string EmployerCity { get; set; } | |||||
/// <summary> | |||||
/// 就业单位所属县(区) | |||||
/// </summary> | |||||
[Column("EMPLOYERCOUNTRY")] | |||||
public string EmployerCountry { get; set; } | |||||
/// <summary> | |||||
/// 备注 | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { 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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-29 16:33 | |||||
/// 描 述:毕业信息统计 | |||||
/// </summary> | |||||
public interface StuGraduateStatisticIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<StuGraduateStatisticEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取StuGraduateStatistic表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
StuGraduateStatisticEntity GetStuGraduateStatisticEntity(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, StuGraduateStatisticEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,191 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-29 16:33 | |||||
/// 描 述:毕业信息统计 | |||||
/// </summary> | |||||
public class StuGraduateStatisticService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuGraduateStatisticEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.StuNo, | |||||
t.StuName, | |||||
t.GenderNo, | |||||
t.IdentityCardNo, | |||||
t.StuCode, | |||||
t.ProvinceCode, | |||||
t.MajorNo, | |||||
t.EduSystem, | |||||
t.ClassNo, | |||||
t.mobile, | |||||
t.GraduateGo, | |||||
t.EnterUniversityName, | |||||
t.UniversityLevel, | |||||
t.EmployerName, | |||||
t.EmployerProvince, | |||||
t.EmployerCity, | |||||
t.EmployerCountry | |||||
"); | |||||
strSql.Append(" FROM StuGraduateStatistic t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuName Like @StuName "); | |||||
} | |||||
if (!queryParam["StuNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuNo Like @StuNo "); | |||||
} | |||||
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 "); | |||||
} | |||||
if (!queryParam["GraduateGo"].IsEmpty()) | |||||
{ | |||||
dp.Add("GraduateGo",queryParam["GraduateGo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.GraduateGo = @GraduateGo "); | |||||
} | |||||
if (!queryParam["UniversityLevel"].IsEmpty()) | |||||
{ | |||||
dp.Add("UniversityLevel",queryParam["UniversityLevel"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.UniversityLevel = @UniversityLevel "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuGraduateStatisticEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取StuGraduateStatistic表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public StuGraduateStatisticEntity GetStuGraduateStatisticEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuGraduateStatisticEntity>(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<StuGraduateStatisticEntity>(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, StuGraduateStatisticEntity 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 | |||||
} | |||||
} |
@@ -464,7 +464,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("STUDYMODALITY")] | [Column("STUDYMODALITY")] | ||||
public string StudyModality { get; set; } | public string StudyModality { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 学籍异动状态 | |||||
/// 学籍异动状态(1表示不显示成绩) | |||||
/// </summary> | /// </summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
[Column("CHANGESTATUS")] | [Column("CHANGESTATUS")] | ||||
@@ -103,6 +103,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("Remark", "%" + queryParam["Remark"].ToString() + "%", DbType.String); | dp.Add("Remark", "%" + queryParam["Remark"].ToString() + "%", DbType.String); | ||||
strSql.Append(" AND t.Remark Like @Remark "); | strSql.Append(" AND t.Remark Like @Remark "); | ||||
} | } | ||||
if (!queryParam["CheckMark"].IsEmpty()) | |||||
{ | |||||
dp.Add("CheckMark", "" + queryParam["CheckMark"].ToString() + "", DbType.String); | |||||
if (queryParam["CheckMark"].ToString() == "1") | |||||
{ | |||||
strSql.Append(" AND t.CheckMark=@CheckMark "); | |||||
} | |||||
else | |||||
{ | |||||
strSql.Append(" AND (t.CheckMark is null or t.CheckMark='0') "); | |||||
} | |||||
} | |||||
if (!queryParam["StuCode"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuCode", "%" + queryParam["StuCode"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuCode Like @StuCode "); | |||||
} | |||||
if (!queryParam["PartyFaceNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("PartyFaceNo", "" + queryParam["PartyFaceNo"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND t.PartyFaceNo = @PartyFaceNo "); | |||||
} | |||||
if (!queryParam["EduSystem"].IsEmpty()) | |||||
{ | |||||
dp.Add("EduSystem", "" + queryParam["EduSystem"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND t.EduSystem = @EduSystem "); | |||||
} | |||||
if (!queryParam["HealthStatus"].IsEmpty()) | |||||
{ | |||||
dp.Add("HealthStatus", "" + queryParam["HealthStatus"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND t.HealthStatus = @HealthStatus "); | |||||
} | |||||
if (!queryParam["StudyModality"].IsEmpty()) | |||||
{ | |||||
dp.Add("StudyModality", "" + queryParam["StudyModality"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND t.StudyModality = @StudyModality "); | |||||
} | |||||
if (!queryParam["Photo"].IsEmpty()) | |||||
{ | |||||
dp.Add("Photo", "" + queryParam["Photo"].ToString() + "", DbType.String); | |||||
if (queryParam["Photo"].ToString() == "1") | |||||
{ | |||||
strSql.Append(" AND t.Photo is not null "); | |||||
} | |||||
else | |||||
{ | |||||
strSql.Append(" AND t.Photo is null "); | |||||
} | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -474,13 +525,38 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var url = AppDomain.CurrentDomain.BaseDirectory; | var url = AppDomain.CurrentDomain.BaseDirectory; | ||||
foreach (var stuInfo in stuList) | foreach (var stuInfo in stuList) | ||||
{ | { | ||||
//照片不为空 | |||||
if (!string.IsNullOrEmpty(stuInfo.Photo)) | |||||
//判断要上传的照片在本地服务器中是否存在 | |||||
var photoPath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg"; | |||||
if (System.IO.File.Exists(photoPath)) | |||||
{ | { | ||||
var annex = this.BaseRepository() | |||||
.FindEntity<AnnexesFileEntity>(a => a.F_FolderId == stuInfo.Photo); | |||||
if (annex == null) | |||||
//学籍表中照片字段不为空 | |||||
if (!string.IsNullOrEmpty(stuInfo.Photo)) | |||||
{ | { | ||||
var annex = this.BaseRepository() | |||||
.FindEntity<AnnexesFileEntity>(a => a.F_FolderId == stuInfo.Photo); | |||||
if (annex == null) | |||||
{ | |||||
var annexEntity = new AnnexesFileEntity() | |||||
{ | |||||
F_Id = Guid.NewGuid().ToString(), | |||||
F_FileName = stuInfo.IdentityCardNo + ".jpg", | |||||
F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg", | |||||
F_FolderId = stuInfo.Photo | |||||
}; | |||||
this.BaseRepository().Insert(annexEntity); | |||||
} | |||||
else | |||||
{ | |||||
annex.F_FileName = stuInfo.IdentityCardNo + ".jpg"; | |||||
annex.F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg"; | |||||
this.BaseRepository().Update(annex); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
stuInfo.Photo = Guid.NewGuid().ToString(); | |||||
var annexEntity = new AnnexesFileEntity() | var annexEntity = new AnnexesFileEntity() | ||||
{ | { | ||||
F_Id = Guid.NewGuid().ToString(), | F_Id = Guid.NewGuid().ToString(), | ||||
@@ -488,32 +564,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg", | F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg", | ||||
F_FolderId = stuInfo.Photo | F_FolderId = stuInfo.Photo | ||||
}; | }; | ||||
annexEntity.Create(); | |||||
this.BaseRepository("CollegeMIS").Update(stuInfo); | |||||
this.BaseRepository().Insert(annexEntity); | this.BaseRepository().Insert(annexEntity); | ||||
} | |||||
else | |||||
{ | |||||
annex.F_FileName = stuInfo.IdentityCardNo + ".jpg"; | |||||
annex.F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg"; | |||||
this.BaseRepository().Update(annex); | |||||
} | } | ||||
} | } | ||||
else | |||||
{ | |||||
stuInfo.Photo = Guid.NewGuid().ToString(); | |||||
var annexEntity = new AnnexesFileEntity() | |||||
{ | |||||
F_Id = Guid.NewGuid().ToString(), | |||||
F_FileName = stuInfo.IdentityCardNo + ".jpg", | |||||
F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg", | |||||
F_FolderId = stuInfo.Photo | |||||
}; | |||||
annexEntity.Create(); | |||||
this.BaseRepository("CollegeMIS").Update(stuInfo); | |||||
this.BaseRepository().Insert(annexEntity); | |||||
} | |||||
} | } | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -1035,16 +1091,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <returns></returns> | /// <returns></returns> | ||||
public void SaveEntity(string keyValue, StuInfoBasicEntity entity) | public void SaveEntity(string keyValue, StuInfoBasicEntity entity) | ||||
{ | { | ||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | try | ||||
{ | { | ||||
UserIBLL userIBLL = new UserBLL(); | UserIBLL userIBLL = new UserBLL(); | ||||
var loginUser = LoginUserInfo.Get(); | |||||
if (!string.IsNullOrEmpty(keyValue)) | if (!string.IsNullOrEmpty(keyValue)) | ||||
{ | { | ||||
entity.Modify(keyValue); | entity.Modify(keyValue); | ||||
var oldEntity = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(keyValue); | var oldEntity = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(keyValue); | ||||
List<StuInfoBasic_ChangeLogEntity> list = new List<StuInfoBasic_ChangeLogEntity>(); | List<StuInfoBasic_ChangeLogEntity> list = new List<StuInfoBasic_ChangeLogEntity>(); | ||||
var loginUser = LoginUserInfo.Get(); | |||||
var tableInfos = this.BaseRepository("CollegeMIS").FindTable(@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value] | var tableInfos = this.BaseRepository("CollegeMIS").FindTable(@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value] | ||||
as varchar(100)) AS [字段说明] | as varchar(100)) AS [字段说明] | ||||
FROM sys.tables AS t | FROM sys.tables AS t | ||||
@@ -1082,7 +1139,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
AfterChange = newValue.ToString(), | AfterChange = newValue.ToString(), | ||||
FieldName = columnName, | FieldName = columnName, | ||||
UpdateBy = loginUser.userId, | UpdateBy = loginUser.userId, | ||||
UpdateTime = DateTime.Now | |||||
UpdateTime = DateTime.Now, | |||||
StuChangeType="09", | |||||
StuChangeRemark="点击学籍信息管理-修改按钮进行操作" | |||||
}; | }; | ||||
changeEntity.Create(); | changeEntity.Create(); | ||||
list.Add(changeEntity); | list.Add(changeEntity); | ||||
@@ -1092,7 +1151,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (list.Count > 0) | if (list.Count > 0) | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Insert(list); | |||||
db.Insert(list); | |||||
} | } | ||||
@@ -1113,37 +1172,55 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
userIBLL.SaveEntity(baseUser.F_UserId, baseUser); | userIBLL.SaveEntity(baseUser.F_UserId, baseUser); | ||||
} | } | ||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
db.Update(entity); | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
entity.Create(); | entity.Create(); | ||||
if (entity.IsTran == "0") | |||||
if (entity.IsTran == "0")//转入/进 | |||||
{ | { | ||||
StuInfoBasicChangeEntity stuinfoChange = new StuInfoBasicChangeEntity | |||||
//学籍异动表 | |||||
//StuInfoBasicChangeEntity stuinfoChange = new StuInfoBasicChangeEntity | |||||
//{ | |||||
// Id = Guid.NewGuid().ToString(), | |||||
// StuNo = entity.StuNo, | |||||
// StuName = entity.StuName, | |||||
// DeptNo = entity.DeptNo, | |||||
// MajorNo = entity.MajorNo, | |||||
// ClassNo = entity.ClassNo, | |||||
// StuChangeRemark = entity.Remark, | |||||
// NewDeptNo = entity.DeptNo, | |||||
// NewMajorNo = entity.MajorNo, | |||||
// NewClassNo = entity.ClassNo, | |||||
// CreateUserId = entity.StuNo, | |||||
// StuChangeType = "04", | |||||
// StuChangeReason = "10", | |||||
// CreateTime = DateTime.Now, | |||||
//}; | |||||
//db.Insert(stuinfoChange); | |||||
//学籍异动日志表 | |||||
var changeEntity = new StuInfoBasic_ChangeLogEntity | |||||
{ | { | ||||
Id = Guid.NewGuid().ToString(), | |||||
StuNo = entity.StuNo, | |||||
StuName = entity.StuName, | |||||
DeptNo = entity.DeptNo, | |||||
MajorNo = entity.MajorNo, | |||||
ClassNo = entity.ClassNo, | |||||
StuChangeRemark = entity.Remark, | |||||
NewDeptNo = entity.DeptNo, | |||||
NewMajorNo = entity.MajorNo, | |||||
NewClassNo = entity.ClassNo, | |||||
CreateUserId = entity.StuNo, | |||||
StuID = entity.StuId, | |||||
BeforeChange = "", | |||||
AfterChange = "", | |||||
FieldName = "", | |||||
UpdateBy = loginUser.userId, | |||||
UpdateTime = DateTime.Now, | |||||
StuChangeType = "04", | StuChangeType = "04", | ||||
StuChangeReason = "10", | |||||
CreateTime = DateTime.Now, | |||||
StuChangeRemark = "点击学籍信息管理-异动转入按钮进行操作" | |||||
}; | }; | ||||
this.BaseRepository("CollegeMIS").Insert(stuinfoChange); | |||||
changeEntity.Create(); | |||||
db.Insert(changeEntity); | |||||
} | } | ||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
db.Insert(entity); | |||||
} | } | ||||
db.Commit(); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | if (ex is ExceptionEx) | ||||
{ | { | ||||
throw; | throw; | ||||
@@ -45,17 +45,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("CLASSNO")] | [Column("CLASSNO")] | ||||
public string ClassNo { get; set; } | public string ClassNo { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// StuChangeType | |||||
/// 异动类型(留级01,转出/校02,复学03,转入/进04,退学05,休学06,转班07,转专业08,学籍关键信息更改09) | |||||
/// </summary> | /// </summary> | ||||
[Column("STUCHANGETYPE")] | [Column("STUCHANGETYPE")] | ||||
public string StuChangeType { get; set; } | public string StuChangeType { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// StuChangeReason | |||||
/// 异动原因 | |||||
/// </summary> | /// </summary> | ||||
[Column("STUCHANGEREASON")] | [Column("STUCHANGEREASON")] | ||||
public string StuChangeReason { get; set; } | public string StuChangeReason { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// StuChangeRemark | |||||
/// 异动备注 | |||||
/// </summary> | /// </summary> | ||||
[Column("STUCHANGEREMARK")] | [Column("STUCHANGEREMARK")] | ||||
public string StuChangeRemark { get; set; } | public string StuChangeRemark { get; set; } | ||||
@@ -149,30 +149,215 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | var db = this.BaseRepository("CollegeMIS").BeginTrans(); | ||||
try | try | ||||
{ | { | ||||
var loginUserInfo = LoginUserInfo.Get(); | |||||
var now = DateTime.Now; | |||||
var logList = new List<StuInfoBasic_ChangeLogEntity>(); | |||||
var entity = db.FindEntity<StuInfoBasicChangeEntity>(x => x.Id == keyValue); | var entity = db.FindEntity<StuInfoBasicChangeEntity>(x => x.Id == keyValue); | ||||
if (entity != null) | if (entity != null) | ||||
{ | { | ||||
//处理数据 | |||||
if (entity.StuChangeType == "01" || entity.StuChangeType == "03") //降级、转班、转专业 | |||||
var stuInfoBasicEntity = db.FindEntity<StuInfoBasicEntity>(x => x.StuNo == entity.StuNo); | |||||
if (stuInfoBasicEntity != null) | |||||
{ | { | ||||
//改信息; | |||||
var classInfoEntity = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo); | |||||
if (classInfoEntity != null) | |||||
//处理数据 | |||||
if (entity.StuChangeType == "01" || entity.StuChangeType == "07") //降级、转班、 | |||||
{ | { | ||||
db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.NewDeptNo}',MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); | |||||
if (stuInfoBasicEntity.ClassNo != entity.NewClassNo) | |||||
{ | |||||
var classInfoEntity = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo); | |||||
if (classInfoEntity != null) | |||||
{ | |||||
if (stuInfoBasicEntity.Grade != classInfoEntity.Grade) | |||||
{ | |||||
//增加异动日志表:年级 | |||||
var logentity2 = new StuInfoBasic_ChangeLogEntity() | |||||
{ | |||||
FieldName = "年级", | |||||
BeforeChange = stuInfoBasicEntity.Grade, | |||||
AfterChange = classInfoEntity.Grade, | |||||
UpdateBy = loginUserInfo.userId, | |||||
UpdateTime = now, | |||||
StuID = stuInfoBasicEntity.StuId, | |||||
StuChangeType = entity.StuChangeType, | |||||
StuChangeRemark = entity.StuChangeRemark, | |||||
StuChangeId = entity.Id | |||||
}; | |||||
logentity2.Create(); | |||||
logList.Add(logentity2); | |||||
} | |||||
//改学籍信息表; | |||||
db.ExecuteBySql($"update StuInfoBasic set ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); | |||||
//增加异动日志表:班级 | |||||
var logentity = new StuInfoBasic_ChangeLogEntity() | |||||
{ | |||||
FieldName = "班级", | |||||
BeforeChange = entity.ClassNo, | |||||
AfterChange = entity.NewClassNo, | |||||
UpdateBy = loginUserInfo.userId, | |||||
UpdateTime = now, | |||||
StuID = stuInfoBasicEntity.StuId, | |||||
StuChangeType = entity.StuChangeType, | |||||
StuChangeRemark = entity.StuChangeRemark, | |||||
StuChangeId = entity.Id | |||||
}; | |||||
logentity.Create(); | |||||
logList.Add(logentity); | |||||
} | |||||
} | |||||
} | } | ||||
} | |||||
else if (entity.StuChangeType == "02" || entity.StuChangeType == "04") //退学、休学 | |||||
{ | |||||
//改信息;不显示成绩; | |||||
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' "); | |||||
} | |||||
else if (entity.StuChangeType == "02" || entity.StuChangeType == "05" || entity.StuChangeType == "06") //转校、退学、休学、 | |||||
{ | |||||
//增加异动日志表:学籍异动状态 | |||||
var logentity = new StuInfoBasic_ChangeLogEntity() | |||||
{ | |||||
FieldName = "学籍异动状态", | |||||
BeforeChange = stuInfoBasicEntity.ChangeStatus?.ToString(), | |||||
AfterChange = "1", | |||||
UpdateBy = loginUserInfo.userId, | |||||
UpdateTime = now, | |||||
StuID = stuInfoBasicEntity.StuId, | |||||
StuChangeType = entity.StuChangeType, | |||||
StuChangeRemark = entity.StuChangeRemark, | |||||
StuChangeId = entity.Id | |||||
}; | |||||
logentity.Create(); | |||||
logList.Add(logentity); | |||||
//改学籍信息(异动状态为1表示不显示成绩); | |||||
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' "); | |||||
} | |||||
else if (entity.StuChangeType == "03") //复学 | |||||
{ | |||||
//增加异动日志表:学籍异动状态 | |||||
var logentity = new StuInfoBasic_ChangeLogEntity() | |||||
{ | |||||
FieldName = "学籍异动状态", | |||||
BeforeChange = stuInfoBasicEntity.ChangeStatus?.ToString(), | |||||
AfterChange = "0", | |||||
UpdateBy = loginUserInfo.userId, | |||||
UpdateTime = now, | |||||
StuID = stuInfoBasicEntity.StuId, | |||||
StuChangeType = entity.StuChangeType, | |||||
StuChangeRemark = entity.StuChangeRemark, | |||||
StuChangeId = entity.Id | |||||
}; | |||||
logentity.Create(); | |||||
logList.Add(logentity); | |||||
//改学籍信息(异动状态为0表示显示成绩); | |||||
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=null where StuNo='{entity.StuNo}' "); | |||||
} | |||||
else if (entity.StuChangeType == "08") //转专业、 | |||||
{ | |||||
if (stuInfoBasicEntity.MajorNo != entity.NewMajorNo) | |||||
{ | |||||
var classInfoEntity2 = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo); | |||||
if (classInfoEntity2 != null) | |||||
{ | |||||
if (stuInfoBasicEntity.Grade != classInfoEntity2.Grade) | |||||
{ | |||||
//增加异动日志表:年级 | |||||
var logentity3 = new StuInfoBasic_ChangeLogEntity() | |||||
{ | |||||
FieldName = "年级", | |||||
BeforeChange = stuInfoBasicEntity.Grade, | |||||
AfterChange = classInfoEntity2.Grade, | |||||
UpdateBy = loginUserInfo.userId, | |||||
UpdateTime = now, | |||||
StuID = stuInfoBasicEntity.StuId, | |||||
StuChangeType = entity.StuChangeType, | |||||
StuChangeRemark = entity.StuChangeRemark, | |||||
StuChangeId = entity.Id | |||||
}; | |||||
logentity3.Create(); | |||||
logList.Add(logentity3); | |||||
} | |||||
//改学籍信息; | |||||
db.ExecuteBySql($"update StuInfoBasic set MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity2.Grade}' where StuNo='{entity.StuNo}' "); | |||||
//增加异动日志表:专业 | |||||
var logentity = new StuInfoBasic_ChangeLogEntity() | |||||
{ | |||||
FieldName = "专业", | |||||
BeforeChange = entity.MajorNo, | |||||
AfterChange = entity.NewMajorNo, | |||||
UpdateBy = loginUserInfo.userId, | |||||
UpdateTime = now, | |||||
StuID = stuInfoBasicEntity.StuId, | |||||
StuChangeType = entity.StuChangeType, | |||||
StuChangeRemark = entity.StuChangeRemark, | |||||
StuChangeId = entity.Id | |||||
}; | |||||
logentity.Create(); | |||||
logList.Add(logentity); | |||||
//增加异动日志表:班级 | |||||
var logentity2 = new StuInfoBasic_ChangeLogEntity() | |||||
{ | |||||
FieldName = "班级", | |||||
BeforeChange = entity.ClassNo, | |||||
AfterChange = entity.NewClassNo, | |||||
UpdateBy = loginUserInfo.userId, | |||||
UpdateTime = now, | |||||
StuID = stuInfoBasicEntity.StuId, | |||||
StuChangeType = entity.StuChangeType, | |||||
StuChangeRemark = entity.StuChangeRemark, | |||||
StuChangeId = entity.Id | |||||
}; | |||||
logentity2.Create(); | |||||
logList.Add(logentity2); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
if (stuInfoBasicEntity.ClassNo != entity.NewClassNo) | |||||
{ | |||||
var classInfoEntity2 = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo); | |||||
if (classInfoEntity2 != null) | |||||
{ | |||||
if (stuInfoBasicEntity.Grade != classInfoEntity2.Grade) | |||||
{ | |||||
//增加异动日志表:年级 | |||||
var logentity2 = new StuInfoBasic_ChangeLogEntity() | |||||
{ | |||||
FieldName = "年级", | |||||
BeforeChange = stuInfoBasicEntity.Grade, | |||||
AfterChange = classInfoEntity2.Grade, | |||||
UpdateBy = loginUserInfo.userId, | |||||
UpdateTime = now, | |||||
StuID = stuInfoBasicEntity.StuId, | |||||
StuChangeType = entity.StuChangeType, | |||||
StuChangeRemark = entity.StuChangeRemark, | |||||
StuChangeId = entity.Id | |||||
}; | |||||
logentity2.Create(); | |||||
logList.Add(logentity2); | |||||
} | |||||
//改学籍信息表; | |||||
db.ExecuteBySql($"update StuInfoBasic set MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity2.Grade}' where StuNo='{entity.StuNo}' "); | |||||
//增加异动日志表:班级 | |||||
var logentity = new StuInfoBasic_ChangeLogEntity() | |||||
{ | |||||
FieldName = "班级", | |||||
BeforeChange = entity.ClassNo, | |||||
AfterChange = entity.NewClassNo, | |||||
UpdateBy = loginUserInfo.userId, | |||||
UpdateTime = now, | |||||
StuID = stuInfoBasicEntity.StuId, | |||||
StuChangeType = entity.StuChangeType, | |||||
StuChangeRemark = entity.StuChangeRemark, | |||||
StuChangeId = entity.Id | |||||
}; | |||||
logentity.Create(); | |||||
logList.Add(logentity); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
db.Insert(logList); | |||||
//修改状态 | |||||
entity.CheckTime = DateTime.Now; | |||||
entity.CheckUserId = LoginUserInfo.Get().account; | |||||
entity.CheckStatus = 1; | |||||
db.Update(entity); | |||||
//修改异动表:审批状态、审批人、 | |||||
entity.CheckTime = now; | |||||
entity.CheckUserId = loginUserInfo.userId; | |||||
entity.CheckStatus = 1; | |||||
db.Update(entity); | |||||
} | |||||
} | } | ||||
db.Commit(); | db.Commit(); | ||||
} | } | ||||
@@ -204,23 +389,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (entity != null) | if (entity != null) | ||||
{ | { | ||||
//处理数据 | //处理数据 | ||||
if (entity.StuChangeType == "01" || entity.StuChangeType == "02" || entity.StuChangeType == "03") //降级、转班、转专业 | |||||
if (entity.StuChangeType == "01" || entity.StuChangeType == "07" || entity.StuChangeType == "08") //降级、转班、转专业、 | |||||
{ | { | ||||
//改信息; | |||||
//改学籍信息; | |||||
var classInfoEntity = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.ClassNo); | var classInfoEntity = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.ClassNo); | ||||
if (classInfoEntity != null) | if (classInfoEntity != null) | ||||
{ | { | ||||
db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.DeptNo}',MajorNo='{entity.MajorNo}',ClassNo='{entity.ClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); | db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.DeptNo}',MajorNo='{entity.MajorNo}',ClassNo='{entity.ClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); | ||||
} | } | ||||
} | } | ||||
else if (entity.StuChangeType == "04" || entity.StuChangeType == "05") //退学、休学 | |||||
else if (entity.StuChangeType == "02" || entity.StuChangeType == "05" || entity.StuChangeType == "06") //转校、退学、休学 | |||||
{ | { | ||||
//改信息;显示成绩; | |||||
//改学籍信息(异动状态为null表示显示成绩); | |||||
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=null where StuNo='{entity.StuNo}' "); | db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=null where StuNo='{entity.StuNo}' "); | ||||
} | } | ||||
else if (entity.StuChangeType == "03") //复学 | |||||
{ | |||||
//改学籍信息(异动状态为1表示不显示成绩); | |||||
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' "); | |||||
} | |||||
//修改状态 | |||||
//修改异动表:审批状态、审批人、 | |||||
db.ExecuteBySql("update StuInfoBasicChange set CheckTime=null,CheckUserId=null,CheckStatus=0 where Id='" + keyValue + "' "); | db.ExecuteBySql("update StuInfoBasicChange set CheckTime=null,CheckUserId=null,CheckStatus=0 where Id='" + keyValue + "' "); | ||||
//删除异动日志表:学籍异动主键id | |||||
db.ExecuteBySql("delete from StuInfoBasic_ChangeLog where StuChangeId='" + keyValue + "' "); | |||||
} | } | ||||
db.Commit(); | db.Commit(); | ||||
} | } | ||||
@@ -51,6 +51,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("STUID")] | [Column("STUID")] | ||||
public string StuID { get; set; } | public string StuID { get; set; } | ||||
/// <summary> | |||||
/// 学籍异动类型(留级01,转出/校02,复学03,转入/进04,退学05,休学06,转班07,转专业08,学籍关键信息更改09) | |||||
/// </summary> | |||||
[Column("STUCHANGETYPE")] | |||||
public string StuChangeType { get; set; } | |||||
/// <summary> | |||||
/// 学籍异动备注 | |||||
/// </summary> | |||||
[Column("STUCHANGEREMARK")] | |||||
public string StuChangeRemark { get; set; } | |||||
/// <summary> | |||||
/// StuInfoBasicChange主键 | |||||
/// </summary> | |||||
[Column("STUCHANGEID")] | |||||
public string StuChangeId { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -29,16 +29,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.ID, | |||||
t.FieldName, | |||||
t.BeforeChange, | |||||
t.AfterChange, | |||||
t.UpdateBy, | |||||
t.UpdateTime, | |||||
t.StuID | |||||
"); | |||||
strSql.Append("SELECT t.*"); | |||||
strSql.Append(" FROM StuInfoBasic_ChangeLog t "); | strSql.Append(" FROM StuInfoBasic_ChangeLog t "); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
@@ -57,7 +48,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
if (!queryParam["StuID"].IsEmpty()) | if (!queryParam["StuID"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("StuID", "" + queryParam["StuID"].ToString() + "", DbType.String); | |||||
dp.Add("StuID", queryParam["StuID"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.StuID = @StuID "); | strSql.Append(" AND t.StuID = @StuID "); | ||||
} | } | ||||
if (!queryParam["UpdateTime"].IsEmpty()) | if (!queryParam["UpdateTime"].IsEmpty()) | ||||
@@ -67,8 +58,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
if (!queryParam["UpdateBy"].IsEmpty()) | if (!queryParam["UpdateBy"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("UpdateBy", "%" + queryParam["UpdateBy"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.UpdateBy Like @UpdateBy "); | |||||
dp.Add("UpdateBy", queryParam["UpdateBy"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.UpdateBy = @UpdateBy "); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<StuInfoBasic_ChangeLogEntity>(strSql.ToString(),dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<StuInfoBasic_ChangeLogEntity>(strSql.ToString(),dp, pagination); | ||||
} | } | ||||
@@ -77,10 +77,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("PunishNo", queryParam["PunishNo"].ToString(), DbType.String); | dp.Add("PunishNo", queryParam["PunishNo"].ToString(), DbType.String); | ||||
strSql.Append(" AND t.PunishNo = @PunishNo "); | strSql.Append(" AND t.PunishNo = @PunishNo "); | ||||
} | } | ||||
if (!queryParam["PunishDate"].IsEmpty()) | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("PunishDate", queryParam["PunishDate"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.PunishDate = @PunishDate "); | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.PunishDate >= @startTime AND t.PunishDate <= @endTime ) "); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<StuPunishmentEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<StuPunishmentEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
@@ -149,6 +149,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("SLASTDATE")] | [Column("SLASTDATE")] | ||||
public DateTime? SLastDate { get; set; } | public DateTime? SLastDate { get; set; } | ||||
/// <summary> | |||||
/// 路径 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string FilePath { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-30 10:49 | |||||
/// 描 述:实训设备管理 | |||||
/// </summary> | |||||
public class TrainEquipmentManageBLL : TrainEquipmentManageIBLL | |||||
{ | |||||
private TrainEquipmentManageService trainEquipmentManageService = new TrainEquipmentManageService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<TrainEquipmentManageEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return trainEquipmentManageService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取TrainEquipmentManage表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public TrainEquipmentManageEntity GetTrainEquipmentManageEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return trainEquipmentManageService.GetTrainEquipmentManageEntity(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 | |||||
{ | |||||
trainEquipmentManageService.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, TrainEquipmentManageEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
trainEquipmentManageService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,85 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-30 10:49 | |||||
/// 描 述:实训设备管理 | |||||
/// </summary> | |||||
public class TrainEquipmentManageEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 专业部 | |||||
/// </summary> | |||||
[Column("DEPTNO")] | |||||
public string DeptNo { get; set; } | |||||
/// <summary> | |||||
/// 实训室名称 | |||||
/// </summary> | |||||
[Column("TRAINNAME")] | |||||
public string TrainName { get; set; } | |||||
/// <summary> | |||||
/// 设备名称 | |||||
/// </summary> | |||||
[Column("EQUIPMENTNAME")] | |||||
public string EquipmentName { get; set; } | |||||
/// <summary> | |||||
/// 设备型号 | |||||
/// </summary> | |||||
[Column("EQUIPMENTMODEL")] | |||||
public string EquipmentModel { get; set; } | |||||
/// <summary> | |||||
/// 新增 | |||||
/// </summary> | |||||
[Column("ADDNUM")] | |||||
public string AddNum { get; set; } | |||||
/// <summary> | |||||
/// 损耗 | |||||
/// </summary> | |||||
[Column("LOSSNUM")] | |||||
public string LossNum { get; set; } | |||||
/// <summary> | |||||
/// 现存 | |||||
/// </summary> | |||||
[Column("EXISTNUM")] | |||||
public string ExistNum { get; set; } | |||||
/// <summary> | |||||
/// 设备金额 | |||||
/// </summary> | |||||
[Column("EQUIPMENTMONEY")] | |||||
public decimal? EquipmentMoney { 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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-30 10:49 | |||||
/// 描 述:实训设备管理 | |||||
/// </summary> | |||||
public interface TrainEquipmentManageIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<TrainEquipmentManageEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取TrainEquipmentManage表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
TrainEquipmentManageEntity GetTrainEquipmentManageEntity(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, TrainEquipmentManageEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,156 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-30 10:49 | |||||
/// 描 述:实训设备管理 | |||||
/// </summary> | |||||
public class TrainEquipmentManageService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<TrainEquipmentManageEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM TrainEquipmentManage t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["DeptNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("DeptNo",queryParam["DeptNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||||
} | |||||
if (!queryParam["TrainName"].IsEmpty()) | |||||
{ | |||||
dp.Add("TrainName", "%" + queryParam["TrainName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.TrainName Like @TrainName "); | |||||
} | |||||
if (!queryParam["EquipmentName"].IsEmpty()) | |||||
{ | |||||
dp.Add("EquipmentName", "%" + queryParam["EquipmentName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.EquipmentName Like @EquipmentName "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<TrainEquipmentManageEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取TrainEquipmentManage表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public TrainEquipmentManageEntity GetTrainEquipmentManageEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<TrainEquipmentManageEntity>(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<TrainEquipmentManageEntity>(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, TrainEquipmentManageEntity 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 | |||||
} | |||||
} |
@@ -1898,6 +1898,22 @@ | |||||
<Compile Include="PersonnelManagement\TeachManagement\TeachManagementService.cs" /> | <Compile Include="PersonnelManagement\TeachManagement\TeachManagementService.cs" /> | ||||
<Compile Include="PersonnelManagement\TeachManagement\TeachManagementBLL.cs" /> | <Compile Include="PersonnelManagement\TeachManagement\TeachManagementBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\TeachManagement\TeachManagementIBLL.cs" /> | <Compile Include="PersonnelManagement\TeachManagement\TeachManagementIBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\EvaluateTeachLearn\EvaluateTeachLearnEntity.cs" /> | |||||
<Compile Include="PersonnelManagement\EvaluateTeachLearn\EvaluateTeachLearnService.cs" /> | |||||
<Compile Include="PersonnelManagement\EvaluateTeachLearn\EvaluateTeachLearnBLL.cs" /> | |||||
<Compile Include="PersonnelManagement\EvaluateTeachLearn\EvaluateTeachLearnIBLL.cs" /> | |||||
<Compile Include="PersonnelManagement\ClassPatrol\ClassPatrolEntity.cs" /> | |||||
<Compile Include="PersonnelManagement\ClassPatrol\ClassPatrolService.cs" /> | |||||
<Compile Include="PersonnelManagement\ClassPatrol\ClassPatrolBLL.cs" /> | |||||
<Compile Include="PersonnelManagement\ClassPatrol\ClassPatrolIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\StuGraduateStatistic\StuGraduateStatisticEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\StuGraduateStatistic\StuGraduateStatisticService.cs" /> | |||||
<Compile Include="EducationalAdministration\StuGraduateStatistic\StuGraduateStatisticBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\StuGraduateStatistic\StuGraduateStatisticIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\TrainEquipmentManage\TrainEquipmentManageEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\TrainEquipmentManage\TrainEquipmentManageService.cs" /> | |||||
<Compile Include="EducationalAdministration\TrainEquipmentManage\TrainEquipmentManageBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\TrainEquipmentManage\TrainEquipmentManageIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\StudentCertificate\StudentCertificateEntity.cs" /> | <Compile Include="EducationalAdministration\StudentCertificate\StudentCertificateEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\StudentCertificate\StudentCertificateService.cs" /> | <Compile Include="EducationalAdministration\StudentCertificate\StudentCertificateService.cs" /> | ||||
<Compile Include="EducationalAdministration\StudentCertificate\StudentCertificateBLL.cs" /> | <Compile Include="EducationalAdministration\StudentCertificate\StudentCertificateBLL.cs" /> | ||||
@@ -0,0 +1,125 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-25 11:16 | |||||
/// 描 述:课堂巡查 | |||||
/// </summary> | |||||
public class ClassPatrolBLL : ClassPatrolIBLL | |||||
{ | |||||
private ClassPatrolService classPatrolService = new ClassPatrolService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ClassPatrolEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return classPatrolService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ClassPatrol表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public ClassPatrolEntity GetClassPatrolEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return classPatrolService.GetClassPatrolEntity(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 | |||||
{ | |||||
classPatrolService.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, ClassPatrolEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
classPatrolService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,95 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-25 11:16 | |||||
/// 描 述:课堂巡查 | |||||
/// </summary> | |||||
public class ClassPatrolEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 时间 | |||||
/// </summary> | |||||
[Column("TIME")] | |||||
public DateTime? Time { get; set; } | |||||
/// <summary> | |||||
/// 课节 | |||||
/// </summary> | |||||
[Column("SECTION")] | |||||
public string Section { get; set; } | |||||
/// <summary> | |||||
/// 教师 | |||||
/// </summary> | |||||
[Column("EMPNO")] | |||||
public string EmpNo { get; set; } | |||||
/// <summary> | |||||
/// 科目 | |||||
/// </summary> | |||||
[Column("LESSONNO")] | |||||
public string LessonNo { get; set; } | |||||
/// <summary> | |||||
/// 情况记载 | |||||
/// </summary> | |||||
[Column("RECORDS")] | |||||
public string Records { get; set; } | |||||
/// <summary> | |||||
/// 备注 | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// CreateUserId | |||||
/// </summary> | |||||
[Column("CREATEUSERID")] | |||||
public string CreateUserId { get; set; } | |||||
/// <summary> | |||||
/// CreateTime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// ModifyUserId | |||||
/// </summary> | |||||
[Column("MODIFYUSERID")] | |||||
public string ModifyUserId { get; set; } | |||||
/// <summary> | |||||
/// ModifyTime | |||||
/// </summary> | |||||
[Column("MODIFYTIME")] | |||||
public DateTime? ModifyTime { 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.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-25 11:16 | |||||
/// 描 述:课堂巡查 | |||||
/// </summary> | |||||
public interface ClassPatrolIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<ClassPatrolEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取ClassPatrol表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
ClassPatrolEntity GetClassPatrolEntity(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, ClassPatrolEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,156 @@ | |||||
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.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-25 11:16 | |||||
/// 描 述:课堂巡查 | |||||
/// </summary> | |||||
public class ClassPatrolService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ClassPatrolEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM ClassPatrol t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["Section"].IsEmpty()) | |||||
{ | |||||
dp.Add("Section", "%" + queryParam["Section"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.Section Like @Section "); | |||||
} | |||||
if (!queryParam["EmpNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpNo",queryParam["EmpNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EmpNo = @EmpNo "); | |||||
} | |||||
if (!queryParam["LessonNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("LessonNo",queryParam["LessonNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.LessonNo = @LessonNo "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<ClassPatrolEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ClassPatrol表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public ClassPatrolEntity GetClassPatrolEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<ClassPatrolEntity>(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<ClassPatrolEntity>(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, ClassPatrolEntity 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 | |||||
} | |||||
} |
@@ -66,6 +66,28 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取列表 | |||||
/// </summary> | |||||
/// <returns>返回列表</returns> | |||||
public IEnumerable<DutyScheduleEntity> GetList() | |||||
{ | |||||
try | |||||
{ | |||||
return dutyScheduleService.GetList(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -27,6 +27,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
DutyScheduleEntity GetDutyScheduleEntity(string keyValue); | DutyScheduleEntity GetDutyScheduleEntity(string keyValue); | ||||
/// <summary> | |||||
/// 获取所有数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
IEnumerable<DutyScheduleEntity> GetList(); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -28,21 +28,27 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var adms = this.BaseRepository().getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" | |||||
t.ID, | |||||
t.StartTime, | |||||
t.EndTime, | |||||
t.Person, | |||||
t.Remark,u.F_Account,F_RealName | |||||
"); | |||||
strSql.Append(" FROM DutySchedule t left join adms7ultimate2.dbo.LR_Base_User u on t.Person=u.F_UserId "); | |||||
strSql.Append(@" t.* ,u.F_Account,u.F_RealName "); | |||||
strSql.Append($" FROM DutySchedule t left join {adms}.dbo.LR_Base_User u on t.Person=u.F_UserId "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
return this.BaseRepository("CollegeMIS").FindList<DutyScheduleEntity>(strSql.ToString(),dp, pagination); | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND u.F_RealName Like @keyword "); | |||||
} | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.StartTime >= @startTime AND t.EndTime <= @endTime ) "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<DutyScheduleEntity>(strSql.ToString(), dp, pagination); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -81,6 +87,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取列表 | |||||
/// </summary> | |||||
/// <returns>返回列表</returns> | |||||
public IEnumerable<DutyScheduleEntity> GetList() | |||||
{ | |||||
try | |||||
{ | |||||
var adms = this.BaseRepository().getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" t.*, u.F_Account,F_RealName "); | |||||
strSql.Append($" FROM DutySchedule t left join {adms}.dbo.LR_Base_User u on t.Person=u.F_UserId "); | |||||
return this.BaseRepository("CollegeMIS").FindList<DutyScheduleEntity>(strSql.ToString()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
throw; | |||||
else | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -94,7 +123,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<DutyScheduleEntity>(t=>t.ID == keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<DutyScheduleEntity>(t => t.ID == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -126,6 +155,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
else | else | ||||
{ | { | ||||
entity.Create(); | entity.Create(); | ||||
entity.CreateTime = DateTime.Now; | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | this.BaseRepository("CollegeMIS").Insert(entity); | ||||
} | } | ||||
} | } | ||||
@@ -0,0 +1,125 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-24 14:38 | |||||
/// 描 述:评教评学 | |||||
/// </summary> | |||||
public class EvaluateTeachLearnBLL : EvaluateTeachLearnIBLL | |||||
{ | |||||
private EvaluateTeachLearnService evaluateTeachLearnService = new EvaluateTeachLearnService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<EvaluateTeachLearnEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return evaluateTeachLearnService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取EvaluateTeachLearn表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public EvaluateTeachLearnEntity GetEvaluateTeachLearnEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return evaluateTeachLearnService.GetEvaluateTeachLearnEntity(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 | |||||
{ | |||||
evaluateTeachLearnService.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, EvaluateTeachLearnEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
evaluateTeachLearnService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,90 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-24 14:38 | |||||
/// 描 述:评教评学 | |||||
/// </summary> | |||||
public class EvaluateTeachLearnEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// EmpNo | |||||
/// </summary> | |||||
[Column("EMPNO")] | |||||
public string EmpNo { get; set; } | |||||
/// <summary> | |||||
/// AcademicYearNo | |||||
/// </summary> | |||||
[Column("ACADEMICYEARNO")] | |||||
public string AcademicYearNo { get; set; } | |||||
/// <summary> | |||||
/// Semester | |||||
/// </summary> | |||||
[Column("SEMESTER")] | |||||
public string Semester { get; set; } | |||||
/// <summary> | |||||
/// SatisfacteRate | |||||
/// </summary> | |||||
[Column("SATISFACTERATE")] | |||||
public string SatisfacteRate { get; set; } | |||||
/// <summary> | |||||
/// Remark | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// CreateUserId | |||||
/// </summary> | |||||
[Column("CREATEUSERID")] | |||||
public string CreateUserId { get; set; } | |||||
/// <summary> | |||||
/// CreateTime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// ModifyUserId | |||||
/// </summary> | |||||
[Column("MODIFYUSERID")] | |||||
public string ModifyUserId { get; set; } | |||||
/// <summary> | |||||
/// ModifyTime | |||||
/// </summary> | |||||
[Column("MODIFYTIME")] | |||||
public DateTime? ModifyTime { 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.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-24 14:38 | |||||
/// 描 述:评教评学 | |||||
/// </summary> | |||||
public interface EvaluateTeachLearnIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<EvaluateTeachLearnEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取EvaluateTeachLearn表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
EvaluateTeachLearnEntity GetEvaluateTeachLearnEntity(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, EvaluateTeachLearnEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,161 @@ | |||||
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.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-08-24 14:38 | |||||
/// 描 述:评教评学 | |||||
/// </summary> | |||||
public class EvaluateTeachLearnService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<EvaluateTeachLearnEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM EvaluateTeachLearn t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["EmpNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpNo",queryParam["EmpNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EmpNo = @EmpNo "); | |||||
} | |||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); | |||||
} | |||||
if (!queryParam["Semester"].IsEmpty()) | |||||
{ | |||||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Semester = @Semester "); | |||||
} | |||||
if (!queryParam["SatisfacteRate"].IsEmpty()) | |||||
{ | |||||
dp.Add("SatisfacteRate", "%" + queryParam["SatisfacteRate"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.SatisfacteRate Like @SatisfacteRate "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<EvaluateTeachLearnEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取EvaluateTeachLearn表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public EvaluateTeachLearnEntity GetEvaluateTeachLearnEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<EvaluateTeachLearnEntity>(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<EvaluateTeachLearnEntity>(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, EvaluateTeachLearnEntity 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 | |||||
} | |||||
} |
@@ -237,6 +237,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void ReceivedList(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
meetingManagementService.ReceivedList(processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -76,6 +76,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void ChangeStatusByProcessId(string processId, string status, string userId); | void ChangeStatusByProcessId(string processId, string status, string userId); | ||||
void ReceivedList(string processId); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -1,11 +1,19 @@ | |||||
using Dapper; | using Dapper; | ||||
using Learun.Application.Organization; | using Learun.Application.Organization; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||||
using Learun.DataBase.Repository; | using Learun.DataBase.Repository; | ||||
using Learun.Util; | using Learun.Util; | ||||
using Microsoft.AspNet.SignalR.Client; | |||||
using Newtonsoft.Json; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Configuration; | |||||
using System.Data; | using System.Data; | ||||
using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
using System.Threading.Tasks; | |||||
using System.Web; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | namespace Learun.Application.TwoDevelopment.PersonnelManagement | ||||
{ | { | ||||
@@ -467,7 +475,112 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
public void ReceivedList(string processId) | |||||
{ | |||||
var Received = GetMeetingManagementEntityByProcessId(processId); | |||||
List<UserEntity> userInfos = new List<UserEntity>(); | |||||
foreach (var rid in Received.InternalParticipants.Split(',')) | |||||
{ | |||||
var user = this.BaseRepository().FindEntity<UserEntity>(m => m.F_UserId == rid); | |||||
if (!userInfos.Contains(user)) | |||||
{ | |||||
userInfos.Add(user); | |||||
} | |||||
} | |||||
if (!string.IsNullOrEmpty(Received.RecordPerson)) | |||||
{ | |||||
foreach (var rid in Received.RecordPerson.Split(',')) | |||||
{ | |||||
var user = this.BaseRepository().FindEntity<UserEntity>(m => m.F_UserId == rid); | |||||
if (!userInfos.Contains(user)) | |||||
{ | |||||
userInfos.Add(user); | |||||
} | |||||
} | |||||
} | |||||
//foreach (var uitem in userInfos) | |||||
//{ | |||||
// SYS_ReceiveMessageEntity receiveMessageEntity = new SYS_ReceiveMessageEntity(); | |||||
// receiveMessageEntity.Create(); | |||||
// receiveMessageEntity.SENDERID = Received.SENDERID; | |||||
// receiveMessageEntity.SENDER = messageentity.SENDER; | |||||
// receiveMessageEntity.RECEIVERID = uitem.F_UserId; | |||||
// receiveMessageEntity.RECEIVER = uitem.F_RealName; | |||||
// receiveMessageEntity.TITLE = messageentity.TITLE; | |||||
// receiveMessageEntity.CONTENTS = messageentity.CONTENTS; | |||||
// receiveMessageEntity.URL = messageentity.URL; | |||||
// receiveMessageEntity.READFLAG = 0; | |||||
// receiveMessageEntity.SENDTIME = DateTime.Now; | |||||
// receiveMessageEntity.DelFlag = false; | |||||
// this.BaseRepository().Insert(receiveMessageEntity); | |||||
//} | |||||
//读取信息推送管理-会议申请推送(03)的配置 | |||||
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "03"); | |||||
if (informationPushEntity != null && informationPushEntity.Status == true) | |||||
{ | |||||
//微信推送 | |||||
try | |||||
{ | |||||
PushWeixin(userInfos, Received.MeetingTitle); | |||||
} | |||||
catch (Exception e) | |||||
{ | |||||
} | |||||
//飞星推送 | |||||
Task.Run(async () => | |||||
{ | |||||
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"])) | |||||
{ | |||||
var hubProxy = hubConnection.CreateHubProxy("SignalRHub"); | |||||
await hubConnection.Start(); | |||||
await hubProxy.Invoke("PushAnnouncement", Received.InternalParticipants, Received.MeetingTitle, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)).Substring(0, 20), "mail", string.Join(",", userInfos.Select(m => m.F_UserId)), ""); | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
public void PushWeixin(List<UserEntity> needpostuserlist, string title) | |||||
{ | |||||
var WeChatConfigentity = BaseRepository().FindEntity<WeChatConfigEntity>(m => m.IsEnable == true); | |||||
string appid = WeChatConfigentity.APPId; | |||||
string secret = WeChatConfigentity.secret; | |||||
var wechatemplete = BaseRepository() | |||||
.FindEntity<WeChatTemplateEntity>(m => m.WeID == WeChatConfigentity.ID && m.TCode == "task"); | |||||
string weixintaskurl = wechatemplete.TUrl; | |||||
string weixintasktempid = wechatemplete.TempId; | |||||
var responsejson = Util.HttpMethods.HttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret); | |||||
foreach (UserEntity userinfo in needpostuserlist) | |||||
{ | |||||
if (userinfo != null && !string.IsNullOrEmpty(userinfo.OpenIdForWeixin)) | |||||
{ | |||||
//执行推送任务 | |||||
if (!string.IsNullOrEmpty(appid) && !string.IsNullOrEmpty(secret) && !string.IsNullOrEmpty(weixintaskurl) && !string.IsNullOrEmpty(weixintasktempid)) | |||||
{ | |||||
if (!string.IsNullOrEmpty(responsejson)) | |||||
{ | |||||
var weixintokenobj = JsonConvert.DeserializeObject<dynamic>(responsejson); | |||||
if (string.IsNullOrEmpty(weixintokenobj.errcode)) | |||||
{ | |||||
string access_token = weixintokenobj.access_token; | |||||
string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," + | |||||
"\"template_id\":\"" + weixintasktempid + "\"," + | |||||
"\"url\":\"" + weixintaskurl + "/#/?page=mail\"," + | |||||
"\"data\":{" + | |||||
"\"first\": {\"value\":\"您有新的会议消息\",\"color\":\"#173177\"}," + | |||||
"\"keyword1\":{\"value\":\"未读邮件\",\"color\":\"#173177\"}," + | |||||
"\"keyword2\": {\"value\":\"" + title + "\",\"color\":\"#173177\"}," + | |||||
"\"keyword3\": {\"value\":\"待查看\",\"color\":\"#173177\"}," + | |||||
"\"keyword4\": {\"value\":\"您有新的未读会议【" + title + "】\",\"color\":\"#173177\"}" + | |||||
"}" + | |||||
"}"; | |||||
string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -222,6 +222,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
if (meetEntity != null) | if (meetEntity != null) | ||||
{ | { | ||||
meetEntity.IsSignIn = true; | meetEntity.IsSignIn = true; | ||||
meetEntity.SignInTime = DateTime.Now; | |||||
this.BaseRepository("CollegeMIS").Update(meetEntity); | this.BaseRepository("CollegeMIS").Update(meetEntity); | ||||
result = true; | result = true; | ||||
@@ -1,9 +1,4 @@ | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | using Learun.Application.TwoDevelopment.PersonnelManagement; | ||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Learun.Application.WorkFlow | namespace Learun.Application.WorkFlow | ||||
{ | { | ||||
@@ -17,6 +12,7 @@ namespace Learun.Application.WorkFlow | |||||
if (parameter.code == "agree") | if (parameter.code == "agree") | ||||
{ | { | ||||
meetingManagementIBLL.ChangeStatusByProcessId(parameter.processId, "1", parameter.userId); | meetingManagementIBLL.ChangeStatusByProcessId(parameter.processId, "1", parameter.userId); | ||||
meetingManagementIBLL.ReceivedList(parameter.processId); | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
@@ -24,274 +24,310 @@ import moment from 'moment' | |||||
*/ | */ | ||||
export default { | export default { | ||||
methods: { | |||||
/** | |||||
* 获取一个 scheme 表单项的源数据 (加载表单时使用) | |||||
* 参数: 单个 schemeItem | |||||
* | |||||
* radio、select、checkbox、layer 这四种表单项,需要加载额外的选单数据 | |||||
* 选单数据有两种获取方式: | |||||
* 1、来自数据字典: | |||||
* 数据字典在 this.GET_GLOBAL('dataDictionary') | |||||
* 表单使用的字段在 schemeItem.itemCode | |||||
* 选单数据中的 text 字段作为显示, value 字段作为值 | |||||
* | |||||
* 2、来自数据源: | |||||
* 将 schemeItem.dataSourceId 按符号「,」逗号分割为数组,分割为: [code, displayField, valueField] | |||||
* 数据源需要请求 API 来获取,请求需要带上数据源的编号 code | |||||
* displayField、valueField 分别为展示字段和值绑定字段 | |||||
* | |||||
* 选单数据有两种格式: | |||||
* 1、对于 radio、select、checkbox 来说: | |||||
* 只需要一个数组,数组形如: [{ text: '选项文字', value: '选项值' }, ...] | |||||
* 将获取的数据绑定到组件的 range 属性上即可 | |||||
* 全局数据中默认是对象形式,使用 Object.values() 转化即可 | |||||
* | |||||
* 2、对于 layer 来说: | |||||
* 返回一个对象,形如 { source, layerData, selfField } | |||||
* source: 为弹层中列出的数据,是一个数组 | |||||
* layerData: 需要在弹层窗口中展示的字段及标题文字,形如: [{ name:'要展示的字段名', label:'标题文字' }] | |||||
* selfField: 该表单值绑定哪个字段,默认为绑定到自身的字段 | |||||
*/ | |||||
async getSourceData(schemeItem) { | |||||
if (['radio', 'select', 'checkbox'].includes(schemeItem.type)) { | |||||
// radio select checkbox 三种情况 | |||||
if (!schemeItem.dataSource || Number(schemeItem.dataSource) === 0) { | |||||
// dataSource 为 0,使用 clientData | |||||
return Object | |||||
.values(this.GET_GLOBAL('dataDictionary')[schemeItem.itemCode]) | |||||
.map(t => ({ value: t.value, text: t.text })) | |||||
} else { | |||||
// dataSource 不为 0,使用数据源,需要请求接口,并且提取出显示字段和实际字段 | |||||
const [code, displayField = schemeItem.showField, valueField = schemeItem.saveField] = schemeItem.dataSourceId | |||||
.split(',') | |||||
const sourceData = await this.FETCH_DATASOURCE(code) | |||||
if (!sourceData) { return [] } | |||||
return sourceData.data.map(t => ({ text: t[displayField], value: t[valueField] })) | |||||
} | |||||
} else if (['layer'].includes(schemeItem.type)) { | |||||
// layer 需要更多属性 | |||||
if (!schemeItem.dataSource || Number(schemeItem.dataSource) === 0) { | |||||
// dataSource 为 0,使用 clientData | |||||
// clientData 对象转数组后,隐含 key:item.text 和 value:item.value 的关系 | |||||
const [keyItem, valueItem] = schemeItem.layerData | |||||
const source = Object | |||||
.values(this.GET_GLOBAL('dataDictionary')[schemeItem.itemCode]) | |||||
.map(t => ({ value: t.value, text: t.text })) | |||||
return { | |||||
source, | |||||
layerData: [ | |||||
{ name: 'text', label: keyItem.label || '', value: keyItem.value || '' }, | |||||
{ name: 'value', label: valueItem.label || '', value: valueItem.value || '' } | |||||
] | |||||
} | |||||
} else { | |||||
// dataSource 不为 0,使用数据源,需要请求接口,并且提取出显示字段和实际字段 | |||||
const [code] = schemeItem.dataSourceId.split(',') | |||||
const sourceData = await this.FETCH_DATASOURCE(code) | |||||
if (!sourceData) { return [] } | |||||
const source = sourceData.data | |||||
return { source, layerData: schemeItem.layerData.filter(t => (!t.hide) && (t.value || t.label)) } | |||||
} | |||||
} | |||||
return [] | |||||
}, | |||||
/** | |||||
* 获取一个 scheme 表单项的默认值 (用户新建表单时使用,或是编辑草稿) | |||||
* 参数: 单个 schemeItem , { processId } | |||||
* | |||||
* 每种类别的表单项分别获取的默认值: | |||||
* | |||||
* currentInfo: 根据类别取当前用户/部门/公司/时间日期 | |||||
* datetime: 根据 dfValue 字段表示昨天/今天/明天,格式化为字符串 | |||||
* radio、select: 有 dfValue 则使用,否则取第一条 | |||||
* checkbox: 有 dfValue 则使用,否则为空数组 | |||||
* encode: 根据 rulecode 请求表单编码 | |||||
* upload: 空数组 | |||||
* guid: 赋值第二个参数中的 processId,但是如果在子表格中,赋空字符串 | |||||
* girdtable: 递归所有表格项 scheme 依次为它们生成默认值 | |||||
* datetimerange: 字符串 0 | |||||
*/ | |||||
async getDefaultData(item, prop) { | |||||
const { processId } = prop | |||||
switch (item.type) { | |||||
case 'currentInfo': | |||||
switch (item.dataType) { | |||||
case 'user': | |||||
return this.GET_GLOBAL('loginUser').userId | |||||
case 'department': | |||||
return this.GET_GLOBAL('loginUser').departmentId | |||||
case 'company': | |||||
return this.GET_GLOBAL('loginUser').companyId | |||||
case 'time': | |||||
return moment().format('YYYY-MM-DD HH:mm:ss') | |||||
default: | |||||
return '' | |||||
} | |||||
case 'datetime': | |||||
const datetimeFormat = item.table ? | |||||
(Number(item.dateformat) === 0 ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm:ss') : | |||||
(item.datetime === 'datetime' ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD') | |||||
const today = moment() | |||||
const dfDatetime = [ | |||||
today.subtract(1, 'day'), | |||||
today, | |||||
today.add(1, 'day') | |||||
][Number(item.dfvalue)] || today | |||||
return dfDatetime.format(datetimeFormat) || '' | |||||
case 'radio': | |||||
case 'select': | |||||
const radioItem = item.__sourceData__.find(t => t.value === item.dfvalue) || item.__sourceData__[0] | |||||
return item.type === 'radio' ? radioItem.value : '' | |||||
case 'checkbox': | |||||
if (!item.dfvalue) { | |||||
return [] | |||||
} | |||||
return item.dfvalue.split(',').filter(t => item.__sourceData__.find(s => s.value === t)) | |||||
case 'encode': | |||||
const result = await this.FETCH_ENCODE(item.rulecode) | |||||
return result | |||||
case 'upload': | |||||
return [] | |||||
case 'guid': | |||||
return item.table ? processId : '' | |||||
case 'girdtable': | |||||
const tableItemObj = {} | |||||
for (const fieldItem of item.fieldsData) { | |||||
tableItemObj[fieldItem.field] = await this.getDefaultData(fieldItem, prop) | |||||
} | |||||
return this.COPY(tableItemObj) | |||||
case 'datetimerange': | |||||
return '0' | |||||
default: | |||||
return item.dfvalue || '' | |||||
} | |||||
}, | |||||
/** | |||||
* 将单条 formData 值转化为 formValue 值 (拉取表单数据时使用) | |||||
* 参数: 单个 schemeItem , 数据值 | |||||
* | |||||
* 具体执行逻辑: | |||||
* radio、select: 剔除无效值 | |||||
* checkbox: 分割成数组并剔除无效值 | |||||
* upload: 分割成数组,拉取其中所有文件的信息 | |||||
* datetime: 按照时间日期格式进行格式化字符串 | |||||
* 其他类型: 保留原值 | |||||
*/ | |||||
async convertToFormValue(item, val) { | |||||
switch (item.type) { | |||||
case 'upload': | |||||
if (!val) { return [] } | |||||
const uidList = val.split(',') | |||||
const fileList = [] | |||||
for (const uid of uidList || []) { | |||||
const fileInfo = await this.FETCH_FILEINFO(uid) | |||||
if (!fileInfo) { continue } | |||||
const fileType = fileInfo.F_FileType | |||||
const fileSize = fileInfo.F_FileSize | |||||
const path = this.API + '/annexes/wxdown?' + this.URL_QUERY(uid, true) | |||||
fileList.push({ path, type: fileType, uid, size: fileSize }) | |||||
} | |||||
return fileList | |||||
case 'select': | |||||
case 'radio': | |||||
if (!val || !item.__sourceData__.map(t => t.value).includes(val)) { | |||||
return '' | |||||
} | |||||
return val | |||||
case 'checkbox': | |||||
const validValue = item.__sourceData__.map(t => t.value) | |||||
const checkboxVal = val.split(',') || [] | |||||
return checkboxVal.filter(t => validValue.includes(t)) | |||||
case 'datetime': | |||||
if (!val) { | |||||
return '' | |||||
} | |||||
return moment(val).format( | |||||
Number(item.dateformat) === 0 || item.datetime === 'date' ? | |||||
'YYYY-MM-DD' : | |||||
'YYYY-MM-DD HH:mm:ss' | |||||
) | |||||
default: | |||||
return val || '' | |||||
} | |||||
}, | |||||
/** | |||||
* 将一个 formValue 值转化为 post 提交值(提交表单数据时使用) | |||||
* 参数: 单个 schemeItem , 表单项值 , 所有 formValue , scheme | |||||
* | |||||
* 具体执行逻辑: | |||||
* checkbox: 将数组使用符号「,」逗号拼接成字符串 | |||||
* datetimerange: 获取开始日期、结束日期,计算差值天数并保留整数 | |||||
* datetime: 格式化为完整时间日期字符串 | |||||
* upload: 依次上传文件,将返回的文件 ID 使用符号「,」逗号拼接成字符串 | |||||
* 其他类型: 保留原值 | |||||
*/ | |||||
async convertToPostData(item, val, formValue, scheme) { | |||||
switch (item.type) { | |||||
case 'checkbox': | |||||
return val ? val.join(',') : '' | |||||
case 'datetimerange': | |||||
const startTime = get(formValue, scheme.find(t => t.id === item.startTime).__valuePath__, null) | |||||
const endTime = get(formValue, scheme.find(t => t.id === item.endTime).__valuePath__, null) | |||||
if (!startTime || !endTime || moment(endTime).isBefore(startTime)) { | |||||
return '' | |||||
} else { | |||||
return moment.duration(moment(endTime).diff(moment(startTime))).asDays().toFixed(0) | |||||
} | |||||
case 'datetime': | |||||
return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '' | |||||
case 'upload': | |||||
const uploadUid = [] | |||||
for (const item of val) { | |||||
if (item.uid) { | |||||
uploadUid.push(item.uid) | |||||
continue | |||||
} | |||||
const fileId = await this.HTTP_UPLOAD(item.path||item) | |||||
if (fileId) { | |||||
uploadUid.push(fileId) | |||||
} | |||||
} | |||||
return uploadUid.join(',') | |||||
default: | |||||
return val || '' | |||||
} | |||||
} | |||||
} | |||||
methods: { | |||||
/** | |||||
* 获取一个 scheme 表单项的源数据 (加载表单时使用) | |||||
* 参数: 单个 schemeItem | |||||
* | |||||
* radio、select、checkbox、layer 这四种表单项,需要加载额外的选单数据 | |||||
* 选单数据有两种获取方式: | |||||
* 1、来自数据字典: | |||||
* 数据字典在 this.GET_GLOBAL('dataDictionary') | |||||
* 表单使用的字段在 schemeItem.itemCode | |||||
* 选单数据中的 text 字段作为显示, value 字段作为值 | |||||
* | |||||
* 2、来自数据源: | |||||
* 将 schemeItem.dataSourceId 按符号「,」逗号分割为数组,分割为: [code, displayField, valueField] | |||||
* 数据源需要请求 API 来获取,请求需要带上数据源的编号 code | |||||
* displayField、valueField 分别为展示字段和值绑定字段 | |||||
* | |||||
* 选单数据有两种格式: | |||||
* 1、对于 radio、select、checkbox 来说: | |||||
* 只需要一个数组,数组形如: [{ text: '选项文字', value: '选项值' }, ...] | |||||
* 将获取的数据绑定到组件的 range 属性上即可 | |||||
* 全局数据中默认是对象形式,使用 Object.values() 转化即可 | |||||
* | |||||
* 2、对于 layer 来说: | |||||
* 返回一个对象,形如 { source, layerData, selfField } | |||||
* source: 为弹层中列出的数据,是一个数组 | |||||
* layerData: 需要在弹层窗口中展示的字段及标题文字,形如: [{ name:'要展示的字段名', label:'标题文字' }] | |||||
* selfField: 该表单值绑定哪个字段,默认为绑定到自身的字段 | |||||
*/ | |||||
async getSourceData(schemeItem) { | |||||
if (['radio', 'select', 'checkbox'].includes(schemeItem.type)) { | |||||
// radio select checkbox 三种情况 | |||||
if (!schemeItem.dataSource || Number(schemeItem.dataSource) === 0) { | |||||
// dataSource 为 0,使用 clientData | |||||
return Object | |||||
.values(this.GET_GLOBAL('dataDictionary')[schemeItem.itemCode]) | |||||
.map(t => ({ | |||||
value: t.value, | |||||
text: t.text | |||||
})) | |||||
} else { | |||||
// dataSource 不为 0,使用数据源,需要请求接口,并且提取出显示字段和实际字段 | |||||
const [code, displayField = schemeItem.showField, valueField = schemeItem.saveField] = | |||||
schemeItem.dataSourceId | |||||
.split(',') | |||||
const sourceData = await this.FETCH_DATASOURCE(code) | |||||
if (!sourceData) { | |||||
return [] | |||||
} | |||||
return sourceData.data.map(t => ({ | |||||
text: t[displayField], | |||||
value: t[valueField] | |||||
})) | |||||
} | |||||
} else if (['layer'].includes(schemeItem.type)) { | |||||
// layer 需要更多属性 | |||||
if (!schemeItem.dataSource || Number(schemeItem.dataSource) === 0) { | |||||
// dataSource 为 0,使用 clientData | |||||
// clientData 对象转数组后,隐含 key:item.text 和 value:item.value 的关系 | |||||
const [keyItem, valueItem] = schemeItem.layerData | |||||
const source = Object | |||||
.values(this.GET_GLOBAL('dataDictionary')[schemeItem.itemCode]) | |||||
.map(t => ({ | |||||
value: t.value, | |||||
text: t.text | |||||
})) | |||||
return { | |||||
source, | |||||
layerData: [{ | |||||
name: 'text', | |||||
label: keyItem.label || '', | |||||
value: keyItem.value || '' | |||||
}, | |||||
{ | |||||
name: 'value', | |||||
label: valueItem.label || '', | |||||
value: valueItem.value || '' | |||||
} | |||||
] | |||||
} | |||||
} else { | |||||
// dataSource 不为 0,使用数据源,需要请求接口,并且提取出显示字段和实际字段 | |||||
const [code] = schemeItem.dataSourceId.split(',') | |||||
const sourceData = await this.FETCH_DATASOURCE(code) | |||||
if (!sourceData) { | |||||
return [] | |||||
} | |||||
const source = sourceData.data | |||||
return { | |||||
source, | |||||
layerData: schemeItem.layerData.filter(t => (!t.hide) && (t.value || t.label)) | |||||
} | |||||
} | |||||
} | |||||
return [] | |||||
}, | |||||
/** | |||||
* 获取一个 scheme 表单项的默认值 (用户新建表单时使用,或是编辑草稿) | |||||
* 参数: 单个 schemeItem , { processId } | |||||
* | |||||
* 每种类别的表单项分别获取的默认值: | |||||
* | |||||
* currentInfo: 根据类别取当前用户/部门/公司/时间日期 | |||||
* datetime: 根据 dfValue 字段表示昨天/今天/明天,格式化为字符串 | |||||
* radio、select: 有 dfValue 则使用,否则取第一条 | |||||
* checkbox: 有 dfValue 则使用,否则为空数组 | |||||
* encode: 根据 rulecode 请求表单编码 | |||||
* upload: 空数组 | |||||
* guid: 赋值第二个参数中的 processId,但是如果在子表格中,赋空字符串 | |||||
* girdtable: 递归所有表格项 scheme 依次为它们生成默认值 | |||||
* datetimerange: 字符串 0 | |||||
*/ | |||||
async getDefaultData(item, prop) { | |||||
const { | |||||
processId | |||||
} = prop | |||||
switch (item.type) { | |||||
case 'currentInfo': | |||||
switch (item.dataType) { | |||||
case 'user': | |||||
return this.GET_GLOBAL('loginUser').userId | |||||
case 'department': | |||||
return this.GET_GLOBAL('loginUser').departmentId | |||||
case 'company': | |||||
return this.GET_GLOBAL('loginUser').companyId | |||||
case 'time': | |||||
return moment().format('YYYY-MM-DD HH:mm:ss') | |||||
default: | |||||
return '' | |||||
} | |||||
case 'datetime': | |||||
const datetimeFormat = item.table ? | |||||
(Number(item.dateformat) === 0 ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm:ss') : | |||||
(item.datetime === 'datetime' ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD') | |||||
const today = moment() | |||||
const dfDatetime = [ | |||||
today.subtract(1, 'day'), | |||||
today, | |||||
today.add(1, 'day') | |||||
][Number(item.dfvalue)] || today | |||||
return dfDatetime.format(datetimeFormat) || '' | |||||
case 'radio': | |||||
case 'select': | |||||
const radioItem = item.__sourceData__.find(t => t.value === item.dfvalue) || item | |||||
.__sourceData__[0] | |||||
return item.type === 'radio' ? radioItem.value : '' | |||||
case 'checkbox': | |||||
if (!item.dfvalue) { | |||||
return [] | |||||
} | |||||
return item.dfvalue.split(',').filter(t => item.__sourceData__.find(s => s.value === t)) | |||||
case 'encode': | |||||
const result = await this.FETCH_ENCODE(item.rulecode) | |||||
return result | |||||
case 'upload': | |||||
return [] | |||||
case 'guid': | |||||
return item.table ? processId : '' | |||||
case 'girdtable': | |||||
const tableItemObj = {} | |||||
for (const fieldItem of item.fieldsData) { | |||||
tableItemObj[fieldItem.field] = await this.getDefaultData(fieldItem, prop) | |||||
} | |||||
return this.COPY(tableItemObj) | |||||
case 'datetimerange': | |||||
return '0' | |||||
default: | |||||
return item.dfvalue || '' | |||||
} | |||||
}, | |||||
/** | |||||
* 将单条 formData 值转化为 formValue 值 (拉取表单数据时使用) | |||||
* 参数: 单个 schemeItem , 数据值 | |||||
* | |||||
* 具体执行逻辑: | |||||
* radio、select: 剔除无效值 | |||||
* checkbox: 分割成数组并剔除无效值 | |||||
* upload: 分割成数组,拉取其中所有文件的信息 | |||||
* datetime: 按照时间日期格式进行格式化字符串 | |||||
* 其他类型: 保留原值 | |||||
*/ | |||||
async convertToFormValue(item, val) { | |||||
switch (item.type) { | |||||
case 'upload': | |||||
if (!val) { | |||||
return [] | |||||
} | |||||
const uidList = val; | |||||
const fileList = [] | |||||
const wxlist = await this.FETCH_FILEList(uidList); | |||||
for (const wxfile of wxlist) { | |||||
const fileInfo = await this.FETCH_FILEINFO(wxfile.F_Id) | |||||
if (!fileInfo) { | |||||
continue | |||||
} | |||||
const fileType = fileInfo.F_FileType | |||||
const fileSize = fileInfo.F_FileSize | |||||
const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(wxfile.F_Id, true) | |||||
fileList.push({ | |||||
path, | |||||
type: fileType, | |||||
uid:wxfile.F_Id, | |||||
folderId:wxfile.F_FolderId, | |||||
size: fileSize | |||||
}) | |||||
} | |||||
return fileList | |||||
case 'select': | |||||
case 'radio': | |||||
if (!val || !item.__sourceData__.map(t => t.value).includes(val)) { | |||||
return '' | |||||
} | |||||
return val | |||||
case 'checkbox': | |||||
const validValue = item.__sourceData__.map(t => t.value) | |||||
const checkboxVal = val.split(',') || [] | |||||
return checkboxVal.filter(t => validValue.includes(t)) | |||||
case 'datetime': | |||||
if (!val) { | |||||
return '' | |||||
} | |||||
return moment(val).format( | |||||
Number(item.dateformat) === 0 || item.datetime === 'date' ? | |||||
'YYYY-MM-DD' : | |||||
'YYYY-MM-DD HH:mm:ss' | |||||
) | |||||
default: | |||||
return val || '' | |||||
} | |||||
}, | |||||
/** | |||||
* 将一个 formValue 值转化为 post 提交值(提交表单数据时使用) | |||||
* 参数: 单个 schemeItem , 表单项值 , 所有 formValue , scheme | |||||
* | |||||
* 具体执行逻辑: | |||||
* checkbox: 将数组使用符号「,」逗号拼接成字符串 | |||||
* datetimerange: 获取开始日期、结束日期,计算差值天数并保留整数 | |||||
* datetime: 格式化为完整时间日期字符串 | |||||
* upload: 依次上传文件,将返回的文件 ID 使用符号「,」逗号拼接成字符串 | |||||
* 其他类型: 保留原值 | |||||
*/ | |||||
async convertToPostData(item, val, formValue, scheme, guid) { | |||||
switch (item.type) { | |||||
case 'checkbox': | |||||
return val ? val.join(',') : '' | |||||
case 'datetimerange': | |||||
const startTime = get(formValue, scheme.find(t => t.id === item.startTime).__valuePath__, null) | |||||
const endTime = get(formValue, scheme.find(t => t.id === item.endTime).__valuePath__, null) | |||||
if (!startTime || !endTime || moment(endTime).isBefore(startTime)) { | |||||
return '' | |||||
} else { | |||||
return moment.duration(moment(endTime).diff(moment(startTime))).asDays().toFixed(0) | |||||
} | |||||
case 'datetime': | |||||
return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '' | |||||
case 'upload': | |||||
var uploadUid = ''; | |||||
for (const item of val) { | |||||
if (item.uid) { | |||||
uploadUid = item.uid | |||||
continue | |||||
} | |||||
const fileId = await this.HTTP_UPLOAD(item.path || item, undefined, guid || '') | |||||
if (fileId) { | |||||
uploadUid = fileId; | |||||
} | |||||
} | |||||
return uploadUid; | |||||
default: | |||||
return val || '' | |||||
} | |||||
} | |||||
} | |||||
} | } |
@@ -257,7 +257,6 @@ export default { | |||||
const fileSize = fileInfo.F_FileSize | const fileSize = fileInfo.F_FileSize | ||||
const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(uid, true) | const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(uid, true) | ||||
fileList.push({ path, type: fileType, uid, size: fileSize }) | fileList.push({ path, type: fileType, uid, size: fileSize }) | ||||
} | } | ||||
return fileList | return fileList | ||||