|
@@ -235,7 +235,7 @@
|
|
|
ifnull(t4.selfEffCount, 0) as 'selfEffCount', concat(round(ifnull(t4.selfEffCount, 0) / t3.effCount * 100, 2), '%') as 'selfEffRate', round(t3.effCount - ifnull(t4.selfEffCount, 0)) as 'thirdEffCount'
|
|
|
from (
|
|
|
(select t1.*,
|
|
|
- concat(round(t1.effCount / t1.materialNum * 100, 2), '%') as 'effRate',concat( round ifnull((t2.target_value, 0) * 100, 2),'%' )as 'mediaEffRate', (
|
|
|
+ concat(round(t1.effCount / t1.materialNum * 100, 2), '%') as 'effRate',concat( round(ifnull(t2.target_value, 0) * 100, 2),'%' )as 'mediaEffRate', (
|
|
|
case
|
|
|
when
|
|
|
round(t1.effCount / t1.materialNum * 100, 2) >= round(t2.target_value * 100, 2)
|
|
@@ -311,17 +311,17 @@
|
|
|
<if test="designRole == 1">
|
|
|
and clip_id is not null
|
|
|
and clip_id != ''
|
|
|
- group by project_id, clip_id
|
|
|
+ group by project_id, clip_id,settlement_2l
|
|
|
</if>
|
|
|
<if test="designRole == 2">
|
|
|
and clip_id is not null
|
|
|
and clip_id != ''
|
|
|
- group by project_id, shot_id
|
|
|
+ group by project_id, shot_id,settlement_2l
|
|
|
</if>
|
|
|
<if test="designRole == 3">
|
|
|
and clip_id is not null
|
|
|
and clip_id != ''
|
|
|
- group by project_id, plan_id
|
|
|
+ group by project_id, plan_id,settlement_2l
|
|
|
</if>
|
|
|
) t
|
|
|
|
|
@@ -333,7 +333,7 @@
|
|
|
(
|
|
|
case
|
|
|
when
|
|
|
- round(t1.effMaterialNum / t1.materialNum * 100, 2) >= round(t2.target_value * 100, 2)
|
|
|
+ round(t1.effMaterialNum / t1.materialNum * 100, 2) >= round(ifnull(t2.target_value,0) * 100, 2)
|
|
|
then 1
|
|
|
else 2
|
|
|
end
|
|
@@ -373,12 +373,18 @@
|
|
|
where delivery_year = #{year}
|
|
|
and delivery_month = #{month}
|
|
|
<if test="designRole == 1">
|
|
|
+ and clip_id is not null
|
|
|
+ and clip_id != ''
|
|
|
group by project_id, clip_id,settlement_2l
|
|
|
</if>
|
|
|
<if test="designRole == 2">
|
|
|
+ and shot_id is not null
|
|
|
+ and shot_id != ''
|
|
|
group by project_id, shot_id,settlement_2l
|
|
|
</if>
|
|
|
<if test="designRole == 3">
|
|
|
+ and plan_id is not null
|
|
|
+ and plan_id != ''
|
|
|
group by project_id, plan_id,settlement_2l
|
|
|
</if>
|
|
|
) t1
|