Sfoglia il codice sorgente

优化首页速度慢,解决支出预算获取列表报错

金隅分支
zhangli 3 anni fa
parent
commit
d478f63a40
13 ha cambiato i file con 103 aggiunte e 30 eliminazioni
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs
  2. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs
  3. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs
  4. +31
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
  5. +5
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGTypeController.cs
  6. +5
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/DepartmentController.cs
  7. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs
  8. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js
  9. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/indexNavigation.js
  10. +21
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js
  11. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminTheme5/index.js
  12. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminWindos/Index.js
  13. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs Vedi File

@@ -435,7 +435,7 @@ namespace Learun.Application.Organization
if (dic == null)
{
dic = new Dictionary<string, DepartmentModel>();
var list = departmentService.GetAllList();
var list = departmentService.GetAllListForMap();
foreach (var item in list)
{
DepartmentModel model = new DepartmentModel()


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs Vedi File

@@ -78,6 +78,35 @@ namespace Learun.Application.Organization
}
}
}


/// <summary>
/// 获取部门列表信息 部门映射
/// </summary>
/// <returns></returns>
public IEnumerable<DepartmentEntity> GetAllListForMap()
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(" F_CompanyId,F_ParentId,F_FullName,F_DepartmentId ");
strSql.Append(" FROM LR_Base_Department t WHERE t.F_EnabledMark = 1 AND t.F_DeleteMark = 0 ");
return this.BaseRepository().FindList<DepartmentEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取部门数据实体
/// </summary>


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs Vedi File

