Browse Source

营销经理审核列表开发

anderx 3 years ago
parent
commit
eb8c112003

+ 24 - 10
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -953,8 +953,11 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	left join (select order_no from new_order_change group by order_no)g on a.order_no=g.order_no
   	</if>
     <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
+      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>
+    <if test="specially == 10">
+      left join admin mg on a.salesman_id=mg.id
     </if>
   	where a.delete_sign in(0,2)
     <if test="specially ==7">
@@ -983,9 +986,13 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.order_status  in(0,1,2,4)
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
   	</if>
-  	<if test="specially == 1">
-  	and a.process_status = 1  and a.order_status = 1
-  	</if>
+    <if test="specially == 10">
+      and a.process_status = 1  and a.order_status = 1
+  	  and mg.manager_id= #{aid}
+    </if>
+    <if test="specially == 1">
+      and a.process_status = 2  and a.order_status = 1
+    </if>
   	<if test="specially == 2">
   	and a.order_status in(3,5)
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
@@ -993,11 +1000,11 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     <if test="specially == 3">
       and  a.order_status=2
       <if test="approval ==0">
-        and a.process_status in(7)
+        and a.process_status in(4)
         and a.approval = 0
       </if>
       <if test="approval ==1">
-        and a.process_status in(7)
+        and a.process_status in(4)
         and a.approval in
             <if test="manageType ==0">
             (1)
@@ -1041,13 +1048,13 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
       </foreach>
     </if>
   	<if test="distribution == 0">
-  	and a.process_status &lt; 5
+  	and a.process_status &lt; 6
   	</if>
   	<if test="distribution == 1">
-  	and a.process_status = 5
+  	and a.process_status = 6
   	</if>
   	<if test="distribution == 2">
-  	and a.process_status = 6
+  	and a.process_status = 7
   	</if>
   	<if test="name != null">
   	and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
@@ -1115,6 +1122,9 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
        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>
+  	 <if test="specially == 10">
+       left join admin mg on a.salesman_id=mg.id
+     </if>
   	where a.delete_sign in(0,2)
      <if test="specially ==7">
        and a.process_status > 4
@@ -1142,6 +1152,10 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
       and a.order_status  in(0,1,2,4)
       and a.salesman_id = #{aid,jdbcType=VARCHAR}
     </if>
+     <if test="specially == 10">
+       and a.process_status = 1  and a.order_status = 1
+       and mg.manager_id= #{aid}
+     </if>
   	<if test="specially == 1">
   	and a.process_status = 1  and a.order_status = 1
   	</if>

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

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

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

@@ -754,7 +754,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return p;
 	}
 
+
 	private Pagination<TOrderNewBo> addParams(InputOrderNewListBo in, Map<String, Object> params) {
+//		specially 0 个人 1 营销员管理 2 驳回 3 特批 4 咨询师管理 5部门订单查询 6客服查询 7统计签单订单 8客户订单列表 9 复审订单 10 营销经理
+		if (TokenManager.hasRole(AFTConstants.TECH_ADMIN))in.setSpecially(4);
+		else if (TokenManager.hasRole(AFTConstants.SALESMAN_ADMIN))in.setSpecially(10);
+		else if (TokenManager.hasRole(AFTConstants.SALESMAN_MANAGER))in.setSpecially(10);
+		else if (TokenManager.hasRole(AFTConstants.SALESMAN))in.setSpecially(0);
 		if (in.getSpecially()!=null&&(in.getSpecially()==0|| in.getSpecially()==1|| in.getSpecially()==2|| in.getSpecially()==4|| in.getSpecially()==5|| in.getSpecially()==7)) {
 			//0 个人 1 营销员管理 2 驳回 3 特批 4 咨询师管理 5部门订单查询
 			if (in.getSpecially()!=3&& in.getSpecially()!=4) {