From 04ffb4c9c84a40a4467bf3b1e16fa08529ec81e5 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 5 Jul 2021 18:13:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=83=85=E5=86=B5=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectProcessManageController.cs | 140 ++++++++++++ .../Views/ProjectProcessManage/Form.cshtml | 23 ++ .../Views/ProjectProcessManage/Form.js | 86 +++++++ .../Views/ProjectProcessManage/Index.cshtml | 36 +++ .../Views/ProjectProcessManage/Index.js | 117 ++++++++++ .../ProjectProcessManage/IndexData.cshtml | 53 +++++ .../Views/ProjectProcessManage/IndexData.js | 160 +++++++++++++ .../Learun.Application.Web.csproj | 7 + .../Learun.Application.Mapping.csproj | 1 + .../ProjectProcessManageMap.cs | 29 +++ .../Learun.Application.TwoDevelopment.csproj | 4 + .../ProjectProcessManageBLL.cs | 150 ++++++++++++ .../ProjectProcessManageEntity.cs | 77 +++++++ .../ProjectProcessManageIBLL.cs | 49 ++++ .../ProjectProcessManageService.cs | 215 ++++++++++++++++++ 15 files changed, 1147 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectProcessManageController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/ProjectProcessManageMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectProcessManage/ProjectProcessManageService.cs 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 + + } +} From 95a3c7bb9cd6ad5032eba0ade83961cd64f12f02 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 6 Jul 2021 11:21:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectDataManageController.cs | 18 +++ .../Views/ProjectDataManage/FormView.cshtml | 35 +++++ .../Views/ProjectDataManage/FormView.js | 119 +++++++++++++++++ .../Views/ProjectDataManage/IndexData.cshtml | 1 + .../Views/ProjectDataManage/IndexData.js | 21 ++- .../Views/ProjectDataManage/IndexView.cshtml | 53 ++++++++ .../Views/ProjectDataManage/IndexView.js | 121 ++++++++++++++++++ .../Views/ProjectManage/Index.cshtml | 1 + .../Views/ProjectManage/Index.js | 15 ++- .../Views/ProjectProcessManage/IndexData.js | 4 + .../Learun.Application.Web.csproj | 4 + .../ProjectDataManageService.cs | 24 ++-- 12 files changed, 402 insertions(+), 14 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/FormView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/FormView.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexView.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs index 735c2f187..6eef3b817 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs @@ -47,7 +47,25 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { return View(); } + /// + /// 项目资料查看 + /// + /// + [HttpGet] + public ActionResult IndexView() + { + return View(); + } + /// + /// 项目资料查看 + /// + /// + [HttpGet] + public ActionResult FormView() + { + return View(); + } #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/FormView.cshtml new file mode 100644 index 000000000..62abeb4a9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/FormView.cshtml @@ -0,0 +1,35 @@ +@{ + ViewBag.Title = "项目资料管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
项目*
+
+
+
+
项目阶段*
+
+
+
+
项目资料名称*
+ +
+
+
资料文件
+
+
+
+
负责部门
+
+
+
+
负责人
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectDataManage/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/FormView.js new file mode 100644 index 000000000..1a75e92ef --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/FormView.js @@ -0,0 +1,119 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-21 15:49 + * 描 述:项目资料管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var PPId = request("PPId");//项目阶段id +var PId = request("PId");//项目Id +var type = request("type");//项目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); + } + $('#Files').lrUploader(); + $('#DepartmentId').lrDataSourceSelect({ + code: 'classdata', + value: 'id', + text: 'name', + select: function (item) { + var DeptCode = $('#DepartmentId').lrselectGet(); + if (DeptCode != null && DeptCode != "" && DeptCode != undefined) { + $('#ManagerId').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=BaseUser', + value: 'f_userid', + text: 'f_realname', + param: { strWhere: " 1=1 and f_departmentid in ('" + DeptCode + "')" }, + maxHeight: 200, + }); + } + } + }); + $('#ManagerId').lrselect({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=BaseUser', + value: 'f_userid', + text: 'f_realname', + param: { strWhere: " 1=2 " }, + maxHeight: 200, + }); + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + + }); + } + } + }; + //// 保存数据 + //acceptClick = function (callBack) { + // if (!$('body').lrValidform()) { + // return false; + // } + // var postData = { + // strEntity: JSON.stringify($('body').lrGetFormData()) + // }; + // if (type == 2) { + // $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/SaveData?keyValue=' + keyValue, postData, function (res) { + // // 保存成功后才回调 + // if (!!callBack) { + // callBack(); + // } + // }); + // } else { + // $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/SaveForm?keyValue=' + keyValue, postData, function (res) { + // // 保存成功后才回调 + // if (!!callBack) { + // callBack(); + // } + // }); + // } + //}; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.cshtml index 09e668ffb..b5acd318c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.cshtml @@ -43,6 +43,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js index 6fcfe9cba..84e7b2129 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js @@ -29,6 +29,10 @@ var bootstrap = function ($, learun) { $('#lr_data').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 1) { + return learun.alert.warning('只有进行中状态才可以上传!'); + } learun.layerForm({ id: 'ProjectDataManageIndex', title: '项目资料管理', @@ -42,6 +46,21 @@ var bootstrap = function ($, learun) { }); } }); + //查看项目资料 + $('#lr_dataview').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'ProjectDataManageIndex', + title: '项目资料查看', + url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/IndexView?PId=' + keyValue, + width: 1000, + height: 800, + btn: null + + }); + } + }); }, inittree: function () { // 初始化左侧树形数据 @@ -175,7 +194,7 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; param.PTId = PTId; - param.SqlParameter = " and [Status]=1"; + //param.SqlParameter = " and [Status]=1"; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexView.cshtml new file mode 100644 index 000000000..461e076f6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexView.cshtml @@ -0,0 +1,53 @@ +@{ + /**/ + + ViewBag.Title = "项目资料管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
阶段
+
+
+
+
+
+
+ 未选择阶段 - 列表信息 +
+
+
+
+
+
+
+
资料名称
+ +
+
+
负责部门
+
+
+
+
负责人
+
+
+
+
+
+
+
+
+ +
+
+  查看 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectDataManage/IndexView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexView.js new file mode 100644 index 000000000..b5d443e1d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexView.js @@ -0,0 +1,121 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-21 15:49 + * 描 述:项目资料管理 + */ +var refreshGirdData; +var acceptClick; +var PPId; +var PId = request("PId");//项目Id +var type = request("type");//type==2,上传项目资料 +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_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'ProjectDataManageform', + title: '查看', + url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/FormView?keyValue=' + keyValue, + width: 800, + height: 600, + btn: null + }); + } + }); + }, + inittree: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetTree', + nodeClick: page.treeNodeClick + }); + }, + treeNodeClick: function (item) { + PPId = item.id; + $('#titleinfo').text(item.text); + page.search(); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/GetPageList', + headData: [ + { label: "项目资料名称", name: "Name", width: 200, align: "left" }, + { + label: "负责部门", name: "DepartmentId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "负责人", name: "ManagerId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { + label: "是否上传", name: "FileStatus", width: 130, align: "left", + formatter: function (value) { + return value == '1' ? '' : ''; + } + }, + { label: "上传时间", name: "FileTime", width: 130, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'Id', + isPage: true, + sidx: 'CreateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.PPId = PPId; + 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/ProjectManage/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml index 2562a0618..8147f8af3 100644 --- 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 @@ -50,6 +50,7 @@   设置上传项目资料   审核   去审 +   归档 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 index 49bd5c2fe..32a67074e 100644 --- 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 @@ -104,6 +104,19 @@ var bootstrap = function ($, learun) { }); } }); + // 归档,将状态改为2 + $('#lr_file').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认归档该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/LogisticsManagement/ProjectManage/UpdateStatus', { keyValue: keyValue, Status: 2 }, function () { + refreshGirdData(); + }); + } + }); + } + }); //设置上传项目资料 $('#lr_data').on('click', function () { @@ -175,7 +188,7 @@ var bootstrap = function ($, learun) { } else if (value == 1) { return '进行中'; } else if (value == 2) { - return '完成'; + return '已完成'; } } }, 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 index bae13f704..94b0a42ea 100644 --- 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 @@ -29,6 +29,10 @@ var bootstrap = function ($, learun) { $('#lr_data').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 1) { + return learun.alert.warning('只有进行中状态才可填写!'); + } learun.layerForm({ id: 'ProjectDataManageIndex', title: '项目进展情况管理', 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 de0bb39ef..d185c4128 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 @@ -1207,7 +1207,9 @@ + + @@ -7366,6 +7368,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs index c1af6086c..49d823f51 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs @@ -197,18 +197,18 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement { entity.Modify(keyValue); db.Update(entity); - if (!string.IsNullOrEmpty(entity.Files)) - { - //判断当前项目各阶段是否已全部上传 - var list = db.FindList(x => x.PId == entity.PId && !string.IsNullOrEmpty(x.Files) && x.Id != keyValue); - if (list.Count() <= 0) - { - //如果全部已上传,将项目状态改为已完成 - var projectManageEntity = db.FindEntity(x => x.Id == entity.PId); - projectManageEntity.Status = "2"; - db.Update(projectManageEntity); - } - } + //if (!string.IsNullOrEmpty(entity.Files)) + //{ + // //判断当前项目各阶段是否已全部上传 + // var list = db.FindList(x => x.PId == entity.PId && !string.IsNullOrEmpty(x.Files) && x.Id != keyValue); + // if (list.Count() <= 0) + // { + // //如果全部已上传,将项目状态改为已完成 + // var projectManageEntity = db.FindEntity(x => x.Id == entity.PId); + // projectManageEntity.Status = "2"; + // db.Update(projectManageEntity); + // } + //} } else From 02de75bdded6cea36ab763453898c1792f3dc1ed Mon Sep 17 00:00:00 2001 From: liangkun Date: Tue, 6 Jul 2021 14:36:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E4=BA=BA=E5=A2=9E=E5=8A=A0=E9=83=A8=E9=97=A8=E8=B4=9F?= =?UTF-8?q?=E8=B4=A3=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/NWFScheme/NodeForm.cshtml | 1 + .../Views/NWFScheme/NodeForm.js | 16 ++ .../Process/NWFProcessBLL.cs | 212 ++++++++++++------ 3 files changed, 165 insertions(+), 64 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml index c9e4f65f6..beebc1a61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml @@ -199,6 +199,7 @@  添加节点执行人  添加表字段  添加分管校长 +  添加部门负责人  移除 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js index b03b2762c..17c49f579 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js @@ -185,6 +185,9 @@ var bootstrap = function ($, learun) { case '7': return '分管校长'; break; + case '8': + return '部门负责人'; + break; } } }, @@ -350,6 +353,19 @@ var bootstrap = function ($, learun) { } }); }); + //添加部门负责人 + $('#lr_form_deptmaster').on('click', function () { + learun.layerConfirm('是否确认增加部门负责人?', function (res) { + if (res) { + var data = { auditorId: 'bmfzrid', type: '8', auditorName: '部门负责人' }; + if (!isRepeat(data.auditorId)) { + data.id = learun.newGuid(); + auditors.push(data); + $('#auditor_girdtable').jfGridSet('refreshdata', auditors); + } + } + }); + }); /*表单添加*/ $('#workform_girdtable').jfGrid({ diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs index 32901ca50..bd0438667 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs @@ -534,7 +534,7 @@ namespace Learun.Application.WorkFlow foreach (var item in nodeAuditorList) { switch (item.type)//1.岗位2.角色3.用户4.上下级5.表单指定字段6.某一个节点执行人 - //liang 20200813 新增type=7 分管校长 + //liang 20200813 新增type=7 分管校长 20210706增加部门负责人type=8 { case 1:// 岗位 var userRelationList = userRelationIBLL.GetUserIdList(item.auditorId); @@ -547,17 +547,35 @@ namespace Learun.Application.WorkFlow { if (userEntity.F_DepartmentId == paramConfig.CreateUser.DepartmentId) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } else if (item.condition == 2) { if (userEntity.F_CompanyId == paramConfig.CreateUser.CompanyId) + { + if (!list.Exists(m => m.Id == userEntity.F_UserId)) + { + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } + } + } + else + { + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { list.Add(new NWFUserInfo() { @@ -567,15 +585,6 @@ namespace Learun.Application.WorkFlow }); } } - else - { - list.Add(new NWFUserInfo() - { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); - } } } break; @@ -591,24 +600,30 @@ namespace Learun.Application.WorkFlow { if (userEntity.F_DepartmentId == paramConfig.CreateUser.DepartmentId) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } else if (item.condition == 2) { if (userEntity.F_CompanyId == paramConfig.CreateUser.CompanyId) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } else if (item.condition == 3) // 需要存在上级关系 @@ -619,12 +634,15 @@ namespace Learun.Application.WorkFlow if (postIBLL.IsUp(postList1, postList2)) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } else if (item.condition == 4) // 需要存在下级关系 @@ -634,6 +652,21 @@ namespace Learun.Application.WorkFlow var postList2 = userRelationIBLL.GetObjectIds(userEntity.F_UserId, 2);// 节点审核人岗位 if (postIBLL.IsDown(postList1, postList2)) + { + if (!list.Exists(m => m.Id == userEntity.F_UserId)) + { + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } + } + } + else + { + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { list.Add(new NWFUserInfo() { @@ -643,15 +676,6 @@ namespace Learun.Application.WorkFlow }); } } - else - { - list.Add(new NWFUserInfo() - { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); - } } } break; @@ -664,12 +688,15 @@ namespace Learun.Application.WorkFlow var userEntity3 = userIBLL.GetEntityByUserId(userItem); if (userEntity3 != null) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity3.F_UserId)) { - Id = userEntity3.F_UserId, - Account = userEntity3.F_Account, - Name = userEntity3.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity3.F_UserId, + Account = userEntity3.F_Account, + Name = userEntity3.F_RealName + }); + } } } } @@ -695,12 +722,15 @@ namespace Learun.Application.WorkFlow var userEntity = userIBLL.GetEntityByUserId(userRelationItem.F_UserId); if (userEntity != null) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } break; @@ -723,12 +753,15 @@ namespace Learun.Application.WorkFlow var userEntity5 = userIBLL.GetEntityByUserId(row[0].ToString()); if (userEntity5 != null) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity5.F_UserId)) { - Id = userEntity5.F_UserId, - Account = userEntity5.F_Account, - Name = userEntity5.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity5.F_UserId, + Account = userEntity5.F_Account, + Name = userEntity5.F_RealName + }); + } } } } @@ -741,12 +774,15 @@ namespace Learun.Application.WorkFlow var userEntity6 = userIBLL.GetEntityByUserId(task.F_CreateUserId); if (userEntity6 != null) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity6.F_UserId)) { - Id = userEntity6.F_UserId, - Account = userEntity6.F_Account, - Name = userEntity6.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity6.F_UserId, + Account = userEntity6.F_Account, + Name = userEntity6.F_RealName + }); + } } } break; @@ -782,12 +818,60 @@ namespace Learun.Application.WorkFlow if (null != userEntity7) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity7.F_UserId)) { - Id = userEntity7.F_UserId, - Account = userEntity7.F_Account, - Name = userEntity7.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity7.F_UserId, + Account = userEntity7.F_Account, + Name = userEntity7.F_RealName + }); + } + } + } + break; + case 8://liang 20210706新增部门负责人判断 + //获取流程创建用户的分管领导 + //判断用户所在部门是否有上级部门:如果有,找到上级部门的负责人;如果没有,找本部门的分管校长; + string deptMasterId = ""; + var selfDepart2 = departmentIBLL.GetEntity(paramConfig.CreateUser.DepartmentId); + if (selfDepart2 != null) + { + //本部门存在部门负责人 + if (!string.IsNullOrEmpty(selfDepart2.F_Manager)) + { + deptMasterId = selfDepart2.F_Manager; + } + else + { + //本部门不存在就找上级部门 + var parentDepart = departmentIBLL.GetEntity(selfDepart2.F_ParentId); + if (parentDepart != null) + { + if (!string.IsNullOrEmpty(selfDepart2.F_Manager)) + { + deptMasterId = parentDepart.F_Manager; + } + } + } + } + //找到部门负责人就增加审批人 + if (!string.IsNullOrEmpty(deptMasterId)) + { + var userEntity7 = userIBLL.GetEntityByUserId(deptMasterId); + + if (null != userEntity7) + { + if (!list.Exists(m => m.Id == userEntity7.F_UserId)) + { + list.Add(new NWFUserInfo() + { + Id = userEntity7.F_UserId, + Account = userEntity7.F_Account, + Name = userEntity7.F_RealName + }); + } + } }