Explorar o código

收款列表BUG修改

anderx %!s(int64=6) %!d(string=hai) anos
pai
achega
7b9aea849d

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

@@ -1089,8 +1089,9 @@
 left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join admin a on 	o.salesman_id = a.id 
 left join ( select sum(transaction_amount) as amount , order_no from t_order_bill_new group by order_no ) b on b.order_no = o.order_no 
 left join ( select order_no, max(name) as name from outsource_organization group by order_no) e on o.order_no = e.order_no
-left join ( select x.order_no, y.maxTime, x.transaction_amount from t_order_bill_new x inner join ( select order_no, max(create_time) maxTime
-		from t_order_bill_new group by order_no)y on x.order_no = y.order_no and x.create_time = y.maxTime) f on o.order_no = f.order_no
+left join (select 	x.order_no, max(y.maxTime) maxTime, max(x.transaction_amount)transaction_amount
+	from t_order_bill_new x left join (select order_no, max(create_time) maxTime from t_order_bill_new group by order_no)y on
+	x.order_no = y.order_no and x.create_time = y.maxTime group by x.order_no) f on o.order_no = f.order_no
 left join ( select order_no , sum(amount) invoiceAmount from t_order_invoice where status = 2 group by order_no ) g on o.order_no = g.order_no
 where delete_sign != 1 and outsource=  #{o.outsource,jdbcType=INTEGER}
   	 	<if test="o.processStatus == 3">
@@ -1138,27 +1139,28 @@ where delete_sign != 1 and outsource=  #{o.outsource,jdbcType=INTEGER}
   	 left join admin a on o.salesman_id = a.id
   	 left join (select sum(transaction_amount) as amount ,order_no from t_order_bill_new
   				group by order_no ) b on b.order_no = o.order_no
-  	 where delete_sign != 1 and outsource=#{o.outsource,jdbcType=INTEGER}
-  		<if test="o.processStatus == 3">
-	  	and process_status = #{o.processStatus,jdbcType=INTEGER}
+  	 where delete_sign != 1 and outsource=  #{o.outsource,jdbcType=INTEGER}
+  	 	<if test="o.processStatus == 3">
+	  	and o.process_status = #{o.processStatus,jdbcType=INTEGER}
 	  	</if>
 	  	<if test="o.processStatus == 4">
-	  	and process_status &gt;= #{o.processStatus,jdbcType=INTEGER}
+	  	and o.process_status &gt;= #{o.processStatus,jdbcType=INTEGER}
 	  	</if>
   		and (approval = 0 or approval = 2)
 	  	and o.finance_id = #{o.financeId,jdbcType=VARCHAR}
-	  	<if test="o.orderStatus != null and o.orderStatus != &quot;&quot;">
+  		<if test="o.orderStatus != null and o.orderStatus != &quot;&quot;">
 	  	and o.order_status = #{o.orderStatus,jdbcType=INTEGER}
 	  	</if>
-	  	<if test="o.departmentId != null and o.departmentId != &quot;&quot;">
+  		<if test="o.departmentId != null and o.departmentId != &quot;&quot;">
 	  	and o.order_dep = #{o.departmentId,jdbcType=INTEGER}
 	  	</if>
 	  	<if test="o.contractNo != null and o.contractNo != &quot;&quot;">
-  		and o.contract_no like CONCAT('%',#{o.contractNo,jdbcType=VARCHAR},'%')
-  		</if>
-	  	<if test="o.liquidationStatus != null and o.liquidationStatus != &quot;&quot;">
-	  	and o.liquidation_status = #{o.liquidationStatus,jdbcType=VARCHAR}
+  	and o.contract_no like CONCAT('%',#{o.contractNo,jdbcType=VARCHAR},'%')
+  	</if>
+  		<if test="o.liquidationStatus != null and o.liquidationStatus != &quot;&quot;">
+	  	and o.liquidation_status = #{o.liquidationStatus,jdbcType=INTEGER}
 	  	</if>
+  		
   		<if test="o.orderNo != null and o.orderNo != &quot;&quot;">
 	  	and o.order_no = #{o.orderNo,jdbcType=VARCHAR}
 	  	</if>

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

@@ -484,7 +484,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 				if(pageNo==null||pageNo<0)pageNo=1;
 				Pagination<OrderListBo> p=(Pagination<OrderListBo>) fundManageOrderService.financeList(order, pageNo, pageSize).get("pagination");
 				List<OrderListBo> list=(List<OrderListBo>)p.getList() ;
-				if(list.isEmpty())throw new BusinessException(new Error("数据是空的。"));
+				if(list.isEmpty())throw new BusinessException(new Error("数据是空的。","数据是空的。"));
 		    	try {
 		    		//设计表头
 		    		String[] comment = {"订单编号", "合同编号","客户名称","订单部门","订单负责人","签单日期","下单日期",