From 1e1570d090e9fe77226930cff92c76bc490b0d8e Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 1 Mar 2023 15:56:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=80=81=E5=B8=88=E4=B8=80?= =?UTF-8?q?=E5=8D=A1=E9=80=9A=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/YKTStateMentController.cs | 99 +++++++++++++++++++ .../Views/RecruitStuPlan/IndexForStudent.js | 2 +- .../Views/YKTStateMent/Index.js | 2 +- .../Views/YKTStateMent/IndexForTeacher.cshtml | 27 +++++ .../Views/YKTStateMent/IndexForTeacher.js | 85 ++++++++++++++++ .../YKTStateMent/ManageIndexTeacher.cshtml | 46 +++++++++ .../Views/YKTStateMent/ManageIndexTeacher.js | 88 +++++++++++++++++ .../Learun.Application.Web.csproj | 4 + .../YKTStateMent/YKTStateMentBLL.cs | 69 +++++++++++++ .../YKTStateMent/YKTStateMentEntity.cs | 4 + .../YKTStateMent/YKTStateMentIBLL.cs | 32 ++++++ .../YKTStateMent/YKTStateMentService.cs | 48 +++++++++ 12 files changed, 504 insertions(+), 2 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForTeacher.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForTeacher.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/ManageIndexTeacher.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/ManageIndexTeacher.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentIBLL.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs new file mode 100644 index 000000000..490abd3a2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs @@ -0,0 +1,99 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using Learun.Application.TwoDevelopment.LR_CodeDemo; +using System.Collections.Generic; +using Learun.Application.Base.SystemModule; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-02-23 10:34 + /// 描 述:一卡通流水 + /// + public class YKTStateMentController : MvcControllerBase + { + private YKTStateMentIBLL yktStateMentIbll = new YKTStateMentBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + + [HttpGet] + public ActionResult ManageIndexTeacher() + { + return View(); + } + [HttpGet] + public ActionResult IndexForStudent() + { + var userinfo = LoginUserInfo.Get(); + ViewBag.StuNo = userinfo.account; + return View(); + } + [HttpGet] + public ActionResult IndexForTeacher() + { + var userinfo = LoginUserInfo.Get(); + ViewBag.EmpNo = userinfo.account; + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = yktStateMentIbll.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + + [HttpGet] + [AjaxOnly] + public ActionResult GetTeacherPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = yktStateMentIbll.GetTeacherPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + #endregion + + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexForStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexForStudent.js index cd044def1..892f1b6dd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexForStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexForStudent.js @@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { { label: "专业", name: "MajorName", width: 100, align: "left" }, { label: "班级", name: "ClassName", width: 100, align: "left" }, { label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, - { label: "消费金额", name: "MONEY", width: 100, align: "left" }, + { label: "消费金额", name: "MONEY", width: 100, align: "left", statistics: true }, //{ label: "余额", name: "BALANCE", width: 100, align: "left" }, { label: "发生时间", name: "HAPPENTIME", width: 120, align: "left" }, { label: "科目", name: "SUBJECT", width: 100, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/Index.js index 80d18c82b..e1f3a62c7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/Index.js @@ -120,7 +120,7 @@ var bootstrap = function ($, learun) { { label: "专业", name: "MajorName", width: 100, align: "left" }, { label: "班级", name: "ClassName", width: 100, align: "left" }, { label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, - { label: "消费金额", name: "MONEY", width: 100, align: "left" }, + { label: "消费金额", name: "MONEY", width: 100, align: "left", statistics: true }, //{ label: "余额", name: "BALANCE", width: 100, align: "left" }, { label: "发生时间", name: "HAPPENTIME", width: 120, align: "left" }, { label: "科目", name: "SUBJECT", width: 100, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForTeacher.cshtml new file mode 100644 index 000000000..3df3cc296 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForTeacher.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "宿舍调换申请"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/YKTStateMent/IndexForTeacher.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForTeacher.js new file mode 100644 index 000000000..7c8f07d8e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForTeacher.js @@ -0,0 +1,85 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-07-11 14:34 + * 描 述:宿舍调换申请 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '2', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/YKTStateMent/GetTeacherPageList', + headData: [ + { label: "一卡通账号", name: "YKTNO", width: 100, align: "left" }, + { label: "教职工号", name: "EmpNo", width: 100, align: "left" }, + { label: "姓名", name: "EmpName", width: 100, align: "left" }, + { label: "部门", name: "DepartmentName", width: 100, align: "left" }, + { label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, + { label: "消费金额", name: "MONEY", width: 100, align: "left", statistics: true }, + //{ label: "余额", name: "BALANCE", width: 100, align: "left" }, + { label: "发生时间", name: "HAPPENTIME", width: 120, align: "left" }, + { label: "科目", name: "SUBJECT", width: 100, align: "left" }, + { label: "终端名称", name: "TERMNAME", width: 150, align: "left" } + ], + sidx: 'A.OPDT', + sord: 'desc', + isPage: true + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + param.StartDate = startTime; + param.EndDate = endTime; + param.EmpNo = EmpNo; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/ManageIndexTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/ManageIndexTeacher.cshtml new file mode 100644 index 000000000..6c746f32b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/ManageIndexTeacher.cshtml @@ -0,0 +1,46 @@ +@{ + ViewBag.Title = "宿舍调换申请"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
一卡通账号
+ +
+
+
教职工号
+ +
+
+
姓名
+ +
+
+
部门
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/YKTStateMent/ManageIndexTeacher.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/ManageIndexTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/ManageIndexTeacher.js new file mode 100644 index 000000000..9d370191f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/ManageIndexTeacher.js @@ -0,0 +1,88 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-07-11 14:34 + * 描 述:宿舍调换申请 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '2', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#DepartmentId').lrDepartmentSelect({ type:'tree'}); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/YKTStateMent/GetTeacherPageList', + headData: [ + { label: "一卡通账号", name: "YKTNO", width: 100, align: "left" }, + { label: "教职工号", name: "EmpNo", width: 100, align: "left" }, + { label: "姓名", name: "EmpName", width: 100, align: "left" }, + { label: "部门", name: "DepartmentName", width: 100, align: "left" }, + { label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, + { label: "消费金额", name: "MONEY", width: 100, align: "left", statistics:true }, + //{ label: "余额", name: "BALANCE", width: 100, align: "left" }, + { label: "发生时间", name: "HAPPENTIME", width: 120, align: "left" }, + { label: "科目", name: "SUBJECT", width: 100, align: "left" }, + { label: "终端名称", name: "TERMNAME", width: 150, align: "left" } + ], + //mainId: 'AId', + sidx: 'A.OPDT', + sord: 'desc', + isPage: true + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + param.StartDate = startTime; + param.EndDate = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index be842d441..34f15ac49 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 @@ -984,6 +984,8 @@ + + @@ -7764,6 +7766,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentBLL.cs new file mode 100644 index 000000000..2c8562094 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentBLL.cs @@ -0,0 +1,69 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-07-11 14:34 + /// 描 述:宿舍调换申请 + /// + public class YKTStateMentBLL : YKTStateMentIBLL + { + private YKTStateMentService yKTStateMentService = new YKTStateMentService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return yKTStateMentService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetTeacherPageList(Pagination pagination, string queryJson) + { + try + { + return yKTStateMentService.GetTeacherPageList(pagination, queryJson); + } + 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/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs index a94b1e8b9..7975449fc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs @@ -52,6 +52,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public string IdentityCardNo { get; set; } public string mobile { get; set; } + public string EmpNo { get; set; } + public string EmpName { get; set; } + public string DepartmentName { get; set; } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentIBLL.cs new file mode 100644 index 000000000..234331c75 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentIBLL.cs @@ -0,0 +1,32 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-02-23 14:34 + /// 描 述:一卡通流水 + /// + public interface YKTStateMentIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + + IEnumerable GetTeacherPageList(Pagination pagination, string queryJson); + + #endregion + + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs index 8462a79a1..a7403e2cd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs @@ -79,6 +79,54 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetTeacherPageList(Pagination pagination, string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + var strSql = new StringBuilder(); + strSql.Append(@"SELECT A.OUTID AS STUPHONE,A.CUSTOMERID AS YKTNO,round(A.OPFARE/100,2) AS MONEY,round(A.ODDFARE/100,2) AS BALANCE,A.OPDT AS HAPPENTIME,A.DSCRP AS SUBJECT, +B.TERMNAME,c.EmpNo,c.EmpName,d.Name as DepartmentName,c.identityno as IdentityCardNo + FROM M_REC_CONSUME@ykt A LEFT JOIN M_BASE_TERM@ykt B ON A.TERMID = B.TERMID + left join ds_empinfo C on A.OUTID = C.mobile + left join ds_department d on c.departmentid=d.id + where 1=1 and EmpNo is not null"); + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append($" AND C.EmpNo like '%{queryParam["EmpNo"].ToString()}%' "); + } + if (!queryParam["EmpName"].IsEmpty()) + { + strSql.Append($" AND C.EmpName like '%{queryParam["EmpName"].ToString()}%' "); + } + if (!queryParam["DepartmentId"].IsEmpty()) + { + strSql.Append($" AND C.DepartmentId='{queryParam["DepartmentId"].ToString()}' "); + } + if (!queryParam["YKTNO"].IsEmpty()) + { + strSql.Append($" AND a.CUSTOMERID like '%{queryParam["CUSTOMERID"].ToString()}%' "); + } + if (!queryParam["StartDate"].IsEmpty() && !queryParam["EndDate"].IsEmpty()) + { + strSql.Append(" and (A.OPDT>=to_date('" + queryParam["StartDate"] + "','yyyy-mm-dd') and A.OPDT<=to_date('" + queryParam["EndDate"] + "','yyyy-mm-dd hh24:mi:ss'))"); + } + + return BaseRepository("TLMZYMIDDLEString").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion