Browse Source

会员进度列表新增筛选开发

anderx 1 year ago
parent
commit
d64f7f5d08
1 changed files with 16 additions and 6 deletions
  1. 16 6
      src/main/java/com/goafanti/common/mapper/TaskDetailsMapper.xml

+ 16 - 6
src/main/java/com/goafanti/common/mapper/TaskDetailsMapper.xml

@@ -1188,23 +1188,33 @@ create_time = values(create_time)
         from task_details a left join t_order_task b on a.id =b.progress_tid
         left join admin c on b.task_receiver=c.id
         left join t_order_mid d on b.order_no=d.order_no
+        left join t_order_new e on b.order_no=e.order_no
         where (c.superior_id= #{aid} or c.id= #{aid})
-        <if test="userName != null and userName != ''">
-            and d.buyer_name like concat('%',#{userName},'%')
-        </if>
+        <include refid="selectTaskDetailsSql"/>
         <if test="page_sql !=null">
             ${page_sql}
         </if>
     </select>
+    <sql id="selectTaskDetailsSql">
+        <if test="userName != null and userName != ''">
+            and d.buyer_name like concat('%',#{userName},'%')
+        </if>
+        <if test="consultantName !=null">
+            and (a.technology_name like concat('%',#{consultantName},'%')
+                or a.finance_taxation_name like concat('%',#{consultantName},'%'))
+        </if>
+        <if test="contractNo !=null">
+            and e.contract_no like concat('%',#{contractNo},'%')
+        </if>
+
+    </sql>
     <select id="selectTaskDetailsCount" resultType="java.lang.Integer">
         select
             count(*)
         from task_details a left join t_order_task b on a.id =b.progress_tid
         left join admin c on b.task_receiver=c.id
         where (c.superior_id= #{aid} or c.id= #{aid})
-        <if test="userName != null and userName != ''">
-            and d.buyer_name like concat('%',#{userName},'%')
-        </if>
+        <include refid="selectTaskDetailsSql"/>
     </select>
 </mapper>