Kaynağa Gözat

增加保税仓相关接口:
/Guangzuan/QueryGzbscinOutOrder 保税仓出入库申请表查询
/Guangzuan/QueryBScinOutOrderDetail 保税仓出入库申请明细表查询
/Guangzuan/QueryBScinOutOrderDetail 保税仓出库申请明细附表查询
/Guangzuan/QueryGzbscPosition 保税商品报关头寸表查询
/Guangzuan/QueryGzbscusermonthpay 保税仓用户月付款通知书表查询(计费管理)
/Guangzuan/QueryGzbscuserpowerfee 保税仓月电费登记表查询
/Guangzuan/QueryBscinoutorder 保税仓本月进口明细/本月出境明细/本月转厂明细查询

zhou.xiaoning 2 yıl önce
ebeveyn
işleme
ef64a90103

+ 87 - 11
controllers/guangzuan/trade.go

@@ -108,7 +108,7 @@ func QueryDiamond(c *gin.Context) {
 // @Success  200       {array}  models.GGzbscinoutorder
 // @Failure  500       {object} app.Response
 // @Router   /Guangzuan/QueryGzbscinOutOrder [get]
-// @Tags     铁合金
+// @Tags     广钻
 func QueryGzbscinOutOrder(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	m := models.GGzbscinoutorder{}
@@ -120,14 +120,14 @@ func QueryGzbscinOutOrder(c *gin.Context) {
 // @Summary  保税仓出入库申请明细表查询
 // @Produce  json
 // @Security ApiKeyAuth
-// @Param    userid   query    int    true  "用户ID"
+// @Param    userid     query    int    true  "用户ID"
 // @Param    orderid  query    string true  "申请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.BScinoutorderdetail
-// @Failure  500      {object} app.Response
+// @Failure  500       {object} app.Response
 // @Router   /Guangzuan/QueryBScinOutOrderDetail [get]
-// @Tags     铁合金
+// @Tags     广钻
 func QueryBScinOutOrderDetail(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	m := models.BScinoutorderdetail{}
@@ -139,17 +139,93 @@ func QueryBScinOutOrderDetail(c *gin.Context) {
 // @Summary  保税仓出库申请明细附表查询
 // @Produce  json
 // @Security ApiKeyAuth
-// @Param    userid   query    int    true  "用户ID"
+// @Param    userid    query    int true  "用户ID"
 // @Param    orderid  query    string true  "申请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.BScoutorderdetailatt
-// @Failure  500      {object} app.Response
+// @Failure  500        {object} app.Response
 // @Router   /Guangzuan/QueryBScinOutOrderDetail [get]
-// @Tags     铁合金
+// @Tags     广钻
 func QueryBScOutOrderDetailatt(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	m := models.BScoutorderdetailatt{}
 	a.DoBindReq(&m)
 	a.DoGetDataByPage(&m)
 }
+
+// QueryGzbscPosition
+// @Summary  保税商品报关头寸表查询
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    userid   query    int true  "用户ID"
+// @Param    page     query    int false "页码"
+// @Param    pagesize query    int false "每页条数"
+// @Success  200      {array}  models.GGzbscposition
+// @Failure  500      {object} app.Response
+// @Router   /Guangzuan/QueryGzbscPosition [get]
+// @Tags     广钻
+func QueryGzbscPosition(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.GGzbscposition{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}
+
+// QueryGzbscusermonthpay
+// @Summary  保税仓用户月付款通知书表查询(计费管理)
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    userid   query    int    true  "用户ID"
+// @Param    paystatus query    int false "支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
+// @Success  200       {array}  models.GGzbscusermonthpay
+// @Failure  500      {object} app.Response
+// @Router   /Guangzuan/QueryGzbscusermonthpay [get]
+// @Tags     广钻
+func QueryGzbscusermonthpay(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.GGzbscusermonthpay{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}
+
+// QueryGzbscuserpowerfee
+// @Summary  保税仓月电费登记表查询
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    userid   query    int    true  "用户ID"
+// @Param    trademonth query    string true  "月份(yyyMM)"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
+// @Success  200        {array}  models.GGzbscuserpowerfee
+// @Failure  500      {object} app.Response
+// @Router   /Guangzuan/QueryGzbscuserpowerfee [get]
+// @Tags     广钻
+func QueryGzbscuserpowerfee(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.GGzbscuserpowerfee{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}
+
+// QueryBscinoutorder
+// @Summary  保税仓本月进口明细/本月出境明细/本月转厂明细查询
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    userid   query    int    true  "用户ID"
+// @Param    orderid  query    string true  "申请ID"
+// @Param    jckdate  query    string true  "进出口月份(yyyMM)"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
+// @Success  200      {array}  models.Bscinoutorder
+// @Failure  500      {object} app.Response
+// @Router   /Guangzuan/QueryBscinoutorder [get]
+// @Tags     广钻
+func QueryBscinoutorder(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.Bscinoutorder{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}

+ 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]

+ 622 - 16
docs/docs.go

@@ -9293,7 +9293,7 @@ const docTemplate = `{
                     "application/json"
                 ],
                 "tags": [
-                    "铁合金"
+                    "广钻"
                 ],
                 "summary": "保税仓出库申请明细附表查询",
                 "parameters": [
@@ -9343,6 +9343,74 @@ const docTemplate = `{
                 }
             }
         },
+        "/Guangzuan/QueryBscinoutorder": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "保税仓本月进口明细/本月出境明细/本月转厂明细查询",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "申请ID",
+                        "name": "orderid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "进出口月份(yyyMM)",
+                        "name": "jckdate",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Bscinoutorder"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryBuyOrder": {
             "get": {
                 "security": [
@@ -9849,6 +9917,60 @@ const docTemplate = `{
                 }
             }
         },
+        "/Guangzuan/QueryGzbscPosition": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "保税商品报关头寸表查询",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.GGzbscposition"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryGzbscinOutOrder": {
             "get": {
                 "security": [
@@ -9860,7 +9982,7 @@ const docTemplate = `{
                     "application/json"
                 ],
                 "tags": [
-                    "铁合金"
+                    "广钻"
                 ],
                 "summary": "保税仓出入库申请表查询",
                 "parameters": [
@@ -9916,6 +10038,127 @@ const docTemplate = `{
                 }
             }
         },
+        "/Guangzuan/QueryGzbscusermonthpay": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "保税仓用户月付款通知书表查询(计费管理)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)",
+                        "name": "paystatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.GGzbscusermonthpay"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Guangzuan/QueryGzbscuserpowerfee": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "保税仓月电费登记表查询",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "月份(yyyMM)",
+                        "name": "trademonth",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.GGzbscuserpowerfee"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryGzcjjcorderoperate": {
             "get": {
                 "security": [
@@ -25112,27 +25355,149 @@ const docTemplate = `{
                 }
             }
         },
-        "models.BuyOrder": {
+        "models.Bscinoutorder": {
             "type": "object",
+            "required": [
+                "jckdate",
+                "orderid",
+                "userid"
+            ],
             "properties": {
-                "accountid": {
-                    "description": "资金账户ID",
-                    "type": "integer"
-                },
-                "buyusername": {
-                    "description": "买方",
+                "applicanttime": {
+                    "description": "申请时间",
                     "type": "string"
                 },
-                "marketid": {
-                    "description": "市场ID",
-                    "type": "integer"
+                "bagweightgm": {
+                    "description": "连袋重(克)",
+                    "type": "number"
                 },
-                "ordertime": {
-                    "description": "委托时间",
+                "checklistno": {
+                    "description": "核注清单号",
                     "type": "string"
                 },
-                "origin": {
-                    "description": "原产地",
+                "confirmdate": {
+                    "description": "进出仓确认时间",
+                    "type": "string"
+                },
+                "confirmername": {
+                    "description": "进出仓确认人",
+                    "type": "string"
+                },
+                "confirmtradedate": {
+                    "description": "进出仓确认交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "contactname": {
+                    "description": "申请方联系人",
+                    "type": "string"
+                },
+                "contactnum": {
+                    "description": "申请方联系电话",
+                    "type": "string"
+                },
+                "customsno": {
+                    "description": "报关单号",
+                    "type": "string"
+                },
+                "customstotalvalue": {
+                    "description": "报关总值",
+                    "type": "number"
+                },
+                "goodsname": {
+                    "description": "商品名称 - 明细的商品名称拼接(\"/\")",
+                    "type": "string"
+                },
+                "jckdate": {
+                    "description": "进出口日期",
+                    "type": "string"
+                },
+                "logisticscompany": {
+                    "description": "物流公司名称",
+                    "type": "string"
+                },
+                "logisticsno": {
+                    "description": "托运单号",
+                    "type": "string"
+                },
+                "netweightct": {
+                    "description": "净重(克拉)",
+                    "type": "number"
+                },
+                "netweightgm": {
+                    "description": "净重(克)",
+                    "type": "number"
+                },
+                "orderid": {
+                    "description": "申请ID(806+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
+                "ordernum": {
+                    "description": "单据编号",
+                    "type": "string"
+                },
+                "orderstatus": {
+                    "description": "进出仓状态 - 1.待确认 2.待上传 3.报关中 4.进仓中 5.出仓中 20.已关闭 21.确认拒绝(枚举:GZBSCOrderStatus)",
+                    "type": "integer"
+                },
+                "ordertype": {
+                    "description": "单据类型 - 1:进仓 2:出仓(枚举:GZBSCOrderType)",
+                    "type": "integer"
+                },
+                "outtype": {
+                    "description": "出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)",
+                    "type": "integer"
+                },
+                "sealno": {
+                    "description": "进出仓封条号",
+                    "type": "string"
+                },
+                "signeedate": {
+                    "description": "收发货人日期",
+                    "type": "string"
+                },
+                "signeename": {
+                    "description": "收发货人",
+                    "type": "string"
+                },
+                "totalprice": {
+                    "description": "总价",
+                    "type": "number"
+                },
+                "useraddress": {
+                    "description": "申请方地点",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "申请用户ID",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "申请方名称",
+                    "type": "string"
+                }
+            }
+        },
+        "models.BuyOrder": {
+            "type": "object",
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "buyusername": {
+                    "description": "买方",
+                    "type": "string"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "ordertime": {
+                    "description": "委托时间",
+                    "type": "string"
+                },
+                "origin": {
+                    "description": "原产地",
                     "type": "string"
                 },
                 "performancetemplateid": {
@@ -33321,6 +33686,247 @@ const docTemplate = `{
                 }
             }
         },
+        "models.GGzbscposition": {
+            "type": "object",
+            "required": [
+                "userid"
+            ],
+            "properties": {
+                "countryname": {
+                    "description": "产销国",
+                    "type": "string"
+                },
+                "currencyname": {
+                    "description": "币制",
+                    "type": "string"
+                },
+                "customsno": {
+                    "description": "报关单号",
+                    "type": "string"
+                },
+                "customsvalue": {
+                    "description": "报关总值",
+                    "type": "number"
+                },
+                "executionflag": {
+                    "description": "海关执行标志",
+                    "type": "string"
+                },
+                "freezenetweightct": {
+                    "description": "冻结净重(克拉)",
+                    "type": "number"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "string"
+                },
+                "goodsname": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsnum": {
+                    "description": "商品编号",
+                    "type": "string"
+                },
+                "goodsspec": {
+                    "description": "规格型号",
+                    "type": "string"
+                },
+                "jckdate": {
+                    "description": "进口日期",
+                    "type": "string"
+                },
+                "legalunit": {
+                    "description": "法定计量单位",
+                    "type": "string"
+                },
+                "netweightct": {
+                    "description": "净重(克拉)",
+                    "type": "number"
+                },
+                "netweightgm": {
+                    "description": "净重(克)",
+                    "type": "number"
+                },
+                "oricustomsvalue": {
+                    "description": "期初报关总值",
+                    "type": "number"
+                },
+                "orifreezeweight": {
+                    "description": "期初冻结净重(克拉)",
+                    "type": "number"
+                },
+                "orinetweightct": {
+                    "description": "期初净重(克拉)",
+                    "type": "number"
+                },
+                "orinetweightgm": {
+                    "description": "期初净重(克)",
+                    "type": "number"
+                },
+                "oritotalprice": {
+                    "description": "期初总价",
+                    "type": "number"
+                },
+                "reportunit": {
+                    "description": "申报计量单位",
+                    "type": "string"
+                },
+                "storageperiod": {
+                    "description": "存储(监管)期限",
+                    "type": "string"
+                },
+                "totalprice": {
+                    "description": "总价",
+                    "type": "number"
+                },
+                "unitprice": {
+                    "description": "单价",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.GGzbscusermonthpay": {
+            "type": "object",
+            "required": [
+                "userid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "confirmtime": {
+                    "description": "确认时间",
+                    "type": "string"
+                },
+                "handlestatus": {
+                    "description": "处理状态",
+                    "type": "integer"
+                },
+                "infee": {
+                    "description": "进仓报关费",
+                    "type": "number"
+                },
+                "innum": {
+                    "description": "进仓报关单数",
+                    "type": "number"
+                },
+                "outfee": {
+                    "description": "出仓报关费",
+                    "type": "number"
+                },
+                "outnum": {
+                    "description": "出仓报关单数",
+                    "type": "number"
+                },
+                "paymode": {
+                    "description": "支付方式 - 1:线上 2:线下(枚举:GZBSCPayMode)",
+                    "type": "integer"
+                },
+                "paystatus": {
+                    "description": "支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)",
+                    "type": "integer"
+                },
+                "paytime": {
+                    "description": "支付时间",
+                    "type": "string"
+                },
+                "powerfee": {
+                    "description": "分拣室电费",
+                    "type": "number"
+                },
+                "premium": {
+                    "description": "保险费",
+                    "type": "number"
+                },
+                "rentdays": {
+                    "description": "月租天数",
+                    "type": "integer"
+                },
+                "servicefee": {
+                    "description": "分拣室服务费",
+                    "type": "number"
+                },
+                "startdate": {
+                    "description": "协议起始日",
+                    "type": "string"
+                },
+                "storagefee": {
+                    "description": "仓储费",
+                    "type": "number"
+                },
+                "totalfee": {
+                    "description": "合计费用",
+                    "type": "number"
+                },
+                "trademonth": {
+                    "description": "月份(yyyMM)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.GGzbscuserpowerfee": {
+            "type": "object",
+            "required": [
+                "trademonth",
+                "userid"
+            ],
+            "properties": {
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "endpower": {
+                    "description": "月末初数",
+                    "type": "number"
+                },
+                "instrumentno": {
+                    "description": "仪表编号",
+                    "type": "number"
+                },
+                "powerfee": {
+                    "description": "电费(元)",
+                    "type": "number"
+                },
+                "powerfeeid": {
+                    "description": "电费单ID(809+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
+                "powernum": {
+                    "description": "本月用量",
+                    "type": "number"
+                },
+                "powerunit": {
+                    "description": "单位",
+                    "type": "number"
+                },
+                "startpower": {
+                    "description": "月初读数",
+                    "type": "number"
+                },
+                "trademonth": {
+                    "description": "月份(yyyMM)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "使用单位",
+                    "type": "number"
+                }
+            }
+        },
         "models.GThjinvesotrdeposit": {
             "type": "object",
             "required": [

+ 622 - 16
docs/swagger.json

@@ -9284,7 +9284,7 @@
                     "application/json"
                 ],
                 "tags": [
-                    "铁合金"
+                    "广钻"
                 ],
                 "summary": "保税仓出库申请明细附表查询",
                 "parameters": [
@@ -9334,6 +9334,74 @@
                 }
             }
         },
+        "/Guangzuan/QueryBscinoutorder": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "保税仓本月进口明细/本月出境明细/本月转厂明细查询",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "申请ID",
+                        "name": "orderid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "进出口月份(yyyMM)",
+                        "name": "jckdate",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Bscinoutorder"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryBuyOrder": {
             "get": {
                 "security": [
@@ -9840,6 +9908,60 @@
                 }
             }
         },
+        "/Guangzuan/QueryGzbscPosition": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "保税商品报关头寸表查询",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.GGzbscposition"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryGzbscinOutOrder": {
             "get": {
                 "security": [
@@ -9851,7 +9973,7 @@
                     "application/json"
                 ],
                 "tags": [
-                    "铁合金"
+                    "广钻"
                 ],
                 "summary": "保税仓出入库申请表查询",
                 "parameters": [
@@ -9907,6 +10029,127 @@
                 }
             }
         },
+        "/Guangzuan/QueryGzbscusermonthpay": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "保税仓用户月付款通知书表查询(计费管理)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)",
+                        "name": "paystatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.GGzbscusermonthpay"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Guangzuan/QueryGzbscuserpowerfee": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "保税仓月电费登记表查询",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "月份(yyyMM)",
+                        "name": "trademonth",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.GGzbscuserpowerfee"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryGzcjjcorderoperate": {
             "get": {
                 "security": [
@@ -25103,27 +25346,149 @@
                 }
             }
         },
-        "models.BuyOrder": {
+        "models.Bscinoutorder": {
             "type": "object",
+            "required": [
+                "jckdate",
+                "orderid",
+                "userid"
+            ],
             "properties": {
-                "accountid": {
-                    "description": "资金账户ID",
-                    "type": "integer"
-                },
-                "buyusername": {
-                    "description": "买方",
+                "applicanttime": {
+                    "description": "申请时间",
                     "type": "string"
                 },
-                "marketid": {
-                    "description": "市场ID",
-                    "type": "integer"
+                "bagweightgm": {
+                    "description": "连袋重(克)",
+                    "type": "number"
                 },
-                "ordertime": {
-                    "description": "委托时间",
+                "checklistno": {
+                    "description": "核注清单号",
                     "type": "string"
                 },
-                "origin": {
-                    "description": "原产地",
+                "confirmdate": {
+                    "description": "进出仓确认时间",
+                    "type": "string"
+                },
+                "confirmername": {
+                    "description": "进出仓确认人",
+                    "type": "string"
+                },
+                "confirmtradedate": {
+                    "description": "进出仓确认交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "contactname": {
+                    "description": "申请方联系人",
+                    "type": "string"
+                },
+                "contactnum": {
+                    "description": "申请方联系电话",
+                    "type": "string"
+                },
+                "customsno": {
+                    "description": "报关单号",
+                    "type": "string"
+                },
+                "customstotalvalue": {
+                    "description": "报关总值",
+                    "type": "number"
+                },
+                "goodsname": {
+                    "description": "商品名称 - 明细的商品名称拼接(\"/\")",
+                    "type": "string"
+                },
+                "jckdate": {
+                    "description": "进出口日期",
+                    "type": "string"
+                },
+                "logisticscompany": {
+                    "description": "物流公司名称",
+                    "type": "string"
+                },
+                "logisticsno": {
+                    "description": "托运单号",
+                    "type": "string"
+                },
+                "netweightct": {
+                    "description": "净重(克拉)",
+                    "type": "number"
+                },
+                "netweightgm": {
+                    "description": "净重(克)",
+                    "type": "number"
+                },
+                "orderid": {
+                    "description": "申请ID(806+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
+                "ordernum": {
+                    "description": "单据编号",
+                    "type": "string"
+                },
+                "orderstatus": {
+                    "description": "进出仓状态 - 1.待确认 2.待上传 3.报关中 4.进仓中 5.出仓中 20.已关闭 21.确认拒绝(枚举:GZBSCOrderStatus)",
+                    "type": "integer"
+                },
+                "ordertype": {
+                    "description": "单据类型 - 1:进仓 2:出仓(枚举:GZBSCOrderType)",
+                    "type": "integer"
+                },
+                "outtype": {
+                    "description": "出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)",
+                    "type": "integer"
+                },
+                "sealno": {
+                    "description": "进出仓封条号",
+                    "type": "string"
+                },
+                "signeedate": {
+                    "description": "收发货人日期",
+                    "type": "string"
+                },
+                "signeename": {
+                    "description": "收发货人",
+                    "type": "string"
+                },
+                "totalprice": {
+                    "description": "总价",
+                    "type": "number"
+                },
+                "useraddress": {
+                    "description": "申请方地点",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "申请用户ID",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "申请方名称",
+                    "type": "string"
+                }
+            }
+        },
+        "models.BuyOrder": {
+            "type": "object",
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "buyusername": {
+                    "description": "买方",
+                    "type": "string"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "ordertime": {
+                    "description": "委托时间",
+                    "type": "string"
+                },
+                "origin": {
+                    "description": "原产地",
                     "type": "string"
                 },
                 "performancetemplateid": {
@@ -33312,6 +33677,247 @@
                 }
             }
         },
+        "models.GGzbscposition": {
+            "type": "object",
+            "required": [
+                "userid"
+            ],
+            "properties": {
+                "countryname": {
+                    "description": "产销国",
+                    "type": "string"
+                },
+                "currencyname": {
+                    "description": "币制",
+                    "type": "string"
+                },
+                "customsno": {
+                    "description": "报关单号",
+                    "type": "string"
+                },
+                "customsvalue": {
+                    "description": "报关总值",
+                    "type": "number"
+                },
+                "executionflag": {
+                    "description": "海关执行标志",
+                    "type": "string"
+                },
+                "freezenetweightct": {
+                    "description": "冻结净重(克拉)",
+                    "type": "number"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "string"
+                },
+                "goodsname": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsnum": {
+                    "description": "商品编号",
+                    "type": "string"
+                },
+                "goodsspec": {
+                    "description": "规格型号",
+                    "type": "string"
+                },
+                "jckdate": {
+                    "description": "进口日期",
+                    "type": "string"
+                },
+                "legalunit": {
+                    "description": "法定计量单位",
+                    "type": "string"
+                },
+                "netweightct": {
+                    "description": "净重(克拉)",
+                    "type": "number"
+                },
+                "netweightgm": {
+                    "description": "净重(克)",
+                    "type": "number"
+                },
+                "oricustomsvalue": {
+                    "description": "期初报关总值",
+                    "type": "number"
+                },
+                "orifreezeweight": {
+                    "description": "期初冻结净重(克拉)",
+                    "type": "number"
+                },
+                "orinetweightct": {
+                    "description": "期初净重(克拉)",
+                    "type": "number"
+                },
+                "orinetweightgm": {
+                    "description": "期初净重(克)",
+                    "type": "number"
+                },
+                "oritotalprice": {
+                    "description": "期初总价",
+                    "type": "number"
+                },
+                "reportunit": {
+                    "description": "申报计量单位",
+                    "type": "string"
+                },
+                "storageperiod": {
+                    "description": "存储(监管)期限",
+                    "type": "string"
+                },
+                "totalprice": {
+                    "description": "总价",
+                    "type": "number"
+                },
+                "unitprice": {
+                    "description": "单价",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.GGzbscusermonthpay": {
+            "type": "object",
+            "required": [
+                "userid"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "confirmtime": {
+                    "description": "确认时间",
+                    "type": "string"
+                },
+                "handlestatus": {
+                    "description": "处理状态",
+                    "type": "integer"
+                },
+                "infee": {
+                    "description": "进仓报关费",
+                    "type": "number"
+                },
+                "innum": {
+                    "description": "进仓报关单数",
+                    "type": "number"
+                },
+                "outfee": {
+                    "description": "出仓报关费",
+                    "type": "number"
+                },
+                "outnum": {
+                    "description": "出仓报关单数",
+                    "type": "number"
+                },
+                "paymode": {
+                    "description": "支付方式 - 1:线上 2:线下(枚举:GZBSCPayMode)",
+                    "type": "integer"
+                },
+                "paystatus": {
+                    "description": "支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)",
+                    "type": "integer"
+                },
+                "paytime": {
+                    "description": "支付时间",
+                    "type": "string"
+                },
+                "powerfee": {
+                    "description": "分拣室电费",
+                    "type": "number"
+                },
+                "premium": {
+                    "description": "保险费",
+                    "type": "number"
+                },
+                "rentdays": {
+                    "description": "月租天数",
+                    "type": "integer"
+                },
+                "servicefee": {
+                    "description": "分拣室服务费",
+                    "type": "number"
+                },
+                "startdate": {
+                    "description": "协议起始日",
+                    "type": "string"
+                },
+                "storagefee": {
+                    "description": "仓储费",
+                    "type": "number"
+                },
+                "totalfee": {
+                    "description": "合计费用",
+                    "type": "number"
+                },
+                "trademonth": {
+                    "description": "月份(yyyMM)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.GGzbscuserpowerfee": {
+            "type": "object",
+            "required": [
+                "trademonth",
+                "userid"
+            ],
+            "properties": {
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "endpower": {
+                    "description": "月末初数",
+                    "type": "number"
+                },
+                "instrumentno": {
+                    "description": "仪表编号",
+                    "type": "number"
+                },
+                "powerfee": {
+                    "description": "电费(元)",
+                    "type": "number"
+                },
+                "powerfeeid": {
+                    "description": "电费单ID(809+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
+                "powernum": {
+                    "description": "本月用量",
+                    "type": "number"
+                },
+                "powerunit": {
+                    "description": "单位",
+                    "type": "number"
+                },
+                "startpower": {
+                    "description": "月初读数",
+                    "type": "number"
+                },
+                "trademonth": {
+                    "description": "月份(yyyMM)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "使用单位",
+                    "type": "number"
+                }
+            }
+        },
         "models.GThjinvesotrdeposit": {
             "type": "object",
             "required": [

+ 426 - 2
docs/swagger.yaml

@@ -4007,6 +4007,97 @@ definitions:
     - orderid
     - userid
     type: object
+  models.Bscinoutorder:
+    properties:
+      applicanttime:
+        description: 申请时间
+        type: string
+      bagweightgm:
+        description: 连袋重(克)
+        type: number
+      checklistno:
+        description: 核注清单号
+        type: string
+      confirmdate:
+        description: 进出仓确认时间
+        type: string
+      confirmername:
+        description: 进出仓确认人
+        type: string
+      confirmtradedate:
+        description: 进出仓确认交易日(yyyyMMdd)
+        type: string
+      contactname:
+        description: 申请方联系人
+        type: string
+      contactnum:
+        description: 申请方联系电话
+        type: string
+      customsno:
+        description: 报关单号
+        type: string
+      customstotalvalue:
+        description: 报关总值
+        type: number
+      goodsname:
+        description: 商品名称 - 明细的商品名称拼接("/")
+        type: string
+      jckdate:
+        description: 进出口日期
+        type: string
+      logisticscompany:
+        description: 物流公司名称
+        type: string
+      logisticsno:
+        description: 托运单号
+        type: string
+      netweightct:
+        description: 净重(克拉)
+        type: number
+      netweightgm:
+        description: 净重(克)
+        type: number
+      orderid:
+        description: 申请ID(806+Unix秒时间戳(10位)+xxxxxx)
+        type: string
+      ordernum:
+        description: 单据编号
+        type: string
+      orderstatus:
+        description: 进出仓状态 - 1.待确认 2.待上传 3.报关中 4.进仓中 5.出仓中 20.已关闭 21.确认拒绝(枚举:GZBSCOrderStatus)
+        type: integer
+      ordertype:
+        description: 单据类型 - 1:进仓 2:出仓(枚举:GZBSCOrderType)
+        type: integer
+      outtype:
+        description: 出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)
+        type: integer
+      sealno:
+        description: 进出仓封条号
+        type: string
+      signeedate:
+        description: 收发货人日期
+        type: string
+      signeename:
+        description: 收发货人
+        type: string
+      totalprice:
+        description: 总价
+        type: number
+      useraddress:
+        description: 申请方地点
+        type: string
+      userid:
+        description: 申请用户ID
+        type: integer
+      username:
+        description: 申请方名称
+        type: string
+    required:
+    - jckdate
+    - orderid
+    - userid
+    type: object
   models.BuyOrder:
     properties:
       accountid:
@@ -10098,6 +10189,184 @@ definitions:
     - ordertype
     - userid
     type: object
+  models.GGzbscposition:
+    properties:
+      countryname:
+        description: 产销国
+        type: string
+      currencyname:
+        description: 币制
+        type: string
+      customsno:
+        description: 报关单号
+        type: string
+      customsvalue:
+        description: 报关总值
+        type: number
+      executionflag:
+        description: 海关执行标志
+        type: string
+      freezenetweightct:
+        description: 冻结净重(克拉)
+        type: number
+      goodsid:
+        description: 商品ID
+        type: string
+      goodsname:
+        description: 商品名称
+        type: string
+      goodsnum:
+        description: 商品编号
+        type: string
+      goodsspec:
+        description: 规格型号
+        type: string
+      jckdate:
+        description: 进口日期
+        type: string
+      legalunit:
+        description: 法定计量单位
+        type: string
+      netweightct:
+        description: 净重(克拉)
+        type: number
+      netweightgm:
+        description: 净重(克)
+        type: number
+      oricustomsvalue:
+        description: 期初报关总值
+        type: number
+      orifreezeweight:
+        description: 期初冻结净重(克拉)
+        type: number
+      orinetweightct:
+        description: 期初净重(克拉)
+        type: number
+      orinetweightgm:
+        description: 期初净重(克)
+        type: number
+      oritotalprice:
+        description: 期初总价
+        type: number
+      reportunit:
+        description: 申报计量单位
+        type: string
+      storageperiod:
+        description: 存储(监管)期限
+        type: string
+      totalprice:
+        description: 总价
+        type: number
+      unitprice:
+        description: 单价
+        type: number
+      userid:
+        description: 用户ID
+        type: integer
+    required:
+    - userid
+    type: object
+  models.GGzbscusermonthpay:
+    properties:
+      accountid:
+        description: 资金账户ID
+        type: integer
+      confirmtime:
+        description: 确认时间
+        type: string
+      handlestatus:
+        description: 处理状态
+        type: integer
+      infee:
+        description: 进仓报关费
+        type: number
+      innum:
+        description: 进仓报关单数
+        type: number
+      outfee:
+        description: 出仓报关费
+        type: number
+      outnum:
+        description: 出仓报关单数
+        type: number
+      paymode:
+        description: 支付方式 - 1:线上 2:线下(枚举:GZBSCPayMode)
+        type: integer
+      paystatus:
+        description: 支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)
+        type: integer
+      paytime:
+        description: 支付时间
+        type: string
+      powerfee:
+        description: 分拣室电费
+        type: number
+      premium:
+        description: 保险费
+        type: number
+      rentdays:
+        description: 月租天数
+        type: integer
+      servicefee:
+        description: 分拣室服务费
+        type: number
+      startdate:
+        description: 协议起始日
+        type: string
+      storagefee:
+        description: 仓储费
+        type: number
+      totalfee:
+        description: 合计费用
+        type: number
+      trademonth:
+        description: 月份(yyyMM)
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+    required:
+    - userid
+    type: object
+  models.GGzbscuserpowerfee:
+    properties:
+      createtime:
+        description: 创建时间
+        type: string
+      endpower:
+        description: 月末初数
+        type: number
+      instrumentno:
+        description: 仪表编号
+        type: number
+      powerfee:
+        description: 电费(元)
+        type: number
+      powerfeeid:
+        description: 电费单ID(809+Unix秒时间戳(10位)+xxxxxx)
+        type: string
+      powernum:
+        description: 本月用量
+        type: number
+      powerunit:
+        description: 单位
+        type: number
+      startpower:
+        description: 月初读数
+        type: number
+      trademonth:
+        description: 月份(yyyMM)
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+      username:
+        description: 使用单位
+        type: number
+    required:
+    - trademonth
+    - userid
+    type: object
   models.GThjinvesotrdeposit:
     properties:
       depositrate:
@@ -32285,7 +32554,51 @@ paths:
       - ApiKeyAuth: []
       summary: 保税仓出库申请明细附表查询
       tags:
-      - 铁合金
+      - 广钻
+  /Guangzuan/QueryBscinoutorder:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 申请ID
+        in: query
+        name: orderid
+        required: true
+        type: string
+      - description: 进出口月份(yyyMM)
+        in: query
+        name: jckdate
+        required: true
+        type: string
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.Bscinoutorder'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 保税仓本月进口明细/本月出境明细/本月转厂明细查询
+      tags:
+      - 广钻
   /Guangzuan/QueryBuyOrder:
     get:
       parameters:
@@ -32591,6 +32904,40 @@ paths:
       summary: 查询出境检测单据明细(批次信息)
       tags:
       - 广钻
+  /Guangzuan/QueryGzbscPosition:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.GGzbscposition'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 保税商品报关头寸表查询
+      tags:
+      - 广钻
   /Guangzuan/QueryGzbscinOutOrder:
     get:
       parameters:
@@ -32633,7 +32980,84 @@ paths:
       - ApiKeyAuth: []
       summary: 保税仓出入库申请表查询
       tags:
-      - 铁合金
+      - 广钻
+  /Guangzuan/QueryGzbscusermonthpay:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)
+        in: query
+        name: paystatus
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.GGzbscusermonthpay'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 保税仓用户月付款通知书表查询(计费管理)
+      tags:
+      - 广钻
+  /Guangzuan/QueryGzbscuserpowerfee:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 月份(yyyMM)
+        in: query
+        name: trademonth
+        required: true
+        type: string
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.GGzbscuserpowerfee'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 保税仓月电费登记表查询
+      tags:
+      - 广钻
   /Guangzuan/QueryGzcjjcorderoperate:
     get:
       parameters:

+ 327 - 19
models/guangzuan.go

@@ -3751,24 +3751,24 @@ func (r *BScinoutorderdetail) GetDataByPage() (interface{}, error, int, int, int
 
 // BScoutorderdetailatt 保税仓出库申请明细附表
 type BScoutorderdetailatt struct {
-	DETAILATTID          string    `json:"detailattid" xorm:"DETAILATTID"`                           // 明细ID(810+Unix秒时间戳(10位)+xxxxxx)
-	ORDERID              string    `json:"orderid" xorm:"ORDERID" form:"orderid" binding:"required"` // 申请ID
-	GOODSID              int64     `json:"goodsid" xorm:"GOODSID"`                                   // 商品ID
-	CUSTOMSNO            string    `json:"customsno" xorm:"CUSTOMSNO"`                               // 报关单号
-	JCKDATE              time.Time `json:"jckdate" xorm:"JCKDATE"`                                   // 进口日期
-	NETWEIGHTCT          float64   `json:"netweightct" xorm:"NETWEIGHTCT"`                           // 净重(克拉)
-	CURNETWEIGHTCT       float64   `json:"curnetweightct" xorm:"CURNETWEIGHTCT"`                     // 本次扣减量(克拉)
-	REMAINNETWEIGHTCT    float64   `json:"remainnetweightct" xorm:"REMAINNETWEIGHTCT"`               // 结余净重(克拉)
-	NETWEIGHTGM          float64   `json:"netweightgm" xorm:"NETWEIGHTGM"`                           // 净重(克)
-	CURNETWEIGHTGM       float64   `json:"curnetweightgm" xorm:"CURNETWEIGHTGM"`                     // 本次扣减净重(克)
-	REMAINCURNETWEIGHTGM float64   `json:"remaincurnetweightgm" xorm:"REMAINCURNETWEIGHTGM"`         // 结余净重(克)
-	TOTALPRICE           float64   `json:"totalprice" xorm:"TOTALPRICE"`                             // 总价
-	CURTOTALPRICE        float64   `json:"curtotalprice" xorm:"CURTOTALPRICE"`                       // 本次扣减货值
-	REMAINTOTALPRICE     float64   `json:"remaintotalprice" xorm:"REMAINTOTALPRICE"`                 // 结余总价
-	CUSTOMSVALUE         float64   `json:"customsvalue" xorm:"CUSTOMSVALUE"`                         // 报关总值
-	CURCUSTOMSVALUE      float64   `json:"curcustomsvalue" xorm:"CURCUSTOMSVALUE"`                   // 本次扣减货值(报关总值)
-	REMAINCUSTOMSVALUE   float64   `json:"remaincustomsvalue" xorm:"REMAINCUSTOMSVALUE"`             // 结余报关总值
-	USERID               int64     `json:"userid" xorm:"USERID" form:"userid" binding:"required"`    // 用户ID
+	DETAILATTID          string  `json:"detailattid" xorm:"DETAILATTID"`                           // 明细ID(810+Unix秒时间戳(10位)+xxxxxx)
+	ORDERID              string  `json:"orderid" xorm:"ORDERID" form:"orderid" binding:"required"` // 申请ID
+	GOODSID              int64   `json:"goodsid" xorm:"GOODSID"`                                   // 商品ID
+	CUSTOMSNO            string  `json:"customsno" xorm:"CUSTOMSNO"`                               // 报关单号
+	JCKDATE              string  `json:"jckdate" xorm:"JCKDATE"`                                   // 进口日期
+	NETWEIGHTCT          float64 `json:"netweightct" xorm:"NETWEIGHTCT"`                           // 净重(克拉)
+	CURNETWEIGHTCT       float64 `json:"curnetweightct" xorm:"CURNETWEIGHTCT"`                     // 本次扣减量(克拉)
+	REMAINNETWEIGHTCT    float64 `json:"remainnetweightct" xorm:"REMAINNETWEIGHTCT"`               // 结余净重(克拉)
+	NETWEIGHTGM          float64 `json:"netweightgm" xorm:"NETWEIGHTGM"`                           // 净重(克)
+	CURNETWEIGHTGM       float64 `json:"curnetweightgm" xorm:"CURNETWEIGHTGM"`                     // 本次扣减净重(克)
+	REMAINCURNETWEIGHTGM float64 `json:"remaincurnetweightgm" xorm:"REMAINCURNETWEIGHTGM"`         // 结余净重(克)
+	TOTALPRICE           float64 `json:"totalprice" xorm:"TOTALPRICE"`                             // 总价
+	CURTOTALPRICE        float64 `json:"curtotalprice" xorm:"CURTOTALPRICE"`                       // 本次扣减货值
+	REMAINTOTALPRICE     float64 `json:"remaintotalprice" xorm:"REMAINTOTALPRICE"`                 // 结余总价
+	CUSTOMSVALUE         float64 `json:"customsvalue" xorm:"CUSTOMSVALUE"`                         // 报关总值
+	CURCUSTOMSVALUE      float64 `json:"curcustomsvalue" xorm:"CURCUSTOMSVALUE"`                   // 本次扣减货值(报关总值)
+	REMAINCUSTOMSVALUE   float64 `json:"remaincustomsvalue" xorm:"REMAINCUSTOMSVALUE"`             // 结余报关总值
+	USERID               int64   `json:"userid" xorm:"USERID" form:"userid" binding:"required"`    // 用户ID
 
 	GOODSNUM      string    `json:"goodsnum" xorm:"GOODSNUM"`           // 商品编号
 	GOODSNAME     string    `json:"goodsname" xorm:"GOODSNAME"`         // 商品名称
@@ -3817,8 +3817,10 @@ func (r *BScoutorderdetailatt) buildSql() string {
 			a.UNITPRICE,
 			a.CURRENCYNAME,
 			a.EXECUTIONFLAG,
-			a.STORAGEPERIOD
+			a.STORAGEPERIOD,
+			a.GOODSSPEC
 		FROM GZ_BSCOUTORDERDETAILATT t 
+		LEFT JOIN GZ_BSCGoods a ON a.goodsid = t.goodsid 
 		WHERE t.USERID = %v AND t.ORDERID = %v 
 		ORDER BY a.GOODSNAME, t.JCKDATE
 	`
@@ -3839,3 +3841,309 @@ func (r *BScoutorderdetailatt) GetDataByPage() (interface{}, error, int, int, in
 	}
 	return sData, err, r.Page, r.PageSize, total
 }
+
+// GGzbscposition 保税商品报关头寸表
+type GGzbscposition struct {
+	USERID            int64   `json:"userid" xorm:"USERID" form:"userid" binding:"required"` // 用户ID
+	CUSTOMSNO         string  `json:"customsno" xorm:"CUSTOMSNO"`                            // 报关单号
+	GOODSID           string  `json:"goodsid" xorm:"GOODSID"`                                // 商品ID
+	JCKDATE           string  `json:"jckdate" xorm:"JCKDATE"`                                // 进口日期
+	ORINETWEIGHTCT    float64 `json:"orinetweightct" xorm:"ORINETWEIGHTCT"`                  // 期初净重(克拉)
+	ORINETWEIGHTGM    float64 `json:"orinetweightgm" xorm:"ORINETWEIGHTGM"`                  // 期初净重(克)
+	ORITOTALPRICE     float64 `json:"oritotalprice" xorm:"ORITOTALPRICE"`                    // 期初总价
+	ORICUSTOMSVALUE   float64 `json:"oricustomsvalue" xorm:"ORICUSTOMSVALUE"`                // 期初报关总值
+	ORIFREEZEWEIGHT   float64 `json:"orifreezeweight" xorm:"ORIFREEZEWEIGHT"`                // 期初冻结净重(克拉)
+	NETWEIGHTCT       float64 `json:"netweightct" xorm:"NETWEIGHTCT"`                        // 净重(克拉)
+	NETWEIGHTGM       float64 `json:"netweightgm" xorm:"NETWEIGHTGM"`                        // 净重(克)
+	TOTALPRICE        float64 `json:"totalprice" xorm:"TOTALPRICE"`                          // 总价
+	CUSTOMSVALUE      float64 `json:"customsvalue" xorm:"CUSTOMSVALUE"`                      // 报关总值
+	FREEZENETWEIGHTCT float64 `json:"freezenetweightct" xorm:"FREEZENETWEIGHTCT"`            // 冻结净重(克拉)
+
+	GOODSNUM      string    `json:"goodsnum" xorm:"GOODSNUM"`           // 商品编号
+	GOODSNAME     string    `json:"goodsname" xorm:"GOODSNAME"`         // 商品名称
+	GOODSSPEC     string    `json:"goodsspec" xorm:"GOODSSPEC"`         // 规格型号
+	COUNTRYNAME   string    `json:"countryname" xorm:"COUNTRYNAME"`     // 产销国
+	REPORTUNIT    string    `json:"reportunit" xorm:"REPORTUNIT"`       // 申报计量单位
+	LEGALUNIT     string    `json:"legalunit" xorm:"LEGALUNIT"`         // 法定计量单位
+	UNITPRICE     float64   `json:"unitprice" xorm:"UNITPRICE"`         // 单价
+	CURRENCYNAME  string    `json:"currencyname" xorm:"CURRENCYNAME"`   // 币制
+	EXECUTIONFLAG string    `json:"executionflag" xorm:"EXECUTIONFLAG"` // 海关执行标志
+	STORAGEPERIOD time.Time `json:"storageperiod" xorm:"STORAGEPERIOD"` // 存储(监管)期限
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *GGzbscposition) calc() {
+
+}
+
+func (r *GGzbscposition) buildSql() string {
+	var sqlId utils.SQLVal = `
+		SELECT 
+			t.USERID,
+			t.CUSTOMSNO,
+			t.GOODSID,
+			to_char(t.JCKDATE, 'yyyy-mm-dd') JCKDATE,
+			t.ORINETWEIGHTCT,
+			t.ORINETWEIGHTGM,
+			t.ORITOTALPRICE,
+			t.ORICUSTOMSVALUE,
+			t.ORIFREEZEWEIGHT,
+			t.NETWEIGHTCT,
+			t.NETWEIGHTGM,
+			t.TOTALPRICE,
+			t.CUSTOMSVALUE,
+			t.FREEZENETWEIGHTCT,
+			a.GOODSNUM,
+			a.GOODSNAME,
+			a.COUNTRYNAME,
+			a.REPORTUNIT,
+			a.LEGALUNIT,
+			a.UNITPRICE,
+			a.CURRENCYNAME,
+			a.EXECUTIONFLAG,
+			a.STORAGEPERIOD,
+			a.GOODSSPEC
+		FROM GZ_BSCPosition t 
+		LEFT JOIN GZ_BSCGoods a ON a.goodsid = t.goodsid
+		WHERE t.USERID = %v 
+		ORDER BY a.GOODSNAME
+	`
+
+	sqlId.FormatParam(r.USERID)
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *GGzbscposition) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]GGzbscposition, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}
+
+// GGzbscusermonthpay 保税仓用户月付款通知书表
+type GGzbscusermonthpay struct {
+	USERID       int64     `json:"userid" xorm:"USERID" form:"userid" binding:"required"` // 用户ID
+	TRADEMONTH   string    `json:"trademonth" xorm:"TRADEMONTH"`                          // 月份(yyyMM)
+	SERVICEFEE   float64   `json:"servicefee" xorm:"SERVICEFEE"`                          // 分拣室服务费
+	ACCOUNTID    int64     `json:"accountid" xorm:"ACCOUNTID"`                            // 资金账户ID
+	STORAGEFEE   float64   `json:"storagefee" xorm:"STORAGEFEE"`                          // 仓储费
+	PREMIUM      float64   `json:"premium" xorm:"PREMIUM"`                                // 保险费
+	POWERFEE     float64   `json:"powerfee" xorm:"POWERFEE"`                              // 分拣室电费
+	INFEE        float64   `json:"infee" xorm:"INFEE"`                                    // 进仓报关费
+	OUTFEE       float64   `json:"outfee" xorm:"OUTFEE"`                                  // 出仓报关费
+	TOTALFEE     float64   `json:"totalfee" xorm:"TOTALFEE"`                              // 合计费用
+	INNUM        float64   `json:"innum" xorm:"INNUM"`                                    // 进仓报关单数
+	OUTNUM       float64   `json:"outnum" xorm:"OUTNUM"`                                  // 出仓报关单数
+	PAYMODE      int32     `json:"paymode" xorm:"PAYMODE"`                                // 支付方式 - 1:线上 2:线下(枚举:GZBSCPayMode)
+	PAYSTATUS    int32     `json:"paystatus" xorm:"PAYSTATUS" form:"paystatus"`           // 支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)
+	STARTDATE    time.Time `json:"startdate" xorm:"STARTDATE"`                            // 协议起始日
+	RENTDAYS     int32     `json:"rentdays" xorm:"RENTDAYS"`                              // 月租天数
+	CONFIRMTIME  time.Time `json:"confirmtime" xorm:"CONFIRMTIME"`                        // 确认时间
+	PAYTIME      string    `json:"paytime" xorm:"PAYTIME"`                                // 支付时间
+	HANDLESTATUS int32     `json:"handlestatus" xorm:"HANDLESTATUS"`                      // 处理状态
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *GGzbscusermonthpay) calc() {
+
+}
+
+func (r *GGzbscusermonthpay) buildSql() string {
+	var sqlId utils.SQLVal = `
+		SELECT
+			t.USERID,
+			t.TRADEMONTH,
+			t.SERVICEFEE,
+			t.ACCOUNTID,
+			t.STORAGEFEE,
+			t.PREMIUM,
+			t.POWERFEE,
+			t.INFEE,
+			t.OUTFEE,
+			t.TOTALFEE,
+			t.INNUM,
+			t.OUTNUM,
+			t.PAYMODE,
+			t.PAYSTATUS,
+			t.STARTDATE,
+			t.RENTDAYS,
+			t.CONFIRMTIME,
+			to_char(t.PAYTIME, 'yyyy-mm-dd hh24:mi:ss') PAYTIME,
+			t.HANDLESTATUS
+		FROM GZ_BSCUserMonthPay t 
+		WHERE t.userid = %v 
+	`
+
+	sqlId.FormatParam(r.USERID)
+	sqlId.AndEx("t.PAYSTATUS", r.PAYSTATUS, r.PAYSTATUS != 0)
+	sqlId.OrderByDesc("t.TradeMonth")
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *GGzbscusermonthpay) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]GGzbscusermonthpay, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}
+
+// GGzbscuserpowerfee 保税仓月电费登记表
+type GGzbscuserpowerfee struct {
+	POWERFEEID   string    `json:"powerfeeid" xorm:"POWERFEEID"`                                      // 电费单ID(809+Unix秒时间戳(10位)+xxxxxx)
+	USERID       int64     `json:"userid" xorm:"USERID" form:"userid" binding:"required"`             // 用户ID
+	TRADEMONTH   string    `json:"trademonth" xorm:"TRADEMONTH" form:"trademonth" binding:"required"` // 月份(yyyMM)
+	INSTRUMENTNO float64   `json:"instrumentno" xorm:"INSTRUMENTNO"`                                  // 仪表编号
+	USERNAME     float64   `json:"username" xorm:"USERNAME"`                                          // 使用单位
+	STARTPOWER   float64   `json:"startpower" xorm:"STARTPOWER"`                                      // 月初读数
+	ENDPOWER     float64   `json:"endpower" xorm:"ENDPOWER"`                                          // 月末初数
+	POWERNUM     float64   `json:"powernum" xorm:"POWERNUM"`                                          // 本月用量
+	POWERUNIT    float64   `json:"powerunit" xorm:"POWERUNIT"`                                        // 单位
+	POWERFEE     float64   `json:"powerfee" xorm:"POWERFEE"`                                          // 电费(元)
+	CREATETIME   time.Time `json:"createtime" xorm:"CREATETIME"`                                      // 创建时间
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *GGzbscuserpowerfee) calc() {
+
+}
+
+func (r *GGzbscuserpowerfee) buildSql() string {
+	var sqlId utils.SQLVal = `
+		SELECT
+			to_char(t.POWERFEEID) POWERFEEID,
+			t.USERID,
+			t.TRADEMONTH,
+			t.INSTRUMENTNO,
+			t.USERNAME,
+			t.STARTPOWER,
+			t.ENDPOWER,
+			t.POWERNUM,
+			t.POWERUNIT,
+			t.POWERFEE,
+			t.CREATETIME
+		FROM GZ_BSCUserPowerFee t 
+		WHERE t.userid = %v AND t.TRADEMONTH = %v 
+		ORDER BY t.INSTRUMENTNO DESC
+	`
+
+	sqlId.FormatParam(r.USERID)
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *GGzbscuserpowerfee) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]GGzbscuserpowerfee, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}
+
+// Bscinoutorder 本月进口明细/本月出境明细/本月转厂明细
+type Bscinoutorder struct {
+	ORDERID           string    `json:"orderid" xorm:"ORDERID" form:"orderid" binding:"required"`  // 申请ID(806+Unix秒时间戳(10位)+xxxxxx)
+	ORDERTYPE         int32     `json:"ordertype" xorm:"ORDERTYPE"`                                // 单据类型 - 1:进仓 2:出仓(枚举:GZBSCOrderType)
+	USERID            int64     `json:"userid" xorm:"USERID" form:"userid" binding:"required"`     // 申请用户ID
+	USERNAME          string    `json:"username" xorm:"USERNAME"`                                  // 申请方名称
+	USERADDRESS       string    `json:"useraddress" xorm:"USERADDRESS"`                            // 申请方地点
+	CONTACTNAME       string    `json:"contactname" xorm:"CONTACTNAME"`                            // 申请方联系人
+	CONTACTNUM        string    `json:"contactnum" xorm:"CONTACTNUM"`                              // 申请方联系电话
+	LOGISTICSCOMPANY  string    `json:"logisticscompany" xorm:"LOGISTICSCOMPANY"`                  // 物流公司名称
+	LOGISTICSNO       string    `json:"logisticsno" xorm:"LOGISTICSNO"`                            // 托运单号
+	APPLICANTTIME     time.Time `json:"applicanttime" xorm:"APPLICANTTIME"`                        // 申请时间
+	OUTTYPE           int32     `json:"outtype" xorm:"OUTTYPE"`                                    // 出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)
+	ORDERSTATUS       int32     `json:"orderstatus" xorm:"ORDERSTATUS"`                            // 进出仓状态 - 1.待确认 2.待上传 3.报关中 4.进仓中 5.出仓中 20.已关闭 21.确认拒绝(枚举:GZBSCOrderStatus)
+	JCKDATE           string    `json:"jckdate" xorm:"JCKDATE" form:"jckdate"  binding:"required"` // 进出口日期
+	CUSTOMSNO         string    `json:"customsno" xorm:"CUSTOMSNO"`                                // 报关单号
+	CHECKLISTNO       string    `json:"checklistno" xorm:"CHECKLISTNO"`                            // 核注清单号
+	SIGNEENAME        string    `json:"signeename" xorm:"SIGNEENAME"`                              // 收发货人
+	SIGNEEDATE        time.Time `json:"signeedate" xorm:"SIGNEEDATE"`                              // 收发货人日期
+	SEALNO            string    `json:"sealno" xorm:"SEALNO"`                                      // 进出仓封条号
+	CONFIRMERNAME     string    `json:"confirmername" xorm:"CONFIRMERNAME"`                        // 进出仓确认人
+	CONFIRMDATE       time.Time `json:"confirmdate" xorm:"CONFIRMDATE"`                            // 进出仓确认时间
+	CONFIRMTRADEDATE  string    `json:"confirmtradedate" xorm:"CONFIRMTRADEDATE"`                  // 进出仓确认交易日(yyyyMMdd)
+	NETWEIGHTCT       float64   `json:"netweightct" xorm:"NETWEIGHTCT"`                            // 净重(克拉)
+	NETWEIGHTGM       float64   `json:"netweightgm" xorm:"NETWEIGHTGM"`                            // 净重(克)
+	BAGWEIGHTGM       float64   `json:"bagweightgm" xorm:"BAGWEIGHTGM"`                            // 连袋重(克)
+	TOTALPRICE        float64   `json:"totalprice" xorm:"TOTALPRICE"`                              // 总价
+	CUSTOMSTOTALVALUE float64   `json:"customstotalvalue" xorm:"CUSTOMSTOTALVALUE"`                // 报关总值
+	GOODSNAME         string    `json:"goodsname" xorm:"GOODSNAME"`                                // 商品名称 - 明细的商品名称拼接("/")
+	ORDERNUM          string    `json:"ordernum" xorm:"ORDERNUM"`                                  // 单据编号
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *Bscinoutorder) calc() {
+
+}
+
+func (r *Bscinoutorder) buildSql() string {
+	var sqlId utils.SQLVal = `
+		SELECT 
+			to_char(t.ORDERID) ORDERID,
+			t.ORDERTYPE,
+			t.USERID,
+			t.USERNAME,
+			t.USERADDRESS,
+			t.CONTACTNAME,
+			t.CONTACTNUM,
+			t.LOGISTICSCOMPANY,
+			t.LOGISTICSNO,
+			t.APPLICANTTIME,
+			t.OUTTYPE,
+			t.ORDERSTATUS,
+			to_char(t.JCKDATE, 'yyyy-mm-dd') JCKDATE,
+			t.CUSTOMSNO,
+			t.CHECKLISTNO,
+			t.SIGNEENAME,
+			t.SIGNEEDATE,
+			t.SEALNO,
+			t.CONFIRMERNAME,
+			t.CONFIRMDATE,
+			t.CONFIRMTRADEDATE,
+			t.NETWEIGHTCT,
+			t.NETWEIGHTGM,
+			t.BAGWEIGHTGM,
+			t.TOTALPRICE,
+			t.CUSTOMSTOTALVALUE,
+			t.GOODSNAME,
+			t.ORDERNUM
+		FROM GZ_BSCINOUTORDER t
+		WHERE t.orderid = %v AND t.userid = %v AND to_char(t.JCKDATE, 'yyyymm') = '%v' 
+	`
+
+	sqlId.FormatParam(r.ORDERID, r.USERID, r.JCKDATE)
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *Bscinoutorder) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]Bscinoutorder, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}

+ 143 - 35
models/ori.go

@@ -346,41 +346,41 @@ func (r *Thjinvesotrdepositlog) TableName() string {
 }
 
 // Gzbscinoutorder 保税仓出入库申请表
-type Gzbscinoutorder struct {
-	ORDERID           int64     `json:"orderid" xorm:"ORDERID"`                     // 申请ID(806+Unix秒时间戳(10位)+xxxxxx)
-	ORDERTYPE         int32     `json:"ordertype" xorm:"ORDERTYPE"`                 // 单据类型 - 1:进仓 2:出仓(枚举:GZBSCOrderType)
-	USERID            int64     `json:"userid" xorm:"USERID"`                       // 申请用户ID
-	USERNAME          string    `json:"username" xorm:"USERNAME"`                   // 申请方名称
-	USERADDRESS       string    `json:"useraddress" xorm:"USERADDRESS"`             // 申请方地点
-	CONTACTNAME       string    `json:"contactname" xorm:"CONTACTNAME"`             // 申请方联系人
-	CONTACTNUM        string    `json:"contactnum" xorm:"CONTACTNUM"`               // 申请方联系电话
-	LOGISTICSCOMPANY  string    `json:"logisticscompany" xorm:"LOGISTICSCOMPANY"`   // 物流公司名称
-	LOGISTICSNO       string    `json:"logisticsno" xorm:"LOGISTICSNO"`             // 托运单号
-	APPLICANTTIME     time.Time `json:"applicanttime" xorm:"APPLICANTTIME"`         // 申请时间
-	OUTTYPE           int32     `json:"outtype" xorm:"OUTTYPE"`                     // 出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)
-	ORDERSTATUS       int32     `json:"orderstatus" xorm:"ORDERSTATUS"`             // 进出仓状态 - 1.待确认 2.待上传 3.报关中 4.进仓中 5.出仓中 20.已关闭 21.确认拒绝(枚举:GZBSCOrderStatus)
-	JCKDATE           time.Time `json:"jckdate" xorm:"JCKDATE"`                     // 进出口日期
-	CUSTOMSNO         string    `json:"customsno" xorm:"CUSTOMSNO"`                 // 报关单号
-	CHECKLISTNO       string    `json:"checklistno" xorm:"CHECKLISTNO"`             // 核注清单号
-	SIGNEENAME        string    `json:"signeename" xorm:"SIGNEENAME"`               // 收发货人
-	SIGNEEDATE        time.Time `json:"signeedate" xorm:"SIGNEEDATE"`               // 收发货人日期
-	SEALNO            string    `json:"sealno" xorm:"SEALNO"`                       // 进出仓封条号
-	CONFIRMERNAME     string    `json:"confirmername" xorm:"CONFIRMERNAME"`         // 进出仓确认人
-	CONFIRMDATE       time.Time `json:"confirmdate" xorm:"CONFIRMDATE"`             // 进出仓确认时间
-	CONFIRMTRADEDATE  string    `json:"confirmtradedate" xorm:"CONFIRMTRADEDATE"`   // 进出仓确认交易日(yyyyMMdd)
-	NETWEIGHTCT       float64   `json:"netweightct" xorm:"NETWEIGHTCT"`             // 净重(克拉)
-	NETWEIGHTGM       float64   `json:"netweightgm" xorm:"NETWEIGHTGM"`             // 净重(克)
-	BAGWEIGHTGM       float64   `json:"bagweightgm" xorm:"BAGWEIGHTGM"`             // 连袋重(克)
-	TOTALPRICE        float64   `json:"totalprice" xorm:"TOTALPRICE"`               // 总价
-	CUSTOMSTOTALVALUE float64   `json:"customstotalvalue" xorm:"CUSTOMSTOTALVALUE"` // 报关总值
-	GOODSNAME         string    `json:"goodsname" xorm:"GOODSNAME"`                 // 商品名称 - 明细的商品名称拼接("/")
-	ORDERNUM          string    `json:"ordernum" xorm:"ORDERNUM"`                   // 单据编号
-}
-
-// TableName is GZ_BSCINOUTORDER
-func (r *Gzbscinoutorder) TableName() string {
-	return "GZ_BSCINOUTORDER"
-}
+// type Gzbscinoutorder struct {
+// 	ORDERID           int64     `json:"orderid" xorm:"ORDERID"`                     // 申请ID(806+Unix秒时间戳(10位)+xxxxxx)
+// 	ORDERTYPE         int32     `json:"ordertype" xorm:"ORDERTYPE"`                 // 单据类型 - 1:进仓 2:出仓(枚举:GZBSCOrderType)
+// 	USERID            int64     `json:"userid" xorm:"USERID"`                       // 申请用户ID
+// 	USERNAME          string    `json:"username" xorm:"USERNAME"`                   // 申请方名称
+// 	USERADDRESS       string    `json:"useraddress" xorm:"USERADDRESS"`             // 申请方地点
+// 	CONTACTNAME       string    `json:"contactname" xorm:"CONTACTNAME"`             // 申请方联系人
+// 	CONTACTNUM        string    `json:"contactnum" xorm:"CONTACTNUM"`               // 申请方联系电话
+// 	LOGISTICSCOMPANY  string    `json:"logisticscompany" xorm:"LOGISTICSCOMPANY"`   // 物流公司名称
+// 	LOGISTICSNO       string    `json:"logisticsno" xorm:"LOGISTICSNO"`             // 托运单号
+// 	APPLICANTTIME     time.Time `json:"applicanttime" xorm:"APPLICANTTIME"`         // 申请时间
+// 	OUTTYPE           int32     `json:"outtype" xorm:"OUTTYPE"`                     // 出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)
+// 	ORDERSTATUS       int32     `json:"orderstatus" xorm:"ORDERSTATUS"`             // 进出仓状态 - 1.待确认 2.待上传 3.报关中 4.进仓中 5.出仓中 20.已关闭 21.确认拒绝(枚举:GZBSCOrderStatus)
+// 	JCKDATE           time.Time `json:"jckdate" xorm:"JCKDATE"`                     // 进出口日期
+// 	CUSTOMSNO         string    `json:"customsno" xorm:"CUSTOMSNO"`                 // 报关单号
+// 	CHECKLISTNO       string    `json:"checklistno" xorm:"CHECKLISTNO"`             // 核注清单号
+// 	SIGNEENAME        string    `json:"signeename" xorm:"SIGNEENAME"`               // 收发货人
+// 	SIGNEEDATE        time.Time `json:"signeedate" xorm:"SIGNEEDATE"`               // 收发货人日期
+// 	SEALNO            string    `json:"sealno" xorm:"SEALNO"`                       // 进出仓封条号
+// 	CONFIRMERNAME     string    `json:"confirmername" xorm:"CONFIRMERNAME"`         // 进出仓确认人
+// 	CONFIRMDATE       time.Time `json:"confirmdate" xorm:"CONFIRMDATE"`             // 进出仓确认时间
+// 	CONFIRMTRADEDATE  string    `json:"confirmtradedate" xorm:"CONFIRMTRADEDATE"`   // 进出仓确认交易日(yyyyMMdd)
+// 	NETWEIGHTCT       float64   `json:"netweightct" xorm:"NETWEIGHTCT"`             // 净重(克拉)
+// 	NETWEIGHTGM       float64   `json:"netweightgm" xorm:"NETWEIGHTGM"`             // 净重(克)
+// 	BAGWEIGHTGM       float64   `json:"bagweightgm" xorm:"BAGWEIGHTGM"`             // 连袋重(克)
+// 	TOTALPRICE        float64   `json:"totalprice" xorm:"TOTALPRICE"`               // 总价
+// 	CUSTOMSTOTALVALUE float64   `json:"customstotalvalue" xorm:"CUSTOMSTOTALVALUE"` // 报关总值
+// 	GOODSNAME         string    `json:"goodsname" xorm:"GOODSNAME"`                 // 商品名称 - 明细的商品名称拼接("/")
+// 	ORDERNUM          string    `json:"ordernum" xorm:"ORDERNUM"`                   // 单据编号
+// }
+
+// // TableName is GZ_BSCINOUTORDER
+// func (r *Gzbscinoutorder) TableName() string {
+// 	return "GZ_BSCINOUTORDER"
+// }
 
 // Gzbscinoutorderdetail 保税仓出入库申请明细表
 type Gzbscinoutorderdetail struct {
@@ -454,3 +454,111 @@ type Gzbscoutorderdetailatt struct {
 func (r *Gzbscoutorderdetailatt) TableName() string {
 	return "GZ_BSCOUTORDERDETAILATT"
 }
+
+// Gzbscposition 保税商品报关头寸表
+type Gzbscposition struct {
+	USERID            int64     `json:"userid" xorm:"USERID"`                       // 用户ID
+	CUSTOMSNO         string    `json:"customsno" xorm:"CUSTOMSNO"`                 // 报关单号
+	GOODSID           string    `json:"goodsid" xorm:"GOODSID"`                     // 商品ID
+	JCKDATE           time.Time `json:"jckdate" xorm:"JCKDATE"`                     // 进口日期
+	ORINETWEIGHTCT    float64   `json:"orinetweightct" xorm:"ORINETWEIGHTCT"`       // 期初净重(克拉)
+	ORINETWEIGHTGM    float64   `json:"orinetweightgm" xorm:"ORINETWEIGHTGM"`       // 期初净重(克)
+	ORITOTALPRICE     float64   `json:"oritotalprice" xorm:"ORITOTALPRICE"`         // 期初总价
+	ORICUSTOMSVALUE   float64   `json:"oricustomsvalue" xorm:"ORICUSTOMSVALUE"`     // 期初报关总值
+	ORIFREEZEWEIGHT   float64   `json:"orifreezeweight" xorm:"ORIFREEZEWEIGHT"`     // 期初冻结净重(克拉)
+	NETWEIGHTCT       float64   `json:"netweightct" xorm:"NETWEIGHTCT"`             // 净重(克拉)
+	NETWEIGHTGM       float64   `json:"netweightgm" xorm:"NETWEIGHTGM"`             // 净重(克)
+	TOTALPRICE        float64   `json:"totalprice" xorm:"TOTALPRICE"`               // 总价
+	CUSTOMSVALUE      float64   `json:"customsvalue" xorm:"CUSTOMSVALUE"`           // 报关总值
+	FREEZENETWEIGHTCT float64   `json:"freezenetweightct" xorm:"FREEZENETWEIGHTCT"` // 冻结净重(克拉)
+}
+
+// TableName is GZ_BSCPOSITION
+func (r *Gzbscposition) TableName() string {
+	return "GZ_BSCPOSITION"
+}
+
+// Gzbscusermonthpay 保税仓用户月付款通知书表
+type Gzbscusermonthpay struct {
+	USERID       int64     `json:"userid" xorm:"USERID"`             // 用户ID
+	TRADEMONTH   string    `json:"trademonth" xorm:"TRADEMONTH"`     // 月份(yyyMM)
+	SERVICEFEE   float64   `json:"servicefee" xorm:"SERVICEFEE"`     // 分拣室服务费
+	ACCOUNTID    int64     `json:"accountid" xorm:"ACCOUNTID"`       // 资金账户ID
+	STORAGEFEE   float64   `json:"storagefee" xorm:"STORAGEFEE"`     // 仓储费
+	PREMIUM      float64   `json:"premium" xorm:"PREMIUM"`           // 保险费
+	POWERFEE     float64   `json:"powerfee" xorm:"POWERFEE"`         // 分拣室电费
+	INFEE        float64   `json:"infee" xorm:"INFEE"`               // 进仓报关费
+	OUTFEE       float64   `json:"outfee" xorm:"OUTFEE"`             // 出仓报关费
+	TOTALFEE     float64   `json:"totalfee" xorm:"TOTALFEE"`         // 合计费用
+	INNUM        float64   `json:"innum" xorm:"INNUM"`               // 进仓报关单数
+	OUTNUM       float64   `json:"outnum" xorm:"OUTNUM"`             // 出仓报关单数
+	PAYMODE      int32     `json:"paymode" xorm:"PAYMODE"`           // 支付方式 - 1:线上 2:线下(枚举:GZBSCPayMode)
+	PAYSTATUS    int32     `json:"paystatus" xorm:"PAYSTATUS"`       // 支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)
+	STARTDATE    time.Time `json:"startdate" xorm:"STARTDATE"`       // 协议起始日
+	RENTDAYS     int32     `json:"rentdays" xorm:"RENTDAYS"`         // 月租天数
+	CONFIRMTIME  time.Time `json:"confirmtime" xorm:"CONFIRMTIME"`   // 确认时间
+	PAYTIME      time.Time `json:"paytime" xorm:"PAYTIME"`           // 支付时间
+	HANDLESTATUS int32     `json:"handlestatus" xorm:"HANDLESTATUS"` // 处理状态
+}
+
+// TableName is GZ_BSCUSERMONTHPAY
+func (r *Gzbscusermonthpay) TableName() string {
+	return "GZ_BSCUSERMONTHPAY"
+}
+
+// Gzbscuserpowerfee 保税仓月电费登记表
+type Gzbscuserpowerfee struct {
+	POWERFEEID   int64     `json:"powerfeeid" xorm:"POWERFEEID"`     // 电费单ID(809+Unix秒时间戳(10位)+xxxxxx)
+	USERID       int64     `json:"userid" xorm:"USERID"`             // 用户ID
+	TRADEMONTH   string    `json:"trademonth" xorm:"TRADEMONTH"`     // 月份(yyyMM)
+	INSTRUMENTNO float64   `json:"instrumentno" xorm:"INSTRUMENTNO"` // 仪表编号
+	USERNAME     float64   `json:"username" xorm:"USERNAME"`         // 使用单位
+	STARTPOWER   float64   `json:"startpower" xorm:"STARTPOWER"`     // 月初读数
+	ENDPOWER     float64   `json:"endpower" xorm:"ENDPOWER"`         // 月末初数
+	POWERNUM     float64   `json:"powernum" xorm:"POWERNUM"`         // 本月用量
+	POWERUNIT    float64   `json:"powerunit" xorm:"POWERUNIT"`       // 单位
+	POWERFEE     float64   `json:"powerfee" xorm:"POWERFEE"`         // 电费(元)
+	CREATETIME   time.Time `json:"createtime" xorm:"CREATETIME"`     // 创建时间
+}
+
+// TableName is GZ_BSCUSERPOWERFEE
+func (r *Gzbscuserpowerfee) TableName() string {
+	return "GZ_BSCUSERPOWERFEE"
+}
+
+// Gzbscinoutorder 保税仓出入库申请表
+type Gzbscinoutorder struct {
+	ORDERID           int64     `json:"orderid" xorm:"ORDERID"`                     // 申请ID(806+Unix秒时间戳(10位)+xxxxxx)
+	ORDERTYPE         int32     `json:"ordertype" xorm:"ORDERTYPE"`                 // 单据类型 - 1:进仓 2:出仓(枚举:GZBSCOrderType)
+	USERID            int64     `json:"userid" xorm:"USERID"`                       // 申请用户ID
+	USERNAME          string    `json:"username" xorm:"USERNAME"`                   // 申请方名称
+	USERADDRESS       string    `json:"useraddress" xorm:"USERADDRESS"`             // 申请方地点
+	CONTACTNAME       string    `json:"contactname" xorm:"CONTACTNAME"`             // 申请方联系人
+	CONTACTNUM        string    `json:"contactnum" xorm:"CONTACTNUM"`               // 申请方联系电话
+	LOGISTICSCOMPANY  string    `json:"logisticscompany" xorm:"LOGISTICSCOMPANY"`   // 物流公司名称
+	LOGISTICSNO       string    `json:"logisticsno" xorm:"LOGISTICSNO"`             // 托运单号
+	APPLICANTTIME     time.Time `json:"applicanttime" xorm:"APPLICANTTIME"`         // 申请时间
+	OUTTYPE           int32     `json:"outtype" xorm:"OUTTYPE"`                     // 出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)
+	ORDERSTATUS       int32     `json:"orderstatus" xorm:"ORDERSTATUS"`             // 进出仓状态 - 1.待确认 2.待上传 3.报关中 4.进仓中 5.出仓中 20.已关闭 21.确认拒绝(枚举:GZBSCOrderStatus)
+	JCKDATE           time.Time `json:"jckdate" xorm:"JCKDATE"`                     // 进出口日期
+	CUSTOMSNO         string    `json:"customsno" xorm:"CUSTOMSNO"`                 // 报关单号
+	CHECKLISTNO       string    `json:"checklistno" xorm:"CHECKLISTNO"`             // 核注清单号
+	SIGNEENAME        string    `json:"signeename" xorm:"SIGNEENAME"`               // 收发货人
+	SIGNEEDATE        time.Time `json:"signeedate" xorm:"SIGNEEDATE"`               // 收发货人日期
+	SEALNO            string    `json:"sealno" xorm:"SEALNO"`                       // 进出仓封条号
+	CONFIRMERNAME     string    `json:"confirmername" xorm:"CONFIRMERNAME"`         // 进出仓确认人
+	CONFIRMDATE       time.Time `json:"confirmdate" xorm:"CONFIRMDATE"`             // 进出仓确认时间
+	CONFIRMTRADEDATE  string    `json:"confirmtradedate" xorm:"CONFIRMTRADEDATE"`   // 进出仓确认交易日(yyyyMMdd)
+	NETWEIGHTCT       float64   `json:"netweightct" xorm:"NETWEIGHTCT"`             // 净重(克拉)
+	NETWEIGHTGM       float64   `json:"netweightgm" xorm:"NETWEIGHTGM"`             // 净重(克)
+	BAGWEIGHTGM       float64   `json:"bagweightgm" xorm:"BAGWEIGHTGM"`             // 连袋重(克)
+	TOTALPRICE        float64   `json:"totalprice" xorm:"TOTALPRICE"`               // 总价
+	CUSTOMSTOTALVALUE float64   `json:"customstotalvalue" xorm:"CUSTOMSTOTALVALUE"` // 报关总值
+	GOODSNAME         string    `json:"goodsname" xorm:"GOODSNAME"`                 // 商品名称 - 明细的商品名称拼接("/")
+	ORDERNUM          string    `json:"ordernum" xorm:"ORDERNUM"`                   // 单据编号
+}
+
+// TableName is GZ_BSCINOUTORDER
+func (r *Gzbscinoutorder) TableName() string {
+	return "GZ_BSCINOUTORDER"
+}

+ 5 - 0
routers/router.go

@@ -691,6 +691,11 @@ func InitRouter() *gin.Engine {
 		guangzuanR.GET("QueryGzbscinOutOrder", guangzuan.QueryGzbscinOutOrder)
 		guangzuanR.GET("QueryBScinOutOrderDetail", guangzuan.QueryBScinOutOrderDetail)
 		guangzuanR.GET("QueryBScOutOrderDetailatt", guangzuan.QueryBScOutOrderDetailatt)
+		guangzuanR.GET("QueryGzbscPosition", guangzuan.QueryGzbscPosition)
+		guangzuanR.GET("QueryGzbscusermonthpay", guangzuan.QueryGzbscusermonthpay)
+		guangzuanR.GET("QueryGzbscuserpowerfee", guangzuan.QueryGzbscuserpowerfee)
+		guangzuanR.GET("QueryBscinoutorder", guangzuan.QueryBscinoutorder)
+
 	}
 
 	// **************************上海铁合金*************************