diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Index.js
index a391d4f2a..0bf789c22 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Index.js
@@ -55,7 +55,7 @@ var bootstrap = function ($, learun) {
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
- learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/StudyGuide/DeleteForm', { keyValue: keyValue}, function () {
+ learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/StudyGuide/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
@@ -66,34 +66,74 @@ var bootstrap = function ($, learun) {
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
+ //发布
+ $('#lr_publish').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('StudyID');
+ var GuideState = $('#gridtable').jfGridValue('GuideState');
+ if (learun.checkrow(keyValue)) {
+ if (GuideState.indexOf('0') != -1) {
+ return learun.alert.warning('选中记录包含已发布的记录!');
+ }
+ learun.layerConfirm('是否确认发布选中记录!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/StudyGuide/Publish', { keyValue: keyValue, GuideState: 0 }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ //取消发布
+ $('#lr_nopublish').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('StudyID');
+ var GuideState = $('#gridtable').jfGridValue('GuideState');
+ if (learun.checkrow(keyValue)) {
+ if (GuideState.indexOf('1') != -1) {
+ return learun.alert.warning('选中记录包含未发布的记录!');
+ }
+ learun.layerConfirm('是否确认发布选中记录!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/StudyGuide/Publish', { keyValue: keyValue, GuideState: 1 }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/StudyGuide/GetPageList',
headData: [
- { label: "标题", name: "StudyName", width: 100, align: "left"},
- { label: "创建用户", name: "GuideName", width: 100, align: "left"},
- { label: "添加时间", name: "Guidetime", width: 100, align: "left"},
- { label: "是否发布", name: "GuideState", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op,$cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'YesOrNoInt',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }},
+ { label: "标题", name: "StudyName", width: 100, align: "left" },
+ { label: "创建用户", name: "CreateUserName", width: 100, align: "left" },
+ {
+ label: "添加时间", name: "CreateTime", width: 100, align: "left",
+ formatter: function (value) {
+ return learun.formatDate(value, 'yyyy-MM-dd');
+ }
+ },
+ {
+ label: "发布状态", name: "GuideState", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 0) {
+ return '
发布';
+ } else if (cellvalue == 1) {
+ return '
暂未发布';
+ }
+ }
+ },
],
- mainId:'StudyID',
- isPage: true
+ mainId: 'StudyID',
+ isPage: true,
+ isMultiselect: true,
});
page.search();
},
search: function (param) {
param = param || {};
- $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
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 1b9f03207..695f9cf04 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
@@ -315,6 +315,7 @@
+
@@ -805,6 +806,8 @@
+
+
@@ -6372,6 +6375,14 @@
+
+
+
+
+
+
+
+
@@ -7172,6 +7183,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectLevelMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectLevelMap.cs
new file mode 100644
index 000000000..1e79b2981
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectLevelMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.CustomFunction;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:15
+ /// 描 述:科研项目级别管理
+ ///
+ public class SRProjectLevelMap : EntityTypeConfiguration
+ {
+ public SRProjectLevelMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("SRPROJECTLEVEL");
+ //主键
+ this.HasKey(t => t.LevID);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectTypeMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectTypeMap.cs
new file mode 100644
index 000000000..da3093dff
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectTypeMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.CustomFunction;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:51
+ /// 描 述:科研项目类型管理
+ ///
+ public class SRProjectTypeMap : EntityTypeConfiguration
+ {
+ public SRProjectTypeMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("SRPROJECTTYPE");
+ //主键
+ this.HasKey(t => t.TypeID);
+ #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 7a5f01eb5..43ab8cde5 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
@@ -559,6 +559,8 @@
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelBLL.cs
new file mode 100644
index 000000000..f5fded7b9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelBLL.cs
@@ -0,0 +1,149 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:15
+ /// 描 述:科研项目级别管理
+ ///
+ public class SRProjectLevelBLL : SRProjectLevelIBLL
+ {
+ private SRProjectLevelService sRProjectLevelService = new SRProjectLevelService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return sRProjectLevelService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取SRProjectLevel表实体数据
+ ///
+ /// 主键
+ ///
+ public SRProjectLevelEntity GetSRProjectLevelEntity(string keyValue)
+ {
+ try
+ {
+ return sRProjectLevelService.GetSRProjectLevelEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ sRProjectLevelService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, SRProjectLevelEntity entity)
+ {
+ try
+ {
+ sRProjectLevelService.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ ///
+ /// 启用 禁用
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void UpdateStatus(string keyValue, int status)
+ {
+ try
+ {
+ sRProjectLevelService.UpdateStatus(keyValue, status);
+ }
+ 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/CustomFunction/SRProjectLevel/SRProjectLevelEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelEntity.cs
new file mode 100644
index 000000000..4872777b6
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelEntity.cs
@@ -0,0 +1,98 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:15
+ /// 描 述:科研项目级别管理
+ ///
+ public class SRProjectLevelEntity
+ {
+ #region 实体成员
+ ///
+ /// 主键
+ ///
+ [Column("LEVID")]
+ public string LevID { get; set; }
+ ///
+ /// 级别名称
+ ///
+ [Column("LEVNAME")]
+ public string LevName { get; set; }
+ ///
+ /// 排序
+ ///
+ [Column("LEVSORT")]
+ public int? LevSort { get; set; }
+ ///
+ /// 状态
+ ///
+ [Column("LEVSTATUS")]
+ public int? LevStatus { get; set; }
+ ///
+ /// 创建人
+ ///
+ [Column("LEVCREATEUSERID")]
+ public string LevCreateUserId { get; set; }
+ ///
+ /// 创建人
+ ///
+ [Column("LEVCREATEUSERNAME")]
+ public string LevCreateUserName { get; set; }
+ ///
+ /// 创建时间
+ ///
+ [Column("LEVCREATETIME")]
+ public DateTime? LevCreateTime { get; set; }
+ ///
+ /// 最后一次修改人
+ ///
+ [Column("LEVMODIFYUSERID")]
+ public string LevModifyUserId { get; set; }
+ ///
+ /// 最后一次修改人
+ ///
+ [Column("LEVMODIFYUSERNAME")]
+ public string LevModifyUserName { get; set; }
+ ///
+ /// 最后一次修改时间
+ ///
+ [Column("LEVMODIFYTIME")]
+ public DateTime? LevModifyTime { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.LevID = Guid.NewGuid().ToString();
+ var userinfo = LoginUserInfo.Get();
+ this.LevCreateUserId = userinfo.userId;
+ this.LevCreateUserName = userinfo.realName;
+ this.LevCreateTime = DateTime.Now;
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.LevID = keyValue;
+ var userinfo = LoginUserInfo.Get();
+ this.LevModifyUserId = userinfo.userId;
+ this.LevModifyUserName = userinfo.realName;
+ this.LevModifyTime = DateTime.Now;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelIBLL.cs
new file mode 100644
index 000000000..ec821176d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelIBLL.cs
@@ -0,0 +1,56 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:15
+ /// 描 述:科研项目级别管理
+ ///
+ public interface SRProjectLevelIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取SRProjectLevel表实体数据
+ ///
+ /// 主键
+ ///
+ SRProjectLevelEntity GetSRProjectLevelEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, SRProjectLevelEntity entity);
+
+ ///
+ /// 启用 禁用
+ ///
+ ///
+ ///
+ void UpdateStatus(string keyValue, int status);
+
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelService.cs
new file mode 100644
index 000000000..315c9ca77
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelService.cs
@@ -0,0 +1,182 @@
+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.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:15
+ /// 描 述:科研项目级别管理
+ ///
+ public class SRProjectLevelService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.*
+ ");
+ strSql.Append(" FROM SRProjectLevel t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["LevName"].IsEmpty())
+ {
+ dp.Add("LevName", "%" + queryParam["LevName"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.LevName Like @LevName ");
+ }
+ if (!queryParam["LevStatus"].IsEmpty())
+ {
+ dp.Add("LevStatus", queryParam["LevStatus"].ToString(), DbType.String);
+ strSql.Append(" AND t.LevStatus = @LevStatus ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取SRProjectLevel表实体数据
+ ///
+ /// 主键
+ ///
+ public SRProjectLevelEntity GetSRProjectLevelEntity(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.LevID == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, SRProjectLevelEntity 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);
+ }
+ }
+ }
+
+ ///
+ /// 启用 禁用
+ ///
+ /// 主键
+ public void UpdateStatus(string keyValue, int status)
+ {
+ try
+ {
+ if (keyValue.Contains(","))
+ {
+ keyValue = string.Join("','", keyValue.Split(','));
+ }
+
+ string sql = $" update SRProjectLevel set LevStatus={status} where LevID in ('{keyValue}')";
+ this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
+ }
+ 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/CustomFunction/SRProjectType/SRProjectTypeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeBLL.cs
new file mode 100644
index 000000000..bdb79c00b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeBLL.cs
@@ -0,0 +1,173 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:51
+ /// 描 述:科研项目类型管理
+ ///
+ public class SRProjectTypeBLL : SRProjectTypeIBLL
+ {
+ private SRProjectTypeService sRProjectTypeService = new SRProjectTypeService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return sRProjectTypeService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取SRProjectType表实体数据
+ ///
+ /// 主键
+ ///
+ public SRProjectTypeEntity GetSRProjectTypeEntity(string keyValue)
+ {
+ try
+ {
+ return sRProjectTypeService.GetSRProjectTypeEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取SRProjectType表实体数据
+ ///
+ /// code
+ ///
+ public SRProjectTypeEntity GetEntityByCode(string code)
+ {
+ try
+ {
+ return sRProjectTypeService.GetEntityByCode(code);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ sRProjectTypeService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, SRProjectTypeEntity entity)
+ {
+ try
+ {
+ sRProjectTypeService.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 状态
+ ///
+ public void UpdateStatus(string keyValue, int status)
+ {
+ try
+ {
+ sRProjectTypeService.UpdateStatus(keyValue, status);
+ }
+ 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/CustomFunction/SRProjectType/SRProjectTypeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeEntity.cs
new file mode 100644
index 000000000..3420ce086
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeEntity.cs
@@ -0,0 +1,108 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:51
+ /// 描 述:科研项目类型管理
+ ///
+ public class SRProjectTypeEntity
+ {
+ #region 实体成员
+ ///
+ /// 主键
+ ///
+ [Column("TYPEID")]
+ public string TypeID { get; set; }
+ ///
+ /// 分类名称
+ ///
+ [Column("TYPENAME")]
+ public string TypeName { get; set; }
+ ///
+ /// 分类编码
+ ///
+ [Column("TYPECODE")]
+ public string TypeCode { get; set; }
+ ///
+ /// 上级Id
+ ///
+ [Column("TYPEPARENTID")]
+ public string TypeParentId { get; set; }
+ ///
+ /// 排序
+ ///
+ [Column("TYPESORT")]
+ public int? TypeSort { get; set; }
+ ///
+ /// 状态
+ ///
+ [Column("TYPESTATUS")]
+ public int? TypeStatus { get; set; }
+ ///
+ /// 创建人
+ ///
+ [Column("TYPECREATEUSERID")]
+ public string TypeCreateUserId { get; set; }
+ ///
+ /// 创建人
+ ///
+ [Column("TYPECREATEUSERNAME")]
+ public string TypeCreateUserName { get; set; }
+ ///
+ /// 创建时间
+ ///
+ [Column("TYPECREATETIME")]
+ public DateTime? TypeCreateTime { get; set; }
+ ///
+ /// 最后一次修改人
+ ///
+ [Column("TYPEMODIFYUSERID")]
+ public string TypeModifyUserId { get; set; }
+ ///
+ /// 最后一次修改人
+ ///
+ [Column("TYPEMODIFYUSERNAME")]
+ public string TypeModifyUserName { get; set; }
+ ///
+ /// 最后一次修改时间
+ ///
+ [Column("TYPEMODIFYTIME")]
+ public DateTime? TypeModifyTime { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.TypeID = Guid.NewGuid().ToString();
+ var userinfo = LoginUserInfo.Get();
+ this.TypeCreateUserId = userinfo.userId;
+ this.TypeCreateUserName = userinfo.realName;
+ this.TypeCreateTime = DateTime.Now;
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.TypeID = keyValue;
+ var userinfo = LoginUserInfo.Get();
+ this.TypeModifyUserId = userinfo.userId;
+ this.TypeModifyUserName = userinfo.realName;
+ this.TypeModifyTime = DateTime.Now;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeIBLL.cs
new file mode 100644
index 000000000..f7892b49e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeIBLL.cs
@@ -0,0 +1,53 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:51
+ /// 描 述:科研项目类型管理
+ ///
+ public interface SRProjectTypeIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取SRProjectType表实体数据
+ ///
+ /// 主键
+ ///
+ SRProjectTypeEntity GetSRProjectTypeEntity(string keyValue);
+
+ SRProjectTypeEntity GetEntityByCode(string code);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, SRProjectTypeEntity entity);
+
+ void UpdateStatus(string keyValue, int status);
+
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeService.cs
new file mode 100644
index 000000000..d88cadfec
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeService.cs
@@ -0,0 +1,209 @@
+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.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-08 11:51
+ /// 描 述:科研项目类型管理
+ ///
+ public class SRProjectTypeService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.*
+ ");
+ strSql.Append(" FROM SRProjectType t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["TypeCode"].IsEmpty())
+ {
+ dp.Add("TypeCode", "%" + queryParam["TypeCode"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.TypeCode Like @TypeCode ");
+ }
+ if (!queryParam["TypeName"].IsEmpty())
+ {
+ dp.Add("TypeName", "%" + queryParam["TypeName"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.TypeName Like @TypeName ");
+ }
+ if (!queryParam["TypeStatus"].IsEmpty())
+ {
+ dp.Add("TypeStatus", queryParam["TypeStatus"].ToString(), DbType.String);
+ strSql.Append(" AND t.TypeStatus = @TypeStatus ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取SRProjectType表实体数据
+ ///
+ /// 主键
+ ///
+ public SRProjectTypeEntity GetSRProjectTypeEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取SRProjectType表实体数据
+ ///
+ ///
+ ///
+ public SRProjectTypeEntity GetEntityByCode(string code)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(x => x.TypeCode == code);
+ }
+ 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.TypeID == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, SRProjectTypeEntity 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);
+ }
+ }
+ }
+ ///
+ /// 启用 禁用
+ ///
+ /// 主键
+ public void UpdateStatus(string keyValue, int status)
+ {
+ try
+ {
+ if (keyValue.Contains(","))
+ {
+ keyValue = string.Join("','", keyValue.Split(','));
+ }
+
+ string sql = $" update SRProjectType set TypeStatus={status} where TypeID in ('{keyValue}')";
+ this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
+ }
+ 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 ceb8a46a4..28741feed 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
@@ -1654,6 +1654,14 @@
+
+
+
+
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportBLL.cs
index 17f79c13f..d94276c34 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportBLL.cs
@@ -93,6 +93,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
}
+
+ ///
+ /// 发布
+ ///
+ /// 主键
+ public void Publish(string keyValue, int ImportState)
+ {
+ try
+ {
+ resourceImportService.Publish(keyValue, ImportState);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
///
/// 保存实体数据(新增、修改)
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportEntity.cs
index 95e0eefdd..070b15a57 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportEntity.cs
@@ -58,6 +58,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
public void Create()
{
this.ImportId = Guid.NewGuid().ToString();
+ this.ImportTime=DateTime.Now;
+ this.ImportUser = LoginUserInfo.Get().realName;
}
///
/// 编辑调用
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportIBLL.cs
index a6da07297..710ec3deb 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportIBLL.cs
@@ -37,6 +37,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// 主键
void DeleteEntity(string keyValue);
///
+ /// 发布
+ ///
+ ///
+ ///
+ void Publish(string keyValue, int ImportState);
+ ///
/// 保存实体数据(新增、修改)
///
/// 主键
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportService.cs
index 20d859e9a..f9eb2e05f 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportService.cs
@@ -48,7 +48,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
dp.Add("ImportName", "%" + queryParam["ImportName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ImportName Like @ImportName ");
}
- return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -99,7 +99,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
try
{
- this.BaseRepository("CollegeMIS").Delete(t=>t.ImportId == keyValue);
+ this.BaseRepository("CollegeMIS").Delete(t => t.ImportId == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 发布
+ ///
+ /// 主键
+ public void Publish(string keyValue, int ImportState)
+ {
+ try
+ {
+ if (keyValue.Contains(","))
+ {
+ keyValue = string.Join("','", keyValue.Split(','));
+ }
+
+ string sql = $" update ResourceImport set ImportState={ImportState} where ImportId in ('{keyValue}')";
+ this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideBLL.cs
index 8195582c7..ee4f20444 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideBLL.cs
@@ -94,6 +94,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
+ ///
+ /// 发布
+ ///
+ /// 主键
+ public void Publish(string keyValue,int GuideState)
+ {
+ try
+ {
+ studyGuideService.Publish(keyValue, GuideState);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+
///
/// 保存实体数据(新增、修改)
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideEntity.cs
index 0035d112a..1049d1311 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideEntity.cs
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// 日 期:2021-05-12 11:43
/// 描 述:研究指导
///
- public class StudyGuideEntity
+ public class StudyGuideEntity
{
#region 实体成员
///
@@ -25,15 +25,15 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
[Column("STUDYNAME")]
public string StudyName { get; set; }
///
- /// GuideName
+ /// 创建用户
///
- [Column("GUIDENAME")]
- public string GuideName { get; set; }
+ [Column("CREATEUSERNAME")]
+ public string CreateUserName { get; set; }
///
- /// Guidetime
+ /// 添加时间
///
- [Column("GUIDETIME")]
- public string Guidetime { get; set; }
+ [Column("CREATETIME")]
+ public DateTime? CreateTime { get; set; }
///
/// GuideState
///
@@ -53,6 +53,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
public void Create()
{
this.StudyID = Guid.NewGuid().ToString();
+ this.CreateUserName = (LoginUserInfo.Get()).realName;
+ this.CreateTime = DateTime.Now;
}
///
/// 编辑调用
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideIBLL.cs
index 009832707..d2bd59f70 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideIBLL.cs
@@ -37,6 +37,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// 主键
void DeleteEntity(string keyValue);
///
+ /// 发布
+ ///
+ ///
+ void Publish(string keyValue,int GuideState);
+ ///
/// 保存实体数据(新增、修改)
///
/// 主键
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideService.cs
index b77c27b70..671d8a231 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideService.cs
@@ -32,11 +32,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
- t.StudyID,
- t.StudyName,
- t.GuideName,
- t.Guidetime,
- t.GuideState
+ t.*
");
strSql.Append(" FROM StudyGuide t ");
strSql.Append(" WHERE 1=1 ");
@@ -48,7 +44,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
dp.Add("StudyName", "%" + queryParam["StudyName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StudyName Like @StudyName ");
}
- return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -99,7 +95,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
try
{
- this.BaseRepository("CollegeMIS").Delete(t=>t.StudyID == keyValue);
+ this.BaseRepository("CollegeMIS").Delete(t => t.StudyID == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 发布
+ ///
+ /// 主键
+ public void Publish(string keyValue,int GuideState)
+ {
+ try
+ {
+ if (keyValue.Contains(","))
+ {
+ keyValue = string.Join("','", keyValue.Split(','));
+ }
+
+ string sql = $" update StudyGuide set guidestate={GuideState} where StudyID in ('{keyValue}')";
+ this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{