import com.red.circle.OtherServiceApplication;
import com.red.circle.other.app.scheduler.BdLeaderSalarySettlementTask;
import com.red.circle.other.app.scheduler.BdSalarySettlementTask;
import com.red.circle.other.app.scheduler.TeamBillTask;
import com.red.circle.other.infra.database.mongo.entity.bd.BdSalaryPolicy;
import com.red.circle.other.infra.database.mongo.service.bd.BdSalaryPolicyService;
import com.red.circle.other.infra.database.mongo.service.team.TeamBillCycleUtils;
import com.red.circle.other.infra.enums.BdPolicyType;
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.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest(classes = OtherServiceApplication.class)
@RunWith(SpringRunner.class)
public class BdSettlementTest {

  @Autowired
  private BdSalarySettlementTask bdSalarySettlementTask;
  @Autowired
  private BdLeaderSalarySettlementTask  bdLeaderSalarySettlementTask;
  @Autowired
  private BdSalaryPolicyService bdSalaryPolicyService;
  @Autowired
  private MongoTemplate mongoTemplate;


  /**
   * BD 工资结算
   */
  @Test
  public void testBdSettlement() {
    Integer billBelong = TeamBillCycleUtils.getCalcBillBelong();

    bdSalarySettlementTask.processBdSalarySettlementTest(billBelong);

  }

  /**
   * BDLEADER 工资结算
   */
  @Test
  public void testBdLeaderSettlement() {
    Integer billBelong = TeamBillCycleUtils.getCalcBillBelong();

    bdLeaderSalarySettlementTask.processBdLeaderSalarySettlementTest(billBelong);

  }


}
