and ${criterion.condition} and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{listItem} and ${criterion.condition} and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{listItem} T1.order_id, T1.order_no, T1.oil_gun, T1.oil_name, T1.oil_pirce, T1.consumer_id, T1.consumer, T1.amt, T1.station_id, CASE T1.status WHEN "1" THEN "已支付" ELSE "未支付" END AS status, T1.order_liters, T1.pay_type, T1.pay_way, T1.pay_date, T1.oil_personnel, T1.created_date, T1.order_type, T1.station_name, T1.receivable_amt, T1.received_amt, T1.discount_amt, T1.discount_coupon_amt, T1.discount_coupon, T1.wx_amt, T1.zfb_amt, T1.pos_amt, T1.xj_amt, T1.didi_app_amt, T1.ty_app_amt, T1.other_amt, T1.dzk_amt, T1.score, T1.member_no, T1.member_amt, T1.print_count, T1.car_no, T1.customer_phone, T1.customer_grade, T1.oil_type, T2.dict_label AS payTypeName order_id, order_no, oil_gun, oil_name, oil_pirce, consumer_id, consumer, amt, station_id, status, order_liters, pay_type, pay_way, pay_date, oil_personnel, created_date, order_type, station_name, 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, print_count, car_no, customer_phone, customer_grade, oil_type SELECT T1.dict_label AS oilName, COUNT(T2.order_no) AS orderSum, SUM(IFNULL(T2.order_liters,0)) AS orderLitersSum, SUM(IFNULL(T2.receivable_amt,0)) AS receivableAmtSum, SUM(IFNULL(T2.discount_amt,0)) AS discountAmtSum, SUM(IFNULL(T2.amt,0)) AS amtSum FROM sys_dict_data AS T1 LEFT JOIN pay_order AS T2 ON T1.dict_label = T2.oil_name AND T2.station_id= #{stationId} AND T2.status= #{status} AND T2.pay_date >= #{beginTime} AND T2.pay_date < #{endTime} WHERE T1.dict_type ="oil_name" GROUP BY T1.dict_label ORDER BY amtSum DESC SELECT T1.dict_label AS payType, COUNT(T2.order_no) AS orderSum, SUM(IFNULL(T2.order_liters,0)) AS orderLitersSum, SUM(IFNULL(T2.receivable_amt,0)) AS receivableAmtSum, SUM(IFNULL(T2.discount_amt,0)) AS discountAmtSum, SUM(IFNULL(T2.amt,0)) AS amtSum FROM sys_dict_data AS T1 LEFT JOIN pay_order AS T2 ON T1.dict_value = T2.pay_type AND T2.station_id= #{stationId} AND T2.status= #{status} AND T2.pay_date >= #{beginTime} AND T2.pay_date < #{endTime} WHERE T1.dict_type ="pay_type" GROUP BY T1.dict_label ORDER BY amtSum DESC SELECT COUNT(T2.order_no) AS orderSum, SUM(IFNULL(T2.order_liters,0)) AS orderLitersSum, SUM(IFNULL(T2.receivable_amt,0)) AS receivableAmtSum, SUM(IFNULL(T2.discount_amt,0)) AS discountAmtSum, SUM(IFNULL(T2.amt,0)) AS amtSum, SUM(IFNULL(T2.received_amt,0)) AS receivedAmtSum, SUM(IFNULL(T2.print_count,0)) AS printCountSum FROM pay_order AS T2 T2.station_id= #{stationId} AND T2.status= #{status} AND T2.pay_date >= #{beginTime} AND T2.pay_date < #{endTime} delete from pay_order where order_id = #{orderId,jdbcType=INTEGER} delete from pay_order INSERT into pay_order (order_id, order_no, oil_gun, oil_name, oil_pirce, consumer_id, consumer, amt, station_id, status, order_liters, pay_type, pay_way, pay_date, oil_personnel, created_date, order_type, station_name, 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, print_count, car_no, customer_phone, customer_grade, oil_type) VALUES ( #{orderId,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{oilGun,jdbcType=VARCHAR}, #{oilName,jdbcType=VARCHAR}, #{oilPirce,jdbcType=DOUBLE}, #{consumerId,jdbcType=INTEGER}, #{consumer,jdbcType=VARCHAR}, #{amt,jdbcType=DOUBLE}, #{stationId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, #{orderLiters,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR}, #{payWay,jdbcType=VARCHAR}, #{payDate,jdbcType=TIMESTAMP}, #{oilPersonnel,jdbcType=VARCHAR}, #{createdDate,jdbcType=TIMESTAMP}, #{orderType,jdbcType=CHAR}, #{stationName,jdbcType=VARCHAR}, #{receivableAmt,jdbcType=DOUBLE}, #{receivedAmt,jdbcType=DOUBLE},#{discountAmt,jdbcType=DOUBLE}, #{discountCouponAmt,jdbcType=DOUBLE}, #{discountCoupon,jdbcType=INTEGER}, #{wxAmt,jdbcType=DOUBLE}, #{zfbAmt,jdbcType=DOUBLE},#{posAmt,jdbcType=DOUBLE}, #{xjAmt,jdbcType=DOUBLE}, #{didiAppAmt,jdbcType=DOUBLE}, #{tyAppAmt,jdbcType=DOUBLE}, #{otherAmt,jdbcType=DOUBLE}, #{dzkAmt,jdbcType=DOUBLE}, #{score,jdbcType=INTEGER}, #{memberNo,jdbcType=VARCHAR}, #{memberAmt,jdbcType=DOUBLE}, #{printCount,jdbcType=INTEGER}, #{carNo,jdbcType=VARCHAR}, #{customerPhone,jdbcType=VARCHAR}, #{customerGrade,jdbcType=VARCHAR}, #{oilType,jdbcType=VARCHAR} ) insert into pay_order order_id, order_no, oil_gun, oil_name, oil_pirce, consumer_id, consumer, amt, station_id, status, order_liters, pay_type, pay_way, pay_date, oil_personnel, created_date, order_type, station_name, receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score, member_no, member_amt, print_count, car_no, customer_phone, customer_grade, oil_type #{orderId,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{oilGun,jdbcType=VARCHAR}, #{oilName,jdbcType=VARCHAR}, #{oilPirce,jdbcType=DOUBLE}, #{consumerId,jdbcType=INTEGER}, #{consumer,jdbcType=VARCHAR}, #{amt,jdbcType=DOUBLE}, #{stationId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, #{orderLiters,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR}, #{payWay,jdbcType=VARCHAR}, #{payDate,jdbcType=TIMESTAMP}, #{oilPersonnel,jdbcType=VARCHAR}, #{createdDate,jdbcType=TIMESTAMP}, #{orderType,jdbcType=CHAR}, #{stationName,jdbcType=VARCHAR}, #{receivableAmt,jdbcType=DOUBLE}, #{receivedAmt,jdbcType=DOUBLE}, #{discountAmt,jdbcType=DOUBLE}, #{discountCouponAmt,jdbcType=DOUBLE}, #{discountCoupon,jdbcType=VARCHAR}, #{wxAmt,jdbcType=DOUBLE}, #{zfbAmt,jdbcType=DOUBLE}, #{posAmt,jdbcType=DOUBLE}, #{xjAmt,jdbcType=DOUBLE}, #{didiAppAmt,jdbcType=DOUBLE}, #{tyAppAmt,jdbcType=DOUBLE}, #{otherAmt,jdbcType=DOUBLE}, #{dzkAmt,jdbcType=DOUBLE}, #{score,jdbcType=INTEGER}, #{memberNo,jdbcType=VARCHAR}, #{memberAmt,jdbcType=DOUBLE}, #{printCount,jdbcType=INTEGER}, #{carNo,jdbcType=VARCHAR}, #{customerPhone,jdbcType=VARCHAR}, #{customerGrade,jdbcType=VARCHAR}, #{oilType,jdbcType=VARCHAR} update pay_order order_id = #{record.orderId,jdbcType=INTEGER}, order_no = #{record.orderNo,jdbcType=VARCHAR}, oil_gun = #{record.oilGun,jdbcType=VARCHAR}, oil_name = #{record.oilName,jdbcType=VARCHAR}, oil_pirce = #{record.oilPirce,jdbcType=VARCHAR}, consumer_id = #{record.consumerId,jdbcType=INTEGER}, consumer = #{record.consumer,jdbcType=VARCHAR}, amt = #{record.amt,jdbcType=DOUBLE}, station_id = #{record.stationId,jdbcType=INTEGER}, status = #{record.status,jdbcType=VARCHAR}, order_liters = #{record.orderLiters,jdbcType=VARCHAR}, pay_type = #{record.payType,jdbcType=VARCHAR}, pay_way = #{record.payWay,jdbcType=VARCHAR}, pay_date = #{record.payDate,jdbcType=TIMESTAMP}, oil_personnel = #{record.oilPersonnel,jdbcType=VARCHAR}, created_date = #{record.createdDate,jdbcType=TIMESTAMP}, order_type = #{record.orderType,jdbcType=CHAR}, station_name = #{record.stationName,jdbcType=VARCHAR}, receivable_amt = #{record.receivableAmt,jdbcType=DOUBLE}, received_amt = #{record.receivedAmt,jdbcType=DOUBLE}, discount_amt = #{record.discountAmt,jdbcType=DOUBLE}, discount_coupon_amt = #{record.discountCouponAmt,jdbcType=DOUBLE}, discount_coupon = #{record.discountCoupon,jdbcType=VARCHAR}, wx_amt = #{record.wxAmt,jdbcType=DOUBLE}, zfb_amt = #{record.zfbAmt,jdbcType=DOUBLE}, pos_amt = #{record.posAmt,jdbcType=DOUBLE}, xj_amt = #{record.xjAmt,jdbcType=DOUBLE}, didi_app_amt = #{record.didiAppAmt,jdbcType=DOUBLE}, ty_app_amt = #{record.tyAppAmt,jdbcType=DOUBLE}, other_amt = #{record.otherAmt,jdbcType=DOUBLE}, dzk_amt = #{record.dzkAmt,jdbcType=DOUBLE}, score = #{record.score,jdbcType=INTEGER}, member_no = #{record.memberNo,jdbcType=VARCHAR}, member_amt = #{record.memberAmt,jdbcType=DOUBLE}, print_count = #{record.printCount,jdbcType=INTEGER}, car_no = #{record.carNo,jdbcType=VARCHAR}, customer_phone = #{record.customerPhone,jdbcType=VARCHAR}, customer_grade = #{record.customerGrade,jdbcType=VARCHAR}, oil_type = #{record.oilType,jdbcType=VARCHAR}, UPDATE pay_order status = #{status,jdbcType=VARCHAR}, received_amt = #{receivedAmt,jdbcType=DOUBLE}, pay_type = #{payType,jdbcType=VARCHAR}, wx_amt = #{wxAmt,jdbcType=DOUBLE}, dzk_amt = #{dzkAmt,jdbcType=DOUBLE}, pay_date = #{payDate,jdbcType=TIMESTAMP}, print_count = #{printCount,jdbcType=INTEGER}, order_no = #{orderNo,jdbcType=VARCHAR} UPDATE customer_manage customer_name = #{customerName}, phone_number = #{phoneNumber}, regtime = #{regtime}, station_name = #{stationName}, station_id = #{stationId}, blog_user_id = #{blogUserId}, mina_user_id = #{minaUserId}, oil_name = #{oilName}, liters = #{liters}, amt = #{amt}, union_id = #{unionId}, phone_number = #{phoneNumber} UPDATE customer_manage member_grade = #{memberGrade}, customer_name = #{customerName}, phone_number = #{phoneNumber}, regtime = #{regtime}, station_name = #{stationName}, oil_name = #{oilName}, liters = #{liters}, amt = #{amt}, grade = #{grade}, union_id = #{unionId}, station_id = #{stationId} AND phone_number = #{phoneNumber} AND oil_name = #{oilName} INSERT INTO customer_manage member_id, customer_name, commend_man, member_grade, phone_number, car_number, balance, integral, specialCarType, regtime, station_id, station_name, oil_name, liters, amt, cy_grade, qy_grade, blog_openid, mina_openid, blog_user_id, mina_user_id, grade, union_id #{memberId}, #{customerName}, #{commendMan}, #{memberGrade}, #{phoneNumber}, #{carNumber}, #{balance}, #{integral}, #{specialCarType}, #{regtime}, #{stationId, jdbcType=INTEGER}, #{stationName, jdbcType=VARCHAR}, #{oilName}, #{liters}, #{amt}, #{cyGrade}, #{qyGrade}, #{blogOpenid}, #{minaOpenid, jdbcType=VARCHAR}, #{blogUserId, jdbcType=INTEGER}, #{minaUserId, jdbcType=INTEGER}, #{grade, jdbcType=VARCHAR}, #{unionId, jdbcType=VARCHAR} update pay_order set order_id = #{record.orderId,jdbcType=INTEGER}, order_no = #{record.orderNo,jdbcType=VARCHAR}, oil_gun = #{record.oilGun,jdbcType=VARCHAR}, oil_name = #{record.oilName,jdbcType=VARCHAR}, oil_pirce = #{record.oilPirce,jdbcType=VARCHAR}, consumer_id = #{record.consumerId,jdbcType=INTEGER}, consumer = #{record.consumer,jdbcType=VARCHAR}, amt = #{record.amt,jdbcType=DOUBLE}, station_id = #{record.stationId,jdbcType=INTEGER}, status = #{record.status,jdbcType=VARCHAR}, order_liters = #{record.orderLiters,jdbcType=VARCHAR}, pay_type = #{record.payType,jdbcType=VARCHAR}, pay_way = #{record.payWay,jdbcType=VARCHAR}, pay_date = #{record.payDate,jdbcType=TIMESTAMP}, oil_personnel = #{record.oilPersonnel,jdbcType=VARCHAR}, created_date = #{record.createdDate,jdbcType=TIMESTAMP}, order_type = #{record.orderType,jdbcType=CHAR}, station_name = #{record.stationName,jdbcType=VARCHAR}, receivable_amt = #{record.receivableAmt,jdbcType=DOUBLE}, received_amt = #{record.receivedAmt,jdbcType=DOUBLE}, discount_amt = #{record.discountAmt,jdbcType=DOUBLE}, discount_coupon_amt = #{record.discountCouponAmt,jdbcType=DOUBLE}, discount_coupon = #{record.discountCoupon,jdbcType=DOUBLE}, wx_amt = #{record.wxAmt,jdbcType=DOUBLE}, zfb_amt = #{record.zfbAmt,jdbcType=DOUBLE}, pos_amt = #{record.posAmt,jdbcType=DOUBLE}, xj_amt = #{record.xjAmt,jdbcType=DOUBLE}, didi_app_amt = #{record.didiAppAmt,jdbcType=DOUBLE}, ty_app_amt = #{record.tyAppAmt,jdbcType=DOUBLE}, other_amt = #{record.otherAmt,jdbcType=DOUBLE}, dzk_amt = #{record.dzkAmt,jdbcType=DOUBLE}, score = #{record.score,jdbcType=INTEGER}, member_no = #{record.memberNo,jdbcType=VARCHAR}, member_amt = #{record.memberAmt,jdbcType=DOUBLE}, print_count = #{record.printCount,jdbcType=INTEGER}, car_no = #{record.carNo,jdbcType=VARCHAR}, customer_phone = #{record.customerPhone,jdbcType=VARCHAR}, customer_grade = #{record.customerGrade,jdbcType=VARCHAR}, oil_type = #{record.oilType,jdbcType=VARCHAR} update pay_order order_no = #{orderNo,jdbcType=VARCHAR}, oil_gun = #{oilGun,jdbcType=VARCHAR}, oil_name = #{oilName,jdbcType=VARCHAR}, oil_pirce = #{oilPirce,jdbcType=DOUBLE}, consumer_id = #{consumerId,jdbcType=INTEGER}, consumer = #{consumer,jdbcType=VARCHAR}, amt = #{amt,jdbcType=DOUBLE}, station_id = #{stationId,jdbcType=INTEGER}, status = #{status,jdbcType=VARCHAR}, order_liters = #{orderLiters,jdbcType=VARCHAR}, pay_type = #{payType,jdbcType=VARCHAR}, pay_way = #{payWay,jdbcType=VARCHAR}, pay_date = #{payDate,jdbcType=TIMESTAMP}, oil_personnel = #{oilPersonnel,jdbcType=VARCHAR}, created_date = #{createdDate,jdbcType=TIMESTAMP}, order_type = #{orderType,jdbcType=CHAR}, station_name = #{stationName,jdbcType=CHAR}, receivable_amt = #{receivableAmt,jdbcType=DOUBLE}, received_amt = #{receivedAmt,jdbcType=DOUBLE}, discount_amt = #{discountAmt,jdbcType=DOUBLE}, discount_coupon_amt = #{discountCouponAmt,jdbcType=DOUBLE}, discount_coupon = #{discountCoupon,jdbcType=VARCHAR}, wx_amt = #{wxAmt,jdbcType=DOUBLE}, zfb_amt = #{zfbAmt,jdbcType=DOUBLE}, pos_amt = #{posAmt,jdbcType=DOUBLE}, xj_amt = #{xjAmt,jdbcType=DOUBLE}, didi_app_amt = #{didiAppAmt,jdbcType=DOUBLE}, ty_app_amt = #{tyAppAmt,jdbcType=DOUBLE}, other_amt = #{otherAmt,jdbcType=DOUBLE}, dzk_amt = #{dzkAmt,jdbcType=DOUBLE}, score = #{score,jdbcType=INTEGER}, member_no = #{memberNo,jdbcType=VARCHAR}, member_amt = #{memberAmt,jdbcType=DOUBLE}, print_count = #{printCount,jdbcType=INTEGER}, car_no = #{carNo,jdbcType=VARCHAR}, customer_phone = #{customerPhone,jdbcType=VARCHAR}, oil_type = #{oilType,jdbcType=VARCHAR} where order_id = #{orderId,jdbcType=INTEGER} update pay_order set order_no = #{orderNo,jdbcType=VARCHAR}, oil_gun = #{oilGun,jdbcType=VARCHAR}, oil_name = #{oilName,jdbcType=VARCHAR}, oil_pirce = #{oilPirce,jdbcType=DOUBLE}, consumer_id = #{consumerId,jdbcType=INTEGER}, consumer = #{consumer,jdbcType=VARCHAR}, amt = #{amt,jdbcType=VARCHAR}, station_id = #{stationId,jdbcType=INTEGER}, status = #{status,jdbcType=VARCHAR}, order_liters = #{orderLiters,jdbcType=VARCHAR}, pay_type = #{payType,jdbcType=VARCHAR}, pay_way = #{payWay,jdbcType=VARCHAR}, pay_date = #{payDate,jdbcType=TIMESTAMP}, oil_personnel = #{oilPersonnel,jdbcType=VARCHAR}, created_date = #{createdDate,jdbcType=TIMESTAMP}, order_type = #{orderType,jdbcType=CHAR} station_name = #{stationName,jdbcType=VARCHAR}, receivable_amt = #{receivableAmt,jdbcType=DOUBLE}, received_amt = #{receivedAmt,jdbcType=DOUBLE}, discount_amt = #{discountAmt,jdbcType=DOUBLE}, discount_coupon_amt = #{discountCouponAmt,jdbcType=DOUBLE}, discount_coupon = #{discountCoupon,jdbcType=DOUBLE}, wx_amt = #{wxAmt,jdbcType=DOUBLE}, zfb_amt = #{zfbAmt,jdbcType=DOUBLE}, pos_amt = #{posAmt,jdbcType=DOUBLE}, xj_amt = #{xjAmt,jdbcType=DOUBLE}, didi_app_amt = #{didiAppAmt,jdbcType=DOUBLE}, ty_app_amt = #{tyAppAmt,jdbcType=DOUBLE}, other_amt = #{otherAmt,jdbcType=DOUBLE}, dzk_amt = #{dzkAmt,jdbcType=DOUBLE}, score = #{score,jdbcType=INTEGER}, member_no = #{memberNo,jdbcType=VARCHAR}, member_amt = #{memberAmt,jdbcType=DOUBLE}, print_count = #{printCount,jdbcType=INTEGER}, car_no = #{carNo,jdbcType=VARCHAR}, customer_phone = #{customerPhone,jdbcType=VARCHAR}, customer_grade = #{customerGrade,jdbcType=VARCHAR}, oil_type = #{oilType,jdbcType=VARCHAR} where order_id = #{orderId,jdbcType=INTEGER}