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