|
@@ -294,16 +294,16 @@
|
|
<select id="getOrderRankRatioList" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getOrderRankRatioList" resultType="com.alibaba.fastjson.JSONObject">
|
|
select
|
|
select
|
|
t1.*,
|
|
t1.*,
|
|
- round((t1.orderNum - t2.orderNum) / t2.orderNum,2) as 'radio'
|
|
|
|
|
|
+ round((t1.orderNum - t2.orderNum) / t2.orderNum,4) as 'radio'
|
|
from (select
|
|
from (select
|
|
item_id as 'itemId',
|
|
item_id as 'itemId',
|
|
item_title as 'itemTitle',
|
|
item_title as 'itemTitle',
|
|
image_url as 'imageUrl',
|
|
image_url as 'imageUrl',
|
|
count(oid) as 'orderNum',
|
|
count(oid) as 'orderNum',
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
- round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),2) as 'validRadio',
|
|
|
|
|
|
+ round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) as 'validRadio',
|
|
sum(case when send_status = 1 then 1 else 0 end) as 'deliveryNum',
|
|
sum(case when send_status = 1 then 1 else 0 end) as 'deliveryNum',
|
|
- round(sum(case when send_status = 1 then 1 else 0 end) / sum(case when order_status != 80 then 1 else 0 end),2) as 'deliveryRadio'
|
|
|
|
|
|
+ round(sum(case when send_status = 1 then 1 else 0 end) / sum(case when order_status != 80 then 1 else 0 end),4) as 'deliveryRadio'
|
|
|
|
|
|
from kuaishou_supply_chain
|
|
from kuaishou_supply_chain
|
|
where 1= 1
|
|
where 1= 1
|
|
@@ -338,9 +338,9 @@
|
|
image_url as 'imageUrl',
|
|
image_url as 'imageUrl',
|
|
count(oid) as 'orderNum',
|
|
count(oid) as 'orderNum',
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
- round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),2) as 'validRadio',
|
|
|
|
|
|
+ round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) as 'validRadio',
|
|
sum(case when send_status = 1 then 1 else 0 end) as 'deliveryNum',
|
|
sum(case when send_status = 1 then 1 else 0 end) as 'deliveryNum',
|
|
- round(sum(case when send_status = 1 then 1 else 0 end) / sum(case when order_status != 80 then 1 else 0 end),2) as 'deliveryRadio'
|
|
|
|
|
|
+ round(sum(case when send_status = 1 then 1 else 0 end) / sum(case when order_status != 80 then 1 else 0 end),4) as 'deliveryRadio'
|
|
from kuaishou_supply_chain
|
|
from kuaishou_supply_chain
|
|
where 1= 1
|
|
where 1= 1
|
|
<if test="start != null and start != ''">
|
|
<if test="start != null and start != ''">
|
|
@@ -355,13 +355,13 @@
|
|
<select id="getPromoterRankRatioList" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getPromoterRankRatioList" resultType="com.alibaba.fastjson.JSONObject">
|
|
select
|
|
select
|
|
t1.*,
|
|
t1.*,
|
|
- round((t1.orderNum - t2.orderNum) / t2.orderNum,2) as 'radio'
|
|
|
|
|
|
+ round((t1.orderNum - t2.orderNum) / t2.orderNum,4) as 'radio'
|
|
from (select
|
|
from (select
|
|
promoter_id as 'promoterId',
|
|
promoter_id as 'promoterId',
|
|
promoter_nick_name as 'promoterNickName',
|
|
promoter_nick_name as 'promoterNickName',
|
|
count(oid) as 'orderNum',
|
|
count(oid) as 'orderNum',
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
- round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),2) as 'validRadio'
|
|
|
|
|
|
+ round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) as 'validRadio'
|
|
from kuaishou_supply_chain
|
|
from kuaishou_supply_chain
|
|
where 1= 1
|
|
where 1= 1
|
|
<if test="nowStartHourTemp != null and nowStartHourTemp != ''">
|
|
<if test="nowStartHourTemp != null and nowStartHourTemp != ''">
|
|
@@ -394,7 +394,7 @@
|
|
promoter_nick_name as 'promoterNickName',
|
|
promoter_nick_name as 'promoterNickName',
|
|
count(oid) as 'orderNum',
|
|
count(oid) as 'orderNum',
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
- round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),2) as 'validRadio'
|
|
|
|
|
|
+ round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) as 'validRadio'
|
|
from kuaishou_supply_chain
|
|
from kuaishou_supply_chain
|
|
where 1= 1
|
|
where 1= 1
|
|
<if test="start != null and start != ''">
|
|
<if test="start != null and start != ''">
|