@@ -685,7 +685,8 @@ namespace Learun.Application.Organization
if (dic == null)
{
dic = new Dictionary<string, UserModel>();
var list = userService.GetAllList();
var list = userService.GetAllListForMap();
string fileHeadImg = Config.GetValue("fileHeadImg");
foreach (var item in list)
{
UserModel model = new UserModel()
@@ -698,7 +699,6 @@ namespace Learun.Application.Organization
string img = "";
if (!string.IsNullOrEmpty(item.F_HeadIcon))
{
string fileHeadImg = Config.GetValue("fileHeadImg");
string fileImg = string.Format("{0}/{1}{2}", fileHeadImg, item.F_UserId, item.F_HeadIcon);
if (DirFileHelper.IsExistFile(fileImg))
{


+ 31
- 1
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs Vedi File

@@ -154,7 +154,7 @@ namespace Learun.Application.Organization
{
try
{
return this.BaseRepository().FindList<UserEntity>(a =>a.F_Description == "教师"&&a.F_DeleteMark==1&&a.F_EnabledMark==1).ToList().Count() > 0 ? true : false;
return this.BaseRepository().FindList<UserEntity>(a => a.F_Description == "教师" && a.F_DeleteMark == 1 && a.F_EnabledMark == 1).ToList().Count() > 0 ? true : false;
}
catch (Exception ex)
{
@@ -252,6 +252,36 @@ namespace Learun.Application.Organization
}
}
}

/// <summary>
/// 用户列表,全部
/// </summary>
/// <returns></returns>
public IEnumerable<UserEntity> GetAllListForMap()
{
try
{
var fieldStr = @"t.F_CompanyId,t.F_DepartmentId,t.F_RealName,t.F_Mobile,t.F_HeadIcon,
t.F_UserId,t.F_Gender,t.F_Password, ";
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldStr.Replace("t.F_Password,", "").Replace("t.F_Secretkey,", ""));
strSql.Append(" FROM LR_Base_User t WHERE t.F_DeleteMark = 0 ORDER BY t.F_CompanyId,t.F_DepartmentId,t.F_RealName ");
return this.BaseRepository().FindList<UserEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 用户列表(导出Excel)
/// </summary>


+ 5
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGTypeController.cs Vedi File

@@ -1,4 +1,5 @@
using Learun.Application.Language;
using System.Collections.Generic;
using Learun.Application.Language;
using Learun.Util;
using System.Web.Mvc;

@@ -47,8 +48,9 @@ namespace Learun.Application.Web.Areas.LR_LGManager.Controllers
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = lGTypeIBLL.GetList(queryJson);
return Success(data);
// var data = lGTypeIBLL.GetList(queryJson);
//return Success(data);
return Success(new List<LGTypeEntity>());
}
/// <summary>
/// 获取列表分页数据


+ 5
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/DepartmentController.cs Vedi File

@@ -1,4 +1,5 @@
using Learun.Application.Organization;
using System.Collections.Generic;
using Learun.Application.Organization;
using Learun.Util;
using System.Linq;
using System.Web.Mvc;
@@ -17,6 +18,8 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
private DepartmentIBLL departmentIBLL = new DepartmentBLL();
private CompanyIBLL companyIBLL = new CompanyBLL();

private static DepartmentIBLL departmentIBLL_static = new DepartmentBLL();
private static Dictionary<string, DepartmentModel> mapData= departmentIBLL_static.GetModelMap();
#region 获取视图
/// <summary>
/// 主页
@@ -125,7 +128,7 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
[AjaxOnly]
public ActionResult GetMap(string ver)
{
var data = departmentIBLL.GetModelMap();
var data = mapData;//departmentIBLL.GetModelMap();
string md5 = Md5Helper.Encrypt(data.ToJson(), 32);
if (md5 == ver)
{


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs Vedi File

@@ -27,6 +27,8 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers

private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL();

private static UserIBLL userIBLL_static = new UserBLL();
private static Dictionary<string, UserModel> mapData = userIBLL_static.GetModelMap();

#region 获取视图

@@ -234,7 +236,7 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
[AjaxOnly]
public ActionResult GetMap(string ver)
{
var data = userIBLL.GetModelMap();
var data = mapData;//userIBLL.GetModelMap();
string md5 = Md5Helper.Encrypt(data.ToJson(), 32);
if (md5 == ver)
{


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js Vedi File

@@ -1049,5 +1049,5 @@ var bootstrap = function ($, learun) {
}
};

im.init();
//im.init();
};

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/indexNavigation.js Vedi File

@@ -1015,5 +1015,5 @@ var bootstrap = function ($, learun) {
}
};

im.init();
//im.init();
};

+ 21
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js Vedi File

@@ -114,7 +114,7 @@ $(function () {
var n = $(this).parents(".col-xs-6");
var o = n.attr("data-Id");
var p = $(this)[0].item;
if (d[o].F_ItemUrl) {
top.learun.frameTab.open({
F_ModuleId: "dtlist" + p.f_id,
@@ -143,10 +143,10 @@ $(function () {
F_UrlAddress: "/Utility/ListContentIndexLost?id=" + p.f_id
});
} else {
top.learun.frameTab.open({
F_ModuleId: "dtlist" + p.f_id,
F_FullName: p.f_title,
F_UrlAddress: "/Utility/ListContentIndex?id=" + p.f_id
top.learun.frameTab.open({
F_ModuleId: "dtlist" + p.f_id,
F_FullName: p.f_title,
F_UrlAddress: "/Utility/ListContentIndex?id=" + p.f_id
})
}

@@ -306,17 +306,24 @@ $(function () {
}
}

$(".lr-desktop-panel").lrscroll();
top.learun.clientdata.getAsync("desktop", {
callback: function (g) {
c(g.list || []);
e(g.target || []);
a(g.chart || [])
}
setTimeout(onload(), 10000);

})
funopen();
function onload() {

$(".lr-desktop-panel").lrscroll();
top.learun.clientdata.getAsync("desktop",
{
callback: function(g) {
c(g.list || []);
e(g.target || []);
a(g.chart || []);
}

});
funopen();
}
window.setInterval(funopen, 60000);

//window.clearInterval(t1);
//消息提醒
function funopen() {


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminTheme5/index.js Vedi File

@@ -747,5 +747,5 @@ var bootstrap = function ($, learun) {
}
};

im.init();
//im.init();
};

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminWindos/Index.js Vedi File

@@ -906,5 +906,5 @@ var bootstrap = function ($, learun) {
}
};

im.init();
//im.init();
};

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageService.cs Vedi File

@@ -69,12 +69,12 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
t.PIncomeId,
t.PAmount,
t.PStatus,
t.PProcessId
t.PProcessId,
t.PDept,
t.PTime
");
strSql.Append(" FROM FD_PayManage t ");
strSql.Append(" WHERE 1=1 and PIsDelete<>1");
strSql.Append(" WHERE 1=1 and PIsDelete<>1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });


Caricamento…
Annulla
Salva