Commit 53892bdd by jianan

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

parent 251bf4d9
...@@ -111,10 +111,11 @@ ...@@ -111,10 +111,11 @@
</if> </if>
<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 SUBSTR(c.check_yearmonth,1,4) = SUBSTR(#{item.commissionPayoutYearmonth,jdbcType=VARCHAR},1,4) <!-- 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)))) --> and YEAR(DATE_SUB(STR_TO_DATE(CONCAT(c.check_yearmonth,'-01'), "%Y-%m-%d"),INTERVAL 1 MONTH))=YEAR(DATE_SUB(STR_TO_DATE(CONCAT(#{item.commissionPayoutYearmonth,jdbcType=VARCHAR},'-01'), "%Y-%m-%d"),INTERVAL 1 MONTH))
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