浏览代码

修改领取客户不在获取客户联系人

anderx 1 年之前
父节点
当前提交
db9ce9c84b

+ 12 - 8
src/main/java/com/goafanti/common/mapper/UserMidMapper.xml

@@ -741,6 +741,9 @@
     <if test="dunType !=null">
       left join new_order_dun nod  on e.id=nod.tid
     </if>
+    <if test="province !=null">
+    left join admin p1 on a.salesman_id=p1.id left join department p2 on p1.department_id=p2.id
+    </if>
     where a.process_status >6 and a.delete_sign in (0,2)
        <include refid="selectStatisticsOrderProjectSql"/>
     <if test="page_sql!=null">
@@ -831,7 +834,7 @@
       and nod.dun_type = #{dunType}
     </if>
     <if test="province !=null">
-      and a4.id = #{province}
+      and p2.province = #{province}
     </if>
     <if test="salesmanId !=null">
       and a.salesman_id = #{salesmanId}
@@ -854,23 +857,24 @@
     <if test="bigCustomer !=null">
       and b2.big_customer = #{bigCustomer}
     </if>
+#     b.change_count changeCount, b.restatement_count restatementCount,b.refund_count refundCount
     <if test="restatement ==0">
-      and t1.cb = 0
+      and b.restatement_count = 0
     </if>
     <if test="restatement ==1">
-      and t1.cb > 0
+      and b.restatement_count > 0
     </if>
-    <if test="changeType ==0">
-      and t1.counts is null
+    <if test="changeCount ==0">
+      and b.change_count =0
     </if>
     <if test="changeType ==1">
-      and t1.counts >0
+      and b.change_count >0
     </if>
     <if test="refundType ==0">
-      and (t1.tdtk = 0 or t1.tdtk is null)
+      and b.refund_count=0
     </if>
     <if test="refundType ==1">
-      and t1.tdtk >0
+      and b.refund_count >0
     </if>
     <if test="orderType ==0">
       and a.order_type  in(0,2)

+ 3 - 0
src/main/java/com/goafanti/order/enums/NewOrderDunType.java

@@ -3,6 +3,9 @@ package com.goafanti.order.enums;
 import java.util.HashMap;
 import java.util.Map;
 
+/**
+ * 催款节点对应数据
+ */
 public enum NewOrderDunType {
 	CGZH_ZDY(10,"成果转化-"),
 	CGZH_SQ(11,"成果转化-首期"),