package task

import (
	"LAPP_ACURA_MOM_BACKEND/common"
	"LAPP_ACURA_MOM_BACKEND/models/channel"
	"LAPP_ACURA_MOM_BACKEND/services/pln"
)

func StartApsRelease() error {
	// 异步派工
	common.ReleaseTaskChannel = make(map[int]*channel.TaskChannel)
	custSvr := pln.NewCustOrderService()
	err := custSvr.ReleaseTask()
	return err
}

func StartCrossPlantTask() error {
	// 异步派工
	common.CrossPlantTaskCustOrderChannel = make(map[int]*channel.TaskChannel)
	custSvr := pln.NewCustOrderService()
	err := custSvr.CrossPlantTask()
	return err
}

func StartTimingPutTaskToChannel() {
	// 异步派工
	custSvr := pln.NewCustOrderService()
	_ = custSvr.PutTaskToChannel()
}