| 
														
															@@ -54,7 +54,13 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </resultMap> 
														 | 
														
														 | 
														
															     </resultMap> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <sql id="selectStationClassStructureVo"> 
														 | 
														
														 | 
														
															     <sql id="selectStationClassStructureVo"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        select id, order_no, station_id, station_name, oil_gun, oil_name, oil_pirce, oil_type, consumer_id, consumer, amt, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, print_num, class_structure_no, class_start_date, class_structure_date, class_structure_man, oils, receivable_amt, received_amt, discount_amt, 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, car_no, customer_phone, customer_grade from station_class_structure 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        select id, order_no, station_id, d.dept_name as station_name, oil_gun, oil_name, oil_pirce, oil_type, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        consumer_id, consumer, amt, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        print_num, class_structure_no, class_start_date, class_structure_date, class_structure_man, oils, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+         receivable_amt, received_amt, discount_amt, 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, car_no, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+         customer_phone, customer_grade 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          from station_class_structure s join sys_dept d on s.station_id = d.dept_id 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </sql> 
														 | 
														
														 | 
														
															     </sql> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <select id="selectStationClassStructureList" parameterType="StationClassStructure" resultMap="StationClassStructureResult"> 
														 | 
														
														 | 
														
															     <select id="selectStationClassStructureList" parameterType="StationClassStructure" resultMap="StationClassStructureResult"> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -125,8 +131,10 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         GROUP BY a.oil_name,a.station_id,a.class_start_date,a.class_structure_date,a.class_structure_man 
														 | 
														
														 | 
														
															         GROUP BY a.oil_name,a.station_id,a.class_start_date,a.class_structure_date,a.class_structure_man 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </select> 
														 | 
														
														 | 
														
															     </select> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <select id="selectStationClassStructureMax" parameterType="StationClassStructure" resultMap="StationClassStructureResult"> 
														 | 
														
														 | 
														
															     <select id="selectStationClassStructureMax" parameterType="StationClassStructure" resultMap="StationClassStructureResult"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        select id, station_id, order_no, oil_gun, oil_name, consumer_id, consumer, amt, station_name, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, oil_type, print_num, class_structure_no, class_structure_date, class_structure_man, oils 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        from station_class_structure 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        select id, station_id, order_no, oil_gun, oil_name, consumer_id, consumer, amt,d.dept_name as station_name, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, oil_type, print_num, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        class_structure_no, class_structure_date, class_structure_man, oils 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        from station_class_structure s join sys_dept d on s.station_id = d.dept_id 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         where id = ( 
														 | 
														
														 | 
														
															         where id = ( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         SELECT MAX(id) from station_class_structure 
														 | 
														
														 | 
														
															         SELECT MAX(id) from station_class_structure 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <where> 
														 | 
														
														 | 
														
															         <where> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -151,17 +159,17 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </select> 
														 | 
														
														 | 
														
															     </select> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <!--根据班次号汇总班结数据--> 
														 | 
														
														 | 
														
															     <!--根据班次号汇总班结数据--> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <select id="selectSummyClassStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult"> 
														 | 
														
														 | 
														
															     <select id="selectSummyClassStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        select  class_structure_no,class_start_date,class_structure_date,station_id,station_name,count(order_no) as num, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        select  class_structure_no,class_start_date,class_structure_date,station_id,d.dept_name as station_name,count(order_no) as num, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         sum(order_liters) as order_liters,sum(receivable_amt) as receivable_amt,sum(amt) as amt,class_structure_man, 
														 | 
														
														 | 
														
															         sum(order_liters) as order_liters,sum(receivable_amt) as receivable_amt,sum(amt) as amt,class_structure_man, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         sum(print_num) as print_num,sum(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt, 
														 | 
														
														 | 
														
															         sum(print_num) as print_num,sum(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         sum(dzk_amt) as dzk_amt,sum(discount_amt) as discount_amt,SUM(pos_amt) as pos_amt,sum(xj_amt) as xj_amt 
														 | 
														
														 | 
														
															         sum(dzk_amt) as dzk_amt,sum(discount_amt) as discount_amt,SUM(pos_amt) as pos_amt,sum(xj_amt) as xj_amt 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        from station_class_structure 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        from station_class_structure s join sys_dept d on s.station_id = d.dept_id 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <where> 
														 | 
														
														 | 
														
															         <where> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if> 
														 | 
														
														 | 
														
															             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if> 
														 | 
														
														 | 
														
															             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if> 
														 | 
														
														 | 
														
															             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         </where> 
														 | 
														
														 | 
														
															         </where> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        GROUP BY class_structure_no,class_start_date,station_id,station_name,class_structure_date,class_structure_man 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        GROUP BY class_structure_no,class_start_date,station_id,d.dept_name,class_structure_date,class_structure_man 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </select> 
														 | 
														
														 | 
														
															     </select> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <!--按员工/支付方式汇总数据--> 
														 | 
														
														 | 
														
															     <!--按员工/支付方式汇总数据--> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <!--    SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt--> 
														 | 
														
														 | 
														
															     <!--    SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt--> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -273,7 +281,6 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <where> 
														 | 
														
														 | 
														
															         <where> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if> 
														 | 
														
														 | 
														
															             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="stationId != null "> and station_id = #{stationId}</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="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if> 
														 | 
														
														 | 
														
															             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if> 
														 | 
														
														 | 
														
															             <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if> 
														 | 
														
														 | 
														
															             <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -320,7 +327,6 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <trim prefix="(" suffix=")" suffixOverrides=","> 
														 | 
														
														 | 
														
															         <trim prefix="(" suffix=")" suffixOverrides=","> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="orderNo != null">order_no,</if> 
														 | 
														
														 | 
														
															             <if test="orderNo != null">order_no,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="stationId != null">station_id,</if> 
														 | 
														
														 | 
														
															             <if test="stationId != null">station_id,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            <if test="stationName != null">station_name,</if> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilGun != null">oil_gun,</if> 
														 | 
														
														 | 
														
															             <if test="oilGun != null">oil_gun,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilName != null">oil_name,</if> 
														 | 
														
														 | 
														
															             <if test="oilName != null">oil_name,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilPirce != null">oil_pirce,</if> 
														 | 
														
														 | 
														
															             <if test="oilPirce != null">oil_pirce,</if> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -363,7 +369,6 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <trim prefix="values (" suffix=")" suffixOverrides=","> 
														 | 
														
														 | 
														
															         <trim prefix="values (" suffix=")" suffixOverrides=","> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="orderNo != null">#{orderNo},</if> 
														 | 
														
														 | 
														
															             <if test="orderNo != null">#{orderNo},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="stationId != null">#{stationId},</if> 
														 | 
														
														 | 
														
															             <if test="stationId != null">#{stationId},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            <if test="stationName != null">#{stationName},</if> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilGun != null">#{oilGun},</if> 
														 | 
														
														 | 
														
															             <if test="oilGun != null">#{oilGun},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilName != null">#{oilName},</if> 
														 | 
														
														 | 
														
															             <if test="oilName != null">#{oilName},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilPirce != null">#{oilPirce},</if> 
														 | 
														
														 | 
														
															             <if test="oilPirce != null">#{oilPirce},</if> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -410,7 +415,6 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <trim prefix="SET" suffixOverrides=","> 
														 | 
														
														 | 
														
															         <trim prefix="SET" suffixOverrides=","> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="orderNo != null">order_no = #{orderNo},</if> 
														 | 
														
														 | 
														
															             <if test="orderNo != null">order_no = #{orderNo},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="stationId != null">station_id = #{stationId},</if> 
														 | 
														
														 | 
														
															             <if test="stationId != null">station_id = #{stationId},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            <if test="stationName != null">station_name = #{stationName},</if> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilGun != null">oil_gun = #{oilGun},</if> 
														 | 
														
														 | 
														
															             <if test="oilGun != null">oil_gun = #{oilGun},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilName != null">oil_name = #{oilName},</if> 
														 | 
														
														 | 
														
															             <if test="oilName != null">oil_name = #{oilName},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="oilPirce != null">oil_pirce = #{oilPirce},</if> 
														 | 
														
														 | 
														
															             <if test="oilPirce != null">oil_pirce = #{oilPirce},</if> 
														 |