添加换电站基础信息Const

zw
lch 6 months ago
parent e8430eb96b
commit a0a4e1c3c0

@ -0,0 +1,154 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Entity.Api.Req
{
/// <summary>
/// 编辑站点基础信息
/// </summary>
public class StationBaseInfoReq
{
/// <summary>
/// 换电站编码
/// </summary>
public string StationNo { get; set; } = null!;
/// <summary>
/// 换电站名称
/// </summary>
public string StationName { get; set; } = null!;
/// <summary>
/// 站类型
/// </summary>
public string StationType { get; set; } = null!;
/// <summary>
/// 换电站识别号
/// </summary>
public string StationSn { get; set; } = null!;
/// <summary>
/// 地理位置
/// </summary>
public string StationLocation { get; set; } = null!;
/// <summary>
/// 经度
/// </summary>
public string Longitude { get; set; } = null!;
/// <summary>
/// 纬度
/// </summary>
public string Latitude { get; set; } = null!;
/// <summary>
/// 区域编号
/// </summary>
public string AreaCode { get; set; } = null!;
/// <summary>
/// 区域名称
/// </summary>
public string AreaName { get; set; } = null!;
/// <summary>
/// 营运开始时间
/// </summary>
public DateTime Operatetionstime { get; set; }
/// <summary>
/// 营运结束时间
/// </summary>
public DateTime Operatetionetime { get; set; }
/// <summary>
/// 服务状态
/// </summary>
public sbyte Sevstatus { get; set; }
/// <summary>
/// 运营状态1营业状态 2暂停营业 3设备维护 4歇业状态
/// </summary>
public sbyte Status { get; set; }
/// <summary>
/// 投放时间
/// </summary>
public DateTime? LaunchTime { get; set; }
/// <summary>
/// 联系方式
/// </summary>
public string ContactWay { get; set; }
/// <summary>
/// 负责人
/// </summary>
public string Principal { get; set; }
/// <summary>
/// 所属运营企业
/// </summary>
public string StationCompany { get; set; }
/// <summary>
/// 所属运营企业统一社会信用代码
/// </summary>
public string SocialCreditCode { get; set; } = null!;
/// <summary>
/// 站控主机软件版本号
/// </summary>
public string StationSftVer { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; } = null!;
/// <summary>
/// 换电站基础信息版本号
/// </summary>
public string StationVersion { get; set; }
/// <summary>
/// 换电站硬件版本
/// </summary>
public sbyte? HardwareVersion { get; set; }
/// <summary>
/// 总体故障等级
/// </summary>
public int? Faultlevel { get; set; }
/// <summary>
/// 加解锁方式
/// </summary>
public sbyte? LockType { get; set; }
/// <summary>
/// 进入方式
/// </summary>
public sbyte? AccessType { get; set; }
/// <summary>
/// 举升方式
/// </summary>
public sbyte? RiseType { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? ModifyTime { get; set; }
/// <summary>
/// 配电容量kVA
/// </summary>
public int? DistributionCapacity { get; set; }
/// <summary>
/// 总功率kW
/// </summary>
public int? TotalPower { get; set; }
/// <summary>
/// 省份
/// </summary>
public string StationProvince { get; set; }
/// <summary>
/// 城市
/// </summary>
public string StationCity { get; set; }
/// <summary>
/// 组织机构ID
/// </summary>
public int? OrganizationId { get; set; }
/// <summary>
/// 站控电脑MAC地址
/// </summary>
public string StationMac { get; set; }
}
}

@ -14,151 +14,91 @@ namespace Entity.Api.Resp
/// <summary>
/// 换电站编码
/// </summary>
public string FStationNo { get; set; } = null!;
public string StationNo { get; set; } = null!;
/// <summary>
/// 换电站名称
/// </summary>
public string FStationName { get; set; } = null!;
public string StationName { get; set; } = null!;
/// <summary>
/// 站类型
/// </summary>
public string FStationType { get; set; } = null!;
public string StationType { get; set; } = null!;
/// <summary>
/// 换电站识别号
/// </summary>
public string FStationSn { get; set; } = null!;
public string StationSn { get; set; } = null!;
/// <summary>
/// 地理位置
/// </summary>
public string FStationLocation { get; set; } = null!;
public string StationLocation { get; set; } = null!;
/// <summary>
/// 经度
/// </summary>
public string FLongitude { get; set; } = null!;
public string Longitude { get; set; } = null!;
/// <summary>
/// 纬度
/// </summary>
public string FLatitude { get; set; } = null!;
public string Latitude { get; set; } = null!;
/// <summary>
/// 区域编号
/// </summary>
public string FAreaCode { get; set; } = null!;
public string AreaCode { get; set; } = null!;
/// <summary>
/// 区域名称
/// </summary>
public string FAreaName { get; set; } = null!;
public string AreaName { get; set; } = null!;
/// <summary>
/// 营运开始时间
/// </summary>
public DateTime FOperatetionstime { get; set; }
public string Operatetionstime { get; set; }
/// <summary>
/// 营运结束时间
/// </summary>
public DateTime FOperatetionetime { get; set; }
public string Operatetionetime { get; set; }
/// <summary>
/// 服务状态
/// </summary>
public sbyte FSevstatus { get; set; }
public sbyte Sevstatus { get; set; }
/// <summary>
/// 运营状态1营业状态 2暂停营业 3设备维护 4歇业状态
/// </summary>
public sbyte FStatus { get; set; }
public sbyte Status { get; set; }
/// <summary>
/// 投放时间
/// </summary>
public DateTime? FLaunchTime { get; set; }
public string? LaunchTime { get; set; }
/// <summary>
/// 联系方式
/// </summary>
public string FContactWay { get; set; }
public string ContactWay { get; set; }
/// <summary>
/// 负责人
/// </summary>
public string FPrincipal { get; set; }
public string Principal { get; set; }
/// <summary>
/// 所属运营企业
/// </summary>
public string FStationCompany { get; set; }
public string StationCompany { get; set; }
/// <summary>
/// 所属运营企业统一社会信用代码
/// </summary>
public string FSocialCreditCode { get; set; } = null!;
public string SocialCreditCode { get; set; } = null!;
/// <summary>
/// 站控主机软件版本号
/// </summary>
public string FStationSftVer { get; set; }
public string StationSftVer { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
public string FSupplierCode { get; set; } = null!;
public string SupplierCode { get; set; } = null!;
/// <summary>
/// 换电站基础信息版本号
/// </summary>
public string FStationVersion { get; set; }
public string StationVersion { get; set; }
/// <summary>
/// 换电站硬件版本
/// </summary>
public sbyte? FHardwareVersion { get; set; }
public sbyte? HardwareVersion { 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; }
}
}

