Kaynağa Gözat

教科研基础管理、教科研工作管理

master
zhangli 3 yıl önce
ebeveyn
işleme
1f26823e97
43 değiştirilmiş dosya ile 2313 ekleme ve 88 silme
  1. +131
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/SRProjectLevelController.cs
  2. +139
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/SRProjectTypeController.cs
  3. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/CustomFunctionAreaRegistration.cs
  4. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectLevel/Form.cshtml
  5. +59
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectLevel/Form.js
  6. +45
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectLevel/Index.cshtml
  7. +153
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectLevel/Index.js
  8. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectType/Form.cshtml
  9. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectType/Form.js
  10. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectType/Index.cshtml
  11. +150
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectType/Index.js
  12. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/web.config
  13. +20
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ResourceImportController.cs
  14. +18
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/StudyGuideController.cs
  15. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ResourceImport/Form.cshtml
  16. +6
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ResourceImport/Form.js
  17. +5
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ResourceImport/Index.cshtml
  18. +65
    -29
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ResourceImport/Index.js
  19. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Form.cshtml
  20. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Form.js
  21. +6
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Index.cshtml
  22. +57
    -17
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Index.js
  23. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  24. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectLevelMap.cs
  25. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectTypeMap.cs
  26. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  27. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelBLL.cs
  28. +98
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelEntity.cs
  29. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelIBLL.cs
  30. +182
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelService.cs
  31. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeBLL.cs
  32. +108
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeEntity.cs
  33. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeIBLL.cs
  34. +209
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeService.cs
  35. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  36. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportBLL.cs
  37. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportEntity.cs
  38. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportIBLL.cs
  39. +31
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportService.cs
  40. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideBLL.cs
  41. +9
    -7
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideEntity.cs
  42. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideIBLL.cs
  43. +32
    -7
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideService.cs

+ 131
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/SRProjectLevelController.cs Dosyayı Görüntüle

@@ -0,0 +1,131 @@
using Learun.Application.TwoDevelopment.CustomFunction;
using Learun.Util;
using System.Data;
using System.Web.Mvc;

namespace Learun.Application.Web.Areas.CustomFunction.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:15
/// 描 述:科研项目级别管理
/// </summary>
public class SRProjectLevelController : MvcControllerBase
{
private SRProjectLevelIBLL sRProjectLevelIBLL = new SRProjectLevelBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = sRProjectLevelIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var SRProjectLevelData = sRProjectLevelIBLL.GetSRProjectLevelEntity(keyValue);
var jsonData = new
{
SRProjectLevel = SRProjectLevelData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
sRProjectLevelIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
SRProjectLevelEntity entity = strEntity.ToObject<SRProjectLevelEntity>();
sRProjectLevelIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}

/// <summary>
/// 启用 禁用
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateStatus(string keyValue, int status)
{
sRProjectLevelIBLL.UpdateStatus(keyValue, status);
return Success("保存成功!");
}

#endregion

}
}

+ 139
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/SRProjectTypeController.cs Dosyayı Görüntüle

@@ -0,0 +1,139 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.CustomFunction;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.CustomFunction.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:51
/// 描 述:科研项目类型管理
/// </summary>
public class SRProjectTypeController : MvcControllerBase
{
private SRProjectTypeIBLL sRProjectTypeIBLL = new SRProjectTypeBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = sRProjectTypeIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var SRProjectTypeData = sRProjectTypeIBLL.GetSRProjectTypeEntity(keyValue);
var jsonData = new
{
SRProjectType = SRProjectTypeData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
sRProjectTypeIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
SRProjectTypeEntity entity = strEntity.ToObject<SRProjectTypeEntity>();
var data = sRProjectTypeIBLL.GetEntityByCode(entity.TypeCode);
if (string.IsNullOrEmpty(keyValue) && data != null)
{
return Fail("编码已存在,请重新输入!");
}
else if (!string.IsNullOrEmpty(keyValue) && (data != null && data.TypeID != keyValue))
{
return Fail("编码已存在,请重新输入!");
}

sRProjectTypeIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateStatus(string keyValue,int status)
{
sRProjectTypeIBLL.UpdateStatus(keyValue, status);
return Success("保存成功!");
}
#endregion

}
}

