package task

import services "LAPP_LF_MOM_BACKEND/services/om"

var transferWorkOrderToMesTaskStatus int
var transferSerialOrderToMesTaskStatus int

/******************************************************************************
 *
 * @Struct Name              : TransferWorkOrderToMes
 *-----------------------------------------------------------------------------
 *
 * @Description              : 传输workOrder到Mes的方法
 *
 * @Author                   : zhangxin
 *
 * @Date                     : 2021-05-12
 *
 ******************************************************************************/
func TransferWorkOrderToMes()  {
	if transferWorkOrderToMesTaskStatus == 0 {
		transferWorkOrderToMesTaskStatus = 1
		defer func() {
			transferWorkOrderToMesTaskStatus = 0
		}()
	} else {
		return
	}
	plantNr := 100
	omServices := services.NewOmToMesService()
	omServices.TransferWorkOrderToMes(plantNr)
}

/******************************************************************************
 *
 * @Struct Name              : TransferSerialOrderToMes
 *-----------------------------------------------------------------------------
 *
 * @Description              : 传输serialOrder到Mes的方法
 *
 * @Author                   : zhangxin
 *
 * @Date                     : 2021-05-12
 *
 ******************************************************************************/
func TransferSerialOrderToMes()  {
	if transferSerialOrderToMesTaskStatus == 0 {
		transferSerialOrderToMesTaskStatus = 1
		defer func() {
			transferSerialOrderToMesTaskStatus = 0
		}()
	} else {
		return
	}
	plantNr := 100
	omServices := services.NewOmToMesService()
	omServices.TransferSerialOrderToMes(plantNr)
}

