| 
					
				 | 
			
			
				@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="cardOilsType"    column="card_oils_type"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="amt"    column="amt"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="createTime"    column="create_time"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="payDate"    column="pay_date"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="balance"    column="balance"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="stationId"    column="station_id"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="stationName"    column="station_name"    /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -22,38 +23,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <sql id="selectCustomerCardRecordConsumptionVo"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        select id, order_no, union_id, customer_no, customer_name, usage_type, pay_type, card_oils_type, amt, create_time, balance,station_id, station_name, status from customer_card_record_consumption 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select id, order_no, union_id, customer_no, customer_name, usage_type, pay_type, card_oils_type, amt, create_time, balance,station_id, station_name, status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        from customer_card_record_consumption a 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectCustomerCardRecordConsumptionList" parameterType="CustomerCardRecordConsumption" resultMap="CustomerCardRecordConsumptionResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <include refid="selectCustomerCardRecordConsumptionVo"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<!--       <include refid="selectCustomerCardRecordConsumptionVo"/>--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select a.id, a.order_no, a.union_id, a.customer_no, a.customer_name, a.usage_type, a.pay_type, a.card_oils_type, a.amt, a.create_time, a.balance,a.station_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         a.station_name, a.status,b.pay_date 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        from customer_card_record_consumption a join pay_order b on a.order_no=b.order_no 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where>   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="customerNo != null  and customerNo != ''"> and customer_no = #{customerNo}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="usageType != null  and usageType != ''"> and usage_type = #{usageType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="amt != null "> and amt = #{amt}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="balance != null "> and balance = #{balance}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stationId != null "> and station_id = #{stationId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="status != null  and status != ''"> and status = #{status}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="orderNo != null  and orderNo != ''"> and a.order_no = #{orderNo}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId != null  and unionId != ''"> and a.union_id = #{unionId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerNo != null  and customerNo != ''"> and a.customer_no = #{customerNo}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerName != null  and customerName != ''"> and a.customer_name like concat('%', #{customerName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="usageType != null  and usageType != ''"> and a.usage_type = #{usageType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="payType != null  and payType != ''"> and a.pay_type = #{payType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="cardOilsType != null  and cardOilsType != ''"> and a.card_oils_type = #{cardOilsType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="amt != null "> and a.amt = #{amt}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="balance != null "> and a.balance = #{balance}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationId != null "> and a.station_id = #{stationId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationName != null  and stationName != ''"> and a.station_name like concat('%', #{stationName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="status != null  and status != ''"> and a.status = #{status}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="stationIdList != null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                and station_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and a.station_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <foreach item="item" index="index" collection="stationIdList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                          open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     #{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND date_format(a.create_time,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND date_format(a.create_time,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        order by id desc 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectCustomerCardRecordConsumptionById" parameterType="Long" resultMap="CustomerCardRecordConsumptionResult"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -247,4 +253,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         GROUP BY  date_format(create_time,'%Y-%m-%d') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="listXFData" parameterType="CustomerCardRecordConsumption" resultMap="CustomerCardRecordConsumptionResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT sum(amt) as amt from customer_card_record_consumption 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerNo != null  and customerNo != ''"> and customer_no = #{customerNo}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="usageType != null  and usageType != ''"> and usage_type = #{usageType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="amt != null "> and amt = #{amt}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="balance != null "> and balance = #{balance}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationId != null "> and station_id = #{stationId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="status != null  and status != ''"> and status = #{status}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationIdList != null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and station_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <foreach item="item" index="index" collection="stationIdList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                         open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    #{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </mapper> 
			 |