Просмотр исходного кода

增加“查询我的履约”接口

zhou.xiaoning 3 лет назад
Родитель
Сommit
c9751b04be
6 измененных файлов с 902 добавлено и 0 удалено
  1. 24 0
      controllers/guangzuan/wrposition.go
  2. 242 0
      docs/docs.go
  3. 242 0
      docs/swagger.json
  4. 167 0
      docs/swagger.yaml
  5. 226 0
      models/guangzuan.go
  6. 1 0
      routers/router.go

+ 24 - 0
controllers/guangzuan/wrposition.go

@@ -147,3 +147,27 @@ func QueryMyDelistingApply(c *gin.Context) {
 	a.DoBindReq(&m)
 	a.DoGetDataByPage(&m)
 }
+
+// QueryMyPerformanc
+// @Summary  查询我的履约
+// @Produce  json
+// @Security ApiKeyAuth
+// @Security LoginID
+// @Security Group
+// @Param    userid          query    int    true  "用户ID"
+// @Param    page            query    int    false "页码"
+// @Param    pagesize        query    int    false "每页条数"
+// @Param    zsallproperties query    string false "商品(查询字段-模糊查询)"
+// @Param    buyorsell       query    int    false "方向,0-买 1-卖"
+// @Param    begindate       query    string false "开始交易日(yyyymmdd)"
+// @Param    enddate         query    string false "结束交易日(yyyymmdd)"
+// @Success  200             {array}  models.MyPerformanc
+// @Failure  500             {object} app.Response
+// @Router   /Guangzuan/QueryMyPerformanc [get]
+// @Tags     广钻
+func QueryMyPerformanc(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.MyPerformanc{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}

+ 242 - 0
docs/docs.go

@@ -8039,6 +8039,90 @@ const docTemplate = `{
                 }
             }
         },
+        "/Guangzuan/QueryMyPerformanc": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "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"
+                    },
+                    {
+                        "type": "string",
+                        "description": "商品(查询字段-模糊查询)",
+                        "name": "zsallproperties",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "方向,0-买 1-卖",
+                        "name": "buyorsell",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "开始交易日(yyyymmdd)",
+                        "name": "begindate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "结束交易日(yyyymmdd)",
+                        "name": "enddate",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyPerformanc"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryMySellOrder": {
             "get": {
                 "security": [
@@ -28421,6 +28505,164 @@ const docTemplate = `{
                 }
             }
         },
