package com.jjt.data;

import com.jjt.JjtApplication;
import com.jjt.elec.service.IElecPeriodService;
import com.jjt.elec.service.IElecPriceService;
import com.jjt.ws.service.ITwinWorkshopCalcService;
import javafx.util.Pair;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Map;

/**
 * 印花机
 */
@SpringBootTest(classes = JjtApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("devp")
public class ElecTest {
    @Resource
    private ITwinWorkshopCalcService calcService;
    @Resource
    private IElecPeriodService periodService;
    @Resource
    private IElecPriceService priceService;

    @Test
    void test() {
        String st = "2025-06-03";
        LocalDate localDate = LocalDate.parse(st);

        calcService.calc(localDate);

//        Map<Integer, Pair<String, BigDecimal>> result = priceService.getPrice(localDate);
//        System.err.println(result);
    }

}
