|
|
@@ -540,7 +540,9 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectsignStatisticsList" resultType="com.goafanti.order.bo.OutSignStatistics">
|
|
|
- select a.id,a.name ,sum(x.counts)counts ,sum(x.totalAmount)totalAmount,sum(x.newSignNumber)newSignNumber,
|
|
|
+ select x.id, name, counts, totalAmount, newSignNumber, repeatSignNumber, channelSignNumber,
|
|
|
+ (newSignNumber/counts)newRatio,(repeatSignNumber/counts)repeatRatio,(newSignNumber/counts)channelRatio
|
|
|
+ from( select a.id,a.name ,sum(x.counts)counts ,sum(x.totalAmount)totalAmount,sum(x.newSignNumber)newSignNumber,
|
|
|
sum(x.repeatSignNumber)repeatSignNumber,sum(x.channelSignNumber)channelSignNumber
|
|
|
from admin a
|
|
|
left join user_role ur on ur.uid =a.id left join `role` r on r.id=ur.rid
|
|
|
@@ -550,16 +552,16 @@
|
|
|
from t_order_new a left join user b on b.id=a.buyer_id
|
|
|
where a.process_status <4 and b.share_type =2
|
|
|
<if test="amountType != null">
|
|
|
- <if test="amountType = 1">
|
|
|
+ <if test="amountType == 1">
|
|
|
and a.total_amount < 10
|
|
|
</if>
|
|
|
- <if test="amountType = 2">
|
|
|
+ <if test="amountType == 2">
|
|
|
and a.total_amount BETWEEN 10 and 20
|
|
|
</if>
|
|
|
- <if test="amountType = 3">
|
|
|
+ <if test="amountType == 3">
|
|
|
and a.total_amount BETWEEN 20 and 30
|
|
|
</if>
|
|
|
- <if test="amountType = 4">
|
|
|
+ <if test="amountType == 4">
|
|
|
and a.total_amount > 30
|
|
|
</if>
|
|
|
</if>
|
|
|
@@ -574,7 +576,7 @@
|
|
|
<if test="depId != null">
|
|
|
and a.department_id = #{depId}
|
|
|
</if>
|
|
|
- group by a.id,a.name
|
|
|
+ group by a.id,a.name)x
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
</if>
|