yl
2024-06-14 54bfe544f50d0933ebc27583decb9ab61e01146f
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
101
102
103
104
105
106
107
108
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using VueWebCoreApi.DLL.BLL;
using VueWebCoreApi.Models;
using VueWebCoreApi.Tools;
 
namespace VueWebCoreApi.Controllers
{
    [ApiExplorerSettings(GroupName = "App安灯管理")]
    [ApiController]
    [Route("api/[controller]")]
    public class AppAnDonController : Controller
    {
        //定义全局信息返回变量
        ToMessage mes = new ToMessage();
        RedisCommon redis = new RedisCommon();
 
 
        #region[安灯呼叫扫描工位]
        /// <summary>
        /// 安灯呼叫扫描工位
        /// </summary>
        /// <param name="eqpcode">设备码</param>
        /// <returns></returns>
        [Route(template: "AppAnDonCallScanSearch")]
        [HttpPost]
        public JsonResult AppAnDonCallScanSearch(string eqpcode)
        {
            mes = AppAnDonBLL.AppAnDonCallScanSearch(eqpcode);
            return Json(mes);
        }
        #endregion
 
        #region[安灯呼叫,选择扫描工位带出呼叫类型选项及对应人员数据]
        /// <summary>
        /// 安灯呼叫,选择扫描工位带出呼叫类型选项及对应人员数据
        /// </summary>
        /// <param name="eqpcode">设备编码</param>
        /// <param name="wkshpcode">车间编码</param>
        /// <returns></returns>
        [Route(template: "AppAnDonCallItemSearch")]
        [HttpPost]
        public JsonResult AppAnDonCallItemSearch(string eqpcode, string wkshpcode)
        {
            mes = AppAnDonBLL.AppAnDonCallItemSearch(eqpcode, wkshpcode);
            return Json(mes);
        }
        #endregion
 
        #region[安灯呼叫提交]
        /// <summary>
        /// 安灯呼叫提交
        /// </summary>
        /// <param name="eqpcode">设备编码</param>
        /// <param name="wkshpcode">车间编码</param>
        /// <param name="json">提交数据</param>
        /// <returns></returns>
        [Route(template: "AppAnDonCallSave")]
        [HttpPost]
        public JsonResult AppAnDonCallSave(string eqpcode, string wkshpcode, List<AnDnDate> json)
        {
            var token = HttpContext.Request.Headers["Token"].ToString();
            User us = JwtTools.Denocode(token.ToString());
            mes = AppAnDonBLL.AppAnDonCallSave(us, eqpcode, wkshpcode, json);
            return Json(mes);
        }
        #endregion
 
 
 
        #region[安灯响应扫描工位/设备]
        /// <summary>
        /// 安灯响应扫描工位/设备
        /// </summary>
        /// <param name="eqpcode">设备/工位编码</param>
        /// <returns></returns>
        [Route(template: "AppAnDonLampResponseScanSearch")]
        [HttpPost]
        public JsonResult AppAnDonLampResponseScanSearch(string eqpcode)
        {
            mes = AppAnDonBLL.AppAnDonLampResponseScanSearch(eqpcode);
            return Json(mes);
        }
        #endregion
 
        #region[安灯响应提交]
        /// <summary>
        /// 安灯响应提交
        /// </summary>
        /// <param name="eqpcode">设备编码</param>
        /// <param name="wkshpcode">车间编码</param>
        /// <param name="json">提交数据</param>
        /// <returns></returns>
        [Route(template: "AppAnDonLampResponseSave")]
        [HttpPost]
        public JsonResult AppAnDonLampResponseSave(string eqpcode, string wkshpcode, List<ObjectData> json)
        {
            var token = HttpContext.Request.Headers["Token"].ToString();
            User us = JwtTools.Denocode(token.ToString());
            mes = AppAnDonBLL.AppAnDonLampResponseSave(us, eqpcode, wkshpcode, json);
            return Json(mes);
        }
        #endregion
    }
}