diff --git a/SlnMesnac.TouchSocket/ApiServer.cs b/SlnMesnac.TouchSocket/ApiServer.cs index 33a2a5f..a2268d4 100644 --- a/SlnMesnac.TouchSocket/ApiServer.cs +++ b/SlnMesnac.TouchSocket/ApiServer.cs @@ -34,17 +34,18 @@ namespace SlnMesnac.TouchSocket /// /// 扫描的状态回传 /// - /// - /// + /// /// [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(); } - - + + /// - /// 入库开始 + /// 扫描数据回传接口 /// - /// - /// + /// /// [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 };