|
@@ -82,6 +82,7 @@
|
|
<include refid="workClientInfoJoinsLink"/>
|
|
<include refid="workClientInfoJoinsLink"/>
|
|
left join sys_user su on su.id = a.create_by
|
|
left join sys_user su on su.id = a.create_by
|
|
left join sys_office so on so.id = su.office_id
|
|
left join sys_office so on so.id = su.office_id
|
|
|
|
+ left join sys_office o on o.id = a.office_id
|
|
<if test="workClientLinkman != null and workClientLinkman.name !=null and workClientLinkman.name !=''">
|
|
<if test="workClientLinkman != null and workClientLinkman.name !=null and workClientLinkman.name !=''">
|
|
LEFT JOIN work_client_linkman b ON a.id = b.client_id
|
|
LEFT JOIN work_client_linkman b ON a.id = b.client_id
|
|
</if>
|
|
</if>
|
|
@@ -116,6 +117,17 @@
|
|
<if test="workClientLinkman != null and workClientLinkman.linkPhone != null and workClientLinkman.linkPhone !=''">
|
|
<if test="workClientLinkman != null and workClientLinkman.linkPhone != null and workClientLinkman.linkPhone !=''">
|
|
AND b.link_phone LIKE concat('%',#{workClientLinkman.linkPhone},'%')
|
|
AND b.link_phone LIKE concat('%',#{workClientLinkman.linkPhone},'%')
|
|
</if>
|
|
</if>
|
|
|
|
+
|
|
|
|
+ <if test="office!=null and office.id=='' and office.name!=null and office.name!='' ">
|
|
|
|
+ and o.name like concat('%',#{office.name},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="officeIdList!=null and officeIdList.size!=0">
|
|
|
|
+ and a.office_id in
|
|
|
|
+ <foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
|
|
|
|
+ #{officeId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+
|
|
<if test="address != null and address != ''">
|
|
<if test="address != null and address != ''">
|
|
AND a.address LIKE
|
|
AND a.address LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{address}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{address}||'%'</if>
|
|
@@ -137,9 +149,9 @@
|
|
<if test="(createId != null and createId != '') or (createNameStr != null and createNameStr != '')">
|
|
<if test="(createId != null and createId != '') or (createNameStr != null and createNameStr != '')">
|
|
AND (a.create_by = #{createId} or su.name like concat('%',#{createNameStr},'%'))
|
|
AND (a.create_by = #{createId} or su.name like concat('%',#{createNameStr},'%'))
|
|
</if>
|
|
</if>
|
|
- <if test="officeId != null and officeId != ''">
|
|
|
|
|
|
+ <!--<if test="officeId != null and officeId != ''">
|
|
AND so.id = #{officeId}
|
|
AND so.id = #{officeId}
|
|
- </if>
|
|
|
|
|
|
+ </if>-->
|
|
AND a.company_id = #{currentUser.company.id}
|
|
AND a.company_id = #{currentUser.company.id}
|
|
${sqlMap.dsf}
|
|
${sqlMap.dsf}
|
|
<choose>
|
|
<choose>
|
|
@@ -340,6 +352,7 @@
|
|
left join work_client_job_type_info c on c.work_client_id=a.id
|
|
left join work_client_job_type_info c on c.work_client_id=a.id
|
|
left join sys_user su on su.id = a.create_by
|
|
left join sys_user su on su.id = a.create_by
|
|
left join sys_office so on so.id = su.office_id
|
|
left join sys_office so on so.id = su.office_id
|
|
|
|
+ left join sys_office o on o.id = a.office_id
|
|
<where>
|
|
<where>
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
<if test="name != null and name != ''">
|
|
<if test="name != null and name != ''">
|
|
@@ -366,6 +379,17 @@
|
|
<if test="workClientLinkman != null and workClientLinkman.linkPhone != null and workClientLinkman.linkPhone !=''">
|
|
<if test="workClientLinkman != null and workClientLinkman.linkPhone != null and workClientLinkman.linkPhone !=''">
|
|
AND b.link_phone LIKE concat('%',#{workClientLinkman.linkPhone},'%')
|
|
AND b.link_phone LIKE concat('%',#{workClientLinkman.linkPhone},'%')
|
|
</if>
|
|
</if>
|
|
|
|
+
|
|
|
|
+ <if test="office!=null and office.id=='' and office.name!=null and office.name!='' ">
|
|
|
|
+ and o.name like concat('%',#{office.name},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="officeIdList!=null and officeIdList.size!=0">
|
|
|
|
+ and a.office_id in
|
|
|
|
+ <foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
|
|
|
|
+ #{officeId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+
|
|
<if test="address != null and address != ''">
|
|
<if test="address != null and address != ''">
|
|
AND a.address LIKE
|
|
AND a.address LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{address}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{address}||'%'</if>
|
|
@@ -387,9 +411,9 @@
|
|
<if test="(createId != null and createId != '') or (createNameStr != null and createNameStr != '')">
|
|
<if test="(createId != null and createId != '') or (createNameStr != null and createNameStr != '')">
|
|
AND (a.create_by = #{createId} or su.name = #{createNameStr})
|
|
AND (a.create_by = #{createId} or su.name = #{createNameStr})
|
|
</if>
|
|
</if>
|
|
- <if test="officeId != null and officeId != ''">
|
|
|
|
|
|
+ <!--<if test="officeId != null and officeId != ''">
|
|
AND so.id = #{officeId}
|
|
AND so.id = #{officeId}
|
|
- </if>
|
|
|
|
|
|
+ </if>-->
|
|
AND a.company_id = #{currentUser.company.id}
|
|
AND a.company_id = #{currentUser.company.id}
|
|
${sqlMap.dsf}
|
|
${sqlMap.dsf}
|
|
<choose>
|
|
<choose>
|