Browse Source

计算项目管理、公式管理

金隅分支
zhangli 3 years ago
parent
commit
757e0ff8ae
53 changed files with 4629 additions and 6 deletions
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
  2. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs
  3. +43
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.cshtml
  4. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js
  5. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml
  6. +264
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js
  7. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs
  8. +120
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs
  9. +135
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs
  10. +130
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectPhaseManageController.cs
  11. +130
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectTypeManageController.cs
  12. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.cshtml
  13. +82
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js
  14. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.cshtml
  15. +135
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js
  16. +31
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml
  17. +71
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
  18. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
  19. +139
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js
  20. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectPhaseManage/Form.cshtml
  21. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectPhaseManage/Form.js
  22. +40
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectPhaseManage/Index.cshtml
  23. +97
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectPhaseManage/Index.js
  24. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Form.cshtml
  25. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Form.js
  26. +40
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.cshtml
  27. +97
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.js
  28. +15
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/ueditor/ueditor.config.js
  29. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/FillinFromMap.cs
  30. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectDataManageMap.cs
  31. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectManageMap.cs
  32. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectPhaseManageMap.cs
  33. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectTypeManageMap.cs
  34. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs
  35. +100
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromEntity.cs
  36. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs
  37. +180
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs
  38. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageBLL.cs
  39. +90
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageEntity.cs
  40. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageIBLL.cs
  41. +166
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs
  42. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs
  43. +90
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageEntity.cs
  44. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs
  45. +194
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs
  46. +186
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageBLL.cs
  47. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageEntity.cs
  48. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageIBLL.cs
  49. +187
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageService.cs
  50. +186
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageBLL.cs
  51. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageEntity.cs
  52. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageIBLL.cs
  53. +187
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs View File

@@ -262,7 +262,7 @@ namespace Learun.Application.Organization
try try
{ {
var fieldStr = @"t.F_CompanyId,t.F_DepartmentId,t.F_RealName,t.F_Mobile,t.F_HeadIcon, var fieldStr = @"t.F_CompanyId,t.F_DepartmentId,t.F_RealName,t.F_Mobile,t.F_HeadIcon,
t.F_UserId,t.F_Gender,t.F_Password, ";
t.F_UserId,t.F_Gender ";
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append("SELECT "); strSql.Append("SELECT ");
strSql.Append(fieldStr.Replace("t.F_Password,", "").Replace("t.F_Secretkey,", "")); strSql.Append(fieldStr.Replace("t.F_Password,", "").Replace("t.F_Secretkey,", ""));


+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs View File

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromController : MvcControllerBase
{
private FillinFromIBLL fillinFromIBLL = new FillinFromBLL();

#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 = fillinFromIBLL.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 FillinFromData = fillinFromIBLL.GetFillinFromEntity( keyValue );
var jsonData = new {
FillinFrom = FillinFromData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
fillinFromIBLL.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)
{
FillinFromEntity entity = strEntity.ToObject<FillinFromEntity>();
fillinFromIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 43
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.cshtml View File

@@ -0,0 +1,43 @@
@{
ViewBag.Title = "质量目标管理体系指标模块";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">工作模块<font face="宋体">*</font></div>
<input id="WorderModule" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">项目名称<font face="宋体">*</font></div>
<input id="ProjectName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">序&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号<font face="宋体">*</font></div>
<input id="SerialNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">填报部门<font face="宋体">*</font></div>
<div id="FillingDept" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">填报周期</div>
<div id="FillingCycle"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">填报时间</div>
<div id="FillingTime"></div>
</div>
@*<div class="col-xs-6 lr-form-item" data-table="FillinFrom" >
<div class="lr-form-item-title">填报人<font face="宋体">*</font></div>
<div id="FillingPeople" isvalid="yes" checkexpession="NotNull" ></div>
</div>*@
<div class="col-xs-12 lr-form-item" data-table="FillinFrom">
<div class="lr-form-item-title">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</div>
<textarea id="Demo" class="form-control" style="height:100px;"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="FillinFrom" style="display: none; ">
<div class="lr-form-item-title">状态</div>
<input id="State" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/FillinFrom/Form.js")

+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js View File

@@ -0,0 +1,55 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 18:39
* 描 述:质量目标管理体系指标模块
*/
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 () {
$('#FillingTime').lrDataItemSelect({ code: 'CycleTime' });
$('#FillingCycle').lrDataItemSelect({ code: 'ThisCycle' });
$('#FillingDept').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' });
$('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_userid',text: 'f_realname' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/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]);
}
}
});
}
$('#State').val('0');
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml View File

