mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
policy数据表新增is_del字段,查询接口进行数据过滤,修改尖峰平谷价格和类型值的映射错误问题
This commit is contained in:
@@ -469,7 +469,7 @@ Errcode DAO::updateDeviceById(Fields& params)
|
|||||||
// 策略管理
|
// 策略管理
|
||||||
Errcode DAO::queryPolicyList(PageInfo& pageInfo, vector<Fields>& result)
|
Errcode DAO::queryPolicyList(PageInfo& pageInfo, vector<Fields>& result)
|
||||||
{
|
{
|
||||||
std::string sqlFrom = "FROM " + DMPolicy::TABLENAME;
|
std::string sqlFrom = "FROM " + DMPolicy::TABLENAME + " WHERE is_del != '1'";
|
||||||
return QueryPagination("*", sqlFrom, pageInfo, result);
|
return QueryPagination("*", sqlFrom, pageInfo, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1949,10 +1949,10 @@ Errcode HttpEntity::queryEGridPeriod(const httplib::Request& req, njson& json, s
|
|||||||
{
|
{
|
||||||
int etype = item.get<int>("etype");
|
int etype = item.get<int>("etype");
|
||||||
float price = item.get<float>("price", 2);
|
float price = item.get<float>("price", 2);
|
||||||
if (etype == 1) { priceJ = price; }
|
if (etype == 1) { priceG = price; }
|
||||||
else if (etype == 2) { priceF = price; }
|
else if (etype == 2) { priceP = price; }
|
||||||
else if (etype == 3) { priceP = price; }
|
else if (etype == 3) { priceF = price; }
|
||||||
else if (etype == 4) { priceG = price; }
|
else if (etype == 4) { priceJ = price; }
|
||||||
else if (etype == 9) { priceC = price; }
|
else if (etype == 9) { priceC = price; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user