import com.chushang.InspectionApplication;
import com.chushang.inspection.work.query.DispatchQuery;
import com.chushang.inspection.work.service.WrkInfoService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = InspectionApplication.class)
public class InsTest {

    @Resource
    WrkInfoService wrkInfoService;

    @Test
    public void test(){
        DispatchQuery query = new DispatchQuery();
        query.setTerminalIds(List.of(1815687260161114113L));
        query.setUserId(1805497601669918722L);
        query.setWorkType(20);
        query.setEndTime(LocalDateTime.of(2024, 7, 31, 0, 0, 0));
        query.setWorkSort(1);
        query.setRemark("111");
        query.setWorkSource(3);
        query.setTerminalNos(List.of("235"));
        wrkInfoService.dispatch(query, 0);
    }
}
