Parcourir la source

1.查询现货商品参数变更申请(流水)
2.查询审核设置接口 增加配置项
3.查询现货商品详情接口 增加权重字段

zou.yingbin il y a 4 ans
Parent
commit
07a5909ba1
6 fichiers modifiés avec 741 ajouts et 0 suppressions
  1. 25 0
      controllers/ermcp3/qryErmcp3.go
  2. 216 0
      docs/docs.go
  3. 216 0
      docs/swagger.json
  4. 156 0
      docs/swagger.yaml
  5. 127 0
      models/ermcp3.go
  6. 1 0
      routers/router.go

+ 25 - 0
controllers/ermcp3/qryErmcp3.go

@@ -647,3 +647,28 @@ func QueryInnerTradeLink(c *gin.Context) {
 	a.DoBindReq(&m)
 	a.DoGetDataI(&m)
 }
+
+// QueryParamChangeApp
+// @Summary 查询现货商品参数变更申请(流水)
+// @Description 原型页面:
+// @Description 1.商品信息->商品参数修改流水-> 增值税税率 | 折算系数 | 成本权重; 流水页面查申请状态为“审核通过”的记录
+// @Description 2.风管审核->套保比例审核 | 折算系数审核 | 增值税税率审核 | 成本权重审核
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Param deliverygoodsid query int false "现货品种id"
+// @Param wrstandardid query int false "现货商品id"
+// @Param middlegoodsid query int false "套保商品id"
+// @Param operatetype query int false "操作类型  1:新增 2:修改"
+// @Param paramchangetype query int false "参数变更类型 - 1:增值税率变更(现货商品) 2:折算系数变更(现货商品) 3:成本权重(现货商品) 4:套保比率变更(套保品种)"
+// @Param ftstatus query string false "申请状态(逗号隔开,如1,2,3) 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回"
+// @Success 200 {array} models.Ermcp3ParamChangeApp
+// @Failure 500 {object} app.Response
+// @Router /Ermcp3/QueryParamChangeApp [get]
+// @Tags 企业风险管理v3(app)
+func QueryParamChangeApp(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.Ermcp3ParamChangeApp{}
+	a.DoBindReq(&m)
+	a.DoGetDataI(&m)
+}

+ 216 - 0
docs/docs.go

@@ -4874,6 +4874,85 @@ var doc = `{
                 }
             }
         },
+        "/Ermcp3/QueryParamChangeApp": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "description": "原型页面:\n1.商品信息-\u003e商品参数修改流水-\u003e 增值税税率 | 折算系数 | 成本权重\n2.风管审核-\u003e套保比例审核 | 折算系数审核 | 增值税税率审核 | 成本权重审核",
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理v3(app)"
+                ],
+                "summary": "查询现货商品参数变更申请(流水)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "现货品种id",
+                        "name": "deliverygoodsid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "现货商品id",
+                        "name": "wrstandardid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "套保商品id",
+                        "name": "middlegoodsid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "操作类型  1:新增 2:修改",
+                        "name": "operatetype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "参数变更类型 - 1:增值税率变更(现货商品) 2:折算系数变更(现货商品) 3:成本权重(现货商品) 4:套保比率变更(套保品种)",
+                        "name": "paramchangetype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "申请状态(逗号隔开,如1,2,3) 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                        "name": "ftstatus",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Ermcp3ParamChangeApp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Ermcp3/QueryRootUserAccount": {
             "get": {
                 "security": [
@@ -21249,6 +21328,10 @@ var doc = `{
                     "description": "采购入库是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
                 },
