Ver código fonte

Merge branch 'test' of jishutao/kede-server into prod

anderx 3 anos atrás
pai
commit
35b72721b2

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

@@ -884,7 +884,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.outsource= #{outsource,jdbcType=INTEGER}
   	</if>
   	<if test="specially == 0">
-  	and a.order_status not in(3,5,6,7) and a.approval !=3
+  	and a.order_status not in(3,5,6,7) and a.approval in(0,1,2)
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
   	</if>
   	<if test="specially == 1">
@@ -1014,7 +1014,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.outsource= #{outsource,jdbcType=INTEGER}
   	</if>
   	<if test="specially == 0">
-  	and a.order_status not in(3,5,6,7) and a.approval !=3
+  	and a.order_status not in(3,5,6,7) and a.approval in(0,1,2)
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
   	</if>
   	<if test="specially == 1">

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

@@ -1576,7 +1576,7 @@
       right join (select tid ,apply_count sqs,reject_count bhs,certificates_count xzs from t_task_mid
       where apply_count &gt; 0)tj on a.id=tj.tid
     </if>
-    where a.split_status in (0,2)
+    where a.split_status in (0,2) and b. delete_sign in (0,2)
     <!--  筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 -->
     <if test="screen ==0">
       and a.project_status in(1,2,3)
@@ -1645,9 +1645,20 @@
 
   <select id="selectProjectStatisticsCount" resultType="java.lang.Integer">
     select  count(*)
-    from t_order_task a left join t_order_new b on a.order_no =b.order_no left join department c on b.order_dep =c.id left join district_glossory d on c.province=d.id
-    left join t_order_mid e on b.order_no =e.order_no left join business_project bp on a.commodity_id =bp.id left join business_category bc on bp.cid =bc.id
-    left join t_task_mid ttm on a.id=ttm.tid left join admin ta on a.task_receiver =ta.id left join department td on ta.department_id =td.id
+    from t_order_task a left join t_order_new b on a.order_no =b.order_no
+    <if test="province !=null">
+      left join department c on b.order_dep =c.id
+    </if>
+    <if test="userName !=null">
+      left join t_order_mid e on b.order_no =e.order_no
+    </if>
+    <if test="projectStatus !=null or projectType !=null">
+      left join business_project bp on a.commodity_id =bp.id
+    </if>
+    <if test="thchDepId !=null">
+      left join admin ta on a.task_receiver =ta.id
+      left join department td on ta.department_id =td.id
+    </if>
     <if test="status==3 or status==4">
       left join task_progress tp  on a.id=tp.task_id
     </if>
@@ -1670,7 +1681,7 @@
       right join (select tid ,apply_count sqs,reject_count bhs,certificates_count xzs from t_task_mid
       where apply_count &gt; 0)tj on a.id=tj.tid
     </if>
-    where a.split_status in (0,2)
+    where a.split_status in (0,2) and b. delete_sign in (0,2)
     <!--  筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 -->
     <if test="screen ==0">
       and a.project_status in(1,2,3)

+ 4 - 10
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -434,8 +434,7 @@
 			left join district_glossory dg1 on b.location_province = dg1.id
 			left join district_glossory dg2 on b.location_city = dg2.id
 			left join district_glossory dg3 on b.location_area = dg3.id
-		where
-			a.type = 1 and a.share_type = 1 and a.status != 1 and a.source != 0
+		where a.type = 1 and a.share_type = 1 and a.status = 0 and a.source in(1,2,3)
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
@@ -472,15 +471,10 @@
 			count(0)
 		from
 			user a
+		<if test="province != null or city != null or area != null">
 			inner join organization_identity b on a.id = b.uid
-			left join district_glossory dg1 on b.location_province = dg1.id
-			left join district_glossory dg2 on b.location_city = dg2.id
-			left join district_glossory dg3 on b.location_area = dg3.id
-		where
-			a.type = 1
-			and a.share_type = 1
-			and a.status != 1
-			and a.source != 0
+		</if>
+		where a.type = 1 and a.share_type = 1 and a.status = 0 and a.source in(1,2,3)
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>

+ 3 - 1
src/main/java/com/goafanti/order/service/impl/PushOrderService.java

@@ -24,7 +24,9 @@ public class PushOrderService {
      * @param url
      * @param aid
      * @param processStatus
-     * @return
+     * @return  超级管理员、运营决策者、总裁、外包审核与可以查看;营销员与经理可以查看自己的订单;
+     *         营销管理员、财务专员、咨询师管理员可以看到在自己手上的合同;其他只能获取到无权限查看的图片
+     *
      */
     public String processStatusConstant(String url,String aid,Integer processStatus){
         //流程状态 0-已派营销员,1-已派营销员管理员,2-已派财务管理员,3-已派财务专员,4-已派咨询师管理员,5-已部分派咨询师经理,6-已部全部派咨询师经理