package com.hs.api.service;

import com.hs.api.BsoftApiApplicationTests;
import com.hs.api.model.respmodel.BlockValue;
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.test.context.junit4.SpringRunner;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = BsoftApiApplicationTests.class)
public class BlockValuesServiceTest {
    
    @Autowired
    BlockValuesService blockValuesService;

    @Autowired
    SysConfigService sysConfigService;
    
    @Test
    public void testBlockVlues() {
        Long userId = 1L;
        Integer pageCode = 12;
        Map<String,String> dim = new HashMap<>();
        //dim.put("KSBM","普外科");
        dim.put("ZBZBM","15_AK_f_7");
        dim.put("TIME","202010");
        try {
            Map<String, List> map = blockValuesService.getCustomBlockValuesByPageCode(userId, pageCode, dim);
            System.out.println(map);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @Test
    public void testBlockState() {
        boolean state = sysConfigService.getSysConfigStateByKey("CASE_LIST");
        System.out.println(state);
    }

}