+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/CustomFunctionAreaRegistration.cs Dosyayı Görüntüle

@@ -0,0 +1,24 @@
using System.Web.Mvc;

namespace Learun.Application.Web.Areas.CustomFunction
{
public class CustomFunctionAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "CustomFunction";
}
}

public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"CustomFunction_default",
"CustomFunction/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
}
}
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectLevel/Form.cshtml Dosyayı Görüntüle

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "科研项目级别管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="SRProjectLevel" >
<div class="lr-form-item-title">级别名称<font face="宋体">*</font></div>
<input id="LevName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProjectLevel" >
<div class="lr-form-item-title">排序</div>
<input id="LevSort" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProjectLevel" >
<div class="lr-form-item-title">状态<font face="宋体">*</font></div>
<div id="LevStatus"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/CustomFunction/Views/SRProjectLevel/Form.js")

+ 59
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectLevel/Form.js Dosyayı Görüntüle

@@ -0,0 +1,59 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-08 11:15
* 描 述:科研项目级别管理
*/
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 () {
$('#LevStatus').lrRadioCheckbox({
type: 'radio',
code: 'EnableStatus',
});
//$('#LevStatus').lrRadioCheckbox({
// type: 'radio',
// code: 'EnableStatus',
//});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/CustomFunction/SRProjectLevel/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/CustomFunction/SRProjectLevel/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 45
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectLevel/Index.cshtml Dosyayı Görüntüle

@@ -0,0 +1,45 @@
@{
ViewBag.Title = "科研项目级别管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">级别名称</div>
<input id="LevName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">状态</div>
<div id="LevStatus"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr-enable" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 启用</a>
<a id="lr-disable" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 禁用</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/CustomFunction/Views/SRProjectLevel/Index.js")

+ 153
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectLevel/Index.js Dosyayı Görüntüle

@@ -0,0 +1,153 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-08 11:15
* 描 述:科研项目级别管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#LevStatus').lrRadioCheckbox({
type: 'radio',
code: 'EnableStatus',
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/CustomFunction/SRProjectLevel/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('LevID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/CustomFunction/SRProjectLevel/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('LevID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectLevel/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
//  启用
$('#lr-enable').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('LevID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认启用选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectLevel/UpdateStatus', { keyValue: keyValue, status: 1 }, function () {
refreshGirdData();
});
}
});
}
});
//  禁用
$('#lr-disable').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('LevID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认禁用选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectLevel/UpdateStatus', { keyValue: keyValue, status: 0 }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/CustomFunction/SRProjectLevel/GetPageList',
headData: [
{ label: "级别名称", name: "LevName", width: 100, align: "left" },
{ label: "排序", name: "LevSort", width: 100, align: "left" },
{ label: "创建用户", name: "LevCreateUserName", width: 100, align: "left" },
{
label: "创建时间", name: "LevCreateTime", width: 100, align: "left",
formatter: function (value) {
return learun.formatDate(value, 'yyyy-MM-dd');
}
},
{
label: "状态", name: "LevStatus", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue == 1) {
return '<span class=\"label label-success\">启用</span>';
} else if (cellvalue == 0) {
return '<span class=\"label label-danger\">禁用</span>';
}
}


}
//formatterAsync: function (callback, value, row, op,$cell) {
// learun.clientdata.getAsync('dataItem', {
// key: value,
// code: 'EnableStatus',
// callback: function (_data) {
// callback(_data.text);
// }
// });
//}},
],
mainId: 'LevID',
isPage: true,
sidx: 'LevSort',
sord: 'ASC',
isMultiselect: true,
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectType/Form.cshtml Dosyayı Görüntüle

