anderx пре 4 година
родитељ
комит
a1e4888155

+ 23 - 4
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -850,7 +850,11 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	left join admin f on e.task_receiver=f.id
   	left join admin f on e.task_receiver=f.id
   	left join (select order_no from new_order_change group by order_no)g on a.order_no=g.order_no
   	left join (select order_no from new_order_change group by order_no)g on a.order_no=g.order_no
   	</if>
   	</if>
-  	where a.delete_sign !=1
+    <if test="specially == 9">
+    left join t_order_task tot on a.order_no =tot.order_no
+    left join business_project bp on tot.commodity_id =bp.id
+    </if>
+  	where a.delete_sign in(0,2)
     <if test="specially ==7">
     <if test="specially ==7">
       and a.process_status > 4
       and a.process_status > 4
       and a.salesman_id = #{aid,jdbcType=VARCHAR}
       and a.salesman_id = #{aid,jdbcType=VARCHAR}
@@ -858,8 +862,11 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     <if test="specially ==8">
     <if test="specially ==8">
       and a.process_status > 4
       and a.process_status > 4
   	    <if test="uid !=null">
   	    <if test="uid !=null">
-      and a.buyer_id = #{uid}
+        and a.buyer_id = #{uid}
         </if>
         </if>
+    </if>
+    <if test="specially ==9">
+      and a.process_status > 4 and bp.type=5
       <if test="aid !=null">
       <if test="aid !=null">
         and a.salesman_id = #{aid,jdbcType=VARCHAR}
         and a.salesman_id = #{aid,jdbcType=VARCHAR}
       </if>
       </if>
@@ -973,14 +980,26 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	select count(*)
   	select count(*)
   	from t_order_new a  left join `user` b on a.buyer_id=b.id left join t_order_mid c on a.order_no=c.order_no
   	from t_order_new a  left join `user` b on a.buyer_id=b.id left join t_order_mid c on a.order_no=c.order_no
   	left join department dep on a.order_dep=dep.id
   	left join department dep on a.order_dep=dep.id
-  	where a.delete_sign !=1
+     <if test="specially == 9">
+       left join t_order_task tot on a.order_no =tot.order_no
+       left join business_project bp on tot.commodity_id =bp.id
+     </if>
+  	where a.delete_sign in(0,2)
      <if test="specially ==7">
      <if test="specially ==7">
        and a.process_status > 4
        and a.process_status > 4
        and a.salesman_id = #{aid,jdbcType=VARCHAR}
        and a.salesman_id = #{aid,jdbcType=VARCHAR}
      </if>
      </if>
      <if test="specially ==8">
      <if test="specially ==8">
        and a.process_status > 4
        and a.process_status > 4
-       and a.buyer_id = #{uid}
+       <if test="uid !=null">
+         and a.buyer_id = #{uid}
+       </if>
+     </if>
+     <if test="specially ==9">
+       and a.process_status > 4 and bp.type=5
+       <if test="aid !=null">
+         and a.salesman_id = #{aid,jdbcType=VARCHAR}
+       </if>
      </if>
      </if>
     <if test="outsource != null">
     <if test="outsource != null">
   	and a.outsource= #{outsource,jdbcType=INTEGER}
   	and a.outsource= #{outsource,jdbcType=INTEGER}

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

@@ -2169,7 +2169,7 @@ inner join department de on x.department_id=de.id left join business_category bc
       sum(ttm.high_new_retrial)signBacks
       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
       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 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
+      left join department e on d.department_id =e.id  where b.`type` =5  and c.process_status >4 and c.delete_sign in (0,2)
       <if test="depId!=null">
       <if test="depId!=null">
         and e.id= #{depId}
         and e.id= #{depId}
       </if>
       </if>
@@ -2189,7 +2189,7 @@ inner join department de on x.department_id=de.id left join business_category bc
      sum(if(a.project_status != 10,1,0))notPass, sum(ttm.high_new_retrial)signBacks
      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
     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 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
+    left join department e on d.department_id =e.id where b.`type` =5  and c.process_status >4 and c.delete_sign in (0,2)
     <if test="province!=null">
     <if test="province!=null">
       and e.province= #{province}
       and e.province= #{province}
     </if>
     </if>

+ 1 - 1
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -236,7 +236,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	/**
 	/**
 	 * 订单列表
 	 * 订单列表
 	 * 
 	 * 
-	 *specially  0 个人 1 营销员管理 2 驳回 3 特批 4 咨询师管理 5部门订单查询 6客服查询 7统计签单订单 8客户订单列表
+	 *specially  0 个人 1 营销员管理 2 驳回 3 特批 4 咨询师管理 5部门订单查询 6客服查询 7统计签单订单 8客户订单列表 9 复审订单
 	 *distribution	(咨询师管理列表 0 未分配 1部分 2全部
 	 *distribution	(咨询师管理列表 0 未分配 1部分 2全部
 	 *amountStatus 0 10万元以下 1 10万~20万 2 20万~30万 3 30万~40万  4 40万以上
 	 *amountStatus 0 10万元以下 1 10万~20万 2 20万~30万 3 30万~40万  4 40万以上
 	 */
 	 */

+ 1 - 0
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -593,6 +593,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			if(specially==1||specially==5) params.put("deps", orderService.selectMyDeps());
 			if(specially==1||specially==5) params.put("deps", orderService.selectMyDeps());
 		}else if(specially==8){
 		}else if(specially==8){
 			if (StringUtils.isNotBlank(uid)) params.put("uid", uid);
 			if (StringUtils.isNotBlank(uid)) params.put("uid", uid);
+		}else if (specially==9){
 			if (StringUtils.isNotBlank(aid)) params.put("aid", aid);
 			if (StringUtils.isNotBlank(aid)) params.put("aid", aid);
 		}
 		}
 			params.put("specially",specially);
 			params.put("specially",specially);