Commit fbf8109f by duanhq

服务类占比 by duanht 2019/3/21

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18713 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent eebe0477
......@@ -626,10 +626,16 @@
SELECT
install_device_type installDeviceType,
COUNT(install_device_type) count
FROM sys_order
WHERE sys_order.order_type = 1 AND active_status = 8 AND merchant_id = #{userId}
FROM
sys_user_org suo
LEFT JOIN sys_user su ON suo.org_id = su.org_id
LEFT JOIN sys_order so ON su.id = so.merchant_id
WHERE
so.order_type = 1
AND active_status = 8
AND suo.user_id = #{userId}
<if test="dateStart != null and dateEnd!=null and dateStart !='' and dateEnd !=''">
and sys_order.create_time between #{dateStart,jdbcType=TIMESTAMP} and #{dateEnd,jdbcType=TIMESTAMP}
and sys_order.complete_time between #{dateStart,jdbcType=TIMESTAMP} and #{dateEnd,jdbcType=TIMESTAMP}
</if>
GROUP BY install_device_type
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!