Commit e23ed62e authored by 赵啸非's avatar 赵啸非

修改统计逻辑

parent 8f590716
......@@ -105,6 +105,8 @@ public class SiteTreeSelect implements Serializable {
* 离线总数
*/
private Integer onlineTotal;
private Integer stopCount;
/**
* 未激活设备数量
*/
......@@ -221,6 +223,12 @@ public class SiteTreeSelect implements Serializable {
.count();
node.setOfflineTotal(deviceOfflineCount.intValue());
//停用数量
Long stopCount = deviceList.stream()
.filter(f -> f.getDeviceStatus() > DeviceStatusEnum.未激活.getValue())
.filter(f -> f.getEnabled() == YesNoEnum.NO.getValue())
.count();
node.setStopCount(stopCount.intValue());
//设置统计id
SitestatEntity sitestatCache = sitestatService.getExtCache(node.getSiteCode());
if (!ObjectUtils.isEmpty(sitestatCache)) {
......
......@@ -53,10 +53,6 @@ public class SitestatController extends BaseCRUDJsonBodyMappingController<Sitest
super.setModuleDesc("站点统计");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
......
......@@ -15,7 +15,6 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
###站点统计列表
POST {{baseUrl}}/sitestat/list
Authorization: {{authToken}}
Content-Type: application/json
{
......@@ -23,6 +22,13 @@ Content-Type: application/json
"page":1,
"size":10
}
###站点统计树
GET {{baseUrl}}/sitestat/siteTree
Authorization: {{authToken}}
Content-Type: application/json
{}
###站点统计更新与保存
......
......@@ -103,10 +103,10 @@ Content-Type: application/json
{
"size": -1,
"groupList": ["productCode","month"],
"groupList": ["productCode","year"],
"year": 2024,
"siteId": 1,
"orderColList": [{"colName":"month","sortKind":"asc"}]
"orderColList": [{"colName":"year","sortKind":"asc"}]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment