소스 검색

需求变更 科研项目功能

怀来职教中心中职
ndbs 1 년 전
부모
커밋
5f374f79c9
12개의 변경된 파일421개의 추가작업 그리고 80개의 파일을 삭제
  1. +20
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/SRProjectController.cs
  2. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/CheckForm.cshtml
  3. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/CheckForm.js
  4. +35
    -15
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/Form.cshtml
  5. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/Form.js
  6. +12
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/Index.cshtml
  7. +150
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/Index.js
  8. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRProject/SRProjectBLL.cs
  10. +51
    -24
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRProject/SRProjectEntity.cs
  11. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRProject/SRProjectIBLL.cs
  12. +57
    -16
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRProject/SRProjectService.cs

+ 20
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/SRProjectController.cs 파일 보기

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

@@ -69,8 +74,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var SRProjectData = sRProjectIBLL.GetSRProjectEntity( keyValue );
var jsonData = new {
var SRProjectData = sRProjectIBLL.GetSRProjectEntity(keyValue);
var jsonData = new
{
SRProject = SRProjectData,
};
return Success(jsonData);
@@ -102,9 +108,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
SRProjectEntity entity = strEntity.ToObject<SRProjectEntity>();
sRProjectIBLL.SaveEntity(keyValue,entity);
sRProjectIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult CheckForm(string keyValue, string strEntity)
{
SRProjectEntity entity = strEntity.ToObject<SRProjectEntity>();
sRProjectIBLL.CheckEntity(keyValue, entity);
return Success("评价成功!");
}
#endregion

}


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/CheckForm.cshtml 파일 보기

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "SRProject";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">级别<font face="宋体">*</font></div>
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">评价教师<font face="宋体">*</font></div>
<input id="AuditUser" type="text" class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">备注</div>
<textarea id="AuditRemark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRProject/CheckForm.js")

+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/CheckForm.js 파일 보기

@@ -0,0 +1,53 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-06-12 11:42
* 描 述:TeachingCompetition
*/
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 () {
$('#AuditUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#AuditUser').val(learun.clientdata.get(['userinfo']).realName);
$('#Grade').lrDataItemSelect({ code: 'EncouragementDegree' });
},
//initData: function () {
//if (!!keyValue) {
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/GetFormData?keyValue=' + keyValue, function (data) {
// for (var id in data) {
// if (!!data[id].length && data[id].length > 0) {
// $('#' + id).jfGridSet('refreshdata', data[id]);
// }
// else {
// $('[data-table="' + id + '"]').lrSetFormData(data[id]);
// }
// }
// });
//}
//}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/SRProject/CheckForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 35
- 15
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/Form.cshtml 파일 보기

@@ -3,25 +3,45 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="SRProject" >
<div class="lr-form-item-title">名称</div>
<input id="Name" type="text" class="form-control" />
<div class="col-xs-6 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">部门<font face="宋体">*</font></div>
<div id="DepartmentId" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProject" >
<div class="lr-form-item-title">内容</div>
<textarea id="Content" class="form-control" style="height:100px;" ></textarea>
<div class="col-xs-6 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">主持人<font face="宋体">*</font></div>
<div id="Compere" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProject" >
<div class="lr-form-item-title">单位</div>
<input id="Unit" type="text" class="form-control" />
<div class="col-xs-12 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">组员</div>
<div id="Participant" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProject" >
<div class="lr-form-item-title">经费</div>
<input id="Amount" type="text" class="form-control" />
<div class="col-xs-12 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">题目</div>
<input id="TaskContent" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProject" >
<div class="lr-form-item-title">参与人</div>
<input id="Participant" type="text" class="form-control" />
<div class="col-xs-6 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">课题编号</div>
<input id="TaskNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">立项时间<font face="宋体">*</font></div>
<input id="StartTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#StartTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">结题时间<font face="宋体">*</font></div>
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">奖励金额</div>
<input id="Amount" type="number" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">成果形式</div>
<input id="ResultForm" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SRProject">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRProject/Form.js")

+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/Form.js 파일 보기

