mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
feat(coal): 添加组织ID筛选条件
- 在 CoalWashingDailyAnalysisCoalReportRequest 中添加 organizationId 字段 - 在报告查询 SQL 中加入 organization_id 的筛选条件- 自动设置当前用户的组织ID作为查询条件
This commit is contained in:
@@ -39,6 +39,7 @@ month
|
||||
private List<String> productIds;
|
||||
private List<String> coalInfoIds;
|
||||
|
||||
private String organizationId;
|
||||
|
||||
@Data
|
||||
public static class FieldInfo {
|
||||
|
||||
@@ -249,6 +249,7 @@ public class CoalWashingDailyAnalysisService
|
||||
|
||||
public Object report(CoalWashingDailyAnalysisCoalReportRequest request) {
|
||||
|
||||
request.setOrganizationId(Ctx.currentUser().getOrganizationId());
|
||||
String sql =
|
||||
FreeMakerUtils.render(
|
||||
"""
|
||||
@@ -273,7 +274,7 @@ public class CoalWashingDailyAnalysisService
|
||||
inner join t_product p on p.id = a.product_id
|
||||
|
||||
|
||||
where 1=1
|
||||
where 1=1 and d.organization_id = :organizationId
|
||||
|
||||
<#if startTime??> and date >= :startTime </#if>
|
||||
<#if endTime??> and date <= :endTime </#if>
|
||||
|
||||
Reference in New Issue
Block a user