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
|
}
|
}
|