|
|
@@ -1095,23 +1095,21 @@
|
|
|
where a.id= #{aid}
|
|
|
</select>
|
|
|
<select id="adminStatisticsInfo" resultType="com.goafanti.admin.bo.AdminStatisticsBo">
|
|
|
- select *
|
|
|
- from (select aid ,
|
|
|
- sum(public_release_count)publicReleaseSum ,sum(follow_count) followSum,sum(order_count) orderSum
|
|
|
- from admin_user_count a where aid=#{aid} group by aid)x
|
|
|
+ select x.id aid,y.projectCheckSum,y.projectStopSum,z.rejectSum,t.receivables
|
|
|
+ from admin x
|
|
|
left join(select a.salesman_id aid , sum(if( b.project_status =29,1,0))projectStopSum ,
|
|
|
sum(if(b.check_status=1,1,0))projectCheckSum from t_order_new a left join t_order_task b
|
|
|
- on a.order_no =b.order_no where a.salesman_id = #{aid})y on x.aid=y.aid
|
|
|
+ on a.order_no =b.order_no where a.salesman_id = #{aid})y on x.id=y.aid
|
|
|
left join ( select salesman_id aid, sum(1)orderSum, sum(if(delete_sign=2,1,0))changeSum
|
|
|
from t_order_new where delete_sign in (0,2,3) and process_status >0
|
|
|
- and salesman_id = #{aid})g on x.aid=g.aid
|
|
|
+ and salesman_id = #{aid})g on x.id=g.aid
|
|
|
left join ( select salesman_id aid, sum(if(order_status=3 or order_status=5,1,0))rejectSum
|
|
|
from t_order_new where delete_sign in (0,2,3)
|
|
|
- and salesman_id = #{aid})z on x.aid=z.aid
|
|
|
+ and salesman_id = #{aid})z on x.id=z.aid
|
|
|
left join ( SELECT b.salesman_id aid ,sum(a.money) receivables
|
|
|
from new_order_dun a left join t_order_new b on a.order_no =b.order_no
|
|
|
where a.status =1 and b.delete_sign in (0,2,3)
|
|
|
- and b.salesman_id = #{aid})t on x.aid=t.aid
|
|
|
+ and b.salesman_id = #{aid})t on x.id=t.aid
|
|
|
</select>
|
|
|
|
|
|
<select id="adminStatisticsInfoByTime" resultType="com.goafanti.admin.bo.AdminStatisticsBo">
|