mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
feat(pdcDeviceData):按组织查询报表
- 在 GetReport2Request 中添加 organizationId 字段 - 在 PdcDeviceDataService 中设置当前用户的组织 ID - 更新 SQL 查询语句,增加按组织 ID 过滤的条件
This commit is contained in:
@@ -32,4 +32,7 @@ hour
|
||||
|
||||
private String td;
|
||||
|
||||
|
||||
private String organizationId;
|
||||
|
||||
}
|
||||
|
||||
@@ -96,6 +96,8 @@ public class PdcDeviceDataService
|
||||
|
||||
request.setTd("1 " + request.getTimeDimension());
|
||||
|
||||
request.setOrganizationId(Ctx.currentUser().getOrganizationId());
|
||||
|
||||
return JpaUtils.execNativeQuery(
|
||||
em,
|
||||
FreeMakerUtils.render(
|
||||
@@ -117,6 +119,8 @@ public class PdcDeviceDataService
|
||||
where dd.time >= :startTime
|
||||
and dd.time <= :endTime
|
||||
|
||||
and dd.organization_id = :organizationId
|
||||
|
||||
<#if deviceGroup??>
|
||||
|
||||
and pd.device_group like '%' || :deviceGroup || '%'
|
||||
|
||||
Reference in New Issue
Block a user