package com.jjt.inventory;

import com.jjt.JjtApplication;
import com.jjt.inventory.service.IInventoryService;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

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

/**
 * 印花机
 */
@SpringBootTest(classes = JjtApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class InventoryTest {
    @Resource
    IInventoryService inventoryService;

    @Test
    public void hour() {
        inventoryService.hour();
    }

    @Test
    public void day() {
        String date = "2025-06-12";
        LocalDate localDate = LocalDate.parse(date);
        inventoryService.day(localDate);
    }

    public static void main(String[] args) {
        String v = "299.000";
        System.out.println(new BigDecimal(v).intValue());
    }
}
