You can not 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
4.0 KiB
110 lines
4.0 KiB
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
|
|
{
|
|
/// <summary>
|
|
/// 基础配置 RFID读写
|
|
/// </summary>
|
|
//[ApiController]
|
|
//[Route("api/[controller]")]
|
|
public class RfidReadWriteController
|
|
{
|
|
// /// <summary>
|
|
// /// 预览
|
|
// /// 车型 的ASCLL、解析后信息
|
|
// /// </summary>
|
|
// [HttpPost("Preview")]
|
|
// public async BusinessTask<Result<RfidPreviewResp>> Preview([FromBody] RfidPreviewReq rfidPreviewReq)
|
|
// {
|
|
// RfidPreviewResp rfidPreviewRes = new RfidPreviewResp
|
|
// {
|
|
// AnalysisRfidInfo = "",
|
|
// GetAscllInfo = ""
|
|
// };
|
|
// //string strRfidRlt = ASCIIEncoding.ASCII.GetString(bytesRfid);
|
|
// return Result<RfidPreviewResp>.Success(rfidPreviewRes);
|
|
// }
|
|
|
|
// /// <summary>
|
|
// /// RFID写值
|
|
// /// </summary>
|
|
// [HttpGet("RfidWriteValue/{id}")]
|
|
// public async BusinessTask<Result<bool>> 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<bool>.Success();
|
|
// }
|
|
// /// <summary>
|
|
// /// RFID 识别
|
|
// /// </summary>
|
|
// [HttpGet("RfidRecognition")]
|
|
// public async BusinessTask<Result<string>> RfidRecognition()
|
|
// {
|
|
// //TODO::识别RFID 信息
|
|
// return Result<string>.Success();
|
|
// }
|
|
// /// <summary>
|
|
// /// 车型号返回
|
|
// /// </summary>
|
|
// [HttpGet("VelType")]
|
|
// public async BusinessTask<Result<List<string>>> VelType()
|
|
// {
|
|
// List<string> list = new List<string>();
|
|
|
|
// return Result<List<string>>.Success();
|
|
// }
|
|
}
|
|
}
|