package com.huimv.lamp.service;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Project : huimv.shiwan
 * @Package : com.huimv.biosafety.uface.controller
 * @Description : TODO
 * @Version : 1.0
 * @Author : ZhuoNing
 * @Create : 2020-12-25
 **/
@Component
public class DataService {

    public String getDeviceCodeByChipId(String chipId){
        System.out.println("chipId"+chipId);
        return "802001";
    }

    public String getNowText() throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
        return sdf.format(new Date());
    }

    //返回亮度
    public Integer getLighteness(String askText){
        String[] askTextArray = askText.split(",");
        String id = askTextArray[1];
        return 10;
    }

    public int getLighteness(){
        return 10;
    }
}