@@ -0,0 +1,28 @@
@{
ViewBag.Title = "科研项目类型管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="SRProjectType">
<div class="lr-form-item-title">分类编码<font face="宋体">*</font></div>
<input id="TypeCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProjectType">
<div class="lr-form-item-title">分类名称<font face="宋体">*</font></div>
<input id="TypeName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProjectType">
<div class="lr-form-item-title">上级</div>
<div id="TypeParentId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProjectType">
<div class="lr-form-item-title">排序</div>
<input id="TypeSort" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProjectType">
<div class="lr-form-item-title">状态<font face="宋体">*</font></div>
<div id="TypeStatus"></div>
</div>
</div>

@Html.AppendJsFile("/Areas/CustomFunction/Views/SRProjectType/Form.js")

+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectType/Form.js Dosyayı Görüntüle

@@ -0,0 +1,55 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-08 11:51
* 描 述:科研项目类型管理
*/
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 () {
$('#TypeParentId').lrDataSourceSelect({ code: 'SRProjectType', value: 'typeid', text: 'typename' });
$('#TypeStatus').lrRadioCheckbox({
type: 'radio',
code: 'EnableStatus',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/CustomFunction/SRProjectType/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/CustomFunction/SRProjectType/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectType/Index.cshtml Dosyayı Görüntüle

@@ -0,0 +1,49 @@
@{
ViewBag.Title = "科研项目类型管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">分类编码</div>
<input id="TypeCode" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">分类名称</div>
<input id="TypeName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">状态</div>
<div id="TypeStatus"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr-enable" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 启用</a>
<a id="lr-disable" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 禁用</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/CustomFunction/Views/SRProjectType/Index.js")

+ 150
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectType/Index.js Dosyayı Görüntüle

@@ -0,0 +1,150 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-08 11:51
* 描 述:科研项目类型管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#TypeStatus').lrRadioCheckbox({
type: 'radio',
code: 'EnableStatus',
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/CustomFunction/SRProjectType/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('TypeID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/CustomFunction/SRProjectType/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('TypeID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectType/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
//  启用
$('#lr-enable').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('TypeID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认启用选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectType/UpdateStatus', { keyValue: keyValue, status: 1 }, function () {
refreshGirdData();
});
}
});
}
});
//  禁用
$('#lr-disable').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('TypeID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认禁用选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectType/UpdateStatus', { keyValue: keyValue, status: 0 }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/CustomFunction/SRProjectType/GetPageList',
headData: [
{ label: "分类编码", name: "TypeCode", width: 100, align: "left"},
{ label: "分类名称", name: "TypeName", width: 100, align: "left"},
{ label: "上级", name: "TypeParentId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ResearchType',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "排序", name: "TypeSort", width: 100, align: "left"},
{
label: "状态",
name: "TypeStatus",
width: 100,
align: "left",
formatter: function(cellvalue, row) {
if (cellvalue == 1) {
return '<span class=\"label label-success\">启用</span>';
} else if (cellvalue == 0) {
return '<span class=\"label label-danger\">禁用</span>';
}
}
}
],
mainId:'TypeID',
isPage: true,
isMultiselect: true,
isTree: true,
parentId: 'TypeParentId'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/web.config Dosyayı Görüntüle

@@ -0,0 +1,35 @@
<?xml version="1.0"?>

<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>

<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="Learun.Application.Web" />
</namespaces>
</pages>
</system.web.webPages.razor>

<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>

<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>

+ 20
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ResourceImportController.cs Dosyayı Görüntüle

@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}
#endregion

@@ -71,8 +71,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var ResourceImportData = resourceImportIBLL.GetResourceImportEntity( keyValue );
var jsonData = new {
var ResourceImportData = resourceImportIBLL.GetResourceImportEntity(keyValue);
var jsonData = new
{
ResourceImport = ResourceImportData,
};
return Success(jsonData);
@@ -93,6 +94,20 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
resourceImportIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}


/// <summary>
/// 发布
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Publish(string keyValue, int ImportState)
{
resourceImportIBLL.Publish(keyValue, ImportState);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
@@ -105,7 +120,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
ResourceImportEntity entity = strEntity.ToObject<ResourceImportEntity>();
resourceImportIBLL.SaveEntity(keyValue,entity);
resourceImportIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}


+ 18
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/StudyGuideController.cs Dosyayı Görüntüle

@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}
#endregion

