FactoryCalendarController.cs
1.77 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
using Hh.Mes.POJO.Entity;
using Hh.Mes.Service;
using Hh.Mes.Service.Planned;
using Hh.Mes.Service.SystemAuth;
using Microsoft.AspNetCore.Mvc;
namespace WebMvc.Areas.Planned.Controllers
{
/// <summary>
/// 工厂日历
/// </summary>
[Area("Planned")]
public class FactoryCalendarController : BaseController
{
private readonly FactoryCalendarService factoryCalendarService;
public FactoryCalendarController(IAuth authUtil, FactoryCalendarService service) : base(authUtil)
{
factoryCalendarService = service;
factoryCalendarService.sysWebUser = authUtil.GetCurrentUser().User;
}
/// <summary>
/// 工厂日历查看
/// </summary>
/// <returns></returns>
public ActionResult Index()
{
return View();
}
[HttpPost]
public string Ins(base_factory_calendar entity)
{
var result = factoryCalendarService.Ins(entity);
return Serialize(result);
}
[HttpPost]
public string Edit(base_factory_calendar entity)
{
var result = factoryCalendarService.Edit(entity);
return Serialize(result);
}
[HttpPost]
public string GetFactoryCalendarList(string datetime, string condition)
{
return Serialize(factoryCalendarService.GetCalendarLineList(datetime, condition));
}
/// <summary>
/// 设置工作线体
/// </summary>
/// <returns></returns>
[HttpPost]
public string SetCalendarLineList(string datetime, string lineCode, bool Weekday)
{
return Serialize(factoryCalendarService.CalendarLineList(datetime, lineCode, Weekday).Result);
}
}
}