|
@@ -447,8 +447,8 @@
|
|
|
round(sum(actual) * 100 / sum(plan)) as dx
|
|
round(sum(actual) * 100 / sum(plan)) as dx
|
|
|
from (
|
|
from (
|
|
|
select dept_name, team_name, xb,
|
|
select dept_name, team_name, xb,
|
|
|
- case when plan is not null and plan != '' then 1 else 0 end as plan,
|
|
|
|
|
- case when actual is not null and actual != '' then 1 else 0 end as actual
|
|
|
|
|
|
|
+ case when plan is not null and plan != '' then xb else 0 end as plan,
|
|
|
|
|
+ case when actual is not null and actual != '' then xb else 0 end as actual
|
|
|
from (
|
|
from (
|
|
|
select dept_name, team_name, xb,
|
|
select dept_name, team_name, xb,
|
|
|
<if test="month==1">plan1 as plan, actual1 as actual</if>
|
|
<if test="month==1">plan1 as plan, actual1 as actual</if>
|
|
@@ -481,8 +481,8 @@
|
|
|
round(sum(actual) * 100 / sum(plan)) as dx
|
|
round(sum(actual) * 100 / sum(plan)) as dx
|
|
|
from (
|
|
from (
|
|
|
select dept_name, team_name, qybds,
|
|
select dept_name, team_name, qybds,
|
|
|
- case when plan is not null and plan != '' then 1 else 0 end as plan,
|
|
|
|
|
- case when actual is not null and actual != '' then 1 else 0 end as actual
|
|
|
|
|
|
|
+ case when plan is not null and plan != '' then qybds else 0 end as plan,
|
|
|
|
|
+ case when actual is not null and actual != '' then qybds else 0 end as actual
|
|
|
from (
|
|
from (
|
|
|
select dept_name, team_name, qybds,
|
|
select dept_name, team_name, qybds,
|
|
|
<if test="month==1">plan1 as plan, actual1 as actual</if>
|
|
<if test="month==1">plan1 as plan, actual1 as actual</if>
|
|
@@ -516,8 +516,8 @@
|
|
|
round(sum(actual) * 100 / sum(plan)) as dx
|
|
round(sum(actual) * 100 / sum(plan)) as dx
|
|
|
from (
|
|
from (
|
|
|
select dept_name, team_name, pds, bds,
|
|
select dept_name, team_name, pds, bds,
|
|
|
- case when plan is not null and plan != '' then 1 else 0 end as plan,
|
|
|
|
|
- case when actual is not null and actual != '' then 1 else 0 end as actual
|
|
|
|
|
|
|
+ case when plan is not null and plan != '' then pds + bds else 0 end as plan,
|
|
|
|
|
+ case when actual is not null and actual != '' then pds + bds else 0 end as actual
|
|
|
from (
|
|
from (
|
|
|
select dept_name, team_name, pds, bds,
|
|
select dept_name, team_name, pds, bds,
|
|
|
<if test="month==1">plan1 as plan, actual1 as actual</if>
|
|
<if test="month==1">plan1 as plan, actual1 as actual</if>
|
|
@@ -552,8 +552,8 @@
|
|
|
round(sum(actual) * 100 / sum(plan)) as dx
|
|
round(sum(actual) * 100 / sum(plan)) as dx
|
|
|
from (
|
|
from (
|
|
|
select dept_name, team_name, sdxl,
|
|
select dept_name, team_name, sdxl,
|
|
|
- case when plan is not null and plan != '' then 1 else 0 end as plan,
|
|
|
|
|
- case when actual is not null and actual != '' then 1 else 0 end as actual
|
|
|
|
|
|
|
+ case when plan is not null and plan != '' then sdxl else 0 end as plan,
|
|
|
|
|
+ case when actual is not null and actual != '' then sdxl else 0 end as actual
|
|
|
from (
|
|
from (
|
|
|
select dept_name, team_name, sdxl,
|
|
select dept_name, team_name, sdxl,
|
|
|
<if test="month==1">plan1 as plan, actual1 as actual</if>
|
|
<if test="month==1">plan1 as plan, actual1 as actual</if>
|