12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- package routers
- import (
- "github.com/gin-gonic/gin"
- "kpt.xdmy/apiserver/model"
- "kpt.xdmy/apiserver/service"
- )
- func ProofList(c *gin.Context) {
- p := new(model.ProofReq)
- if !Bind(c, p) {
- return
- }
- rp := service.ProofList(p)
- c.JSON(200, &rp)
- }
- func ProofOff(c *gin.Context) {
- p := new(model.ProofReq)
- if !Bind(c, p) {
- return
- }
- rp := svc.ProofOff(p)
- c.JSON(200, &rp)
- }
- func ProofOffList(c *gin.Context) {
- p := new(model.ProofReq)
- if !Bind(c, p) {
- return
- }
- rp := service.ProofList(p)
- c.JSON(rp.Code, &rp)
- }
- func ManualTransfer(c *gin.Context) {
- code := c.PostForm("code")
- count, e := service.ManualTransfer(code)
- c.JSON(200, map[string]interface{}{"count": count, "error": e})
- }
- func ManaulSapOrder(c *gin.Context) {
- code := c.PostForm("code")
- if e := service.ManaulSapOrderJob(code); e != nil {
- c.JSON(200, "success")
- } else {
- c.JSON(200, "fail")
- }
- }
|