<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ssm.manage.mapper.CashListMapper">
  <resultMap id="BaseResultMap" type="com.ssm.manage.entity.CashList">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="cash_num" jdbcType="VARCHAR" property="cashNum" />
    <result column="cash_date" jdbcType="TIMESTAMP" property="cashDate" />
    <result column="cash_number" jdbcType="INTEGER" property="cashNumber" />
    <result column="member_id" jdbcType="BIGINT" property="memberId" />
    <result column="member_name" jdbcType="VARCHAR" property="memberName" />
    <result column="mobile_phone" jdbcType="VARCHAR" property="mobilePhone" />
    <result column="member_identity_card" jdbcType="VARCHAR" property="memberIdentityCard" />
    <result column="card" jdbcType="VARCHAR" property="card" />
    <result column="project_id" jdbcType="BIGINT" property="projectId" />
    <result column="project_name" jdbcType="VARCHAR" property="projectName" />
    <result column="store_id" jdbcType="BIGINT" property="storeId" />
    <result column="store_name" jdbcType="VARCHAR" property="storeName" />
    <result column="minumum_times" jdbcType="INTEGER" property="minumumTimes" />
    <result column="price" jdbcType="DECIMAL" property="price" />
    <result column="minumum_price" jdbcType="DECIMAL" property="minumumPrice" />
    <result column="price_member" jdbcType="DECIMAL" property="priceMember" />
    <result column="minumum_price_member" jdbcType="DECIMAL" property="minumumPriceMember" />
    <result column="transaction_price" jdbcType="DECIMAL" property="transactionPrice" />
    <result column="number_times" jdbcType="INTEGER" property="numberTimes" />
    <result column="amount" jdbcType="DECIMAL" property="amount" />
    <result column="collection_cash_amount" jdbcType="DECIMAL" property="collectionCashAmount" />
    <result column="collection_integral_amount" jdbcType="DECIMAL" property="collectionIntegralAmount" />
    <result column="integral" jdbcType="INTEGER" property="integral" />
    <result column="give_integral" jdbcType="INTEGER" property="giveIntegral" />
    <result column="collection_recharge_amount" jdbcType="DECIMAL" property="collectionRechargeAmount" />
    <result column="collection_gift_amount" jdbcType="DECIMAL" property="collectionGiftAmount" />
    <result column="cash_amount" jdbcType="DECIMAL" property="cashAmount" />
    <result column="achievement_large" jdbcType="DECIMAL" property="achievementLarge" />
    <result column="achievement_zhonggong" jdbcType="DECIMAL" property="achievementZhonggong" />
    <result column="achievement_technician" jdbcType="DECIMAL" property="achievementTechnician" />
    <result column="achievement_small" jdbcType="DECIMAL" property="achievementSmall" />
    <result column="commission_large" jdbcType="DECIMAL" property="commissionLarge" />
    <result column="commission_zhonggong" jdbcType="DECIMAL" property="commissionZhonggong" />
    <result column="commission_technician" jdbcType="DECIMAL" property="commissionTechnician" />
    <result column="commission_small" jdbcType="DECIMAL" property="commissionSmall" />
    <result column="card_achievement_large" jdbcType="DECIMAL" property="cardAchievementLarge" />
    <result column="card_achievement_zhonggong" jdbcType="DECIMAL" property="cardAchievementZhonggong" />
    <result column="card_achievement_technician" jdbcType="DECIMAL" property="cardAchievementTechnician" />
    <result column="card_achievement_small" jdbcType="DECIMAL" property="cardAchievementSmall" />
    <result column="card_commission_large" jdbcType="DECIMAL" property="cardCommissionLarge" />
    <result column="card_commission_zhonggong" jdbcType="DECIMAL" property="cardCommissionZhonggong" />
    <result column="card_commission_technician" jdbcType="DECIMAL" property="cardCommissionTechnician" />
    <result column="card_commission_small" jdbcType="DECIMAL" property="cardCommissionSmall" />
    <result column="large_one_number" jdbcType="VARCHAR" property="largeOneNumber" />
    <result column="service_large_one_staff_id" jdbcType="BIGINT" property="serviceLargeOneStaffId" />
    <result column="service_large_one_staff_name" jdbcType="VARCHAR" property="serviceLargeOneStaffName" />
    <result column="service_large_one_identity_card" jdbcType="VARCHAR" property="serviceLargeOneIdentityCard" />
    <result column="service_large_one_achievement_amount" jdbcType="DECIMAL" property="serviceLargeOneAchievementAmount" />
    <result column="service_large_one_commission_amount" jdbcType="DECIMAL" property="serviceLargeOneCommissionAmount" />
    <result column="service_large_one_ratio" jdbcType="DECIMAL" property="serviceLargeOneRatio" />
    <result column="large_two_number" jdbcType="VARCHAR" property="largeTwoNumber" />
    <result column="service_large_two_staff_id" jdbcType="BIGINT" property="serviceLargeTwoStaffId" />
    <result column="service_large_two_staff_name" jdbcType="VARCHAR" property="serviceLargeTwoStaffName" />
    <result column="service_large_two_identity_card" jdbcType="VARCHAR" property="serviceLargeTwoIdentityCard" />
    <result column="service_large_two_achievement_amount" jdbcType="DECIMAL" property="serviceLargeTwoAchievementAmount" />
    <result column="service_large_two_commission_amount" jdbcType="DECIMAL" property="serviceLargeTwoCommissionAmount" />
    <result column="service_large_two_ratio" jdbcType="DECIMAL" property="serviceLargeTwoRatio" />
    <result column="large_three_number" jdbcType="VARCHAR" property="largeThreeNumber" />
    <result column="service_large_three_staff_id" jdbcType="BIGINT" property="serviceLargeThreeStaffId" />
    <result column="service_large_three_staff_name" jdbcType="VARCHAR" property="serviceLargeThreeStaffName" />
    <result column="service_large_three_identity_card" jdbcType="VARCHAR" property="serviceLargeThreeIdentityCard" />
    <result column="service_large_three_achievement_amount" jdbcType="DECIMAL" property="serviceLargeThreeAchievementAmount" />
    <result column="service_large_three_commission_amount" jdbcType="DECIMAL" property="serviceLargeThreeCommissionAmount" />
    <result column="service_large_three_ratio" jdbcType="DECIMAL" property="serviceLargeThreeRatio" />
    <result column="large_four_number" jdbcType="VARCHAR" property="largeFourNumber" />
    <result column="service_large_four_staff_id" jdbcType="BIGINT" property="serviceLargeFourStaffId" />
    <result column="service_large_four_staff_name" jdbcType="VARCHAR" property="serviceLargeFourStaffName" />
    <result column="service_large_four_identity_card" jdbcType="VARCHAR" property="serviceLargeFourIdentityCard" />
    <result column="service_large_four_achievement_amount" jdbcType="DECIMAL" property="serviceLargeFourAchievementAmount" />
    <result column="service_large_four_commission_amount" jdbcType="DECIMAL" property="serviceLargeFourCommissionAmount" />
    <result column="service_large_four_ratio" jdbcType="DECIMAL" property="serviceLargeFourRatio" />
    <result column="large_five_number" jdbcType="VARCHAR" property="largeFiveNumber" />
    <result column="service_large_five_staff_id" jdbcType="BIGINT" property="serviceLargeFiveStaffId" />
    <result column="service_large_five_staff_name" jdbcType="VARCHAR" property="serviceLargeFiveStaffName" />
    <result column="service_large_five_identity_card" jdbcType="VARCHAR" property="serviceLargeFiveIdentityCard" />
    <result column="service_large_five_achievement_amount" jdbcType="DECIMAL" property="serviceLargeFiveAchievementAmount" />
    <result column="service_large_five_commission_amount" jdbcType="DECIMAL" property="serviceLargeFiveCommissionAmount" />
    <result column="service_large_five_ratio" jdbcType="DECIMAL" property="serviceLargeFiveRatio" />
    <result column="zhonggong_one_number" jdbcType="VARCHAR" property="zhonggongOneNumber" />
    <result column="service_zhonggong_one_staff_id" jdbcType="BIGINT" property="serviceZhonggongOneStaffId" />
    <result column="service_zhonggong_one_staff_name" jdbcType="VARCHAR" property="serviceZhonggongOneStaffName" />
    <result column="service_zhonggong_one_identity_card" jdbcType="VARCHAR" property="serviceZhonggongOneIdentityCard" />
    <result column="service_zhonggong_one_achievement_amount" jdbcType="DECIMAL" property="serviceZhonggongOneAchievementAmount" />
    <result column="service_zhonggong_one_commission_amount" jdbcType="DECIMAL" property="serviceZhonggongOneCommissionAmount" />
    <result column="service_zhonggong_one_ratio" jdbcType="DECIMAL" property="serviceZhonggongOneRatio" />
    <result column="zhonggong_two_number" jdbcType="VARCHAR" property="zhonggongTwoNumber" />
    <result column="service_zhonggong_two_staff_id" jdbcType="BIGINT" property="serviceZhonggongTwoStaffId" />
    <result column="service_zhonggong_two_staff_name" jdbcType="VARCHAR" property="serviceZhonggongTwoStaffName" />
    <result column="service_zhonggong_two_identity_card" jdbcType="VARCHAR" property="serviceZhonggongTwoIdentityCard" />
    <result column="service_zhonggong_two_achievement_amount" jdbcType="DECIMAL" property="serviceZhonggongTwoAchievementAmount" />
    <result column="service_zhonggong_two_commission_amount" jdbcType="DECIMAL" property="serviceZhonggongTwoCommissionAmount" />
    <result column="service_zhonggong_two_ratio" jdbcType="DECIMAL" property="serviceZhonggongTwoRatio" />
    <result column="zhonggong_three_number" jdbcType="VARCHAR" property="zhonggongThreeNumber" />
    <result column="service_zhonggong_three_staff_id" jdbcType="BIGINT" property="serviceZhonggongThreeStaffId" />
    <result column="service_zhonggong_three_staff_name" jdbcType="VARCHAR" property="serviceZhonggongThreeStaffName" />
    <result column="service_zhonggong_three_identity_card" jdbcType="VARCHAR" property="serviceZhonggongThreeIdentityCard" />
    <result column="service_zhonggong_three_achievement_amount" jdbcType="DECIMAL" property="serviceZhonggongThreeAchievementAmount" />
    <result column="service_zhonggong_three_commission_amount" jdbcType="DECIMAL" property="serviceZhonggongThreeCommissionAmount" />
    <result column="service_zhonggong_three_ratio" jdbcType="DECIMAL" property="serviceZhonggongThreeRatio" />
    <result column="zhonggong_four_number" jdbcType="VARCHAR" property="zhonggongFourNumber" />
    <result column="service_zhonggong_four_staff_id" jdbcType="BIGINT" property="serviceZhonggongFourStaffId" />
    <result column="service_zhonggong_four_staff_name" jdbcType="VARCHAR" property="serviceZhonggongFourStaffName" />
    <result column="service_zhonggong_four_identity_card" jdbcType="VARCHAR" property="serviceZhonggongFourIdentityCard" />
    <result column="service_zhonggong_four_achievement_amount" jdbcType="DECIMAL" property="serviceZhonggongFourAchievementAmount" />
    <result column="service_zhonggong_four_commission_amount" jdbcType="DECIMAL" property="serviceZhonggongFourCommissionAmount" />
    <result column="service_zhonggong_four_ratio" jdbcType="DECIMAL" property="serviceZhonggongFourRatio" />
    <result column="zhonggong_five_number" jdbcType="VARCHAR" property="zhonggongFiveNumber" />
    <result column="service_zhonggong_five_staff_id" jdbcType="BIGINT" property="serviceZhonggongFiveStaffId" />
    <result column="service_zhonggong_five_staff_name" jdbcType="VARCHAR" property="serviceZhonggongFiveStaffName" />
    <result column="service_zhonggong_five_identity_card" jdbcType="VARCHAR" property="serviceZhonggongFiveIdentityCard" />
    <result column="service_zhonggong_five_achievement_amount" jdbcType="DECIMAL" property="serviceZhonggongFiveAchievementAmount" />
    <result column="service_zhonggong_five_commission_amount" jdbcType="DECIMAL" property="serviceZhonggongFiveCommissionAmount" />
    <result column="service_zhonggong_five_ratio" jdbcType="DECIMAL" property="serviceZhonggongFiveRatio" />
    <result column="technician_one_number" jdbcType="VARCHAR" property="technicianOneNumber" />
    <result column="service_technician_one_staff_id" jdbcType="BIGINT" property="serviceTechnicianOneStaffId" />
    <result column="service_technician_one_staff_name" jdbcType="VARCHAR" property="serviceTechnicianOneStaffName" />
    <result column="service_technician_one_identity_card" jdbcType="VARCHAR" property="serviceTechnicianOneIdentityCard" />
    <result column="service_technician_one_achievement_amount" jdbcType="DECIMAL" property="serviceTechnicianOneAchievementAmount" />
    <result column="service_technician_one_commission_amount" jdbcType="DECIMAL" property="serviceTechnicianOneCommissionAmount" />
    <result column="service_technician_one_ratio" jdbcType="DECIMAL" property="serviceTechnicianOneRatio" />
    <result column="technician_two_number" jdbcType="VARCHAR" property="technicianTwoNumber" />
    <result column="service_technician_two_staff_id" jdbcType="BIGINT" property="serviceTechnicianTwoStaffId" />
    <result column="service_technician_two_staff_name" jdbcType="VARCHAR" property="serviceTechnicianTwoStaffName" />
    <result column="service_technician_two_identity_card" jdbcType="VARCHAR" property="serviceTechnicianTwoIdentityCard" />
    <result column="service_technician_two_achievement_amount" jdbcType="DECIMAL" property="serviceTechnicianTwoAchievementAmount" />
    <result column="service_technician_two_commission_amount" jdbcType="DECIMAL" property="serviceTechnicianTwoCommissionAmount" />
    <result column="service_technician_two_ratio" jdbcType="DECIMAL" property="serviceTechnicianTwoRatio" />
    <result column="technician_three_number" jdbcType="VARCHAR" property="technicianThreeNumber" />
    <result column="service_technician_three_staff_id" jdbcType="BIGINT" property="serviceTechnicianThreeStaffId" />
    <result column="service_technician_three_staff_name" jdbcType="VARCHAR" property="serviceTechnicianThreeStaffName" />
    <result column="service_technician_three_identity_card" jdbcType="VARCHAR" property="serviceTechnicianThreeIdentityCard" />
    <result column="service_technician_three_achievement_amount" jdbcType="DECIMAL" property="serviceTechnicianThreeAchievementAmount" />
    <result column="service_technician_three_commission_amount" jdbcType="DECIMAL" property="serviceTechnicianThreeCommissionAmount" />
    <result column="service_technician_three_ratio" jdbcType="DECIMAL" property="serviceTechnicianThreeRatio" />
    <result column="small_one_number" jdbcType="VARCHAR" property="smallOneNumber" />
    <result column="service_small_one_staff_id" jdbcType="BIGINT" property="serviceSmallOneStaffId" />
    <result column="service_small_one_staff_name" jdbcType="VARCHAR" property="serviceSmallOneStaffName" />
    <result column="service_small_one_identity_card" jdbcType="VARCHAR" property="serviceSmallOneIdentityCard" />
    <result column="service_small_one_achievement_amount" jdbcType="DECIMAL" property="serviceSmallOneAchievementAmount" />
    <result column="service_small_one_commission_amount" jdbcType="DECIMAL" property="serviceSmallOneCommissionAmount" />
    <result column="service_small_one_ratio" jdbcType="DECIMAL" property="serviceSmallOneRatio" />
    <result column="small_two_number" jdbcType="VARCHAR" property="smallTwoNumber" />
    <result column="service_small_two_staff_id" jdbcType="BIGINT" property="serviceSmallTwoStaffId" />
    <result column="service_small_two_staff_name" jdbcType="VARCHAR" property="serviceSmallTwoStaffName" />
    <result column="service_small_two_identity_card" jdbcType="VARCHAR" property="serviceSmallTwoIdentityCard" />
    <result column="service_small_two_achievement_amount" jdbcType="DECIMAL" property="serviceSmallTwoAchievementAmount" />
    <result column="service_small_two_commission_amount" jdbcType="DECIMAL" property="serviceSmallTwoCommissionAmount" />
    <result column="service_small_two_ratio" jdbcType="DECIMAL" property="serviceSmallTwoRatio" />
    <result column="small_three_number" jdbcType="VARCHAR" property="smallThreeNumber" />
    <result column="service_small_three_staff_id" jdbcType="BIGINT" property="serviceSmallThreeStaffId" />
    <result column="service_small_three_staff_name" jdbcType="VARCHAR" property="serviceSmallThreeStaffName" />
    <result column="service_small_three_identity_card" jdbcType="VARCHAR" property="serviceSmallThreeIdentityCard" />
    <result column="service_small_three_achievement_amount" jdbcType="DECIMAL" property="serviceSmallThreeAchievementAmount" />
    <result column="service_small_three_commission_amount" jdbcType="DECIMAL" property="serviceSmallThreeCommissionAmount" />
    <result column="service_small_three_ratio" jdbcType="DECIMAL" property="serviceSmallThreeRatio" />
    <result column="share" jdbcType="INTEGER" property="share" />
    <result column="is_cancel" jdbcType="INTEGER" property="isCancel" />
    <result column="cancel_date" jdbcType="TIMESTAMP" property="cancelDate" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="manage_staff_id" jdbcType="BIGINT" property="manageStaffId" />
    <result column="manage_staff_name" jdbcType="VARCHAR" property="manageStaffName" />
    <result column="manage_identity_card" jdbcType="VARCHAR" property="manageIdentityCard" />
    <result column="manage_number" jdbcType="VARCHAR" property="manageNumber" />
    <result column="large_achievement_amount" jdbcType="DECIMAL" property="largeAchievementAmount" />
    <result column="zhonggong_achievement_amount" jdbcType="DECIMAL" property="zhonggongAchievementAmount" />
    <result column="technician_achievement_amount" jdbcType="DECIMAL" property="technicianAchievementAmount" />
    <result column="small_achievement_amount" jdbcType="DECIMAL" property="smallAchievementAmount" />
    <result column="large_commission_amount" jdbcType="DECIMAL" property="largeCommissionAmount" />
    <result column="zhonggong_commission_amount" jdbcType="DECIMAL" property="zhonggongCommissionAmount" />
    <result column="technician_commission_amount" jdbcType="DECIMAL" property="technicianCommissionAmount" />
    <result column="small_commission_amount" jdbcType="DECIMAL" property="smallCommissionAmount" />
    <result column="card_large_achievement_amount" jdbcType="DECIMAL" property="cardLargeAchievementAmount" />
    <result column="card_zhonggong_achievement_amount" jdbcType="DECIMAL" property="cardZhonggongAchievementAmount" />
    <result column="card_technician_achievement_amount" jdbcType="DECIMAL" property="cardTechnicianAchievementAmount" />
    <result column="card_small_achievement_amount" jdbcType="DECIMAL" property="cardSmallAchievementAmount" />
    <result column="card_large_commission_amount" jdbcType="DECIMAL" property="cardLargeCommissionAmount" />
    <result column="card_zhonggong_commission_amount" jdbcType="DECIMAL" property="cardZhonggongCommissionAmount" />
    <result column="card_technician_commission_amount" jdbcType="DECIMAL" property="cardTechnicianCommissionAmount" />
    <result column="card_small_commission_amount" jdbcType="DECIMAL" property="cardSmallCommissionAmount" />
    <result column="course_account_id" jdbcType="BIGINT" property="courseAccountId" />
    <result column="input_id" jdbcType="BIGINT" property="inputId" />
    <result column="input_by" jdbcType="VARCHAR" property="inputBy" />
    <result column="cancel_id" jdbcType="BIGINT" property="cancelId" />
    <result column="cancel_by" jdbcType="VARCHAR" property="cancelBy" />
    <result column="addition_date" jdbcType="DATE" property="additionDate" />
    <result column="is_addition" jdbcType="INTEGER" property="isAddition" />
    <result column="is_member_feedback" jdbcType="INTEGER" property="isMemberFeedback" />
    <result column="is_staff_feedback" jdbcType="INTEGER" property="isStaffFeedback" />
    <result column="age_group" jdbcType="VARCHAR" property="ageGroup" />
    <result column="job" jdbcType="VARCHAR" property="job" />
    <result column="sex" jdbcType="VARCHAR" property="sex" />
    <result column="collectionAmount" jdbcType="DECIMAL" property="collectionAmount" />
    <result column="no_discount" jdbcType="INTEGER" property="noDiscount" />
    <result column="man" jdbcType="INTEGER" property="man" />
    <result column="woman" jdbcType="INTEGER" property="woman" />
    <result column="project_num" jdbcType="VARCHAR" property="projectNum" />
    <result column="payment_amount" jdbcType="DECIMAL" property="paymentAmount" />
    <result column="woman_number" jdbcType="DECIMAL" property="womanNumber" />
    <result column="man_number" jdbcType="DECIMAL" property="manNumber" />
    <result column="course_money" property="courseMoney" jdbcType="DECIMAL"/>
  </resultMap>

  <resultMap id="StaffProgressMap" type="com.ssm.manage.extendEntity.StaffProgress">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="cash_num" jdbcType="VARCHAR" property="cashNum" />
    <result column="cash_date" jdbcType="TIMESTAMP" property="cashDate" />
    <result column="member_id" jdbcType="BIGINT" property="memberId" />
    <result column="member_name" jdbcType="VARCHAR" property="memberName" />
    <result column="mobile_phone" jdbcType="VARCHAR" property="mobilePhone" />
    <result column="member_identity_card" jdbcType="VARCHAR" property="memberIdentityCard" />
    <result column="project_id" jdbcType="BIGINT" property="projectId" />
    <result column="project_name" jdbcType="VARCHAR" property="projectName" />
    <result column="store_id" jdbcType="BIGINT" property="storeId" />
    <result column="store_name" jdbcType="VARCHAR" property="storeName" />
    <result column="staff_id" jdbcType="BIGINT" property="staffId" />
    <result column="staff_name" jdbcType="VARCHAR" property="staffName" />
    <result column="is_staff_feedback" jdbcType="INTEGER" property="isStaffFeedback" />
  </resultMap>

  <resultMap id="StoreDailyMap" type="com.ssm.manage.extendEntity.StoreDaily">
    <!--
      WARNING - @mbg.generated
    -->
    <result column="recharge_gif_money" property="rechargeGifMoney" jdbcType="DECIMAL"/>
    <result column="date" property="date" jdbcType="TIMESTAMP"/>
    <result column="cash_people_num" jdbcType="INTEGER" property="cashPeopleNum" />
    <result column="cash_money" jdbcType="DECIMAL" property="cashMoney" />
    <result column="recharge_money" jdbcType="DECIMAL" property="rechargeMoney" />
    <result column="recharge_order_num" jdbcType="INTEGER" property="rechargeOrderNum" />
    <result column="repay_money" jdbcType="DECIMAL" property="repayMoney" />
    <result column="refund_money" jdbcType="DECIMAL" property="refundMoney" />
    <result column="rec_negative_money" jdbcType="BIGINT" property="recNegativeMoney" />
    <result column="member_num" jdbcType="INTEGER" property="memberNum" />
    <result column="new_member_num" jdbcType="INTEGER" property="newMemberNum" />
    <result column="store_id" jdbcType="BIGINT" property="storeId" />
    <result column="store_name" jdbcType="VARCHAR" property="storeName" />

    <result column="cashier_cash_money" jdbcType="DECIMAL" property="cashierCashMoney" />
    <result column="cashier_card_money" jdbcType="DECIMAL" property="cashierCardMoney" />
    <result column="cashl_money" jdbcType="DECIMAL" property="cashlMoney" />
    <result column="woman" jdbcType="INTEGER" property="woman" />
    <result column="man" jdbcType="INTEGER" property="man" />

    <result column="id" jdbcType="VARCHAR" property="id" />
    <result column="cash_man_num" jdbcType="INTEGER" property="cashManNum"/>
    <result column="cash_woman_num" jdbcType="INTEGER" property="cashWomanNum"/>

  </resultMap>

  <sql id="BaseColumnList">
    a.id,
    a.cash_num,
    a.cash_date,
    a.cash_number,
    a.member_id,
    a.member_name,
    a.mobile_phone,
    a.member_identity_card,
    a.card,
    a.project_id,
    a.project_name,
    a.store_id,
    a.store_name,
    a.minumum_times,
    a.price,
    a.minumum_price,
    a.price_member,
    a.minumum_price_member,
    a.transaction_price,
    a.number_times,
    a.amount,
    a.collection_cash_amount,
    a.collection_integral_amount,
    a.integral,
    a.give_integral,
    a.collection_recharge_amount,
    a.collection_gift_amount,
    a.cash_amount,
    a.achievement_large,
    a.achievement_zhonggong,
    a.achievement_technician,
    a.achievement_small,
    a.commission_large,
    a.commission_zhonggong,
    a.commission_technician,
    a.commission_small,
    a.card_achievement_large,
    a.card_achievement_zhonggong,
    a.card_achievement_technician,
    a.card_achievement_small,
    a.card_commission_large,
    a.card_commission_zhonggong,
    a.card_commission_technician,
    a.card_commission_small,
    a.large_one_number,
    a.service_large_one_staff_id,
    a.service_large_one_staff_name,
    a.service_large_one_identity_card,
    a.service_large_one_achievement_amount,
    a.service_large_one_commission_amount,
    a.service_large_one_ratio,
    a.large_two_number,
    a.service_large_two_staff_id,
    a.service_large_two_staff_name,
    a.service_large_two_identity_card,
    a.service_large_two_achievement_amount,
    a.service_large_two_commission_amount,
    a.service_large_two_ratio,
    a.large_three_number,
    a.service_large_three_staff_id,
    a.service_large_three_staff_name,
    a.service_large_three_identity_card,
    a.service_large_three_achievement_amount,
    a.service_large_three_commission_amount,
    a.service_large_three_ratio,
        a.large_four_number,
    a.service_large_four_staff_id,
    a.service_large_four_staff_name,
    a.service_large_four_identity_card,
    a.service_large_four_achievement_amount,
    a.service_large_four_commission_amount,
    a.service_large_four_ratio,
        a.large_five_number,
    a.service_large_five_staff_id,
    a.service_large_five_staff_name,
    a.service_large_five_identity_card,
    a.service_large_five_achievement_amount,
    a.service_large_five_commission_amount,
    a.service_large_five_ratio,
    a.zhonggong_one_number,
    a.service_zhonggong_one_staff_id,
    a.service_zhonggong_one_staff_name,
    a.service_zhonggong_one_identity_card,
    a.service_zhonggong_one_achievement_amount,
    a.service_zhonggong_one_commission_amount,
    a.service_zhonggong_one_ratio,
    a.zhonggong_two_number,
    a.service_zhonggong_two_staff_id,
    a.service_zhonggong_two_staff_name,
    a.service_zhonggong_two_identity_card,
    a.service_zhonggong_two_achievement_amount,
    a.service_zhonggong_two_commission_amount,
    a.service_zhonggong_two_ratio,
    a.zhonggong_three_number,
    a.service_zhonggong_three_staff_id,
    a.service_zhonggong_three_staff_name,
    a.service_zhonggong_three_identity_card,
    a.service_zhonggong_three_achievement_amount,
    a.service_zhonggong_three_commission_amount,
    a.service_zhonggong_three_ratio,
         a.zhonggong_four_number,
    a.service_zhonggong_four_staff_id,
    a.service_zhonggong_four_staff_name,
    a.service_zhonggong_four_identity_card,
    a.service_zhonggong_four_achievement_amount,
    a.service_zhonggong_four_commission_amount,
    a.service_zhonggong_four_ratio,
         a.zhonggong_five_number,
    a.service_zhonggong_five_staff_id,
    a.service_zhonggong_five_staff_name,
    a.service_zhonggong_five_identity_card,
    a.service_zhonggong_five_achievement_amount,
    a.service_zhonggong_five_commission_amount,
    a.service_zhonggong_five_ratio,
    a.technician_one_number,
    a.service_technician_one_staff_id,
    a.service_technician_one_staff_name,
    a.service_technician_one_identity_card,
    a.service_technician_one_achievement_amount,
    a.service_technician_one_commission_amount,
    a.service_technician_one_ratio,
    a.technician_two_number,
    a.service_technician_two_staff_id,
    a.service_technician_two_staff_name,
    a.service_technician_two_identity_card,
    a.service_technician_two_achievement_amount,
    a.service_technician_two_commission_amount,
    a.service_technician_two_ratio,
    a.technician_three_number,
    a.service_technician_three_staff_id,
    a.service_technician_three_staff_name,
    a.service_technician_three_identity_card,
    a.service_technician_three_achievement_amount,
    a.service_technician_three_commission_amount,
    a.service_technician_three_ratio,
    a.small_one_number,
    a.service_small_one_staff_id,
    a.service_small_one_staff_name,
    a.service_small_one_identity_card,
    a.service_small_one_achievement_amount,
    a.service_small_one_commission_amount,
    a.service_small_one_ratio,
    a.small_two_number,
    a.service_small_two_staff_id,
    a.service_small_two_staff_name,
    a.service_small_two_identity_card,
    a.service_small_two_achievement_amount,
    a.service_small_two_commission_amount,
    a.service_small_two_ratio,
    a.small_three_number,
    a.service_small_three_staff_id,
    a.service_small_three_staff_name,
    a.service_small_three_identity_card,
    a.service_small_three_achievement_amount,
    a.service_small_three_commission_amount,
    a.service_small_three_ratio,
    a.share,
    a.is_cancel,
    a.cancel_date,
    a.remark,
    a.manage_staff_id,
    a.manage_staff_name,
    a.manage_identity_card,
    a.manage_number,
    a.large_achievement_amount,
    a.zhonggong_achievement_amount,
    a.technician_achievement_amount,
    a.small_achievement_amount,
    a.large_commission_amount,
    a.zhonggong_commission_amount,
    a.technician_commission_amount,
    a.small_commission_amount,
    a.card_large_achievement_amount,
    a.card_zhonggong_achievement_amount,
    a.card_technician_achievement_amount,
    a.card_small_achievement_amount,
    a.card_large_commission_amount,
    a.card_zhonggong_commission_amount,
    a.card_technician_commission_amount,
    a.card_small_commission_amount,
    a.course_account_id,
    a.input_id,
    a.input_by,
    a.cancel_id,
    a.cancel_by,
    a.addition_date,
    a.is_addition,
    a.is_member_feedback,
    a.is_staff_feedback,
    a.age_group,
    a.job,
    a.sex,
    a.collectionAmount,
    a.no_discount,
    a.man,
    a.woman,
    a.project_num,
    a.man_number,
    a.woman_number,
    a.payment_amount
  </sql>

  <select id="createTable" parameterType="java.lang.String">
    create table IF NOT EXISTS cash_list_${tab} like cash_list
  </select>


  <select id="selectPage" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" />,
    m.doc_num as doc_num,
    m.cs_technical_star as technicalStar,
    m.cs_appraise as appraise
    from cash_list_${tab} a left join member_cs m on a.cash_num = m.doc_num
    where
    a.store_id = #{storeId,jdbcType = BIGINT}
    <if test="type != null and type == 0">
      and a.is_cancel is null
    </if>
    <if test="type != null and type == 1">
      and a.is_cancel is not null
    </if>
    <if test="memberId != null">
      and a.member_id = #{memberId, jdbcType = BIGINT}
    </if>
    <if test="isCancel != null">
      and a.is_cancel = #{isCancel, jdbcType = INTEGER}
    </if>
    <if test="dateStr != null">
      and a.cash_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
    </if>
    <if test="courseAccountId != null">
      and a.course_account_id = #{courseAccountId, jdbcType = BIGINT}
    </if>
    <if test="cashNum != null">
      and a.cash_num like concat('%',concat( #{cashNum, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="memberName != null">
      and a.member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="mobilePhone != null">
      and a.mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="startTime != null and endTime != null">
      and a.cash_date between #{startTime, jdbcType = TIMESTAMP} and #{endTime, jdbcType = TIMESTAMP}
    </if>
    order by a.cash_num desc
  </select>

  <select id="selectPage2" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from cash_list_${tab} a
    where
    a.store_id = #{storeId,jdbcType = BIGINT}
    <if test="type != null and type == 0">
      and a.is_cancel is null
    </if>
    <if test="type != null and type == 1">
      and a.is_cancel is not null
    </if>
    <if test="memberId != null">
      and a.member_id = #{memberId, jdbcType = BIGINT}
    </if>
    <if test="isCancel != null">
      and a.is_cancel = #{isCancel, jdbcType = INTEGER}
    </if>
    <if test="dateStr != null">
      and a.cash_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
    </if>
    <if test="courseAccountId != null">
      and a.course_account_id = #{courseAccountId, jdbcType = BIGINT}
    </if>
    <if test="cashNum != null">
      and a.cash_num like concat('%',concat( #{cashNum, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="memberName != null">
      and a.member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="mobilePhone != null">
      and a.mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="startTime != null and endTime != null">
      and a.cash_date between #{startTime, jdbcType = TIMESTAMP} and #{endTime, jdbcType = TIMESTAMP}
    </if>
    order by a.cash_num desc
  </select>

  <select id="selectPage3" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from cash_list_${tab} a
    where
    a.store_id = #{storeId,jdbcType = BIGINT}
    <if test="id != null">
      and a.id =  #{id, jdbcType = VARCHAR}
    </if>
    <if test="type != null and type == 0">
      and a.is_cancel is null
    </if>
    <if test="type != null and type == 1">
      and a.is_cancel is not null
    </if>
    <if test="memberId != null">
      and a.member_id = #{memberId, jdbcType = BIGINT}
    </if>
    <if test="isCancel != null">
      and a.is_cancel = #{isCancel, jdbcType = INTEGER}
    </if>
    <if test="dateStr != null">
      and a.cash_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
    </if>
    <if test="courseAccountId != null">
      and a.course_account_id = #{courseAccountId, jdbcType = BIGINT}
    </if>
    <if test="cashNum != null">
      and a.cash_num like concat('%',concat( #{cashNum, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="memberName != null">
      and a.member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="mobilePhone != null">
      and a.mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="startTime != null and endTime != null">
      and a.cash_date between #{startTime, jdbcType = TIMESTAMP} and #{endTime, jdbcType = TIMESTAMP}
    </if>
    order by a.cash_num desc
  </select>

  <select id="selectCashList" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from cash_list_${tab} a
    <where>
    <if test="storeId != null">
      a.store_id = #{storeId,jdbcType = BIGINT}
    </if>

    <if test="type != null and type == 0">
      and a.is_cancel is null
    </if>
    <if test="type != null and type == 1">
      and a.is_cancel is not null
    </if>
    <if test="memberId != null">
      and a.member_id = #{memberId, jdbcType = BIGINT}
    </if>
    <if test="isCancel != null">
      and a.is_cancel = #{isCancel, jdbcType = INTEGER}
    </if>
    <if test="cashNum != null">
      and a.cash_num like concat('%',concat( #{cashNum, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="memberName != null">
      and a.member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="mobilePhone != null">
      and a.mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="startTime != null and endTime != null">
      and a.cash_date between #{startTime, jdbcType = TIMESTAMP} and #{endTime, jdbcType = TIMESTAMP}
    </if>
    <if test="id != null">
      and a.id = #{id, jdbcType = BIGINT}
    </if>
    <if test="cashNumber != null ">
        and a.cash_number = #{cashNumber, jdbcType = INTEGER}
    </if>
    </where>
    order by a.cash_num desc
  </select>
<!--group by a.cash_num -->
  <select id="selectProgress" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from cash_list_${tab} a
--     ,project_progress b
    where
    a.store_id = #{storeId,jdbcType = BIGINT}
    and a.course_account_id is not null
    and a.is_cancel = 0
    and a.is_member_feedback is null
    <if test="memberId != null">
      and a.member_id = #{memberId, jdbcType = BIGINT}
    </if>

    order by a.cash_num desc
  </select>

  <select id="selectByNum" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from cash_list_${tab} a
    where
    a.store_id = #{storeId,jdbcType = BIGINT}
    <if test="type != null and type == 0">
      and a.is_cancel is null
    </if>
    <if test="type != null and type == 1">
      and a.is_cancel is not null
    </if>
    <if test="cashNum != null">
      and a.cash_num = #{cashNum,jdbcType = VARCHAR}
    </if>
    <if test="id != null">
      and a.id = #{id,jdbcType = VARCHAR}
    </if>
  </select>

  <select id="getDocNum" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from cash_list_${tab} a
    where a.store_id = #{storeId,jdbcType = BIGINT} and a.cash_num like concat(#{selectDate,jdbcType = VARCHAR},'%')
    order by a.cash_num desc
  </select>
  <insert id="addCash" parameterType="com.ssm.manage.entity.CashList">
    insert into cash_list_${tab}
    (
    id,
    cash_num,
    cash_date,
    cash_number,
    member_id,
    member_name,
    mobile_phone,
    member_identity_card,
    card,
    project_id,
    project_name,
    store_id,
    store_name,
    minumum_times,
    price,
    minumum_price,
    price_member,
    minumum_price_member,
    transaction_price,
    number_times,
    amount,
    collection_cash_amount,
    collection_integral_amount,
    integral,
    give_integral,
    collection_recharge_amount,
    collection_gift_amount,
    cash_amount,
    achievement_large,
    achievement_zhonggong,
    achievement_technician,
    achievement_small,
    commission_large,
    commission_zhonggong,
    commission_technician,
    commission_small,
    card_achievement_large,
    card_achievement_zhonggong,
    card_achievement_technician,
    card_achievement_small,
    card_commission_large,
    card_commission_zhonggong,
    card_commission_technician,
    card_commission_small,
    large_one_number,
    service_large_one_staff_id,
    service_large_one_staff_name,
    service_large_one_identity_card,
    service_large_one_achievement_amount,
    service_large_one_commission_amount,
    service_large_one_ratio,
    large_two_number,
    service_large_two_staff_id,
    service_large_two_staff_name,
    service_large_two_identity_card,
    service_large_two_achievement_amount,
    service_large_two_commission_amount,
    service_large_two_ratio,
    large_three_number,
    service_large_three_staff_id,
    service_large_three_staff_name,
    service_large_three_identity_card,
    service_large_three_achievement_amount,
    service_large_three_commission_amount,
    service_large_three_ratio,
    large_four_number,
    service_large_four_staff_id,
    service_large_four_staff_name,
    service_large_four_identity_card,
    service_large_four_achievement_amount,
    service_large_four_commission_amount,
    service_large_four_ratio,
    large_five_number,
    service_large_five_staff_id,
    service_large_five_staff_name,
    service_large_five_identity_card,
    service_large_five_achievement_amount,
    service_large_five_commission_amount,
    service_large_five_ratio,
    zhonggong_one_number,
    service_zhonggong_one_staff_id,
    service_zhonggong_one_staff_name,
    service_zhonggong_one_identity_card,
    service_zhonggong_one_achievement_amount,
    service_zhonggong_one_commission_amount,
    service_zhonggong_one_ratio,
    zhonggong_two_number,
    service_zhonggong_two_staff_id,
    service_zhonggong_two_staff_name,
    service_zhonggong_two_identity_card,
    service_zhonggong_two_achievement_amount,
    service_zhonggong_two_commission_amount,
    service_zhonggong_two_ratio,
    zhonggong_three_number,
    service_zhonggong_three_staff_id,
    service_zhonggong_three_staff_name,
    service_zhonggong_three_identity_card,
    service_zhonggong_three_achievement_amount,
    service_zhonggong_three_commission_amount,
    service_zhonggong_three_ratio,
    zhonggong_four_number,
    service_zhonggong_four_staff_id,
    service_zhonggong_four_staff_name,
    service_zhonggong_four_identity_card,
    service_zhonggong_four_achievement_amount,
    service_zhonggong_four_commission_amount,
    service_zhonggong_four_ratio,
    zhonggong_five_number,
    service_zhonggong_five_staff_id,
    service_zhonggong_five_staff_name,
    service_zhonggong_five_identity_card,
    service_zhonggong_five_achievement_amount,
    service_zhonggong_five_commission_amount,
    service_zhonggong_five_ratio,
    technician_one_number,
    service_technician_one_staff_id,
    service_technician_one_staff_name,
    service_technician_one_identity_card,
    service_technician_one_achievement_amount,
    service_technician_one_commission_amount,
    service_technician_one_ratio,
    technician_two_number,
    service_technician_two_staff_id,
    service_technician_two_staff_name,
    service_technician_two_identity_card,
    service_technician_two_achievement_amount,
    service_technician_two_commission_amount,
    service_technician_two_ratio,
    technician_three_number,
    service_technician_three_staff_id,
    service_technician_three_staff_name,
    service_technician_three_identity_card,
    service_technician_three_achievement_amount,
    service_technician_three_commission_amount,
    service_technician_three_ratio,
    small_one_number,
    service_small_one_staff_id,
    service_small_one_staff_name,
    service_small_one_identity_card,
    service_small_one_achievement_amount,
    service_small_one_commission_amount,
    service_small_one_ratio,
    small_two_number,
    service_small_two_staff_id,
    service_small_two_staff_name,
    service_small_two_identity_card,
    service_small_two_achievement_amount,
    service_small_two_commission_amount,
    service_small_two_ratio,
    small_three_number,
    service_small_three_staff_id,
    service_small_three_staff_name,
    service_small_three_identity_card,
    service_small_three_achievement_amount,
    service_small_three_commission_amount,
    service_small_three_ratio,
    share,
    is_cancel,
    cancel_date,
    remark,
    manage_staff_id,
    manage_staff_name,
    manage_identity_card,
    manage_number,

    <if test="largeAchievementAmount != null">
      large_achievement_amount,
    </if>
    <if test="zhonggongAchievementAmount != null">
      zhonggong_achievement_amount,
    </if>
    <if test="technicianAchievementAmount != null">
      technician_achievement_amount,
    </if>
    <if test="smallAchievementAmount != null">
      small_achievement_amount,
    </if>
    <if test="largeCommissionAmount != null">
      large_commission_amount,
    </if>
    <if test="zhonggongCommissionAmount != null">
      zhonggong_commission_amount,
    </if>
    <if test="technicianCommissionAmount != null">
      technician_commission_amount,
    </if>
    <if test="smallCommissionAmount != null">
      small_commission_amount,
    </if>

    <if test="cardLargeAchievementAmount != null">
      card_large_achievement_amount,
    </if>
    <if test="cardZhonggongAchievementAmount != null">
      card_zhonggong_achievement_amount,
    </if>
    <if test="cardTechnicianAchievementAmount != null">
      card_technician_achievement_amount,
    </if>
    <if test="cardSmallAchievementAmount != null">
      card_small_achievement_amount,
    </if>
    <if test="cardLargeCommissionAmount != null">
      card_large_commission_amount,
    </if>
    <if test="cardZhonggongCommissionAmount != null">
      card_zhonggong_commission_amount,
    </if>
    <if test="cardTechnicianCommissionAmount != null">
      card_technician_commission_amount,
    </if>
    <if test="cardSmallCommissionAmount != null">
      card_small_commission_amount,
    </if>
    course_account_id,
    input_id,
    input_by,
    cancel_id,
    cancel_by,
    addition_date,
    is_addition,
    age_group,
    job,
    sex,
    collectionAmount,
    no_discount,
    man,
    woman,
    project_num,
    payment_amount,
    <if test="manNumber !=null">
      man_number,
    </if>
    <if test="womanNumber !=null">
      woman_number,
    </if>
    course_money


    )values (
    #{id, jdbcType=BIGINT},
    #{cashNum, jdbcType=VARCHAR},
    #{cashDate, jdbcType=TIMESTAMP},
    #{cashNumber, jdbcType=INTEGER},
    #{memberId, jdbcType=BIGINT},
    #{memberName, jdbcType=VARCHAR},
    #{mobilePhone, jdbcType=VARCHAR},
    #{memberIdentityCard, jdbcType=VARCHAR},
    #{card, jdbcType=VARCHAR},
    #{projectId, jdbcType=BIGINT},
    #{projectName, jdbcType=VARCHAR},
    #{storeId, jdbcType=BIGINT},
    #{storeName, jdbcType=VARCHAR},
    #{minumumTimes, jdbcType=INTEGER},
    #{price, jdbcType=DECIMAL},
    #{minumumPrice, jdbcType=DECIMAL},
    #{priceMember, jdbcType=DECIMAL},
    #{minumumPriceMember, jdbcType=DECIMAL},
    #{transactionPrice, jdbcType=DECIMAL},
    #{numberTimes, jdbcType=INTEGER},
    #{amount, jdbcType=DECIMAL},
    #{collectionCashAmount, jdbcType=DECIMAL},
    #{collectionIntegralAmount, jdbcType=DECIMAL},
    #{integral, jdbcType=INTEGER},
    #{giveIntegral, jdbcType=INTEGER},
    #{collectionRechargeAmount, jdbcType=DECIMAL},
    #{collectionGiftAmount, jdbcType=DECIMAL},
    #{cashAmount, jdbcType=DECIMAL},
    #{achievementLarge, jdbcType=DECIMAL},
    #{achievementZhonggong, jdbcType=DECIMAL},
    #{achievementTechnician, jdbcType=DECIMAL},
    #{achievementSmall, jdbcType=DECIMAL},
    #{commissionLarge, jdbcType=DECIMAL},
    #{commissionZhonggong, jdbcType=DECIMAL},
    #{commissionTechnician, jdbcType=DECIMAL},
    #{commissionSmall, jdbcType=DECIMAL},
    #{cardAchievementLarge, jdbcType=DECIMAL},
    #{cardAchievementZhonggong, jdbcType=DECIMAL},
    #{cardAchievementTechnician, jdbcType=DECIMAL},
    #{cardAchievementSmall, jdbcType=DECIMAL},
    #{cardCommissionLarge, jdbcType=DECIMAL},
    #{cardCommissionZhonggong, jdbcType=DECIMAL},
    #{cardCommissionTechnician, jdbcType=DECIMAL},
    #{cardCommissionSmall, jdbcType=DECIMAL},
    #{largeOneNumber, jdbcType=VARCHAR},
    #{serviceLargeOneStaffId, jdbcType=BIGINT},
    #{serviceLargeOneStaffName, jdbcType=VARCHAR},
    #{serviceLargeOneIdentityCard, jdbcType=VARCHAR},
    #{serviceLargeOneAchievementAmount, jdbcType=DECIMAL},
    #{serviceLargeOneCommissionAmount, jdbcType=DECIMAL},
    #{serviceLargeOneRatio, jdbcType=DECIMAL},
    #{largeTwoNumber, jdbcType=VARCHAR},
    #{serviceLargeTwoStaffId, jdbcType=BIGINT},
    #{serviceLargeTwoStaffName, jdbcType=VARCHAR},
    #{serviceLargeTwoIdentityCard, jdbcType=VARCHAR},
    #{serviceLargeTwoAchievementAmount, jdbcType=DECIMAL},
    #{serviceLargeTwoCommissionAmount, jdbcType=DECIMAL},
    #{serviceLargeTwoRatio, jdbcType=DECIMAL},
    #{largeThreeNumber, jdbcType=VARCHAR},
    #{serviceLargeThreeStaffId, jdbcType=BIGINT},
    #{serviceLargeThreeStaffName, jdbcType=VARCHAR},
    #{serviceLargeThreeIdentityCard, jdbcType=VARCHAR},
    #{serviceLargeThreeAchievementAmount, jdbcType=DECIMAL},
    #{serviceLargeThreeCommissionAmount, jdbcType=DECIMAL},
    #{serviceLargeThreeRatio, jdbcType=DECIMAL},
    #{largeFourNumber, jdbcType=VARCHAR},
    #{serviceLargeFourStaffId, jdbcType=BIGINT},
    #{serviceLargeFourStaffName, jdbcType=VARCHAR},
    #{serviceLargeFourIdentityCard, jdbcType=VARCHAR},
    #{serviceLargeFourAchievementAmount, jdbcType=DECIMAL},
    #{serviceLargeFourCommissionAmount, jdbcType=DECIMAL},
    #{serviceLargeFourRatio, jdbcType=DECIMAL},
    #{largeFiveNumber, jdbcType=VARCHAR},
    #{serviceLargeFiveStaffId, jdbcType=BIGINT},
    #{serviceLargeFiveStaffName, jdbcType=VARCHAR},
    #{serviceLargeFiveIdentityCard, jdbcType=VARCHAR},
    #{serviceLargeFiveAchievementAmount, jdbcType=DECIMAL},
    #{serviceLargeFiveCommissionAmount, jdbcType=DECIMAL},
    #{serviceLargeFiveRatio, jdbcType=DECIMAL},
    #{zhonggongOneNumber, jdbcType=VARCHAR},
    #{serviceZhonggongOneStaffId, jdbcType=BIGINT},
    #{serviceZhonggongOneStaffName, jdbcType=VARCHAR},
    #{serviceZhonggongOneIdentityCard, jdbcType=VARCHAR},
    #{serviceZhonggongOneAchievementAmount, jdbcType=DECIMAL},
    #{serviceZhonggongOneCommissionAmount, jdbcType=DECIMAL},
    #{serviceZhonggongOneRatio, jdbcType=DECIMAL},
    #{zhonggongTwoNumber, jdbcType=VARCHAR},
    #{serviceZhonggongTwoStaffId, jdbcType=BIGINT},
    #{serviceZhonggongTwoStaffName, jdbcType=VARCHAR},
    #{serviceZhonggongTwoIdentityCard, jdbcType=VARCHAR},
    #{serviceZhonggongTwoAchievementAmount, jdbcType=DECIMAL},
    #{serviceZhonggongTwoCommissionAmount, jdbcType=DECIMAL},
    #{serviceZhonggongTwoRatio, jdbcType=DECIMAL},
    #{zhonggongThreeNumber, jdbcType=VARCHAR},
    #{serviceZhonggongThreeStaffId, jdbcType=BIGINT},
    #{serviceZhonggongThreeStaffName, jdbcType=VARCHAR},
    #{serviceZhonggongThreeIdentityCard, jdbcType=VARCHAR},
    #{serviceZhonggongThreeAchievementAmount, jdbcType=DECIMAL},
    #{serviceZhonggongThreeCommissionAmount, jdbcType=DECIMAL},
    #{serviceZhonggongThreeRatio, jdbcType=DECIMAL},
    #{zhonggongFourNumber, jdbcType=VARCHAR},
    #{serviceZhonggongFourStaffId, jdbcType=BIGINT},
    #{serviceZhonggongFourStaffName, jdbcType=VARCHAR},
    #{serviceZhonggongFourIdentityCard, jdbcType=VARCHAR},
    #{serviceZhonggongFourAchievementAmount, jdbcType=DECIMAL},
    #{serviceZhonggongFourCommissionAmount, jdbcType=DECIMAL},
    #{serviceZhonggongFourRatio, jdbcType=DECIMAL},
    #{zhonggongFiveNumber, jdbcType=VARCHAR},
    #{serviceZhonggongFiveStaffId, jdbcType=BIGINT},
    #{serviceZhonggongFiveStaffName, jdbcType=VARCHAR},
    #{serviceZhonggongFiveIdentityCard, jdbcType=VARCHAR},
    #{serviceZhonggongFiveAchievementAmount, jdbcType=DECIMAL},
    #{serviceZhonggongFiveCommissionAmount, jdbcType=DECIMAL},
    #{serviceZhonggongFiveRatio, jdbcType=DECIMAL},
    #{technicianOneNumber, jdbcType=VARCHAR},
    #{serviceTechnicianOneStaffId, jdbcType=BIGINT},
    #{serviceTechnicianOneStaffName, jdbcType=VARCHAR},
    #{serviceTechnicianOneIdentityCard, jdbcType=VARCHAR},
    #{serviceTechnicianOneAchievementAmount, jdbcType=DECIMAL},
    #{serviceTechnicianOneCommissionAmount, jdbcType=DECIMAL},
    #{serviceTechnicianOneRatio, jdbcType=DECIMAL},
    #{technicianTwoNumber, jdbcType=VARCHAR},
    #{serviceTechnicianTwoStaffId, jdbcType=BIGINT},
    #{serviceTechnicianTwoStaffName, jdbcType=VARCHAR},
    #{serviceTechnicianTwoIdentityCard, jdbcType=VARCHAR},
    #{serviceTechnicianTwoAchievementAmount, jdbcType=DECIMAL},
    #{serviceTechnicianTwoCommissionAmount, jdbcType=DECIMAL},
    #{serviceTechnicianTwoRatio, jdbcType=DECIMAL},
    #{technicianThreeNumber, jdbcType=VARCHAR},
    #{serviceTechnicianThreeStaffId, jdbcType=BIGINT},
    #{serviceTechnicianThreeStaffName, jdbcType=VARCHAR},
    #{serviceTechnicianThreeIdentityCard, jdbcType=VARCHAR},
    #{serviceTechnicianThreeAchievementAmount, jdbcType=DECIMAL},
    #{serviceTechnicianThreeCommissionAmount, jdbcType=DECIMAL},
    #{serviceTechnicianThreeRatio, jdbcType=DECIMAL},
    #{smallOneNumber, jdbcType=VARCHAR},
    #{serviceSmallOneStaffId, jdbcType=BIGINT},
    #{serviceSmallOneStaffName, jdbcType=VARCHAR},
    #{serviceSmallOneIdentityCard, jdbcType=VARCHAR},
    #{serviceSmallOneAchievementAmount, jdbcType=DECIMAL},
    #{serviceSmallOneCommissionAmount, jdbcType=DECIMAL},
    #{serviceSmallOneRatio, jdbcType=DECIMAL},
    #{smallTwoNumber, jdbcType=VARCHAR},
    #{serviceSmallTwoStaffId, jdbcType=BIGINT},
    #{serviceSmallTwoStaffName, jdbcType=VARCHAR},
    #{serviceSmallTwoIdentityCard, jdbcType=VARCHAR},
    #{serviceSmallTwoAchievementAmount, jdbcType=DECIMAL},
    #{serviceSmallTwoCommissionAmount, jdbcType=DECIMAL},
    #{serviceSmallTwoRatio, jdbcType=DECIMAL},
    #{smallThreeNumber, jdbcType=VARCHAR},
    #{serviceSmallThreeStaffId, jdbcType=BIGINT},
    #{serviceSmallThreeStaffName, jdbcType=VARCHAR},
    #{serviceSmallThreeIdentityCard, jdbcType=VARCHAR},
    #{serviceSmallThreeAchievementAmount, jdbcType=DECIMAL},
    #{serviceSmallThreeCommissionAmount, jdbcType=DECIMAL},
    #{serviceSmallThreeRatio, jdbcType=DECIMAL},
    #{share, jdbcType=INTEGER},
    #{isCancel, jdbcType=INTEGER},
    #{cancelDate, jdbcType=TIMESTAMP},
    #{remark, jdbcType=LONGVARCHAR},
    #{manageStaffId, jdbcType=BIGINT},
    #{manageStaffName, jdbcType=VARCHAR},
    #{manageIdentityCard, jdbcType=VARCHAR},
    #{manageNumber, jdbcType=VARCHAR},
    <if test="largeAchievementAmount != null">
      #{largeAchievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="zhonggongAchievementAmount != null">
      #{zhonggongAchievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="technicianAchievementAmount != null">
      #{technicianAchievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="smallAchievementAmount != null">
      #{smallAchievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="largeCommissionAmount != null">
      #{largeCommissionAmount, jdbcType=DECIMAL},
    </if>
    <if test="zhonggongCommissionAmount != null">
      #{zhonggongCommissionAmount, jdbcType=DECIMAL},
    </if>
    <if test="technicianCommissionAmount != null">
      #{technicianCommissionAmount, jdbcType=DECIMAL},
    </if>
    <if test="smallCommissionAmount != null">
      #{smallCommissionAmount, jdbcType=DECIMAL},
    </if>

    <if test="cardLargeAchievementAmount != null">
      #{cardLargeAchievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="cardZhonggongAchievementAmount != null">
      #{cardZhonggongAchievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="cardTechnicianAchievementAmount != null">
      #{cardTechnicianAchievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="cardSmallAchievementAmount != null">
      #{cardSmallAchievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="cardLargeCommissionAmount != null">
      #{cardLargeCommissionAmount, jdbcType=DECIMAL},
    </if>
    <if test="cardZhonggongCommissionAmount != null">
      #{cardZhonggongCommissionAmount, jdbcType=DECIMAL},
    </if>
    <if test="cardTechnicianCommissionAmount != null">
      #{cardTechnicianCommissionAmount, jdbcType=DECIMAL},
    </if>
    <if test="cardSmallCommissionAmount != null">
      #{cardSmallCommissionAmount, jdbcType=DECIMAL},
    </if>



    #{courseAccountId, jdbcType=BIGINT},
    #{inputId, jdbcType=BIGINT},
    #{inputBy, jdbcType=VARCHAR},
    #{cancelId, jdbcType=BIGINT},
    #{cancelBy, jdbcType=VARCHAR},
    #{additionDate, jdbcType=TIMESTAMP},
    #{isAddition,jdbcType = INTEGER},
    #{ageGroup, jdbcType=VARCHAR},
    #{job, jdbcType=VARCHAR},
    #{sex, jdbcType=VARCHAR},
    #{collectionAmount,jdbcType = DECIMAL},
    #{noDiscount,jdbcType = INTEGER},
    #{man,jdbcType = INTEGER},
    #{woman,jdbcType = INTEGER},
    #{projectNum,jdbcType = VARCHAR},
    #{paymentAmount,jdbcType = DECIMAL},
    <if test="manNumber != null">
      #{manNumber, jdbcType=VARCHAR},
    </if>
    <if test="womanNumber != null">
      #{womanNumber, jdbcType=VARCHAR},
    </if>
    #{courseMoney,jdbcType = DECIMAL}

    )
  </insert>


  <update id="cancel" parameterType="com.ssm.manage.entity.CashList">
    update cash_list_${tab}
    <set>
      <if test="isCancel != null">
        is_cancel = #{isCancel, jdbcType = INTEGER},
      </if>
      <if test="cancelDate != null">
        cancel_date = #{cancelDate, jdbcType=TIMESTAMP},
      </if>
      <if test="cancelId != null">
        cancel_id = #{cancelId, jdbcType = BIGINT},
      </if>
      <if test="cancelBy != null">
        cancel_by = #{cancelBy, jdbcType = VARCHAR},
      </if>
      <if test="largeAchievementAmount != null">
        large_achievement_amount = #{largeAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="zhonggongAchievementAmount != null">
        zhonggong_achievement_amount = #{zhonggongAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="technicianAchievementAmount != null">
        technician_achievement_amount = #{technicianAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="smallAchievementAmount != null">
        small_achievement_amount = #{smallAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="largeCommissionAmount != null">
        large_commission_amount = #{largeCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="zhonggongCommissionAmount != null">
        zhonggong_commission_amount = #{zhonggongCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="technicianCommissionAmount != null">
        technician_commission_amount = #{technicianCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="smallCommissionAmount != null">
        small_commission_amount = #{smallCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardLargeAchievementAmount != null">
        card_large_achievement_amount = #{cardLargeAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardZhonggongAchievementAmount != null">
        card_zhonggong_achievement_amount = #{cardZhonggongAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardTechnicianAchievementAmount != null">
        card_technician_achievement_amount = #{cardTechnicianAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardSmallAchievementAmount != null">
        card_small_achievement_amount = #{cardSmallAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardLargeCommissionAmount != null">
        card_large_commission_amount = #{cardLargeCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardZhonggongCommissionAmount != null">
        card_zhonggong_commission_amount = #{cardZhonggongCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardTechnicianCommissionAmount != null">
        card_technician_commission_amount = #{cardTechnicianCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardSmallCommissionAmount != null">
        card_small_commission_amount = #{cardSmallCommissionAmount, jdbcType = DECIMAL},
      </if>

    </set>
    <where>
      id = #{id, jdbcType = BIGINT} and is_cancel != 1
    </where>
  </update>

  <update id="doCash" parameterType="com.ssm.manage.entity.CashList">
    update cash_list_${tab}
    <set>
      <if test="amount != null">
        amount = #{amount, jdbcType = DECIMAL},
      </if>
      <if test="inputId != null">
        input_id = #{inputId, jdbcType = BIGINT},
      </if>
      <if test="inputBy != null">
        input_by = #{inputBy, jdbcType = VARCHAR},
      </if>
      <if test="collectionCashAmount != null">
        collection_cash_amount = #{collectionCashAmount, jdbcType = DECIMAL},
      </if>
      <if test="collectionRechargeAmount != null">
        collection_recharge_amount = #{collectionRechargeAmount, jdbcType = DECIMAL},
      </if>
      <if test="collectionIntegralAmount != null">
        collection_integral_amount = #{collectionIntegralAmount, jdbcType = DECIMAL},
      </if>
      <if test="integral != null">
        integral = #{integral, jdbcType = INTEGER},
      </if>
      <if test="giveIntegral != null">
        give_integral = #{giveIntegral, jdbcType = INTEGER},
      </if>
      <if test="collectionGiftAmount != null">
        collection_gift_amount = #{collectionGiftAmount, jdbcType = DECIMAL},
      </if>
      <if test="cashAmount != null">
        cash_amount = #{cashAmount, jdbcType = DECIMAL},
      </if>
      <if test="largeOneNumber != null">
        large_one_number = #{largeOneNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeOneStaffId != null">
        service_large_one_staff_id = #{serviceLargeOneStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceLargeOneStaffName != null">
        service_large_one_staff_name = #{serviceLargeOneStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeOneIdentityCard != null">
        service_large_one_identity_card = #{serviceLargeOneIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeOneAchievementAmount != null">
        service_large_one_achievement_amount = #{serviceLargeOneAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeOneCommissionAmount != null">
        service_large_one_commission_amount = #{serviceLargeOneCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeOneRatio != null">
        service_large_one_ratio = #{serviceLargeOneRatio, jdbcType = DECIMAL},
      </if>
      <if test="largeTwoNumber != null">
        large_two_number = #{largeTwoNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeTwoStaffId != null">
        service_large_two_staff_id = #{serviceLargeTwoStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceLargeTwoStaffName != null">
        service_large_two_staff_name = #{serviceLargeTwoStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeTwoIdentityCard != null">
        service_large_two_identity_card = #{serviceLargeTwoIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeTwoAchievementAmount != null">
        service_large_two_achievement_amount = #{serviceLargeTwoAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeTwoCommissionAmount != null">
        service_large_two_commission_amount = #{serviceLargeTwoCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeTwoRatio != null">
        service_large_two_ratio = #{serviceLargeTwoRatio, jdbcType = DECIMAL},
      </if>
      <if test="largeThreeNumber != null">
        large_three_number = #{largeThreeNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeThreeStaffId != null">
        service_large_three_staff_id = #{serviceLargeThreeStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceLargeThreeStaffName != null">
        service_large_three_staff_name = #{serviceLargeThreeStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeThreeIdentityCard != null">
        service_large_three_identity_card = #{serviceLargeThreeIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeThreeAchievementAmount != null">
        service_large_three_achievement_amount = #{serviceLargeThreeAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeThreeCommissionAmount != null">
        service_large_three_commission_amount = #{serviceLargeThreeCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeThreeRatio != null">
        service_large_three_ratio = #{serviceLargeThreeRatio, jdbcType = DECIMAL},
      </if>


      <if test="largeFourNumber != null">
        large_four_number = #{largeFourNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeFourStaffId != null">
        service_large_four_staff_id = #{serviceLargeFourStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceLargeFourStaffName != null">
        service_large_four_staff_name = #{serviceLargeFourStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeFourIdentityCard != null">
        service_large_four_identity_card = #{serviceLargeFourIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeFourAchievementAmount != null">
        service_large_four_achievement_amount = #{serviceLargeFourAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeFourCommissionAmount != null">
        service_large_four_commission_amount = #{serviceLargeFourCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeFourRatio != null">
        service_large_four_ratio = #{serviceLargeFourRatio, jdbcType = DECIMAL},
      </if>

      <if test="largeFiveNumber != null">
        large_five_number = #{largeFiveNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeFiveStaffId != null">
        service_large_five_staff_id = #{serviceLargeFiveStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceLargeFiveStaffName != null">
        service_large_five_staff_name = #{serviceLargeFiveStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeFiveIdentityCard != null">
        service_large_five_identity_card = #{serviceLargeFiveIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceLargeFiveAchievementAmount != null">
        service_large_five_achievement_amount = #{serviceLargeFiveAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeFiveCommissionAmount != null">
        service_large_five_commission_amount = #{serviceLargeFiveCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceLargeFiveRatio != null">
        service_large_five_ratio = #{serviceLargeFiveRatio, jdbcType = DECIMAL},
      </if>

      <if test="zhonggongOneNumber != null">
        zhonggong_one_number = #{zhonggongOneNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongOneStaffId != null">
        service_zhonggong_one_staff_id = #{serviceZhonggongOneStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceZhonggongOneStaffName != null">
        service_zhonggong_one_staff_name = #{serviceZhonggongOneStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongOneIdentityCard != null">
        service_zhonggong_one_identity_card = #{serviceZhonggongOneIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongOneAchievementAmount != null">
        service_zhonggong_one_achievement_amount = #{serviceZhonggongOneAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongOneCommissionAmount != null">
        service_zhonggong_one_commission_amount = #{serviceZhonggongOneCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongOneRatio != null">
        service_zhonggong_one_ratio = #{serviceZhonggongOneRatio, jdbcType = DECIMAL},
      </if>
      <if test="zhonggongTwoNumber != null">
        zhonggong_two_number = #{zhonggongTwoNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongTwoStaffId != null">
        service_zhonggong_two_staff_id = #{serviceZhonggongTwoStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceZhonggongTwoStaffName != null">
        service_zhonggong_two_staff_name = #{serviceZhonggongTwoStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongTwoIdentityCard != null">
        service_zhonggong_two_identity_card = #{serviceZhonggongTwoIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongTwoAchievementAmount != null">
        service_zhonggong_two_achievement_amount = #{serviceZhonggongTwoAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongTwoCommissionAmount != null">
        service_zhonggong_two_commission_amount = #{serviceZhonggongTwoCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongTwoRatio != null">
        service_zhonggong_two_ratio = #{serviceZhonggongTwoRatio, jdbcType = DECIMAL},
      </if>
      <if test="zhonggongThreeNumber != null">
        zhonggong_three_number = #{zhonggongThreeNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongThreeStaffId != null">
        service_zhonggong_three_staff_id = #{serviceZhonggongThreeStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceZhonggongThreeStaffName != null">
        service_zhonggong_three_staff_name = #{serviceZhonggongThreeStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongThreeIdentityCard != null">
        service_zhonggong_three_identity_card = #{serviceZhonggongThreeIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongThreeAchievementAmount != null">
        service_zhonggong_three_achievement_amount = #{serviceZhonggongThreeAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongThreeCommissionAmount != null">
        service_zhonggong_three_commission_amount = #{serviceZhonggongThreeCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongThreeRatio != null">
        service_zhonggong_three_ratio = #{serviceZhonggongThreeRatio, jdbcType = DECIMAL},
      </if>

      <if test="zhonggongFourNumber != null">
        zhonggong_four_number = #{zhonggongFourNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongFourStaffId != null">
        service_zhonggong_four_staff_id = #{serviceZhonggongFourStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceZhonggongFourStaffName != null">
        service_zhonggong_four_staff_name = #{serviceZhonggongFourStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongFourIdentityCard != null">
        service_zhonggong_four_identity_card = #{serviceZhonggongFourIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongFourAchievementAmount != null">
        service_zhonggong_four_achievement_amount = #{serviceZhonggongFourAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongFourCommissionAmount != null">
        service_zhonggong_four_commission_amount = #{serviceZhonggongFourCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongFourRatio != null">
        service_zhonggong_four_ratio = #{serviceZhonggongFourRatio, jdbcType = DECIMAL},
      </if>

      <if test="zhonggongFiveNumber != null">
        zhonggong_five_number = #{zhonggongFiveNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongFiveStaffId != null">
        service_zhonggong_five_staff_id = #{serviceZhonggongFiveStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceZhonggongFiveStaffName != null">
        service_zhonggong_five_staff_name = #{serviceZhonggongFiveStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongFiveIdentityCard != null">
        service_zhonggong_five_identity_card = #{serviceZhonggongFiveIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceZhonggongFiveAchievementAmount != null">
        service_zhonggong_five_achievement_amount = #{serviceZhonggongFiveAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongFiveCommissionAmount != null">
        service_zhonggong_five_commission_amount = #{serviceZhonggongFiveCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceZhonggongFiveRatio != null">
        service_zhonggong_five_ratio = #{serviceZhonggongFiveRatio, jdbcType = DECIMAL},
      </if>

      <if test="technicianOneNumber != null">
        technician_one_number = #{technicianOneNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceTechnicianOneStaffId != null">
        service_technician_one_staff_id = #{serviceTechnicianOneStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceTechnicianOneStaffName != null">
        service_technician_one_staff_name = #{serviceTechnicianOneStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceTechnicianOneIdentityCard != null">
        service_technician_one_identity_card = #{serviceTechnicianOneIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceTechnicianOneAchievementAmount != null">
        service_technician_one_achievement_amount = #{serviceTechnicianOneAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceTechnicianOneCommissionAmount != null">
        service_technician_one_commission_amount = #{serviceTechnicianOneCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceTechnicianOneRatio != null">
        service_technician_one_ratio = #{serviceTechnicianOneRatio, jdbcType = DECIMAL},
      </if>
      <if test="technicianTwoNumber != null">
        technician_two_number = #{technicianTwoNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceTechnicianTwoStaffId != null">
        service_technician_two_staff_id = #{serviceTechnicianTwoStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceTechnicianTwoStaffName != null">
        service_technician_two_staff_name = #{serviceTechnicianTwoStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceTechnicianTwoIdentityCard != null">
        service_technician_two_identity_card = #{serviceTechnicianTwoIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceTechnicianTwoAchievementAmount != null">
        service_technician_two_achievement_amount = #{serviceTechnicianTwoAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceTechnicianTwoCommissionAmount != null">
        service_technician_two_commission_amount = #{serviceTechnicianTwoCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceTechnicianTwoRatio != null">
        service_technician_two_ratio = #{serviceTechnicianTwoRatio, jdbcType = DECIMAL},
      </if>
      <if test="technicianThreeNumber != null">
        technician_three_number = #{technicianThreeNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceTechnicianThreeStaffId != null">
        service_technician_three_staff_id = #{serviceTechnicianThreeStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceTechnicianThreeStaffName != null">
        service_technician_three_staff_name = #{serviceTechnicianThreeStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceTechnicianThreeIdentityCard != null">
        service_technician_three_identity_card = #{serviceTechnicianThreeIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceTechnicianThreeAchievementAmount != null">
        service_technician_three_achievement_amount = #{serviceTechnicianThreeAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceTechnicianThreeCommissionAmount != null">
        service_technician_three_commission_amount = #{serviceTechnicianThreeCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceTechnicianThreeRatio != null">
        service_technician_three_ratio = #{serviceTechnicianThreeRatio, jdbcType = DECIMAL},
      </if>

      <if test="smallOneNumber != null">
        small_one_number = #{smallOneNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceSmallOneStaffId != null">
        service_small_one_staff_id = #{serviceSmallOneStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceSmallOneStaffName != null">
        service_small_one_staff_name = #{serviceSmallOneStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceSmallOneIdentityCard != null">
        service_small_one_identity_card = #{serviceSmallOneIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceSmallOneAchievementAmount != null">
        service_small_one_achievement_amount = #{serviceSmallOneAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceSmallOneCommissionAmount != null">
        service_small_one_commission_amount = #{serviceSmallOneCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceSmallOneRatio != null">
        service_small_one_ratio = #{serviceSmallOneRatio, jdbcType = DECIMAL},
      </if>
      <if test="smallTwoNumber != null">
        small_two_number = #{smallTwoNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceSmallTwoStaffId != null">
        service_small_two_staff_id = #{serviceSmallTwoStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceSmallTwoStaffName != null">
        service_small_two_staff_name = #{serviceSmallTwoStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceSmallTwoIdentityCard != null">
        service_small_two_identity_card = #{serviceSmallTwoIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceSmallTwoAchievementAmount != null">
        service_small_two_achievement_amount = #{serviceSmallTwoAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceSmallTwoCommissionAmount != null">
        service_small_two_commission_amount = #{serviceSmallTwoCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceSmallTwoRatio != null">
        service_small_two_ratio = #{serviceSmallTwoRatio, jdbcType = DECIMAL},
      </if>
      <if test="smallThreeNumber != null">
        small_three_number = #{smallThreeNumber, jdbcType = VARCHAR},
      </if>
      <if test="serviceSmallThreeStaffId != null">
        service_small_three_staff_id = #{serviceSmallThreeStaffId, jdbcType = BIGINT},
      </if>
      <if test="serviceSmallThreeStaffName != null">
        service_small_three_staff_name = #{serviceSmallThreeStaffName, jdbcType = VARCHAR},
      </if>
      <if test="serviceSmallThreeIdentityCard != null">
        service_small_three_identity_card = #{serviceSmallThreeIdentityCard, jdbcType = VARCHAR},
      </if>
      <if test="serviceSmallThreeAchievementAmount != null">
        service_small_three_achievement_amount = #{serviceSmallThreeAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceSmallThreeCommissionAmount != null">
        service_small_three_commission_amount = #{serviceSmallThreeCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="serviceSmallThreeRatio != null">
        service_small_three_ratio = #{serviceSmallThreeRatio, jdbcType = DECIMAL},
      </if>
      <if test="isCancel != null">
        is_cancel = #{isCancel, jdbcType = INTEGER},
      </if>
      <if test="largeAchievementAmount != null">
        large_achievement_amount = #{largeAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="zhonggongAchievementAmount != null">
        zhonggong_achievement_amount = #{zhonggongAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="technicianAchievementAmount != null">
        technician_achievement_amount = #{technicianAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="smallAchievementAmount != null">
        small_achievement_amount = #{smallAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="largeCommissionAmount != null">
        large_commission_amount = #{largeCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="zhonggongCommissionAmount != null">
        zhonggong_commission_amount = #{zhonggongCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="technicianCommissionAmount != null">
        technician_commission_amount = #{technicianCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="smallCommissionAmount != null">
        small_commission_amount = #{smallCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardLargeAchievementAmount != null">
        card_large_achievement_amount = #{cardLargeAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardZhonggongAchievementAmount != null">
        card_zhonggong_achievement_amount = #{cardZhonggongAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardTechnicianAchievementAmount != null">
        card_technician_achievement_amount = #{cardTechnicianAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardSmallAchievementAmount != null">
        card_small_achievement_amount = #{cardSmallAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardLargeCommissionAmount != null">
        card_large_commission_amount = #{cardLargeCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardZhonggongCommissionAmount != null">
        card_zhonggong_commission_amount = #{cardZhonggongCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardTechnicianCommissionAmount != null">
        card_technician_commission_amount = #{cardTechnicianCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardSmallCommissionAmount != null">
        card_small_commission_amount = #{cardSmallCommissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="courseAccountId != null">
        course_account_id = #{courseAccountId, jdbcType = DECIMAL},
      </if>
      <if test="noDiscount != null">
        no_discount = #{noDiscount, jdbcType =  INTEGER},
      </if>
      <if test="man != null">
        man = #{man, jdbcType =  INTEGER},
      </if>
      <if test="woman != null">
        woman = #{woman, jdbcType =  INTEGER},
      </if>
      <if test="projectNum != null">
        project_num = #{projectNum, jdbcType =  VARCHAR},
      </if>


    </set>
    <where>
      id = #{id, jdbcType = BIGINT}
    </where>
  </update>

  <select id="one" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from cash_list_${tab} a
    where a.id = #{id, jdbcType = BIGINT}
  </select>

  <update id="updateStaff" parameterType="com.ssm.manage.entity.CashList">
    update cash_list_${tab}
    <set>

      age_group = #{ageGroup, jdbcType = VARCHAR},
      job = #{job, jdbcType = VARCHAR},
      sex = #{sex, jdbcType = VARCHAR},
      <!--&lt;if test="largeOneNumber != null"&gt;-->
        large_one_number = #{largeOneNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeOneStaffId != null"&amp;amp;gt;-->
        service_large_one_staff_id = #{serviceLargeOneStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeOneStaffName != null"&amp;amp;gt;-->
        service_large_one_staff_name = #{serviceLargeOneStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeOneIdentityCard != null"&amp;amp;gt;-->
        service_large_one_identity_card = #{serviceLargeOneIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeOneRatio != null"&amp;amp;gt;-->
        service_large_one_ratio = #{serviceLargeOneRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="largeTwoNumber != null"&amp;amp;gt;-->
        large_two_number = #{largeTwoNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeTwoStaffId != null"&amp;amp;gt;-->
        service_large_two_staff_id = #{serviceLargeTwoStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeTwoStaffName != null"&amp;amp;gt;-->
        service_large_two_staff_name = #{serviceLargeTwoStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeTwoIdentityCard != null"&amp;amp;gt;-->
        service_large_two_identity_card = #{serviceLargeTwoIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeTwoRatio != null"&amp;amp;gt;-->
        service_large_two_ratio = #{serviceLargeTwoRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="largeThreeNumber != null"&amp;amp;gt;-->
        large_three_number = #{largeThreeNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeThreeStaffId != null"&amp;amp;gt;-->
        service_large_three_staff_id = #{serviceLargeThreeStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeThreeStaffName != null"&amp;amp;gt;-->
        service_large_three_staff_name = #{serviceLargeThreeStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeThreeIdentityCard != null"&amp;amp;gt;-->
        service_large_three_identity_card = #{serviceLargeThreeIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeThreeRatio != null"&amp;amp;gt;-->
        service_large_three_ratio = #{serviceLargeThreeRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;

            <!-&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="largeThreeNumber != null"&amp;amp;gt;-->
      large_four_number = #{largeFourNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeFourStaffId != null"&amp;amp;gt;-->
      service_large_four_staff_id = #{serviceLargeFourStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeFourStaffName != null"&amp;amp;gt;-->
      service_large_four_staff_name = #{serviceLargeFourStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeFourIdentityCard != null"&amp;amp;gt;-->
      service_large_four_identity_card = #{serviceLargeFourIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeFourRatio != null"&amp;amp;gt;-->
      service_large_four_ratio = #{serviceLargeFourRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;

            <!-&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="largeFiveNumber != null"&amp;amp;gt;-->
      large_five_number = #{largeFiveNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeFiveStaffId != null"&amp;amp;gt;-->
      service_large_five_staff_id = #{serviceLargeFiveStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeFiveStaffName != null"&amp;amp;gt;-->
      service_large_five_staff_name = #{serviceLargeFiveStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeFiveIdentityCard != null"&amp;amp;gt;-->
      service_large_five_identity_card = #{serviceLargeFiveIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceLargeFiveRatio != null"&amp;amp;gt;-->
      service_large_five_ratio = #{serviceLargeFiveRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;

      &amp;amp;lt;if test="zhonggongOneNumber != null"&amp;amp;gt;-->
        zhonggong_one_number = #{zhonggongOneNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongOneStaffId != null"&amp;amp;gt;-->
        service_zhonggong_one_staff_id = #{serviceZhonggongOneStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongOneStaffName != null"&amp;amp;gt;-->
        service_zhonggong_one_staff_name = #{serviceZhonggongOneStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongOneIdentityCard != null"&amp;amp;gt;-->
        service_zhonggong_one_identity_card = #{serviceZhonggongOneIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongOneRatio != null"&amp;amp;gt;-->
        service_zhonggong_one_ratio = #{serviceZhonggongOneRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="zhonggongTwoNumber != null"&amp;amp;gt;-->
        zhonggong_two_number = #{zhonggongTwoNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongTwoStaffId != null"&amp;amp;gt;-->
        service_zhonggong_two_staff_id = #{serviceZhonggongTwoStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongTwoStaffName != null"&amp;amp;gt;-->
        service_zhonggong_two_staff_name = #{serviceZhonggongTwoStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongTwoIdentityCard != null"&amp;amp;gt;-->
        service_zhonggong_two_identity_card = #{serviceZhonggongTwoIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongTwoRatio != null"&amp;amp;gt;-->
        service_zhonggong_two_ratio = #{serviceZhonggongTwoRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="zhonggongThreeNumber != null"&amp;amp;gt;-->
        zhonggong_three_number = #{zhonggongThreeNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongThreeStaffId != null"&amp;amp;gt;-->
        service_zhonggong_three_staff_id = #{serviceZhonggongThreeStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongThreeStaffName != null"&amp;amp;gt;-->
        service_zhonggong_three_staff_name = #{serviceZhonggongThreeStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongThreeIdentityCard != null"&amp;amp;gt;-->
        service_zhonggong_three_identity_card = #{serviceZhonggongThreeIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongThreeRatio != null"&amp;amp;gt;-->
        service_zhonggong_three_ratio = #{serviceZhonggongThreeRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;

       <!-&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="zhonggongThreeNumber != null"&amp;amp;gt;-->
      zhonggong_four_number = #{zhonggongFourNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongFourStaffId != null"&amp;amp;gt;-->
      service_zhonggong_four_staff_id = #{serviceZhonggongFourStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongFourStaffName != null"&amp;amp;gt;-->
      service_zhonggong_four_staff_name = #{serviceZhonggongFourStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongFourIdentityCard != null"&amp;amp;gt;-->
      service_zhonggong_four_identity_card = #{serviceZhonggongFourIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongFourRatio != null"&amp;amp;gt;-->
      service_zhonggong_four_ratio = #{serviceZhonggongFourRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;


 <!-&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="zhonggongFiveNumber != null"&amp;amp;gt;-->
      zhonggong_five_number = #{zhonggongFiveNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongFiveStaffId != null"&amp;amp;gt;-->
      service_zhonggong_five_staff_id = #{serviceZhonggongFiveStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongFiveStaffName != null"&amp;amp;gt;-->
      service_zhonggong_five_staff_name = #{serviceZhonggongFiveStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongFiveIdentityCard != null"&amp;amp;gt;-->
      service_zhonggong_five_identity_card = #{serviceZhonggongFiveIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceZhonggongFiveRatio != null"&amp;amp;gt;-->
      service_zhonggong_five_ratio = #{serviceZhonggongFiveRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;


      &amp;amp;lt;if test="technicianOneNumber != null"&amp;amp;gt;-->
        technician_one_number = #{technicianOneNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianOneStaffId != null"&amp;amp;gt;-->
        service_technician_one_staff_id = #{serviceTechnicianOneStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianOneStaffName != null"&amp;amp;gt;-->
        service_technician_one_staff_name = #{serviceTechnicianOneStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianOneIdentityCard != null"&amp;amp;gt;-->
        service_technician_one_identity_card = #{serviceTechnicianOneIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianOneRatio != null"&amp;amp;gt;-->
        service_technician_one_ratio = #{serviceTechnicianOneRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="technicianTwoNumber != null"&amp;amp;gt;-->
        technician_two_number = #{technicianTwoNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianTwoStaffId != null"&amp;amp;gt;-->
        service_technician_two_staff_id = #{serviceTechnicianTwoStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianTwoStaffName != null"&amp;amp;gt;-->
        service_technician_two_staff_name = #{serviceTechnicianTwoStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianTwoIdentityCard != null"&amp;amp;gt;-->
        service_technician_two_identity_card = #{serviceTechnicianTwoIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianTwoRatio != null"&amp;amp;gt;-->
        service_technician_two_ratio = #{serviceTechnicianTwoRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="technicianThreeNumber != null"&amp;amp;gt;-->
        technician_three_number = #{technicianThreeNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianThreeStaffId != null"&amp;amp;gt;-->
        service_technician_three_staff_id = #{serviceTechnicianThreeStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianThreeStaffName != null"&amp;amp;gt;-->
        service_technician_three_staff_name = #{serviceTechnicianThreeStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianThreeIdentityCard != null"&amp;amp;gt;-->
        service_technician_three_identity_card = #{serviceTechnicianThreeIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceTechnicianThreeRatio != null"&amp;amp;gt;-->
        service_technician_three_ratio = #{serviceTechnicianThreeRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;

      &amp;amp;lt;if test="smallOneNumber != null"&amp;amp;gt;-->
        small_one_number = #{smallOneNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallOneStaffId != null"&amp;amp;gt;-->
        service_small_one_staff_id = #{serviceSmallOneStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallOneStaffName != null"&amp;amp;gt;-->
        service_small_one_staff_name = #{serviceSmallOneStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallOneIdentityCard != null"&amp;amp;gt;-->
        service_small_one_identity_card = #{serviceSmallOneIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallOneRatio != null"&amp;amp;gt;-->
        service_small_one_ratio = #{serviceSmallOneRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="smallTwoNumber != null"&amp;amp;gt;-->
        small_two_number = #{smallTwoNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallTwoStaffId != null"&amp;amp;gt;-->
        service_small_two_staff_id = #{serviceSmallTwoStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallTwoStaffName != null"&amp;amp;gt;-->
        service_small_two_staff_name = #{serviceSmallTwoStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallTwoIdentityCard != null"&amp;amp;gt;-->
        service_small_two_identity_card = #{serviceSmallTwoIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallTwoRatio != null"&amp;amp;gt;-->
        service_small_two_ratio = #{serviceSmallTwoRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="smallThreeNumber != null"&amp;amp;gt;-->
        small_three_number = #{smallThreeNumber, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallThreeStaffId != null"&amp;amp;gt;-->
        service_small_three_staff_id = #{serviceSmallThreeStaffId, jdbcType = BIGINT},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallThreeStaffName != null"&amp;amp;gt;-->
        service_small_three_staff_name = #{serviceSmallThreeStaffName, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallThreeIdentityCard != null"&amp;amp;gt;-->
        service_small_three_identity_card = #{serviceSmallThreeIdentityCard, jdbcType = VARCHAR},
      <!--&amp;amp;lt;/if&amp;amp;gt;
      &amp;amp;lt;if test="serviceSmallThreeRatio != null"&amp;amp;gt;-->
        service_small_three_ratio = #{serviceSmallThreeRatio, jdbcType = DECIMAL},
      <!--&amp;amp;lt;/if&amp;amp;gt;-->

      <if test="largeAchievementAmount != null">
      large_achievement_amount = #{largeAchievementAmount, jdbcType=DECIMAL},
      </if>
      <if test="zhonggongAchievementAmount != null">
      zhonggong_achievement_amount = #{zhonggongAchievementAmount, jdbcType=DECIMAL},
      </if>
      <if test="technicianAchievementAmount != null">
      technician_achievement_amount = #{technicianAchievementAmount, jdbcType=DECIMAL},
      </if>
      <if test="smallAchievementAmount != null">
      small_achievement_amount = #{smallAchievementAmount, jdbcType=DECIMAL},
      </if>
      <if test="largeCommissionAmount != null">
      large_commission_amount = #{largeCommissionAmount, jdbcType=DECIMAL},
      </if>
      <if test="zhonggongCommissionAmount != null">
      zhonggong_commission_amount = #{zhonggongCommissionAmount, jdbcType=DECIMAL},
      </if>
      <if test="technicianCommissionAmount != null">
      technician_commission_amount = #{technicianCommissionAmount, jdbcType=DECIMAL},
      </if>
      <if test="smallCommissionAmount != null">
      small_commission_amount = #{smallCommissionAmount, jdbcType=DECIMAL},
      </if>

      <if test="cardLargeAchievementAmount != null">
      card_large_achievement_amount = #{cardLargeAchievementAmount, jdbcType=DECIMAL},
      </if>
      <if test="cardZhonggongAchievementAmount != null">
      card_zhonggong_achievement_amount = #{cardZhonggongAchievementAmount, jdbcType=DECIMAL},
      </if>
      <if test="cardTechnicianAchievementAmount != null">
      card_technician_achievement_amount = #{cardTechnicianAchievementAmount, jdbcType=DECIMAL},
      </if>
      <if test="cardSmallAchievementAmount != null">
      card_small_achievement_amount = #{cardSmallAchievementAmount, jdbcType=DECIMAL},
      </if>
      <if test="cardLargeCommissionAmount != null">
      card_large_commission_amount = #{cardLargeCommissionAmount, jdbcType=DECIMAL},
      </if>
      <if test="cardZhonggongCommissionAmount != null">
      card_zhonggong_commission_amount = #{cardZhonggongCommissionAmount, jdbcType=DECIMAL},
      </if>
      <if test="cardTechnicianCommissionAmount != null">
      card_technician_commission_amount = #{cardTechnicianCommissionAmount, jdbcType=DECIMAL},
      </if>
      <if test="cardSmallCommissionAmount != null">
      card_small_commission_amount = #{cardSmallCommissionAmount, jdbcType=DECIMAL}
      </if>
    </set>
    <where>
      id = #{id, jdbcType = BIGINT}
    </where>
  </update>

  <update id="updateFeedback" parameterType="com.ssm.manage.entity.CashList">
    update cash_list_${tab}
    <set>

      <if test="isMemberFeedback != null">
        is_member_feedback = #{isMemberFeedback, jdbcType = INTEGER},
      </if>
      <if test="isStaffFeedback != null">
        is_staff_feedback = #{isStaffFeedback, jdbcType = INTEGER},
      </if>
    </set>
    <where>
      id = #{id, jdbcType = BIGINT}
    </where>
  </update>



  <select id="selectStaffProgress" parameterType="com.ssm.manage.extendEntity.StaffProgress" resultMap="StaffProgressMap">
    SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
	staff_id,
	staff_name,
is_staff_feedback,
is_cancel
FROM
	(
	SELECT
		id,
		cash_num,
		cash_date,
		member_id,
		member_name,
		member_identity_card,
		mobile_phone,
		store_id,
		store_name,
		project_id,
		project_name,
	CASE

			WHEN service_large_one_staff_id IS NOT NULL THEN
			service_large_one_staff_id
		END staff_id,
CASE

		WHEN service_large_one_staff_name IS NOT NULL THEN
		service_large_one_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab} UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_large_two_staff_id IS NOT NULL THEN
		service_large_two_staff_id
	END staff_id,
CASE

		WHEN service_large_two_staff_name IS NOT NULL THEN
		service_large_two_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab} UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_large_three_staff_id IS NOT NULL THEN
		service_large_three_staff_id
	END staff_id,
CASE

		WHEN service_large_three_staff_name IS NOT NULL THEN
		service_large_three_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}  UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_zhonggong_one_staff_id IS NOT NULL THEN
		service_zhonggong_one_staff_id
	END staff_id,
CASE

		WHEN service_zhonggong_one_staff_name IS NOT NULL THEN
		service_zhonggong_one_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}  UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_zhonggong_one_staff_id IS NOT NULL THEN
		service_zhonggong_two_staff_id
	END staff_id,
CASE

		WHEN service_zhonggong_two_staff_name IS NOT NULL THEN
		service_zhonggong_one_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}  UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_zhonggong_one_staff_id IS NOT NULL THEN
		service_zhonggong_one_staff_id
	END staff_id,
CASE

		WHEN service_zhonggong_three_staff_name IS NOT NULL THEN
		service_zhonggong_three_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}  UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_technician_one_staff_id IS NOT NULL THEN
		service_technician_one_staff_id
	END staff_id,
CASE

		WHEN service_technician_three_staff_name IS NOT NULL THEN
		service_technician_one_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}  UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_technician_one_staff_id IS NOT NULL THEN
		service_technician_two_staff_id
	END staff_id,
CASE

		WHEN service_large_three_staff_name IS NOT NULL THEN
		service_technician_two_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}  UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_technician_one_staff_id IS NOT NULL THEN
		service_technician_three_staff_id
	END staff_id,
CASE

		WHEN service_large_three_staff_name IS NOT NULL THEN
		service_technician_three_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}  UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_small_one_staff_id IS NOT NULL THEN
		service_small_one_staff_id
	END staff_id,