+                "costratioauditflag": {
+                    "description": "现货商品成本权重修改是否需要审核 - 0:不需审核 1:需要审核",
+                    "type": "integer"
+                },
                 "customerauditflag": {
                     "description": "客户资料是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
@@ -21261,6 +21344,10 @@ var doc = `{
                     "description": "发票是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
                 },
+                "mgneedhedgeratioauditflag": {
+                    "description": "套保品种套保比例修改是否需要审 - 0:不需审核 1:需要审核",
+                    "type": "integer"
+                },
                 "moneyauditflag": {
                     "description": "款项是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
@@ -21289,6 +21376,14 @@ var doc = `{
                     "description": "销售出库是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
                 },
+                "sgconvertratioauditflag": {
+                    "description": "现货商品折算系数修改是否需要审核 - 0:不需审核 1:需要审核",
+                    "type": "integer"
+                },
+                "sgvtaratioauditflag": {
+                    "description": "现货商品增值税税率修改是否需要审核 - 0:不需审核 1:需要审核",
+                    "type": "integer"
+                },
                 "spotcontractauditflag": {
                     "description": "现货合同是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
@@ -21517,6 +21612,119 @@ var doc = `{
                 }
             }
         },
+        "models.Ermcp3ParamChangeApp": {
+            "type": "object",
+            "properties": {
+                "aftervalue": {
+                    "description": "变更后",
+                    "type": "number"
+                },
+                "applicationid": {
+                    "description": "申请ID(619+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
+                "applyid": {
+                    "description": "申请人",
+                    "type": "string"
+                },
+                "applyname": {
+                    "description": "申请人名称(代码)",
+                    "type": "string"
+                },
+                "applyremark": {
+                    "description": "申请备注",
+                    "type": "string"
+                },
+                "applysrc": {
+                    "description": "申请来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "applystatus": {
+                    "description": "申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                    "type": "integer"
+                },
+                "applytime": {
+                    "description": "申请时间",
+                    "type": "string"
+                },
+                "areauserid": {
+                    "description": "所属机构用户ID",
+                    "type": "integer"
+                },
+                "auditid": {
+                    "description": "审核人",
+                    "type": "string"
+                },
+                "auditname": {
+                    "description": "审核人名称(代码)",
+                    "type": "string"
+                },
+                "auditremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "auditsrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "audittradedate": {
+                    "description": "审核交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "beforevalue": {
+                    "description": "变更前",
+                    "type": "number"
+                },
+                "deliverygoodscode": {
+                    "description": "品种代码",
+                    "type": "string"
+                },
+                "deliverygoodsid": {
+                    "description": "品种id",
+                    "type": "integer"
+                },
+                "deliverygoodsname": {
+                    "description": "品种名称",
+                    "type": "string"
+                },
+                "middlegoodscode": {
+                    "description": "套保品种代码",
+                    "type": "string"
+                },
+                "middlegoodsid": {
+                    "description": "套保品种ID [ParamChangeType = 2,3,4]",
+                    "type": "integer"
+                },
+                "middlegoodsname": {
+                    "description": "套保品种名称",
+                    "type": "string"
+                },
+                "operatetype": {
+                    "description": "操作类型 - 1:新增 2:修改",
+                    "type": "integer"
+                },
+                "paramchangetype": {
+                    "description": "参数变更类型 - 1:增值税率变更(现货商品) 2:折算系数变更(现货商品) 3:成本权重(现货商品) 4:套保比率变更(套保品种)",
+                    "type": "integer"
+                },
+                "wrstandardcode": {
+                    "description": "现货商品代码",
+                    "type": "string"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID [ParamChangeType = 1,2,3]",
+                    "type": "integer"
+                },
+                "wrstandardname": {
+                    "description": "现货商品名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.Ermcp3RootUserAccount": {
             "type": "object",
             "properties": {
@@ -35934,6 +36142,14 @@ var doc = `{
                     "description": "拆算系数",
                     "type": "number"
                 },
+                "costratio": {
+                    "description": "成本权重",
+                    "type": "number"
+                },
+                "deliverygoodsid": {
+                    "description": "现货商品id",
+                    "type": "integer"
+                },
                 "enumdicname": {
                     "description": "单位名称",
                     "type": "string"

+ 216 - 0
docs/swagger.json

@@ -4858,6 +4858,85 @@
                 }
             }
         },
