From 59f15e3db444c45e943f8017b430d5295242f739 Mon Sep 17 00:00:00 2001
From: dyy <18335927079@163.com>
Date: Mon, 21 Jun 2021 18:22:46 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E9=A1=B9?=
=?UTF-8?q?=E7=9B=AE=E7=B1=BB=E5=9E=8B=E7=AE=A1=E7=90=86=EF=BC=9B=E3=80=90?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E3=80=91=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/ProjectManageController.cs | 120 +++++++++++++
.../ProjectTypeManageController.cs | 23 ++-
.../Views/ProjectManage/Form.cshtml | 31 ++++
.../Views/ProjectManage/Form.js | 71 ++++++++
.../Views/ProjectManage/Index.cshtml | 58 +++++++
.../Views/ProjectManage/Index.js | 139 +++++++++++++++
.../Views/ProjectTypeManage/Index.js | 33 ++--
.../Learun.Application.Web.csproj | 5 +
.../Learun.Application.Mapping.csproj | 1 +
.../LogisticsManagement/ProjectManageMap.cs | 29 ++++
.../Learun.Application.TwoDevelopment.csproj | 4 +
.../ProjectManage/ProjectManageBLL.cs | 125 ++++++++++++++
.../ProjectManage/ProjectManageEntity.cs | 90 ++++++++++
.../ProjectManage/ProjectManageIBLL.cs | 48 ++++++
.../ProjectManage/ProjectManageService.cs | 161 ++++++++++++++++++
.../ProjectTypeManage/ProjectTypeManageBLL.cs | 63 ++++++-
.../ProjectTypeManageIBLL.cs | 12 ++
.../ProjectTypeManageService.cs | 46 ++++-
18 files changed, 1026 insertions(+), 33 deletions(-)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectManageMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs
new file mode 100644
index 000000000..7af2211c4
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs
@@ -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
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-21 15:49
+ /// 描 述:项目管理
+ ///
+ public class ProjectManageController : MvcControllerBase
+ {
+ private ProjectManageIBLL projectManageIBLL = new ProjectManageBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = projectManageIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var ProjectManageData = projectManageIBLL.GetProjectManageEntity(keyValue);
+ var jsonData = new
+ {
+ ProjectManage = ProjectManageData,
+ };
+ return Success(jsonData);
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ projectManageIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ ProjectManageEntity entity = strEntity.ToObject();
+ entity.CreateTime = DateTime.Now;
+ entity.CreateUserId = LoginUserInfo.Get().userId;
+ projectManageIBLL.SaveEntity(keyValue, entity);
+
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectTypeManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectTypeManageController.cs
index a29291f66..0f95a9aae 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectTypeManageController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectTypeManageController.cs
@@ -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();
}
///
/// 表单页
@@ -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);
}
+ ///
+ /// 获取左侧树形数据
+ ///
+ ///
+ [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();
- projectTypeManageIBLL.SaveEntity(keyValue,entity);
+ projectTypeManageIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml
new file mode 100644
index 000000000..30bd65231
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml
@@ -0,0 +1,31 @@
+@{
+ ViewBag.Title = "项目管理";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectManage/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
new file mode 100644
index 000000000..181f3e26f
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
@@ -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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
new file mode 100644
index 000000000..6880ecba7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
@@ -0,0 +1,58 @@
+@{
+ /**/
+
+ ViewBag.Title = "项目管理";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectManage/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js
new file mode 100644
index 000000000..d2592c468
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js
@@ -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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.js
index d462b8638..b58d42588 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectTypeManage/Index.js
@@ -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 ? "" : "";
+ }
+ },
+ { 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 () {
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 29def39e5..425a1fc62 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -810,6 +810,7 @@
+
@@ -6474,6 +6475,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
index b3605be9f..a6bed2be6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
@@ -565,6 +565,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectManageMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectManageMap.cs
new file mode 100644
index 000000000..08531f96d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectManageMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-21 15:49
+ /// 描 述:项目管理
+ ///
+ public class ProjectManageMap : EntityTypeConfiguration
+ {
+ public ProjectManageMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PROJECTMANAGE");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
index 268cbc9a2..3491b61e5 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
@@ -1677,6 +1677,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs
new file mode 100644
index 000000000..4b98b4bcb
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-21 15:49
+ /// 描 述:项目管理
+ ///
+ public class ProjectManageBLL : ProjectManageIBLL
+ {
+ private ProjectManageService projectManageService = new ProjectManageService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return projectManageService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取ProjectManage表实体数据
+ ///
+ /// 主键
+ ///
+ 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 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ projectManageService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ 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
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageEntity.cs
new file mode 100644
index 000000000..5552d50d6
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageEntity.cs
@@ -0,0 +1,90 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-21 15:49
+ /// 描 述:项目管理
+ ///
+ public class ProjectManageEntity
+ {
+ #region 实体成员
+ ///
+ /// 主键
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// 项目类型Id
+ ///
+ [Column("PTID")]
+ public string PTId { get; set; }
+ ///
+ /// 项目名称
+ ///
+ [Column("NAME")]
+ public string Name { get; set; }
+ ///
+ /// 项目周期
+ ///
+ [Column("PERIOD")]
+ public string Period { get; set; }
+ ///
+ /// 负责部门
+ ///
+ [Column("DEPARTMENTID")]
+ public string DepartmentId { get; set; }
+ ///
+ /// 负责人
+ ///
+ [Column("MANAGERID")]
+ public string ManagerId { get; set; }
+ ///
+ /// 项目状态
+ ///
+ [Column("STATUS")]
+ public string Status { get; set; }
+ ///
+ /// 备注
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// 创建时间
+ ///
+ [Column("CREATETIME")]
+ public DateTime? CreateTime { get; set; }
+ ///
+ /// 创建用户
+ ///
+ [Column("CREATEUSERID")]
+ public string CreateUserId { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs
new file mode 100644
index 000000000..7fa54be1e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs
@@ -0,0 +1,48 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-21 15:49
+ /// 描 述:项目管理
+ ///
+ public interface ProjectManageIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取ProjectManage表实体数据
+ ///
+ /// 主键
+ ///
+ ProjectManageEntity GetProjectManageEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, ProjectManageEntity entity);
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs
new file mode 100644
index 000000000..1250994c2
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs
@@ -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
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-21 15:49
+ /// 描 述:项目管理
+ ///
+ public class ProjectManageService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable 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(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取ProjectManage表实体数据
+ ///
+ /// 主键
+ ///
+ public ProjectManageEntity GetProjectManageEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ 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
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageBLL.cs
index 2815d5eff..cdce07e41 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageBLL.cs
@@ -43,6 +43,30 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable GetList(string queryJson)
+ {
+ try
+ {
+ return projectTypeManageService.GetList(queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
///
/// 获取ProjectTypeManage表实体数据
///
@@ -66,7 +90,44 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}
}
-
+ ///
+ /// 获取树形数据
+ ///
+ /// 公司数据列表
+ ///
+ public IEnumerable GetTree(IEnumerable typelist)
+ {
+ try
+ {
+ List treeList = new List();
+ 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 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageIBLL.cs
index b6880a98e..364e16811 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageIBLL.cs
@@ -22,11 +22,23 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
///
IEnumerable GetPageList(Pagination pagination, string queryJson);
///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetList(string queryJson);
+ ///
/// 获取ProjectTypeManage表实体数据
///
/// 主键
///
ProjectTypeManageEntity GetProjectTypeManageEntity(string keyValue);
+ ///
+ /// 获取树形数据
+ ///
+ /// 公司数据列表
+ ///
+ IEnumerable GetTree(IEnumerable typelist);
#endregion
#region 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageService.cs
index 3debe49e9..27f900fc9 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectTypeManage/ProjectTypeManageService.cs
@@ -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
}
}
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable 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(strSql.ToString(), dp);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
///
/// 获取ProjectTypeManage表实体数据
///