|
|
@@ -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)
|