@@ -0,0 +1,58 @@
@{
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="WorderModule" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">项目名称</div>
<input id="ProjectName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">填报周期</div>
<div id="FillingCycle"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">状态</div>
<input id="State" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填报人</div>
<div id="FillingPeople"></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_cancel" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;撤回</a>
<a id="lr_formula" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;设置公式</a>
<a id="lr_cycle" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;设置周期</a>
<a id="lr_people" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;设置填报人</a>
<a id="lr_hide" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;隐藏</a>
<a id="lr_import" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;导入</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/FillinFrom/Index.js")

+ 264
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js View File

@@ -0,0 +1,264 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 18:39
* 描 述:质量目标管理体系指标模块
*/
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);
$('#FillingCycle').lrDataItemSelect({ code: 'ThisCycle' });
$('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' });
if (true) {

}
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/Form',
width: 500,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State !== 0) {
learun.alert.warning("当前项目已提交不能修改!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State !== 0) {
learun.alert.warning("当前项目已提交不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//撤回
$('#lr_cancel').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var RStatus = $('#gridtable').jfGridValue('State');
if (RStatus == 1) {
learun.alert.warning("已提交!");
return false;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Repair/DoSubmit', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//设置公式
$('#lr_formula').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var RStatus = $('#gridtable').jfGridValue('State');
if (RStatus == 1) {
learun.alert.warning("已提交!");
return false;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Repair/DoSubmit', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//设置周期
$('#lr_cycle').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var RStatus = $('#gridtable').jfGridValue('State');
if (RStatus !== 0) {
learun.alert.warning("当前项不能设置周期!");
return false;
}
learun.layerForm({
id: 'form',
title: '设置周期',
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/Form?keyValue=' + keyValue,
width: 500,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
//设置填报人
$('#lr_people').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var RStatus = $('#gridtable').jfGridValue('State');
if (RStatus == 1) {
learun.alert.warning("已提交!");
return false;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Repair/DoSubmit', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//隐藏撤下
$('#lr_hide').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var RStatus = $('#gridtable').jfGridValue('State');
if (RStatus == 1) {
learun.alert.warning("已提交!");
return false;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Repair/DoSubmit', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetPageList',
headData: [
{ label: "核心工作模块", name: "WorderModule", width: 300, align: "center" },
{ label: "序号", name: "SerialNo", width: 100, align: "center" },
{ label: "项目名称", name: "ProjectName", width: 300, align: "center" },
{
label: "填报周期", name: "FillingCycle", width: 100, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ThisCycle',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "填报时间", name: "FillingTime", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'CycleTime',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "填报部门", name: "FillingDept", width: 100, align: "center",
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: "FillingPeople", width: 150, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "状态", name: "State", width: 150, align: "center",
formatter: function (cellvalue) {
if (cellvalue === 0) {
return '<span class=\"label label-warning\">草稿</span>';
} else if (cellvalue === 1) {
return '<span class=\"label label-success\">待设置周期</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-success\">待设置公式</span>';
//} else if (cellvalue === 3) {
// return '<span class=\"label label-success\">待设置周期</span>';
} else {
return '<span class=\"label label-default\">已完成</span>';
}
}
},
{ label: "备注", name: "Demo", width: 300, align: "center" },
],
mainId: 'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs View File

@@ -27,8 +27,8 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers


private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL();


private static UserIBLL userIBLL_static = new UserBLL();
private static Dictionary<string, UserModel> mapData = userIBLL_static.GetModelMap();
private UserIBLL userIBLL_static = new UserBLL();
private Dictionary<string, UserModel> mapData = null;


#region 获取视图 #region 获取视图


@@ -236,7 +236,7 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
[AjaxOnly] [AjaxOnly]
public ActionResult GetMap(string ver) public ActionResult GetMap(string ver)
{ {
var data = mapData;//userIBLL.GetModelMap();
var data = userIBLL_static.GetModelMap();
string md5 = Md5Helper.Encrypt(data.ToJson(), 32); string md5 = Md5Helper.Encrypt(data.ToJson(), 32);
if (md5 == ver) if (md5 == ver)
{ {


+ 120
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs View File

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

namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 15:49
/// 描 述:项目资料管理
/// </summary>
public class ProjectDataManageController : MvcControllerBase
{
private ProjectDataManageIBLL projectDataManageIBLL = new ProjectDataManageBLL();

#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 = projectDataManageIBLL.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 ProjectDataManageData = projectDataManageIBLL.GetProjectDataManageEntity(keyValue);
var jsonData = new
{
ProjectDataManage = ProjectDataManageData,
};
return Success(jsonData);
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
projectDataManageIBLL.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)
{
ProjectDataManageEntity entity = strEntity.ToObject<ProjectDataManageEntity>();
entity.CreateTime = DateTime.Now;
entity.CreateUserId = LoginUserInfo.Get().userId;
projectDataManageIBLL.SaveEntity(keyValue, entity);

return Success("保存成功!");
}
#endregion

}
}

+ 135
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs View File

@@ -0,0 +1,135 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LogisticsManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using System;
using System.Linq;

namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 15:49
/// 描 述:项目管理
/// </summary>
public class ProjectManageController : MvcControllerBase
{
private ProjectManageIBLL projectManageIBLL = new ProjectManageBLL();

#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 = projectManageIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = projectManageIBLL.GetList(queryJson).OrderByDescending(x => x.CreateTime);
return Success(data);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var ProjectManageData = projectManageIBLL.GetProjectManageEntity(keyValue);
var jsonData = new
{
ProjectManage = ProjectManageData,
};
return Success(jsonData);
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
projectManageIBLL.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)
{
ProjectManageEntity entity = strEntity.ToObject<ProjectManageEntity>();
entity.CreateTime = DateTime.Now;
entity.CreateUserId = LoginUserInfo.Get().userId;
projectManageIBLL.SaveEntity(keyValue, entity);

return Success("保存成功!");
}
#endregion

}
}

+ 130
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectPhaseManageController.cs View File

@@ -0,0 +1,130 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LogisticsManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-18 17:36
/// 描 述:项目阶段管理
/// </summary>
public class ProjectPhaseManageController : MvcControllerBase
{
private ProjectPhaseManageIBLL projectPhaseManageIBLL = new ProjectPhaseManageBLL();

#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 = projectPhaseManageIBLL.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 ProjectPhaseManageData = projectPhaseManageIBLL.GetProjectPhaseManageEntity(keyValue);
var jsonData = new
{
ProjectPhaseManage = ProjectPhaseManageData,
};
return Success(jsonData);
}
/// <summary>
/// 获取左侧树形数据
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree()
{
var data = projectPhaseManageIBLL.GetList("{\"IsEnabled\":\"true\"}").OrderBy(x => x.Sort);
return Success(projectPhaseManageIBLL.GetTree(data));
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
projectPhaseManageIBLL.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)
{
ProjectPhaseManageEntity entity = strEntity.ToObject<ProjectPhaseManageEntity>();
projectPhaseManageIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 130
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectTypeManageController.cs View File

@@ -0,0 +1,130 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LogisticsManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-18 17:36
/// 描 述:项目类型管理
/// </summary>
public class ProjectTypeManageController : MvcControllerBase
{
private ProjectTypeManageIBLL projectTypeManageIBLL = new ProjectTypeManageBLL();

#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 = projectTypeManageIBLL.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 ProjectTypeManageData = projectTypeManageIBLL.GetProjectTypeManageEntity(keyValue);
var jsonData = new
{
ProjectTypeManage = ProjectTypeManageData,
};
return Success(jsonData);
}
/// <summary>
/// 获取左侧树形数据
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree()
{
var data = projectTypeManageIBLL.GetList("{\"IsEnabled\":\"true\"}").OrderBy(x => x.Sort);
return Success(projectTypeManageIBLL.GetTree(data));
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
projectTypeManageIBLL.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)
{
ProjectTypeManageEntity entity = strEntity.ToObject<ProjectTypeManageEntity>();
projectTypeManageIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.cshtml View File

@@ -0,0 +1,35 @@
@{
ViewBag.Title = "项目资料管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ProjectDataManage">
<div class="lr-form-item-title">项目<font face="宋体">*</font></div>
<div id="PId" readonly="readonly" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectDataManage">
<div class="lr-form-item-title">项目阶段<font face="宋体">*</font></div>
<div id="PPId" readonly="readonly" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectDataManage">
<div class="lr-form-item-title">项目资料名称<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectDataManage">
<div class="lr-form-item-title">资料文件</div>
<div id="Files"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectDataManage">
<div class="lr-form-item-title">负责部门</div>
<div id="DepartmentId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectDataManage">
<div class="lr-form-item-title">负责人</div>
<div id="ManagerId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectDataManage">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js")

+ 82
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js View File

@@ -0,0 +1,82 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 15:49
* 描 述:项目资料管理
*/
var acceptClick;
var keyValue = request('keyValue');
var PPId = request("PPId");
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#PId').lrselect({
// 展开最大高度
maxHeight: 200,
// 是否允许搜索
allowSearch: true,
// 访问数据接口地址
url: top.$.rootUrl + '/LogisticsManagement/ProjectManage/GetList',
value: "Id",
text: "Name",
});
$('#PPId').lrselect({
type: 'tree',
// 展开最大高度
maxHeight: 200,
// 是否允许搜索
allowSearch: true,
// 访问数据接口地址
url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetTree',
select: function (item) {
if (item != null && item != undefined) {
}
}
});
if (!!PPId) {
$('#PPId').lrselectSet(PPId);
}

$('#Files').lrUploader();
$('#DepartmentId').lrDepartmentSelect();
$('#ManagerId').lrUserSelect(0);
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/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 + '/LogisticsManagement/ProjectDataManage/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.cshtml View File

@@ -0,0 +1,55 @@
@{
/**/

ViewBag.Title = "项目资料管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">阶段</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">未选择阶段</span> - <span class="lrlt">列表信息</span>
</div>
<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="Name" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<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>
<div id="ManagerId"></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>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js")

+ 135
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js View File

@@ -0,0 +1,135 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 15:49
* 描 述:项目资料管理
*/
var refreshGirdData;
var PPId;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.inittree();
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#DepartmentId').lrDepartmentSelect();
$('#ManagerId').lrUserSelect(0);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
if (!PPId) {
learun.alert.warning('请选择阶段!');
return false;
}
learun.layerForm({
id: 'ProjectDataManageform',
title: '新增',
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Form?PPId=' + PPId,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'ProjectDataManageform',
title: '编辑',
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Form?keyValue=' + keyValue,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
inittree: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetTree',
nodeClick: page.treeNodeClick
});
},
treeNodeClick: function (item) {
PPId = item.id;
$('#titleinfo').text(item.text);
page.search();
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/GetPageList',
headData: [
{ label: "项目资料名称", name: "Name", width: 200, 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: "ManagerId", 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: "CreateTime", width: 130, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'Id',
isPage: true,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.PPId = PPId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 31
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml View File

@@ -0,0 +1,31 @@
@{
ViewBag.Title = "项目管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ProjectManage">
<div class="lr-form-item-title">项目类型<font face="宋体">*</font></div>
<div id="PTId" readonly="readonly" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectManage">
<div class="lr-form-item-title">项目名称<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectManage">
<div class="lr-form-item-title">项目周期</div>
<input id="Period" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectManage">
<div class="lr-form-item-title">负责部门</div>
<div id="DepartmentId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectManage">
<div class="lr-form-item-title">负责人</div>
<div id="ManagerId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectManage">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectManage/Form.js")

+ 71
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js View File

@@ -0,0 +1,71 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 15:49
* 描 述:项目管理
*/
var acceptClick;
var keyValue = request('keyValue');
var PTId = request("PTId");
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#PTId').lrselect({
type: 'tree',
// 展开最大高度
maxHeight: 200,
// 是否允许搜索
allowSearch: true,
// 访问数据接口地址
url: top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/GetTree',
select: function (item) {
if (item != null && item != undefined) {
}
}
});
if (!!PTId) {
$('#PTId').lrselectSet(PTId);
}

$('#DepartmentId').lrDepartmentSelect();
$('#ManagerId').lrUserSelect(0);
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ProjectManage/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 + '/LogisticsManagement/ProjectManage/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml View File

@@ -0,0 +1,58 @@
@{
/**/

ViewBag.Title = "项目管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">类型</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">未选择类型</span> - <span class="lrlt">列表信息</span>
</div>
<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="Name" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<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>
<div id="ManagerId"></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>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_data" 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/LogisticsManagement/Views/ProjectManage/Index.js")

+ 139
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js View File

@@ -0,0 +1,139 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-21 15:49
* 描 述:项目管理
*/
var refreshGirdData;
var PTId;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.inittree();
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#DepartmentId').lrDepartmentSelect();
$('#ManagerId').lrUserSelect(0);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
if (!PTId) {
learun.alert.warning('请选择类型!');
return false;
}
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LogisticsManagement/ProjectManage/Form?PTId=' + PTId,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LogisticsManagement/ProjectManage/Form?keyValue=' + keyValue,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/ProjectManage/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//  上传项目资料
$('#lr_data').on('click', function () {
});
},
inittree: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/GetTree',
nodeClick: page.treeNodeClick
});
},
treeNodeClick: function (item) {
PTId = item.id;
$('#titleinfo').text(item.text);
page.search();
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LogisticsManagement/ProjectManage/GetPageList',
headData: [
{ label: "项目名称", name: "Name", width: 200, align: "left" },
{ label: "项目周期", name: "Period", 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: "ManagerId", 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: "Status", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'Id',
isPage: true,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.PTId = PTId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectPhaseManage/Form.cshtml View File

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "项目阶段管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ProjectPhaseManage" >
<div class="lr-form-item-title">项目阶段名称<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectPhaseManage" >
<div class="lr-form-item-title">项目阶段编号<font face="宋体">*</font></div>
<input id="Code" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectPhaseManage" >
<div class="lr-form-item-title">排序号</div>
<input id="Sort" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectPhaseManage" >
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div>
<div id="IsEnabled" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectPhaseManage" >
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectPhaseManage/Form.js")

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectPhaseManage/Form.js View File

@@ -0,0 +1,51 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-18 17:36
* 描 述:项目阶段管理
*/
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 () {
$('#IsEnabled').lrDataItemSelect({ code: 'YesOrNoBit' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/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 + '/LogisticsManagement/ProjectPhaseManage/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 40
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectPhaseManage/Index.cshtml View File

@@ -0,0 +1,40 @@
@{
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="Name" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">阶段编号</div>
<input id="Code" type="text" class="form-control" />
</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>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectPhaseManage/Index.js")

+ 97
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectPhaseManage/Index.js View File

@@ -0,0 +1,97 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-18 17:36
* 描 述:项目阶段管理
*/
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);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetPageList',
headData: [
{ label: "项目阶段名称", name: "Name", width: 200, align: "left" },
{ label: "项目阶段编号", name: "Code", width: 200, align: "left" },
{ label: "排序号", name: "Sort", width: 100, align: "left" },
{
label: "是否启用", name: "IsEnabled", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'Id',
isPage: true,
sidx:'Sort'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Form.cshtml View File

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "项目类型管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ProjectTypeManage" >
<div class="lr-form-item-title">项目类型名称<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectTypeManage" >
<div class="lr-form-item-title">项目类型编号<font face="宋体">*</font></div>
<input id="Code" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectTypeManage" >
<div class="lr-form-item-title">排序号</div>
<input id="Sort" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectTypeManage" >
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div>
<div id="IsEnabled" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ProjectTypeManage" >
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectTypeManage/Form.js")

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Form.js View File

@@ -0,0 +1,51 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-18 17:36
* 描 述:项目类型管理
*/
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 () {
$('#IsEnabled').lrDataItemSelect({ code: 'YesOrNoBit' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/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 + '/LogisticsManagement/ProjectTypeManage/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 40
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.cshtml View File

@@ -0,0 +1,40 @@
@{
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="Name" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">类型编号</div>
<input id="Code" type="text" class="form-control" />
</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>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.js")

+ 97
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.js View File

@@ -0,0 +1,97 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-18 17:36
* 描 述:项目类型管理
*/
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);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/GetPageList',
headData: [
{ label: "项目类型名称", name: "Name", width: 200, align: "left" },
{ label: "项目类型编号", name: "Code", width: 200, align: "left" },
{ label: "排序号", name: "Sort", width: 100, align: "left" },
{
label: "是否启用", name: "IsEnabled", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'Id',
isPage: true,
sidx:'Sort'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 15
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/ueditor/ueditor.config.js View File

@@ -32,15 +32,28 @@
, serverUrl: top.$.rootUrl + "/Utility/UEditor" , serverUrl: top.$.rootUrl + "/Utility/UEditor"


//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义 //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
//, toolbars: [[
// 'fullscreen', 'source', '|', 'undo', 'redo', '|',
// 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
// 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
// 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
// 'directionalityltr', 'directionalityrtl', 'indent', '|',
// 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
// 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
// 'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', /*'gmap',*/ 'insertframe', 'insertcode', /*'webapp',*/'pagebreak', 'template', 'background', '|',
// 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
// 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
// 'print', /*'preview',*/ 'searchreplace', 'drafts', 'help'
//]]
, toolbars: [[ , toolbars: [[
'fullscreen', 'source', '|', 'undo', 'redo', '|',
'undo', 'redo', '|',
'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
'rowspacingtop', 'rowspacingbottom', 'lineheight', '|', 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|', 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
'directionalityltr', 'directionalityrtl', 'indent', '|', 'directionalityltr', 'directionalityrtl', 'indent', '|',
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', /*'gmap',*/ 'insertframe', 'insertcode', /*'webapp',*/'pagebreak', 'template', 'background', '|',
'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment','pagebreak', 'template', 'background', '|',
'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|', 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|', 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
'print', /*'preview',*/ 'searchreplace', 'drafts', 'help' 'print', /*'preview',*/ 'searchreplace', 'drafts', 'help'


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/FillinFromMap.cs View File

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromMap : EntityTypeConfiguration<FillinFromEntity>
{
public FillinFromMap()
{
#region 表、主键
//表
this.ToTable("FILLINFROM");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectDataManageMap.cs View File

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

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

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectManageMap.cs View File

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

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

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectPhaseManageMap.cs View File

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-18 17:36
/// 描 述:项目阶段管理
/// </summary>
public class ProjectPhaseManageMap : EntityTypeConfiguration<ProjectPhaseManageEntity>
{
public ProjectPhaseManageMap()
{
#region 表、主键
//表
this.ToTable("PROJECTPHASEMANAGE");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectTypeManageMap.cs View File

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

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

#region 配置关系
#endregion
}
}
}


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromBLL : FillinFromIBLL
{
private FillinFromService fillinFromService = new FillinFromService();

#region 获取数据

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

/// <summary>
/// 获取FillinFrom表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public FillinFromEntity GetFillinFromEntity(string keyValue)
{
try
{
return fillinFromService.GetFillinFromEntity(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
{
fillinFromService.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, FillinFromEntity entity)
{
try
{
fillinFromService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 100
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromEntity.cs View File

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 工作模块
/// </summary>
[Column("WORDERMODULE")]
public string WorderModule { get; set; }
/// <summary>
/// 序号
/// </summary>
[Column("SERIALNO")]
public string SerialNo { get; set; }
/// <summary>
/// 项目名称
/// </summary>
[Column("PROJECTNAME")]
public string ProjectName { get; set; }
/// <summary>
/// 公式
/// </summary>
[Column("FORMULA")]
public decimal? Formul { get; set; }
/// <summary>
/// 结果
/// </summary>
[Column("LASTRESULT")]
public string LastResult { get; set; }
/// <summary>
/// 填报周期
/// </summary>
[Column("FILLINGCYCLE")]
public string FillingCycle { get; set; }
/// <summary>
/// 填报时间
/// </summary>
[Column("FILLINGTIME")]
public string FillingTime { get; set; }
/// <summary>
/// 填报部门
/// </summary>
[Column("FILLINGDEPT")]
public string FillingDept { get; set; }
/// <summary>
/// 填报人
/// </summary>
[Column("FILLINGPEOPLE")]
public string FillingPeople { get; set; }
/// <summary>
/// 状态 0:草稿 1待指派部门 2待填写公式 3 已完成
/// </summary>
[Column("STATE")]
public int? State { get; set; }
/// <summary>
/// Demo
/// </summary>
[Column("DEMO")]
public string Demo { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public interface FillinFromIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<FillinFromEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取FillinFrom表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
FillinFromEntity GetFillinFromEntity(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, FillinFromEntity entity);
#endregion

}
}

+ 180
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs View File

@@ -0,0 +1,180 @@
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.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 18:39
/// 描 述:质量目标管理体系指标模块
/// </summary>
public class FillinFromService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FillinFromEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.WorderModule,
t.SerialNo,
t.ProjectName,
t.Formula,
t.LastResult,
t.FillingCycle,
t.FillingTime,
t.FillingDept,
t.FillingPeople,
t.Demo,
t.State
");
strSql.Append(" FROM FillinFrom t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["WorderModule"].IsEmpty())
{
dp.Add("WorderModule", "%" + queryParam["WorderModule"].ToString() + "%", DbType.String);
strSql.Append(" AND t.WorderModule Like @WorderModule ");
}
if (!queryParam["ProjectName"].IsEmpty())
{
dp.Add("ProjectName", "%" + queryParam["ProjectName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ProjectName Like @ProjectName ");
}
if (!queryParam["FillingCycle"].IsEmpty())
{
dp.Add("FillingCycle",queryParam["FillingCycle"].ToString(), DbType.String);
strSql.Append(" AND t.FillingCycle = @FillingCycle ");
}
if (!queryParam["State"].IsEmpty())
{
dp.Add("State", "%" + queryParam["State"].ToString() + "%", DbType.String);
strSql.Append(" AND t.State Like @State ");
}
if (!queryParam["FillingPeople"].IsEmpty())
{
dp.Add("FillingPeople",queryParam["FillingPeople"].ToString(), DbType.String);
strSql.Append(" AND t.FillingPeople = @FillingPeople ");
}
return this.BaseRepository("CollegeMIS").FindList<FillinFromEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取FillinFrom表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public FillinFromEntity GetFillinFromEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<FillinFromEntity>(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<FillinFromEntity>(t=>t.Id == 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, FillinFromEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 15:49
/// 描 述:项目资料管理
/// </summary>
public class ProjectDataManageBLL : ProjectDataManageIBLL
{
private ProjectDataManageService projectDataManageService = new ProjectDataManageService();

#region 获取数据

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

/// <summary>
/// 获取ProjectDataManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ProjectDataManageEntity GetProjectDataManageEntity(string keyValue)
{
try
{
return projectDataManageService.GetProjectDataManageEntity(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
{
projectDataManageService.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, ProjectDataManageEntity entity)
{
try
{
projectDataManageService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 90
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageEntity.cs View File

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

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 15:49
/// 描 述:项目资料管理
/// </summary>
public class ProjectDataManageEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 项目Id
/// </summary>
[Column("PID")]
public string PId { get; set; }
/// <summary>
/// 项目阶段Id
/// </summary>
[Column("PPID")]
public string PPId { get; set; }
/// <summary>
/// 项目资料名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 负责部门
/// </summary>
[Column("DEPARTMENTID")]
public string DepartmentId { get; set; }
/// <summary>
/// 负责人
/// </summary>
[Column("MANAGERID")]
public string ManagerId { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 资料文件
/// </summary>
[Column("FILES")]
public string Files { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageIBLL.cs View File

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

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ProjectDataManageEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取ProjectDataManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
ProjectDataManageEntity GetProjectDataManageEntity(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, ProjectDataManageEntity entity);
#endregion

}
}

+ 166
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs View File

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectDataManageEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM ProjectDataManage t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
if (!queryParam["DepartmentId"].IsEmpty())
{
dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
strSql.Append(" AND t.DepartmentId = @DepartmentId ");
}
if (!queryParam["ManagerId"].IsEmpty())
{
dp.Add("ManagerId",queryParam["ManagerId"].ToString(), DbType.String);
strSql.Append(" AND t.ManagerId = @ManagerId ");
}
if (!queryParam["PId"].IsEmpty())
{
dp.Add("PId",queryParam["PId"].ToString(), DbType.String);
strSql.Append(" AND t.PId = @PId ");
}
if (!queryParam["PPId"].IsEmpty())
{
dp.Add("PPId", queryParam["PPId"].ToString(), DbType.String);
strSql.Append(" AND t.PPId = @PPId ");
}
return this.BaseRepository("CollegeMIS").FindList<ProjectDataManageEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ProjectDataManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ProjectDataManageEntity GetProjectDataManageEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ProjectDataManageEntity>(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<ProjectDataManageEntity>(t=>t.Id == 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, ProjectDataManageEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 15:49
/// 描 述:项目管理
/// </summary>
public class ProjectManageBLL : ProjectManageIBLL
{
private ProjectManageService projectManageService = new ProjectManageService();

#region 获取数据

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectManageEntity> GetList(string queryJson)
{
try
{
return projectManageService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取ProjectManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ProjectManageEntity GetProjectManageEntity(string keyValue)
{
try
{
return projectManageService.GetProjectManageEntity(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
{
projectManageService.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, ProjectManageEntity entity)
{
try
{
projectManageService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 90
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageEntity.cs View File

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

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-21 15:49
/// 描 述:项目管理
/// </summary>
public class ProjectManageEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 项目类型Id
/// </summary>
[Column("PTID")]
public string PTId { get; set; }
/// <summary>
/// 项目名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 项目周期
/// </summary>
[Column("PERIOD")]
public string Period { get; set; }
/// <summary>
/// 负责部门
/// </summary>
[Column("DEPARTMENTID")]
public string DepartmentId { get; set; }
/// <summary>
/// 负责人
/// </summary>
[Column("MANAGERID")]
public string ManagerId { get; set; }
/// <summary>
/// 项目状态
/// </summary>
[Column("STATUS")]
public string Status { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs View File

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

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ProjectManageEntity> GetPageList(Pagination pagination, string queryJson);

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ProjectManageEntity> GetList(string queryJson);
/// <summary>
/// 获取ProjectManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
ProjectManageEntity GetProjectManageEntity(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, ProjectManageEntity entity);
#endregion

}
}

+ 194
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs View File

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectManageEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM ProjectManage t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
if (!queryParam["DepartmentId"].IsEmpty())
{
dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
strSql.Append(" AND t.DepartmentId = @DepartmentId ");
}
if (!queryParam["ManagerId"].IsEmpty())
{
dp.Add("ManagerId",queryParam["ManagerId"].ToString(), DbType.String);
strSql.Append(" AND t.ManagerId = @ManagerId ");
}
if (!queryParam["PTId"].IsEmpty())
{
dp.Add("PTId",queryParam["PTId"].ToString(), DbType.String);
strSql.Append(" AND t.PTId = @PTId ");
}
return this.BaseRepository("CollegeMIS").FindList<ProjectManageEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectManageEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM ProjectManage t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository("CollegeMIS").FindList<ProjectManageEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ProjectManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ProjectManageEntity GetProjectManageEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ProjectManageEntity>(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<ProjectManageEntity>(t=>t.Id == 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, ProjectManageEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 186
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-18 17:36
/// 描 述:项目阶段管理
/// </summary>
public class ProjectPhaseManageBLL : ProjectPhaseManageIBLL
{
private ProjectPhaseManageService projectPhaseManageService = new ProjectPhaseManageService();

#region 获取数据

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

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

/// <summary>
/// 获取ProjectPhaseManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ProjectPhaseManageEntity GetProjectPhaseManageEntity(string keyValue)
{
try
{
return projectPhaseManageService.GetProjectPhaseManageEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取树形数据
/// </summary>
/// <param name="companylist">公司数据列表</param>
/// <returns></returns>
public IEnumerable<TreeModel> GetTree(IEnumerable<ProjectPhaseManageEntity> typelist)
{
try
{
List<TreeModel> treeList = new List<TreeModel>();
foreach (var typeitem in typelist)
{
TreeModel node = new TreeModel
{
id = typeitem.Id,
text = typeitem.Name,
value = typeitem.Code,
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = ""
};
treeList.Add(node);
}
return treeList.ToTree();
}
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
{
projectPhaseManageService.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, ProjectPhaseManageEntity entity)
{
try
{
projectPhaseManageService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageEntity.cs View File

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

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-18 17:36
/// 描 述:项目阶段管理
/// </summary>
public class ProjectPhaseManageEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 项目类型名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 项目类型编号
/// </summary>
[Column("CODE")]
public string Code { get; set; }
/// <summary>
/// 排序号
/// </summary>
[Column("SORT")]
public int? Sort { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[Column("ISENABLED")]
public bool? IsEnabled { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageIBLL.cs View File

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

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ProjectPhaseManageEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ProjectPhaseManageEntity> GetList(string queryJson);
/// <summary>
/// 获取ProjectPhaseManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
ProjectPhaseManageEntity GetProjectPhaseManageEntity(string keyValue);
/// <summary>
/// 获取树形数据
/// </summary>
/// <param name="companylist">公司数据列表</param>
/// <returns></returns>
IEnumerable<TreeModel> GetTree(IEnumerable<ProjectPhaseManageEntity> typelist);
#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, ProjectPhaseManageEntity entity);
#endregion

}
}

+ 187
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageService.cs View File

@@ -0,0 +1,187 @@
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.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-18 17:36
/// 描 述:项目阶段管理
/// </summary>
public class ProjectPhaseManageService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectPhaseManageEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM ProjectPhaseManage t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
if (!queryParam["Code"].IsEmpty())
{
dp.Add("Code", "%" + queryParam["Code"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Code Like @Code ");
}
return this.BaseRepository("CollegeMIS").FindList<ProjectPhaseManageEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectPhaseManageEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT * ");
strSql.Append(" FROM ProjectPhaseManage t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["IsEnabled"].IsEmpty())
{
dp.Add("IsEnabled", queryParam["IsEnabled"].ToBool(), DbType.Boolean);
strSql.Append(" AND t.IsEnabled = @IsEnabled ");
}
return this.BaseRepository("CollegeMIS").FindList<ProjectPhaseManageEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ProjectPhaseManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ProjectPhaseManageEntity GetProjectPhaseManageEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ProjectPhaseManageEntity>(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<ProjectPhaseManageEntity>(t=>t.Id == 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, ProjectPhaseManageEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 186
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-18 17:36
/// 描 述:项目类型管理
/// </summary>
public class ProjectTypeManageBLL : ProjectTypeManageIBLL
{
private ProjectTypeManageService projectTypeManageService = new ProjectTypeManageService();

#region 获取数据

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

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

/// <summary>
/// 获取ProjectTypeManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ProjectTypeManageEntity GetProjectTypeManageEntity(string keyValue)
{
try
{
return projectTypeManageService.GetProjectTypeManageEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取树形数据
/// </summary>
/// <param name="companylist">公司数据列表</param>
/// <returns></returns>
public IEnumerable<TreeModel> GetTree(IEnumerable<ProjectTypeManageEntity> typelist)
{
try
{
List<TreeModel> treeList = new List<TreeModel>();
foreach (var typeitem in typelist)
{
TreeModel node = new TreeModel
{
id = typeitem.Id,
text = typeitem.Name,
value = typeitem.Code,
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = ""
};
treeList.Add(node);
}
return treeList.ToTree();
}
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
{
projectTypeManageService.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, ProjectTypeManageEntity entity)
{
try
{
projectTypeManageService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageEntity.cs View File

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

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-18 17:36
/// 描 述:项目类型管理
/// </summary>
public class ProjectTypeManageEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 项目类型名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 项目类型编号
/// </summary>
[Column("CODE")]
public string Code { get; set; }
/// <summary>
/// 排序号
/// </summary>
[Column("SORT")]
public int? Sort { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[Column("ISENABLED")]
public bool? IsEnabled { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageIBLL.cs View File

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

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ProjectTypeManageEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ProjectTypeManageEntity> GetList(string queryJson);
/// <summary>
/// 获取ProjectTypeManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
ProjectTypeManageEntity GetProjectTypeManageEntity(string keyValue);
/// <summary>
/// 获取树形数据
/// </summary>
/// <param name="companylist">公司数据列表</param>
/// <returns></returns>
IEnumerable<TreeModel> GetTree(IEnumerable<ProjectTypeManageEntity> typelist);
#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, ProjectTypeManageEntity entity);
#endregion

}
}

+ 187
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageService.cs View File

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectTypeManageEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM ProjectTypeManage t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
if (!queryParam["Code"].IsEmpty())
{
dp.Add("Code", "%" + queryParam["Code"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Code Like @Code ");
}
return this.BaseRepository("CollegeMIS").FindList<ProjectTypeManageEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectTypeManageEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT * ");
strSql.Append(" FROM ProjectTypeManage t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["IsEnabled"].IsEmpty())
{
dp.Add("IsEnabled", queryParam["IsEnabled"].ToBool(), DbType.Boolean);
strSql.Append(" AND t.IsEnabled = @IsEnabled ");
}
return this.BaseRepository("CollegeMIS").FindList<ProjectTypeManageEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ProjectTypeManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ProjectTypeManageEntity GetProjectTypeManageEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ProjectTypeManageEntity>(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<ProjectTypeManageEntity>(t=>t.Id == 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, ProjectTypeManageEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

Loading…
Cancel
Save