diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectProcessManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectProcessManageController.cs new file mode 100644 index 000000000..d1762e680 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectProcessManageController.cs @@ -0,0 +1,140 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-07-05 15:56 + /// 描 述:项目进展情况 + /// + public class ProjectProcessManageController : MvcControllerBase + { + private ProjectProcessManageIBLL projectProcessManageIBLL = new ProjectProcessManageBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult IndexData() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = projectProcessManageIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = projectProcessManageIBLL.GetList(queryJson); + + return Success(data); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var ProjectProcessManageData = projectProcessManageIBLL.GetProjectProcessManageEntity( keyValue ); + var jsonData = new { + ProjectProcessManage = ProjectProcessManageData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + projectProcessManageIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ProjectProcessManageEntity entity = strEntity.ToObject(); + projectProcessManageIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Form.cshtml new file mode 100644 index 000000000..3ef191134 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Form.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "项目进展情况"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
项目*
+
+
+
+
项目阶段*
+
+
+
+
项目进展情况*
+ +
+
+
时间*
+ +
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectProcessManage/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Form.js new file mode 100644 index 000000000..55db27d7e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Form.js @@ -0,0 +1,86 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-07-05 15:56 + * 描 述:项目进展情况 + */ +var acceptClick; +var keyValue = request('keyValue'); +var PPId = request("PPId");//项目阶段id +var PId = request("PId");//项目Id +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", + }); + if (!!PId) { + $('#PId').lrselectSet(PId); + } + $('#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); + } + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ProjectProcessManage/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]); + } + } + if (data && data.ProjectProcessManage) { + $('#PId').lrselectSet(data.ProjectProcessManage.PId); + $('#PPId').lrselectSet(data.ProjectProcessManage.PPId); + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/ProjectProcessManage/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Index.cshtml new file mode 100644 index 000000000..b89c24753 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Index.cshtml @@ -0,0 +1,36 @@ +@{ + ViewBag.Title = "项目进展情况"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
树形列表
+
+
+
+
+
+
+ 列表信息 +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectProcessManage/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Index.js new file mode 100644 index 000000000..1a9149a12 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Index.js @@ -0,0 +1,117 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-07-05 15:56 + * 描 述:项目进展情况 + */ +var refreshGirdData; +var acceptClick; +var PPId; +var PId = request("PId");//项目Id +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.inittree(); + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + if (!PPId) { + learun.alert.warning('请选择阶段!'); + return false; + } + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LogisticsManagement/ProjectProcessManage/Form?PPId=' + PPId + '&PId=' + PId, + 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/ProjectProcessManage/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/ProjectProcessManage/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectProcessManage/GetPageList', + headData: [ + { label: "项目进展情况", name: "Progress", width: 100, align: "left"}, + { label: "时间", name: "ProcessTime", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + 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(); + }, + search: function (param) { + param = param || {}; + param.PPId = PPId; + param.PId = PId; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + acceptClick = function (callBack) { + if (!!callBack) { + callBack(); + } + learun.layerClose(window.name); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData.cshtml new file mode 100644 index 000000000..38b6aaaf3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData.cshtml @@ -0,0 +1,53 @@ +@{ + /**/ + + ViewBag.Title = "项目进展情况管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
类型
+
+
+
+
+
+
+ 未选择类型 - 列表信息 +
+
+ @*
+
+
+
+
+
项目名称
+ +
+
+
负责部门
+
+
+
+
负责人
+
+
+
+
+
+
*@ + +
+
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData.js new file mode 100644 index 000000000..bae13f704 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData.js @@ -0,0 +1,160 @@ +/* * 版 本 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_data').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'ProjectDataManageIndex', + title: '项目进展情况管理', + url: top.$.rootUrl + '/LogisticsManagement/ProjectProcessManage/Index?PId=' + keyValue, + width: 1000, + height: 800, + btn: ['确定'], + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + 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').jfGrid({ + 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", + formatter: function (value) { + if (value == 0) { + return '草稿'; + } else if (value == 1) { + return '进行中'; + } else if (value == 2) { + return '完成'; + } + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'Id', + isPage: true, + sidx: 'CreateTime desc', + isSubGrid: true, // 是否有子表单 + subGridExpanded: function (subContentId, rowItem) { + var PId = rowItem.Id; + $('#' + subContentId).jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetList', + headData: [ + { name: "Name", width: 150, align: "left" } + ], + mainId: 'Id', + isPage: false, + sidx: 'Sort', + sord: 'ASC', + isSubGrid: true, // 是否有子表单 + subGridExpanded: function (subContentId, rowItem) { + $('#' + subContentId).jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectProcessManage/GetList', + headData: [ + { label: "项目进展情况", name: "Progress", width: 200, align: "left" }, + { + label: "时间", name: "ProcessTime", width: 100, align: "left", + formatter: function (value) { + return learun.formatDate(value, 'yyyy-MM-dd'); + } + } + ], + mainId: 'Id', + isPage: false, + }); + var param; + param = param || {}; + param.PPId = rowItem.Id; + param.PId = PId; + $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }); + var param; + param = param || {}; + //param.BId = rowItem.Id; + $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.PTId = PTId; + //param.SqlParameter = " and [Status]=1"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} 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 38348eff5..de0bb39ef 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 @@ -818,6 +818,7 @@ + @@ -1211,6 +1212,7 @@ + @@ -6514,6 +6516,10 @@ + + + + @@ -7359,6 +7365,7 @@ + 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 ad67236cd..9392cd2d5 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 @@ -574,6 +574,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectProcessManageMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectProcessManageMap.cs new file mode 100644 index 000000000..fec8653d1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectProcessManageMap.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-07-05 15:56 + /// 描 述:项目进展情况 + /// + public class ProjectProcessManageMap : EntityTypeConfiguration + { + public ProjectProcessManageMap() + { + #region 表、主键 + //表 + this.ToTable("PROJECTPROCESSMANAGE"); + //主键 + 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 22ce8b8eb..5f1e90ab3 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 @@ -1713,6 +1713,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageBLL.cs new file mode 100644 index 000000000..05976e391 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageBLL.cs @@ -0,0 +1,150 @@ +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-07-05 15:56 + /// 描 述:项目进展情况 + /// + public class ProjectProcessManageBLL : ProjectProcessManageIBLL + { + private ProjectProcessManageService projectProcessManageService = new ProjectProcessManageService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return projectProcessManageService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return projectProcessManageService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取ProjectProcessManage表实体数据 + /// + /// 主键 + /// + public ProjectProcessManageEntity GetProjectProcessManageEntity(string keyValue) + { + try + { + return projectProcessManageService.GetProjectProcessManageEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + projectProcessManageService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, ProjectProcessManageEntity entity) + { + try + { + projectProcessManageService.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/ProjectProcessManage/ProjectProcessManageEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageEntity.cs new file mode 100644 index 000000000..d7f32ac64 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageEntity.cs @@ -0,0 +1,77 @@ +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-07-05 15:56 + /// 描 述:项目进展情况 + /// + public class ProjectProcessManageEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 项目Id + /// + [Column("PID")] + public string PId { get; set; } + /// + /// 项目阶段Id + /// + [Column("PPID")] + public string PPId { get; set; } + /// + /// 项目进展情况描述 + /// + [Column("PROGRESS")] + public string Progress { get; set; } + /// + /// 时间 + /// + [Column("PROCESSTIME")] + public string ProcessTime { 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(); + this.CreateTime = DateTime.Now; + this.CreateUserId = LoginUserInfo.Get().userId; + } + /// + /// 编辑调用 + /// + /// + 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/ProjectProcessManage/ProjectProcessManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageIBLL.cs new file mode 100644 index 000000000..b7162da99 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageIBLL.cs @@ -0,0 +1,49 @@ +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-07-05 15:56 + /// 描 述:项目进展情况 + /// + public interface ProjectProcessManageIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetList(string queryJson); + /// + /// 获取ProjectProcessManage表实体数据 + /// + /// 主键 + /// + ProjectProcessManageEntity GetProjectProcessManageEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ProjectProcessManageEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageService.cs new file mode 100644 index 000000000..40a7c2331 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageService.cs @@ -0,0 +1,215 @@ +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-07-05 15:56 + /// 描 述:项目进展情况 + /// + public class ProjectProcessManageService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.Id, + t.Progress, + t.ProcessTime + "); + strSql.Append(" FROM ProjectProcessManage t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Progress"].IsEmpty()) + { + dp.Add("Progress", queryParam["Progress"].ToString(), DbType.String); + strSql.Append(" AND t.Progress = @Progress "); + } + 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(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.Id, + t.Progress, + t.ProcessTime + "); + strSql.Append(" FROM ProjectProcessManage t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + 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 "); + } + if (!queryParam["Progress"].IsEmpty()) + { + dp.Add("Progress", queryParam["Progress"].ToString(), DbType.String); + strSql.Append(" AND t.Progress = @Progress "); + } + + strSql.Append(" order by t.ProcessTime desc"); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + /// + /// 获取ProjectProcessManage表实体数据 + /// + /// 主键 + /// + public ProjectProcessManageEntity GetProjectProcessManageEntity(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, ProjectProcessManageEntity 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 + + } +}