@@ -15,6 +15,9 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
$('#DepartmentId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#Compere').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' });
$('#Participant').lrUserSelect(1);
},
initData: function () {
if (!!keyValue) {


+ 12
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/Index.cshtml 파일 보기

@@ -11,13 +11,18 @@
<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="Name" type="text" class="form-control" />
<div class="lr-form-item-title">部门</div>
<div id="DepartmentId"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">单位</div>
<input id="Unit" type="text" class="form-control" />
<div class="lr-form-item-title">级别</div>
<div id="Grade"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">题目</div>
<input id="TaskContent" type="text" class="form-control" />
</div>

</div>
</div>
</div>
@@ -27,9 +32,10 @@
<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_check" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;评价</a>
</div>
</div>
</div>


+ 150
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRProject/Index.js 파일 보기

@@ -16,18 +16,20 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#DepartmentId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#Grade').lrDataItemSelect({ code: 'EncouragementDegree' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/SRProject/Form',
width: 600,
height: 400,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -37,12 +39,16 @@ var bootstrap = function ($, learun) {
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/PersonnelManagement/SRProject/Form?keyValue=' + keyValue,
width: 600,
height: 400,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -53,35 +59,165 @@ var bootstrap = function ($, learun) {
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/SRProject/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/SRProject/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 评价
$('#lr_check').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '评价',
url: top.$.rootUrl + '/PersonnelManagement/SRProject/CheckForm?keyValue=' + keyValue,
width: 600,
height: 300,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/PersonnelManagement/SRProject/GetPageList',
headData: [
{ label: "名称", name: "Name", width: 100, align: "left"},
{ label: "内容", name: "Content", width: 100, align: "left"},
{ label: "单位", name: "Unit", width: 100, align: "left"},
{ label: "经费", name: "Amount", width: 100, align: "left"},
{ label: "参与人", name: "Participant", width: 100, align: "left"},
{
label: "部门", name: "DepartmentId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "主持人", name: "Compere", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
key: value,
keyId: 'f_account',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "参与人", name: "Participant", width: 240, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
if (value && value.indexOf(',') != -1) {
var content = '';
var texts = value.split(',');
for (var i = 0; i < texts.length; i++) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
key: texts[i],
keyId: 'f_userid',
callback: function (_data) {
callback(content += _data.f_realname + ',');
}
});
}
content = content.substring(0, content.length - 1);
callback(content);
} else {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
}
},
{ label: "题目", name: "TaskContent", width: 100, align: "left" },
{ label: "课题编号", name: "TaskNo", width: 100, align: "left" },
{
label: "立项时间", name: "StartTime", width: 100, align: "left"
, formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
{
label: "结题时间", name: "EndTime", width: 100, align: "left"
, formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
{ label: "成果形式", name: "ResultForm", width: 100, align: "left" },
{
label: "级别", name: "Grade", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'EncouragementDegree',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "审批部门", name: "AuditDepartment", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "审批用户", name: "AuditUser", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "审批时间", name: "AuditTime", width: 100, align: "left"
, formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh-mm-ss');
}
},
{ label: "审批备注", name: "AuditRemark", width: 100, align: "left" },
],
mainId:'ID',
isPage: true
mainId: 'ID',
isPage: true,
isMultiselect: true,
sidx: "CreateTime desc"
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 파일 보기

@@ -1860,6 +1860,7 @@
<Content Include="Areas\PersonnelManagement\Views\MeetingNotice\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.css" />
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" />
<Content Include="Areas\PersonnelManagement\Views\SRProject\CheckForm.js" />
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" />
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" />
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Form.js" />
@@ -8123,6 +8124,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryStuEncourgementIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScoreIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\CheckForm.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\SRProject\CheckForm.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRProject/SRProjectBLL.cs 파일 보기

@@ -118,6 +118,24 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

public void CheckEntity(string keyValue, SRProjectEntity entity)
{
try
{
sRProjectService.CheckEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 51
- 24
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRProject/SRProjectEntity.cs 파일 보기

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// 日 期:2019-12-31 10:49
/// 描 述:科技项目
/// </summary>
public class SRProjectEntity
public class SRProjectEntity
{
#region 实体成员
/// <summary>
@@ -19,31 +19,56 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 内容
/// </summary>
[Column("CONTENT")]
public string Content { get; set; }
/// <summary>
/// 单位
/// </summary>
[Column("UNIT")]
public string Unit { get; set; }
/// <summary>
/// 经费
/// </summary>
[Column("AMOUNT")]
public decimal? Amount { get; set; }
/// <summary>
/// 参与人
/// </summary>

[Column("DEPARTMENTID")]
public string DepartmentId { get; set; }

[Column("COMPERE")]
public string Compere { get; set; }

[Column("PARTICIPANT")]
public string Participant { get; set; }

[Column("TASKCONTENT")]
public string TaskContent { get; set; }

[Column("TASKNO")]
public string TaskNo { get; set; }

[Column("STARTTIME")]
public DateTime? StartTime { get; set; }

[Column("ENDTIME")]
public DateTime? EndTime { get; set; }

[Column("AMOUNT")]
public decimal? Amount { get; set; }

[Column("GRADE")]
public string Grade { get; set; }

[Column("RESULTFORM")]
public string ResultForm { get; set; }

[Column("REMARK")]
public string Remark { get; set; }

[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }

[Column("CREATEUSER")]
public string CreateUser { get; set; }

[Column("AUDITDEPARTMENT")]
public string AuditDepartment { get; set; }

[Column("AUDITUSER")]
public string AuditUser { get; set; }

[Column("AuditRemark")]
public string AuditRemark { get; set; }
[Column("AUDITTIME")]
public DateTime? AuditTime { get; set; }
#endregion

#region 扩展操作
@@ -53,6 +78,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
public void Create()
{
this.ID = Guid.NewGuid().ToString();
this.CreateUser = LoginUserInfo.Get().userId;
this.CreateTime = DateTime.Now;
}
/// <summary>
/// 编辑调用


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRProject/SRProjectIBLL.cs 파일 보기

@@ -43,6 +43,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <summary>
/// <returns></returns>
void SaveEntity(string keyValue, SRProjectEntity entity);
void CheckEntity(string keyValue, SRProjectEntity entity);
#endregion

}


+ 57
- 16
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRProject/SRProjectService.cs 파일 보기

@@ -30,30 +30,28 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.Name,
t.Content,
t.Unit,
t.Amount,
t.Participant
");
strSql.Append(@"t.* ");
strSql.Append(" FROM SRProject t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
if (!queryParam["DepartmentId"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
dp.Add("DepartmentId", queryParam["DepartmentId"].ToString(), DbType.String);
strSql.Append(" AND t.DepartmentId = @DepartmentId ");
}
if (!queryParam["Unit"].IsEmpty())
if (!queryParam["TaskContent"].IsEmpty())
{
dp.Add("Unit", "%" + queryParam["Unit"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Unit Like @Unit ");
dp.Add("TaskContent", "%" + queryParam["TaskContent"].ToString() + "%", DbType.String);
strSql.Append(" AND t.TaskContent Like @TaskContent ");
}
return this.BaseRepository("CollegeMIS").FindList<SRProjectEntity>(strSql.ToString(),dp, pagination);
if (!queryParam["Grade"].IsEmpty())
{
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String);
strSql.Append(" AND t.Grade = @Grade ");
}
return this.BaseRepository("CollegeMIS").FindList<SRProjectEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -103,12 +101,19 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
this.BaseRepository("CollegeMIS").Delete<SRProjectEntity>(t=>t.ID == keyValue);
var id = keyValue.Split(',');
foreach (var item in id)
{
db.Delete<SRProjectEntity>(t => t.ID == item);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
@@ -153,6 +158,42 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void CheckEntity(string keyValue, SRProjectEntity entity)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var Id = keyValue.Split(',');
foreach (var item in Id)
{
SRProjectEntity model = db.FindEntity<SRProjectEntity>(x => x.ID == item);
model.Grade = entity.Grade;
model.AuditUser = entity.AuditUser;
model.AuditTime = DateTime.Now;
model.AuditDepartment = LoginUserInfo.Get().departmentId;
model.AuditRemark = entity.AuditRemark;
db.Update(model);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}


불러오는 중...
취소
저장