// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.

package api

import (
	"LAPP_LF_MOM_BACKEND/grmi"
	svr "LAPP_LF_MOM_BACKEND/services/api"
	"github.com/kataras/iris/v12/core/router"
)

/******************************************************************************
 *
 * @Interface Name           : RegisterRoutes
 *-----------------------------------------------------------------------------
 *
 * @Description              : 注册路由
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-07-12 10:08:28
 *
 ******************************************************************************/
func RegisterRoutes() {
	// 模块api路由分组
	grmi.RegisterRouteMapping("/api", func(party router.Party) {

		// A30Mes的路由组
		a30mes := party.Party("/a30mes")
		// A30Mes的服务实例
		var serviceOfA30Mes = svr.NewA30MesService()
		// A30Mes插入一条
		// RegisterInsertOneA30Mes(a30mes, "/insertone", serviceOfA30Mes.InsertOne)
		// A30Mes插入多条
		// RegisterInsertA30Mes(a30mes, "/insert", serviceOfA30Mes.Insert)
		// A30Mes删除一条
		// RegisterDeleteOneA30Mes(a30mes, "/deleteone", serviceOfA30Mes.DeleteOne)
		// A30Mes删除多条
		// RegisterDeleteA30Mes(a30mes, "/delete", serviceOfA30Mes.Delete)
		// A30Mes查询多条
		RegisterSelectA30Mes(a30mes, "/query", serviceOfA30Mes.Select)
		// A30Mes查询一条
		//RegisterSelectOneA30Mes(a30mes, "/get", serviceOfA30Mes.SelectOne)
		// A30Mes修改一条
		// RegisterUpdateOneA30Mes(a30mes, "/updateone", serviceOfA30Mes.UpdateOne)
		// A30Mes修改多条
		// RegisterUpdateA30Mes(a30mes, "/update", serviceOfA30Mes.Update)

		// screw的路由组
		screw := party.Party("/screw")
		// screw的服务实例
		var serviceOfScrew = svr.NewScrewService()
		// 接收一个screw
		RegisterReceiveScrew(screw, "/receive", serviceOfScrew.Receive)
		// 获取最新的screw
		RegisterGetNewestScrew(screw, "/get", serviceOfScrew.GetNewestScrew)
		// 获取screw list
		RegisterGetScrewLi(screw, "/getall", serviceOfScrew.GetScrewLi)
		// andon路由组
		andon := party.Party("/andon")
		// andon 服务实例
		var serviceOfAndon = svr.NewAndonService()
		// 触发调用mes
		RegisterTouchOffAndon(andon, "/touchoff", serviceOfAndon.TouchOff)

		// ACCUNITID的路由组
		accunitid := party.Party("/accunitid")
		// ACCUNITID的服务实例
		var serviceOfACCUNITID = svr.NewACCUNITIDService()
		// ACCUNITID插入一条
		// RegisterInsertOneACCUNITID(accunitid, "/insertone", serviceOfACCUNITID.InsertOne)
		// ACCUNITID插入多条
		// RegisterInsertACCUNITID(accunitid, "/insert", serviceOfACCUNITID.Insert)
		// ACCUNITID删除一条
		// RegisterDeleteOneACCUNITID(accunitid, "/deleteone", serviceOfACCUNITID.DeleteOne)
		// ACCUNITID删除多条
		// RegisterDeleteACCUNITID(accunitid, "/delete", serviceOfACCUNITID.Delete)
		// ACCUNITID查询多条
		RegisterSelectACCUNITID(accunitid, "/query", serviceOfACCUNITID.Select)
		// ACCUNITID查询一条
		RegisterSelectOneACCUNITID(accunitid, "/get", serviceOfACCUNITID.SelectOne)
		//查询调角器对应的信息
		RegisterSelectInfoACCUNITID(accunitid, "/selectinfo", serviceOfACCUNITID.SelectInfo)
		// ACCUNITID修改一条
		// RegisterUpdateOneACCUNITID(accunitid, "/updateone", serviceOfACCUNITID.UpdateOne)
		// ACCUNITID修改多条
		// RegisterUpdateACCUNITID(accunitid, "/update", serviceOfACCUNITID.Update)
	})
}

/******************************************************************************
 *
 * @Interface Name           : init
 *-----------------------------------------------------------------------------
 *
 * @Description              : 包初始化方法
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-05-11 17:10:11
 *
 ******************************************************************************/
func init() {

	// 注册路由
	RegisterRoutes()
}
