Sfoglia il codice sorgente

保税仓出入库申请表查询接口增加入参

zhou.xiaoning 2 anni fa
parent
commit
2d21bcb022

+ 1 - 0
controllers/guangzuan/trade.go

@@ -103,6 +103,7 @@ func QueryDiamond(c *gin.Context) {
 // @Param    userid    query    int true  "用户ID"
 // @Param    ordertype query    int true  "单据类型 - 1:进仓 2:出仓(枚举:GZBSCOrderType)"
 // @Param    listtype  query    int false "列表类型 - 0.全部 1.待上传 2.进行中 3.已结束"
+// @Param    outtype   query    int false "出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)"
 // @Param    page      query    int false "页码"
 // @Param    pagesize  query    int false "每页条数"
 // @Success  200       {array}  models.GGzbscinoutorder

+ 4 - 4
controllers/guangzuan/tradeService.go

@@ -18,8 +18,8 @@ import (
 // @Security Group
 // @Param    userid   query    int    true  "用户ID"
 // @Param    executestatus query    int false "执行状态 - 1:未生效 2:进行中 3:已结束"
-// @Param    page          query    int false "页码"
-// @Param    pagesize      query    int false "每页条数"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
 // @Success  200           {array}  models.GzcjjcorderM
 // @Failure  500     {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrder [get]
@@ -39,8 +39,8 @@ func QueryGZCJJCOrder(c *gin.Context) {
 // @Security Group
 // @Param    userid        query    int true  "用户ID"
 // @Param    orderid  query    string false "单据ID"
-// @Param    page     query    int    false "页码"
-// @Param    pagesize query    int    false "每页条数"
+// @Param    page          query    int false "页码"
+// @Param    pagesize      query    int false "每页条数"
 // @Success  200      {array}  models.GzcjjcorderdetailM
 // @Failure  500           {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrderDetail [get]

+ 6 - 0
docs/docs.go

@@ -10147,6 +10147,12 @@ const docTemplate = `{
                     },
                     {
                         "type": "integer",
+                        "description": "出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)",
+                        "name": "outtype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
                         "description": "页码",
                         "name": "page",
                         "in": "query"

+ 6 - 0
docs/swagger.json

@@ -10138,6 +10138,12 @@
                     },
                     {
                         "type": "integer",
+                        "description": "出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)",
+                        "name": "outtype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
                         "description": "页码",
                         "name": "page",
                         "in": "query"

+ 4 - 0
docs/swagger.yaml

@@ -33104,6 +33104,10 @@ paths:
         in: query
         name: listtype
         type: integer
+      - description: 出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)
+        in: query
+        name: outtype
+        type: integer
       - description: 页码
         in: query
         name: page

+ 3 - 2
models/guangzuan.go

@@ -3628,8 +3628,7 @@ func (r *GGzbscinoutorder) buildSql() string {
 			t.GOODSNAME,
 			t.ORDERNUM
 		from GZ_BSCInOutOrder t
-		where t.userid = %v and t.ORDERTYPE = %v and %v
-		order by t.APPLICANTTIME desc
+		where t.userid = %v and t.ORDERTYPE = %v and %v 
 	`
 
 	e := "1=1"
@@ -3644,6 +3643,8 @@ func (r *GGzbscinoutorder) buildSql() string {
 		}
 	}
 	sqlId.FormatParam(r.USERID, r.ORDERTYPE, e)
+	sqlId.AndEx("t.OUTTYPE", r.OUTTYPE, r.OUTTYPE != 0)
+	sqlId.OrderByDesc("t.APPLICANTTIME")
 
 	sqlId.Page(r.Page, r.PageSize)
 	return sqlId.String()