소스 검색

【CHG】修改查询字段

zhaomn 2 년 전
부모
커밋
73939d958f
1개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 8 8
      railway-business/src/main/resources/mapper/bi/ShowSbxjMapper.xml

+ 8 - 8
railway-business/src/main/resources/mapper/bi/ShowSbxjMapper.xml

@@ -447,8 +447,8 @@
     round(sum(actual) * 100 / sum(plan)) as dx
     from (
       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 (
         select dept_name, team_name, xb,
         <if test="month==1">plan1 as plan, actual1 as actual</if>
@@ -481,8 +481,8 @@
     round(sum(actual) * 100 / sum(plan)) as dx
     from (
       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 (
         select dept_name, team_name, qybds,
         <if test="month==1">plan1 as plan, actual1 as actual</if>
@@ -516,8 +516,8 @@
     round(sum(actual) * 100 / sum(plan)) as dx
     from (
       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 (
         select dept_name, team_name, pds, bds,
         <if test="month==1">plan1 as plan, actual1 as actual</if>
@@ -552,8 +552,8 @@
     round(sum(actual) * 100 / sum(plan)) as dx
     from (
       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 (
         select dept_name, team_name, sdxl,
         <if test="month==1">plan1 as plan, actual1 as actual</if>