|
@@ -845,30 +845,34 @@
|
|
|
group by project_id) t7 on t1.projectId = t7.projectId
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
- t1.project_id as 'projectId',
|
|
|
- IFNULL(SUM(t2.cost),0) as 'realPersonCost'
|
|
|
+ project_id as 'projectId',
|
|
|
+ IFNULL(SUM(cost),0) as 'realPersonCost'
|
|
|
FROM
|
|
|
- application.app_bytedance_material_info t1
|
|
|
- LEFT JOIN application.bytedance_material_video_report_daily_dw t2 ON t1.material_id = t2.signature
|
|
|
- WHERE t1.tag_id = 60155
|
|
|
- AND t2.stat_datetime >= #{start}
|
|
|
- AND t2.stat_datetime <= #{end}
|
|
|
+ application.bytedance_material_video_report_daily_dw
|
|
|
+ WHERE stat_datetime >= #{start}
|
|
|
+ AND stat_datetime <= #{end}
|
|
|
+ AND signature in (
|
|
|
+ SELECT material_id FROM application.app_bytedance_material_info
|
|
|
+ WHERE tag_id = 60155
|
|
|
+ AND farst_cost_time >= #{start}
|
|
|
+ AND farst_cost_time <= #{end}
|
|
|
<if test="companyId != null and companyId != ''">
|
|
|
- and t1.company_id = #{companyId}
|
|
|
+ and company_id = #{companyId}
|
|
|
</if>
|
|
|
<if test="leaderId != null and leaderId != ''">
|
|
|
- and t1.leader_id = #{leaderId}
|
|
|
+ and leader_id = #{leaderId}
|
|
|
</if>
|
|
|
<if test="clipId != null and clipId != ''">
|
|
|
- and t1.clip_id = #{clipId}
|
|
|
+ and clip_id = #{clipId}
|
|
|
</if>
|
|
|
<if test="planId != null and planId != ''">
|
|
|
- and t1.plan_id = #{planId}
|
|
|
+ and plan_id = #{planId}
|
|
|
</if>
|
|
|
<if test="shotId != null and shotId != ''">
|
|
|
- and t1.shot_id = #{shotId}
|
|
|
+ and shot_id = #{shotId}
|
|
|
</if>
|
|
|
- GROUP BY t1.project_id
|
|
|
+ )
|
|
|
+ GROUP BY project_id
|
|
|
) t8 ON t1.projectId = t8.projectId
|
|
|
LEFT JOIN (
|
|
|
SELECT project_id as 'projectId',
|
|
@@ -896,30 +900,34 @@
|
|
|
) t9 ON t1.projectId = t9.projectId
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
- t1.project_id as 'projectId',
|
|
|
- IFNULL(SUM(t2.cost),0) as 'clipCost'
|
|
|
+ project_id as 'projectId',
|
|
|
+ IFNULL(SUM(cost),0) as 'clipCost'
|
|
|
FROM
|
|
|
- application.app_bytedance_material_info t1
|
|
|
- LEFT JOIN application.bytedance_material_video_report_daily_dw t2 ON t1.material_id = t2.signature
|
|
|
- WHERE t1.tag_id = 60156
|
|
|
- AND t2.stat_datetime >= #{start}
|
|
|
- AND t2.stat_datetime <= #{end}
|
|
|
+ application.bytedance_material_video_report_daily_dw
|
|
|
+ WHERE stat_datetime >= #{start}
|
|
|
+ AND stat_datetime <= #{end}
|
|
|
+ AND signature in (
|
|
|
+ SELECT material_id FROM application.app_bytedance_material_info
|
|
|
+ WHERE tag_id = 60156
|
|
|
+ AND farst_cost_time >= #{start}
|
|
|
+ AND farst_cost_time <= #{end}
|
|
|
<if test="companyId != null and companyId != ''">
|
|
|
- and t1.company_id = #{companyId}
|
|
|
+ and company_id = #{companyId}
|
|
|
</if>
|
|
|
<if test="leaderId != null and leaderId != ''">
|
|
|
- and t1.leader_id = #{leaderId}
|
|
|
+ and leader_id = #{leaderId}
|
|
|
</if>
|
|
|
<if test="clipId != null and clipId != ''">
|
|
|
- and t1.clip_id = #{clipId}
|
|
|
+ and clip_id = #{clipId}
|
|
|
</if>
|
|
|
<if test="planId != null and planId != ''">
|
|
|
- and t1.plan_id = #{planId}
|
|
|
+ and plan_id = #{planId}
|
|
|
</if>
|
|
|
<if test="shotId != null and shotId != ''">
|
|
|
- and t1.shot_id = #{shotId}
|
|
|
+ and shot_id = #{shotId}
|
|
|
</if>
|
|
|
- GROUP BY t1.project_id
|
|
|
+ )
|
|
|
+ GROUP BY project_id
|
|
|
) t10 ON t1.projectId = t10.projectId
|
|
|
LEFT JOIN (
|
|
|
SELECT project_id as 'projectId',
|
|
@@ -1209,30 +1217,34 @@
|
|
|
group by project_id) t7 on t1.projectId = t7.projectId
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
- t1.project_id as 'projectId',
|
|
|
- IFNULL(SUM(t2.charge),0) as 'realPersonCost'
|
|
|
+ project_id as 'projectId',
|
|
|
+ IFNULL(SUM(charge),0) as 'realPersonCost'
|
|
|
FROM
|
|
|
- application.app_kuaishou_material_info t1
|
|
|
- LEFT JOIN application.kuaishou_material_video_report_daily_dw t2 ON t1.material_id = t2.signature
|
|
|
- WHERE t1.tag_id = 60155
|
|
|
- AND t2.stat_date >= #{start}
|
|
|
- AND t2.stat_date <= #{end}
|
|
|
+ application.kuaishou_material_video_report_daily_dw
|
|
|
+ WHERE stat_date >= #{start}
|
|
|
+ AND stat_date <= #{end}
|
|
|
+ AND signature in (
|
|
|
+ SELECT material_id FROM application.app_kuaishou_material_info
|
|
|
+ WHERE tag_id = 60155
|
|
|
+ AND farst_cost_time >= #{start}
|
|
|
+ AND farst_cost_time <= #{end}
|
|
|
<if test="companyId != null and companyId != ''">
|
|
|
- and t1.company_id = #{companyId}
|
|
|
+ and company_id = #{companyId}
|
|
|
</if>
|
|
|
<if test="leaderId != null and leaderId != ''">
|
|
|
- and t1.leader_id = #{leaderId}
|
|
|
+ and leader_id = #{leaderId}
|
|
|
</if>
|
|
|
<if test="clipId != null and clipId != ''">
|
|
|
- and t1.clip_id = #{clipId}
|
|
|
+ and clip_id = #{clipId}
|
|
|
</if>
|
|
|
<if test="planId != null and planId != ''">
|
|
|
- and t1.plan_id = #{planId}
|
|
|
+ and plan_id = #{planId}
|
|
|
</if>
|
|
|
<if test="shotId != null and shotId != ''">
|
|
|
- and t1.shot_id = #{shotId}
|
|
|
+ and shot_id = #{shotId}
|
|
|
</if>
|
|
|
- GROUP BY t1.project_id
|
|
|
+ )
|
|
|
+ GROUP BY project_id
|
|
|
) t8 ON t1.projectId = t8.projectId
|
|
|
LEFT JOIN (
|
|
|
SELECT project_id as 'projectId',
|
|
@@ -1260,30 +1272,34 @@
|
|
|
) t9 ON t1.projectId = t9.projectId
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
- t1.project_id as 'projectId',
|
|
|
- IFNULL(SUM(t2.charge),0) as 'clipCost'
|
|
|
+ project_id as 'projectId',
|
|
|
+ IFNULL(SUM(charge),0) as 'clipCost'
|
|
|
FROM
|
|
|
- application.app_kuaishou_material_info t1
|
|
|
- LEFT JOIN application.kuaishou_material_video_report_daily_dw t2 ON t1.material_id = t2.signature
|
|
|
- WHERE t1.tag_id = 60156
|
|
|
- AND t2.stat_date >= #{start}
|
|
|
- AND t2.stat_date <= #{end}
|
|
|
+ application.kuaishou_material_video_report_daily_dw
|
|
|
+ WHERE stat_date >= #{start}
|
|
|
+ AND stat_date <= #{end}
|
|
|
+ AND signature in (
|
|
|
+ SELECT material_id FROM application.app_kuaishou_material_info
|
|
|
+ WHERE tag_id = 60156
|
|
|
+ AND farst_cost_time >= #{start}
|
|
|
+ AND farst_cost_time <= #{end}
|
|
|
<if test="companyId != null and companyId != ''">
|
|
|
- and t1.company_id = #{companyId}
|
|
|
+ and company_id = #{companyId}
|
|
|
</if>
|
|
|
<if test="leaderId != null and leaderId != ''">
|
|
|
- and t1.leader_id = #{leaderId}
|
|
|
+ and leader_id = #{leaderId}
|
|
|
</if>
|
|
|
<if test="clipId != null and clipId != ''">
|
|
|
- and t1.clip_id = #{clipId}
|
|
|
+ and clip_id = #{clipId}
|
|
|
</if>
|
|
|
<if test="planId != null and planId != ''">
|
|
|
- and t1.plan_id = #{planId}
|
|
|
+ and plan_id = #{planId}
|
|
|
</if>
|
|
|
<if test="shotId != null and shotId != ''">
|
|
|
- and t1.shot_id = #{shotId}
|
|
|
+ and shot_id = #{shotId}
|
|
|
</if>
|
|
|
- GROUP BY t1.project_id
|
|
|
+ )
|
|
|
+ GROUP BY project_id
|
|
|
) t10 ON t1.projectId = t10.projectId
|
|
|
LEFT JOIN (
|
|
|
SELECT project_id as 'projectId',
|