CASE

		WHEN service_small_one_staff_name IS NOT NULL THEN
		service_small_one_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}  UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_small_two_staff_id IS NOT NULL THEN
		service_small_two_staff_id
	END staff_id,
CASE

		WHEN service_large_two_staff_name IS NOT NULL THEN
		service_small_two_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}  UNION ALL
SELECT
	id,
	cash_num,
	cash_date,
	member_id,
	member_name,
	member_identity_card,
	mobile_phone,
	store_id,
	store_name,
	project_id,
	project_name,
CASE

		WHEN service_small_three_staff_id IS NOT NULL THEN
		service_small_three_staff_id
	END staff_id,
CASE

		WHEN service_large_three_staff_name IS NOT NULL THEN
		service_small_three_staff_name
	END staff_name,
is_staff_feedback,
    is_cancel
FROM
	cash_list_${tab}
	) a
	where   store_id = #{storeId,jdbcType = BIGINT}
    and is_cancel = 0
    and is_staff_feedback is null
    <if test="memberId != null">
      and member_id = #{memberId, jdbcType = BIGINT}
    </if>
    <if test="staffId != null">
      and staff_id = #{staffId, jdbcType = BIGINT}
    </if>

    <if test="cashNum != null">
      and cash_num like concat('%',concat( #{cashNum, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="memberName != null">
      and member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="mobilePhone != null">
      and mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
    </if>

    order by cash_num desc
  </select>
  <!--sum(woman_number+man_number) as cash_people_num,
  count(id) as cash_people_num,
  -->
  <select id="selectDayRecord" parameterType="com.ssm.manage.query.StoreDailyRequest" resultMap="StoreDailyMap">
    select store_id, store_name,
           sum(woman_number+man_number) as cash_people_num,
           sum(man) as man,
           sum(woman) as woman,
--             sum(man+woman) as cash_people_num,
--             sum(man_number) as man,
--             sum(woman_number) as woman,
           sum(transaction_price) as cash_money ,
           sum(collection_recharge_amount) as cashier_card_money,
           sum(collection_cash_amount) as cashier_cash_money,
           sum(course_money) as cashl_money  from cash_list_${tab}
    <where>
      <if test="storeId != null">
        and store_id = #{storeId, jdbcType = BIGINT}
      </if>
      <if test="storeIds != null">
      and store_id in
      <foreach close=")" collection="storeIds" index="index" item="item" open="(" separator=",">
        #{item,jdbcType=BIGINT}
      </foreach>
      </if>
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and cash_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
    group by store_id,store_name
  </select>

  <select id="selectDayRecordManAndWoman" parameterType="com.ssm.manage.query.StoreDailyRequest" resultMap="StoreDailyMap">
    select store_id, store_name,
    sum(woman_number) as cash_woman_num,
    sum(man_number) as cash_man_num,
    sum(man) as man,
    sum(woman) as woman,
    --             sum(man+woman) as cash_people_num,
    --             sum(man_number) as man,
    --             sum(woman_number) as woman,
    sum(transaction_price*number_times) as cash_money ,
    sum(collection_recharge_amount) as cashier_card_money,
    sum(collection_cash_amount) as cashier_cash_money,
    sum(course_money) as cashl_money  from cash_list_${tab}
    <where>
      <if test="storeId != null">
        and store_id = #{storeId, jdbcType = BIGINT}
      </if>
      <if test="storeIds != null">
        and store_id in
        <foreach close=")" collection="storeIds" index="index" item="item" open="(" separator=",">
          #{item,jdbcType=BIGINT}
        </foreach>
      </if>
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and cash_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
    group by store_id,store_name
  </select>


  <select id="selectDayRecord1" parameterType="com.ssm.manage.query.StoreDailyRequest" resultMap="StoreDailyMap">
    select cash_num as id,store_id, store_name from cash_list_${tab}
    <where>
      <if test="storeId != null">
        and store_id = #{storeId, jdbcType = BIGINT}
      </if>
      <if test="storeIds != null">
        and store_id in
        <foreach close=")" collection="storeIds" index="index" item="item" open="(" separator=",">
          #{item,jdbcType=BIGINT}
        </foreach>
      </if>
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and cash_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
  </select>

  <select id="selectByRecharge" parameterType="com.ssm.manage.query.AccountTradeRecordRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from cash_list_${tab} a, account_trade_record_${tab} b
    where
    a.id = b.doc_id
    and a.store_id = #{storeId,jdbcType = BIGINT}
    and b.account_id = #{accountId, jdbcType = BIGINT}
    order by doc_num desc
  </select>

  <select id="selectListSalem" parameterType="com.ssm.manage.query.AccountTradeRecordRequest" resultMap="BaseResultMap">
    select * from cash_list_${tab}
    <where>
      <if test="id != null">
        and id = #{id, jdbcType = INTEGER}
      </if>
      <if test="storeId != null">
        and store_id = #{storeId, jdbcType = BIGINT}
      </if>
      <if test="projectId != null">
        and project_id = #{projectId, jdbcType = BIGINT}
      </if>
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="cashNum != null">
        and cash_num like concat( #{cashNum, jdbcType = VARCHAR}, '%')
      </if>
      <if test="memberId != null">
        and member_id = #{memberId, jdbcType = BIGINT}
      </if>
    </where>
  </select>

  <select id="selectCashListGroup" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    SELECT
    a.cash_num as cash_num,max(a.cash_date) as cash_date,max(a.mobile_phone) as mobile_phone,max(a.member_name) as member_name,max(a.is_cancel) as is_cancel,max(a.cash_number) as cash_number,max(a.is_addition) as is_addition,COUNT(a.number_times) as number_times,max(a.input_by) as input_by,max(a.addition_date) as addition_date
    FROM
    (select
    <include refid="BaseColumnList"/> from cash_list_${tab} a
    <where>
    <if test="storeId != null">
      and a.store_id = #{storeId,jdbcType = BIGINT}
    </if>
    <if test="type != null and type == 0">
      and a.is_cancel is null
    </if>
    <if test="type != null and type == 1">
      and a.is_cancel is not null
    </if>
    <if test="memberId != null">
      and a.member_id = #{memberId, jdbcType = BIGINT}
    </if>
    <if test="isCancel != null">
      and a.is_cancel = #{isCancel, jdbcType = INTEGER}
    </if>
    <if test="cashNum != null">
      and a.cash_num like concat('%',concat( #{cashNum, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="memberName != null">
      and a.member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="mobilePhone != null">
      and a.mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
    </if>
    <if test="startTime != null and endTime != null">
      and a.cash_date between #{startTime, jdbcType = TIMESTAMP} and #{endTime, jdbcType = TIMESTAMP}
    </if>
    <if test="id != null">
      and a.id = #{id, jdbcType = BIGINT}
    </if>
    </where>
    ) a group by a.cash_num  order by a.cash_date desc
  </select>

  <select id="selectCashListGroups" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    SELECT
    a.*
    FROM
    (select
    <include refid="BaseColumnList"/> from cash_list_${tab} a
    <where>
      <if test="storeId != null">
        and a.store_id = #{storeId,jdbcType = BIGINT}
      </if>
      <if test="type != null and type == 0">
        and a.is_cancel is null
      </if>
      <if test="type != null and type == 1">
        and a.is_cancel is not null
      </if>
      <if test="memberId != null">
        and a.member_id = #{memberId, jdbcType = BIGINT}
      </if>
      <if test="isCancel != null">
        and a.is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="cashNum != null">
        and a.cash_num like concat('%',concat( #{cashNum, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="memberName != null">
        and a.member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="mobilePhone != null">
        and a.mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="startTime != null and endTime != null">
        and a.cash_date between #{startTime, jdbcType = TIMESTAMP} and #{endTime, jdbcType = TIMESTAMP}
      </if>
      <if test="id != null">
        and a.id = #{id, jdbcType = BIGINT}
      </if>
    </where>
    ) a group by a.cash_num  order by a.cash_date desc
  </select>

  <select id="selectCashListGroupNew" parameterType="com.ssm.manage.query.CashListRequest" resultMap="BaseResultMap">
    SELECT
    a.cash_num as cash_num,max(a.cash_date) as cash_date,max(a.mobile_phone) as mobile_phone,max(a.member_name) as member_name,max(a.is_cancel) as is_cancel,max(a.cash_number) as cash_number,max(a.is_addition) as is_addition,COUNT(a.number_times) as number_times,max(a.input_by) as input_by,max(a.addition_date) as addition_date,a.store_id as store_id,a.store_name as store_name,a.man as man,a.woman as woman,a.man_number,a.woman_number
    FROM
    (select
    <include refid="BaseColumnList"/> from cash_list_${tab} a
    <where>
      <if test="type != null and type == 0">
        and a.is_cancel is null
      </if>
      <if test="type != null and type == 1">
        and a.is_cancel is not null
      </if>
      <if test="memberId != null">
        and a.member_id = #{memberId, jdbcType = BIGINT}
      </if>
      <if test="isCancel != null">
        and a.is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="cashNum != null and cashNum.length() > 0">
        and a.cash_num like concat('%',concat( #{cashNum, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="memberName != null and memberName.length() > 0">
        and a.member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="mobilePhone != null and mobilePhone.length() > 0">
        and a.mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="startTime != null and endTime != null">
        and a.cash_date between #{startTime, jdbcType = TIMESTAMP} and #{endTime, jdbcType = TIMESTAMP}
      </if>
      <if test="id != null">
        and a.id = #{id, jdbcType = BIGINT}
      </if>
     <if test="courseAccountId != null">
       and a.course_account_id is not null
     </if>
     <if test="collectionRechargeAmount != null">
       and a.collection_recharge_amount - a.collection_gift_amount>0
     </if>
      <if test="collectionGiftAmount != null">
        and a.collection_gift_amount>0
      </if>
      <if test="storeList!= null and storeList.size() >0">
        and a.store_id  in
        <foreach collection="storeList" item="storeId" index="index" open="(" close=")" separator=",">
          #{storeId}
        </foreach>
      </if>
    </where>
    ) a group by a.cash_num,a.store_id,a.store_name  order by a.cash_date desc
  </select>

  <update id="updatechia" parameterType="com.ssm.manage.entity.CashList">
    update cash_list_${tab}
    <set>
      <if test="achievementLarge != null">
        achievement_large = #{achievementLarge, jdbcType = DECIMAL},
      </if>
      <if test="achievementZhonggong != null">
        achievement_zhonggong = #{achievementZhonggong, jdbcType = DECIMAL},
      </if>
      <if test="achievementTechnician != null">
        achievement_technician = #{achievementTechnician, jdbcType = DECIMAL},
      </if>
      <if test="achievementSmall != null">
        achievement_small = #{achievementSmall, jdbcType = DECIMAL},
      </if>
      <if test="commissionLarge != null">
        commission_large = #{commissionLarge, jdbcType = DECIMAL},
      </if>
      <if test="commissionZhonggong != null">
        commission_zhonggong = #{commissionZhonggong, jdbcType = DECIMAL},
      </if>
      <if test="commissionTechnician != null">
        commission_technician = #{commissionTechnician, jdbcType = DECIMAL},
      </if>
      <if test="commissionSmall != null">
        commission_small = #{commissionSmall, jdbcType = DECIMAL},
      </if>
      <if test="cardAchievementLarge != null">
          card_achievement_large = #{cardAchievementLarge, jdbcType = DECIMAL},
      </if>
      <if test="cardAchievementZhonggong != null">
        card_achievement_zhonggong = #{cardAchievementZhonggong, jdbcType = DECIMAL},
      </if>
      <if test="cardAchievementTechnician != null">
        card_achievement_technician = #{cardAchievementTechnician, jdbcType = DECIMAL},
      </if>
      <if test="cardAchievementSmall != null">
        card_achievement_small = #{cardAchievementSmall, jdbcType = DECIMAL},
      </if>
      <if test="cardCommissionLarge != null">
        card_commission_large = #{cardCommissionLarge, jdbcType = DECIMAL},
      </if>
      <if test="cardCommissionZhonggong != null">
        card_commission_zhonggong = #{cardCommissionZhonggong, jdbcType = DECIMAL},
      </if>
      <if test="cardCommissionTechnician != null">
        card_commission_technician = #{cardCommissionTechnician, jdbcType = DECIMAL},
      </if>
      <if test="cardCommissionSmall != null">
        card_commission_small = #{cardCommissionSmall, jdbcType = DECIMAL},
      </if>
    </set>
    <where>
      id = #{id, jdbcType = BIGINT}
    </where>
  </update>


  <select id="selectDayRecordRec" parameterType="com.ssm.manage.query.StoreDailyRequest" resultMap="StoreDailyMap">
    select sum(collection_recharge_amount) as recharge_money  from cash_list_${tab}
    <where>
      course_account_id is null
      <if test="storeId != null">
        and store_id = #{storeId, jdbcType = BIGINT}
      </if>
      <if test="storeIds != null">
        and store_id in
        <foreach close=")" collection="storeIds" index="index" item="item" open="(" separator=",">
          #{item,jdbcType=BIGINT}
        </foreach>
      </if>
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and cash_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
    group by store_id,store_name
  </select>

  <select id="selectDayRecordCou" parameterType="com.ssm.manage.query.StoreDailyRequest" resultMap="StoreDailyMap">
    select sum(transaction_price) as recharge_money  from cash_list_${tab}
    <where>
      course_account_id is not null
      <if test="storeId != null">
        and store_id = #{storeId, jdbcType = BIGINT}
      </if>
      <if test="storeIds != null">
        and store_id in
        <foreach close=")" collection="storeIds" index="index" item="item" open="(" separator=",">
          #{item,jdbcType=BIGINT}
        </foreach>
      </if>
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and cash_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
    group by store_id,store_name
  </select>
    <select id="getAllCashList" resultType="com.ssm.manage.entity.CashList">
      SELECT * FROM cash_list_${tab}
      WHERE
        cash_date BETWEEN #{startTime} AND #{endTime}
        AND is_cancel = 0
        AND store_id =  #{storeId};
    </select>
    <select id="selectByDay"  resultMap="selectByDay">
      select store_id,date,sum(ifnull(collection_cash_amount,0)) as collection_cash_amount,sum(ifnull(collection_recharge_amount,0)) as collection_recharge_amount,
          sum(ifnull(course_money,0))as course_money,
        count(*) as cash_rows,sum(ifnull(man_number,0)) as man_number,sum(ifnull(woman_number,0)) as woman_number
      from(select store_id,date(cash_date) as date,cash_num,sum(ifnull(collection_cash_amount,0)) as collection_cash_amount,
          sum(ifnull(collection_recharge_amount,0)) as collection_recharge_amount,sum(ifnull(course_money,0))as course_money,sum(ifnull(man_number,0)) as man_number,
          sum(ifnull(woman_number,0)) as woman_number  from cash_list_${tab} where is_cancel = '0'
         and store_id in
      <foreach collection="storeIds" item="item" separator="," open="(" close=")" >
        #{item}
      </foreach>
      and cash_date between #{startTime} and #{endTime}
      group by store_id,date(cash_date),cash_num) cash group by store_id,date;
    </select>
  <select id="selectAbnormalOrder" resultMap="BaseResultMap">
    select * from cash_list_${tab} where ((ifnull(achievement_large,0) != 0 or ifnull(commission_large,0) != 0 or ifnull(card_achievement_large,0) != 0 or ifnull(card_commission_large,0) != 0) and ifnull(large_one_number,'0')='0') or
    ((ifnull(achievement_zhonggong,0) != 0 or ifnull(commission_zhonggong,0) != 0 or ifnull(card_achievement_zhonggong,0) != 0 or ifnull(card_commission_zhonggong,0) != 0) and ifnull(zhonggong_one_number,'0') = '0') or
    ((ifnull(achievement_technician,0) != 0 or ifnull(commission_technician,0) != 0 or ifnull(card_achievement_technician,0) != 0 or ifnull(card_commission_technician,0) != 0) and ifnull(technician_one_number,'0')='0') or
    ((ifnull(achievement_small,0) != 0 or ifnull(commission_small,0) != 0 or ifnull(card_achievement_small,0) != 0 or ifnull(card_commission_small,0) != 0) and ifnull(small_one_number,'0'))
  </select>
  <select id="selectByDayGroupByDateAndStoreId"  parameterType="com.ssm.manage.query.StoreDailyRequest" resultMap="StoreDailyMap">
    SELECT
      SUBSTRING( cash_date, 1, 10 ) AS date,
	store_id,
	store_name,
	sum( woman_number + man_number ) AS cash_people_num,
	sum( man ) AS man,
	sum( woman ) AS woman,
	sum( transaction_price ) AS cash_money,
	sum( collection_recharge_amount ) AS cashier_card_money,
	sum( collection_cash_amount ) AS cashier_cash_money,
	sum( course_money ) AS cashl_money
    FROM
      cash_list_${tab}
    where
      is_cancel = 0 and
        cash_date between #{startDate} and #{endDate}
    GROUP BY
      SUBSTRING( cash_date, 1, 10 ),
      store_id
  </select>
  <select id="selectListByMonthly" parameterType="com.ssm.manage.query.CashListRequest"  resultMap="BaseResultMap">
    select * from cash_list_${tab} where store_id in
                                   <foreach collection="storeIds" item="item" separator="," close=")" open="(">
                                     #{item}
                                   </foreach>
  </select>
  <select id="selectDayRecordCouByDate" parameterType="com.ssm.manage.query.StoreDailyRequest" resultMap="StoreDailyMap">
    select sum(transaction_price) as recharge_money  from cash_list_${tab}
    <where>
      course_account_id is not null
      <if test="storeId != null">
        and store_id = #{storeId, jdbcType = BIGINT}
      </if>
      <if test="storeIds != null">
        and store_id in
        <foreach close=")" collection="storeIds" index="index" item="item" open="(" separator=",">
          #{item,jdbcType=BIGINT}
        </foreach>
      </if>
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="startTime != null">
        and cash_date between #{startTime} and #{endTime}
      </if>
    </where>
    group by store_id,store_name
  </select>
  <select id="selectDayRecordRecByDate"  parameterType="com.ssm.manage.query.StoreDailyRequest" resultMap="StoreDailyMap">
    select sum(collection_recharge_amount-ifnull(collection_gift_amount,0)) as recharge_money,sum(ifnull(collection_gift_amount,0)) as recharge_gif_money from cash_list_${tab}
    <where>
      course_account_id is null
      <if test="storeId != null">
        and store_id = #{storeId, jdbcType = BIGINT}
      </if>
      <if test="storeIds != null">
        and store_id in
        <foreach close=")" collection="storeIds" index="index" item="item" open="(" separator=",">
          #{item,jdbcType=BIGINT}
        </foreach>
      </if>
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and cash_date between #{startTime} and #{endTime}
      </if>
    </where>
    group by store_id,store_name
  </select>
  <select id="selectFKJByRefundCashGifMoney" resultType="java.math.BigDecimal" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select sum(ifnull(collection_gift_amount,0)) from cash_list_${tab}
    where id in <foreach collection="cashIds" item="item" separator="," close=")" open="(">
    #{item}
  </foreach>
  </select>
  <resultMap id="selectByDay" type="com.ssm.manage.response.CashDayVo">
    <result column="store_id" property="storeId"/>
    <result column="date" property="date"/>
    <result column="collection_cash_amount" property="collectionCashAmount"/>
    <result column="collection_recharge_amount" property="collectionRechargeAmount"/>
    <result column="course_money" property="courseMoney"/>
    <result column="cash_rows" property="cashRows"/>
    <result column="man_number" property="manNumber"/>
    <result column="woman_number" property="womanNumber"/>
  </resultMap>
</mapper>