|
|
@@ -2164,8 +2164,9 @@ inner join department de on x.department_id=de.id left join business_category bc
|
|
|
where a.id= #{tid}
|
|
|
</select>
|
|
|
<select id="highNewRetrialStatistics" resultType="com.goafanti.order.bo.OutHighNewRetrialStatistics">
|
|
|
- SELECT e.province ,sum(1) quantity,sum(if(a.project_status=10,1,0))pass,sum(if(a.project_status != 10,1,0))notPass,
|
|
|
- sum(ttm.high_new_retrial)highNewRetrial
|
|
|
+ select t1. province,dg.name provinceName ,t1.quantity,t1.pass,t1.notPass,ifnull(t1.signBacks,0) signBacks
|
|
|
+ from (SELECT e.province ,sum(1) quantity,sum(if(a.project_status=10,1,0))pass,sum(if(a.project_status != 10,1,0))notPass,
|
|
|
+ sum(ttm.high_new_retrial)signBacks
|
|
|
from t_order_task a left join business_project b on a.commodity_id =b.id left join t_task_mid ttm on a.id=ttm.tid
|
|
|
left join t_order_new c on a.order_no =c.order_no left join admin d on c.salesman_id =d.id
|
|
|
left join department e on d.department_id =e.id where b.`type` =5 and c.process_status >4
|
|
|
@@ -2175,7 +2176,7 @@ inner join department de on x.department_id=de.id left join business_category bc
|
|
|
<if test="startDate!=null and endDate!=null">
|
|
|
and c.sign_time between #{startDate} and #{endDate}
|
|
|
</if>
|
|
|
- group by e.province
|
|
|
+ group by e.province )t1 left join district_glossory dg on t1.province=dg.id
|
|
|
</select>
|
|
|
<select id="getHighNewRetrial" resultType="java.lang.Integer">
|
|
|
select count(*) from t_order_new a left join t_order_new b on a.buyer_id =b.buyer_id
|