package com.aucma.api.mapper;

import com.aucma.api.domain.dto.RepairSubmitInfoDto;
import com.aucma.common.annotation.DataSource;
import com.aucma.common.enums.DataSourceType;
import com.aucma.report.domain.ReportQualityInspection;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wanghao
 * @date 2023/11/14  10:16
 */
@Repository
public interface PdaBindingMapper {
    String selectBoxNameByCode(String boxCode);
    @DataSource(value = DataSourceType.SLAVE)
    int insertBindingInfo(@Param("boxCode") String boxCode,
                          @Param("boxName") String boxName,
                          @Param("innerCode")String innerCode);

    int countQualityRecordByCode(String code);
    @DataSource(value = DataSourceType.SLAVE)
    int updateCodeBinding(@Param("boxCode") String boxCode, @Param("innerCode")String innerCode);

    int submitRepair(@Param("info")RepairSubmitInfoDto info);

    List<ReportQualityInspection> findCheckInfoByCode(String code);

    List<ReportQualityInspection> checkSelectRepairInfo(String code);
}
