|
|
@@ -921,6 +921,8 @@
|
|
|
(#{id,jdbcType=VARCHAR},#{aid,jdbcType=VARCHAR},#{contactsId,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<select id="frequentContactsList" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminListBo">
|
|
|
select a.id,b.id as contactId,b.name,b.position,b.contact_mobile as contactMobile,c.name as departmentName,y.role_name as roleName
|
|
|
from admin_contacts a left join admin b
|
|
|
@@ -1260,6 +1262,10 @@
|
|
|
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
|
|
|
+ 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
|
|
|
</select>
|
|
|
|
|
|
<select id="adminStatisticsInfoByTime" resultType="com.goafanti.admin.bo.AdminStatisticsBo">
|
|
|
@@ -1307,4 +1313,11 @@
|
|
|
(a.release_end > #{startTime} and a.release_end < #{endTime})or
|
|
|
(a.release_start < #{startTime} and a.release_end > #{endTime}))
|
|
|
</select>
|
|
|
+ <select id="addAdminContactsRangeReceivables" resultType="java.math.BigDecimal">
|
|
|
+ SELECT ifnull(sum(a.money),0) 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}
|
|
|
+ and a.start_time between #{startTime} and #{endTime}
|
|
|
+ </select>
|
|
|
</mapper>
|