From f1c5354c5dd7c925cea4101ec432d47e16170fd1 Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Wed, 11 Nov 2020 17:57:23 +0800 Subject: [PATCH 1/5] bug --- .../Areas/LR_OAModule/Controllers/NoticeController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs index 58e0cc085..cbfd94505 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs @@ -188,7 +188,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers var userinfo = LoginUserInfo.Get(); Pagination paginationobj = new Pagination(); var newsList = noticeIBLL.GetList(keyword, userinfo.userId, categoryId). - Select(a => a.F_Status == "2"); + Where(a => a.F_Status == "2"); var newsListOfSelf = new List(); foreach (var newsitemEntity in newsList) From 423a3ccfe03edef3a9bd823f49dbcfcae9991e8f Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 12 Nov 2020 17:18:36 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=8B=9B=E7=94=9F=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=AF=BC=E5=87=BA=E6=8A=A5=E9=94=99=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EducationalAdministration/Views/StuInfoFresh/StatusView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatusView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatusView.js index 8e9c101cd..29aaae063 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatusView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatusView.js @@ -260,7 +260,7 @@ var bootstrap = function ($, learun) { { label: '综合', name: 'ComprehensiveScore', width: 100, align: "left" }, { label: '出生日期', name: 'Birthday', width: 100, align: "left", formatter: function (val) { - if (val.length > 0) { + if (val!=undefined&&val.length > 0) { return val.substring(0, 10); } } From 1c8e2e114fc9a41915a178d292d7438dcd371c5d Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Fri, 13 Nov 2020 09:18:08 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=9B=91=E6=8E=A7=20?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=8E=BB=E9=99=A4=E5=8A=9B=E8=BD=AF=E7=9A=84?= =?UTF-8?q?=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Web/Views/Shared/_WorkFlowNewForm.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_WorkFlowNewForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_WorkFlowNewForm.cshtml index 8f4c7d5d7..db2163183 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_WorkFlowNewForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Shared/_WorkFlowNewForm.cshtml @@ -8,7 +8,7 @@ - @ViewBag.Title|力软信息|快速开发平台|Learun敏捷开发框架 + @ViewBag.Title From b153fb5039dc0dc6905b29bd765f037130e095f6 Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Fri, 13 Nov 2020 10:44:00 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E8=B0=83=E6=8B=A8?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=9F=A5=E7=9C=8B=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8E=9F=E5=8D=95=E4=BD=8D=EF=BC=8C=20=E6=96=B0=E5=8D=95?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Ass_AssetsOutApply/FormView.js | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js index f29097166..7820ea663 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js @@ -78,6 +78,84 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "使用人", name: "AOIUserPeople", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { + label: "原部门", name: "AOIOldDepartment", 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: "AOIStorageId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + }, + { + label: "新使用人", name: "AOINewUsePeople", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { + label: "新部门", name: "AOINewDepartment", 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: "AOINewStorageId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + }, { label: '英文名称', name: 'AOIEName', width: 100, align: 'left' }, From 1c4307844e992d37ad7d6542cfb4a62ca61ed4f7 Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Wed, 18 Nov 2020 16:00:09 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ass_AcceptanceController.cs | 159 ++++++++++++ .../Views/Ass_Acceptance/Form.cshtml | 55 ++++ .../Views/Ass_Acceptance/Form.js | 182 ++++++++++++++ .../Views/Ass_Acceptance/Index.cshtml | 54 ++++ .../Views/Ass_Acceptance/Index.js | 211 ++++++++++++++++ .../Views/Ass_Acceptance/ViewForm.cshtml | 51 ++++ .../Views/Ass_Acceptance/ViewForm.js | 115 +++++++++ .../Views/EmpInfo/Index.cshtml | 20 +- .../Views/EmpInfo/Index.js | 32 +-- .../Views/EmpInfoEnternal/FormAdd.cshtml | 17 +- .../Learun.Application.Web.csproj | 11 + .../XmlConfig/ioc.config | 2 + .../Ass_AcceptanceMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../Ass_Acceptance/Ass_AcceptanceBLL.cs | 186 ++++++++++++++ .../Ass_Acceptance/Ass_AcceptanceEntity.cs | 110 ++++++++ .../Ass_Acceptance/Ass_AcceptanceIBLL.cs | 57 +++++ .../Ass_Acceptance/Ass_AcceptanceService.cs | 234 ++++++++++++++++++ .../EmpInfo/EmpInfoService.cs | 20 ++ .../Learun.Application.TwoDevelopment.csproj | 4 + .../Learun.Application.WorkFlow.csproj | 1 + .../NodeMethod/Ass_AcceptanceMethod.cs | 27 ++ 22 files changed, 1540 insertions(+), 38 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AcceptanceController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/ViewForm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/ViewForm.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_AcceptanceMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceService.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_AcceptanceMethod.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AcceptanceController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AcceptanceController.cs new file mode 100644 index 000000000..a3e53994a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AcceptanceController.cs @@ -0,0 +1,159 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.AssetManagementSystem; +using System.Web.Mvc; +using Learun.Application.TwoDevelopment.LR_CodeDemo; +using System.Collections.Generic; +using Learun.Application.Base.SystemModule; + +namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-18 10:46 + /// 描 述:资产验收 + /// + public class Ass_AcceptanceController : MvcControllerBase + { + private Ass_AcceptanceIBLL ass_AcceptanceIBLL = new Ass_AcceptanceBLL(); + private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult ViewForm() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = ass_AcceptanceIBLL.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 Ass_AcceptanceData = ass_AcceptanceIBLL.GetAss_AcceptanceEntity( keyValue ); + var jsonData = new { + Ass_Acceptance = Ass_AcceptanceData, + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 流程实例主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataByProcessId(string processId) + { + var Ass_AcceptanceData = ass_AcceptanceIBLL.GetEntityByProcessId( processId ); + var jsonData = new { + Ass_Acceptance = Ass_AcceptanceData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ChangeStatusById(string keyValue, string processId) + { + ass_AcceptanceIBLL.ChangeStatusById(keyValue, 1, processId); + return Success("操作成功!"); + } + + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + ass_AcceptanceIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Ass_AcceptanceEntity entity = strEntity.ToObject(); + ass_AcceptanceIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.cshtml new file mode 100644 index 000000000..00badca1b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.cshtml @@ -0,0 +1,55 @@ +@{ + ViewBag.Title = "资产验收"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
选择已登记资产
+
+
+
+
设备名称
+ +
+
+
品牌
+ +
+
+
规格型号
+ +
+
+
单位
+ +
+
+
数量
+ +
+
+
单价
+ +
+
+
总价
+ +
+
+
使用部门
+
+
+
+
使用人
+
+
+
+
放置地点
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js new file mode 100644 index 000000000..2d9d0e4b5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js @@ -0,0 +1,182 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-11-18 10:46 + * 描 述:资产验收 + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#DepartmentId').lrselect({ + type: 'tree', + allowSearch: true, + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', + param: {}, + select: function (val) { + console.log(val.value); + $('#UserID').lrselectRefresh({ url: '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + val.value }); + } + }); + $('#UserID').lrselect({ text: 'F_RealName', value: 'F_UserId' }); + + + $("#AAOldCode").lrlayerselect({ + treeUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetAllTree', + treeParentId: 'atptid', + treeValueId: 'atid', + treeTextId: 'aname', + dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetList', + dataTreeId: 'ATId', + dataValueId: 'AId', + dataTextId: 'AName', + + grid: [ + { label: '资产编号', name: 'ACode', width: 200, align: 'left' }, + { label: '资产名称', name: 'AName', width: 200, align: 'left' }, + { label: "英文名称", name: "AEName", width: 200, align: "left" }, + { label: "资产型号", name: "AModel", width: 200, align: "left" }, + { label: "生产厂家", name: "AManufacturer", width: 200, align: "left" }, + { + label: "供应商", name: "ASupplierId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + } + ], + select: function (values, texts) { + if (values && values.length > 0) { + //绑定 + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) { + data = data.Ass_AssetsInfo; + $('#Name').val(data.AName);//设备名称 + $('#AAIUnit').lrselectSet(data.AUnit);//单位 + $('#Model').val(data.AModel);//规格型号 + $('#AAIManufacturer').val(data.AManufacturer);//品牌 + $('#Price').val(data.APrice)//单价 + }); + } + }, + unknowselect: function () { + $("#AAOldCode").find('span').text(""); + $('#Name').val("");//设备名称 + $('#Model').val("");//规格型号 + $('#AAIManufacturer').val("");//品牌 + }, + isMultiple: false + }); + + $('#Stock').bind('change', function () { + var stock = $(this).val(); + var price = $('#Price').val(); + $('#TotalPrice').val(stock * price); + + }) + $('#Price').bind('change', function () { + var stock = $('#Stock').val(); + var price = $(this).val(); + $('#TotalPrice').val(stock * price); + + }) + + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/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]); + } + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'Ass_Acceptance' && data[id]) { + keyValue = data[id].ID; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.ProcessId = processId; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.cshtml new file mode 100644 index 000000000..3c5c12f2e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.cshtml @@ -0,0 +1,54 @@ +@{ + ViewBag.Title = "资产验收"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
设备名称
+ +
+
+
使用部门
+
+
+
+
使用人
+
+
+
+
放置地点
+ +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js new file mode 100644 index 000000000..ca30956a0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js @@ -0,0 +1,211 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-11-18 10:46 + * 描 述:资产验收 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#DepartmentId').lrDepartmentSelect(); + $('#User').lrDataItemSelect({ code: '' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/Form', + width: 600, + height: 400, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function() { + page.search(); + }); + } + return res; + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var SendFlag = $('#gridtable').jfGridValue('Status'); + if (SendFlag) { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '查看', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/ViewForm?keyValue=' + keyValue, + width: 600, + height: 400, + btn:null + }); + } + }); + + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var SendFlag = $('#gridtable').jfGridValue('Status'); + if (SendFlag) { + learun.alert.warning("当前项目已提交不能不能删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + + //  提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var SendFlag = $('#gridtable').jfGridValue('Status'); + if (SendFlag) { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/GetPageList', + headData: [ + { label: "设备名称", name: "Name", width: 100, align: "left"}, + { label: "品牌", name: "Manufacturer", width: 100, align: "left"}, + { label: "规格型号", name: "Model", width: 100, align: "left"}, + { label: "单位", name: "Unit", width: 100, align: "left"}, + { label: "数量", name: "Stock", width: 100, align: "left"}, + { label: "单价", name: "Price", width: 100, align: "left"}, + { label: "总价", name: "TotalPrice", width: 100, align: "left"}, + { label: "使用部门", name: "DepartmentId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('department', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + }}, + { label: "使用人", name: "UserID", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsyncReal('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + }}, + { label: "放置地点", name: "Place", width: 100, align: "left" }, + { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === '1') { + return '审批中'; + } else if (cellvalue === '2') { + return '已审核'; + } else { + return '草稿'; + } + } + }, + { label: "备注", name: "Remark", width: 100, align: "left"}, + ], + mainId:'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (!!res) + { + if (res.code == 200) + { + // 发起流程 + var postData = { + schemeCode:'ASS_zcys',// 填写流程对应模板编号 + processId:processId, + level:'1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) { + learun.loading(false); + }); + } + page.search(); + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/ViewForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/ViewForm.cshtml new file mode 100644 index 000000000..360ee6818 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/ViewForm.cshtml @@ -0,0 +1,51 @@ +@{ + ViewBag.Title = "资产验收"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
设备名称
+ +
+
+
品牌
+ +
+
+
规格型号
+ +
+
+
单位
+ +
+
+
数量
+ +
+
+
单价
+ +
+
+
总价
+ +
+
+
使用部门
+
+
+
+
使用人
+
+
+
+
放置地点
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/ViewForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/ViewForm.js new file mode 100644 index 000000000..ffa4a859a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/ViewForm.js @@ -0,0 +1,115 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-11-18 10:46 + * 描 述:资产验收 + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if(!!data) + { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#DepartmentId').lrselect({ + type: 'tree', + allowSearch: true, + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', + param: {}, + select:function(val) { + console.log(val.value); + $('#UserID').lrselectRefresh({ url: '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + val.value }); + } + }); + $('#UserID').lrselect({ text: 'F_RealName', value:'F_UserId'}); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/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]); + } + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId,param,callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + if(id == 'Ass_Acceptance' && data[id] ){ + keyValue = data[id].ID; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if(!!processId){ + formData.ProcessId =processId; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml index 9d3b55825..1bd11e5ed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml @@ -26,25 +26,25 @@
系部
-
-
校区
-
-
部门
-
户籍省份
-
+
民族
+
+
+
+
性别
+
-
户籍地市
-
+
学位
+
-
户籍县区
-
+
职称
+
政治面貌
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js index dd35c99f9..20578acca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js @@ -47,28 +47,20 @@ var bootstrap = function ($, learun) { } }); $('#RegionNo').lrselect(); - //校区 - $('#F_CompanyId').lrDataSourceSelect({ - code: 'company', value: 'f_companyid', text: 'f_fullname', - select: function (item) { - if (!!item) { - // 部门 - $('#F_DepartmentId').lrselectRefresh({ - type: 'tree', - // 是否允许搜索 - allowSearch: true, - // 访问数据接口地址 - url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', - // 访问数据接口参数 - param: { companyId: item.f_companyid, parentId: '0' } - }); - } - } - }); //政治面貌 $('#PartyFaceNo').lrDataSourceSelect({ code: 'BCdPartyFace', value: 'partyfaceno', text: 'partyface' }); //文化程度 $('#CultureDegreeNo').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); + + + //民族 + $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); + //性别 + $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); + //学位 + $('#DegreeNo').lrDataSourceSelect({ code: 'BCdDegree', value: 'degreeno', text: 'degreename' }); + //职称 + $('#ProfessionalTitle').lrDataItemSelect({ code: 'jszc' }); // 部门选择 $('#F_DepartmentId').lrselect(); // 刷新 @@ -137,7 +129,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'formView', title: '查看', - url: top.$.rootUrl + '/EducationalAdministration/EmpInfo/Form?keyValue=' + keyValue+'&isView='+true, + url: top.$.rootUrl + '/EducationalAdministration/EmpInfo/Form?keyValue=' + keyValue + '&isView=' + true, width: 1162, height: 600, btn: null @@ -552,7 +544,7 @@ var bootstrap = function ($, learun) { } }, { - label: "聘任职称", name: "TitleOfTechPostNo", width: 100, align: "left", + label: "岗位名称", name: "TitleOfTechPostNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdTitleOfTechPost', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfoEnternal/FormAdd.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfoEnternal/FormAdd.cshtml index e4d38c31f..f21e7877b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfoEnternal/FormAdd.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfoEnternal/FormAdd.cshtml @@ -11,9 +11,9 @@ - 数字化校园-宿舍 - - + 数字化校园-教师注册 + + @@ -34,10 +34,10 @@
- @*
+
* 职工编号 -
*@ +
* 姓名 @@ -197,8 +197,10 @@ cache: false, success: function (data) { console.log(data); - //layer.msg("注册成功"); - //alert("注册成功"); + layer.msg("注册成功"); + alert("注册成功"); + //location.reload(); + location.href = "/home/index"; }, error: function (XMLHttpRequest, textStatus, errorThrown) { }, @@ -209,7 +211,6 @@ }); return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 - //location.href = "/home/index"; }); var laydate = layui.laydate; 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 b150c9105..a3415120e 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 @@ -787,6 +787,7 @@ + @@ -812,6 +813,9 @@ + + + @@ -6090,6 +6094,10 @@ + + + + @@ -6848,6 +6856,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config index 4b8f5507c..3c4767d8d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -26,6 +26,7 @@ + @@ -62,6 +63,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_AcceptanceMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_AcceptanceMap.cs new file mode 100644 index 000000000..56e7fde37 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_AcceptanceMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.AssetManagementSystem; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-18 10:46 + /// 描 述:资产验收 + /// + public class Ass_AcceptanceMap : EntityTypeConfiguration + { + public Ass_AcceptanceMap() + { + #region 表、主键 + //表 + this.ToTable("ASS_ACCEPTANCE"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + 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 09055b97c..f4414eda3 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 @@ -539,6 +539,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceBLL.cs new file mode 100644 index 000000000..01a5e4988 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceBLL.cs @@ -0,0 +1,186 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-18 10:46 + /// 描 述:资产验收 + /// + public class Ass_AcceptanceBLL : Ass_AcceptanceIBLL + { + private Ass_AcceptanceService ass_AcceptanceService = new Ass_AcceptanceService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return ass_AcceptanceService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Ass_Acceptance表实体数据 + /// + /// 主键 + /// + public Ass_AcceptanceEntity GetAss_AcceptanceEntity(string keyValue) + { + try + { + return ass_AcceptanceService.GetAss_AcceptanceEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public Ass_AcceptanceEntity GetEntityByProcessId(string processId) + { + try + { + return ass_AcceptanceService.GetEntityByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + ass_AcceptanceService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, Ass_AcceptanceEntity entity) + { + try + { + ass_AcceptanceService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void ChangeStatusById(string keyValue, int i, string processId) + { + try + { + ass_AcceptanceService.ChangeStatusById(keyValue, i, processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void ChangeStatusByProcessId(string parameterProcessId, int p1) + { + try + { + ass_AcceptanceService.ChangeStatusByProcessId(parameterProcessId, p1); + } + 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/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceEntity.cs new file mode 100644 index 000000000..a97b6ec04 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceEntity.cs @@ -0,0 +1,110 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-18 10:46 + /// 描 述:资产验收 + /// + public class Ass_AcceptanceEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 设备名称 + /// + [Column("NAME")] + public string Name { get; set; } + /// + /// 品牌 + /// + [Column("MANUFACTURER")] + public string Manufacturer { get; set; } + /// + /// 规格型号 + /// + [Column("MODEL")] + public string Model { get; set; } + /// + /// 单位 + /// + [Column("UNIT")] + public string Unit { get; set; } + /// + /// 数量 + /// + [Column("STOCK")] + public int? Stock { get; set; } + /// + /// 单价 + /// + [Column("PRICE")] + public decimal? Price { get; set; } + /// + /// 总价 + /// + [Column("TOTALPRICE")] + public decimal? TotalPrice { get; set; } + /// + /// 使用部门 + /// + [Column("DEPARTMENTID")] + public string DepartmentId { get; set; } + /// + /// 放置地点 + /// + [Column("PLACE")] + public string Place { get; set; } + /// + /// 使用人 + /// + [Column("USERID")] + public string UserID { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 流程id + /// + [Column("PROCESSID")] + public string ProcessId { get; set; } + /// + /// 审核状态 + /// + [Column("STATUS")] + public string Status { 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/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceIBLL.cs new file mode 100644 index 000000000..3e5e74da8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceIBLL.cs @@ -0,0 +1,57 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-18 10:46 + /// 描 述:资产验收 + /// + public interface Ass_AcceptanceIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Ass_Acceptance表实体数据 + /// + /// 主键 + /// + Ass_AcceptanceEntity GetAss_AcceptanceEntity(string keyValue); + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + Ass_AcceptanceEntity GetEntityByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, Ass_AcceptanceEntity entity); + #endregion + + void ChangeStatusById(string keyValue, int i, string processId); + void ChangeStatusByProcessId(string parameterProcessId, int p1); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceService.cs new file mode 100644 index 000000000..3234ce66d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceService.cs @@ -0,0 +1,234 @@ +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.AssetManagementSystem +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-11-18 10:46 + /// 描 述:资产验收 + /// + public class Ass_AcceptanceService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ID, + t.Name, + t.Manufacturer, + t.Model, + t.Unit, + t.Stock, + t.Price, + t.TotalPrice, + t.DepartmentId, + t.Place, + t.UserID, + t.Status, + t.Remark + "); + strSql.Append(" FROM Ass_Acceptance 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["UserID"].IsEmpty()) + { + dp.Add("UserID", queryParam["UserID"].ToString(), DbType.String); + strSql.Append(" AND t.UserID = @UserID "); + } + if (!queryParam["Place"].IsEmpty()) + { + dp.Add("Place", "%" + queryParam["Place"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Place Like @Place "); + } + return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Ass_Acceptance表实体数据 + /// + /// 主键 + /// + public Ass_AcceptanceEntity GetAss_AcceptanceEntity(string keyValue) + { + try + { + return this.BaseRepository().FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public Ass_AcceptanceEntity GetEntityByProcessId(string processId) + { + try + { + return this.BaseRepository().FindEntity(t=>t.ProcessId == processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository().Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, Ass_AcceptanceEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + public void ChangeStatusById(string keyValue, int i, string processId) + { + try + { + BaseRepository().ExecuteBySql($"UPDATE dbo.Ass_Acceptance SET Status='{i}',ProcessId='{processId}' WHERE ID='{keyValue}'", null); + } + catch (Exception ex) + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + + public void ChangeStatusByProcessId(string parameterProcessId, int p1) + { + try + { + if (p1 == 2) + { + var entity = this.BaseRepository() + .FindEntity(a => a.ProcessId == parameterProcessId); + if (null != entity) + { + entity.Status = p1.ToString(); + } + + this.BaseRepository().Update(entity); + } + } + catch (Exception ex) + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs index f96b3ac3c..6f1210b30 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs @@ -92,6 +92,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("BCdPartyFace", queryParam["BCdPartyFace"].ToString(), DbType.String); strSql.Append(" AND t.BCdPartyFace = @BCdPartyFace "); } + if (!queryParam["NationalityNo"].IsEmpty())//民族 + { + dp.Add("NationalityNo", queryParam["NationalityNo"].ToString(), DbType.String); + strSql.Append(" AND t.NationalityNo = @NationalityNo "); + } + if (!queryParam["GenderNo"].IsEmpty())//性别 + { + dp.Add("GenderNo", queryParam["GenderNo"].ToString(), DbType.String); + strSql.Append(" AND t.GenderNo = @GenderNo "); + } + if (!queryParam["DegreeNo"].IsEmpty())//学位 + { + dp.Add("DegreeNo", queryParam["DegreeNo"].ToString(), DbType.String); + strSql.Append(" AND t.DegreeNo = @DegreeNo "); + } + if (!queryParam["ProfessionalTitle"].IsEmpty())//职称 + { + dp.Add("ProfessionalTitle", queryParam["ProfessionalTitle"].ToString(), DbType.String); + strSql.Append(" AND t.ProfessionalTitle = @ProfessionalTitle "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) 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 e64c59475..e8424f8eb 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 @@ -1577,6 +1577,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj index 0c4214c8d..f50af7583 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj @@ -95,6 +95,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_AcceptanceMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_AcceptanceMethod.cs new file mode 100644 index 000000000..3624ca804 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_AcceptanceMethod.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Learun.Application.TwoDevelopment.AssetManagementSystem; + +namespace Learun.Application.WorkFlow +{ + public class Ass_AcceptanceMethod : IWorkFlowMethod + { + Ass_AcceptanceIBLL ass_AcceptanceIBLL = new Ass_AcceptanceBLL(); + + + public void Execute(WfMethodParameter parameter) + { + if (parameter.code == "agree") + { + ass_AcceptanceIBLL.ChangeStatusByProcessId(parameter.processId, 2); + } + else + { + ass_AcceptanceIBLL.ChangeStatusByProcessId(parameter.processId, 0); + } + } + } +}