修改预制舱参数尖峰平谷的定义值,修改2放2充指令参数缺少的问题

This commit is contained in:
lixiaoyuan
2026-01-27 14:41:43 +08:00
parent 81dcd390ef
commit e9e00713d9
7 changed files with 53 additions and 93 deletions

View File

@@ -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)
{

View File

@@ -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()

View File

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