waybill.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package router
  2. import (
  3. "cold-logistics/app/admin/controller"
  4. "cold-logistics/common/actions"
  5. "github.com/gin-gonic/gin"
  6. jwt "gogs.baozhida.cn/zoie/OAuth-core/pkg/jwtauth"
  7. )
  8. func init() {
  9. routerCheckRole = append(routerCheckRole, registerWaybillRouter)
  10. }
  11. // 派费管理
  12. // 需认证的路由代码
  13. func registerWaybillRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
  14. cont := controller.WaybillController{}
  15. r := v1.Group("/waybill").Use(authMiddleware.MiddlewareFunc()).Use(actions.PermissionAction())
  16. {
  17. r.GET("", cont.GetPage)
  18. r.GET("/:id", cont.Get)
  19. r.POST("", cont.Insert)
  20. r.POST("/applet", cont.AppletInsert)
  21. r.POST("/delivery", cont.Delivery)
  22. r.PUT("", cont.Update)
  23. r.DELETE("", cont.Delete)
  24. r.POST("/warehouse-in", cont.WarehouseIn) // 入库
  25. //r.POST("/warehouse-out", cont.WarehouseOut) // 出库
  26. r.POST("/car-in", cont.CarIn) // 装车
  27. //r.POST("/car-out", cont.CarOut) // 下车
  28. r.POST("/cooler-box-in", cont.CoolerBoxIn) // 装箱
  29. r.POST("/stop-record", cont.StopRecord) // 停止记录
  30. r.POST("/receipt", cont.Receipt) // 签收
  31. r.GET("/customer", cont.GetCustomerPage) // 客户下单列表
  32. r.POST("/customer", cont.CustomerInsert) // 客户下单
  33. r.GET("/applet", cont.GetAppletPage) // app 运单列表
  34. r.GET("/applet-count", cont.GetAppletCount) // app 运单-统计
  35. r.POST("/import", cont.Import) // 导入运单
  36. r.GET("/export-template", cont.ExportTemplate) // 导出运单模板
  37. r.GET("/home", cont.Home) // 首页统计
  38. r.GET("/export", cont.Export) // 运单管理-导出
  39. r.GET("/customer/export", cont.CustomerExport) // 运单管理-客户导出
  40. r.GET("/temperature-pdf", cont.TemperaturePDF) // 导出温湿度pdf
  41. r.GET("/waybill-pdf", cont.WaybillPDF) // 导出运单pdf
  42. r.POST("/send-mail", cont.SendMail) // 发送温湿度邮件
  43. }
  44. }