@ -2,8 +2,154 @@
public class StationParamConst
{
#region 换电站基础信息
/// <summary>
/// 换电站编码
/// </summary>
public static readonly string StationNo = "Station.StationNo";
/// <summary>
/// 换电站名称
/// </summary>
public static readonly string StationName = "Station.StationName";
/// <summary>
/// 站类型
/// </summary>
public static readonly string StationType = "Station.StationType";
/// <summary>
/// 换电站识别号
/// </summary>
public static readonly string StationSn = "Station.StationSn";
/// <summary>
/// 地理位置
/// </summary>
public static readonly string StationLocation = "Station.StationLocation";
/// <summary>
/// 经度
/// </summary>
public static readonly string Longitude = "Station.Longitude";
/// <summary>
/// 纬度
/// </summary>
public static readonly string Latitude = "Station.Latitude";
/// <summary>
/// 区域编号
/// </summary>
public static readonly string AreaCode = "Station.AreaCode";
/// <summary>
/// 区域名称
/// </summary>
public static readonly string AreaName = "Station.AreaName";
/// <summary>
/// 营运开始时间
/// </summary>
public static readonly string OperatetionStartTime = "Station.OperatetionStartTime";
/// <summary>
/// 营运结束时间
/// </summary>
public static readonly string OperatetionEndtime = "Station.OperatetionEndtime";
/// <summary>
/// 服务状态
/// </summary>
public static readonly string Sevstatus = "Station.Sevstatus";
/// <summary>
/// 运营状态1营业状态 2暂停营业 3设备维护 4歇业状态
/// </summary>
public static readonly string Status = "Station.Status";
/// <summary>
/// 投放时间
/// </summary>
public static readonly string? LaunchTime = "Station.LaunchTime";
/// <summary>
/// 联系方式
/// </summary>
public static readonly string ContactWay = "Station.ContactWay";
/// <summary>
/// 负责人
/// </summary>
public static readonly string Principal = "Station.Principal";
/// <summary>
/// 所属运营企业
/// </summary>
public static readonly string StationCompany = "Station.StationCompany";
/// <summary>
/// 所属运营企业统一社会信用代码
/// </summary>
public static readonly string SocialCreditCode = "Station.SocialCreditCode";
/// <summary>
/// 站控主机软件版本号
/// </summary>
public static readonly string StationSftVer = "Station.StationSftVer";
/// <summary>
/// 供应商代码
/// </summary>
public static readonly string SupplierCode = "Station.SupplierCode";
/// <summary>
/// 换电站基础信息版本号
/// </summary>
public static readonly string StationVersion = "Station.StationVersion";
/// <summary>
/// 换电站硬件版本
/// </summary>
public static readonly string? HardwareVersion = "Station.HardwareVersion";
/// <summary>
/// 封面图片文件id
/// </summary>
public static readonly string Cover= "Station.Cover";
/// <summary>
/// 总体故障等级
/// </summary>
public static readonly string? Faultlevel= "Station.Faultlevel";
/// <summary>
/// 加解锁方式
/// </summary>
public static readonly string? LockType= "Station.LockType";
/// <summary>
/// 进入方式
/// </summary>
public static readonly string? AccessType= "Station.AccessType";
/// <summary>
/// 举升方式
/// </summary>
public static readonly string? RiseType= "Station.RiseType";
/// <summary>
/// 创建时间
/// </summary>
public static readonly string CreateTime = "Station.CreateTime";
/// <summary>
/// 修改时间
/// </summary>
public static readonly string? ModifyTime= "Station.ModifyTime";
/// <summary>
/// 配电容量kVA
/// </summary>
public static readonly string? DistributionCapacity= "Station.DistributionCapacity";
/// <summary>
/// 总功率kW
/// </summary>
public static readonly string? TotalPower= "Station.TotalPower";
/// <summary>
/// 省份
/// </summary>
public static readonly string StationProvince= "Station.StationProvince";
/// <summary>
/// 城市
/// </summary>
public static readonly string StationCity= "Station.StationCity";
/// <summary>
/// 组织机构ID
/// </summary>
public static readonly string? OrganizationId= "Station.OrganizationId";
/// <summary>
/// 站控电脑MAC地址
/// </summary>
public static readonly string StationMac= "Station.StationMac";
#endregion 换电站基础信息
//选包策略中最后结束充电时间需要>此值
public static readonly string SwapFinishChargeTime = "Station.SwapFinishChargeTime";

@ -11,8 +11,8 @@ namespace WebStarter.Controllers.BasicConfig
/// <summary>
/// 基础配置 RFID读写
/// </summary>
[ApiController]
[Route("api/[controller]")]
//[ApiController]
//[Route("api/[controller]")]
public class RfidReadWriteController
{
// /// <summary>

@ -1,45 +0,0 @@
using Entity.Api.Resp;
using Entity.DbModel.System.SysBaseObject;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Service.System;
using System.ComponentModel.DataAnnotations;
namespace WebStarter.Controllers.BasicConfig
{
/// <summary>
/// 基础配置 站点基础信息
/// </summary>
[ApiController]
[Route("api/[controller]")]
public class StationBasicInfoController
{
///// <summary>
///// 站点基础信息
///// </summary>
//[HttpGet("StationBaseInfo")]
//public async Task<Result<StationBaseInfoResp>> StationBaseInfo()
//{
// //TODO:: 从SysConfig中获取站点基础信息
// 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();
//}
}
}

@ -1,9 +1,13 @@
using Entity.Base;
using Entity.Api.Resp;
using Entity.Base;
using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.Init;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using Service.Station;
using Service.System;
using System.ComponentModel.DataAnnotations;
namespace WebStarter.Controllers.System
{
@ -73,19 +77,53 @@ namespace WebStarter.Controllers.System
await _sysConfigService.BatchDeleteConfig(input);
}
[HttpGet]
[Route("/api/sysConfig/GetStationNo")]
public string GetStationNo()
/// <summary>
/// 站点基础信息
/// </summary>
[HttpGet("StationBaseInfo")]
public async Task<Result<StationBaseInfoResp>> StationBaseInfo()
{
StationBaseInfoResp stationBaseInfoResp = new StationBaseInfoResp
{
return StaticStationInfo.StationName;
StationNo = _sysConfigService.Get(StationParamConst.StationNo),
StationName = _sysConfigService.Get(StationParamConst.StationName),
StationType = _sysConfigService.Get(StationParamConst.StationType),
StationSn = _sysConfigService.Get(StationParamConst.StationSn),
StationLocation = _sysConfigService.Get(StationParamConst.StationLocation),
Longitude = _sysConfigService.Get(StationParamConst.Longitude),
Latitude = _sysConfigService.Get(StationParamConst.Latitude),
AreaCode = _sysConfigService.Get(StationParamConst.AreaCode),
AreaName = _sysConfigService.Get(StationParamConst.AreaName),
Operatetionstime = _sysConfigService.Get(StationParamConst.StationNo),
Operatetionetime = _sysConfigService.Get(StationParamConst.StationNo),
Sevstatus = Convert.ToSByte(_sysConfigService.Get(StationParamConst.StationNo)),
Status = Convert.ToSByte(_sysConfigService.Get(StationParamConst.StationNo)),
LaunchTime = _sysConfigService.Get(StationParamConst.StationNo),
ContactWay = _sysConfigService.Get(StationParamConst.StationNo),
Principal = _sysConfigService.Get(StationParamConst.StationNo),
StationCompany = _sysConfigService.Get(StationParamConst.StationNo),
SocialCreditCode = _sysConfigService.Get(StationParamConst.StationNo),
StationSftVer = _sysConfigService.Get(StationParamConst.StationNo),
SupplierCode = _sysConfigService.Get(StationParamConst.StationNo),
StationVersion = _sysConfigService.Get(StationParamConst.StationNo),
HardwareVersion = Convert.ToSByte(_sysConfigService.Get(StationParamConst.StationNo)),
};
return Result<StationBaseInfoResp>.Success();
}
/// <summary>
/// 站点编辑
/// </summary>
[HttpPost("StationInfoEditor")]
public void StationInfoEditor()
{
[HttpGet]
[Route("/api/sysConfig/SetStationNo/{stationNo}")]
public bool SetStationNo(string stationNo)
}
[HttpPost]
[Route("/api/sysFile/uploadAvatar")]
public async Task<Result<SysFile>> UploadAvatar([Required] IFormFile file)
{
StaticStationInfo.StationName = stationNo;
return true;
return Result<SysFile>.Success();
}
}
}

Loading…
Cancel
Save