新增:站控基本信息、rfid 相关Controller模板

master
lch 6 months ago
parent f09f2cfde3
commit 64915ca164

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Entity.Api.Req
{
/// <summary>
/// 充电仓信息:充电站查询
/// </summary>
public class ChargePositionQueryReq
{
/// <summary>
/// 仓位编号
/// </summary>
public string? BinNum { get; set; }
/// <summary>
/// 仓位名称
/// </summary>
public string? BinName { get; set; }
}
}

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Entity.Api.Req
{
public class RfidPreviewReq
{
/// <summary>
/// 车辆VIN码
/// </summary>
public string strVelVin { get; set; }
/// <summary>
/// 车型号
/// </summary>
public string strVelType { get; set; }
/// <summary>
/// 车辆MAC
/// </summary>
public string strVelMac { get; set; }
/// <summary>
/// 车牌号
/// </summary>
public string strVelNo { get; set; }
}
}

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Entity.Api.Resp
{
public class RfidPreviewResp
{
/// <summary>
/// 预览:生成 ASCLL
/// </summary>
public string GetAscllInfo { get; set; }
/// <summary>
/// 预览解析后Rfid信息
/// </summary>
public string AnalysisRfidInfo { get; set; }
}
}

@ -0,0 +1,164 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Entity.Api.Resp
{
/// <summary>
/// 站点基础信息
/// </summary>
public class StationBaseInfoResp
{
/// <summary>
/// 换电站编码
/// </summary>
public string FStationNo { get; set; } = null!;
/// <summary>
/// 换电站名称
/// </summary>
public string FStationName { get; set; } = null!;
/// <summary>
/// 站类型
/// </summary>
public string FStationType { get; set; } = null!;
/// <summary>
/// 换电站识别号
/// </summary>
public string FStationSn { get; set; } = null!;
/// <summary>
/// 地理位置
/// </summary>
public string FStationLocation { get; set; } = null!;
/// <summary>
/// 经度
/// </summary>
public string FLongitude { get; set; } = null!;
/// <summary>
/// 纬度
/// </summary>
public string FLatitude { get; set; } = null!;
/// <summary>
/// 区域编号
/// </summary>
public string FAreaCode { get; set; } = null!;
/// <summary>
/// 区域名称
/// </summary>
public string FAreaName { get; set; } = null!;
/// <summary>
/// 营运开始时间
/// </summary>
public DateTime FOperatetionstime { get; set; }
/// <summary>
/// 营运结束时间
/// </summary>
public DateTime FOperatetionetime { get; set; }
/// <summary>
/// 服务状态
/// </summary>
public sbyte FSevstatus { get; set; }
/// <summary>
/// 运营状态1营业状态 2暂停营业 3设备维护 4歇业状态
/// </summary>
public sbyte FStatus { get; set; }
/// <summary>
/// 投放时间
/// </summary>
public DateTime? FLaunchTime { get; set; }
/// <summary>
/// 联系方式
/// </summary>
public string FContactWay { get; set; }
/// <summary>
/// 负责人
/// </summary>
public string FPrincipal { get; set; }
/// <summary>
/// 所属运营企业
/// </summary>
public string FStationCompany { get; set; }
/// <summary>
/// 所属运营企业统一社会信用代码
/// </summary>
public string FSocialCreditCode { get; set; } = null!;
/// <summary>
/// 站控主机软件版本号
/// </summary>
public string FStationSftVer { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
public string FSupplierCode { get; set; } = null!;
/// <summary>
/// 换电站基础信息版本号
/// </summary>
public string FStationVersion { get; set; }
/// <summary>
/// 换电站硬件版本
/// </summary>
public sbyte? FHardwareVersion { get; set; }
/// <summary>
/// 封面图片文件id
/// </summary>
public string FCover { get; set; }
/// <summary>
/// 总体故障等级
/// </summary>
public int? FFaultlevel { get; set; }
/// <summary>
/// 加解锁方式
/// </summary>
public sbyte? FLockType { get; set; }
/// <summary>
/// 进入方式
/// </summary>
public sbyte? FAccessType { get; set; }
/// <summary>
/// 举升方式
/// </summary>
public sbyte? FRiseType { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime FCreateTime { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? FModifyTime { get; set; }
/// <summary>
/// 配电容量kVA
/// </summary>
public int? FDistributionCapacity { get; set; }
/// <summary>
/// 总功率kW
/// </summary>
public int? FTotalPower { get; set; }
/// <summary>
/// 省份
/// </summary>
public string FStationProvince { get; set; }
/// <summary>
/// 城市
/// </summary>
public string FStationCity { get; set; }
/// <summary>
/// 组织机构ID
/// </summary>
public int? FOrganizationId { get; set; }
/// <summary>
/// 站控电脑MAC地址
/// </summary>
public string FStationMac { get; set; }
}
}

@ -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();
// }
}
}

@ -1,4 +1,5 @@
using Entity.DbModel.System.SysBaseObject;
using Entity.Api.Resp;
using Entity.DbModel.System.SysBaseObject;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
@ -15,28 +16,30 @@ namespace WebStarter.Controllers.BasicConfig
[Route("api/[controller]")]
public class StationBasicInfoController
{
/// <summary>
/// 站点基础信息
/// </summary>
[HttpPost("StationBaseInfo")]
public void StationBaseInfo()
{
///// <summary>
///// 站点基础信息
///// </summary>
//[HttpGet("StationBaseInfo")]
//public async Task<Result<StationBaseInfoResp>> StationBaseInfo()
//{
// //TODO:: 从SysConfig中获取站点基础信息
}
/// <summary>
/// 站点编辑
/// </summary>
[HttpPost("StationBaseInfo")]
public void StationInfoEditor()
{
// return Result<StationBaseInfoResp>.Success();
//}
///// <summary>
///// 站点编辑
///// </summary>
//[HttpPost("StationInfoEditor")]
//public void StationInfoEditor( )
//{
}
//}
[HttpPost]
[Route("/api/sysFile/uploadAvatar")]
public async Task<Result<SysFile>> UploadAvatar([Required] IFormFile file)
{
return Result<SysFile>.Success();
}
//[HttpPost]
//[Route("/api/sysFile/uploadAvatar")]
//public async Task<Result<SysFile>> UploadAvatar([Required] IFormFile file)
//{
// return Result<SysFile>.Success();
//}
}
}

