mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
修改预制舱参数尖峰平谷的定义值,修改2放2充指令参数缺少的问题
This commit is contained in:
@@ -155,17 +155,19 @@ void SysPolicy::getGatewayJsonPeriods(njson& json)
|
||||
if (vecPeriods1.size()>0)
|
||||
{
|
||||
map<string, vector<int>> mapT;
|
||||
for (auto& item: vecPeriods1[0])
|
||||
for (int i = 0; i<vecPeriods1.size(); ++i)
|
||||
{
|
||||
int h = 0; int m = 0;
|
||||
PeriodsTimeStrToInt(item.first, h, m);
|
||||
int p = 0;
|
||||
PeriodsStrToInt(item.second, p);
|
||||
char str[5] = {};
|
||||
sprintf(str, "%02d:%02d", h, m);
|
||||
mapT[str] = {h, m, p};
|
||||
for (auto& item: vecPeriods1[i])
|
||||
{
|
||||
int h = 0; int m = 0;
|
||||
PeriodsTimeStrToInt(item.first, h, m);
|
||||
int p = 0;
|
||||
PeriodsStrToInt(item.second, p);
|
||||
char str[5] = {};
|
||||
sprintf(str, "%02d:%02d", h, m);
|
||||
mapT[str] = {h, m, p};
|
||||
}
|
||||
}
|
||||
|
||||
njson jsonArray = njson::array();
|
||||
for (auto& item: mapT)
|
||||
{
|
||||
|
||||
@@ -238,11 +238,11 @@ string Station::getGatewayMode()
|
||||
|
||||
static map<int, string> mapPeriodType =
|
||||
{
|
||||
{1, "谷"}, {2, "平"}, {3, "峰"}, {4, "尖"}
|
||||
{0, "无"}, { 1, "尖" }, {2, "峰"}, {3, "平"}, {4, "谷"}, {5, "深谷"},
|
||||
};
|
||||
static map<int, string> mapPeriodOper =
|
||||
{
|
||||
{0, "停"}, {1, "充"}, {2, "充"}, {3, "放"}, {4, "放"}
|
||||
{0, "停"}, {1, "放"}, {2, "放"}, {3, "充"}, {4, "充"}, {5, "充"}
|
||||
};
|
||||
|
||||
string Station::getGatewayParam()
|
||||
|
||||
@@ -445,7 +445,7 @@ Errcode DAO::queryDeviceList(PageInfo& pageInfo, vector<Fields>& result)
|
||||
}
|
||||
Errcode DAO::queryDeviceListByStation(PageInfo& pageInfo, string stationId, vector<Fields>& result)
|
||||
{
|
||||
std::string sqlFrom = "FROM device d LEFT JOIN station s ON d.station_id =s.station_id WHERE d.station_id='" + stationId + "' ORDER BY station_id, sort_no";
|
||||
std::string sqlFrom = "FROM device d LEFT JOIN station s ON d.station_id =s.station_id WHERE d.station_id='" + stationId + "' ORDER BY d.station_id, d.sort_no";
|
||||
return QueryPagination("d.*, s.name station_name", sqlFrom, pageInfo, result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user