@@ -71,8 +71,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var StudyGuideData = studyGuideIBLL.GetStudyGuideEntity( keyValue );
var jsonData = new {
var StudyGuideData = studyGuideIBLL.GetStudyGuideEntity(keyValue);
var jsonData = new
{
StudyGuide = StudyGuideData,
};
return Success(jsonData);
@@ -94,6 +95,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
return Success("删除成功!");
}
/// <summary>
/// 发布
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Publish(string keyValue,int GuideState)
{
studyGuideIBLL.Publish(keyValue, GuideState);
return Success("发布成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
@@ -105,7 +118,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
StudyGuideEntity entity = strEntity.ToObject<StudyGuideEntity>();
studyGuideIBLL.SaveEntity(keyValue,entity);
studyGuideIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ResourceImport/Form.cshtml Dosyayı Görüntüle

@@ -11,14 +11,14 @@
<div class="lr-form-item-title">内容</div>
<div id="ImportContent" style="height:200px;"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ResourceImport" style="display: none; " >
@*<div class="col-xs-12 lr-form-item" data-table="ResourceImport" style="display: none; " >
<div class="lr-form-item-title">添加时间</div>
<input id="ImportTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ResourceImport" style="display: none; " >
<div class="lr-form-item-title">创建用户</div>
<input id="ImportUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
</div>*@
<div class="col-xs-12 lr-form-item" data-table="ResourceImport" >
<div class="lr-form-item-title">附件</div>
<div id="ImportLetter" ></div>


+ 6
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ResourceImport/Form.js Dosyayı Görüntüle

@@ -16,13 +16,15 @@ var bootstrap = function ($, learun) {
},
bind: function () {
var ImportContentUE = UE.getEditor('ImportContent');
$('#ImportContent')[0].ue = ImportContentUE; $('#ImportTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#ImportUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#ImportUser').val(learun.clientdata.get(['userinfo']).realName);
$('#ImportContent')[0].ue = ImportContentUE;
//$('#ImportTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
//$('#ImportUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
//$('#ImportUser').val(learun.clientdata.get(['userinfo']).realName);
$('#ImportLetter').lrUploader();
$('#ImportState').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoInt',
code: 'publishStatus',
});
},
initData: function () {


+ 5
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ResourceImport/Index.cshtml Dosyayı Görüntüle

@@ -23,10 +23,12 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
<a id="lr_publish" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;发布</a>
<a id="lr_nopublish" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;取消发布</a>
</div>
</div>
</div>


+ 65
- 29
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ResourceImport/Index.js Dosyayı Görüntüle

@@ -26,8 +26,8 @@ var bootstrap = function ($, learun) {
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/ResourceImport/Form',
width: 600,
height: 400,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -41,8 +41,8 @@ var bootstrap = function ($, learun) {
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/PersonnelManagement/ResourceImport/Form?keyValue=' + keyValue,
width: 600,
height: 400,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -55,7 +55,7 @@ var bootstrap = function ($, learun) {
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ResourceImport/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ResourceImport/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
@@ -66,42 +66,78 @@ var bootstrap = function ($, learun) {
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
//发布
$('#lr_publish').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ImportId');
var ImportState = $('#gridtable').jfGridValue('ImportState');
if (learun.checkrow(keyValue)) {
if (ImportState.indexOf('0') != -1) {
return learun.alert.warning('选中记录包含已发布的记录!');
}
learun.layerConfirm('是否确认发布选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ResourceImport/Publish', { keyValue: keyValue, ImportState: 0 }, function () {
refreshGirdData();
});
}
});
}
});
//取消发布
$('#lr_nopublish').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ImportId');
var ImportState = $('#gridtable').jfGridValue('ImportState');
if (learun.checkrow(keyValue)) {
if (ImportState.indexOf('1') != -1) {
return learun.alert.warning('选中记录包含未发布的记录!');
}
learun.layerConfirm('是否确认发布选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ResourceImport/Publish', { keyValue: keyValue, ImportState: 1 }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/ResourceImport/GetPageList',
headData: [
{ label: "标题", name: "ImportName", width: 100, align: "left"},
{ label: "添加时间", name: "ImportTime", width: 100, align: "left"},
{ label: "创建用户", name: "ImportUser", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}},
{ label: "是否发布", name: "ImportState", 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: "ImportName", width: 100, align: "left" },
{
label: "创建用户", name: "ImportUser", width: 100, align: "left"
},
{
label: "添加时间", name: "ImportTime", width: 100, align: "left", formatter: function (value) {
return learun.formatDate(value, 'yyyy-MM-dd');
}
},
{
label: "发布状态",
name: "ImportState",
width: 100,
align: "left",
formatter: function (cellvalue, row) {
if (cellvalue == 0) {
return '<span class=\"label label-success\">发布</span>';
} else if (cellvalue == 1) {
return '<span class=\"label label-danger\">暂未发布</span>';
}
}
}
],
mainId:'ImportId',
isPage: true
mainId: 'ImportId',
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 () {


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Form.cshtml Dosyayı Görüntüle

@@ -11,14 +11,14 @@
<div class="lr-form-item-title">附件上传</div>
<div id="AttachmentUp" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="StudyGuide" >
@*<div class="col-xs-12 lr-form-item" data-table="StudyGuide" >
<div class="lr-form-item-title">创建用户</div>
<input id="GuideName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="StudyGuide" >
<div class="lr-form-item-title">添加时间</div>
<input id="Guidetime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#Guidetime').trigger('change'); } })" />
</div>
</div>*@
<div class="col-xs-12 lr-form-item" data-table="StudyGuide" >
<div class="lr-form-item-title">是否发布</div>
<div id="GuideState" ></div>


+ 4
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Form.js Dosyayı Görüntüle

@@ -16,7 +16,10 @@ var bootstrap = function ($, learun) {
},
bind: function () {
$('#AttachmentUp').lrUploader();
$('#GuideState').lrDataItemSelect({ code: 'YesOrNoInt' });
$('#GuideState').lrRadioCheckbox({
type: 'radio',
code: 'publishStatus',
});
},
initData: function () {
if (!!keyValue) {


+ 6
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Index.cshtml Dosyayı Görüntüle

@@ -2,7 +2,7 @@
ViewBag.Title = "研究指导";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
@@ -23,10 +23,12 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
<a id="lr_publish" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;发布</a>
<a id="lr_nopublish" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;取消发布</a>
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>*@
</div>
</div>
</div>


+ 57
- 17
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/StudyGuide/Index.js Dosyayı Görüntüle

@@ -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 '<span class=\"label label-success\">发布</span>';
} else if (cellvalue == 1) {
return '<span class=\"label label-danger\">暂未发布</span>';
}
}
},
],
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 () {


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Dosyayı Görüntüle

@@ -315,6 +315,7 @@
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_SupplierController.cs" />
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_UserChangeInfoController.cs" />
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_WarningController.cs" />
<Compile Include="Areas\CustomFunction\CustomFunctionAreaRegistration.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonSyncController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonTermAttemperController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\CertificateManageController.cs" />
@@ -805,6 +806,8 @@
<Compile Include="Areas\PersonnelManagement\Controllers\ReleaseMettingController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\StudyGuideController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\ResourceImportController.cs" />
<Compile Include="Areas\CustomFunction\Controllers\SRProjectLevelController.cs" />
<Compile Include="Areas\CustomFunction\Controllers\SRProjectTypeController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6372,6 +6375,14 @@
<Content Include="Areas\PersonnelManagement\Views\ResourceImport\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\ResourceImport\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\ResourceImport\Form.js" />
<Content Include="Areas\CustomFunction\Views\SRProjectLevel\Index.cshtml" />
<Content Include="Areas\CustomFunction\Views\SRProjectLevel\Index.js" />
<Content Include="Areas\CustomFunction\Views\SRProjectLevel\Form.cshtml" />
<Content Include="Areas\CustomFunction\Views\SRProjectLevel\Form.js" />
<Content Include="Areas\CustomFunction\Views\SRProjectType\Index.cshtml" />
<Content Include="Areas\CustomFunction\Views\SRProjectType\Index.js" />
<Content Include="Areas\CustomFunction\Views\SRProjectType\Form.cshtml" />
<Content Include="Areas\CustomFunction\Views\SRProjectType\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />
@@ -7172,6 +7183,7 @@
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\TeacherIndex.cshtml" />
<Content Include="Areas\LR_OrganizationModule\Views\User\FamilyIndex.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" />
<Content Include="Areas\CustomFunction\Views\web.config" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectLevelMap.cs Dosyayı Görüntüle

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.CustomFunction;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:15
/// 描 述:科研项目级别管理
/// </summary>
public class SRProjectLevelMap : EntityTypeConfiguration<SRProjectLevelEntity>
{
public SRProjectLevelMap()
{
#region 表、主键
//表
this.ToTable("SRPROJECTLEVEL");
//主键
this.HasKey(t => t.LevID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/SRProjectTypeMap.cs Dosyayı Görüntüle

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.CustomFunction;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:51
/// 描 述:科研项目类型管理
/// </summary>
public class SRProjectTypeMap : EntityTypeConfiguration<SRProjectTypeEntity>
{
public SRProjectTypeMap()
{
#region 表、主键
//表
this.ToTable("SRPROJECTTYPE");
//主键
this.HasKey(t => t.TypeID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Dosyayı Görüntüle

@@ -559,6 +559,8 @@
<Compile Include="PersonnelManagement\ReleaseMettingMap.cs" />
<Compile Include="PersonnelManagement\StudyGuideMap.cs" />
<Compile Include="PersonnelManagement\ResourceImportMap.cs" />
<Compile Include="CustomFunction\SRProjectLevelMap.cs" />
<Compile Include="CustomFunction\SRProjectTypeMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelBLL.cs Dosyayı Görüntüle

@@ -0,0 +1,149 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:15
/// 描 述:科研项目级别管理
/// </summary>
public class SRProjectLevelBLL : SRProjectLevelIBLL
{
private SRProjectLevelService sRProjectLevelService = new SRProjectLevelService();

#region 获取数据

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

/// <summary>
/// 获取SRProjectLevel表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
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 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
sRProjectLevelService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, SRProjectLevelEntity entity)
{
try
{
sRProjectLevelService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 启用 禁用
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void UpdateStatus(string keyValue, int status)
{
try
{
sRProjectLevelService.UpdateStatus(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 98
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelEntity.cs Dosyayı Görüntüle

@@ -0,0 +1,98 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:15
/// 描 述:科研项目级别管理
/// </summary>
public class SRProjectLevelEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("LEVID")]
public string LevID { get; set; }
/// <summary>
/// 级别名称
/// </summary>
[Column("LEVNAME")]
public string LevName { get; set; }
/// <summary>
/// 排序
/// </summary>
[Column("LEVSORT")]
public int? LevSort { get; set; }
/// <summary>
/// 状态
/// </summary>
[Column("LEVSTATUS")]
public int? LevStatus { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("LEVCREATEUSERID")]
public string LevCreateUserId { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("LEVCREATEUSERNAME")]
public string LevCreateUserName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("LEVCREATETIME")]
public DateTime? LevCreateTime { get; set; }
/// <summary>
/// 最后一次修改人
/// </summary>
[Column("LEVMODIFYUSERID")]
public string LevModifyUserId { get; set; }
/// <summary>
/// 最后一次修改人
/// </summary>
[Column("LEVMODIFYUSERNAME")]
public string LevModifyUserName { get; set; }
/// <summary>
/// 最后一次修改时间
/// </summary>
[Column("LEVMODIFYTIME")]
public DateTime? LevModifyTime { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.LevID = Guid.NewGuid().ToString();
var userinfo = LoginUserInfo.Get();
this.LevCreateUserId = userinfo.userId;
this.LevCreateUserName = userinfo.realName;
this.LevCreateTime = DateTime.Now;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
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
}
}


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelIBLL.cs Dosyayı Görüntüle

@@ -0,0 +1,56 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:15
/// 描 述:科研项目级别管理
/// </summary>
public interface SRProjectLevelIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<SRProjectLevelEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取SRProjectLevel表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
SRProjectLevelEntity GetSRProjectLevelEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, SRProjectLevelEntity entity);

/// <summary>
/// 启用 禁用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
void UpdateStatus(string keyValue, int status);

#endregion

}
}

+ 182
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectLevel/SRProjectLevelService.cs Dosyayı Görüntüle

@@ -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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:15
/// 描 述:科研项目级别管理
/// </summary>
public class SRProjectLevelService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<SRProjectLevelEntity> 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<SRProjectLevelEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取SRProjectLevel表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public SRProjectLevelEntity GetSRProjectLevelEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<SRProjectLevelEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<SRProjectLevelEntity>(t => t.LevID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, 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);
}
}
}

/// <summary>
/// 启用 禁用
/// </summary>
/// <param name="keyValue">主键</param>
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

}
}

+ 173
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeBLL.cs Dosyayı Görüntüle

@@ -0,0 +1,173 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:51
/// 描 述:科研项目类型管理
/// </summary>
public class SRProjectTypeBLL : SRProjectTypeIBLL
{
private SRProjectTypeService sRProjectTypeService = new SRProjectTypeService();

#region 获取数据

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

/// <summary>
/// 获取SRProjectType表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public SRProjectTypeEntity GetSRProjectTypeEntity(string keyValue)
{
try
{
return sRProjectTypeService.GetSRProjectTypeEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取SRProjectType表实体数据
/// </summary>
/// <param name="code">code</param>
/// <returns></returns>
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 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
sRProjectTypeService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, SRProjectTypeEntity entity)
{
try
{
sRProjectTypeService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="status">状态</param>
/// <returns></returns>
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

}
}

+ 108
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeEntity.cs Dosyayı Görüntüle

@@ -0,0 +1,108 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:51
/// 描 述:科研项目类型管理
/// </summary>
public class SRProjectTypeEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("TYPEID")]
public string TypeID { get; set; }
/// <summary>
/// 分类名称
/// </summary>
[Column("TYPENAME")]
public string TypeName { get; set; }
/// <summary>
/// 分类编码
/// </summary>
[Column("TYPECODE")]
public string TypeCode { get; set; }
/// <summary>
/// 上级Id
/// </summary>
[Column("TYPEPARENTID")]
public string TypeParentId { get; set; }
/// <summary>
/// 排序
/// </summary>
[Column("TYPESORT")]
public int? TypeSort { get; set; }
/// <summary>
/// 状态
/// </summary>
[Column("TYPESTATUS")]
public int? TypeStatus { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("TYPECREATEUSERID")]
public string TypeCreateUserId { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("TYPECREATEUSERNAME")]
public string TypeCreateUserName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("TYPECREATETIME")]
public DateTime? TypeCreateTime { get; set; }
/// <summary>
/// 最后一次修改人
/// </summary>
[Column("TYPEMODIFYUSERID")]
public string TypeModifyUserId { get; set; }
/// <summary>
/// 最后一次修改人
/// </summary>
[Column("TYPEMODIFYUSERNAME")]
public string TypeModifyUserName { get; set; }
/// <summary>
/// 最后一次修改时间
/// </summary>
[Column("TYPEMODIFYTIME")]
public DateTime? TypeModifyTime { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.TypeID = Guid.NewGuid().ToString();
var userinfo = LoginUserInfo.Get();
this.TypeCreateUserId = userinfo.userId;
this.TypeCreateUserName = userinfo.realName;
this.TypeCreateTime = DateTime.Now;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
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
}
}


