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/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)
{
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);