package service import "strconv" /**描述工序前后关系**/ type OperationRelSrv struct{ OrderId string // 关联订单号 OperationNr int // 关联工序号 SplitNr int // 关联工序拆分号 Relation string // 参见工序关系常量定义:ES / SS / SSEE / EES / ESE } // 获取关联工序完整键值:工单ID-工序号-工序拆分号 func(ors *OperationRelSrv)GetFullKey()(string){ return ors.OrderId + "-" + strconv.Itoa(ors.OperationNr) + "-" + strconv.Itoa(ors.SplitNr) } // 获取关联工序键值:工序号-工序拆分号 func(ors *OperationRelSrv)GetOpKey()(string){ return strconv.Itoa(ors.OperationNr) + "-" + strconv.Itoa(ors.SplitNr) }