Explorar o código

设计绩效 去除first-cost-day

zxa %!s(int64=2) %!d(string=hai) anos
pai
achega
64afd5a9bf

+ 0 - 56
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/achievements/mapper/xml/DesignerMapper.xml

@@ -155,8 +155,6 @@
         WHERE clip_id = #{userId}
           AND d.stat_date >= #{startTime}
           AND d.stat_date <= #{endTime}
-          AND d.first_cost_day >= #{startTime}
-          AND d.first_cost_day <= #{endTime}
         UNION ALL
         SELECT QUARTER(d.first_cost_day)                           quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                 yearTime,
@@ -169,8 +167,6 @@
         WHERE shot_id = #{userId}
           AND d.stat_date >= #{startTime}
           AND d.stat_date <= #{endTime}
-          AND d.first_cost_day >= #{startTime}
-          AND d.first_cost_day <= #{endTime}
         UNION ALL
         SELECT QUARTER(d.first_cost_day)                           quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                 yearTime,
@@ -183,8 +179,6 @@
         WHERE plan_id = #{userId}
           AND d.stat_date >= #{startTime}
           AND d.stat_date <= #{endTime}
-          AND d.first_cost_day >= #{startTime}
-          AND d.first_cost_day <= #{endTime}
     </select>
 
 
@@ -201,8 +195,6 @@
         WHERE clip_id = #{userId}
           AND d.stat_date &gt;= #{startTime}
           AND d.stat_date &lt;= #{endTime}
-          AND d.first_cost_day &gt;= #{startTime}
-          AND d.first_cost_day &lt;= #{endTime}
         UNION ALL
         SELECT QUARTER(d.first_cost_day)                             quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                   yearTime,
@@ -215,8 +207,6 @@
         WHERE shot_id = #{userId}
           AND d.stat_date &gt;= #{startTime}
           AND d.stat_date &lt;= #{endTime}
-          AND d.first_cost_day &gt;= #{startTime}
-          AND d.first_cost_day &lt;= #{endTime}
         UNION ALL
         SELECT QUARTER(d.first_cost_day)                             quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                   yearTime,
@@ -229,8 +219,6 @@
         WHERE plan_id = #{userId}
           AND d.stat_date &gt;= #{startTime}
           AND d.stat_date &lt;= #{endTime}
-          AND d.first_cost_day &gt;= #{startTime}
-          AND d.first_cost_day &lt;= #{endTime}
     </select>
 
     <!-- 查询设计 本季度 头条季度消耗汇总-->
@@ -250,8 +238,6 @@
             )
           AND stat_date &gt;= #{startTime}
           AND stat_date &lt;= #{endTime}
-          AND d.first_cost_day &gt;= #{startTime}
-          AND d.first_cost_day &lt;= #{endTime}
     </select>
     <!-- 查询设计 本季度 快手季度消耗汇总-->
     <select id="getDesignerKuaishouQuaterCost" resultType="com.alibaba.fastjson.JSONObject">
@@ -270,8 +256,6 @@
             )
           AND stat_date &gt;= #{startTime}
           AND stat_date &lt;= #{endTime}
-          AND d.first_cost_day &gt;= #{startTime}
-          AND d.first_cost_day &lt;= #{endTime}
     </select>
 
     <!-- 管理消耗-->
@@ -283,16 +267,12 @@
                  WHERE leader_id = #{userId}
                    AND stat_date &gt;= #{startTime}
                    AND stat_date &lt;= #{endTime}
-                   AND first_cost_day &gt;= #{startTime}
-                   AND first_cost_day &lt;= #{endTime}
                  UNION
                  SELECT IFNULL(SUM(charge), 0) cost, leader_id, 'kuaishou' as type, 2 as sort
                  FROM application.kuaishou_material_cost_daily
                  WHERE leader_id = #{userId}
                    AND stat_date &gt;= #{startTime}
                    AND stat_date &lt;= #{endTime}
-                   AND first_cost_day &gt;= #{startTime}
-                   AND first_cost_day &lt;= #{endTime}
              ) t
         ORDER BY t.sort
     </select>
@@ -394,8 +374,6 @@
                  WHERE clip_id = #{userId}
                    AND d.stat_date &gt;= #{month1.startTime}
                    AND d.stat_date &lt;= #{month1.endTime}
-                   AND d.first_cost_day &gt;= #{month1.startTime}
-                   AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')              monthTime,
                         IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
@@ -406,8 +384,6 @@
                  WHERE shot_id = #{userId}
                    AND d.stat_date &gt;= #{month1.startTime}
                    AND d.stat_date &lt;= #{month1.endTime}
-                   AND d.first_cost_day &gt;= #{month1.startTime}
-                   AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')              monthTime,
                         IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
@@ -418,8 +394,6 @@
                  WHERE plan_id = #{userId}
                    AND d.stat_date &gt;= #{month1.startTime}
                    AND d.stat_date &lt;= #{month1.endTime}
-                   AND d.first_cost_day &gt;= #{month1.startTime}
-                   AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')              monthTime,
                         IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