@ -1,3 +1,4 @@
using Entity.Api.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
@ -13,14 +14,14 @@ public class ChargeMonitorController
/// <summary>
/// 充电仓查询:条件:仓位编号 仓位名称
/// </summary>
[HttpGet("UploadCloud/{id}")]
public void ChargePositionQuery()
{
}
///// <summary>
///// 充电仓查询:条件:仓位编号 仓位名称
///// </summary>
//[HttpPost("ChargePositionQuery")]
//public void ChargePositionQuery([FromBody] ChargePositionQueryReq chargePositionQueryReq)
//{
// //TODO:: 返回充电仓信息
//}
/// <summary>
/// 充电仓 0禁用 1启用

@ -40,6 +40,8 @@ builder.Host.ConfigureContainer<ContainerBuilder>(cb =>
var mapper = new SysMenuMapper();
mapper.Register(TypeAdapterConfig.GlobalSettings);
//在 Autofac 容器中注册IHttpContextAccessor 服务
builder.Services.AddHttpContextAccessor();
//跨域
builder.Services.AddCors(options =>

@ -2,7 +2,7 @@
"ConnectionStrings": {
"ConfigId": "master",
"DbType": "MySql",
"SqlConnection": "server=localhost;Port=3306;Database=winformdevframework;Uid=root;Pwd=123456;Charset=utf8;"
"SqlConnection": "server=192.168.2.2;Port=3306;Database=huanneng_dev;Uid=root;Pwd=Rszn123;Charset=utf8;"
},
"Update": {
"AutoUpdate": "false",

@ -2,7 +2,7 @@
"ConnectionStrings": {
"ConfigId": "master",
"DbType": "MySql",
"SqlConnection": "server=localhost;Port=3306;Database=winformdevframework;Uid=root;Pwd=123456;Charset=utf8;"
"SqlConnection": "server=192.168.2.2;Port=3306;Database=huanneng_dev;Uid=root;Pwd=Rszn123;Charset=utf8;"
},
"Update": {
"AutoUpdate": "false",

@ -1,11 +1,19 @@
{
"Version": 1,
"Hash": "7euZr+Skxn+CPwHhQ3H6LZuur9IzJqC+CYg6oY75X7A=",
"Hash": "FS59OvTZ9B6lpwaxIjb4jYpPMI2uWVuvwpvRJoWtEFc=",
"Source": "WebStarter",
"BasePath": "_content/WebStarter",
"Mode": "Default",
"ManifestType": "Build",
"ReferencedProjectsConfiguration": [],
"DiscoveryPatterns": [],
"DiscoveryPatterns": [
{
"Name": "WebStarter\\wwwroot",
"Source": "WebStarter",
"ContentRoot": "D:\\Desktop\\huannengMain\\WebStarter\\wwwroot\\",
"BasePath": "_content/WebStarter",
"Pattern": "**"
}
],
"Assets": []
}
Loading…
Cancel
Save