mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
添加原煤报表
This commit is contained in:
@@ -157,19 +157,17 @@ public class CoalWashingDailyAnalysisService
|
||||
"""
|
||||
|
||||
|
||||
select to_char(date_trunc('${timeDimension}', a.end_time), 'YYYY-MM-DD') as time
|
||||
select to_char(date_trunc('${timeDimension}', date), 'YYYY-MM-DD') as time
|
||||
|
||||
|
||||
<#list reportFields as field>
|
||||
|
||||
<#if field?is_first> ,</#if>
|
||||
|
||||
|
||||
<#if field == 'coalInfoId'>, d.id as coal_info_id, d.code as coal_info_code, d.name as coal_info_name </#if>
|
||||
<#if field == 'productId'>, p.id as product_id, p.code as product_code, p.name as product_name </#if>
|
||||
<#if field == 'coalInfoId'>, d.id as coal_info_id, max(d.code) as coal_info_code, max(d.name) as coal_info_name </#if>
|
||||
<#if field == 'productId'>, p.id as product_id, max(p.code) as product_code, max(p.name) as product_name </#if>
|
||||
|
||||
|
||||
<#if field?has_next>,</#if>
|
||||
</#list>
|
||||
, sum(d.amount) as amount
|
||||
|
||||
@@ -180,23 +178,21 @@ public class CoalWashingDailyAnalysisService
|
||||
|
||||
where 1=1
|
||||
|
||||
<#if startTime??> and a.end_time >= :startTime </#if>
|
||||
<#if endTime??> and a.end_time <= :endTime </#if>
|
||||
<#if productIds??> and a.product_id in (:productIds) </#if>
|
||||
<#if coalInfoIds??> and d.id in (:coalInfoIds) </#if>
|
||||
<#if startTime??> and date >= :startTime </#if>
|
||||
<#if endTime??> and date <= :endTime </#if>
|
||||
<#if productIds?? && productIds?has_content > and a.product_id in :productIds </#if>
|
||||
<#if coalInfoIds?? && coalInfoIds?has_content> and d.id in :coalInfoIds </#if>
|
||||
|
||||
|
||||
|
||||
|
||||
group by 1, date_trunc('${timeDimension}', a.end_time)
|
||||
group by 1, date_trunc('${timeDimension}', date)
|
||||
<#list reportFields as field>
|
||||
|
||||
<#if field?is_first> ,</#if>
|
||||
|
||||
<#if field == 'coalInfoId'>, d.id </#if>
|
||||
<#if field == 'productId'>, p.id </#if>
|
||||
|
||||
<#if field?has_next>,</#if>
|
||||
</#list>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user