@@ -430,8 +404,6 @@
                  WHERE clip_id = #{userId}
                    AND d.stat_date &gt;= #{month2.startTime}
                    AND d.stat_date &lt;= #{month2.endTime}
-                   AND d.first_cost_day &gt;= #{month2.startTime}
-                   AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')              monthTime,
                         IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
@@ -442,8 +414,6 @@
                  WHERE shot_id = #{userId}
                    AND d.stat_date &gt;= #{month2.startTime}
                    AND d.stat_date &lt;= #{month2.endTime}
-                   AND d.first_cost_day &gt;= #{month2.startTime}
-                   AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')              monthTime,
                         IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
@@ -454,8 +424,6 @@
                  WHERE plan_id = #{userId}
                    AND d.stat_date &gt;= #{month2.startTime}
                    AND d.stat_date &lt;= #{month2.endTime}
-                   AND d.first_cost_day &gt;= #{month2.startTime}
-                   AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')              monthTime,
                         IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
@@ -466,8 +434,6 @@
                  WHERE clip_id = #{userId}
                    AND d.stat_date &gt;= #{month3.startTime}
                    AND d.stat_date &lt;= #{month3.endTime}
-                   AND d.first_cost_day &gt;= #{month3.startTime}
-                   AND d.first_cost_day &lt;= #{month3.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')              monthTime,
                         IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
@@ -478,8 +444,6 @@
                  WHERE shot_id = #{userId}
                    AND d.stat_date &gt;= #{month3.startTime}
                    AND d.stat_date &lt;= #{month3.endTime}
-                   AND d.first_cost_day &gt;= #{month3.startTime}
-                   AND d.first_cost_day &lt;= #{month3.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')              monthTime,
                         IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
@@ -490,8 +454,6 @@
                  WHERE plan_id = #{userId}
                    AND d.stat_date &gt;= #{month3.startTime}
                    AND d.stat_date &lt;= #{month3.endTime}
-                   AND d.first_cost_day &gt;= #{month3.startTime}
-                   AND d.first_cost_day &lt;= #{month3.endTime}
              ) t
         order by monthTime, type
     </select>
@@ -510,8 +472,6 @@
                  WHERE clip_id = #{userId}
                    AND d.stat_date &gt;= #{month1.startTime}
                    AND d.stat_date &lt;= #{month1.endTime}
-                   AND d.first_cost_day &gt;= #{month1.startTime}
-                   AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')                monthTime,
                         IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
@@ -522,8 +482,6 @@
                  WHERE shot_id = #{userId}
                    AND d.stat_date &gt;= #{month1.startTime}
                    AND d.stat_date &lt;= #{month1.endTime}
-                   AND d.first_cost_day &gt;= #{month1.startTime}
-                   AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')                monthTime,
                         IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
@@ -534,8 +492,6 @@
                  WHERE plan_id = #{userId}
                    AND d.stat_date &gt;= #{month1.startTime}
                    AND d.stat_date &lt;= #{month1.endTime}
-                   AND d.first_cost_day &gt;= #{month1.startTime}
-                   AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')                monthTime,
                         IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
@@ -546,8 +502,6 @@
                  WHERE clip_id = #{userId}
                    AND d.stat_date &gt;= #{month2.startTime}
                    AND d.stat_date &lt;= #{month2.endTime}
-                   AND d.first_cost_day &gt;= #{month2.startTime}
-                   AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')                monthTime,
                         IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
@@ -558,8 +512,6 @@
                  WHERE shot_id = #{userId}
                    AND d.stat_date &gt;= #{month2.startTime}
                    AND d.stat_date &lt;= #{month2.endTime}
-                   AND d.first_cost_day &gt;= #{month2.startTime}
-                   AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')                monthTime,
                         IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
@@ -570,8 +522,6 @@
                  WHERE plan_id = #{userId}
                    AND d.stat_date &gt;= #{month2.startTime}
                    AND d.stat_date &lt;= #{month2.endTime}
-                   AND d.first_cost_day &gt;= #{month2.startTime}
-                   AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')                monthTime,
                         IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
@@ -582,8 +532,6 @@
                  WHERE clip_id = #{userId}
                    AND d.stat_date &gt;= #{month3.startTime}
                    AND d.stat_date &lt;= #{month3.endTime}
-                   AND d.first_cost_day &gt;= #{month3.startTime}
-                   AND d.first_cost_day &lt;= #{month3.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')                monthTime,
                         IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
@@ -594,8 +542,6 @@
                  WHERE shot_id = #{userId}
                    AND d.stat_date &gt;= #{month3.startTime}
                    AND d.stat_date &lt;= #{month3.endTime}
-                   AND d.first_cost_day &gt;= #{month3.startTime}
-                   AND d.first_cost_day &lt;= #{month3.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')                monthTime,
                         IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
@@ -606,8 +552,6 @@
                  WHERE plan_id = #{userId}
                    AND d.stat_date &gt;= #{month3.startTime}
                    AND d.stat_date &lt;= #{month3.endTime}
-                   AND d.first_cost_day &gt;= #{month3.startTime}
-                   AND d.first_cost_day &lt;= #{month3.endTime}
              ) t
         order by monthTime, type
     </select>