and (c.check_yearmonth = #{item.commissionPayoutYearmonth,jdbcType=VARCHAR}
or (t.drop_option_code in(select distinct t.commission_type FROM ag_settlement_rule_base t where t.calculation_method='3' and t.is_active=1)
and SUBSTR(c.check_yearmonth,1,4) = SUBSTR(#{item.commissionPayoutYearmonth,jdbcType=VARCHAR},1,4)
and QUARTER(STR_TO_DATE(CONCAT(c.check_yearmonth,'-01'), "%Y-%m-%d"))=QUARTER(STR_TO_DATE(CONCAT(#{item.commissionPayoutYearmonth,jdbcType=VARCHAR},'-01'), "%Y-%m-%d")))
and QUARTER(STR_TO_DATE(CONCAT(c.check_yearmonth,'-01'), "%Y-%m-%d"))=QUARTER(STR_TO_DATE(CONCAT(#{item.commissionPayoutYearmonth,jdbcType=VARCHAR},'-01'), "%Y-%m-%d"))))
<!-- and QUARTER(DATE_SUB(STR_TO_DATE(CONCAT(c.check_yearmonth,'-01'), "%Y-%m-%d"),INTERVAL 1 MONTH))=QUARTER(DATE_SUB(STR_TO_DATE(CONCAT(#{item.commissionPayoutYearmonth,jdbcType=VARCHAR},'-01'), "%Y-%m-%d"),INTERVAL 1 MONTH)))) -->