1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- 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")
- }
- }
- func ManaulSrmOrderJob(c *gin.Context) {
- // code := c.PostForm("code")
- service.ManaulSrmOrderJob()
- c.JSON(200, "success")
- }
|