diff --git a/Entity/Api/Req/StationBaseInfoReq.cs b/Entity/Api/Req/StationBaseInfoReq.cs
new file mode 100644
index 0000000..262fe96
--- /dev/null
+++ b/Entity/Api/Req/StationBaseInfoReq.cs
@@ -0,0 +1,154 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Entity.Api.Req
+{
+ ///
+ /// 编辑站点基础信息
+ ///
+ public class StationBaseInfoReq
+ {
+ ///
+ /// 换电站编码
+ ///
+ public string StationNo { get; set; } = null!;
+ ///
+ /// 换电站名称
+ ///
+ public string StationName { get; set; } = null!;
+ ///
+ /// 站类型
+ ///
+ public string StationType { get; set; } = null!;
+ ///
+ /// 换电站识别号
+ ///
+ public string StationSn { get; set; } = null!;
+ ///
+ /// 地理位置
+ ///
+ public string StationLocation { get; set; } = null!;
+ ///
+ /// 经度
+ ///
+ public string Longitude { get; set; } = null!;
+ ///
+ /// 纬度
+ ///
+ public string Latitude { get; set; } = null!;
+ ///
+ /// 区域编号
+ ///
+ public string AreaCode { get; set; } = null!;
+ ///
+ /// 区域名称
+ ///
+ public string AreaName { get; set; } = null!;
+ ///
+ /// 营运开始时间
+ ///
+ public DateTime Operatetionstime { get; set; }
+ ///
+ /// 营运结束时间
+ ///
+ public DateTime Operatetionetime { get; set; }
+ ///
+ /// 服务状态
+ ///
+ public sbyte Sevstatus { get; set; }
+ ///
+ /// 运营状态:1营业状态 2暂停营业 3设备维护 4歇业状态
+ ///
+ public sbyte Status { get; set; }
+ ///
+ /// 投放时间
+ ///
+ public DateTime? LaunchTime { get; set; }
+ ///
+ /// 联系方式
+ ///
+ public string ContactWay { get; set; }
+ ///
+ /// 负责人
+ ///
+ public string Principal { get; set; }
+ ///
+ /// 所属运营企业
+ ///
+ public string StationCompany { get; set; }
+ ///
+ /// 所属运营企业统一社会信用代码
+ ///
+ public string SocialCreditCode { get; set; } = null!;
+ ///
+ /// 站控主机软件版本号
+ ///
+ public string StationSftVer { get; set; }
+ ///
+ /// 供应商代码
+ ///
+ public string SupplierCode { get; set; } = null!;
+ ///
+ /// 换电站基础信息版本号
+ ///
+ public string StationVersion { get; set; }
+ ///
+ /// 换电站硬件版本
+ ///
+ public sbyte? HardwareVersion { get; set; }
+
+ ///
+ /// 总体故障等级
+ ///
+ public int? Faultlevel { get; set; }
+
+ ///
+ /// 加解锁方式
+ ///
+ public sbyte? LockType { get; set; }
+
+ ///
+ /// 进入方式
+ ///
+ public sbyte? AccessType { get; set; }
+ ///
+ /// 举升方式
+ ///
+ public sbyte? RiseType { get; set; }
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+ ///
+ /// 修改时间
+ ///
+ public DateTime? ModifyTime { get; set; }
+ ///
+ /// 配电容量(kVA)
+ ///
+ public int? DistributionCapacity { get; set; }
+ ///
+ /// 总功率(kW)
+ ///
+ public int? TotalPower { get; set; }
+ ///
+ /// 省份
+ ///
+ public string StationProvince { get; set; }
+ ///
+ /// 城市
+ ///
+ public string StationCity { get; set; }
+ ///
+ /// 组织机构ID
+ ///
+ public int? OrganizationId { get; set; }
+ ///
+ /// 站控电脑MAC地址
+ ///
+ public string StationMac { get; set; }
+ }
+}
diff --git a/Entity/Api/Resp/StationBaseInfoResp.cs b/Entity/Api/Resp/StationBaseInfoResp.cs
index 7c3b856..f77a32b 100644
--- a/Entity/Api/Resp/StationBaseInfoResp.cs
+++ b/Entity/Api/Resp/StationBaseInfoResp.cs
@@ -14,151 +14,91 @@ namespace Entity.Api.Resp
///
/// 换电站编码
///
- public string FStationNo { get; set; } = null!;
+ public string StationNo { get; set; } = null!;
///
/// 换电站名称
///
- public string FStationName { get; set; } = null!;
+ public string StationName { get; set; } = null!;
///
/// 站类型
///
- public string FStationType { get; set; } = null!;
+ public string StationType { get; set; } = null!;
///
/// 换电站识别号
///
- public string FStationSn { get; set; } = null!;
+ public string StationSn { get; set; } = null!;
///
/// 地理位置
///
- public string FStationLocation { get; set; } = null!;
+ public string StationLocation { get; set; } = null!;
///
/// 经度
///
- public string FLongitude { get; set; } = null!;
+ public string Longitude { get; set; } = null!;
///
/// 纬度
///
- public string FLatitude { get; set; } = null!;
+ public string Latitude { get; set; } = null!;
///
/// 区域编号
///
- public string FAreaCode { get; set; } = null!;
+ public string AreaCode { get; set; } = null!;
///
/// 区域名称
///
- public string FAreaName { get; set; } = null!;
+ public string AreaName { get; set; } = null!;
///
/// 营运开始时间
///
- public DateTime FOperatetionstime { get; set; }
+ public string Operatetionstime { get; set; }
///
/// 营运结束时间
///
- public DateTime FOperatetionetime { get; set; }
+ public string Operatetionetime { get; set; }
///
/// 服务状态
///
- public sbyte FSevstatus { get; set; }
+ public sbyte Sevstatus { get; set; }
///
/// 运营状态:1营业状态 2暂停营业 3设备维护 4歇业状态
///
- public sbyte FStatus { get; set; }
+ public sbyte Status { get; set; }
///
/// 投放时间
///
- public DateTime? FLaunchTime { get; set; }
+ public string? LaunchTime { get; set; }
///
/// 联系方式
///
- public string FContactWay { get; set; }
+ public string ContactWay { get; set; }
///
/// 负责人
///
- public string FPrincipal { get; set; }
+ public string Principal { get; set; }
///
/// 所属运营企业
///
- public string FStationCompany { get; set; }
+ public string StationCompany { get; set; }
///
/// 所属运营企业统一社会信用代码
///
- public string FSocialCreditCode { get; set; } = null!;
+ public string SocialCreditCode { get; set; } = null!;
///
/// 站控主机软件版本号
///
- public string FStationSftVer { get; set; }
+ public string StationSftVer { get; set; }
///
/// 供应商代码
///
- public string FSupplierCode { get; set; } = null!;
+ public string SupplierCode { get; set; } = null!;
///
/// 换电站基础信息版本号
///
- public string FStationVersion { get; set; }
+ public string StationVersion { get; set; }
///
/// 换电站硬件版本
///
- public sbyte? FHardwareVersion { get; set; }
+ public sbyte? HardwareVersion { get; set; }
-
- ///
- /// 封面图片文件id
- ///
- public string FCover { get; set; }
-
-
-
-
-
- ///
- /// 总体故障等级
- ///
- public int? FFaultlevel { get; set; }
-
- ///
- /// 加解锁方式
- ///
- public sbyte? FLockType { get; set; }
-
- ///
- /// 进入方式
- ///
- public sbyte? FAccessType { get; set; }
- ///
- /// 举升方式
- ///
- public sbyte? FRiseType { get; set; }
- ///
- /// 创建时间
- ///
- public DateTime FCreateTime { get; set; }
- ///
- /// 修改时间
- ///
- public DateTime? FModifyTime { get; set; }
- ///
- /// 配电容量(kVA)
- ///
- public int? FDistributionCapacity { get; set; }
- ///
- /// 总功率(kW)
- ///
- public int? FTotalPower { get; set; }
- ///
- /// 省份
- ///
- public string FStationProvince { get; set; }
- ///
- /// 城市
- ///
- public string FStationCity { get; set; }
- ///
- /// 组织机构ID
- ///
- public int? FOrganizationId { get; set; }
- ///
- /// 站控电脑MAC地址
- ///
- public string FStationMac { get; set; }
}
}
diff --git a/Service/Station/StationParamConst.cs b/Service/Station/StationParamConst.cs
index 6e0b84c..bab9bf2 100644
--- a/Service/Station/StationParamConst.cs
+++ b/Service/Station/StationParamConst.cs
@@ -2,8 +2,154 @@
public class StationParamConst
{
+ #region 换电站基础信息
+ ///
+ /// 换电站编码
+ ///
public static readonly string StationNo = "Station.StationNo";
+ ///
+ /// 换电站名称
+ ///
public static readonly string StationName = "Station.StationName";
+ ///
+ /// 站类型
+ ///
+ public static readonly string StationType = "Station.StationType";
+ ///
+ /// 换电站识别号
+ ///
+ public static readonly string StationSn = "Station.StationSn";
+ ///
+ /// 地理位置
+ ///
+ public static readonly string StationLocation = "Station.StationLocation";
+ ///
+ /// 经度
+ ///
+ public static readonly string Longitude = "Station.Longitude";
+ ///
+ /// 纬度
+ ///
+ public static readonly string Latitude = "Station.Latitude";
+ ///
+ /// 区域编号
+ ///
+ public static readonly string AreaCode = "Station.AreaCode";
+ ///
+ /// 区域名称
+ ///
+ public static readonly string AreaName = "Station.AreaName";
+ ///
+ /// 营运开始时间
+ ///
+ public static readonly string OperatetionStartTime = "Station.OperatetionStartTime";
+ ///
+ /// 营运结束时间
+ ///
+ public static readonly string OperatetionEndtime = "Station.OperatetionEndtime";
+ ///
+ /// 服务状态
+ ///
+ public static readonly string Sevstatus = "Station.Sevstatus";
+ ///
+ /// 运营状态:1营业状态 2暂停营业 3设备维护 4歇业状态
+ ///
+ public static readonly string Status = "Station.Status";
+ ///
+ /// 投放时间
+ ///
+ public static readonly string? LaunchTime = "Station.LaunchTime";
+ ///
+ /// 联系方式
+ ///
+ public static readonly string ContactWay = "Station.ContactWay";
+ ///
+ /// 负责人
+ ///
+ public static readonly string Principal = "Station.Principal";
+ ///
+ /// 所属运营企业
+ ///
+ public static readonly string StationCompany = "Station.StationCompany";
+ ///
+ /// 所属运营企业统一社会信用代码
+ ///
+ public static readonly string SocialCreditCode = "Station.SocialCreditCode";
+ ///
+ /// 站控主机软件版本号
+ ///
+ public static readonly string StationSftVer = "Station.StationSftVer";
+ ///
+ /// 供应商代码
+ ///
+ public static readonly string SupplierCode = "Station.SupplierCode";
+ ///
+ /// 换电站基础信息版本号
+ ///
+ public static readonly string StationVersion = "Station.StationVersion";
+ ///
+ /// 换电站硬件版本
+ ///
+ public static readonly string? HardwareVersion = "Station.HardwareVersion";
+
+ ///
+ /// 封面图片文件id
+ ///
+ public static readonly string Cover= "Station.Cover";
+
+
+ ///
+ /// 总体故障等级
+ ///
+ public static readonly string? Faultlevel= "Station.Faultlevel";
+
+ ///
+ /// 加解锁方式
+ ///
+ public static readonly string? LockType= "Station.LockType";
+
+ ///
+ /// 进入方式
+ ///
+ public static readonly string? AccessType= "Station.AccessType";
+ ///
+ /// 举升方式
+ ///
+ public static readonly string? RiseType= "Station.RiseType";
+ ///
+ /// 创建时间
+ ///
+ public static readonly string CreateTime = "Station.CreateTime";
+ ///
+ /// 修改时间
+ ///
+ public static readonly string? ModifyTime= "Station.ModifyTime";
+ ///
+ /// 配电容量(kVA)
+ ///
+ public static readonly string? DistributionCapacity= "Station.DistributionCapacity";
+ ///
+ /// 总功率(kW)
+ ///
+ public static readonly string? TotalPower= "Station.TotalPower";
+ ///
+ /// 省份
+ ///
+ public static readonly string StationProvince= "Station.StationProvince";
+ ///
+ /// 城市
+ ///
+ public static readonly string StationCity= "Station.StationCity";
+ ///
+ /// 组织机构ID
+ ///
+ public static readonly string? OrganizationId= "Station.OrganizationId";
+ ///
+ /// 站控电脑MAC地址
+ ///
+ public static readonly string StationMac= "Station.StationMac";
+
+ #endregion 换电站基础信息
//选包策略中最后结束充电时间需要>此值
public static readonly string SwapFinishChargeTime = "Station.SwapFinishChargeTime";
diff --git a/WebStarter/Controllers/BasicConfig/RfidReadWriteController.cs b/WebStarter/Controllers/BasicConfig/RfidReadWriteController.cs
index c7c75f9..2f34d82 100644
--- a/WebStarter/Controllers/BasicConfig/RfidReadWriteController.cs
+++ b/WebStarter/Controllers/BasicConfig/RfidReadWriteController.cs
@@ -11,8 +11,8 @@ namespace WebStarter.Controllers.BasicConfig
///
/// 基础配置 RFID读写
///
- [ApiController]
- [Route("api/[controller]")]
+ //[ApiController]
+ //[Route("api/[controller]")]
public class RfidReadWriteController
{
// ///
diff --git a/WebStarter/Controllers/BasicConfig/StationBasicInfoController.cs b/WebStarter/Controllers/BasicConfig/StationBasicInfoController.cs
deleted file mode 100644
index 7cb165a..0000000
--- a/WebStarter/Controllers/BasicConfig/StationBasicInfoController.cs
+++ /dev/null
@@ -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
-{
-
- ///
- /// 基础配置 站点基础信息
- ///
- [ApiController]
- [Route("api/[controller]")]
- public class StationBasicInfoController
- {
- /////
- ///// 站点基础信息
- /////
- //[HttpGet("StationBaseInfo")]
- //public async Task> StationBaseInfo()
- //{
- // //TODO:: 从SysConfig中获取站点基础信息
-
- // return Result.Success();
- //}
- /////
- ///// 站点编辑
- /////
- //[HttpPost("StationInfoEditor")]
- //public void StationInfoEditor( )
- //{
-
- //}
-
- //[HttpPost]
- //[Route("/api/sysFile/uploadAvatar")]
- //public async Task> UploadAvatar([Required] IFormFile file)
- //{
- // return Result.Success();
- //}
- }
-}
diff --git a/WebStarter/Controllers/System/SysConfigController.cs b/WebStarter/Controllers/System/SysConfigController.cs
index 3b2277c..cb3d096 100644
--- a/WebStarter/Controllers/System/SysConfigController.cs
+++ b/WebStarter/Controllers/System/SysConfigController.cs
@@ -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()
+ ///
+ /// 站点基础信息
+ ///
+ [HttpGet("StationBaseInfo")]
+ public async Task> StationBaseInfo()
{
- return StaticStationInfo.StationName;
+ StationBaseInfoResp stationBaseInfoResp = new StationBaseInfoResp
+ {
+ 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.Success();
}
-
- [HttpGet]
- [Route("/api/sysConfig/SetStationNo/{stationNo}")]
- public bool SetStationNo(string stationNo)
+ ///
+ /// 站点编辑
+ ///
+ [HttpPost("StationInfoEditor")]
+ public void StationInfoEditor()
+ {
+
+ }
+
+ [HttpPost]
+ [Route("/api/sysFile/uploadAvatar")]
+ public async Task> UploadAvatar([Required] IFormFile file)
{
- StaticStationInfo.StationName = stationNo;
- return true;
+ return Result.Success();
}
}
}