Browse Source

订单管理

wanghui 7 years ago
parent
commit
ee828e99ab

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

@@ -1576,7 +1576,7 @@
 			a.technician_id = e.id left join department_management f on 
 			c.department_id = f.id left join business_varieties g on
 			a.contract_type = g.id
-		where a.order_type = 0 and a.order_status = 3 
+		where a.order_type = 0 and a.order_status = 3 and project_stage = 3
 			and (a.liquidation_status = 1 or a.liquidation_status = 2 or a.approval = 2) <!-- 已首付 or 已付清 or 已特批 -->
 		<if test="salesmanId != null">
 			and a.salesman_id = #{a.salesmanId,jdbcType=VARCHAR}
@@ -1593,7 +1593,6 @@
 		<if test="endDate != null">
 			and a.create_time &lt; #{a.endDate,jdbcType=TIMESTAMP}
 		</if>
-		
 		<if test="approval != null">
 			and a.approval = #{approval,jdbcType=INTEGER}
 		</if>
@@ -1612,6 +1611,7 @@
 		<if test="page_sql != null">
 			${page_sql}
 		</if>
+		    order by a.create_time desc
   </select>
   <select id="selectSetUpServiceOrderCount" resultType="java.lang.Integer">
 		select
@@ -1624,7 +1624,7 @@
 			a.technician_id = e.id left join department_management f on 
 			c.department_id = f.id left join business_varieties g on
 			a.contract_type = g.id
-		where a.order_type = 0 and a.order_status = 3 
+		where a.order_type = 0 and a.order_status = 3 and project_stage = 3
 			and (a.liquidation_status = 1 or a.liquidation_status = 2 or a.approval = 2) <!-- 已首付 or 已付清 or 已特批 -->
 		<if test="salesmanId != null">
 			and a.salesman_id = #{a.salesmanId,jdbcType=VARCHAR}

+ 1 - 0
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -623,6 +623,7 @@
 	<if test="page_sql != null">
 		${page_sql}
 	</if>
+	order by a.create_time desc
   </select>
   <select id="listProjectCount" resultType="java.lang.Integer">
   	select