diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js
index beac0586f..9562bac1f 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js
@@ -13,6 +13,11 @@ var bootstrap = function ($, learun) {
page.bind();
},
bind: function () {
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 300, 400);
+ $('#PunishNo').lrDataItemSelect({ code: 'Punishment' });
+
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MealCardRunTabApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MealCardRunTabApi.cs
index cfb5eaa8a..cf057c78d 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MealCardRunTabApi.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MealCardRunTabApi.cs
@@ -48,6 +48,7 @@ namespace Learun.Application.WebApi
{
ReqPageParam parameter = this.GetReqData();
var data = mealCardRunTabIBLL.GetPageList(parameter.pagination, parameter.queryJson);
+ data = data.OrderByDescending(x => x.centralTm);
var jsonData = new
{
rows = data,
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs
index e9c8d7aa8..f4447cc5e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs
@@ -164,11 +164,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
if (!queryParam["accountName"].IsEmpty())
{
- var IsPhone = queryParam["IsPhone"].ToString();
- if (IsPhone == "0")
+ var IsPhone = "";
+ if (!queryParam["IsPhone"].IsEmpty())
{
- dp.Add("accountName", queryParam["accountName"].ToString(), DbType.String);
- strSql.Append(" AND t.accountName = @accountName ");
+ IsPhone = queryParam["IsPhone"].ToString();
+ if (IsPhone == "0")
+ {
+ var accountName = queryParam["accountName"].ToString();
+ if (accountName != "超级管理员")
+ {
+ dp.Add("accountName", queryParam["accountName"].ToString(), DbType.String);
+ strSql.Append(" AND t.accountName = @accountName ");
+ }
+ }
}
else
{
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs
index 3157c8526..3f3de8b01 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs
@@ -77,6 +77,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}
+ if (!queryParam["EncourgeName"].IsEmpty())
+ {
+ dp.Add("EncourgeName", "%" + queryParam["EncourgeName"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.EncourgeName Like @EncourgeName ");
+ }
+ if (!queryParam["EncourgeDate"].IsEmpty())
+ {
+ dp.Add("EncourgeDate", queryParam["EncourgeDate"].ToString(), DbType.String);
+ strSql.Append(" AND t.EncourgeDate = @EncourgeDate ");
+ }
return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs
index 2193eb19f..2ec5e0fa2 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs
@@ -71,6 +71,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}
+
+ if (!queryParam["PunishNo"].IsEmpty())
+ {
+ dp.Add("PunishNo", queryParam["PunishNo"].ToString(), DbType.String);
+ strSql.Append(" AND t.PunishNo = @PunishNo ");
+ }
+ if (!queryParam["PunishDate"].IsEmpty())
+ {
+ dp.Add("PunishDate", queryParam["PunishDate"].ToString(), DbType.String);
+ strSql.Append(" AND t.PunishDate = @PunishDate ");
+ }
return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs
index c24eb19b4..5886d116a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs
@@ -44,8 +44,8 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
{
try
{
- var refresh_token = _redis.Read("refresh_token");
- var access_token = _redis.Read("access_token");
+ var refresh_token = _redis.Read("refresh_token") == "null" ? "" : _redis.Read("refresh_token");
+ var access_token = _redis.Read("access_token") == "null" ? "" : _redis.Read("access_token");
if (string.IsNullOrEmpty(refresh_token) || string.IsNullOrEmpty(_redis.Read("access_token")))
{
//用户授权
@@ -75,12 +75,15 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
private void login()
{
var login_url = InsUrl + "/prod-api/api/web/collect/oauth2/login?grant_type=password&client_id=" + client_id + "&username=" + username + "&password=" + password;
- var login_res_str = HttpMethods.Get(login_url);
+ var login_res_str = HttpMethods.Post(login_url);
var login_res = JsonConvert.DeserializeObject(login_res_str);
var login_data = login_res.data;
- _redis.Write($"access_token", ((dynamic)login_data)?.access_token, TimeSpan.FromSeconds(200));
- _redis.Write($"client_secret", ((dynamic)login_data)?.client_secret, TimeSpan.FromSeconds(160000));
- _redis.Write($"refresh_token", ((dynamic)login_data)?.refresh_token, TimeSpan.FromSeconds(250));
+ string access_token = ((dynamic)login_data)?.access_token;
+ string client_secret = ((dynamic)login_data)?.client_secret;
+ string refresh_token = ((dynamic)login_data)?.refresh_token;
+ _redis.Write($"access_token", access_token, TimeSpan.FromSeconds(200));
+ _redis.Write($"client_secret", client_secret, TimeSpan.FromSeconds(160000));
+ _redis.Write($"refresh_token", refresh_token, TimeSpan.FromSeconds(250));
}
///
/// 刷新token
@@ -92,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
var refresh_url =
InsUrl + "/prod-api/api/web/collect/oauth2/refresh?grant_type=refresh_token&client_id=" +
client_id + "&client_secret=" + client_secret + "&refresh_token=" + refresh_token;
- var refresh_res_str = HttpMethods.Get(refresh_url);
+ var refresh_res_str = HttpMethods.Post(refresh_url);
var refresh_res = JsonConvert.DeserializeObject(refresh_res_str);
if (refresh_res == null || ((dynamic)refresh_res)?.code != 200)
{
@@ -101,8 +104,10 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
login();
return;
}
- _redis.Write($"access_token", ((dynamic)refresh_res)?.access_token, TimeSpan.FromSeconds(200));
- _redis.Write($"refresh_token", ((dynamic)refresh_res)?.refresh_token, TimeSpan.FromSeconds(250));
+ string atoken = ((dynamic)refresh_res)?.access_token;
+ string rtoken = ((dynamic)refresh_res)?.refresh_token;
+ _redis.Write($"access_token", atoken, TimeSpan.FromSeconds(200));
+ _redis.Write($"refresh_token", rtoken, TimeSpan.FromSeconds(250));
}
///
/// 校区基础数据