| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 | package routeimport (	"kpt-pasture/http/handler/event"	"github.com/gin-gonic/gin")func EventAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {	return func(s *gin.Engine) {		for _, opt := range opts {			opt(s)		}		// eventRoute API 组  事件管理		eventRoute := authRouteGroup(s, "/api/v1/event/")		// 入场		eventRoute.POST("/enter/list", event.EnterEventList)		eventRoute.POST("/enter/create", event.EnterEventCreate)		// 转群		eventRoute.POST("/group/transfer/list", event.GroupTransferEventList)		eventRoute.POST("/group/transfer/create", event.GroupTransferEventCreate)		// 体况评分		eventRoute.POST("/body/score/list", event.BodyScoreEventList)		eventRoute.POST("/body/score/create", event.BodyScoreEventCreate)		// 称重		eventRoute.POST("/weight/list", event.WeightList)		eventRoute.POST("/weight/batch", event.WeightBatch)		// 产犊		eventRoute.POST("/calving/list", event.CalvingEventList)		eventRoute.POST("/calving/create", event.CalvingEventCreate)		// 孕检		eventRoute.POST("/pregnant/check/list", event.PregnantCheckEventList)		eventRoute.POST("/pregnant/check/batch", event.PregnantCheckEventCreateBatch)		// 配种		eventRoute.POST("/mating/list", event.MatingEventList)		eventRoute.POST("/mating/batch", event.MatingBatch)		// 发情		eventRoute.POST("/estrus/list", event.EstrusEventList)		eventRoute.POST("/estrus/mating/batch", event.EstrusBatchMating)		// 同期		eventRoute.POST("/same/time/list", event.SameTimeList)		eventRoute.POST("/same/time/create", event.SameTimeCreate)		eventRoute.POST("/same/time/batch", event.SameTimeBatch)		// 流产		eventRoute.POST("/abortion/list", event.AbortionList)		eventRoute.POST("/abortion/batch", event.AbortionCreateBatch)		// 断奶		eventRoute.POST("/weaning/batch", event.WeaningCreateBatch)		// 发病		eventRoute.POST("/disease/create", event.CowDiseaseCreate)		// 疾病诊断		eventRoute.POST("/disease/diagnose", event.CowDiseaseDiagnose)		// 疾病治疗		eventRoute.POST("/disease/treatment", event.CowDiseaseTreatment)		eventRoute.GET("/disease/suggest/prescription/:id", event.DiseaseSuggestPrescription)		// 治疗详情		eventRoute.POST("/disease/treatment/details", event.CowDiseaseTreatmentDetail)		// 批量治愈		eventRoute.POST("/disease/curable/batch", event.CowDiseaseCurable)		// 离场(死亡淘汰)		eventRoute.POST("/departure/batch", event.Departure)		// 更换耳标号		eventRoute.PUT("/cow/ear/number", event.CowEarNumber)		// 牛只销售		eventRoute.POST("/sale/create", event.CowSale)		eventRoute.POST("/sale/list", event.CowSaleList)		// 免疫		eventRoute.POST("/immunization/batch", event.ImmunizationBatch)		eventRoute.POST("/immunization/list", event.ImmunizationList)	}}
 |