using Entity.Api.Req; using Microsoft.AspNetCore.Mvc; using System.ComponentModel; using System.Text; using System; using Entity.Api.Resp; using HybirdFrameworkCore.Entity; namespace WebStarter.Controllers.BasicConfig { /// /// 基础配置 RFID读写 /// //[ApiController] //[Route("api/[controller]")] public class RfidReadWriteController { // /// // /// 预览 // /// 车型 的ASCLL、解析后信息 // /// // [HttpPost("Preview")] // public async BusinessTask> Preview([FromBody] RfidPreviewReq rfidPreviewReq) // { // RfidPreviewResp rfidPreviewRes = new RfidPreviewResp // { // AnalysisRfidInfo = "", // GetAscllInfo = "" // }; // //string strRfidRlt = ASCIIEncoding.ASCII.GetString(bytesRfid); // return Result.Success(rfidPreviewRes); // } // /// // /// RFID写值 // /// // [HttpGet("RfidWriteValue/{id}")] // public async BusinessTask> RfidWriteValue() // { // //string strResult = ""; // ////strHexVelNoRlt 16进制字符串 保存车辆信息 // //string strHexVelNoRlt = ""; // ////车辆VIN码 // //string strVelVin = txtVelVin.Text.Trim(); // ////车型号 // //string strVelType = txtVelType.Text.Trim(); // ////车辆MAC // //string strVelMac = txtVelMac.Text.Trim(); // ////车牌号 // //string strVelNo = txtVelNo.Text.Trim(); // //if (!string.IsNullOrEmpty(strVelVin)) // //{ // // strResult += "C-" + strVelVin; // //} // //else // //{ // // strResult += "C-" + " "; // //} // //if (!string.IsNullOrEmpty(strVelType)) // //{ // // strResult += "&" + strVelType; // //} // //else // //{ // // strResult += "&" + " "; // //} // //if (!string.IsNullOrEmpty(strVelMac)) // //{ // // strResult += "&" + strVelMac.Replace(" ", ""); // //} // //else // //{ // // strResult += "&" + " "; // //} // //if (!string.IsNullOrEmpty(strVelNo)) // //{ // // Encoding toEcoding = Encoding.GetEncoding("gb2312"); // // byte[] bytesVelNo = toEcoding.GetBytes(strVelNo); // // strHexVelNoRlt = ByteConvert.BytesToHexStr(bytesVelNo); // //} // //txtStartRfidCode.Text = strResult; // //bytesRfid = System.Text.ASCIIEncoding.ASCII.GetBytes(strResult); // //byte[] bytesEpc = System.Text.ASCIIEncoding.ASCII.GetBytes(strHexVelNoRlt); // //_RfidRwTool.WriteRfidSingleTagResult(bytesRfid, bytesEpc); // return Result.Success(); // } // /// // /// RFID 识别 // /// // [HttpGet("RfidRecognition")] // public async BusinessTask> RfidRecognition() // { // //TODO::识别RFID 信息 // return Result.Success(); // } // /// // /// 车型号返回 // /// // [HttpGet("VelType")] // public async BusinessTask>> VelType() // { // List list = new List(); // return Result>.Success(); // } } }