diff --git a/lidee-core/src/main/resources/mapper/framework/NewGrBiSaAggMonthCountMapper.xml b/lidee-core/src/main/resources/mapper/framework/NewGrBiSaAggMonthCountMapper.xml index 2f8c92e..a312474 100644 --- a/lidee-core/src/main/resources/mapper/framework/NewGrBiSaAggMonthCountMapper.xml +++ b/lidee-core/src/main/resources/mapper/framework/NewGrBiSaAggMonthCountMapper.xml @@ -1167,19 +1167,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" c.position, saler_name, -- GROUPING (saler_name, zone_name, c.position), - ROUND(SUM(IF(use_month = '1', this_month_sa_money, null)), 2) AS month_sa_money_1, - ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)), 2) AS month_sa_money_2, - ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)), 2) AS month_sa_money_3, - ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)), 2) AS month_sa_money_4, - ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)), 2) AS month_sa_money_5, - ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)), 2) AS month_sa_money_6, - ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)), 2) AS month_sa_money_7, - ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)), 2) AS month_sa_money_8, - ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)), 2) AS month_sa_money_9, - ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)), 2) AS month_sa_money_10, - ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)), 2) AS month_sa_money_11, - ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)), 2) AS month_sa_money_12, - ROUND(SUM(this_month_sa_money), 2) AS year_sa_money + ROUND(SUM(IF(`use_month` = '1', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_1, + ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_2, + ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_3, + ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_4, + ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_5, + ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_6, + ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_7, + ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_8, + ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_9, + ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_10, + ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_11, + ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_12, + ROUND(SUM(this_month_sa_money) / 10000, 2) AS year_sa_money FROM new_gr_bi_sa_agg_month_count a LEFT JOIN gr_report.gr_contacts c ON a.saler_name = c.`name` @@ -1208,19 +1208,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) proxy_name, '', ROUND(SUM(IF(use_month = MONTH(CURDATE()), this_month_sa_qty, null)), 2) AS this_month_sa_qty, - ROUND(SUM(IF(use_month = '1', this_month_sa_money, null)), 2) AS month_sa_money_1, - ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)), 2) AS month_sa_money_2, - ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)), 2) AS month_sa_money_3, - ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)), 2) AS month_sa_money_4, - ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)), 2) AS month_sa_money_5, - ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)), 2) AS month_sa_money_6, - ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)), 2) AS month_sa_money_7, - ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)), 2) AS month_sa_money_8, - ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)), 2) AS month_sa_money_9, - ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)), 2) AS month_sa_money_10, - ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)), 2) AS month_sa_money_11, - ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)), 2) AS month_sa_money_12, - ROUND(SUM(this_month_sa_money), 2) AS year_sa_money + ROUND(SUM(IF(`use_month` = '1', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_1, + ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_2, + ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_3, + ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_4, + ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_5, + ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_6, + ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_7, + ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_8, + ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_9, + ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_10, + ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_11, + ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_12, + ROUND(SUM(this_month_sa_money) / 10000, 2) AS year_sa_money FROM new_gr_bi_sa_agg a LEFT JOIN gr_report.gr_googs_proxy p ON a.goods_id = p.goods_id @@ -1243,19 +1243,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" IF(GROUPING (sale_type_name) = 1, IFNULL(sale_type_name, '业务拓展合计'),sale_type_name) sale_type_name, '' , '', - ROUND(SUM(IF(use_month = '1', this_month_sa_money, null)), 2) AS month_sa_money_1, - ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)), 2) AS month_sa_money_2, - ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)), 2) AS month_sa_money_3, - ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)), 2) AS month_sa_money_4, - ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)), 2) AS month_sa_money_5, - ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)), 2) AS month_sa_money_6, - ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)), 2) AS month_sa_money_7, - ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)), 2) AS month_sa_money_8, - ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)), 2) AS month_sa_money_9, - ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)), 2) AS month_sa_money_10, - ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)), 2) AS month_sa_money_11, - ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)), 2) AS month_sa_money_12, - ROUND(SUM(this_month_sa_money), 2) AS year_sa_money + ROUND(SUM(IF(`use_month` = '1', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_1, + ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_2, + ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_3, + ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_4, + ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_5, + ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_6, + ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_7, + ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_8, + ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_9, + ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_10, + ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_11, + ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_12, + ROUND(SUM(this_month_sa_money) / 10000, 2) AS year_sa_money FROM new_gr_bi_sa_agg_month_count a WHERE @@ -1271,19 +1271,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" '其他收入', '' , '' , - ROUND(SUM(IF(use_month = '1', this_month_sa_money, null)), 2) AS month_sa_money_1, - ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)), 2) AS month_sa_money_2, - ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)), 2) AS month_sa_money_3, - ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)), 2) AS month_sa_money_4, - ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)), 2) AS month_sa_money_5, - ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)), 2) AS month_sa_money_6, - ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)), 2) AS month_sa_money_7, - ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)), 2) AS month_sa_money_8, - ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)), 2) AS month_sa_money_9, - ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)), 2) AS month_sa_money_10, - ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)), 2) AS month_sa_money_11, - ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)), 2) AS month_sa_money_12, - ROUND(SUM(this_month_sa_money), 2) AS year_sa_money + ROUND(SUM(IF(`use_month` = '1', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_1, + ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_2, + ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_3, + ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_4, + ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_5, + ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_6, + ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_7, + ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_8, + ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_9, + ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_10, + ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_11, + ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_12, + ROUND(SUM(this_month_sa_money) / 10000, 2) AS year_sa_money FROM new_gr_bi_sa_agg_month_count a WHERE @@ -1298,19 +1298,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" '总计', '' , '', - ROUND(SUM(IF(use_month = '1', this_month_sa_money, null)), 2) AS month_sa_money_1, - ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)), 2) AS month_sa_money_2, - ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)), 2) AS month_sa_money_3, - ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)), 2) AS month_sa_money_4, - ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)), 2) AS month_sa_money_5, - ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)), 2) AS month_sa_money_6, - ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)), 2) AS month_sa_money_7, - ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)), 2) AS month_sa_money_8, - ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)), 2) AS month_sa_money_9, - ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)), 2) AS month_sa_money_10, - ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)), 2) AS month_sa_money_11, - ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)), 2) AS month_sa_money_12, - ROUND(SUM(this_month_sa_money), 2) AS year_sa_money + ROUND(SUM(IF(`use_month` = '1', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_1, + ROUND(SUM(IF(`use_month` = '2', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_2, + ROUND(SUM(IF(`use_month` = '3', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_3, + ROUND(SUM(IF(`use_month` = '4', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_4, + ROUND(SUM(IF(`use_month` = '5', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_5, + ROUND(SUM(IF(`use_month` = '6', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_6, + ROUND(SUM(IF(`use_month` = '7', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_7, + ROUND(SUM(IF(`use_month` = '8', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_8, + ROUND(SUM(IF(`use_month` = '9', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_9, + ROUND(SUM(IF(`use_month` = '10', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_10, + ROUND(SUM(IF(`use_month` = '11', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_11, + ROUND(SUM(IF(`use_month` = '12', this_month_sa_money, null)) / 10000, 2) AS month_sa_money_12, + ROUND(SUM(this_month_sa_money) / 10000, 2) AS year_sa_money FROM new_gr_bi_sa_agg_month_count a WHERE