| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- /**
- * @Author: zou.yingbin
- * @Create : 2021/3/10 15:30
- * @Modify : 2021/3/10 15:30
- */
- package ermcp
- import (
- "github.com/gin-gonic/gin"
- "mtp2_if/global/app"
- "mtp2_if/models"
- )
- // QryAreaStockApplyReq 查询库存申请请求
- type QryAreaStockApplyReq struct {
- USERID string `form:"userid" binding:"required"` // 用户id
- INOUTTYPE string `form:"inouttype"` // 出入库类型 - 1:采购入库 2:销售出库 3:生产入库 4:生产出库
- SPOTCONTRACTID string `form:"spotcontractid"` // 合同ID
- WRSTANDARDID string `form:"wrstandardid"` // 现货商品ID
- SPOTGOODSBRANDID int32 `form:"spotgoodsbrandid"` // 品牌ID
- SPOTGOODSMODELID int32 `form:"spotgoodsmodelid"` // 型号ID
- WAREHOUSEINFOID string `form:"warehouseinfoid"` // 仓库ID
- APPLYSTATUS string `form:"applystatus"` // 申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
- }
- // QryAreaStockApplyRsp 查询库存申请响应
- type QryAreaStockApplyRsp models.ErmcpAreaStockApply
- // QueryAreaStockApply
- // @Summary 查询库存申请(出入库记录|库存审核)
- // @Produce json
- // @Security ApiKeyAuth
- // @Param userid query int true "用户ID"
- // @Param inouttype query string false "出入库类型(可多项,逗号隔开) 1:采购入库 2:销售出库 3:生产入库 4:生产出库"
- // @Param spotcontractid query int false "合同ID"
- // @Param wrstandardid query int false "现货商品ID"
- // @Param spotgoodsbrandid query int false "品牌ID"
- // @Param spotgoodsmodelid query int false "型号ID"
- // @Param warehouseinfoid query int false "仓库ID"
- // @Param applystatus query string false "申请状态(可多项,逗号隔开)1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回"
- // @Success 200 {array} QryAreaStockApplyRsp
- // @Failure 500 {object} app.Response
- // @Router /Ermcp/QueryAreaStockApply [get]
- // @Tags 企业风险管理(app)
- func QueryAreaStockApply(c *gin.Context) {
- a := app.NewGinUtils(c)
- req := QryAreaStockApplyReq{}
- a.DoBindReq(&req)
- m := models.ErmcpAreaStockApply{
- USERID: req.USERID,
- FilterType: req.INOUTTYPE,
- SPOTCONTRACTID: req.SPOTCONTRACTID,
- WRSTANDARDID: req.WRSTANDARDID,
- SPOTGOODSBRANDID: req.SPOTGOODSBRANDID,
- SPOTGOODSMODELID: req.SPOTGOODSMODELID,
- WAREHOUSEINFOID: req.WAREHOUSEINFOID,
- FilterStatus: req.APPLYSTATUS,
- }
- a.DoGetDataEx(&m)
- }
- // QueryAreaStockApplySum 出入库汇总请求
- type QueryAreaStockApplySumReq struct {
- SPOTCONTRACTID string `form:"spotcontractid"` // 合同ID
- }
- // QueryAreaStockApplySumRsp 出入库汇总响应
- type QueryAreaStockApplySumRsp models.ErmcpAreaStockApplySum
- // QueryAreaStockApplySum
- // @Summary 查询已登记出入库信息(入库登记/已入库信息 | 出库登记/已出库信息)
- // @Produce json
- // @Security ApiKeyAuth
- // @Param spotcontractid query int false "合同ID"
- // @Success 200 {array} QueryAreaStockApplySumRsp
- // @Failure 500 {object} app.Response
- // @Router /Ermcp/QueryAreaStockApplySum [get]
- // @Tags 企业风险管理(app)
- func QueryAreaStockApplySum(c *gin.Context) {
- a := app.GinUtils{Gin: app.Gin{C: c}}
- req := QueryAreaStockApplySumReq{}
- a.DoBindReq(&req)
- m := models.ErmcpAreaStockApplySum{SPOTCONTRACTID: req.SPOTCONTRACTID}
- a.DoGetDataEx(&m)
- }
|