广汽安道拓Acura项目MES后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
528 B

package schedule
import "time"
// 用于日模型的线段,相对时间
type LineSegementSrv struct {
WorkShiftNr int // 人员班组编号
StartSecond int // 基于0点的起始秒数
EndSecond int // 基于0点的起始秒数
Duration time.Duration
}
// 获取线段的持续时间
func (lss *LineSegementSrv) GetDuration() time.Duration {
if lss.StartSecond > lss.EndSecond {
lss.Duration = time.Duration(0)
} else {
lss.Duration = time.Duration(lss.EndSecond - lss.StartSecond)
}
return lss.Duration
}