+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeIBLL.cs Dosyayı Görüntüle

@@ -0,0 +1,53 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:51
/// 描 述:科研项目类型管理
/// </summary>
public interface SRProjectTypeIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<SRProjectTypeEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取SRProjectType表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
SRProjectTypeEntity GetSRProjectTypeEntity(string keyValue);

SRProjectTypeEntity GetEntityByCode(string code);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, SRProjectTypeEntity entity);

void UpdateStatus(string keyValue, int status);

#endregion

}
}

+ 209
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectType/SRProjectTypeService.cs Dosyayı Görüntüle

@@ -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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-08 11:51
/// 描 述:科研项目类型管理
/// </summary>
public class SRProjectTypeService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<SRProjectTypeEntity> 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<SRProjectTypeEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取SRProjectType表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public SRProjectTypeEntity GetSRProjectTypeEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<SRProjectTypeEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取SRProjectType表实体数据
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
public SRProjectTypeEntity GetEntityByCode(string code)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<SRProjectTypeEntity>(x => x.TypeCode == code);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<SRProjectTypeEntity>(t => t.TypeID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, 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);
}
}
}
/// <summary>
/// 启用 禁用
/// </summary>
/// <param name="keyValue">主键</param>
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

}
}

+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Dosyayı Görüntüle

