diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryMSRMilitaryIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryMSRMilitaryIndex.cshtml new file mode 100644 index 000000000..fdae15e89 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryMSRMilitaryIndex.cshtml @@ -0,0 +1,61 @@ +@{ + ViewBag.Title = "学籍异动列表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+ @*
+
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
年级
+
+
+
+
班级
+
+
+
+
姓名
+ +
+
+
身份证号
+ +
+
+
学生编号
+ +
+
+
学籍号
+ +
+
+
+
+
*@ +
+
+ +
+
+
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuTransferInfo/QueryMSRMilitaryIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryMSRMilitaryIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryMSRMilitaryIndex.js new file mode 100644 index 000000000..233e8793c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryMSRMilitaryIndex.js @@ -0,0 +1,240 @@ +var refreshGirdData; +var StuId = request('keyValue'); +var StuNo = request('StuNo'); +var tempdatra = new Array(); +var list = []; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.initGird2(); + page.initGird3(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/LogisticsManagement/MSRMilitaryServiceRegistrationTran/GetPageList', + headData: [ + { label: "学年", name: "YearNo", width: 100, align: "left" }, + { + label: "系部", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 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: "StuNo", 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: 'stuno', + callback: function (_data) { + callback(_data['stuname']); + } + }); + } + }, + { label: "截图上传", name: "Screenshot", width: 100, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true + }); + page.search(); + }, + initGird2: function () { + $('#gridtableTwo').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/LogisticsManagement/MSRIntentionManagementTran/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=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + 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: "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: "StuNo", 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: 'stuno', + callback: function (_data) { + callback(_data['stuname']); + } + }); + } + }, + { label: "联系方式", name: "Mobile", width: 100, align: "left" }, + { label: "年龄", name: "Age", width: 100, align: "left" }, + { label: "身高", name: "High", width: 100, align: "left" }, + { label: "体重", name: "Weight", width: 100, align: "left" }, + { label: "视力", name: "Vision", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true + }); + page.search2(); + }, + initGird3: function () { + $('#gridtableThree').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/LogisticsManagement/MSRMilitaryRecordTran/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=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + 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: "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: "StuNo", 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: 'stuno', + callback: function (_data) { + callback(_data['stuname']); + } + }); + } + }, + { label: "参军记录", name: "Record", width: 100, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true + }); + page.search3(); + }, + search: function (param) { + param = param || {}; + param.StuNo = StuNo; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + search2: function (param) { + param = param || {}; + param.StuNo = StuNo; + $('#gridtableTwo').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + search3: function (param) { + param = param || {}; + param.StuNo = StuNo; + $('#gridtableThree').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + page.search2(); + page.search3(); + }; + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryScholarshipIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryScholarshipIndex.js index cb50bc7e4..6d950b334 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryScholarshipIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryScholarshipIndex.js @@ -1,5 +1,6 @@ var refreshGirdData; var StuId; +var StuNo = request('StuNo'); var tempdatra = new Array(); var list = []; var bootstrap = function ($, learun) { @@ -110,10 +111,12 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; param.IsType = 0; + param.StuNo = StuNo; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); }, search2: function (param) { param = param || {}; + param.StuNo = StuNo; param.IsType = 1; $('#gridtableTwo').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/MSRIntentionManagementTranController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/MSRIntentionManagementTranController.cs new file mode 100644 index 000000000..7268f2470 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/MSRIntentionManagementTranController.cs @@ -0,0 +1,111 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:38 + /// 描 述:参军意向管理 + /// + public class MSRIntentionManagementTranController : MvcControllerBase + { + private MSRIntentionManagementTranIBLL mSRIntentionManagementTranIBLL = new MSRIntentionManagementTranBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = mSRIntentionManagementTranIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var MSRIntentionManagementData = mSRIntentionManagementTranIBLL.GetMSRIntentionManagementEntity( keyValue ); + var jsonData = new { + MSRIntentionManagementTran = MSRIntentionManagementData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + mSRIntentionManagementTranIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + MSRIntentionManagementTranEntity entity = strEntity.ToObject(); + mSRIntentionManagementTranIBLL.SaveEntity(keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/MSRMilitaryRecordTranController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/MSRMilitaryRecordTranController.cs new file mode 100644 index 000000000..ea2349b55 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/MSRMilitaryRecordTranController.cs @@ -0,0 +1,111 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:49 + /// 描 述:参军记录 + /// + public class MSRMilitaryRecordTranController : MvcControllerBase + { + private MSRMilitaryRecordTranIBLL mSRMilitaryRecordIBLL = new MSRMilitaryRecordTranBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = mSRMilitaryRecordIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var MSRMilitaryRecordData = mSRMilitaryRecordIBLL.GetMSRMilitaryRecordEntity( keyValue ); + var jsonData = new { + MSRMilitaryRecord = MSRMilitaryRecordData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + mSRMilitaryRecordIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + MSRMilitaryRecordTranEntity entity = strEntity.ToObject(); + mSRMilitaryRecordIBLL.SaveEntity(keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/MSRMilitaryServiceRegistrationTranController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/MSRMilitaryServiceRegistrationTranController.cs new file mode 100644 index 000000000..bafc773a7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/MSRMilitaryServiceRegistrationTranController.cs @@ -0,0 +1,111 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 12:01 + /// 描 述:兵役登记 + /// + public class MSRMilitaryServiceRegistrationTranController : MvcControllerBase + { + private MSRMilitaryServiceRegistrationTranIBLL mSRMilitaryServiceRegistrationTranIBLL = new MSRMilitaryServiceRegistrationTranBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = mSRMilitaryServiceRegistrationTranIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var MSRMilitaryServiceRegistrationData = mSRMilitaryServiceRegistrationTranIBLL.GetMSRMilitaryServiceRegistrationEntity( keyValue ); + var jsonData = new { + MSRMilitaryServiceRegistration = MSRMilitaryServiceRegistrationData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + mSRMilitaryServiceRegistrationTranIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + MSRMilitaryServiceRegistrationTranEntity entity = strEntity.ToObject(); + mSRMilitaryServiceRegistrationTranIBLL.SaveEntity(keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index fe104ec01..a72ee3d8e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -396,6 +396,9 @@ + + + @@ -1366,6 +1369,7 @@ + @@ -8081,6 +8085,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 685e5f2cf..1b68ef3d7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -140,6 +140,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/MSRIntentionManagementTranMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/MSRIntentionManagementTranMap.cs new file mode 100644 index 000000000..7e601300e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/MSRIntentionManagementTranMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:38 + /// 描 述:参军意向管理 + /// + public class MSRIntentionManagementTranMap : EntityTypeConfiguration + { + public MSRIntentionManagementTranMap() + { + #region 表、主键 + //表 + this.ToTable("MSRINTENTIONMANAGEMENTTRAN"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/MSRMilitaryRecordTranMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/MSRMilitaryRecordTranMap.cs new file mode 100644 index 000000000..91f2abd2f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/MSRMilitaryRecordTranMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:49 + /// 描 述:参军记录 + /// + public class MSRMilitaryRecordTranMap : EntityTypeConfiguration + { + public MSRMilitaryRecordTranMap() + { + #region 表、主键 + //表 + this.ToTable("MSRMILITARYRECORD"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/MSRMilitaryServiceRegistrationTranMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/MSRMilitaryServiceRegistrationTranMap.cs new file mode 100644 index 000000000..678569a40 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/MSRMilitaryServiceRegistrationTranMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 12:01 + /// 描 述:兵役登记 + /// + public class MSRMilitaryServiceRegistrationTranMap : EntityTypeConfiguration + { + public MSRMilitaryServiceRegistrationTranMap() + { + #region 表、主键 + //表 + this.ToTable("MSRMILITARYSERVICEREGISTRATIONTRAN"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranService.cs index f84ed4977..b5fb6a99b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranService.cs @@ -64,11 +64,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String); strSql.Append(" AND s.IdentityCardNo Like @IdentityCardNo "); } - //var userlogin = LoginUserInfo.Get(); - //if (userlogin.Description == "学生") - //{ - // strSql.Append(" AND t.stuno = '" + userlogin.account + "' "); - //} + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 6e26b839e..372ed1322 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -424,6 +424,18 @@ + + + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranBLL.cs new file mode 100644 index 000000000..4c797f76b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranBLL.cs @@ -0,0 +1,124 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:38 + /// 描 述:参军意向管理 + /// + public class MSRIntentionManagementTranBLL : MSRIntentionManagementTranIBLL + { + private MSRIntentionManagementTranService mSRIntentionManagementService = new MSRIntentionManagementTranService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return mSRIntentionManagementService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取MSRIntentionManagementTran表实体数据 + /// 主键 + /// + /// + public MSRIntentionManagementTranEntity GetMSRIntentionManagementEntity(string keyValue) + { + try + { + return mSRIntentionManagementService.GetMSRIntentionManagementEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + mSRIntentionManagementService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, MSRIntentionManagementTranEntity entity) + { + try + { + mSRIntentionManagementService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranEntity.cs new file mode 100644 index 000000000..bd179c7e1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranEntity.cs @@ -0,0 +1,103 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:38 + /// 描 述:参军意向管理 + /// + public class MSRIntentionManagementTranEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 系 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 专业 + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// 班级 + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// 学生 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 联系方式 + /// + [Column("MOBILE")] + public string Mobile { get; set; } + /// + /// 年龄 + /// + [Column("AGE")] + public string Age { get; set; } + /// + /// 身高 + /// + [Column("HIGH")] + public string High { get; set; } + /// + /// 体重 + /// + [Column("WEIGHT")] + public string Weight { get; set; } + /// + /// 视力 + /// + [Column("VISION")] + public string Vision { get; set; } + /// + /// 添加时间 + /// + [Column("F_CREATEDATE")] + public DateTime? F_CreateDate { get; set; } + /// + /// 添加人 + /// + [Column("F_CREATEUSERID")] + public string F_CreateUserId { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + this.F_CreateDate = DateTime.Now; + UserInfo userInfo = LoginUserInfo.Get(); + this.F_CreateUserId = userInfo.userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranIBLL.cs new file mode 100644 index 000000000..96b53609f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:38 + /// 描 述:参军意向管理 + /// + public interface MSRIntentionManagementTranIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取MSRIntentionManagementTran表实体数据 + /// 主键 + /// + /// + MSRIntentionManagementTranEntity GetMSRIntentionManagementEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, MSRIntentionManagementTranEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranService.cs new file mode 100644 index 000000000..6496436d9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRIntentionManagementTran/MSRIntentionManagementTranService.cs @@ -0,0 +1,172 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; +using Learun.Application.TwoDevelopment.EducationalAdministration; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:38 + /// 描 述:参军意向管理 + /// + public class MSRIntentionManagementTranService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" t.* "); + strSql.Append(" FROM MSRIntentionManagementTran 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["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["StuNo"].IsEmpty()) + { + dp.Add("StuNo",queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MSRIntentionManagementTran表实体数据 + /// 主键 + /// + /// + public MSRIntentionManagementTranEntity GetMSRIntentionManagementEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, MSRIntentionManagementTranEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + + //获取当前学生的名字、系、专业、班级 + var loginUser = LoginUserInfo.Get(); + var userEntity = this.BaseRepository("CollegeMIS") + .FindEntity(a => a.StuNo == loginUser.account); + entity.StuNo = userEntity?.StuNo; + entity.DeptNo = userEntity?.DeptNo; + entity.MajorNo = userEntity?.MajorNo; + entity.ClassNo = userEntity?.ClassNo; + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranBLL.cs new file mode 100644 index 000000000..f7ca47266 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranBLL.cs @@ -0,0 +1,124 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:49 + /// 描 述:参军记录 + /// + public class MSRMilitaryRecordTranBLL : MSRMilitaryRecordTranIBLL + { + private MSRMilitaryRecordTranService mSRMilitaryRecordService = new MSRMilitaryRecordTranService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return mSRMilitaryRecordService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取MSRMilitaryRecord表实体数据 + /// 主键 + /// + /// + public MSRMilitaryRecordTranEntity GetMSRMilitaryRecordEntity(string keyValue) + { + try + { + return mSRMilitaryRecordService.GetMSRMilitaryRecordEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + mSRMilitaryRecordService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, MSRMilitaryRecordTranEntity entity) + { + try + { + mSRMilitaryRecordService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranEntity.cs new file mode 100644 index 000000000..9a0f4eb95 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranEntity.cs @@ -0,0 +1,87 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:49 + /// 描 述:参军记录 + /// + public class MSRMilitaryRecordTranEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 系 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 专业 + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// 班级 + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// 学生 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 参军记录 + /// + [Column("RECORD")] + public string Record { get; set; } + /// + /// 添加时间 + /// + [Column("F_CREATETIME")] + public DateTime? F_CreateTime { get; set; } + /// + /// 添加人 + /// + [Column("F_CREATEUSERID")] + public string F_CreateUserId { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + UserInfo userInfo = LoginUserInfo.Get(); + this.F_CreateUserId = userInfo.userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranIBLL.cs new file mode 100644 index 000000000..4d10f969d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:49 + /// 描 述:参军记录 + /// + public interface MSRMilitaryRecordTranIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取MSRMilitaryRecord表实体数据 + /// 主键 + /// + /// + MSRMilitaryRecordTranEntity GetMSRMilitaryRecordEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, MSRMilitaryRecordTranEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranService.cs new file mode 100644 index 000000000..c9264c365 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryRecordTran/MSRMilitaryRecordTranService.cs @@ -0,0 +1,179 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; +using Learun.Application.TwoDevelopment.EducationalAdministration; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 13:49 + /// 描 述:参军记录 + /// + public class MSRMilitaryRecordTranService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ID, + t.DeptNo, + t.MajorNo, + t.ClassNo, + t.StuNo, + t.Record, + t.Remark + "); + strSql.Append(" FROM MSRMilitaryRecord 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["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["StuNo"].IsEmpty()) + { + dp.Add("StuNo",queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MSRMilitaryRecord表实体数据 + /// 主键 + /// + /// + public MSRMilitaryRecordTranEntity GetMSRMilitaryRecordEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, MSRMilitaryRecordTranEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + //获取当前学生的名字、系、专业、班级 + var loginUser = LoginUserInfo.Get(); + var userEntity = this.BaseRepository("CollegeMIS") + .FindEntity(a => a.StuNo == loginUser.account); + entity.StuNo = userEntity?.StuNo; + entity.DeptNo = userEntity?.DeptNo; + entity.MajorNo = userEntity?.MajorNo; + entity.ClassNo = userEntity?.ClassNo; + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranBLL.cs new file mode 100644 index 000000000..4f547a35e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranBLL.cs @@ -0,0 +1,124 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 12:01 + /// 描 述:兵役登记 + /// + public class MSRMilitaryServiceRegistrationTranBLL : MSRMilitaryServiceRegistrationTranIBLL + { + private MSRMilitaryServiceRegistrationTranService mSRMilitaryServiceRegistrationTranService = new MSRMilitaryServiceRegistrationTranService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return mSRMilitaryServiceRegistrationTranService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取MSRMilitaryServiceRegistrationTran表实体数据 + /// 主键 + /// + /// + public MSRMilitaryServiceRegistrationTranEntity GetMSRMilitaryServiceRegistrationEntity(string keyValue) + { + try + { + return mSRMilitaryServiceRegistrationTranService.GetMSRMilitaryServiceRegistrationEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + mSRMilitaryServiceRegistrationTranService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, MSRMilitaryServiceRegistrationTranEntity entity) + { + try + { + mSRMilitaryServiceRegistrationTranService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranEntity.cs new file mode 100644 index 000000000..5cd65750c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranEntity.cs @@ -0,0 +1,85 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 12:01 + /// 描 述:兵役登记 + /// + public class MSRMilitaryServiceRegistrationTranEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 系 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 专业 + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// 班级 + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// 学生 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 截图上传 + /// + [Column("SCREENSHOT")] + public string Screenshot { get; set; } + /// + /// 添加时间 + /// + [Column("F_CREATETIME")] + public DateTime? F_CreateTime { get; set; } + /// + /// 学年 + /// + [Column("YEARNO")] + public string YearNo { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranIBLL.cs new file mode 100644 index 000000000..24a6909be --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 12:01 + /// 描 述:兵役登记 + /// + public interface MSRMilitaryServiceRegistrationTranIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取MSRMilitaryServiceRegistrationTran表实体数据 + /// 主键 + /// + /// + MSRMilitaryServiceRegistrationTranEntity GetMSRMilitaryServiceRegistrationEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, MSRMilitaryServiceRegistrationTranEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranService.cs new file mode 100644 index 000000000..3905a9f41 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/MSRMilitaryServiceRegistrationTran/MSRMilitaryServiceRegistrationTranService.cs @@ -0,0 +1,178 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; +using Learun.Application.TwoDevelopment.EducationalAdministration; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-19 12:01 + /// 描 述:兵役登记 + /// + public class MSRMilitaryServiceRegistrationTranService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" t.* "); + strSql.Append(" FROM MSRMilitaryServiceRegistrationTran t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["YearNo"].IsEmpty()) + { + dp.Add("YearNo", "%" + queryParam["YearNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.YearNo Like @YearNo "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo",queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + 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["StuNo"].IsEmpty()) + { + dp.Add("StuNo",queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MSRMilitaryServiceRegistrationTran表实体数据 + /// 主键 + /// + /// + public MSRMilitaryServiceRegistrationTranEntity GetMSRMilitaryServiceRegistrationEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, MSRMilitaryServiceRegistrationTranEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + //获取当前学生的名字、系、专业、班级 + var loginUser = LoginUserInfo.Get(); + var userEntity = this.BaseRepository("CollegeMIS") + .FindEntity(a => a.StuNo == loginUser.account); + var aa = Common.GetSemesterAndYear(); + entity.StuNo = userEntity?.StuNo; + entity.DeptNo = userEntity?.DeptNo; + entity.MajorNo = userEntity?.MajorNo; + entity.ClassNo = userEntity?.ClassNo; + entity.YearNo = aa.AcademicYearShort; + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +}