From ef7298667e4b63d6afd1d5b58d9662b479a00364 Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 8 May 2023 10:21:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=80=E5=8D=A1=E9=80=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=85=B3=E8=81=94=E8=B4=A6=E5=8F=B7=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/YKTStateMent/Index.js | 2 +- .../Views/YKTStateMent/IndexForStudent.js | 2 +- .../Views/YKTStateMent/IndexForTeacher.js | 2 +- .../Views/YKTStateMent/ManageIndexTeacher.js | 2 +- .../XmlConfig/database.config | 2 +- .../YKTStateMent/YKTStateMentService.cs | 76 +++++++++++++------ 6 files changed, 56 insertions(+), 30 deletions(-) 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 c04dda20b..b72784bf6 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 @@ -132,7 +132,7 @@ var bootstrap = function ($, learun) { { label: "终端名称", name: "TERMNAME", width: 150, align: "left" }, ], //mainId: 'AId', - sidx: 'A.OPDT', + sidx: 'HAPPENTIME', sord: 'desc', isPage: true }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForStudent.js index 209519e91..4dadc8f6c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/IndexForStudent.js @@ -71,7 +71,7 @@ var bootstrap = function ($, learun) { { label: "科目", name: "SUBJECT", width: 100, align: "left" }, { label: "终端名称", name: "TERMNAME", width: 150, align: "left" }, ], - sidx: 'A.OPDT', + sidx: 'HAPPENTIME', sord: 'desc', isPage: true }); 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 index 9be6cfe2a..ef6bc1c1a 100644 --- 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 @@ -69,7 +69,7 @@ var bootstrap = function ($, learun) { { label: "科目", name: "SUBJECT", width: 100, align: "left" }, { label: "终端名称", name: "TERMNAME", width: 150, align: "left" } ], - sidx: 'A.OPDT', + sidx: 'HAPPENTIME', sord: 'desc', isPage: true }); 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 index f5fc61ac4..f1c1a3708 100644 --- 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 @@ -73,7 +73,7 @@ var bootstrap = function ($, learun) { { label: "终端名称", name: "TERMNAME", width: 150, align: "left" } ], //mainId: 'AId', - sidx: 'A.OPDT', + sidx: 'HAPPENTIME', sord: 'desc', isPage: true }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index ea24e08a8..b974965d2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -44,5 +44,5 @@ - + \ No newline at end of file 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 3c9d4e693..682c59923 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 @@ -14,7 +14,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 /// 创 建:超级管理员 /// 日 期:2022-07-11 14:34 - /// 描 述:宿舍调换申请 + /// 描 述:数据中心一卡通对接 /// public class YKTStateMentService : RepositoryFactory { @@ -32,36 +32,45 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { 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.StuNo,C.StuName,d.DeptName,e.ClassName,c.identityno as IdentityCardNo, f.MajorName,c.GenderNo + strSql.Append(@"select * from ( +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.StuNo,C.StuName,d.DeptNo,d.DeptName,e.ClassNo,e.ClassName,c.identityno as IdentityCardNo, f.MajorName,c.GenderNo FROM M_REC_CONSUME@ykt A LEFT JOIN M_BASE_TERM@ykt B ON A.TERMID = B.TERMID left join ds_stuinfo C on A.OUTID = C.mobile left join ds_dept d on c.deptno = d.deptno left join ds_classinfo e on c.classno = e.classno left join ds_major f on c.majorno=f.majorno - where 1=1 and stuno is not null "); + where stuno is not null + union all +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.StuNo,C.StuName,d.DeptNo,d.DeptName,e.ClassNo,e.ClassName,c.identityno as IdentityCardNo, f.MajorName,c.GenderNo + FROM M_REC_CONSUME@ykt A LEFT JOIN M_BASE_TERM@ykt B ON A.TERMID = B.TERMID + left join ds_stuinfo C on A.OUTID = C.stuno + left join ds_dept d on c.deptno = d.deptno + left join ds_classinfo e on c.classno = e.classno + left join ds_major f on c.majorno=f.majorno + where stuno is not null ) aa where 1=1"); if (!queryParam["StuNo"].IsEmpty()) { - strSql.Append($" AND C.StuNo like '%{queryParam["StuNo"].ToString()}%' "); + strSql.Append($" AND StuNo like '%{queryParam["StuNo"].ToString()}%' "); } if (!queryParam["StuName"].IsEmpty()) { - strSql.Append($" AND C.StuName like '%{queryParam["StuName"].ToString()}%' "); + strSql.Append($" AND StuName like '%{queryParam["StuName"].ToString()}%' "); } if (!queryParam["DeptNo"].IsEmpty()) { - strSql.Append($" AND C.DeptNo='{queryParam["DeptNo"].ToString()}' "); + strSql.Append($" AND DeptNo='{queryParam["DeptNo"].ToString()}' "); } if (!queryParam["ClassNo"].IsEmpty()) { - strSql.Append($" AND C.ClassNo ='{queryParam["ClassNo"].ToString()}' "); + strSql.Append($" AND ClassNo ='{queryParam["ClassNo"].ToString()}' "); } if (!queryParam["YKTNO"].IsEmpty()) { - strSql.Append($" AND a.CUSTOMERID like '%{queryParam["CUSTOMERID"].ToString()}%' "); + strSql.Append($" AND YKTNO like '%{queryParam["YKTNO"].ToString()}%' "); } if (!queryParam["StartDate"].IsEmpty() && !queryParam["EndDate"].IsEmpty()) { - strSql.Append(" and (A.OPDT>=to_date('" + queryParam["StartDate"] + "','yyyy-mm-dd hh24:mi:ss') and A.OPDT<=to_date('" + queryParam["EndDate"] + "','yyyy-mm-dd hh24:mi:ss'))"); + strSql.Append(" and (HAPPENTIME>=to_date('" + queryParam["StartDate"] + "','yyyy-mm-dd hh24:mi:ss') and HAPPENTIME<=to_date('" + queryParam["EndDate"] + "','yyyy-mm-dd hh24:mi:ss'))"); } return BaseRepository("TLMZYMIDDLEString").FindList(strSql.ToString(), pagination); @@ -91,34 +100,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var queryParam = queryJson.ToJObject(); var strSql = new StringBuilder(); strSql.Append( - @"SELECT C.StuNo,C.StuName,c.GenderNo,d.DeptName,f.MajorName,e.ClassName,c.identityno as IdentityCardNo, sum(round(A.OPFARE/100,2)) AS MONEY,count(stuno) as PayTimes,round(sum(round(A.OPFARE/100,2))/count(stuno),2) as PerMoney + @"select StuNo,StuName,GenderNo,DeptName,MajorName,ClassName,identityno as IdentityCardNo, sum(round(OPFARE/100,2)) AS MONEY,count(stuno) as PayTimes,round(sum(round(OPFARE/100,2))/count(stuno),2) as PerMoney +from +(SELECT C.StuNo,C.StuName,c.GenderNo,d.DeptName,d.DeptNo,f.MajorName,f.MajorNo,e.ClassName,c.ClassNo,c.identityno, A.OPFARE,a.OPDT FROM M_REC_CONSUME@ykt A LEFT JOIN M_BASE_TERM@ykt B ON A.TERMID = B.TERMID left join ds_stuinfo C on A.OUTID = C.mobile left join ds_dept d on c.deptno = d.deptno left join ds_classinfo e on c.classno = e.classno left join ds_major f on c.majorno=f.majorno - where 1=1 and stuno is not null "); + where stuno is not null + union all + SELECT C.StuNo,C.StuName,c.GenderNo,d.DeptName,d.DeptNo,f.MajorName,f.MajorNo,e.ClassName,c.ClassNo,c.identityno, A.OPFARE,a.OPDT + FROM M_REC_CONSUME@ykt A LEFT JOIN M_BASE_TERM@ykt B ON A.TERMID = B.TERMID + left join ds_stuinfo C on A.OUTID = C.stuno + left join ds_dept d on c.deptno = d.deptno + left join ds_classinfo e on c.classno = e.classno + left join ds_major f on c.majorno=f.majorno + where stuno is not null) aa where 1=1 "); if (!queryParam["DeptNo"].IsEmpty()) { - strSql.Append($" AND C.DeptNo='{queryParam["DeptNo"].ToString()}' "); + strSql.Append($" AND DeptNo='{queryParam["DeptNo"].ToString()}' "); } if (!queryParam["MajorNo"].IsEmpty()) { - strSql.Append($" AND C.MajorNo='{queryParam["MajorNo"].ToString()}' "); + strSql.Append($" AND MajorNo='{queryParam["MajorNo"].ToString()}' "); } if (!queryParam["ClassNo"].IsEmpty()) { - strSql.Append($" AND C.ClassNo ='{queryParam["ClassNo"].ToString()}' "); + strSql.Append($" AND ClassNo ='{queryParam["ClassNo"].ToString()}' "); } if (!queryParam["Months"].IsEmpty()) { - strSql.Append(" and extract(month from A.OPDT) in("+ queryParam["Months"].ToString() + ")"); + strSql.Append(" and extract(month from OPDT) in("+ queryParam["Months"].ToString() + ")"); } if (!queryParam["Year"].IsEmpty()) { - strSql.Append(" and extract(year from A.OPDT) in(" + queryParam["Year"].ToString() + ")"); + strSql.Append(" and extract(year from OPDT) in(" + queryParam["Year"].ToString() + ")"); } - strSql.Append("group by C.StuNo,c.GenderNo, C.StuName,d.DeptNo, d.DeptName, f.MajorName,f.MajorNo, e.ClassNo,e.ClassName, c.identityno"); + strSql.Append("group by StuNo,GenderNo, StuName,DeptNo, DeptName, MajorName,MajorNo, ClassNo,ClassName, identityno"); return BaseRepository("TLMZYMIDDLEString").FindList(strSql.ToString(), pagination); } catch (Exception ex) @@ -140,31 +159,38 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { 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,c.GenderNo + strSql.Append(@"select * from (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,c.DepartmentId,d.Name as DepartmentName,c.identityno as IdentityCardNo,c.GenderNo 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"); + where EmpNo is not null + union all +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,c.DepartmentId,d.Name as DepartmentName,c.identityno as IdentityCardNo,c.GenderNo + 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.empno + left join ds_department d on c.departmentid=d.id + where EmpNo is not null ) aa where 1=1"); if (!queryParam["EmpNo"].IsEmpty()) { - strSql.Append($" AND C.EmpNo like '%{queryParam["EmpNo"].ToString()}%' "); + strSql.Append($" AND EmpNo like '%{queryParam["EmpNo"].ToString()}%' "); } if (!queryParam["EmpName"].IsEmpty()) { - strSql.Append($" AND C.EmpName like '%{queryParam["EmpName"].ToString()}%' "); + strSql.Append($" AND EmpName like '%{queryParam["EmpName"].ToString()}%' "); } if (!queryParam["DepartmentId"].IsEmpty()) { - strSql.Append($" AND C.DepartmentId='{queryParam["DepartmentId"].ToString()}' "); + strSql.Append($" AND DepartmentId='{queryParam["DepartmentId"].ToString()}' "); } if (!queryParam["YKTNO"].IsEmpty()) { - strSql.Append($" AND a.CUSTOMERID like '%{queryParam["CUSTOMERID"].ToString()}%' "); + strSql.Append($" AND YKTNO like '%{queryParam["YKTNO"].ToString()}%' "); } if (!queryParam["StartDate"].IsEmpty() && !queryParam["EndDate"].IsEmpty()) { - strSql.Append(" and (A.OPDT>=to_date('" + queryParam["StartDate"] + "','yyyy-mm-dd hh24:mi:ss') and A.OPDT<=to_date('" + queryParam["EndDate"] + "','yyyy-mm-dd hh24:mi:ss'))"); + strSql.Append(" and (HAPPENTIME>=to_date('" + queryParam["StartDate"] + "','yyyy-mm-dd hh24:mi:ss') and HAPPENTIME<=to_date('" + queryParam["EndDate"] + "','yyyy-mm-dd hh24:mi:ss'))"); } return BaseRepository("TLMZYMIDDLEString").FindList(strSql.ToString(), pagination); From 50f153b4681a26ffaa5a90c24df77489701385d1 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 8 May 2023 16:02:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E9=98=B2=E4=BC=AA=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Web/Controllers/LoginController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs index f47e7bfed..f345c635c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -502,7 +502,7 @@ namespace Learun.Application.Web.Controllers /// [HttpPost] [AjaxOnly] - [HandlerValidateAntiForgeryToken] + //[HandlerValidateAntiForgeryToken] public ActionResult CheckLogin(string username, string password, string verifycode, string up) {