zhangback
2026-03-10 68b27795ae929f5300fc6fb301b31aada74a2e2f
tms/src/main/java/com/ruoyi/tms/service/impl/TmsPayableFeeServiceImpl.java
@@ -6,6 +6,7 @@
import java.util.List;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.SystemDataNoEnum;
@@ -81,6 +82,28 @@
        return tmsPayableFee;
    }
    @DataSource(DataSourceType.SLAVE)
    @Override
    public List<TmsPayableFee> selectTmsPayableFeeByDispatchNo(String dispatchNo)
    {
        List<TmsPayableFee> tmsPayableFeeList = tmsPayableFeeMapper.selectList(new LambdaQueryWrapper<TmsPayableFee>()
                .eq(TmsPayableFee::getDispatchNo, dispatchNo)
                .ne(TmsPayableFee::getStatus, 2)
        );
        if (tmsPayableFeeList != null && !tmsPayableFeeList.isEmpty()){
            tmsPayableFeeList.forEach(tmsPayableFee -> {
                List<TmsPayableFeeItem> tmsPayableFeeItems = tmsPayableFeeItemMapper.selectTmsPayableFeeItemList(
                        new TmsPayableFeeItem() {{
                            setHeadId(tmsPayableFee.getId());
                        }}
                );
                tmsPayableFee.setPayableFeeItems(tmsPayableFeeItems);
            });
        }
        return tmsPayableFeeList;
    }
    /**
     * 查询应付费用 记录数
     *