|
@@ -1254,9 +1254,12 @@
|
|
|
left join(select a.salesman_id aid , sum(if(b.project_status=2 or b.project_status =3 or b.project_status =29,1,0))projectStopSum ,
|
|
left join(select a.salesman_id aid , sum(if(b.project_status=2 or b.project_status =3 or 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
|
|
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.aid=y.aid
|
|
|
- left join ( select salesman_id aid, sum(1)orderSum,sum(if(order_status=3 or order_status=5,1,0))rejectSum, sum(if(delete_sign=2,1,0))changeSum
|
|
|
|
|
|
|
+ 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
|
|
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.aid=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
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="adminStatisticsInfoByTime" resultType="com.goafanti.admin.bo.AdminStatisticsBo">
|
|
<select id="adminStatisticsInfoByTime" resultType="com.goafanti.admin.bo.AdminStatisticsBo">
|
|
@@ -1308,19 +1311,26 @@
|
|
|
and create_time BETWEEN #{firstDay} and '${e} 23:59:59'
|
|
and create_time BETWEEN #{firstDay} and '${e} 23:59:59'
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="selectAllAdminPublicRelease" resultType="com.goafanti.common.model.AdminUserCount">
|
|
|
|
|
- select aid,count(*)publicReleaseCount,DATE_FORMAT(a.release_start , '%Y-%m-%d') dateTime
|
|
|
|
|
- from public_release a left join public_release_details b on a.id=b.prid
|
|
|
|
|
- where status =2 group by aid,release_start
|
|
|
|
|
- </select>
|
|
|
|
|
- <select id="selectAllAdminUserFollow" resultType="com.goafanti.common.model.AdminUserCount">
|
|
|
|
|
- select aid ,count(*)followCount,DATE_FORMAT(create_time , '%Y-%m-%d') dateTime
|
|
|
|
|
- from user_follow group by aid,create_time
|
|
|
|
|
- </select>
|
|
|
|
|
- <select id="selectAllAdminOrder" resultType="com.goafanti.common.model.AdminUserCount">
|
|
|
|
|
- select salesman_id aid ,count(*)orderCount,DATE_FORMAT(create_time , '%Y-%m-%d') dateTime
|
|
|
|
|
- from t_order_new where delete_sign in (0,2,3) and process_status >0
|
|
|
|
|
- group by salesman_id ,create_time
|
|
|
|
|
|
|
+ <select id="selectAdminPublicRelease" resultType="com.goafanti.common.model.AdminUserCount">
|
|
|
|
|
+ select aid,count(*)publicReleaseCount, dates dateTime
|
|
|
|
|
+ from (select aid,DATE_FORMAT(a.release_start , '%Y-%m-%d') dates
|
|
|
|
|
+ from public_release a left join public_release_details b on a.id=b.prid
|
|
|
|
|
+ where status =2 and aid= #{aid})x
|
|
|
|
|
+ group by aid,dates
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectAdminUserFollow" resultType="com.goafanti.common.model.AdminUserCount">
|
|
|
|
|
+ select aid ,count(*)followCount, dateTime
|
|
|
|
|
+ from (select aid,DATE_FORMAT(create_time , '%Y-%m-%d') dateTime
|
|
|
|
|
+ from user_follow where aid= #{aid} )a
|
|
|
|
|
+ group by aid,dateTime
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectAdminOrder" resultType="com.goafanti.common.model.AdminUserCount">
|
|
|
|
|
+ select salesman_id aid ,count(*)orderCount, dateTime
|
|
|
|
|
+ from (select salesman_id, DATE_FORMAT(create_time , '%Y-%m-%d') dateTime
|
|
|
|
|
+ from t_order_new
|
|
|
|
|
+ where delete_sign in (0,2,3) and process_status >0
|
|
|
|
|
+ and salesman_id= #{aid} )x
|
|
|
|
|
+ group by salesman_id ,dateTime
|
|
|
</select>
|
|
</select>
|
|
|
<select id="adminStatisticsPublicReleaseByAidAndTime" resultType="java.lang.Integer">
|
|
<select id="adminStatisticsPublicReleaseByAidAndTime" resultType="java.lang.Integer">
|
|
|
select sum(1) rangePublicReleaseSum
|
|
select sum(1) rangePublicReleaseSum
|