You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.2 KiB
C#

2 months ago
using System;
using System.Collections.Generic;
using System.Text;
using TouchSocket.Rpc;
using TouchSocket.WebApi;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* (c) 2024 WenJY
* CLR4.0.30319.42000
* T14-GEN3-7895
* SlnMesnac.TouchSocket
* 649766cc-308e-4bf3-8d69-dea48ec40642
*
* WenJY
*
* 2024-09-04 10:51:54
* V1.0.0
*
*
*--------------------------------------------------------------------
*
*
*
*
* V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace SlnMesnac.TouchSocket
{
public class ApiServer: RpcServer
{
public delegate void RefreshScanInfoInCenterStart();
/// <summary>
/// 入库开始事件刷新
/// </summary>
public event RefreshScanInfoInCenterStart RefreshScanInfoInCenterStartEvent;
public delegate void RefreshScanInfoInCenterStop();
/// <summary>
/// 入库结束事件刷新
/// </summary>
public event RefreshScanInfoInCenterStop RefreshScanInfoInCenterStopEvent;
public delegate void RefreshScanInfoOutCenterStart();
/// <summary>
/// 出库开始事件刷新
/// </summary>
public event RefreshScanInfoOutCenterStart RefreshScanInfoOutCenterStartEvent;
public delegate void RefreshScanInfoOutCenterStop();
/// <summary>
/// 出库结束事件刷新
/// </summary>
public event RefreshScanInfoOutCenterStop RefreshScanInfoOutCenterStopEvent;
/// <summary>
/// 入库开始
/// </summary>
/// <param name="messageHeader"></param>
/// <returns></returns>
[EnableCors("cors")]
[WebApi(HttpMethodType.POST)]
public object getScanInfoInCenterStart(string messageHeader)
{
RefreshScanInfoInCenterStartEvent?.Invoke();
return true;
}
/// <summary>
/// 入库结束
/// </summary>
/// <param name="messageHeader"></param>
/// <returns></returns>
[EnableCors("cors")]
[WebApi(HttpMethodType.POST)]
public object getScanInfoInCenterStop(string messageHeader)
{
RefreshScanInfoInCenterStopEvent?.Invoke();
return true;
}
/// <summary>
/// 出库开始
/// </summary>
/// <param name="messageHeader"></param>
/// <returns></returns>
[WebApi(HttpMethodType.POST)]
public object getScanInfoOutCenterStart(string messageHeader)
{
RefreshScanInfoOutCenterStartEvent?.Invoke();
return true;
}
/// <summary>
/// 出库结束
/// </summary>
/// <param name="messageHeader"></param>
/// <returns></returns>
[WebApi(HttpMethodType.POST)]
public object getScanInfoOutCenterStop(string messageHeader)
{
RefreshScanInfoOutCenterStopEvent?.Invoke();
return true;
}
}
}