package schedule

import (
	model "LAPP_LF_MOM_BACKEND/models/me"
	"time"
)

// 换型矩阵
type SetupSrv struct{
	FromArtId		string
	ToArtId			string
	WorklineId		string
	SetupDura		time.Duration
	setuptab		model.SetupMatrix
}

// 初始化
func(ssrv *SetupSrv)Init(setuptab model.SetupMatrix){
	ssrv.setuptab	= setuptab
	ssrv.FromArtId	= setuptab.FromArtId
	ssrv.ToArtId	= setuptab.ToArtId
	ssrv.SetupDura	= time.Second * time.Duration(float64(setuptab.SetupTime) * GetTimeUomSeconds(setuptab.TimeUomId))
}

// 获取字典Key值
func(ssrv *SetupSrv)GetKey()(key string){
	return ssrv.WorklineId+":"+ssrv.FromArtId + "->" + ssrv.ToArtId
}
