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