using SlnMesnac.RfidUpload.Model;
using SlnMesnac.RfidUpload.Model.apiParam;
using System;
using System.Collections.Generic;
using System.Text;
using TouchSocket.Rpc;
using TouchSocket.WebApi;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* 版权所有 (c) 2024 WenJY 保留所有权利。
* CLR版本:4.0.30319.42000
* 机器名称:T14-GEN3-7895
* 命名空间:SlnMesnac.RfidUpload.TouchSocket
* 唯一标识:f4ca948d-1fdb-4241-8251-2858f027de04
*
* 创建者:WenJY
* 电子邮箱:
* 创建时间:2024-07-02 15:42:57
* 版本:V1.0.0
* 描述:
*
*--------------------------------------------------------------------
* 修改人:
* 时间:
* 修改说明:
*
* 版本:V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace SlnMesnac.RfidUpload.TouchSocket
{
public partial class ApiServer : RpcServer
{
private static ApiServer instance;
private ApiServer() { }
public static ApiServer GetInstance()
{
if (instance == null)
{
lock (typeof(ApiServer))
{
if (instance == null)
{
instance = new ApiServer();
}
}
}
return instance;
}
public delegate void RefreshScanInfoInCenterStart();
///
/// 入库开始事件刷新
///
public event RefreshScanInfoInCenterStart RefreshScanInfoInCenterStartEvent;
public delegate void RefreshScanInfoInCenterStop();
///
/// 入库结束事件刷新
///
public event RefreshScanInfoInCenterStop RefreshScanInfoInCenterStopEvent;
public delegate void RefreshScanInfoOutCenterStart();
///
/// 出库开始事件刷新
///
public event RefreshScanInfoOutCenterStart RefreshScanInfoOutCenterStartEvent;
public delegate void RefreshScanInfoOutCenterStop();
///
/// 出库结束事件刷新
///
public event RefreshScanInfoOutCenterStop RefreshScanInfoOutCenterStopEvent;
///
/// 入库开始
///
///
///
///
[EnableCors("cors")]
[WebApi(HttpMethodType.POST)]
public ApiResult getScanInfoInCenterStart(string messageHeader,InStoreParam containerRegisterQuery)
{
RefreshScanInfoInCenterStartEvent?.Invoke();
return ApiResult.Success();
}
///
/// 入库结束
///
///
///
///
[EnableCors("cors")]
[WebApi(HttpMethodType.POST)]
public ApiResult getScanInfoInCenterStop(string messageHeader, InStoreParam containerRegisterQuery)
{
RefreshScanInfoInCenterStopEvent?.Invoke();
return ApiResult.Success();
}
///
/// 出库开始
///
///
///
///
[WebApi(HttpMethodType.POST)]
public ApiResult getScanInfoOutCenterStart(string messageHeader, OutStoreParam containerRegisterQuery)
{
RefreshScanInfoOutCenterStartEvent?.Invoke();
return ApiResult.Success();
}
///
/// 出库结束
///
///
///
///
[WebApi(HttpMethodType.POST)]
public ApiResult getScanInfoOutCenterStop(string messageHeader, OutStoreParam containerRegisterQuery)
{
RefreshScanInfoOutCenterStopEvent?.Invoke();
return ApiResult.Success();
}
}
}