|
|
|
@ -1,47 +1,109 @@
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
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>
|
|
|
|
|
[HttpGet("UploadCloud/{id}")]
|
|
|
|
|
public void Preview()
|
|
|
|
|
{
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 基础配置 RFID读写
|
|
|
|
|
///// </summary>
|
|
|
|
|
//[ApiController]
|
|
|
|
|
//[Route("api/[controller]")]
|
|
|
|
|
//public class RfidReadWriteController
|
|
|
|
|
//{
|
|
|
|
|
// /// <summary>
|
|
|
|
|
// /// 预览
|
|
|
|
|
// /// 车型 的ASCLL、解析后信息
|
|
|
|
|
// /// </summary>
|
|
|
|
|
// [HttpPost("Preview")]
|
|
|
|
|
// public async Task<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("UploadCloud/{id}")]
|
|
|
|
|
public void RfidWriteValue()
|
|
|
|
|
{
|
|
|
|
|
// /// <summary>
|
|
|
|
|
// /// RFID写值
|
|
|
|
|
// /// </summary>
|
|
|
|
|
// [HttpGet("RfidWriteValue/{id}")]
|
|
|
|
|
// public async Task<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();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// RFID 识别
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("UploadCloud/{id}")]
|
|
|
|
|
public void RfidRecognition()
|
|
|
|
|
{
|
|
|
|
|
// //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);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 车型号返回
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("UploadCloud/{id}")]
|
|
|
|
|
public void ChargePositionDisable()
|
|
|
|
|
{
|
|
|
|
|
// //_RfidRwTool.WriteRfidSingleTagResult(bytesRfid, bytesEpc);
|
|
|
|
|
// return Result<bool>.Success();
|
|
|
|
|
// }
|
|
|
|
|
// /// <summary>
|
|
|
|
|
// /// RFID 识别
|
|
|
|
|
// /// </summary>
|
|
|
|
|
// [HttpGet("RfidRecognition")]
|
|
|
|
|
// public async Task<Result<string>> RfidRecognition()
|
|
|
|
|
// {
|
|
|
|
|
// //TODO::识别RFID 信息
|
|
|
|
|
// return Result<string>.Success();
|
|
|
|
|
// }
|
|
|
|
|
// /// <summary>
|
|
|
|
|
// /// 车型号返回
|
|
|
|
|
// /// </summary>
|
|
|
|
|
// [HttpGet("VelType")]
|
|
|
|
|
// public async Task<Result<List<string>>> VelType()
|
|
|
|
|
// {
|
|
|
|
|
// List<string> list = new List<string>();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// return Result<List<string>>.Success();
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|