|
|
@@ -1607,14 +1607,16 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
from t_order_new where delete_sign in (0,2) and buyer_id = #{uid}
|
|
|
</select>
|
|
|
<select id="orderSalesSource" resultType="com.goafanti.order.bo.OutOrderSalesSource">
|
|
|
- select y.province,dg.name ,y.total_amount totalAmount,y.counts,y.dh,y.dh/y.counts dhl,y.wl,y.wl/y.counts wll,
|
|
|
+ select y.province,dg.name ,y.total_amount totalAmount,y.counts,y.dhxkf,y.dhxkf/y.counts dhxkfl,
|
|
|
+ y.dhzdzy,y.dhzdzy/y.counts dhzdzyl,y.wl,y.wl/y.counts wll,
|
|
|
y.qd,y.qd/y.counts qdl,y.zjs,y.zjs/y.counts zjsl,y.qt,y.qt/y.counts qtl,
|
|
|
y.gxfg,y.gxfg/y.counts gxfgl,y.qtfg,y.qtfg/y.counts qtfgl
|
|
|
from (select x.province,sum(x.total_amount)total_amount,sum(x.counts)counts,
|
|
|
- sum(x.dh)dh,sum(x.wl)wl,sum(x.qd)qd, sum(x.zjs)zjs, sum(x.qt)qt,
|
|
|
+ sum(x.dhxkf)dhxkf,sum(x.dhzdzy)dhzdzy,sum(x.wl)wl,sum(x.qd)qd, sum(x.zjs)zjs, sum(x.qt)qt,
|
|
|
sum(x.gxfg)gxfg, sum(x.qtfg)qtfg
|
|
|
- from ( select a.order_no ,a.order_dep ,b.province ,1 counts,a.total_amount,a.sales_type ,
|
|
|
- case a.sales_type when 0 then 1 when 1 then 1 else 0 end dh,
|
|
|
+ from ( select b.province ,1 counts,a.total_amount,a.sales_type ,
|
|
|
+ case a.sales_type when 0 then 1 else 0 end dhxkf,
|
|
|
+ case a.sales_type when 1 then 1 else 0 end dhzdzy,
|
|
|
case a.sales_type when 2 then 1 else 0 end wl,
|
|
|
case a.sales_type when 3 then 1 else 0 end qd,
|
|
|
case a.sales_type when 4 then 1 else 0 end zjs,
|
|
|
@@ -1702,7 +1704,7 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
select count(*)
|
|
|
from t_order_new a left join `user` b on a.buyer_id=b.id left join t_order_mid c on a.order_no=c.order_no
|
|
|
left join department dep on a.order_dep=dep.id
|
|
|
- where a.delete_sign in(0,2) and a.process_status >4
|
|
|
+ where a.delete_sign in(0,2) and a.process_status >0
|
|
|
<if test="province !=null ">
|
|
|
and dep.province = #{province}
|
|
|
</if>
|