package yuehaoxitong import ( "shylinux.com/x/ice" "shylinux.com/x/icebergs/base/mdb" kit "shylinux.com/x/toolkits" "shylinux.com/x/community/src/yuehaoxitong/model" ) type call struct { Schedule reception reception list string `name:"list queue_uid reception_uid uid auto" role:"leader,worker"` } func (s call) List(m *ice.Message, arg ...string) { if len(arg) == 1 { m.Cmdy(s.reception, arg).RenameAppend(model.UID, model.RECEPTION_UID).PushAction().Action() m.Echo("请先选择服务场所") } else if len(arg) == 2 { s.SelectByStatus(m.Options(mdb.ORDER, model.TAKE_TIME), arg[0], kit.Format(ScheduleTake), model.RECEPTION_UID, arg[1]) kit.If(m.Length() == 0, func() { m.Echo(m.Trans("wait take", "等待取号")) }, func() { m.Action(s.Call) }) } else if len(arg) == 3 { s.Schedule.List(m, arg[0], arg[2]).Action(s.Call) } } func init() { ice.TeamCtxCmd(call{}) }