|
|
@@ -964,16 +964,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectFsStoreOrderGroupByUserId" resultType="com.fs.hisStore.vo.FsStoreOrderCountsVO">
|
|
|
SELECT
|
|
|
company_user_id AS id,
|
|
|
+ dept_name as groupName,
|
|
|
COALESCE(NULLIF(nick_name, ''),'客户自购') AS name,
|
|
|
|
|
|
<include refid="selectFsStoreOrderConditions" />
|
|
|
|
|
|
FROM
|
|
|
(
|
|
|
- SELECT so.*,u.nick_name,u.dept_id company_dept_id,a.audit_status
|
|
|
+ SELECT so.*,u.nick_name,u.dept_id company_dept_id,a.audit_status,d.dept_name
|
|
|
FROM
|
|
|
fs_store_order_scrm AS so
|
|
|
LEFT JOIN company_user u ON so.company_user_id = u.user_id
|
|
|
+ left join company_dept d ON d.dept_id = u.dept_id
|
|
|
left join fs_store_order_audit_scrm a on a.order_id=so.id
|
|
|
where 1=1
|
|
|
<include refid="selectFsStoreOrderWhere" />
|