package com.ningdatech.carapi.car.rpt.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ningdatech.carapi.car.rpt.entity.RptOtherCrossDomainVehicles;
import com.ningdatech.carapi.car.rpt.mapper.RptOtherCrossDomainVehiclesMapper;
import com.ningdatech.carapi.car.rpt.model.dto.RptOtherParamDTO;
import com.ningdatech.carapi.car.rpt.model.po.RptOtherCrossDomainVehiclesPO;
import com.ningdatech.carapi.car.rpt.service.IRptOtherCrossDomainVehiclesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.carapi.common.aop.BuildChildrenRegionEntity;
import com.ningdatech.carapi.common.util.CodeUtil;
import com.ningdatech.carapi.datascope.aop.XmlDataScope;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Optional;

/**
 * <p>
 * 车辆跨域情况表 其它报表 服务实现类
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-11-09
 */
@Service
@RequiredArgsConstructor
public class RptOtherCrossDomainVehiclesServiceImpl extends ServiceImpl<RptOtherCrossDomainVehiclesMapper, RptOtherCrossDomainVehicles> implements IRptOtherCrossDomainVehiclesService {

    private final RptOtherCrossDomainVehiclesMapper mapper;

    @Override
    @XmlDataScope
    @BuildChildrenRegionEntity
    public List<RptOtherCrossDomainVehiclesPO> report(RptOtherParamDTO param) {
        return mapper.report(param);
    }

    @Override
    @XmlDataScope(entityIndex = 1)
    @BuildChildrenRegionEntity(entityIndex = 1)
    public Page<RptOtherCrossDomainVehiclesPO> reportPage(Page<RptOtherCrossDomainVehiclesPO> page, RptOtherParamDTO param) {
        return mapper.reportPage(page, param);
    }
}
