demand: TMS系统 - 提成管理 - 运单提成明细 - 根据计提比例配置计算提成明细时,只有寄件日期在配置有效期内,才按比例分配提成

committer: heyu
This commit is contained in:
aike 2025-11-06 10:35:21 +08:00
parent c7ccdf7fcc
commit 0421d7dd44
2 changed files with 8 additions and 0 deletions

View File

@ -1355,6 +1355,10 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
ratioQuery.setSalesSupport(salesSupport);
ratioQuery.setSalesExecutive(salesExecutive);
ratioQuery.setStatus("1");
// 添加运单寄件日期条件,查询运单寄件日期在计提表有效期内的比例配置
if (waybill.getSendDate() != null) {
ratioQuery.getParams().put("sendDate", waybill.getSendDate());
}
List<EmisSalesCommissionRatio> ratioList = emisSalesCommissionRatioMapper
.selectEmisSalesCommissionRatioList(ratioQuery);
if (!CollectionUtils.isEmpty(ratioList)) {

View File

@ -38,6 +38,10 @@
<if test="params.endDateAfterNow != null and params.endDateAfterNow == true">
and end_date &gt;= NOW()
</if>
<!-- 查询运单寄件日期在计提表有效期内的记录 -->
<if test="params.sendDate != null">
and start_date &lt;= #{params.sendDate} and end_date &gt;= #{params.sendDate}
</if>
</where>
ORDER BY id DESC
</select>