From 9c518fdd4eb9ce7ea0bf87a72ac392431b82af2b Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 7 Nov 2024 13:14:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=8C=96=E5=8A=9E=E5=85=AC?= =?UTF-8?q?=E8=AE=BE=E5=A4=87+=E5=9B=BA=E5=AE=9A=E8=B5=84=E4=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/FixedAssetsController.cs | 20 +- .../Controllers/OfficeEquipmentController.cs | 11 +- .../Views/FixedAssets/Form.cshtml | 16 + .../Views/FixedAssets/Form.js | 3 +- .../Views/FixedAssets/Index.cshtml | 25 +- .../Views/FixedAssets/Index.js | 40 +- .../Views/FixedAssets/qrCode.cshtml | 26 + .../Views/FixedAssets/qrCode.js | 82 ++ .../Views/OfficeEquipment/Form.cshtml | 44 +- .../Views/OfficeEquipment/Form.js | 2 + .../Views/OfficeEquipment/Index.cshtml | 30 +- .../Views/OfficeEquipment/Index.js | 37 +- .../Views/OfficeEquipment/IndexMy.cshtml | 66 + .../Views/OfficeEquipment/IndexMy.js | 175 +++ .../Views/OfficeEquipment/qrCode.cshtml | 3 - .../Views/OfficeEquipment/qrCode.js | 10 +- .../Learun.Application.Web.csproj | 7 +- .../Modules/Arrangelesson.cs | 1067 +++++++++-------- .../FixedAssets/FixedAssetsEntity.cs | 22 + .../FixedAssets/FixedAssetsService.cs | 21 +- .../OfficeEquipment/OfficeEquipmentEntity.cs | 31 + .../OfficeEquipment/OfficeEquipmentService.cs | 20 + 22 files changed, 1191 insertions(+), 567 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/qrCode.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/qrCode.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FixedAssetsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FixedAssetsController.cs index 587ffb35e..a1dd5a374 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FixedAssetsController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FixedAssetsController.cs @@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,7 +35,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult qrCode() + { + return View(); } #endregion @@ -71,8 +80,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var FixedAssetsData = fixedAssetsIBLL.GetFixedAssetsEntity( keyValue ); - var jsonData = new { + var FixedAssetsData = fixedAssetsIBLL.GetFixedAssetsEntity(keyValue); + var jsonData = new + { FixedAssets = FixedAssetsData, }; return Success(jsonData); @@ -105,7 +115,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { FixedAssetsEntity entity = strEntity.ToObject(); - fixedAssetsIBLL.SaveEntity(keyValue,entity); + fixedAssetsIBLL.SaveEntity(keyValue, entity); if (string.IsNullOrEmpty(keyValue)) { } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs index 3923bba36..1f5172158 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs @@ -30,6 +30,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult IndexMy() + { + return View(); + } + /// /// 表单页 /// /// @@ -87,7 +96,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers OfficeEquipment = OfficeEquipmentData, }; return Success(jsonData); - } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Form.cshtml index 550be1830..9f90f11ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Form.cshtml @@ -3,10 +3,18 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
+
+
资产类别*
+
+
资产名称*
+
+
资产编号*
+ +
生产厂家*
@@ -15,6 +23,14 @@
品牌
+
+
型号
+ +
+
+
参数
+ +
单位*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Form.js index 806357994..dc7c89a95 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Form.js @@ -20,7 +20,8 @@ var bootstrap = function ($, learun) { $('#UsePeople').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); $('#Registrant').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); $('#Status').lrDataItemSelect({ code: 'NewAssState' }); - }, + $('#Types').lrDataItemSelect({ code: 'NewAssType' }); + }, initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/FixedAssets/GetFormData?keyValue=' + keyValue, function (data) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Index.cshtml index e845b3c90..ae48e4f5c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Index.cshtml @@ -10,15 +10,23 @@
+
+
资产类别
+
+
资产名称
+
+
资产编号
+ +
生产厂家
-
+
存放地址
@@ -26,6 +34,14 @@
品牌
+
+
型号
+ +
+
+
参数
+ +
验收人
@@ -51,10 +67,11 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Index.js index 8ca2fdc4e..13147ee14 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/Index.js @@ -15,10 +15,12 @@ var bootstrap = function ($, learun) { bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); - }, 220, 400); + }, 300, 400); $('#Acceptor').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); $('#UsePeople').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + $('#Registrant').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); $('#Status').lrDataItemSelect({ code: 'NewAssState' }); + $('#Types').lrDataItemSelect({ code: 'NewAssType' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -69,15 +71,49 @@ var bootstrap = function ($, learun) { $('#lr_print').on('click', function () { $('#gridtable').jqprintTable(); }); + // 查看二维码 + $('#lr_qrCode').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formqrCode', + title: '二维码', + url: top.$.rootUrl + '/EducationalAdministration/FixedAssets/qrCode?keyValue=' + keyValue, + width: 600, + height: 500, + btn: null, + end: function () { refreshGirdData(); } + }); + } + }); }, // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/FixedAssets/GetPageList', headData: [ + { + label: "资产类别", name: "Types", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'NewAssType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, { label: "资产名称", name: "AssetsName", width: 200, align: "left" }, + { label: "资产编号", name: "Code", width: 200, align: "left" }, { label: "生产厂家", name: "Manufacturer", width: 120, align: "left" }, { label: "品牌", name: "Brand", width: 120, align: "left" }, + { label: "型号", name: "Model", width: 120, align: "left" }, + { label: "参数", name: "Argument", width: 120, align: "left" }, { label: "单位", name: "Unit", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -118,7 +154,7 @@ var bootstrap = function ($, learun) { } }); } - }, + }, { label: "登记人", name: "Registrant", width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/qrCode.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/qrCode.cshtml new file mode 100644 index 000000000..16acda061 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/qrCode.cshtml @@ -0,0 +1,26 @@ +@{ + ViewBag.Title = "会议管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + + +
+
+
+
+
+
固定资产                                            + 扫码查验
+ +
+ @*
+
固定资产
+
扫码查验
+
*@ + @*
+
+
+
*@ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/FixedAssets/qrCode.js") +@Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js", "/Content/js/qrcode.min.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/qrCode.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/qrCode.js new file mode 100644 index 000000000..330e696d2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FixedAssets/qrCode.js @@ -0,0 +1,82 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-02-21 10:07 + * 描 述:会议管理 + */ +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 () { + $('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_encode', text: 'f_realname' }); + $('#Department').lrselect({ + type: 'tree', + allowSearch: true, + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTreeNoCheck', + param: {}, + }); + }, + initData: function () { + if (!!keyValue) { + //var currentUrl1 = "http://api.cyzjzx.com"; + var currentUrl1 = "http://192.168.10.58:8012"; + //扫码签到 + makeCode(currentUrl1 + '/arrangelesson/getqrcode?keyValue=' + keyValue + '&Types=1'); + } + } + }; + + // 保存数据 + save = function (processId, callBack, i) { + if (!!callBack) { + var res = { + code: 200, data: {} + }; + callBack(res, i); + } + }; + page.init(); +} +//扫码签到 +var qrcode = new QRCode(document.getElementById("qrCode"), { + width: 420, + height: 380 +}); +function makeCode(urls) { + console.log(urls, "urls") + qrcode.makeCode(urls); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml index 7b6c9952c..718ea76fe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml @@ -3,25 +3,49 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
姓名*
+
+
使用管理人*
-
+
部门*
-
-
设备编号*
+
+
资产编号*
-
-
设备名称*
+
+
资产名称*
-
-
配置描述*
- +
+
资产类别*
+
+
+ @*
+
配置描述*
+ +
*@ +
+
品牌
+ +
+
+
型号
+ +
+
+
参数
+ +
+
+
单位*
+
+
+
+
数量*
+
备注
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js index d10c01700..f7d92ac33 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js @@ -22,6 +22,8 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTreeNoCheck', param: {}, }); + $('#Unit').lrDataItemSelect({ code: 'sldw', allowSearch: true }); + $('#Types').lrDataItemSelect({ code: 'NewAssType' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml index 7dd80015d..dedcb9962 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml @@ -10,22 +10,38 @@
-
-
姓名
+
+
使用管理人
-
+
部门
-
-
设备编号
+
+
资产编号
-
-
设备名称
+
+
资产名称
+
+
品牌
+ +
+
+
型号
+ +
+
+
参数
+ +
+
+
资产类别
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js index 746f1466d..50fb60301 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js @@ -18,6 +18,7 @@ var bootstrap = function ($, learun) { }, 220, 400); $('#Name').lrDataSourceSelect({ code: 'TeacherInfo',value: 'f_encode',text: 'f_realname' }); $('#Department').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); + $('#Types').lrDataItemSelect({ code: 'NewAssType' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -98,7 +99,19 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/GetPageList', headData: [ { - label: "姓名", name: "Name", width: 100, align: "left", + label: "资产类别", name: "Types", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'NewAssType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "使用管理人", name: "Name", width: 100, align: "left", formatterAsync: function (callback, value, row, op,$cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', @@ -121,9 +134,25 @@ var bootstrap = function ($, learun) { }); } }, - { label: "设备编号", name: "Code", width: 100, align: "left"}, - { label: "设备名称", name: "DeviceName", width: 100, align: "left"}, - { label: "配置描述", name: "Description", width: 100, align: "left"}, + { label: "资产编号", name: "Code", width: 100, align: "left"}, + { label: "资产名称", name: "DeviceName", width: 100, align: "left"}, + //{ label: "配置描述", name: "Description", width: 100, align: "left" }, + { label: "品牌", name: "Brand", width: 120, align: "left" }, + { label: "型号", name: "Model", width: 120, align: "left" }, + { label: "参数", name: "Argument", width: 120, align: "left" }, + { + label: "单位", name: "Unit", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sldw', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "数量", name: "Nuantity", width: 100, align: "left" }, { label: "备注", name: "Remark", width: 100, align: "left"}, ], mainId:'Id', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.cshtml new file mode 100644 index 000000000..a5f718d8d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "配置描述"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
使用管理人
+
+
+
+
部门
+
+
+
+
资产编号
+ +
+
+
资产名称
+ +
+
+
品牌
+ +
+
+
型号
+ +
+
+
参数
+ +
+
+
资产类别
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js new file mode 100644 index 000000000..000d3ab18 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js @@ -0,0 +1,175 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2024-09-18 10:42 + * 描 述:配置描述 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_encode', text: 'f_realname' }); + $('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); + $('#Types').lrDataItemSelect({ code: 'NewAssType' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/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 + '/EducationalAdministration/OfficeEquipment/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 查看二维码 + $('#lr_qrCode').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formqrCode', + title: '二维码', + url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/qrCode?keyValue=' + keyValue, + width: 600, + height: 500, + btn: null, + end: function () { refreshGirdData(); } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/GetPageList', + headData: [ + { + label: "资产类别", name: "Types", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'NewAssType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "使用管理人", name: "Name", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', + key: value, + keyId: 'f_encode', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { + label: "部门", name: "Department", 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: "Code", width: 100, align: "left" }, + { label: "资产名称", name: "DeviceName", width: 100, align: "left" }, + //{ label: "配置描述", name: "Description", width: 100, align: "left" }, + { label: "品牌", name: "Brand", width: 120, align: "left" }, + { label: "型号", name: "Model", width: 120, align: "left" }, + { label: "参数", name: "Argument", width: 120, align: "left" }, + { + label: "单位", name: "Unit", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sldw', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "数量", name: "Nuantity", width: 100, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'Id', + isPage: true, + isMultiselect: true, + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml index 296a90ca6..1975683d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml @@ -6,9 +6,6 @@ @*
打印
*@ -
@*
姓名*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js index 8063be689..e6fe70cfe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js @@ -50,16 +50,16 @@ var bootstrap = function ($, learun) { param: {}, }); }, - initData: function () { + initData: function () { if (!!keyValue) { - var currentUrl1 = "http://api.cyzjzx.com"; - //var currentUrl1 = "http://192.168.10.58:8012"; + //var currentUrl1 = "http://api.cyzjzx.com"; + var currentUrl1 = "http://192.168.10.58:8012"; //扫码签到 - makeCode(currentUrl1 + '/arrangelesson/getqrcode?keyValue=' + keyValue); + makeCode(currentUrl1 + '/arrangelesson/getqrcode?keyValue=' + keyValue + '&Types=0'); } } }; - + // 保存数据 save = function (processId, callBack, i) { if (!!callBack) { 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 ac92d4e12..551aaa5b2 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 @@ -23,7 +23,8 @@ ..\..\..\ true - false + + @@ -1092,6 +1093,8 @@ + + @@ -1389,6 +1392,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs index b3482d268..0475ba752 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs @@ -1,524 +1,545 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Web; -using Learun.Application.Base.SystemModule; -using Learun.Application.Organization; -using Learun.Application.TwoDevelopment.EducationalAdministration; -using Learun.Util; -using Nancy; - -namespace Learun.Application.WebApi.Modules -{ - public class Arrangelesson : BaseNoAuthentication - { - public Arrangelesson() - : base("/arrangelesson/") - { - Get["/lessontype"] = GetLessonTypes; - Get["/classtype"] = GetClassType; - Get["/student"] = GetStudents; - Get["/lessonsortdetail"] = GetLessonSortDetails; - Get["/lessonsort"] = GetLessonSorts; - Get["/classlesson"] = GetClassLessons; - Get["/bukaolist"] = GetBuKaoList; - //以下接口需要传值学年学期 - Get["/school"] = GetSchools; - Get["/dept"] = GetDepts; - Get["/major"] = GetMajors; - Get["/classroom"] = GetClassrooms; - Get["/lesson"] = GetLessons; - Get["/teacher"] = GetTeachers; - Get["/class"] = GetClasses; - Get["/stu"] = GetStus; - //以下返回全部 - Get["/department"] = GetDepartment; - Get["/allteacher"] = GetAllTeachers; - Get["/allstudent"] = GetAllStudents; - Get["/alldept"] = GetAllDept; - Get["/allmajor"] = GetAllMajor; - Get["/alllesson"] = GetAllLesson; - Get["/allclass"] = GetAllClass; - Get["/alluser"] = GetAllUsers; - Get["/allschool"] = GetAllSchools; - Get["/allclasslesson"] = GetAllClassLesson; - Get["/allelelectivelesson"] = GetAllElectiveLesson; - Get["/allteacheruser"] = GetAllTeachersUsers; - - //以下接口不往ArrangeLessonSync里记录已传数据 - Get["/schoolNotRecord"] = GetSchoolsNotRecord; - Get["/deptNotRecord"] = GetDeptsNotRecord; - Get["/majorNotRecord"] = GetMajorsNotRecord; - Get["/classroomNotRecord"] = GetClassroomsNotRecord; - Get["/lessonNotRecord"] = GetLessonsNotRecord; - Get["/teacherNotRecord"] = GetTeachersNotRecord; - Get["/classNotRecord"] = GetClassesNotRecord; - Get["/stuNotRecord"] = GetStusNotRecord; - Get["trantest"] = TranTest; - //按条件重置基础数据同步状态 - Get["/initbasicdata"] = InitBasicData; - - //信息浏览 - //校区简介 - Get["/getBriefIntroductionById"] = GetBriefIntroductionById; - //学校新闻、校园风光 - Get["/getSchoolNewList"] = GetSchoolNewList; - //专业列表 - Get["/getCdMajorList"] = GetCdMajorList; - //新闻详情 - Get["/getSchoolNewsDetails"] = GetSchoolNewsDetails; - //校历 - Get["/getCalendarList"] = GetCalendarList; - //校历详情 - Get["/getCalendarDetails"] = GetCalendarDetails; - Get["/getqrcode"] = GetQRCode; - - } - private readonly ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); - private readonly StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); - private DepartmentIBLL departmentIBLL = new DepartmentBLL(); - EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); - private StuInfoBasicIBLL stuInfoBasicIbll = new StuInfoBasicBLL(); - CdDeptIBLL cdDeptIbll = new CdDeptBLL(); - CdMajorIBLL cdMajorIbll = new CdMajorBLL(); - private LessonInfoIBLL lessonInfoIbll = new LessonInfoBLL(); - ClassInfoIBLL classInfoIbll = new ClassInfoBLL(); - UserIBLL userIbll = new UserBLL(); - private CompanyIBLL companyIbll = new CompanyBLL(); - private SchoolNewsIBLL schoolNewsIBLL = new SchoolNewsBLL(); - private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); - private SchoolCalendarIBLL schoolCalendarIBLL = new SchoolCalendarBLL(); - - private StuSelectLessonListOfElectiveIBLL stuSelectLessonListOfElectiveIbll = - new StuSelectLessonListOfElectiveBLL(); - private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL(); - private OfficeEquipmentIBLL officeEquipmentIBLL = new OfficeEquipmentBLL(); - private EmpInfoIBLL empinfoIBLL = new EmpInfoBLL(); - - private Response TranTest(dynamic _) - { - return Success("ok"); - } - - private Response GetAllLesson(dynamic _) - { - var result = lessonInfoIbll.GetAllLesson(); - return Success(result); - } - private Response GetAllClass(dynamic _) - { - var result = classInfoIbll.GetAllClass(); - return Success(result); - } - private Response GetAllTeachers(dynamic _) - { - var result = empInfoIbll.GetAllList().Where(m => m.CheckMark == true).ToList(); - return Success(result); - } - private Response GetAllTeachersUsers(dynamic _) - { - var result = userIbll.GetAllList().Where(m => m.F_DeleteMark == 0 && m.F_EnabledMark == 1 && m.F_Description == "教师").ToList(); - return Success(result); - } - private Response GetAllSchools(dynamic _) - { - var result = companyIbll.GetList(); - return Success(result); - } - private Response GetAllClassLesson(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetAllClassLesson(AcademicYearNo, Semester); - return Success(result); - } - private Response InitBasicData(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - string BaseTable = Request.Query["BaseTable"]; - if (string.IsNullOrEmpty(AcademicYearNo) || string.IsNullOrEmpty(Semester)) - { - return Fail("学年学期参数不能为空"); - } - if (string.IsNullOrEmpty(BaseTable)) - { - return Fail("基础表参数不能为空"); - } - ArrangeLessonTermEntity arrangeLessonTermEntity = new ArrangeLessonTermEntity(); - arrangeLessonTermEntity.AcademicYearNo = AcademicYearNo; - arrangeLessonTermEntity.Semester = Semester; - arrangeLessonTermEntity.SyncBasicTable = BaseTable; - arrangeLessonTermIBLL.InitAsyncDataByCondition(arrangeLessonTermEntity); - return Success("操作成功"); - } - private Response GetAllElectiveLesson(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = stuSelectLessonListOfElectiveIbll.GetAllElectiveLesson(AcademicYearNo, Semester); - return Success(result); - } - private Response GetAllUsers(dynamic _) - { - var webrootpath = Config.GetValue("webrootpath"); - var result = userIbll.GetAllList().Where(m => !m.F_Account.Contains("System") && m.F_DeleteMark == 0 && m.F_EnabledMark == 1).Select(m => new - { - m.F_UserId, - m.F_CompanyId, - m.F_DepartmentId, - F_Description = m.F_Description == "教师" ? "2" : "3", - ClassNo = stuInfoBasicIbll.GetStuInfoBasicEntityByStuNo(m.F_Account)?.ClassNo, - m.F_RealName, - m.F_Account, - Year = "20" + stuInfoBasicIbll.GetStuInfoBasicEntityByStuNo(m.F_Account)?.Grade, - m.F_IdentityCardNo, - F_HeadIcon = webrootpath + m?.F_HeadIcon - }); - return Success(result); - } - private Response GetAllStudents(dynamic _) - { - var webrootpath = Config.GetValue("webrootpath"); - var result = stuInfoBasicIbll.GetAllList(); - foreach (var item in result) - { - if (!string.IsNullOrEmpty(item.Photo)) - { - var annfile = annexesFileIbll.GetEntityByFolderId(item.Photo); - if (annfile != null && annfile.F_FilePath != null) - { - if (annfile.F_FilePath.IndexOf("Resource") != -1) - { - item.Photo = webrootpath + annfile.F_FilePath.Substring(annfile.F_FilePath.IndexOf("Resource") - 1); - } - else - item.Photo = ""; - } - else - item.Photo = ""; - } - else - { - item.Photo = ""; - } - } - return Success(result); - } - private Response GetDepartment(dynamic _) - { - var result = departmentIBLL.GetAllList(); - return Success(result); - } - private Response GetAllDept(dynamic _) - { - var result = cdDeptIbll.GetAllList(); - return Success(result); - } - private Response GetAllMajor(dynamic _) - { - var result = cdMajorIbll.GetAllList(); - return Success(result); - } - private Response GetLessonTypes(dynamic _) - { - var result = arrangeLessonTermIBLL.GetLessonTypes(); - return Success(result); - } - private Response GetDepts(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetDepts(AcademicYearNo, Semester); - return Success(result); - } - private Response GetDeptsNotRecord(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetDeptsNotRecord(AcademicYearNo, Semester); - return Success(result); - } - - private Response GetSchools(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetSchools(AcademicYearNo, Semester); - return Success(result); - } - private Response GetSchoolsNotRecord(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetSchoolsNotRecord(AcademicYearNo, Semester); - return Success(result); - } - - private Response GetClassLessons(dynamic _) - { - var result = arrangeLessonTermIBLL.GetClassLessons().Select(m => new - { - m.AcademicYearNo, - m.Semester, - m.DeptNo, - m.MajorNo, - m.LessonNo, - m.TeachClassNo, - m.EmpNo, - m.LessonSortNo - }); - return Success(result); - } - public Response GetStudents(dynamic _) - { - var result = arrangeLessonTermIBLL.GetStudents(); - return Success(result); - } - public Response GetMajors(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetMajors(AcademicYearNo, Semester); - return Success(result); - } - public Response GetMajorsNotRecord(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetMajorsNotRecord(AcademicYearNo, Semester); - return Success(result); - } - - public Response GetClassrooms(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetClassrooms(AcademicYearNo, Semester); - return Success(result); - } - public Response GetClassroomsNotRecord(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetClassroomsNotRecord(AcademicYearNo, Semester); - return Success(result); - } - - public Response GetClassType(dynamic _) - { - var result = arrangeLessonTermIBLL.GetClassType(); - return Success(result); - } - public Response GetLessons(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetLessons(AcademicYearNo, Semester); - return Success(result); - } - public Response GetLessonsNotRecord(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetLessonsNotRecord(AcademicYearNo, Semester); - return Success(result); - } - public Response GetLessonSortDetails(dynamic _) - { - var result = arrangeLessonTermIBLL.GetLessonSortDetails(); - return Success(result); - } - public Response GetLessonSorts(dynamic _) - { - var result = arrangeLessonTermIBLL.GetLessonSorts(); - return Success(result); - } - - public Response GetTeachers(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetTeachers(AcademicYearNo, Semester); - return Success(result); - } - public Response GetTeachersNotRecord(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetTeachersNotRecord(AcademicYearNo, Semester); - return Success(result); - } - - public Response GetClasses(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetClasses(AcademicYearNo, Semester); - return Success(result); - } - public Response GetClassesNotRecord(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetClassesNotRecord(AcademicYearNo, Semester); - return Success(result); - } - - public Response GetStus(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetStus(AcademicYearNo, Semester); - return Success(result); - } - - public Response GetStusNotRecord(dynamic _) - { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetStusNotRecord(AcademicYearNo, Semester); - return Success(result); - } - /// - /// 补考名单数据 - /// - /// - /// - private Response GetBuKaoList(dynamic _) - { - var allList = new List(); - var notPassList = stuScoreIBLL.GetStuScoreNotPassList(); - allList.AddRange(notPassList); - var notPassTwoList = stuScoreIBLL.GetStuScoreNotPassTwoList(); - allList.AddRange(notPassTwoList); - - var result = allList.Select(x => new { x.BuKaoFlag, x.AcademicYearNo, x.Semester, x.StuId, x.StuName, x.LessonId, x.LessonName, x.ClassId, x.ClassName, x.EmpId, x.EmpName }).OrderBy(x => x.BuKaoFlag).ThenByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.StuId); - return Success(result); - } - - - /// - /// 获取学校简介 - /// - /// - /// - private Response GetBriefIntroductionById(dynamic _) - { - var result = companyIbll.GetDetail(); - if (result == null) - return Success("");//Fail("找不到数据!"); - else - { - return Success(WebHelper.HtmlDecode(result.F_BriefIntroduction)); - } - } - - /// - /// 获取学校新闻列表、校园风光列表 - /// - /// - /// - public Response GetSchoolNewList(dynamic _) - { - string categoryId = Request.Query["categoryId"]; - var result = schoolNewsIBLL.GetListByCategoryId(categoryId); - return Success(result); - } - /// - /// 获取专业列表 - /// - /// - /// - public Response GetCdMajorList(dynamic _) - { - string keyword = Request.Query["keyword"]; - var result = cdMajorIBLL.GetAllList(keyword); - return Success(result); - } - /// - /// 获取详情 - /// - /// - /// - public Response GetSchoolNewsDetails(dynamic _) - { - string Id = Request.Query["Id"]; - //type: 1学校新闻,2校园风光,3 专业介绍 - string type = Request.Query["type"]; - - var title = ""; - var time = ""; - var desc = ""; - switch (type) - { - case "1": - { - //学校新闻 - var result = schoolNewsIBLL.GetLR_OA_SchoolNewsEntity(Id); - if (result != null) - { - title = result.F_FullHead; - time = result.F_ReleaseTime.HasValue ? result.F_ReleaseTime.Value.ToString("yyyy-MM-dd") : ""; - desc = result.F_NewsContent; - } - break; - } - case "2": - { - //校园风光 - var result = schoolNewsIBLL.GetLR_OA_SchoolNewsEntity(Id); - if (result != null) - { - title = result.F_FullHead; - time = result.F_ReleaseTime.HasValue ? result.F_ReleaseTime.Value.ToString("yyyy-MM-dd") : ""; - desc = result.F_NewsContent; - } - break; - } - case "3": - { - //专业介绍 - var result = cdMajorIBLL.GetCdMajorEntity(Id); - if (result != null) - { - title = result.MajorName; - time = ""; - desc = result.Introduce; - } - break; - } - - } - - object obj = new { title = title, desc = WebHelper.HtmlDecode(desc) }; - return Success(obj); - } - - /// - /// 获取校历 - /// - /// - /// - public Response GetCalendarList(dynamic _) - { - var result = schoolCalendarIBLL.GetList(); - return Success(result); - } - /// - /// 获取校历详情 - /// - /// - /// - public Response GetCalendarDetails(dynamic _) - { - string keyValue = Request.Query["keyValue"]; - var result = schoolCalendarIBLL.GetSchoolCalendarEntity(keyValue); - return Success(result); - } - - public string GetQRCode(dynamic _) { string keyValue = Request.Query["keyValue"]; - var Data = officeEquipmentIBLL.GetOfficeEquipmentEntity(keyValue); var emp = empinfoIBLL.GetEmpInfoEntityByEmpNo(Data.Name); var result = "设备名称:" + Data.DeviceName + ",设备编号:" + Data.Code + ",配置:" + Data.Description + ",使用人:" + emp.EmpName; return result; } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Web; +using Learun.Application.Base.SystemModule; +using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using Nancy; + +namespace Learun.Application.WebApi.Modules +{ + public class Arrangelesson : BaseNoAuthentication + { + public Arrangelesson() + : base("/arrangelesson/") + { + Get["/lessontype"] = GetLessonTypes; + Get["/classtype"] = GetClassType; + Get["/student"] = GetStudents; + Get["/lessonsortdetail"] = GetLessonSortDetails; + Get["/lessonsort"] = GetLessonSorts; + Get["/classlesson"] = GetClassLessons; + Get["/bukaolist"] = GetBuKaoList; + //以下接口需要传值学年学期 + Get["/school"] = GetSchools; + Get["/dept"] = GetDepts; + Get["/major"] = GetMajors; + Get["/classroom"] = GetClassrooms; + Get["/lesson"] = GetLessons; + Get["/teacher"] = GetTeachers; + Get["/class"] = GetClasses; + Get["/stu"] = GetStus; + //以下返回全部 + Get["/department"] = GetDepartment; + Get["/allteacher"] = GetAllTeachers; + Get["/allstudent"] = GetAllStudents; + Get["/alldept"] = GetAllDept; + Get["/allmajor"] = GetAllMajor; + Get["/alllesson"] = GetAllLesson; + Get["/allclass"] = GetAllClass; + Get["/alluser"] = GetAllUsers; + Get["/allschool"] = GetAllSchools; + Get["/allclasslesson"] = GetAllClassLesson; + Get["/allelelectivelesson"] = GetAllElectiveLesson; + Get["/allteacheruser"] = GetAllTeachersUsers; + + //以下接口不往ArrangeLessonSync里记录已传数据 + Get["/schoolNotRecord"] = GetSchoolsNotRecord; + Get["/deptNotRecord"] = GetDeptsNotRecord; + Get["/majorNotRecord"] = GetMajorsNotRecord; + Get["/classroomNotRecord"] = GetClassroomsNotRecord; + Get["/lessonNotRecord"] = GetLessonsNotRecord; + Get["/teacherNotRecord"] = GetTeachersNotRecord; + Get["/classNotRecord"] = GetClassesNotRecord; + Get["/stuNotRecord"] = GetStusNotRecord; + Get["trantest"] = TranTest; + //按条件重置基础数据同步状态 + Get["/initbasicdata"] = InitBasicData; + + //信息浏览 + //校区简介 + Get["/getBriefIntroductionById"] = GetBriefIntroductionById; + //学校新闻、校园风光 + Get["/getSchoolNewList"] = GetSchoolNewList; + //专业列表 + Get["/getCdMajorList"] = GetCdMajorList; + //新闻详情 + Get["/getSchoolNewsDetails"] = GetSchoolNewsDetails; + //校历 + Get["/getCalendarList"] = GetCalendarList; + //校历详情 + Get["/getCalendarDetails"] = GetCalendarDetails; + Get["/getqrcode"] = GetQRCode; + + } + private readonly ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); + private readonly StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); + private DepartmentIBLL departmentIBLL = new DepartmentBLL(); + EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); + private StuInfoBasicIBLL stuInfoBasicIbll = new StuInfoBasicBLL(); + CdDeptIBLL cdDeptIbll = new CdDeptBLL(); + CdMajorIBLL cdMajorIbll = new CdMajorBLL(); + private LessonInfoIBLL lessonInfoIbll = new LessonInfoBLL(); + ClassInfoIBLL classInfoIbll = new ClassInfoBLL(); + UserIBLL userIbll = new UserBLL(); + private CompanyIBLL companyIbll = new CompanyBLL(); + private SchoolNewsIBLL schoolNewsIBLL = new SchoolNewsBLL(); + private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); + private SchoolCalendarIBLL schoolCalendarIBLL = new SchoolCalendarBLL(); + + private StuSelectLessonListOfElectiveIBLL stuSelectLessonListOfElectiveIbll = + new StuSelectLessonListOfElectiveBLL(); + private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL(); + private OfficeEquipmentIBLL officeEquipmentIBLL = new OfficeEquipmentBLL(); + private FixedAssetsIBLL fixedAssetsIBLL = new FixedAssetsBLL(); + private DataItemIBLL dataItemIBLL = new DataItemBLL(); + private EmpInfoIBLL empinfoIBLL = new EmpInfoBLL(); + + private Response TranTest(dynamic _) + { + return Success("ok"); + } + + private Response GetAllLesson(dynamic _) + { + var result = lessonInfoIbll.GetAllLesson(); + return Success(result); + } + private Response GetAllClass(dynamic _) + { + var result = classInfoIbll.GetAllClass(); + return Success(result); + } + private Response GetAllTeachers(dynamic _) + { + var result = empInfoIbll.GetAllList().Where(m => m.CheckMark == true).ToList(); + return Success(result); + } + private Response GetAllTeachersUsers(dynamic _) + { + var result = userIbll.GetAllList().Where(m => m.F_DeleteMark == 0 && m.F_EnabledMark == 1 && m.F_Description == "教师").ToList(); + return Success(result); + } + private Response GetAllSchools(dynamic _) + { + var result = companyIbll.GetList(); + return Success(result); + } + private Response GetAllClassLesson(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetAllClassLesson(AcademicYearNo, Semester); + return Success(result); + } + private Response InitBasicData(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + string BaseTable = Request.Query["BaseTable"]; + if (string.IsNullOrEmpty(AcademicYearNo) || string.IsNullOrEmpty(Semester)) + { + return Fail("学年学期参数不能为空"); + } + if (string.IsNullOrEmpty(BaseTable)) + { + return Fail("基础表参数不能为空"); + } + ArrangeLessonTermEntity arrangeLessonTermEntity = new ArrangeLessonTermEntity(); + arrangeLessonTermEntity.AcademicYearNo = AcademicYearNo; + arrangeLessonTermEntity.Semester = Semester; + arrangeLessonTermEntity.SyncBasicTable = BaseTable; + arrangeLessonTermIBLL.InitAsyncDataByCondition(arrangeLessonTermEntity); + return Success("操作成功"); + } + private Response GetAllElectiveLesson(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = stuSelectLessonListOfElectiveIbll.GetAllElectiveLesson(AcademicYearNo, Semester); + return Success(result); + } + private Response GetAllUsers(dynamic _) + { + var webrootpath = Config.GetValue("webrootpath"); + var result = userIbll.GetAllList().Where(m => !m.F_Account.Contains("System") && m.F_DeleteMark == 0 && m.F_EnabledMark == 1).Select(m => new + { + m.F_UserId, + m.F_CompanyId, + m.F_DepartmentId, + F_Description = m.F_Description == "教师" ? "2" : "3", + ClassNo = stuInfoBasicIbll.GetStuInfoBasicEntityByStuNo(m.F_Account)?.ClassNo, + m.F_RealName, + m.F_Account, + Year = "20" + stuInfoBasicIbll.GetStuInfoBasicEntityByStuNo(m.F_Account)?.Grade, + m.F_IdentityCardNo, + F_HeadIcon = webrootpath + m?.F_HeadIcon + }); + return Success(result); + } + private Response GetAllStudents(dynamic _) + { + var webrootpath = Config.GetValue("webrootpath"); + var result = stuInfoBasicIbll.GetAllList(); + foreach (var item in result) + { + if (!string.IsNullOrEmpty(item.Photo)) + { + var annfile = annexesFileIbll.GetEntityByFolderId(item.Photo); + if (annfile != null && annfile.F_FilePath != null) + { + if (annfile.F_FilePath.IndexOf("Resource") != -1) + { + item.Photo = webrootpath + annfile.F_FilePath.Substring(annfile.F_FilePath.IndexOf("Resource") - 1); + } + else + item.Photo = ""; + } + else + item.Photo = ""; + } + else + { + item.Photo = ""; + } + } + return Success(result); + } + private Response GetDepartment(dynamic _) + { + var result = departmentIBLL.GetAllList(); + return Success(result); + } + private Response GetAllDept(dynamic _) + { + var result = cdDeptIbll.GetAllList(); + return Success(result); + } + private Response GetAllMajor(dynamic _) + { + var result = cdMajorIbll.GetAllList(); + return Success(result); + } + private Response GetLessonTypes(dynamic _) + { + var result = arrangeLessonTermIBLL.GetLessonTypes(); + return Success(result); + } + private Response GetDepts(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetDepts(AcademicYearNo, Semester); + return Success(result); + } + private Response GetDeptsNotRecord(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetDeptsNotRecord(AcademicYearNo, Semester); + return Success(result); + } + + private Response GetSchools(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetSchools(AcademicYearNo, Semester); + return Success(result); + } + private Response GetSchoolsNotRecord(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetSchoolsNotRecord(AcademicYearNo, Semester); + return Success(result); + } + + private Response GetClassLessons(dynamic _) + { + var result = arrangeLessonTermIBLL.GetClassLessons().Select(m => new + { + m.AcademicYearNo, + m.Semester, + m.DeptNo, + m.MajorNo, + m.LessonNo, + m.TeachClassNo, + m.EmpNo, + m.LessonSortNo + }); + return Success(result); + } + public Response GetStudents(dynamic _) + { + var result = arrangeLessonTermIBLL.GetStudents(); + return Success(result); + } + public Response GetMajors(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetMajors(AcademicYearNo, Semester); + return Success(result); + } + public Response GetMajorsNotRecord(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetMajorsNotRecord(AcademicYearNo, Semester); + return Success(result); + } + + public Response GetClassrooms(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetClassrooms(AcademicYearNo, Semester); + return Success(result); + } + public Response GetClassroomsNotRecord(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetClassroomsNotRecord(AcademicYearNo, Semester); + return Success(result); + } + + public Response GetClassType(dynamic _) + { + var result = arrangeLessonTermIBLL.GetClassType(); + return Success(result); + } + public Response GetLessons(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetLessons(AcademicYearNo, Semester); + return Success(result); + } + public Response GetLessonsNotRecord(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetLessonsNotRecord(AcademicYearNo, Semester); + return Success(result); + } + public Response GetLessonSortDetails(dynamic _) + { + var result = arrangeLessonTermIBLL.GetLessonSortDetails(); + return Success(result); + } + public Response GetLessonSorts(dynamic _) + { + var result = arrangeLessonTermIBLL.GetLessonSorts(); + return Success(result); + } + + public Response GetTeachers(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetTeachers(AcademicYearNo, Semester); + return Success(result); + } + public Response GetTeachersNotRecord(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetTeachersNotRecord(AcademicYearNo, Semester); + return Success(result); + } + + public Response GetClasses(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetClasses(AcademicYearNo, Semester); + return Success(result); + } + public Response GetClassesNotRecord(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetClassesNotRecord(AcademicYearNo, Semester); + return Success(result); + } + + public Response GetStus(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetStus(AcademicYearNo, Semester); + return Success(result); + } + + public Response GetStusNotRecord(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetStusNotRecord(AcademicYearNo, Semester); + return Success(result); + } + /// + /// 补考名单数据 + /// + /// + /// + private Response GetBuKaoList(dynamic _) + { + var allList = new List(); + var notPassList = stuScoreIBLL.GetStuScoreNotPassList(); + allList.AddRange(notPassList); + var notPassTwoList = stuScoreIBLL.GetStuScoreNotPassTwoList(); + allList.AddRange(notPassTwoList); + + var result = allList.Select(x => new { x.BuKaoFlag, x.AcademicYearNo, x.Semester, x.StuId, x.StuName, x.LessonId, x.LessonName, x.ClassId, x.ClassName, x.EmpId, x.EmpName }).OrderBy(x => x.BuKaoFlag).ThenByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.StuId); + return Success(result); + } + + + /// + /// 获取学校简介 + /// + /// + /// + private Response GetBriefIntroductionById(dynamic _) + { + var result = companyIbll.GetDetail(); + if (result == null) + return Success("");//Fail("找不到数据!"); + else + { + return Success(WebHelper.HtmlDecode(result.F_BriefIntroduction)); + } + } + + /// + /// 获取学校新闻列表、校园风光列表 + /// + /// + /// + public Response GetSchoolNewList(dynamic _) + { + string categoryId = Request.Query["categoryId"]; + var result = schoolNewsIBLL.GetListByCategoryId(categoryId); + return Success(result); + } + /// + /// 获取专业列表 + /// + /// + /// + public Response GetCdMajorList(dynamic _) + { + string keyword = Request.Query["keyword"]; + var result = cdMajorIBLL.GetAllList(keyword); + return Success(result); + } + /// + /// 获取详情 + /// + /// + /// + public Response GetSchoolNewsDetails(dynamic _) + { + string Id = Request.Query["Id"]; + //type: 1学校新闻,2校园风光,3 专业介绍 + string type = Request.Query["type"]; + + var title = ""; + var time = ""; + var desc = ""; + switch (type) + { + case "1": + { + //学校新闻 + var result = schoolNewsIBLL.GetLR_OA_SchoolNewsEntity(Id); + if (result != null) + { + title = result.F_FullHead; + time = result.F_ReleaseTime.HasValue ? result.F_ReleaseTime.Value.ToString("yyyy-MM-dd") : ""; + desc = result.F_NewsContent; + } + break; + } + case "2": + { + //校园风光 + var result = schoolNewsIBLL.GetLR_OA_SchoolNewsEntity(Id); + if (result != null) + { + title = result.F_FullHead; + time = result.F_ReleaseTime.HasValue ? result.F_ReleaseTime.Value.ToString("yyyy-MM-dd") : ""; + desc = result.F_NewsContent; + } + break; + } + case "3": + { + //专业介绍 + var result = cdMajorIBLL.GetCdMajorEntity(Id); + if (result != null) + { + title = result.MajorName; + time = ""; + desc = result.Introduce; + } + break; + } + + } + + object obj = new { title = title, desc = WebHelper.HtmlDecode(desc) }; + return Success(obj); + } + + /// + /// 获取校历 + /// + /// + /// + public Response GetCalendarList(dynamic _) + { + var result = schoolCalendarIBLL.GetList(); + return Success(result); + } + /// + /// 获取校历详情 + /// + /// + /// + public Response GetCalendarDetails(dynamic _) + { + string keyValue = Request.Query["keyValue"]; + var result = schoolCalendarIBLL.GetSchoolCalendarEntity(keyValue); + return Success(result); + } + + public string GetQRCode(dynamic _) + { + string keyValue = Request.Query["keyValue"]; + int Types = Request.Query["Types"]; + var result = ""; + if (Types == 0) + { + var Data = officeEquipmentIBLL.GetOfficeEquipmentEntity(keyValue); + var emp = empinfoIBLL.GetEmpInfoEntityByEmpNo(Data.Name); + var Unit = dataItemIBLL.GetDetailList("sldw").Where(x => x.F_ItemValue == Data.Unit).FirstOrDefault(); + result = "资产名称:" + Data.DeviceName + ",资产编号:" + Data.Code + ",品牌:" + Data.Brand + ",型号:" + Data.Model + ",参数:" + Data.Argument + ",单位:(" + Unit.F_ItemName + "),参数:" + Data.Nuantity + ",使用管理人:" + emp.EmpName + ",备注:" + Data.Remark; + } + else + { + var Data = fixedAssetsIBLL.GetFixedAssetsEntity(keyValue); + var emp = empinfoIBLL.GetEmpInfoEntityByEmpNo(Data.UsePeople); + var Unit = dataItemIBLL.GetDetailList("sldw").Where(x => x.F_ItemValue == Data.Unit).FirstOrDefault(); + result = "资产名称:" + Data.AssetsName + ",资产编号:" + Data.Code + ",品牌:" + Data.Brand + ",型号:" + Data.Model + ",参数:" + Data.Argument + ",单位:(" + Unit.F_ItemName + "),参数:" + Data.Nuantity + ",使用管理人:" + emp.EmpName + ",备注:" + Data.Remark; + } + return result; + } + } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FixedAssets/FixedAssetsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FixedAssets/FixedAssetsEntity.cs index 6f0c8d4cc..6d7217fe0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FixedAssets/FixedAssetsEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FixedAssets/FixedAssetsEntity.cs @@ -104,6 +104,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[Column("MODIFYUSER")] public string ModifyUser { get; set; } + + /// + /// 编号 + /// + [Column("CODE")] + public string Code { get; set; } + /// + /// 型号 + /// + [Column("MODEL")] + public string Model { get; set; } + /// + /// 参数 + /// + [Column("ARGUMENT")] + public string Argument { get; set; } + /// + /// 类型 + /// + [Column("TYPES")] + public string Types { get; set; } + #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FixedAssets/FixedAssetsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FixedAssets/FixedAssetsService.cs index e9f0370d6..6938e2a1d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FixedAssets/FixedAssetsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FixedAssets/FixedAssetsService.cs @@ -56,6 +56,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("Brand", "%" + queryParam["Brand"].ToString() + "%", DbType.String); strSql.Append(" AND t.Brand Like @Brand "); } + if (!queryParam["Code"].IsEmpty()) + { + dp.Add("Code", "%" + queryParam["Code"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Code Like @Code "); + } + if (!queryParam["Model"].IsEmpty()) + { + dp.Add("Model", "%" + queryParam["Model"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Model Like @Model "); + } + if (!queryParam["Argument"].IsEmpty()) + { + dp.Add("Argument", "%" + queryParam["Argument"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Argument Like @Argument "); + } + if (!queryParam["Types"].IsEmpty()) + { + dp.Add("Types", queryParam["Types"].ToString(), DbType.String); + strSql.Append(" AND t.Types = @Types "); + } if (!queryParam["Acceptor"].IsEmpty()) { dp.Add("Acceptor",queryParam["Acceptor"].ToString(), DbType.String); @@ -71,7 +91,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("Registrant", queryParam["Registrant"].ToString(), DbType.String); strSql.Append(" AND t.Registrant = @Registrant "); } - if (!queryParam["Status"].IsEmpty()) { dp.Add("Status",queryParam["Status"].ToString(), DbType.String); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs index 3f405b5ab..c0b4c1d28 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs @@ -69,6 +69,37 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[Column("MODIFYTIME")] public DateTime? Modifytime { get; set; } + /// + /// 型号 + /// + [Column("MODEL")] + public string Model { get; set; } + /// + /// 参数 + /// + [Column("ARGUMENT")] + public string Argument { get; set; } + /// + /// 类型 + /// + [Column("TYPES")] + public string Types { get; set; } + /// + /// 品牌 + /// + [Column("BRAND")] + public string Brand { get; set; } + /// + /// 单位 + /// + [Column("UNIT")] + public string Unit { get; set; } + /// + /// 数量 + /// + [Column("NUANTITY")] + public decimal? Nuantity { get; set; } + #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs index 51988136b..63fba03ba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs @@ -56,6 +56,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("Department", queryParam["Department"].ToString(), DbType.String); strSql.Append(" AND t.Department = @Department "); } + if (!queryParam["Model"].IsEmpty()) + { + dp.Add("Model", "%" + queryParam["Model"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Model Like @Model "); + } + if (!queryParam["Argument"].IsEmpty()) + { + dp.Add("Argument", "%" + queryParam["Argument"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Argument Like @Argument "); + } + if (!queryParam["Types"].IsEmpty()) + { + dp.Add("Types", queryParam["Types"].ToString(), DbType.String); + strSql.Append(" AND t.Types = @Types "); + } + if (!queryParam["Brand"].IsEmpty()) + { + dp.Add("Brand", queryParam["Brand"].ToString(), DbType.String); + strSql.Append(" AND t.Brand = @Brand "); + } if (!LoginUserInfo.Get().isSystem) { if (!LoginUserInfo.Get().roleIds.Contains("5a6e22b1-2a08-4258-9964-3cb7fbb9ebee"))