|
|
@@ -1848,7 +1848,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND date_format(o.delivery_import_time,'%y%m%d') <= date_format(#{maps.deliveryImportTimeList[1]},'%y%m%d')
|
|
|
</if>
|
|
|
<if test="maps.deptId != null ">
|
|
|
- AND (o.dept_id = #{maps.deptId} OR o.dept_id IN ( SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{maps.deptId}, ancestors) ))
|
|
|
+ AND (cu.dept_id = #{maps.deptId} OR cu.dept_id IN (
|
|
|
+ SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{maps.deptId}, ancestors)
|
|
|
+ ))
|
|
|
</if>
|
|
|
<if test="maps.erpPhoneNumber != null and maps.erpPhoneNumber != ''">
|
|
|
and o.erp_phone like concat(#{maps.erpPhoneNumber},'%')
|
|
|
@@ -1901,7 +1903,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="(maps.nickname != null and maps.nickname !='') or (maps.phone != null and maps.phone !='')">
|
|
|
left join fs_user u on o.user_id=u.user_id
|
|
|
</if>
|
|
|
- <if test="maps.companyUserNickName != null and maps.companyUserNickName != ''">
|
|
|
+ <if test="(maps.companyUserNickName != null and maps.companyUserNickName != '') or (maps.deptId != null)">
|
|
|
left join company_user cu on cu.user_id=o.company_user_id
|
|
|
</if>
|
|
|
<if test="maps.erpAccount != null and maps.erpAccount != ''">
|
|
|
@@ -2035,7 +2037,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND date_format(o.delivery_import_time,'%y%m%d') <= date_format(#{maps.deliveryImportTimeList[1]},'%y%m%d')
|
|
|
</if>
|
|
|
<if test="maps.deptId != null ">
|
|
|
- AND (o.dept_id = #{maps.deptId} OR o.dept_id IN ( SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{maps.deptId}, ancestors) ))
|
|
|
+ AND (cu.dept_id = #{maps.deptId} OR cu.dept_id IN (
|
|
|
+ SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{maps.deptId}, ancestors)
|
|
|
+ ))
|
|
|
</if>
|
|
|
<if test="maps.erpPhoneNumber != null and maps.erpPhoneNumber != ''">
|
|
|
and so.erp_phone like concat(#{maps.erpPhoneNumber},'%')
|