Преглед изворни кода

update修改派单列表显示数

Signed-off-by: anderx <312518615@qq.com>
anderx пре 5 година
родитељ
комит
7067ea5e3f
1 измењених фајлова са 6 додато и 16 уклоњено
  1. 6 16
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

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

@@ -1382,7 +1382,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.total_amount  &gt; 40
   	</if>
   	<if test="depId != null">
-  	and dep.id = #{depId,jdbcType=VARCHAR}
+  	and a.order_dep = #{depId,jdbcType=VARCHAR}
   	</if>
   	<if test="starTime !=null and endTime !=null">
   	and a.create_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
@@ -1413,18 +1413,8 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="specially == 1">
   	left join admin ad on a.salesman_id=ad.id
   	</if>
-  	<if test="specially == 2">
-	left join (select * from t_order_back a where back_status=0) e on a.order_no=e.order_no
-  	left join admin f on e.initiate=f.id
-  	</if>
-  	<if test="specially == 4">
-  	left join (select min(id)id,order_no from t_order_task where main=1 group by order_no) ex on ex.order_no=a.order_no
-	left join t_order_task  e on e.id = ex.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
-  	</if>
   	where a.delete_sign !=1
-  	<if test="outsource != null">
+    	<if test="outsource != null">
   	and a.outsource= #{outsource,jdbcType=INTEGER}
   	</if>
   	<if test="specially == 0">
@@ -1432,7 +1422,8 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
   	</if>
   	<if test="specially == 1">
-  	and a.process_status =1  and a.order_status=1
+  	and a.process_status = 1  and a.order_status = 1
+  	<!-- and c.department_id in (#{deps,jdbcType=VARCHAR}) -->
   	and ad.department_id in
   	<foreach close=")" collection="deps" item="deps" open="(" separator=",">
 	 #{deps.id}
@@ -1456,7 +1447,6 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	</if>
   	</if>
   	<if test="specially == 4">
-  	and e.main=1
   	and a.process_status in (4,5,6,99)
   	and a.order_status not in(5,7)
   	</if>
@@ -1478,7 +1468,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="name != null">
   	and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
-  	<if test="orderNo != null">
+  	<if test="orderNo != null"> 
   	and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%') 
   	</if>
   	<if test="contractNo != null">
@@ -1503,7 +1493,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.total_amount  &gt; 40
   	</if>
   	<if test="depId != null">
-  	and dep.id = #{depId,jdbcType=VARCHAR}
+  	and a.order_dep = #{depId,jdbcType=VARCHAR}
   	</if>
   	<if test="starTime !=null and endTime !=null">
   	and a.create_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}