package com.tuoheng.admin.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.request.third.DspCallbackRequest;
import com.tuoheng.admin.service.report.generate.GenerateReportService;
import com.tuoheng.admin.service.third.dsp.IDspCallbackService;
import com.tuoheng.admin.vo.inspection.InspectionCardVo;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class GenerateReportServiceTest {

    @Autowired
    private InspectionMapper inspectionMapper;

    @Autowired
    private GenerateReportService generateReportService;

    @Test
    public void testGetOneById() {
        Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>()
                .eq(Inspection::getId, "1c40b2b421c4d1108ac21aa49451be8d"));

//
//        Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>()
//                .eq(Inspection::getId, "1c40b2b421c4d1108ac21aa49451be8d")
//                .eq(Inspection::getMark, MarkEnum.VALID.getCode()));
        generateReportService.generateByAuto(inspection);
    }

}
