qryAreaStock.go 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * @Author: zou.yingbin
  3. * @Create : 2021/3/10 15:30
  4. * @Modify : 2021/3/10 15:30
  5. */
  6. package ermcp
  7. import (
  8. "github.com/gin-gonic/gin"
  9. "mtp2_if/global/app"
  10. "mtp2_if/models"
  11. )
  12. // QryAreaStockApplyReq 查询库存申请请求
  13. type QryAreaStockApplyReq struct {
  14. USERID string `form:"userid" binding:"required"` // 用户id
  15. INOUTTYPE string `form:"inouttype"` // 出入库类型 - 1:采购入库 2:销售出库 3:生产入库 4:生产出库
  16. SPOTCONTRACTID string `form:"spotcontractid"` // 合同ID
  17. WRSTANDARDID string `form:"wrstandardid"` // 现货商品ID
  18. SPOTGOODSBRANDID int32 `form:"spotgoodsbrandid"` // 品牌ID
  19. SPOTGOODSMODELID int32 `form:"spotgoodsmodelid"` // 型号ID
  20. WAREHOUSEINFOID string `form:"warehouseinfoid"` // 仓库ID
  21. APPLYSTATUS string `form:"applystatus"` // 申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
  22. }
  23. // QryAreaStockApplyRsp 查询库存申请响应
  24. type QryAreaStockApplyRsp models.ErmcpAreaStockApply
  25. // QueryAreaStockApply
  26. // @Summary 查询库存申请(出入库记录|库存审核)
  27. // @Produce json
  28. // @Security ApiKeyAuth
  29. // @Param userid query int true "用户ID"
  30. // @Param inouttype query string false "出入库类型(可多项,逗号隔开) 1:采购入库 2:销售出库 3:生产入库 4:生产出库"
  31. // @Param spotcontractid query int false "合同ID"
  32. // @Param wrstandardid query int false "现货商品ID"
  33. // @Param spotgoodsbrandid query int false "品牌ID"
  34. // @Param spotgoodsmodelid query int false "型号ID"
  35. // @Param warehouseinfoid query int false "仓库ID"
  36. // @Param applystatus query string false "申请状态(可多项,逗号隔开)1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回"
  37. // @Success 200 {array} QryAreaStockApplyRsp
  38. // @Failure 500 {object} app.Response
  39. // @Router /Ermcp/QueryAreaStockApply [get]
  40. // @Tags 企业风险管理(app)
  41. func QueryAreaStockApply(c *gin.Context) {
  42. a := app.NewGinUtils(c)
  43. req := QryAreaStockApplyReq{}
  44. a.DoBindReq(&req)
  45. m := models.ErmcpAreaStockApply{
  46. USERID: req.USERID,
  47. FilterType: req.INOUTTYPE,
  48. SPOTCONTRACTID: req.SPOTCONTRACTID,
  49. WRSTANDARDID: req.WRSTANDARDID,
  50. SPOTGOODSBRANDID: req.SPOTGOODSBRANDID,
  51. SPOTGOODSMODELID: req.SPOTGOODSMODELID,
  52. WAREHOUSEINFOID: req.WAREHOUSEINFOID,
  53. FilterStatus: req.APPLYSTATUS,
  54. }
  55. a.DoGetDataEx(&m)
  56. }