Explorar el Código

Merge branch '金隅分支' of 123.57.209.16:bjquanjiang/DigitalScholl into 金隅分支

金隅分支
liangkun hace 3 años
padre
commit
582d367bbd
Se han modificado 18 ficheros con 1026 adiciones y 33 borrados
  1. +120
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs
  2. +18
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectTypeManageController.cs
  3. +31
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml
  4. +71
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
  5. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
  6. +139
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js
  7. +15
    -18
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.js
  8. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  10. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectManageMap.cs
  11. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  12. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs
  13. +90
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageEntity.cs
  14. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs
  15. +161
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs
  16. +62
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageBLL.cs
  17. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageIBLL.cs
  18. +37
    -9
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageService.cs

+ 120
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs Ver fichero

@@ -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 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="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

}
}

+ 18
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectTypeManageController.cs Ver fichero

@@ -3,6 +3,7 @@ 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
{
@@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -35,7 +36,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}
#endregion

@@ -71,12 +72,24 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var ProjectTypeManageData = projectTypeManageIBLL.GetProjectTypeManageEntity( keyValue );
var jsonData = new {
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 提交数据
@@ -105,7 +118,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
ProjectTypeManageEntity entity = strEntity.ToObject<ProjectTypeManageEntity>();
projectTypeManageIBLL.SaveEntity(keyValue,entity);
projectTypeManageIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}


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

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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();
}

+ 15
- 18
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.js Ver fichero

@@ -55,7 +55,7 @@ var bootstrap = function ($, learun) {
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
@@ -68,29 +68,26 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/GetPageList',
headData: [
{ label: "项目类型名称", name: "Name", width: 100, align: "left"},
{ label: "项目类型编号", name: "Code", width: 100, align: "left"},
{ label: "排序号", name: "Sort", width: 100, align: "left"},
{ label: "是否启用", name: "IsEnabled", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'YesOrNoBit',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "备注", name: "Remark", width: 100, align: "left"},
{ 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
mainId: 'Id',
isPage: true,
sidx:'Sort'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Ver fichero

@@ -810,6 +810,7 @@
<Compile Include="Areas\ReceiveSendFeeManagement\Controllers\FD_IncomeManageController.cs" />
<Compile Include="Areas\ReceiveSendFeeManagement\Controllers\FD_PayManageController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\ProjectTypeManageController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\ProjectManageController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6474,6 +6475,10 @@
<Content Include="Areas\LogisticsManagement\Views\ProjectTypeManage\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectTypeManage\Form.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\ProjectTypeManage\Form.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectManage\Index.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\ProjectManage\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectManage\Form.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\ProjectManage\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Ver fichero

@@ -565,6 +565,7 @@
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManageMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_PayManageMap.cs" />
<Compile Include="LogisticsManagement\ProjectTypeManageMap.cs" />
<Compile Include="LogisticsManagement\ProjectManageMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


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

@@ -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
}
}
}


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Ver fichero

@@ -1677,6 +1677,10 @@
<Compile Include="LogisticsManagement\ProjectTypeManage\ProjectTypeManageService.cs" />
<Compile Include="LogisticsManagement\ProjectTypeManage\ProjectTypeManageBLL.cs" />
<Compile Include="LogisticsManagement\ProjectTypeManage\ProjectTypeManageIBLL.cs" />
<Compile Include="LogisticsManagement\ProjectManage\ProjectManageEntity.cs" />
<Compile Include="LogisticsManagement\ProjectManage\ProjectManageService.cs" />
<Compile Include="LogisticsManagement\ProjectManage\ProjectManageBLL.cs" />
<Compile Include="LogisticsManagement\ProjectManage\ProjectManageIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs Ver fichero

@@ -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 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>
/// 获取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 Ver fichero

@@ -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
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs Ver fichero

@@ -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 ProjectManageIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ProjectManageEntity> GetPageList(Pagination pagination, 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

}
}

+ 161
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs Ver fichero

@@ -0,0 +1,161 @@
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>
/// 获取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

}
}

+ 62
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageBLL.cs Ver fichero

@@ -43,6 +43,30 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

/// <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>
@@ -66,7 +90,44 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}
}

/// <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 提交数据


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageIBLL.cs Ver fichero

@@ -22,11 +22,23 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// <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 提交数据


+ 37
- 9
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageService.cs Ver fichero

@@ -30,15 +30,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.Name,
t.Code,
t.Sort,
t.IsEnabled,
t.Remark
");
strSql.Append("SELECT t.* ");
strSql.Append(" FROM ProjectTypeManage t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
@@ -69,6 +61,42 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

/// <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>


Cargando…
Cancelar
Guardar