diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentPracticeInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentPracticeInfoController.cs new file mode 100644 index 000000000..4fc1d4da6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentPracticeInfoController.cs @@ -0,0 +1,122 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-26 10:48 + /// 描 述:StudentPracticeInfo + /// + public class StudentPracticeInfoController : MvcControllerBase + { + private StudentPracticeInfoIBLL studentPracticeInfoIBLL = new StudentPracticeInfoBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + ViewBag.EnCode = studentPracticeInfoIBLL.GetCode(); + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = studentPracticeInfoIBLL.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 StudentPracticeInfoData = studentPracticeInfoIBLL.GetStudentPracticeInfoEntity(keyValue); + var jsonData = new + { + StudentPracticeInfo = StudentPracticeInfoData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + studentPracticeInfoIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + StudentPracticeInfoEntity entity = strEntity.ToObject(); + var Code = entity.Code.Substring(4); + if (Convert.ToInt32(Code) >= 1000) + { + return Success("保存失败,实习编号已超出!!!"); + } + studentPracticeInfoIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Form.cshtml new file mode 100644 index 000000000..0283b2e57 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Form.cshtml @@ -0,0 +1,114 @@ +@{ + ViewBag.Title = "StudentPracticeInfo"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
学校名称
+
+
+
+
实习编号
+ +
+
+
实习名目
+ +
+
+
学生姓名
+ +
+
+
学号
+ +
+
+
出生日期
+ +
+
+
性别
+
+
+
+
年级
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
实习单位及性质
+ +
+
+
实习岗位
+ +
+
+
是否专业对口
+
+
+
+
知情同意书
+
+
+
+
实习三方协议
+
+
+
+
实习责任保险
+
+
+
+
投保险种名称
+ +
+
+
实习责任教师
+ +
+
+
企业考核成绩
+ +
+
+
实习考核成绩
+ +
+
+
实习考核结果
+ +
+
+
实习薪酬/月
+ +
+
+
自主实习
+
+
+
+
毕业年级
+
+
+
+
签订就业协议
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentPracticeInfo/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Form.js new file mode 100644 index 000000000..31e158933 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Form.js @@ -0,0 +1,68 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-26 10:48 + * 描 述:StudentPracticeInfo + */ +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 () { + $('#School').lrDataSourceSelect({ code: 'company',value: 'f_companyid',text: 'f_fullname' }); + $('#Sex').lrDataItemSelect({ code: 'usersexbit' }); + $('#Grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: "value", + text: "text", + }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); + $('#IsMatchMajor').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsICF').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsTAI').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsInsure').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsAP').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#ISGY').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsED').lrDataItemSelect({ code: 'YesOrNoBit' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentPracticeInfo/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]); + } + } + }); + } else { + $("#Code").val(NewCode); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StudentPracticeInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Index.cshtml new file mode 100644 index 000000000..4ffba65a4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Index.cshtml @@ -0,0 +1,89 @@ +@{ + ViewBag.Title = "StudentPracticeInfo"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学校
+
+
+
+
实习编号
+ +
+
+
专业
+
+
+
+
班级
+
+
+
+
年级
+
+
+
+
学生学号
+ +
+
+
学生姓名
+ +
+
+
专业对口
+
+
+
+
知情同意书
+
+
+
+
实习协议
+
+
+
+
实习保险
+
+
+
+
自主实习
+
+
+
+
毕业年级
+
+
+
+
就业协议
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentPracticeInfo/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Index.js new file mode 100644 index 000000000..84807edb3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentPracticeInfo/Index.js @@ -0,0 +1,221 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-26 10:48 + * 描 述:StudentPracticeInfo + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 350, 400); + $('#School').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#Grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: "value", + text: "text", + }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#IsMatchMajor').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsICF').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsTAI').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsInsure').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsAP').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#ISGY').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsED').lrDataItemSelect({ code: 'YesOrNoBit' }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StudentPracticeInfo/Form', + width: 800, + height: 800, + 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/StudentPracticeInfo/Form?keyValue=' + keyValue, + width: 800, + height: 800, + 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/StudentPracticeInfo/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //  导入 + $('#lr_import').on('click', function () { + }); + //  导出 + $('#lr_export').on('click', function () { + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StudentPracticeInfo/GetPageList', + headData: [ + { + label: "学校名称", name: "School", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { label: "实习编号", name: "Code", width: 100, align: "left" }, + { label: "实习名目", name: "ITask", width: 100, align: "left" }, + { label: "学生姓名", name: "StuName", width: 100, align: "left" }, + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { + label: "出生日期", name: "Birthday", width: 100, align: "left", + formatter: function (value) { + return learun.formatDate(value, 'yyyy-MM-dd'); + } + }, + { + label: "性别", name: "Sex", width: 50, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { + label: "年级", name: "Grade", width: 50, 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: "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: "InternshipCompany", width: 100, align: "left" }, + { label: "实习岗位", name: "Post", width: 100, align: "left" }, + { + label: "是否专业对口", name: "IsMatchMajor", width: 100, align: "left" + , formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否" + } + }, + { + label: "知情同意书", name: "IsICF", width: 100, align: "left" + , formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否" + } + }, + { + label: "实习三方协议", name: "IsTAI", width: 100, align: "left" + , formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否" + } + }, + { + label: "实习责任保险", name: "IsInsure", width: 100, align: "left" + , formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否" + } + }, + { label: "投保险种名称", name: "insuranceName", width: 100, align: "left" }, + { label: "实习责任教师", name: "Teacher", width: 100, align: "left" }, + { label: "企业考核成绩", name: "CompanyCheckResult", width: 100, align: "left" }, + { label: "实习考核成绩", name: "SchoolCheckResult", width: 100, align: "left" }, + { label: "实习考核结果", name: "InternshipResult", width: 100, align: "left" }, + { label: "实习薪酬/月", name: "InternshipPay", width: 100, align: "left" }, + { + label: "自主实习", name: "IsAP", width: 100, align: "left" + , formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否" + } + }, + { + label: "毕业年级", name: "ISGY", width: 100, align: "left" + , formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否" + } + }, + { + label: "签订就业协议", name: "IsED", width: 100, align: "left" + , formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否" + } + }, + { label: "备注", name: "Demo", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'CreateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} 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 a1822de43..cd5feb20e 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 @@ -904,6 +904,7 @@ + @@ -7109,6 +7110,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentPracticeInfoMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentPracticeInfoMap.cs new file mode 100644 index 000000000..a7bd72017 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StudentPracticeInfoMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-26 10:48 + /// 描 述:StudentPracticeInfo + /// + public class StudentPracticeInfoMap : EntityTypeConfiguration + { + public StudentPracticeInfoMap() + { + #region 表、主键 + //表 + this.ToTable("STUDENTPRACTICEINFO"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + 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 d1fae5bef..4e8e8767e 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 @@ -662,6 +662,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoBLL.cs new file mode 100644 index 000000000..d27251b17 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoBLL.cs @@ -0,0 +1,146 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-26 10:48 + /// 描 述:StudentPracticeInfo + /// + public class StudentPracticeInfoBLL : StudentPracticeInfoIBLL + { + private StudentPracticeInfoService studentPracticeInfoService = new StudentPracticeInfoService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return studentPracticeInfoService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StudentPracticeInfo表实体数据 + /// + /// 主键 + /// + public StudentPracticeInfoEntity GetStudentPracticeInfoEntity(string keyValue) + { + try + { + return studentPracticeInfoService.GetStudentPracticeInfoEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + studentPracticeInfoService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, StudentPracticeInfoEntity entity) + { + try + { + studentPracticeInfoService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 扩展 + + public string GetCode() + { + try + { + return studentPracticeInfoService.GetCode(); + } + 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/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoEntity.cs new file mode 100644 index 000000000..f3765f20e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoEntity.cs @@ -0,0 +1,201 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-26 10:48 + /// 描 述:StudentPracticeInfo + /// + public class StudentPracticeInfoEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// School + /// + [Column("SCHOOL")] + public string School { get; set; } + /// + /// Code + /// + [Column("CODE")] + public string Code { get; set; } + /// + /// ITask + /// + [Column("ITASK")] + public string ITask { get; set; } + /// + /// Grade + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// ClassNo + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// MajorNo + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// StuNo + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// StuName + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// Birthday + /// + [Column("BIRTHDAY")] + public DateTime? Birthday { get; set; } + /// + /// Sex + /// + [Column("SEX")] + public bool? Sex { get; set; } + /// + /// InternshipCompany + /// + [Column("INTERNSHIPCOMPANY")] + public string InternshipCompany { get; set; } + /// + /// Post + /// + [Column("POST")] + public string Post { get; set; } + /// + /// IsMatchMajor + /// + [Column("ISMATCHMAJOR")] + public bool? IsMatchMajor { get; set; } + /// + /// 知情同意书 + /// + [Column("ISICF")] + public bool? IsICF { get; set; } + /// + /// 实习三方协议 + /// + [Column("ISTAI")] + public bool? IsTAI { get; set; } + /// + /// 是否投保 + /// + [Column("ISINSURE")] + public bool? IsInsure { get; set; } + /// + /// insuranceName + /// + [Column("INSURANCENAME")] + public string insuranceName { get; set; } + /// + /// Teacher + /// + [Column("TEACHER")] + public string Teacher { get; set; } + /// + /// CompanyCheckResult + /// + [Column("COMPANYCHECKRESULT")] + public string CompanyCheckResult { get; set; } + /// + /// SchoolCheckResult + /// + [Column("SCHOOLCHECKRESULT")] + public string SchoolCheckResult { get; set; } + /// + /// InternshipResult + /// + [Column("INTERNSHIPRESULT")] + public string InternshipResult { get; set; } + /// + /// InternshipPay + /// + [Column("INTERNSHIPPAY")] + public decimal? InternshipPay { get; set; } + /// + /// 是否为自主实习 + /// + [Column("ISAP")] + public bool? IsAP { get; set; } + /// + /// 是否毕业年级 + /// + [Column("ISGY")] + public bool? ISGY { get; set; } + /// + /// 是否签订就业协议 + /// + [Column("ISED")] + public bool? IsED { get; set; } + /// + /// Demo + /// + [Column("DEMO")] + public string Demo { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUser + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + /// + /// ModifyTime + /// + [Column("MODIFYTIME")] + public DateTime? ModifyTime { get; set; } + /// + /// ModifyUser + /// + [Column("MODIFYUSER")] + public string ModifyUser { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + this.CreateUser = LoginUserInfo.Get().userId; + this.CreateTime = DateTime.Now; + this.ModifyUser = LoginUserInfo.Get().userId; + this.ModifyTime = DateTime.Now; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + this.ModifyUser = LoginUserInfo.Get().userId; + this.ModifyTime = DateTime.Now; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoIBLL.cs new file mode 100644 index 000000000..d822efc61 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoIBLL.cs @@ -0,0 +1,51 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-26 10:48 + /// 描 述:StudentPracticeInfo + /// + public interface StudentPracticeInfoIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取StudentPracticeInfo表实体数据 + /// + /// 主键 + /// + StudentPracticeInfoEntity GetStudentPracticeInfoEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, StudentPracticeInfoEntity entity); + #endregion + + #region 扩展数据 + string GetCode(); + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoService.cs new file mode 100644 index 000000000..14beae09c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentPracticeInfo/StudentPracticeInfoService.cs @@ -0,0 +1,251 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-26 10:48 + /// 描 述:StudentPracticeInfo + /// + public class StudentPracticeInfoService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" t.* "); + strSql.Append(" FROM StudentPracticeInfo t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Code"].IsEmpty()) + { + dp.Add("Code", "%" + queryParam["Code"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Code Like @Code "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["School"].IsEmpty()) + { + dp.Add("School", "" + queryParam["School"].ToString() + "", DbType.String); + strSql.Append(" AND t.School=@School "); + } + 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["Grade"].IsEmpty()) + { + dp.Add("Grade", "" + queryParam["Grade"].ToString() + "", DbType.String); + strSql.Append(" AND t.Grade=@Grade "); + } + if (!queryParam["IsMatchMajor"].IsEmpty()) + { + dp.Add("IsMatchMajor", "" + queryParam["IsMatchMajor"].ToString() + "", DbType.String); + strSql.Append(" AND t.IsMatchMajor=@IsMatchMajor "); + } + if (!queryParam["IsICF"].IsEmpty()) + { + dp.Add("IsICF", "" + queryParam["IsICF"].ToString() + "", DbType.String); + strSql.Append(" AND t.IsICF=@IsICF "); + } + if (!queryParam["IsTAI"].IsEmpty()) + { + dp.Add("IsTAI", "" + queryParam["IsTAI"].ToString() + "", DbType.String); + strSql.Append(" AND t.IsTAI=@IsTAI "); + } + if (!queryParam["IsInsure"].IsEmpty()) + { + dp.Add("IsInsure", "" + queryParam["IsInsure"].ToString() + "", DbType.String); + strSql.Append(" AND t.IsInsure=@IsInsure "); + } + if (!queryParam["IsAP"].IsEmpty()) + { + dp.Add("IsAP", "" + queryParam["IsAP"].ToString() + "", DbType.String); + strSql.Append(" AND t.IsAP=@IsAP "); + } + if (!queryParam["ISGY"].IsEmpty()) + { + dp.Add("ISGY", "" + queryParam["ISGY"].ToString() + "", DbType.String); + strSql.Append(" AND t.ISGY=@ISGY "); + } + if (!queryParam["IsED"].IsEmpty()) + { + dp.Add("IsED", "" + queryParam["IsED"].ToString() + "", DbType.String); + strSql.Append(" AND t.IsED=@IsED "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StudentPracticeInfo表实体数据 + /// + /// 主键 + /// + public StudentPracticeInfoEntity GetStudentPracticeInfoEntity(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, StudentPracticeInfoEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 扩展 + /// + /// 获取FundsApply表实体数据 + /// + /// 主键 + /// + public string GetCode() + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select * from StudentPracticeInfo "); + var data = this.BaseRepository("CollegeMIS").FindList(strSql.ToString()).OrderByDescending(x => x.Code).FirstOrDefault(); + var Code = DateTime.Now.Year.ToString(); + if (data != null && !string.IsNullOrEmpty(data.Code)) + { + var NCode = data.Code.Substring(data.Code.Length - 3, 3); + Code = Code + (Convert.ToInt32(NCode) + 1).ToString().PadLeft(3, '0'); + } + else + { + Code = Code + "001"; + } + return Code; + } + 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/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index b3410f78e..5aa5d12ec 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 @@ -2071,6 +2071,10 @@ + + + +