@@ -1654,6 +1654,14 @@
<Compile Include="PersonnelManagement\ResourceImport\ResourceImportService.cs" />
<Compile Include="PersonnelManagement\ResourceImport\ResourceImportBLL.cs" />
<Compile Include="PersonnelManagement\ResourceImport\ResourceImportIBLL.cs" />
<Compile Include="CustomFunction\SRProjectLevel\SRProjectLevelEntity.cs" />
<Compile Include="CustomFunction\SRProjectLevel\SRProjectLevelService.cs" />
<Compile Include="CustomFunction\SRProjectLevel\SRProjectLevelBLL.cs" />
<Compile Include="CustomFunction\SRProjectLevel\SRProjectLevelIBLL.cs" />
<Compile Include="CustomFunction\SRProjectType\SRProjectTypeEntity.cs" />
<Compile Include="CustomFunction\SRProjectType\SRProjectTypeService.cs" />
<Compile Include="CustomFunction\SRProjectType\SRProjectTypeBLL.cs" />
<Compile Include="CustomFunction\SRProjectType\SRProjectTypeIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportBLL.cs Dosyayı Görüntüle

@@ -93,6 +93,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
}
/// <summary>
/// 发布
/// </summary>
/// <param name="keyValue">主键</param>
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);
}
}
}