+        "/Ermcp3/QueryParamChangeApp": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "description": "原型页面:\n1.商品信息-\u003e商品参数修改流水-\u003e 增值税税率 | 折算系数 | 成本权重\n2.风管审核-\u003e套保比例审核 | 折算系数审核 | 增值税税率审核 | 成本权重审核",
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理v3(app)"
+                ],
+                "summary": "查询现货商品参数变更申请(流水)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "现货品种id",
+                        "name": "deliverygoodsid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "现货商品id",
+                        "name": "wrstandardid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "套保商品id",
+                        "name": "middlegoodsid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "操作类型  1:新增 2:修改",
+                        "name": "operatetype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "参数变更类型 - 1:增值税率变更(现货商品) 2:折算系数变更(现货商品) 3:成本权重(现货商品) 4:套保比率变更(套保品种)",
+                        "name": "paramchangetype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "申请状态(逗号隔开,如1,2,3) 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                        "name": "ftstatus",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Ermcp3ParamChangeApp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Ermcp3/QueryRootUserAccount": {
             "get": {
                 "security": [
@@ -21233,6 +21312,10 @@
                     "description": "采购入库是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
                 },
+                "costratioauditflag": {
+                    "description": "现货商品成本权重修改是否需要审核 - 0:不需审核 1:需要审核",
+                    "type": "integer"
+                },
                 "customerauditflag": {
                     "description": "客户资料是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
@@ -21245,6 +21328,10 @@
                     "description": "发票是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
                 },
+                "mgneedhedgeratioauditflag": {
+                    "description": "套保品种套保比例修改是否需要审 - 0:不需审核 1:需要审核",
+                    "type": "integer"
+                },
                 "moneyauditflag": {
                     "description": "款项是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
@@ -21273,6 +21360,14 @@
                     "description": "销售出库是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
                 },
+                "sgconvertratioauditflag": {
+                    "description": "现货商品折算系数修改是否需要审核 - 0:不需审核 1:需要审核",
+                    "type": "integer"
+                },
+                "sgvtaratioauditflag": {
+                    "description": "现货商品增值税税率修改是否需要审核 - 0:不需审核 1:需要审核",
+                    "type": "integer"
+                },
                 "spotcontractauditflag": {
                     "description": "现货合同是否需要审核 - 0:不需审核 1:需要审核",
                     "type": "integer"
@@ -21501,6 +21596,119 @@
                 }
             }
         },
