package org.linlinjava.jz.hm;


import org.junit.Test;
import org.junit.runner.RunWith;
import org.linlinjava.jz.db.domain.HmEmployRelation;
import org.linlinjava.jz.hm.service.HmEmployRelationService;
import org.linlinjava.jz.hm.service.HmEmployTaskJobService;
import org.linlinjava.jz.service.HmEmployClockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

@WebAppConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class HmEmployTaskTest {
    @Autowired
    private HmEmployTaskJobService hmEmployTaskJobService;
    @Autowired
    private HmEmployRelationService hmEmployRelationService;
    @Autowired
    private HmEmployClockService hmEmployClockService;

    @Test
    public void run() {
        HmEmployRelation hmEmployRelation = hmEmployRelationService.queryById(1L);

        //hmEmployTaskJobService.createDayTask(hmEmployRelation);

        hmEmployTaskJobService.createTask(hmEmployRelation);

        hmEmployClockService.updateAbsentOfWork();

    }
}