+        "models.MyPerformanc": {
+            "type": "object",
+            "properties": {
+                "accountname": {
+                    "description": "useraccount",
+                    "type": "string"
+                },
+                "amount": {
+                    "description": "履约金额",
+                    "type": "number"
+                },
+                "buyerfreezeamount": {
+                    "description": "买方履约前冻结资金",
+                    "type": "number"
+                },
+                "buyerfreezeamountremain": {
+                    "description": "买方履约前冻结资金剩余",
+                    "type": "number"
+                },
+                "buyerinfo": {
+                    "description": "买方联系信息 - 存JSON字符串, 根据枚举‘BuyerContactInfo',显示\\隐藏字段,若数据不为JSON,则直接显示{    \"ContactInfo\": \"xxxxxxxx\",    \"ReceiveInfo\": \"xxxxxxxxx\",    \"ReceiptInfo\": \"xxxxxxxxxxxx\"}",
+                    "type": "string"
+                },
+                "buyorsell": {
+                    "description": "方向 - 0:买 1:卖",
+                    "type": "integer"
+                },
+                "buypaidamount": {
+                    "description": "买方已冻/已扣金额",
+                    "type": "number"
+                },
+                "curstepid": {
+                    "description": "当前步骤ID",
+                    "type": "string"
+                },
+                "overshortamount": {
+                    "description": "溢短金额",
+                    "type": "number"
+                },
+                "paymenttype": {
+                    "description": "买方支付方式 - 1:冻结 2:扣款",
+                    "type": "integer"
+                },
+                "performanceplanid": {
+                    "description": "PerformancePlan",
+                    "type": "string"
+                },
+                "performancestatus": {
+                    "description": "履约状态 -  1:待激活 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 10:超时关闭",
+                    "type": "integer"
+                },
+                "price": {
+                    "description": "价格",
+                    "type": "number"
+                },
+                "priceper": {
+                    "description": "克拉单价",
+                    "type": "string"
+                },
+                "relatedorderid": {
+                    "description": "关联单号(履约类型的关联单号)",
+                    "type": "string"
+                },
+                "sellerfreezeamount": {
+                    "description": "卖方履约前冻结资金",
+                    "type": "number"
+                },
+                "sellerfreezeamountremain": {
+                    "description": "卖方履约前冻结资金剩余",
+                    "type": "number"
+                },
+                "sellerinfo": {
+                    "description": "卖方联系信息 - 存JSON字符串, 根据枚举‘SellerContactInfo',显示\\隐藏字段,若数据不为JSON,则直接显示{    \"ContactInfo\": \"xxxxxxxx\"}",
+                    "type": "string"
+                },
+                "sellreceivedamount": {
+                    "description": "卖方已收金额",
+                    "type": "number"
+                },
+                "sizedisplay": {
+                    "description": "尺寸",
+                    "type": "string"
+                },
+                "steptypeid": {
+                    "description": "PerformanceStep",
+                    "type": "integer"
+                },
+                "warehousenamedisplay": {
+                    "type": "string"
+                },
+                "zscategorydisplay": {
+                    "type": "string"
+                },
+                "zscerttypedisplay": {
+                    "type": "string"
+                },
+                "zsclaritytype1display": {
+                    "type": "string"
+                },
+                "zsclaritytype2display": {
+                    "type": "string"
+                },
+                "zscolortype1display": {
+                    "type": "string"
+                },
+                "zscolortype2display": {
+                    "type": "string"
+                },
+                "zscrystaltypedisplay": {
+                    "type": "string"
+                },
+                "zscurrencytypedisplay": {
+                    "type": "string"
+                },
+                "zscurrencytypedisplayunit": {
+                    "type": "string"
+                },
+                "zscuttype1display": {
+                    "type": "string"
+                },
+                "zscuttype2display": {
+                    "type": "string"
+                },
+                "zsczcolor1typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor2typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor3typedisplay": {
+                    "type": "string"
+                },
+                "zsfluorescencetype1display": {
+                    "type": "string"
+                },
+                "zsfluorescencetype2display": {
+                    "type": "string"
+                },
+                "zspolishtype1display": {
+                    "type": "string"
+                },
+                "zspolishtype2display": {
+                    "type": "string"
+                },
+                "zsshapetypedisplay": {
+                    "type": "string"
+                },
+                "zsstyletypedisplay": {
+                    "type": "string"
+                },
+                "zssymmetrytype1display": {
+                    "type": "string"
+                },
+                "zssymmetrytype2display": {
+                    "type": "string"
+                }
+            }
+        },
         "models.MySellOrder": {
             "type": "object",
             "required": [

+ 242 - 0
docs/swagger.json

@@ -8030,6 +8030,90 @@
                 }
             }
         },