+        "models.Ermcp3ParamChangeApp": {
+            "type": "object",
+            "properties": {
+                "aftervalue": {
+                    "description": "变更后",
+                    "type": "number"
+                },
+                "applicationid": {
+                    "description": "申请ID(619+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
+                "applyid": {
+                    "description": "申请人",
+                    "type": "string"
+                },
+                "applyname": {
+                    "description": "申请人名称(代码)",
+                    "type": "string"
+                },
+                "applyremark": {
+                    "description": "申请备注",
+                    "type": "string"
+                },
+                "applysrc": {
+                    "description": "申请来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "applystatus": {
+                    "description": "申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                    "type": "integer"
+                },
+                "applytime": {
+                    "description": "申请时间",
+                    "type": "string"
+                },
+                "areauserid": {
+                    "description": "所属机构用户ID",
+                    "type": "integer"
+                },
+                "auditid": {
+                    "description": "审核人",
+                    "type": "string"
+                },
+                "auditname": {
+                    "description": "审核人名称(代码)",
+                    "type": "string"
+                },
+                "auditremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "auditsrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "audittradedate": {
+                    "description": "审核交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "beforevalue": {
+                    "description": "变更前",
+                    "type": "number"
+                },
+                "deliverygoodscode": {
+                    "description": "品种代码",
+                    "type": "string"
+                },
+                "deliverygoodsid": {
+                    "description": "品种id",
+                    "type": "integer"
+                },
+                "deliverygoodsname": {
+                    "description": "品种名称",
+                    "type": "string"
+                },
+                "middlegoodscode": {
+                    "description": "套保品种代码",
+                    "type": "string"
+                },
+                "middlegoodsid": {
+                    "description": "套保品种ID [ParamChangeType = 2,3,4]",
+                    "type": "integer"
+                },
+                "middlegoodsname": {
+                    "description": "套保品种名称",
+                    "type": "string"
+                },
+                "operatetype": {
+                    "description": "操作类型 - 1:新增 2:修改",
+                    "type": "integer"
+                },
+                "paramchangetype": {
+                    "description": "参数变更类型 - 1:增值税率变更(现货商品) 2:折算系数变更(现货商品) 3:成本权重(现货商品) 4:套保比率变更(套保品种)",
+                    "type": "integer"
+                },
+                "wrstandardcode": {
+                    "description": "现货商品代码",
+                    "type": "string"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID [ParamChangeType = 1,2,3]",
+                    "type": "integer"
+                },
+                "wrstandardname": {
+                    "description": "现货商品名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.Ermcp3RootUserAccount": {
             "type": "object",
             "properties": {
@@ -35918,6 +36126,14 @@
                     "description": "拆算系数",
                     "type": "number"
                 },
+                "costratio": {
+                    "description": "成本权重",
+                    "type": "number"
+                },
+                "deliverygoodsid": {
+                    "description": "现货商品id",
+                    "type": "integer"
+                },
                 "enumdicname": {
                     "description": "单位名称",
                     "type": "string"

+ 156 - 0
docs/swagger.yaml

@@ -5633,6 +5633,9 @@ definitions:
       buyinauditflag:
         description: 采购入库是否需要审核 - 0:不需审核 1:需要审核
         type: integer
+      costratioauditflag:
+        description: 现货商品成本权重修改是否需要审核 - 0:不需审核 1:需要审核
+        type: integer
       customerauditflag:
         description: 客户资料是否需要审核 - 0:不需审核 1:需要审核
         type: integer
@@ -5642,6 +5645,9 @@ definitions:
       invoiceauditflag:
         description: 发票是否需要审核 - 0:不需审核 1:需要审核
         type: integer
+      mgneedhedgeratioauditflag:
+        description: 套保品种套保比例修改是否需要审 - 0:不需审核 1:需要审核
+        type: integer
       moneyauditflag:
         description: 款项是否需要审核 - 0:不需审核 1:需要审核
         type: integer
@@ -5663,6 +5669,12 @@ definitions:
       selloutauditflag:
         description: 销售出库是否需要审核 - 0:不需审核 1:需要审核
         type: integer
+      sgconvertratioauditflag:
+        description: 现货商品折算系数修改是否需要审核 - 0:不需审核 1:需要审核
+        type: integer
+      sgvtaratioauditflag:
+        description: 现货商品增值税税率修改是否需要审核 - 0:不需审核 1:需要审核
+        type: integer
       spotcontractauditflag:
         description: 现货合同是否需要审核 - 0:不需审核 1:需要审核
         type: integer
@@ -5832,6 +5844,90 @@ definitions:
         description: 用户名称
         type: string
     type: object
+  models.Ermcp3ParamChangeApp:
+    properties:
+      aftervalue:
+        description: 变更后
+        type: number
+      applicationid:
+        description: 申请ID(619+Unix秒时间戳(10位)+xxxxxx)
+        type: string
+      applyid:
+        description: 申请人
+        type: string
+      applyname:
+        description: 申请人名称(代码)
+        type: string
+      applyremark:
+        description: 申请备注
+        type: string
+      applysrc:
+        description: 申请来源 - 1:管理端 2:终端
+        type: integer
+      applystatus:
+        description: 申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+        type: integer
+      applytime:
+        description: 申请时间
+        type: string
+      areauserid:
+        description: 所属机构用户ID
+        type: integer
+      auditid:
+        description: 审核人
+        type: string
+      auditname:
+        description: 审核人名称(代码)
+        type: string
+      auditremark:
+        description: 审核备注
+        type: string
+      auditsrc:
+        description: 审核来源 - 1:管理端 2:终端
+        type: integer
+      audittime:
+        description: 审核时间
+        type: string
+      audittradedate:
+        description: 审核交易日(yyyyMMdd)
+        type: string
+      beforevalue:
+        description: 变更前
+        type: number
+      deliverygoodscode:
+        description: 品种代码
+        type: string
+      deliverygoodsid:
+        description: 品种id
+        type: integer
+      deliverygoodsname:
+        description: 品种名称
+        type: string
+      middlegoodscode:
+        description: 套保品种代码
+        type: string
+      middlegoodsid:
+        description: 套保品种ID [ParamChangeType = 2,3,4]
+        type: integer
+      middlegoodsname:
+        description: 套保品种名称
+        type: string
+      operatetype:
+        description: 操作类型 - 1:新增 2:修改
+        type: integer
+      paramchangetype:
+        description: 参数变更类型 - 1:增值税率变更(现货商品) 2:折算系数变更(现货商品) 3:成本权重(现货商品) 4:套保比率变更(套保品种)
+        type: integer
+      wrstandardcode:
+        description: 现货商品代码
+        type: string
+      wrstandardid:
+        description: 现货商品ID [ParamChangeType = 1,2,3]
+        type: integer
+      wrstandardname:
+        description: 现货商品名称
+        type: string
+    type: object
   models.Ermcp3RootUserAccount:
     properties:
       accountname:
@@ -16522,6 +16618,12 @@ definitions:
       convertratio:
         description: 拆算系数
         type: number
+      costratio:
+        description: 成本权重
+        type: number
+      deliverygoodsid:
+        description: 现货商品id
+        type: integer
       enumdicname:
         description: 单位名称
         type: string
@@ -21611,6 +21713,60 @@ paths:
       summary: 查询期现关联记录
       tags:
       - 企业风险管理v3(app)
+  /Ermcp3/QueryParamChangeApp:
+    get:
+      description: |-
+        原型页面:
+        1.商品信息->商品参数修改流水-> 增值税税率 | 折算系数 | 成本权重
+        2.风管审核->套保比例审核 | 折算系数审核 | 增值税税率审核 | 成本权重审核
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 现货品种id
+        in: query
+        name: deliverygoodsid
+        type: integer
+      - description: 现货商品id
+        in: query
+        name: wrstandardid
+        type: integer
+      - description: 套保商品id
+        in: query
+        name: middlegoodsid
+        type: integer
+      - description: 操作类型  1:新增 2:修改
+        in: query
+        name: operatetype
+        type: integer
+      - description: 参数变更类型 - 1:增值税率变更(现货商品) 2:折算系数变更(现货商品) 3:成本权重(现货商品) 4:套保比率变更(套保品种)
+        in: query
+        name: paramchangetype
+        type: integer
+      - description: 申请状态(逗号隔开,如1,2,3) 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+        in: query
+        name: ftstatus
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.Ermcp3ParamChangeApp'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询现货商品参数变更申请(流水)
+      tags:
+      - 企业风险管理v3(app)
   /Ermcp3/QueryRootUserAccount:
     get:
       parameters:

+ 127 - 0
models/ermcp3.go

@@ -2321,6 +2321,12 @@ type Ermcp3PaAreaAuditCfg struct {
 	OPERATORSRC           int32  `json:"operatorsrc"  xorm:"OPERATORSRC"`                     // 操作来源 - 1:管理端 2:终端
 	OPERATORID            int64  `json:"operatorid"  xorm:"OPERATORID" form:"operatorid"`     // 操作人
 	UPDATETIME            string `json:"updatetime"  xorm:"UPDATETIME"`                       // 更新时间
+
+	COSTRATIOAUDITFLAG        int32 `json:"costratioauditflag"  xorm:"COSTRATIOAUDITFLAG"`               // 现货商品成本权重修改是否需要审核 - 0:不需审核 1:需要审核
+	MGNEEDHEDGERATIOAUDITFLAG int32 `json:"mgneedhedgeratioauditflag"  xorm:"MGNEEDHEDGERATIOAUDITFLAG"` // 套保品种套保比例修改是否需要审 - 0:不需审核 1:需要审核
+	SGVTARATIOAUDITFLAG       int32 `json:"sgvtaratioauditflag"  xorm:"SGVTARATIOAUDITFLAG"`             // 现货商品增值税税率修改是否需要审核 - 0:不需审核 1:需要审核
+	SGCONVERTRATIOAUDITFLAG   int32 `json:"sgconvertratioauditflag"  xorm:"SGCONVERTRATIOAUDITFLAG"`     // 现货商品折算系数修改是否需要审核 - 0:不需审核 1:需要审核
+
 }
 
 func (r *Ermcp3PaAreaAuditCfg) calc() {
@@ -2342,6 +2348,10 @@ SELECT t.AREAUSERID,
        t.PRODUCEOUTAUDITFLAG,
        t.OPERATORSRC,
        t.OPERATORID,
+       t.COSTRATIOAUDITFLAG,
+       t.MGNEEDHEDGERATIOAUDITFLAG,
+       t.SGVTARATIOAUDITFLAG,
+       t.SGCONVERTRATIOAUDITFLAG,
        to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME
   FROM ERMCP_PA_AREAAUDITCONFIG t
  WHERE 1 = 1
@@ -2547,6 +2557,8 @@ type XHMiddleGoods struct {
 	AREAUSERID      int64   `json:"-"  xorm:"'AREAUSERID'" form:"areauserid"`     // 所属机构
 	WRSTANDARDID    int64   `json:"-"  xorm:"'WRSTANDARDID'" form:"wrstandardid"` // 现货商品ID(SEQ_WRSTANDARD)
 	CONVERTRATIO    float64 `json:"convertratio"  xorm:"'CONVERTRATIO'"`          // 拆算系数
+	COSTRATIO       float64 `json:"costratio"  xorm:"'COSTRATIO'"`                // 成本权重
+	DELIVERYGOODSID int64   `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'"`    // 现货商品id
 	MIDDLEGOODSID   int64   `json:"middlegoodsid"  xorm:"'MIDDLEGOODSID'"`        // 套保品种id
 	MIDDLEGOODSCODE string  `json:"middlegoodscode"  xorm:"'MIDDLEGOODSCODE'"`    // 套保品种代码
 	MIDDLEGOODSNAME string  `json:"middlegoodsname"  xorm:"'MIDDLEGOODSNAME'"`    // 套保品种名称
@@ -2565,6 +2577,8 @@ func (r *XHMiddleGoods) buildSql() string {
 	var sqlId utils.SQLVal = `
 select w.wrstandardid,
        c.convertratio,
+       c.costratio,
+       c.deliverygoodsid,
        m.areauserid,
        m.middlegoodsid,
        m.middlegoodscode,
@@ -3383,3 +3397,116 @@ func (r *Ermcp3InnerTradeLink) GetDataEx() (interface{}, error) {
 	}
 	return sData, err
 }
+
+// Ermcp3ParamChangeApp 现货商品参数变更流水
+type Ermcp3ParamChangeApp struct {
+	APPLICATIONID   string  `json:"applicationid"  xorm:"APPLICATIONID" form:"applicationid"`       // 申请ID(619+Unix秒时间戳(10位)+xxxxxx)
+	PARAMCHANGETYPE int32   `json:"paramchangetype"  xorm:"PARAMCHANGETYPE" form:"paramchangetype"` // 参数变更类型 - 1:增值税率变更(现货商品) 2:折算系数变更(现货商品) 3:成本权重(现货商品) 4:套保比率变更(套保品种)
+	OPERATETYPE     int32   `json:"operatetype"  xorm:"OPERATETYPE" form:"operatetype"`             // 操作类型 - 1:新增 2:修改
+	WRSTANDARDID    int64   `json:"wrstandardid"  xorm:"WRSTANDARDID" form:"wrstandardid"`          // 现货商品ID [ParamChangeType = 1,2,3]
+	MIDDLEGOODSID   int64   `json:"middlegoodsid"  xorm:"MIDDLEGOODSID" form:"middlegoodsid"`       // 套保品种ID [ParamChangeType = 2,3,4]
+	AREAUSERID      int64   `json:"areauserid"  xorm:"AREAUSERID" form:"userid"`                    // 所属机构用户ID
+	BEFOREVALUE     float64 `json:"beforevalue"  xorm:"BEFOREVALUE"`                                // 变更前
+	AFTERVALUE      float64 `json:"aftervalue"  xorm:"AFTERVALUE"`                                  // 变更后
+	APPLYSRC        int32   `json:"applysrc"  xorm:"APPLYSRC"`                                      // 申请来源 - 1:管理端 2:终端
+	APPLYID         string  `json:"applyid"  xorm:"APPLYID" form:"applyid"`                         // 申请人
+	APPLYREMARK     string  `json:"applyremark"  xorm:"APPLYREMARK"`                                // 申请备注
+	APPLYTIME       string  `json:"applytime"  xorm:"APPLYTIME"`                                    // 申请时间
+	APPLYSTATUS     int32   `json:"applystatus"  xorm:"APPLYSTATUS"`                                // 申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+	AUDITTRADEDATE  string  `json:"audittradedate"  xorm:"AUDITTRADEDATE" form:"audittradedate"`    // 审核交易日(yyyyMMdd)
+	AUDITID         string  `json:"auditid"  xorm:"AUDITID" form:"auditid"`                         // 审核人
+	AUDITSRC        int32   `json:"auditsrc"  xorm:"AUDITSRC"`                                      // 审核来源 - 1:管理端 2:终端
+	AUDITTIME       string  `json:"audittime"  xorm:"AUDITTIME"`                                    // 审核时间
+	AUDITREMARK     string  `json:"auditremark"  xorm:"AUDITREMARK"`                                // 审核备注
+
+	WRSTANDARDCODE    string `json:"wrstandardcode"  xorm:"'WRSTANDARDCODE'"`       // 现货商品代码
+	WRSTANDARDNAME    string `json:"wrstandardname"  xorm:"'WRSTANDARDNAME'"`       // 现货商品名称
+	DELIVERYGOODSID   int64  `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'"`     // 品种id
+	DELIVERYGOODSCODE string `json:"deliverygoodscode"  xorm:"'DELIVERYGOODSCODE'"` // 品种代码
+	DELIVERYGOODSNAME string `json:"deliverygoodsname"  xorm:"'DELIVERYGOODSNAME'"` // 品种名称
+	MIDDLEGOODSCODE   string `json:"middlegoodscode"  xorm:"'MIDDLEGOODSCODE'"`     // 套保品种代码
+	MIDDLEGOODSNAME   string `json:"middlegoodsname"  xorm:"'MIDDLEGOODSNAME'"`     // 套保品种名称
+	APPLYNAME         string `json:"applyname"  xorm:"'APPLYNAME'"`                 // 申请人名称(代码)
+	AUDITNAME         string `json:"auditname"  xorm:"'AUDITNAME'"`                 // 审核人名称(代码)
+
+	FTSTATUS string `json:"-" form:"ftstatus"` // 状态筛选
+}
+
+func (r *Ermcp3ParamChangeApp) calc() {
+
+}
+
+func (r *Ermcp3ParamChangeApp) buildSql() string {
+	var sqlId utils.SQLVal = `
+with tmp as
+ (select 2 as src,
+         loginid as usid,
+         nvl(to_char(accountname), to_char(logincode)) username
+    from loginaccount
+  union all
+  select 1 as src, autoid as usid, rolename
+    from systemmanagerrole)
+SELECT t.APPLICATIONID,
+       t.PARAMCHANGETYPE,
+       t.OPERATETYPE,
+       t.WRSTANDARDID,
+       t.MIDDLEGOODSID,
+       t.AREAUSERID,
+       t.BEFOREVALUE,
+       t.AFTERVALUE,
+       t.APPLYSRC,
+       to_char(t.APPLYID) APPLYID,
+       t.APPLYREMARK,
+       to_char(t.APPLYTIME, 'yyyy-mm-dd hh24:mi:ss') APPLYTIME,
+       t.APPLYSTATUS,
+       t.AUDITTRADEDATE,
+       to_char(t.AUDITID) AUDITID,
+       t.AUDITSRC,
+       to_char(t.AUDITTIME, 'yyyy-mm-dd hh24:mi:ss') AUDITTIME,
+       t.AUDITREMARK,
+       w.wrstandardcode,
+       w.wrstandardname,
+       dg.deliverygoodsid,
+       dg.deliverygoodscode,
+       dg.deliverygoodsname,
+       m.middlegoodscode,
+       m.middlegoodsname,
+       k1.username applyname,
+       k2.username auditname
+  FROM ERMCP_PARAMCHANGEAPP t
+  LEFT JOIN WRSTANDARD w
+    on t.wrstandardid = w.wrstandardid
+  LEFT JOIN DELIVERYGOODS dg
+    on w.deliverygoodsid = dg.deliverygoodsid
+  LEFT JOIN ERMS_MIDDLEGOODS m
+    on t.middlegoodsid = m.middlegoodsid
+  LEFT JOIN tmp k1
+    on t.applysrc = k1.src
+   and t.applyid = k1.usid
+  LEFT JOIN tmp k2
+    on t.auditsrc = k2.src
+   and t.auditid = k2.usid
+ WHERE 1 = 1
+`
+	sqlId.AndEx("t.AREAUSERID", r.AREAUSERID, r.AREAUSERID > 0)
+	sqlId.AndEx("t.WRSTANDARDID", r.WRSTANDARDID, r.WRSTANDARDID > 0)
+	sqlId.AndEx("dg.deliverygoodsid", r.DELIVERYGOODSID, r.DELIVERYGOODSID > 0)
+	sqlId.AndEx("t.OPERATETYPE", r.OPERATETYPE, r.OPERATETYPE > 0)
+	sqlId.AndEx("t.MIDDLEGOODSID", r.MIDDLEGOODSID, r.MIDDLEGOODSID > 0)
+	sqlId.AndEx("t.PARAMCHANGETYPE", r.PARAMCHANGETYPE, r.PARAMCHANGETYPE > 0)
+	if r.FTSTATUS != "" {
+		sqlId.JoinFormat(" and t.APPLYSTATUS in(%v)", r.FTSTATUS)
+	}
+	sqlId.Join(" order by t.audittime, t.applytime desc")
+	return sqlId.String()
+}
+
+// GetDataEx 获取现货商品参数变更流水
+func (r *Ermcp3ParamChangeApp) GetDataEx() (interface{}, error) {
+	sData := make([]Ermcp3ParamChangeApp, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}

+ 1 - 0
routers/router.go

@@ -452,6 +452,7 @@ func InitRouter() *gin.Engine {
 		ermcp3R.GET("/QueryOutTradeLink", ermcp3.QueryOutTradeLink)
 		ermcp3R.GET("/QuerySubTaaccount", ermcp3.QuerySubTaaccount)
 		ermcp3R.GET("/QueryInnerTradeLink", ermcp3.QueryInnerTradeLink)
+		ermcp3R.GET("/QueryParamChangeApp", ermcp3.QueryParamChangeApp)
 
 		// 报表
 		ermcp3R.GET("/QryReportDaySpotDetail", ermcp3.QryReportDaySpotDetail)