扫描数据回传接口

master
nodyang@aliyun.com 4 months ago
parent f7a00451ec
commit 1c3d9e4a15

@ -34,17 +34,18 @@ namespace SlnMesnac.TouchSocket
/// <summary>
/// 扫描的状态回传
/// </summary>
/// <param name="messageHeader"></param>
/// <param name="containerRegisterQuery"></param>
/// <param name="scanStatus"></param>
/// <returns></returns>
[EnableCors("cors")]
[WebApi(HttpMethodType.POST)]
public Back ScanStatus(ScanStatusSocket scanStatus)
{
BaseLog log = new BaseLog();
log.LogLevel = "Info";
log.ErrMsg = "";
log.Content = scanStatus.ToJsonString();
BaseLog log = new BaseLog
{
LogLevel = "Info",
ErrMsg = "",
Content = scanStatus.ToJsonString()
};
try
{
if (scanStatus.is_alarm == 1 && scanStatus.device_status != null && scanStatus.device_status.Count > 0)
@ -76,32 +77,31 @@ namespace SlnMesnac.TouchSocket
return new Back();
}
/// <summary>
/// 入库开始
/// 扫描数据回传接口
/// </summary>
/// <param name="messageHeader"></param>
/// <param name="containerRegisterQuery"></param>
/// <param name="scanLog"></param>
/// <returns></returns>
[EnableCors("cors")]
[WebApi(HttpMethodType.POST)]
public Back ScanBack(ScanLogSocket scanLogStatus)
public Back ScanBack(ScanLogSocket scanLog)
{
BaseLog log = new BaseLog();
log.LogLevel = "Info";
log.ErrMsg = "";
log.Content = scanLogStatus.ToJsonString();
log.Content = scanLog.ToJsonString();
try
{
var model = new ScanLogModel()
{
CreateTime = scanLogStatus.CreateTime,
DataType = scanLogStatus.data_type,
Code = scanLogStatus.code,
Rfid = scanLogStatus.rfid,
Ocr = scanLogStatus.ocr,
Url = scanLogStatus.url
CreateTime = scanLog.CreateTime,
DataType = scanLog.data_type,
Code = scanLog.code,
Rfid = scanLog.rfid,
Ocr = scanLog.ocr,
Url = scanLog.url
};

Loading…
Cancel
Save