赖素文
authored
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
using Hh.Mes.Common.config;
using Hh.Mes.Common.Json;
using Hh.Mes.Service;
using Hh.Mes.Service.Configure;
using Hh.Mes.Service.SystemAuth;
using Microsoft.AspNetCore.Mvc;
using System;
namespace WebMvc
{
public class HomeController : BaseController
{
private readonly SysCompanyService SysCompanyService;
private readonly BaseInfoCacheService baseInfo;
public HomeController(IAuth authUtil, SysCompanyService sysCompanyService, BaseInfoCacheService baseInfo) : base(authUtil)
{
this.baseInfo = baseInfo;
|
赖素文
authored
|
19
|
SysCompanyService = sysCompanyService;
|
唐召明
authored
|
20
|
if (_loginInfo != null) SysCompanyService.sysWebUser = _loginInfo;
|
赖素文
authored
|
21
22
|
}
|
赖素文
authored
|
23
24
25
|
/// <summary>
/// 枚举类在Hh.Mes.POJO dll 如果命名改了需要修改ResponseEnumJosn方法
/// </summary>
|
赖素文
authored
|
26
27
|
[ResponseCache(Duration = 60)]
public ActionResult Index()
|
唐召明
authored
|
28
29
|
{
if (_loginInfo == null) return Redirect("/Login/Index");
|
赖素文
authored
|
30
|
ResponseEnumJosn();
|
赖素文
authored
|
31
|
|
唐召明
authored
|
32
33
|
var dt = baseInfo.GetOneBaseInfo("base_equipment_type", false);
ViewBag.equipmentType = dt.ToJson();
|
赖素文
authored
|
34
|
ViewBag.copyright = "Copyright © " + DateTime.Now.ToString("yyyy ") + AppSettings.GetAppSeting("copyright");
|
赖素文
authored
|
35
|
ViewBag.IsDevelopment = string.Format("var IsDevelopment={0}", ConfigRead.GetInstance.GetAppsetConnection().IsDevelopment.ToString().ToLower());
|
赖素文
authored
|
36
37
38
39
40
41
42
43
|
return View();
}
public ActionResult Main()
{
return View();
}
|
HuXiYu
authored
|
44
|
public ActionResult ProjectMap()
|
赖素文
authored
|
45
46
47
48
49
50
51
52
53
54
55
|
{
return View();
}
/// <summary>
/// 统计错误信息
/// </summary>
/// <returns></returns>
public string LogTips()
{
|
赖素文
authored
|
56
|
SysCompanyService.sysWebUser = _loginInfo;
|
赖素文
authored
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
var result = SysCompanyService.LogTips();
return Serialize(result);
}
/// <summary>
/// 更新清空日志提示
/// </summary>
[HttpGet]
public string UpdateLogTips(string flag)
{
return Serialize(SysCompanyService.UpdateLogTips(flag));
}
}
}
|