EchartsDataController.cs
2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
using Infrastructure;
using Microsoft.AspNetCore.Mvc;
using System;
using WebApp;
using WebRepository;
namespace WebMvc
{
[Area("base")]
public class EchartsDataController : Controller
{
private readonly EchartsDataApp _app;
private Response Result = new Response();
public EchartsDataController(IUnitWork unitWork)
{
_app = new EchartsDataApp(unitWork);
}
/// <summary>
/// 获取库位利用率
/// </summary>
/// <returns></returns>
[HttpPost]
public string GetWareCellOption()
{
try
{
return JsonHelper.Instance.Serialize(_app.GetWareCellCount());
}
catch (Exception ex)
{
Result.Status = false;
Result.Message = ex.Message;
}
return JsonHelper.Instance.Serialize(Result);
}
/// <summary>
/// 最近7天每日收发货量
/// </summary>
/// <returns></returns>
[HttpPost]
public string GetWeekTaskInfo()
{
try
{
return JsonHelper.Instance.Serialize(_app.GetWeekTask());
}
catch (Exception ex)
{
Result.Status = false;
Result.Message = ex.Message;
}
return JsonHelper.Instance.Serialize(Result);
}
/// <summary>
/// 待执行出入库任务
/// </summary>
/// <returns></returns>
[HttpPost]
public string GetExceTaskInfo()
{
try
{
return JsonHelper.Instance.Serialize(_app.GetWaitTask());
}
catch (Exception ex)
{
Result.Status = false;
Result.Message = ex.Message;
}
return JsonHelper.Instance.Serialize(Result);
}
/// <summary>
/// 库存概况
/// </summary>
/// <returns></returns>
[HttpPost]
public string GetMaterielInfo()
{
try
{
return JsonHelper.Instance.Serialize(_app.GetMaterielByGroup());
}
catch (Exception ex)
{
Result.Status = false;
Result.Message = ex.Message;
}
return JsonHelper.Instance.Serialize(Result);
}
}
}