Commit 6e8e4a9f by wenyang

发佣检核时,增加年度的判断

parent 62eb4889
...@@ -112,7 +112,9 @@ ...@@ -112,7 +112,9 @@
<if test="item.commissionPayoutYearmonth != null"> <if test="item.commissionPayoutYearmonth != null">
and (c.check_yearmonth = #{item.commissionPayoutYearmonth,jdbcType=VARCHAR} 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) 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 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)))) 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(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)))) -->
</if> </if>
<if test="item.predictMonthPeriod != null"> <if test="item.predictMonthPeriod != null">
and DATE_FORMAT(t.predict_month_period, '%Y-%m') = #{item.predictMonthPeriod,jdbcType=VARCHAR} and DATE_FORMAT(t.predict_month_period, '%Y-%m') = #{item.predictMonthPeriod,jdbcType=VARCHAR}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment