|
|
@@ -510,9 +510,9 @@
|
|
|
|
|
|
|
|
|
<select id="selectOrderDun" resultType="com.goafanti.order.bo.OutSelectOrderDun">
|
|
|
- select z.provinceName,z.aName,z.totalAmount,z.money,z.aid
|
|
|
- from( select dg.name provinceName,y.id aid,y.name aName,sum(y.total_amount)totalAmount, sum(y.money)money
|
|
|
- from (select c.province ,b.name ,b.id,x.money ,x.quantity,a.total_amount
|
|
|
+ select z.depName,z.aName,z.totalAmount,z.money,z.aid
|
|
|
+ from( select y.depName,y.id aid,y.name aName,sum(y.total_amount)totalAmount, sum(y.money)money
|
|
|
+ from (select c.name depName ,b.name ,b.id,x.money ,x.quantity,a.total_amount
|
|
|
from (select order_no ,sum(money)money,1 quantity from new_order_dun nod where status=1
|
|
|
<if test="startDate!=null and endDate!=null">
|
|
|
and start_time between #{startDate} and #{endDate}
|
|
|
@@ -528,9 +528,7 @@
|
|
|
<if test="aid !=null">
|
|
|
and b.id= #{aid}
|
|
|
</if>
|
|
|
- )y left join district_glossory dg on y.province=dg.id
|
|
|
- group by dg.name ,y.id,y.name)z
|
|
|
- order by
|
|
|
+ )y group by y.depName,y.name,y.id)z order by
|
|
|
<if test="sort=0">
|
|
|
z.totalAmount
|
|
|
</if>
|