| 
					
				 | 
			
			
				@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="sellOilPrice"    column="sell_oil_price"  /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="driverOilPrice"    column="driver_oil_price"  /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="countNum"    column="count_num"  /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="driverDiscountAmt"    column="driver_discount_amt"  /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -63,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,sell_oil_price,driver_oil_price, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            other_amt, dzk_amt, score, member_no, member_amt, print_count, pay_type, pay_way, oil_personnel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            pay_date, created_date, order_type, car_no, customer_phone, customer_grade,sell_amt,sell_discount_amt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pay_date, created_date, order_type, car_no, customer_phone, customer_grade,sell_amt,sell_discount_amt,driver_discount_amt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             from pay_order p join sys_dept d on p.station_id =d.dept_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -187,7 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!--用戶信息关联订单查询--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectUserPayOrderList" parameterType="PayOrder" resultMap="PayOrderResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        SELECT order_id,dept_name as station_name,oil_name,order_no,p.oil_pirce,order_liters,receivable_amt,amt,sell_amt,sell_discount_amt,amt,discount_amt,pay_date,mobile_phone as customer_phone,sell_oil_price,driver_oil_price 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT order_id,dept_name as station_name,oil_name,order_no,p.oil_pirce,order_liters,receivable_amt,amt,sell_amt,sell_discount_amt,amt,discount_amt,pay_date,mobile_phone as customer_phone,sell_oil_price,driver_oil_price,driver_discount_amt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         from pay_order p 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         left join sys_dept d on d.dept_id =p.station_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         join app_user_info a on a.user_id=p.consumer_id 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -247,7 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!--查询LNG导出数据--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectLNGPayOrderExport" parameterType="PayOrder" resultMap="PayOrderResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        SELECT order_id,dept_name as station_name,oil_name,order_no,p.oil_pirce,order_liters,receivable_amt,amt,sell_amt,sell_discount_amt,amt,discount_amt,pay_date,mobile_phone,sell_oil_price,driver_oil_price 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT order_id,dept_name as station_name,oil_name,order_no,p.oil_pirce,order_liters,receivable_amt,amt,sell_amt,sell_discount_amt,amt,discount_amt,pay_date,mobile_phone,sell_oil_price,driver_oil_price,driver_discount_amt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         from pay_order p 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         left join sys_dept d on d.dept_id =p.station_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         join app_user_info a on a.user_id=p.consumer_id 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -307,7 +308,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="LNGDeptList" parameterType="PayOrder" resultMap="PayOrderResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        SELECT dept_name as station_name,order_id,order_no,oil_name,p.oil_pirce,sell_oil_price,order_liters,receivable_amt,sell_amt,pay_date, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT dept_name as station_name,order_id,order_no,oil_name,p.oil_pirce,sell_oil_price,order_liters,receivable_amt,sell_amt,pay_date,driver_discount_amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         concat(LEFT (mobile_phone, 3), '****', RIGHT (mobile_phone, 4))  mobile_phone 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         from pay_order p 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         left join sys_dept d on d.dept_id =p.station_id 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -449,8 +450,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         GROUP BY oil_name 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectOverViewData" parameterType="Long" resultMap="PayOrderResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        SELECT SUM(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt, sum(pos_amt) as pos_amt, sum(xj_amt) as xj_amt,sum(didi_app_amt) as didi_app_amt,sum(ty_app_amt) as ty_app_amt,sum(other_amt) as other_amt,sum(member_amt) as member_amt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        from pay_order 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT SUM(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt, sum(dzk_amt) as dzk_amt,sum(pos_amt) as pos_amt, sum(xj_amt) as xj_amt,sum(didi_app_amt) as didi_app_amt,sum(ty_app_amt) as ty_app_amt,sum(other_amt) as other_amt,sum(member_amt) as member_amt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          from pay_order 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="stationId != null "> and station_id = #{stationId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="status != null "> and status = #{status}</if> 
			 |