+        "/Guangzuan/QueryMyPerformanc": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "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"
+                    },
+                    {
+                        "type": "string",
+                        "description": "商品(查询字段-模糊查询)",
+                        "name": "zsallproperties",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "方向,0-买 1-卖",
+                        "name": "buyorsell",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "开始交易日(yyyymmdd)",
+                        "name": "begindate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "结束交易日(yyyymmdd)",
+                        "name": "enddate",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.MyPerformanc"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryMySellOrder": {
             "get": {
                 "security": [
@@ -28412,6 +28496,164 @@
                 }
             }
         },
+        "models.MyPerformanc": {
+            "type": "object",
+            "properties": {
+                "accountname": {
+                    "description": "useraccount",
+                    "type": "string"
+                },
+                "amount": {
+                    "description": "履约金额",
+                    "type": "number"
+                },
+                "buyerfreezeamount": {
+                    "description": "买方履约前冻结资金",
+                    "type": "number"
+                },
+                "buyerfreezeamountremain": {
+                    "description": "买方履约前冻结资金剩余",
+                    "type": "number"
+                },
+                "buyerinfo": {
+                    "description": "买方联系信息 - 存JSON字符串, 根据枚举‘BuyerContactInfo',显示\\隐藏字段,若数据不为JSON,则直接显示{    \"ContactInfo\": \"xxxxxxxx\",    \"ReceiveInfo\": \"xxxxxxxxx\",    \"ReceiptInfo\": \"xxxxxxxxxxxx\"}",
+                    "type": "string"
+                },
+                "buyorsell": {
+                    "description": "方向 - 0:买 1:卖",
+                    "type": "integer"
+                },
+                "buypaidamount": {
+                    "description": "买方已冻/已扣金额",
+                    "type": "number"
+                },
+                "curstepid": {
+                    "description": "当前步骤ID",
+                    "type": "string"
+                },
+                "overshortamount": {
+                    "description": "溢短金额",
+                    "type": "number"
+                },
+                "paymenttype": {
+                    "description": "买方支付方式 - 1:冻结 2:扣款",
+                    "type": "integer"
+                },
+                "performanceplanid": {
+                    "description": "PerformancePlan",
+                    "type": "string"
+                },
+                "performancestatus": {
+                    "description": "履约状态 -  1:待激活 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 10:超时关闭",
+                    "type": "integer"
+                },
+                "price": {
+                    "description": "价格",
+                    "type": "number"
+                },
+                "priceper": {
+                    "description": "克拉单价",
+                    "type": "string"
+                },
+                "relatedorderid": {
+                    "description": "关联单号(履约类型的关联单号)",
+                    "type": "string"
+                },
+                "sellerfreezeamount": {
+                    "description": "卖方履约前冻结资金",
+                    "type": "number"
+                },
+                "sellerfreezeamountremain": {
+                    "description": "卖方履约前冻结资金剩余",
+                    "type": "number"
+                },
+                "sellerinfo": {
+                    "description": "卖方联系信息 - 存JSON字符串, 根据枚举‘SellerContactInfo',显示\\隐藏字段,若数据不为JSON,则直接显示{    \"ContactInfo\": \"xxxxxxxx\"}",
+                    "type": "string"
+                },
+                "sellreceivedamount": {
+                    "description": "卖方已收金额",
+                    "type": "number"
+                },
+                "sizedisplay": {
+                    "description": "尺寸",
+                    "type": "string"
+                },
+                "steptypeid": {
+                    "description": "PerformanceStep",
+                    "type": "integer"
+                },
+                "warehousenamedisplay": {
+                    "type": "string"
+                },
+                "zscategorydisplay": {
+                    "type": "string"
+                },
+                "zscerttypedisplay": {
+                    "type": "string"
+                },
+                "zsclaritytype1display": {
+                    "type": "string"
+                },
+                "zsclaritytype2display": {
+                    "type": "string"
+                },
+                "zscolortype1display": {
+                    "type": "string"
+                },
+                "zscolortype2display": {
+                    "type": "string"
+                },
+                "zscrystaltypedisplay": {
+                    "type": "string"
+                },
+                "zscurrencytypedisplay": {
+                    "type": "string"
+                },
+                "zscurrencytypedisplayunit": {
+                    "type": "string"
+                },
+                "zscuttype1display": {
+                    "type": "string"
+                },
+                "zscuttype2display": {
+                    "type": "string"
+                },
+                "zsczcolor1typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor2typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor3typedisplay": {
+                    "type": "string"
+                },
+                "zsfluorescencetype1display": {
+                    "type": "string"
+                },
+                "zsfluorescencetype2display": {
+                    "type": "string"
+                },
+                "zspolishtype1display": {
+                    "type": "string"
+                },
+                "zspolishtype2display": {
+                    "type": "string"
+                },
+                "zsshapetypedisplay": {
+                    "type": "string"
+                },
+                "zsstyletypedisplay": {
+                    "type": "string"
+                },
+                "zssymmetrytype1display": {
+                    "type": "string"
+                },
+                "zssymmetrytype2display": {
+                    "type": "string"
+                }
+            }
+        },
         "models.MySellOrder": {
             "type": "object",
             "required": [

+ 167 - 0
docs/swagger.yaml

@@ -11258,6 +11258,121 @@ definitions:
     required:
     - selluserid
     type: object
+  models.MyPerformanc:
+    properties:
+      accountname:
+        description: useraccount
+        type: string
+      amount:
+        description: 履约金额
+        type: number
+      buyerfreezeamount:
+        description: 买方履约前冻结资金
+        type: number
+      buyerfreezeamountremain:
+        description: 买方履约前冻结资金剩余
+        type: number
+      buyerinfo:
+        description: '买方联系信息 - 存JSON字符串, 根据枚举‘BuyerContactInfo'',显示\隐藏字段,若数据不为JSON,则直接显示{    "ContactInfo":
+          "xxxxxxxx",    "ReceiveInfo": "xxxxxxxxx",    "ReceiptInfo": "xxxxxxxxxxxx"}'
+        type: string
+      buyorsell:
+        description: 方向 - 0:买 1:卖
+        type: integer
+      buypaidamount:
+        description: 买方已冻/已扣金额
+        type: number
+      curstepid:
+        description: 当前步骤ID
+        type: string
+      overshortamount:
+        description: 溢短金额
+        type: number
+      paymenttype:
+        description: 买方支付方式 - 1:冻结 2:扣款
+        type: integer
+      performanceplanid:
+        description: PerformancePlan
+        type: string
+      performancestatus:
+        description: 履约状态 -  1:待激活 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败
+          9:超时待处理 10:超时关闭
+        type: integer
+      price:
+        description: 价格
+        type: number
+      priceper:
+        description: 克拉单价
+        type: string
+      relatedorderid:
+        description: 关联单号(履约类型的关联单号)
+        type: string
+      sellerfreezeamount:
+        description: 卖方履约前冻结资金
+        type: number
+      sellerfreezeamountremain:
+        description: 卖方履约前冻结资金剩余
+        type: number
+      sellerinfo:
+        description: '卖方联系信息 - 存JSON字符串, 根据枚举‘SellerContactInfo'',显示\隐藏字段,若数据不为JSON,则直接显示{    "ContactInfo":
+          "xxxxxxxx"}'
+        type: string
+      sellreceivedamount:
+        description: 卖方已收金额
+        type: number
+      sizedisplay:
+        description: 尺寸
+        type: string
+      steptypeid:
+        description: PerformanceStep
+        type: integer
+      warehousenamedisplay:
+        type: string
+      zscategorydisplay:
+        type: string
+      zscerttypedisplay:
+        type: string
+      zsclaritytype1display:
+        type: string
+      zsclaritytype2display:
+        type: string
+      zscolortype1display:
+        type: string
+      zscolortype2display:
+        type: string
+      zscrystaltypedisplay:
+        type: string
+      zscurrencytypedisplay:
+        type: string
+      zscurrencytypedisplayunit:
+        type: string
+      zscuttype1display:
+        type: string
+      zscuttype2display:
+        type: string
+      zsczcolor1typedisplay:
+        type: string
+      zsczcolor2typedisplay:
+        type: string
+      zsczcolor3typedisplay:
+        type: string
+      zsfluorescencetype1display:
+        type: string
+      zsfluorescencetype2display:
+        type: string
+      zspolishtype1display:
+        type: string
+      zspolishtype2display:
+        type: string
+      zsshapetypedisplay:
+        type: string
+      zsstyletypedisplay:
+        type: string
+      zssymmetrytype1display:
+        type: string
+      zssymmetrytype2display:
+        type: string
+    type: object
   models.MySellOrder:
     properties:
       accountid:
@@ -24320,6 +24435,58 @@ paths:
       summary: 查询我的询价-出售
       tags:
       - 广钻
+  /Guangzuan/QueryMyPerformanc:
+    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
+      - description: 商品(查询字段-模糊查询)
+        in: query
+        name: zsallproperties
+        type: string
+      - description: 方向,0-买 1-卖
+        in: query
+        name: buyorsell
+        type: integer
+      - description: 开始交易日(yyyymmdd)
+        in: query
+        name: begindate
+        type: string
+      - description: 结束交易日(yyyymmdd)
+        in: query
+        name: enddate
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.MyPerformanc'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      - LoginID: []
+      - Group: []
+      summary: 查询我的履约
+      tags:
+      - 广钻
   /Guangzuan/QueryMySellOrder:
     get:
       parameters:

+ 226 - 0
models/guangzuan.go

@@ -1807,3 +1807,229 @@ func (r *GZGoods) GetDataEx() (interface{}, error) {
 	sData.calc()
 	return sData, nil
 }
+
+// MyPerformanc 我的履约
+type MyPerformanc struct {
+	// PerformancePlan
+	PERFORMANCEPLANID        string  `json:"performanceplanid" xorm:"PERFORMANCEPLANID1"`              // 履约计划ID(130+yyMMddHHmmss+xxxx)
+	RELATEDORDERID           string  `json:"relatedorderid" xorm:"RELATEDORDERID1"`                    // 关联单号(履约类型的关联单号)
+	AMOUNT                   float64 `json:"amount" xorm:"AMOUNT"`                                     // 履约金额
+	PAYMENTTYPE              int32   `json:"paymenttype" xorm:"PAYMENTTYPE"`                           // 买方支付方式 - 1:冻结 2:扣款
+	PERFORMANCESTATUS        int32   `json:"performancestatus" xorm:"PERFORMANCESTATUS"`               // 履约状态 -  1:待激活 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 10:超时关闭
+	CURSTEPID                string  `json:"curstepid" xorm:"CURSTEPID1"`                              // 当前步骤ID
+	BUYPAIDAMOUNT            float64 `json:"buypaidamount" xorm:"BUYPAIDAMOUNT"`                       // 买方已冻/已扣金额
+	SELLRECEIVEDAMOUNT       float64 `json:"sellreceivedamount" xorm:"SELLRECEIVEDAMOUNT"`             // 卖方已收金额
+	BUYERFREEZEAMOUNT        float64 `json:"buyerfreezeamount" xorm:"BUYERFREEZEAMOUNT"`               // 买方履约前冻结资金
+	BUYERFREEZEAMOUNTREMAIN  float64 `json:"buyerfreezeamountremain" xorm:"BUYERFREEZEAMOUNTREMAIN"`   // 买方履约前冻结资金剩余
+	SELLERFREEZEAMOUNT       float64 `json:"sellerfreezeamount" xorm:"SELLERFREEZEAMOUNT"`             // 卖方履约前冻结资金
+	SELLERFREEZEAMOUNTREMAIN float64 `json:"sellerfreezeamountremain" xorm:"SELLERFREEZEAMOUNTREMAIN"` // 卖方履约前冻结资金剩余
+	OVERSHORTAMOUNT          float64 `json:"overshortamount" xorm:"OVERSHORTAMOUNT"`                   // 溢短金额
+	BUYERINFO                string  `json:"buyerinfo" xorm:"BUYERINFO"`                               // 买方联系信息 - 存JSON字符串, 根据枚举‘BuyerContactInfo',显示\隐藏字段,若数据不为JSON,则直接显示{    "ContactInfo": "xxxxxxxx",    "ReceiveInfo": "xxxxxxxxx",    "ReceiptInfo": "xxxxxxxxxxxx"}
+	SELLERINFO               string  `json:"sellerinfo" xorm:"SELLERINFO"`                             // 卖方联系信息 - 存JSON字符串, 根据枚举‘SellerContactInfo',显示\隐藏字段,若数据不为JSON,则直接显示{    "ContactInfo": "xxxxxxxx"}
+
+	// PerformanceStep
+	STEPTYPEID int32 `json:"steptypeid" xorm:"STEPTYPEID"` // 履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结  10:货款溢短 11:生成合同[中江] 12:运费 90:确认支付 91. 确认放行 92买方支付(直接扣款)   用于-1模板“
+
+	// useraccount
+	ACCOUNTNAME string `json:"accountname" xorm:"ACCOUNTNAME"` // [对手方]账户名称(机构名称)
+
+	// View_GZ_WRStandard_Ex_Query
+	ZSALLPROPERTIES            string  `json:"-" xorm:"ZSALLPROPERTIES" form:"zsallproperties"`              // 商品(查询字段-模糊查询)
+	ZSCATEGORYDISPLAY          string  `json:"zscategorydisplay" xorm:"ZSCATEGORYDISPLAY"`                   //
+	ZSCURRENCYTYPEDISPLAY      string  `json:"zscurrencytypedisplay" xorm:"ZSCURRENCYTYPEDISPLAY"`           //
+	ZSCURRENCYTYPEDISPLAYUNIT  string  `json:"zscurrencytypedisplayunit" xorm:"ZSCURRENCYTYPEDISPLAYUNIT"`   //
+	WAREHOUSENAMEDISPLAY       string  `json:"warehousenamedisplay" xorm:"WAREHOUSENAMEDISPLAY"`             //
+	ZSSHAPETYPEDISPLAY         string  `json:"zsshapetypedisplay" xorm:"ZSSHAPETYPEDISPLAY"`                 //
+	ZSCOLORTYPE1DISPLAY        string  `json:"zscolortype1display" xorm:"ZSCOLORTYPE1DISPLAY"`               //
+	ZSCOLORTYPE2DISPLAY        string  `json:"zscolortype2display" xorm:"ZSCOLORTYPE2DISPLAY"`               //
+	ZSCLARITYTYPE1DISPLAY      string  `json:"zsclaritytype1display" xorm:"ZSCLARITYTYPE1DISPLAY"`           //
+	ZSCLARITYTYPE2DISPLAY      string  `json:"zsclaritytype2display" xorm:"ZSCLARITYTYPE2DISPLAY"`           //
+	ZSCUTTYPE1DISPLAY          string  `json:"zscuttype1display" xorm:"ZSCUTTYPE1DISPLAY"`                   //
+	ZSCUTTYPE2DISPLAY          string  `json:"zscuttype2display" xorm:"ZSCUTTYPE2DISPLAY"`                   //
+	ZSSYMMETRYTYPE1DISPLAY     string  `json:"zssymmetrytype1display" xorm:"ZSSYMMETRYTYPE1DISPLAY"`         //
+	ZSSYMMETRYTYPE2DISPLAY     string  `json:"zssymmetrytype2display" xorm:"ZSSYMMETRYTYPE2DISPLAY"`         //
+	ZSPOLISHTYPE1DISPLAY       string  `json:"zspolishtype1display" xorm:"ZSPOLISHTYPE1DISPLAY"`             //
+	ZSPOLISHTYPE2DISPLAY       string  `json:"zspolishtype2display" xorm:"ZSPOLISHTYPE2DISPLAY"`             //
+	ZSFLUORESCENCETYPE1DISPLAY string  `json:"zsfluorescencetype1display" xorm:"ZSFLUORESCENCETYPE1DISPLAY"` //
+	ZSFLUORESCENCETYPE2DISPLAY string  `json:"zsfluorescencetype2display" xorm:"ZSFLUORESCENCETYPE2DISPLAY"` //
+	ZSCERTTYPEDISPLAY          string  `json:"zscerttypedisplay" xorm:"ZSCERTTYPEDISPLAY"`                   //
+	ZSCRYSTALTYPEDISPLAY       string  `json:"zscrystaltypedisplay" xorm:"ZSCRYSTALTYPEDISPLAY"`             //
+	ZSSTYLETYPEDISPLAY         string  `json:"zsstyletypedisplay" xorm:"ZSSTYLETYPEDISPLAY"`                 //
+	ZSCZCOLOR1TYPEDISPLAY      string  `json:"zsczcolor1typedisplay" xorm:"ZSCZCOLOR1TYPEDISPLAY"`           //
+	ZSCZCOLOR2TYPEDISPLAY      string  `json:"zsczcolor2typedisplay" xorm:"ZSCZCOLOR2TYPEDISPLAY"`           //
+	ZSCZCOLOR3TYPEDISPLAY      string  `json:"zsczcolor3typedisplay" xorm:"ZSCZCOLOR3TYPEDISPLAY"`           //
+	PRICE                      float64 `json:"price" xorm:"PRICE"`                                           // 价格
+	PRICEPER                   string  `json:"priceper" xorm:"PRICEPER"`                                     // 克拉单价
+	SIZEDISPLAY                string  `json:"sizedisplay" xorm:"SIZEDISPLAY"`                               // 尺寸
+
+	USERID    int64  `json:"-" form:"userid" binding:"required"` // 用户ID
+	BuyOrSell int64  `json:"buyorsell" form:"buyorsell"`         // 方向 - 0:买 1:卖
+	BeginDate string `json:"-" form:"begindate"`                 // 开始交易日
+	EndDate   string `json:"-" form:"enddate"`                   // 结束交易日
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *MyPerformanc) calc() {
+
+}
+
+func (r *MyPerformanc) buildSql() string {
+	var sqlId utils.SQLVal = `
+	SELECT
+		to_char(pp.PERFORMANCEPLANID) PERFORMANCEPLANID1,
+		to_char(pp.RELATEDORDERID) RELATEDORDERID1          ,
+		pp.AMOUNT                  ,
+		pp.PAYMENTTYPE             ,
+		pp.PERFORMANCESTATUS       ,
+		to_char(pp.CURSTEPID) CURSTEPID1               ,
+		pp.BUYPAIDAMOUNT           ,
+		pp.SELLRECEIVEDAMOUNT      ,
+		pp.BUYERFREEZEAMOUNT       ,
+		pp.BUYERFREEZEAMOUNTREMAIN ,
+		pp.SELLERFREEZEAMOUNT      ,
+		pp.SELLERFREEZEAMOUNTREMAIN,
+		pp.OVERSHORTAMOUNT         ,
+		pp.BUYERINFO               ,
+		pp.SELLERINFO              ,
+		ps.STEPTYPEID,
+		ua.ACCOUNTNAME              ,
+		wr.ZSALLPROPERTIES           ,
+		wr.ZSCATEGORYDISPLAY         ,
+		wr.ZSCURRENCYTYPEDISPLAY     ,
+		wr.ZSCURRENCYTYPEDISPLAYUNIT ,
+		wr.WAREHOUSENAMEDISPLAY      ,
+		wr.ZSSHAPETYPEDISPLAY        ,
+		wr.ZSCOLORTYPE1DISPLAY       ,
+		wr.ZSCOLORTYPE2DISPLAY       ,
+		wr.ZSCLARITYTYPE1DISPLAY     ,
+		wr.ZSCLARITYTYPE2DISPLAY     ,
+		wr.ZSCUTTYPE1DISPLAY         ,
+		wr.ZSCUTTYPE2DISPLAY         ,
+		wr.ZSSYMMETRYTYPE1DISPLAY    ,
+		wr.ZSSYMMETRYTYPE2DISPLAY    ,
+		wr.ZSPOLISHTYPE1DISPLAY      ,
+		wr.ZSPOLISHTYPE2DISPLAY      ,
+		wr.ZSFLUORESCENCETYPE1DISPLAY,
+		wr.ZSFLUORESCENCETYPE2DISPLAY,
+		wr.ZSCERTTYPEDISPLAY         ,
+		wr.ZSCRYSTALTYPEDISPLAY      ,
+		wr.ZSSTYLETYPEDISPLAY        ,
+		wr.ZSCZCOLOR1TYPEDISPLAY     ,
+		wr.ZSCZCOLOR2TYPEDISPLAY     ,
+		wr.ZSCZCOLOR3TYPEDISPLAY     ,
+		wr.PRICE                     ,
+		wr.PRICEPER                  ,
+		CASE WHEN
+			wr.SIZE1 IS NOT NULL AND wr.SIZE2 IS NOT NULL AND wr.SIZE2 IS NOT NULL THEN wr.SIZE1 || '*' || wr.SIZE2 || '*' || wr.SIZE3
+			ELSE wr.SIZE1
+		END AS SIZEDISPLAY
+	FROM PerformancePlan pp
+	inner join PerformanceStep ps on pp.curstepid = ps.performancestepid
+	inner join wrtrade_tradedetail td on pp.relatedorderid = td.wrtradedetailid
+	inner join taaccount ta on td.accountid = ta.accountid
+	inner join taaccount ta2 on td.matchaccountid = ta2.accountid
+	inner join useraccount ua on ta2.relateduserid = ua.userid
+	inner join wrfactortype ft on td.wrfactortypeid = ft.wrfactortypeid
+	inner join View_GZ_WRStandard_Ex_Query wr on ft.wrstandardid = wr.wrstandardid
+	where 1=1
+	`
+
+	sqlId.And("ta.relateduserid", r.USERID)
+	sqlId.And("td.buyorsell", r.BuyOrSell)
+	sqlId.AndLike("wr.ZSALLPROPERTIES", r.ZSALLPROPERTIES)
+	sqlId.OrderByDesc("pp.PERFORMANCEPLANID")
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *MyPerformanc) buildSql_His() string {
+	var sqlId utils.SQLVal = `
+	SELECT
+		to_char(pp.PERFORMANCEPLANID) PERFORMANCEPLANID1,
+		pp.RELATEDORDERID          ,
+		pp.AMOUNT                  ,
+		pp.PAYMENTTYPE             ,
+		pp.PERFORMANCESTATUS       ,
+		pp.CURSTEPID               ,
+		pp.BUYPAIDAMOUNT           ,
+		pp.SELLRECEIVEDAMOUNT      ,
+		pp.BUYERFREEZEAMOUNT       ,
+		pp.BUYERFREEZEAMOUNTREMAIN ,
+		pp.SELLERFREEZEAMOUNT      ,
+		pp.SELLERFREEZEAMOUNTREMAIN,
+		pp.OVERSHORTAMOUNT         ,
+		pp.BUYERINFO               ,
+		pp.SELLERINFO              ,
+		ps.STEPTYPEID,
+		ua.ACCOUNTNAME              ,
+		wr.ZSALLPROPERTIES           ,
+		wr.ZSCATEGORYDISPLAY         ,
+		wr.ZSCURRENCYTYPEDISPLAY     ,
+		wr.ZSCURRENCYTYPEDISPLAYUNIT ,
+		wr.WAREHOUSENAMEDISPLAY      ,
+		wr.ZSSHAPETYPEDISPLAY        ,
+		wr.ZSCOLORTYPE1DISPLAY       ,
+		wr.ZSCOLORTYPE2DISPLAY       ,
+		wr.ZSCLARITYTYPE1DISPLAY     ,
+		wr.ZSCLARITYTYPE2DISPLAY     ,
+		wr.ZSCUTTYPE1DISPLAY         ,
+		wr.ZSCUTTYPE2DISPLAY         ,
+		wr.ZSSYMMETRYTYPE1DISPLAY    ,
+		wr.ZSSYMMETRYTYPE2DISPLAY    ,
+		wr.ZSPOLISHTYPE1DISPLAY      ,
+		wr.ZSPOLISHTYPE2DISPLAY      ,
+		wr.ZSFLUORESCENCETYPE1DISPLAY,
+		wr.ZSFLUORESCENCETYPE2DISPLAY,
+		wr.ZSCERTTYPEDISPLAY         ,
+		wr.ZSCRYSTALTYPEDISPLAY      ,
+		wr.ZSSTYLETYPEDISPLAY        ,
+		wr.ZSCZCOLOR1TYPEDISPLAY     ,
+		wr.ZSCZCOLOR2TYPEDISPLAY     ,
+		wr.ZSCZCOLOR3TYPEDISPLAY     ,
+		wr.PRICE                     ,
+		wr.PRICEPER                  ,
+		CASE WHEN
+			wr.SIZE1 IS NOT NULL AND wr.SIZE2 IS NOT NULL AND wr.SIZE2 IS NOT NULL THEN wr.SIZE1 || '*' || wr.SIZE2 || '*' || wr.SIZE3
+			ELSE wr.SIZE1
+		END AS SIZEDISPLAY
+	FROM HIS_PerformancePlan pp
+	inner join HIS_PerformanceStep ps on pp.curstepid = ps.performancestepid
+	inner join HIS_wrtrade_tradedetail td on pp.relatedorderid = td.wrtradedetailid
+	inner join taaccount ta on td.accountid = ta.accountid
+	inner join taaccount ta2 on td.matchaccountid = ta2.accountid
+	inner join useraccount ua on ta2.relateduserid = ua.userid
+	inner join wrfactortype ft on td.wrfactortypeid = ft.wrfactortypeid
+	inner join View_GZ_WRStandard_Ex_Query wr on ft.wrstandardid = wr.wrstandardid
+	where pp.isvaliddata =1 and ps.isvaliddata = 1 and td.isvaliddata = 1
+	`
+
+	sqlId.And("ta.relateduserid", r.USERID)
+	sqlId.And("td.buyorsell", r.BuyOrSell)
+	sqlId.AndLike("wr.ZSALLPROPERTIES", r.ZSALLPROPERTIES)
+	if r.BeginDate != "" && r.EndDate != "" {
+		sqlId.JoinFormat(" AND (pp.createtime between to_date('%v', 'yyyyMMdd') and to_date('%v', 'yyyyMMdd'))", r.BeginDate, r.EndDate)
+	}
+	sqlId.OrderByDesc("pp.PERFORMANCEPLANID")
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *MyPerformanc) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]MyPerformanc, 0)
+	sql := ""
+	if r.BeginDate != "" && r.EndDate != "" {
+		sql = r.buildSql_His()
+	} else {
+		sql = r.buildSql()
+	}
+	err := db.GetEngine().SQL(sql).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}

+ 1 - 0
routers/router.go

@@ -667,6 +667,7 @@ func InitRouter() *gin.Engine {
 		guangzuanR.GET("QueryMyBargainApply", guangzuan.QueryMyBargainApply)
 		guangzuanR.GET("QueryMyDelistingApply", guangzuan.QueryMyDelistingApply)
 		guangzuanR.GET("GetGoods", guangzuan.GetGoods)
+		guangzuanR.GET("QueryMyPerformanc", guangzuan.QueryMyPerformanc)
 	}
 
 	return r