/// <summary>
/// 保存实体数据(新增、修改)


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportEntity.cs Dosyayı Görüntüle

@@ -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;
}
/// <summary>
/// 编辑调用


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportIBLL.cs Dosyayı Görüntüle

@@ -37,6 +37,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 发布
/// </summary>
/// <param name="keyValue"></param>
/// <param name="ImportState"></param>
void Publish(string keyValue, int ImportState);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>


+ 31
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ResourceImport/ResourceImportService.cs Dosyayı Görüntüle

@@ -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<ResourceImportEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<ResourceImportEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -99,7 +99,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
try
{
this.BaseRepository("CollegeMIS").Delete<ResourceImportEntity>(t=>t.ImportId == keyValue);
this.BaseRepository("CollegeMIS").Delete<ResourceImportEntity>(t => t.ImportId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 发布
/// </summary>
/// <param name="keyValue">主键</param>
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)
{


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideBLL.cs Dosyayı Görüntüle

@@ -94,6 +94,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 发布
/// </summary>
/// <param name="keyValue">主键</param>
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);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 9
- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideEntity.cs Dosyayı Görüntüle

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// 日 期:2021-05-12 11:43
/// 描 述:研究指导
/// </summary>
public class StudyGuideEntity
public class StudyGuideEntity
{
#region 实体成员
/// <summary>
@@ -25,15 +25,15 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
[Column("STUDYNAME")]
public string StudyName { get; set; }
/// <summary>
/// GuideName
/// 创建用户
/// </summary>
[Column("GUIDENAME")]
public string GuideName { get; set; }
[Column("CREATEUSERNAME")]
public string CreateUserName { get; set; }
/// <summary>
/// Guidetime
/// 添加时间
/// </summary>
[Column("GUIDETIME")]
public string Guidetime { get; set; }
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// GuideState
/// </summary>
@@ -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;
}
/// <summary>
/// 编辑调用


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideIBLL.cs Dosyayı Görüntüle

@@ -37,6 +37,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 发布
/// </summary>
/// <param name="keyValue"></param>
void Publish(string keyValue,int GuideState);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>


+ 32
- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/StudyGuide/StudyGuideService.cs Dosyayı Görüntüle

@@ -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<StudyGuideEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<StudyGuideEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -99,7 +95,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
try
{
this.BaseRepository("CollegeMIS").Delete<StudyGuideEntity>(t=>t.StudyID == keyValue);
this.BaseRepository("CollegeMIS").Delete<StudyGuideEntity>(t => t.StudyID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 发布
/// </summary>
/// <param name="keyValue">主键</param>
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)
{


Yükleniyor…
İptal
Kaydet