Browse Source

高新复审开发

anderx 4 years ago
parent
commit
c97f17c0c9
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

+ 4 - 3
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

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