mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
feat(saleOrder): 销售报表增加组织机构维度
- 在 SaleOrderReportRequest 中添加 organizationId 字段 - 在 SaleOrderService 中设置当前用户的组织机构 ID- 在 SQL 查询中添加组织机构 ID 的过滤条件
This commit is contained in:
@@ -55,6 +55,7 @@ month
|
||||
private List<String> productIds;
|
||||
|
||||
|
||||
private String organizationId;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -300,6 +300,7 @@ public class SaleOrderService extends BaseService<SaleOrderEntity, SaleOrderRepo
|
||||
if (CollectionUtils.isEmpty(request.getFieldInfos())) {
|
||||
request.setFieldInfos(new ArrayList<>());
|
||||
}
|
||||
request.setOrganizationId(Ctx.currentUser().getOrganizationId());
|
||||
|
||||
String sql =
|
||||
FreeMakerUtils.render(
|
||||
@@ -340,6 +341,7 @@ public class SaleOrderService extends BaseService<SaleOrderEntity, SaleOrderRepo
|
||||
|
||||
|
||||
where 1=1
|
||||
and o.organization_id = :organizationId
|
||||
|
||||
<#if startTime??> and o.start_time >= :startTime </#if>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user