Ver Fonte

增加“钻石详情”接口

zhou.xiaoning há 3 anos atrás
pai
commit
4fb44ab5b5
6 ficheiros alterados com 963 adições e 2 exclusões
  1. 26 0
      controllers/guangzuan/goods.go
  2. 306 0
      docs/docs.go
  3. 306 0
      docs/swagger.json
  4. 215 0
      docs/swagger.yaml
  5. 109 2
      models/guangzuan.go
  6. 1 0
      routers/router.go

+ 26 - 0
controllers/guangzuan/goods.go

@@ -0,0 +1,26 @@
+package guangzuan
+
+import (
+	"mtp2_if/global/app"
+	"mtp2_if/models"
+
+	"github.com/gin-gonic/gin"
+)
+
+// GetGoods
+// @Summary  获取钻石详情
+// @Produce  json
+// @Security ApiKeyAuth
+// @Security LoginID
+// @Security Group
+// @Param    goodsno query    string true "商品编号"
+// @Success  200     {object} models.GZGoods
+// @Failure  500     {object} app.Response
+// @Router   /Guangzuan/GetGoods [get]
+// @Tags     广钻
+func GetGoods(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.GZGoods{}
+	a.DoBindReq(&m)
+	a.DoGetDataEx(&m)
+}

+ 306 - 0
docs/docs.go

@@ -7484,6 +7484,51 @@ const docTemplate = `{
                 }
             }
         },
+        "/Guangzuan/GetGoods": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "获取钻石详情",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "商品编号",
+                        "name": "goodsno",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/models.GZGoods"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryBuyOrder": {
             "get": {
                 "security": [
@@ -26084,6 +26129,267 @@ const docTemplate = `{
                 }
             }
         },
+        "models.GZGoods": {
+            "type": "object",
+            "required": [
+                "goodsno"
+            ],
+            "properties": {
+                "cerno": {
+                    "description": "证书编号 - 类型:2,4,5",
+                    "type": "string"
+                },
+                "cpcertno": {
+                    "description": "金伯利证书编号 - 类型:3",
+                    "type": "string"
+                },
+                "goodsno": {
+                    "description": "商品编号",
+                    "type": "string"
+                },
+                "imagepath": {
+                    "description": "商品照片(相对地址)",
+                    "type": "string"
+                },
+                "isvalid": {
+                    "description": "是否有效 - 0:无效 1:有效",
+                    "type": "integer"
+                },
+                "kppath": {
+                    "description": "金伯利证书图片(相对地址) - 类型:3",
+                    "type": "string"
+                },
+                "kpweight": {
+                    "description": "金伯利证书重量 - 类型:3",
+                    "type": "string"
+                },
+                "marketprice": {
+                    "description": "市场价",
+                    "type": "string"
+                },
+                "origin": {
+                    "description": "原产地 - 类型:3",
+                    "type": "string"
+                },
+                "price": {
+                    "description": "总价(价格) - 类型:1,2,3,4,5",
+                    "type": "number"
+                },
+                "priceper": {
+                    "description": "克拉单价 - 类型:1,2,3,5",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "sellmobile": {
+                    "description": "手机号码(加密存储)",
+                    "type": "string"
+                },
+                "sellusername": {
+                    "description": "账户名称(机构名称)",
+                    "type": "string"
+                },
+                "settingmaterial": {
+                    "description": "镶嵌材料 - 类型:4",
+                    "type": "string"
+                },
+                "size1": {
+                    "description": "尺寸1 - 类型:2,4,5",
+                    "type": "string"
+                },
+                "size2": {
+                    "description": "尺寸2 - 类型:2,4,5",
+                    "type": "string"
+                },
+                "size3": {
+                    "description": "尺寸3 - 类型:2,4,5",
+                    "type": "string"
+                },
+                "stonedesc": {
+                    "description": "配石描述 - 类型:4",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "warehouseid": {
+                    "description": "仓库ID",
+                    "type": "integer"
+                },
+                "warehousenamedisplay": {
+                    "type": "string"
+                },
+                "weight": {
+                    "description": "总重量(克拉重量) - 类型:1,2,3,4,5",
+                    "type": "number"
+                },
+                "weightavg": {
+                    "description": "平均单颗重量 - 类型:1,3",
+                    "type": "number"
+                },
+                "wrpath": {
+                    "description": "仓单扫描件(相对地址)",
+                    "type": "string"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "zscategory": {
+                    "description": "钻石分类 - 枚举”ZSCategory“",
+                    "type": "integer"
+                },
+                "zscategorydisplay": {
+                    "type": "string"
+                },
+                "zscerttype": {
+                    "description": "证书类型 - 枚举”ZSCertType“ - 类型:2,4,5",
+                    "type": "integer"
+                },
+                "zscerttypedisplay": {
+                    "type": "string"
+                },
+                "zsclaritytype1": {
+                    "description": "净度1 - 枚举”ZSClarityType“ - 类型:1,2,3,4,5",
+                    "type": "integer"
+                },
+                "zsclaritytype1display": {
+                    "type": "string"
+                },
+                "zsclaritytype2": {
+                    "description": "净度2 - 枚举”ZSClarityType“ - 类型:1,3",
+                    "type": "integer"
+                },
+                "zsclaritytype2display": {
+                    "type": "string"
+                },
+                "zscolortype1": {
+                    "description": "颜色1 - 枚举”ZSColorType“ - 类型:1,2,3,4",
+                    "type": "integer"
+                },
+                "zscolortype1display": {
+                    "type": "string"
+                },
+                "zscolortype2": {
+                    "description": "颜色2 - 枚举”ZSColorType“ -  类型:1,3",
+                    "type": "integer"
+                },
+                "zscolortype2display": {
+                    "type": "string"
+                },
+                "zscrystaltype": {
+                    "description": "晶型范围 - 枚举“ZSCrystalType“ - 类型:3, 多个,逗号分隔",
+                    "type": "string"
+                },
+                "zscrystaltypedisplay": {
+                    "type": "string"
+                },
+                "zscurrencytype": {
+                    "description": "货币类型 - 枚举“ZSCurrencyType”",
+                    "type": "integer"
+                },
+                "zscurrencytypedisplay": {
+                    "type": "string"
+                },
+                "zscurrencytypedisplayunit": {
+                    "type": "string"
+                },
+                "zscuttype1": {
+                    "description": "切工1 - 枚举”ZSCutType“ - 类型:1,2,4,5",
+                    "type": "integer"
+                },
+                "zscuttype1display": {
+                    "type": "string"
+                },
+                "zscuttype2": {
+                    "description": "切工2 - 枚举”ZSCutType“ - 类型:1",
+                    "type": "integer"
+                },
+                "zscuttype2display": {
+                    "type": "string"
+                },
+                "zsczcolor1type": {
+                    "description": "彩钻颜色1 - 枚举”ZSCZColor1Type“ - 类型:5",
+                    "type": "integer"
+                },
+                "zsczcolor1typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor2type": {
+                    "description": "彩钻颜色2 - 枚举”ZSCZColor2Type“ - 类型:5",
+                    "type": "integer"
+                },
+                "zsczcolor2typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor3type": {
+                    "description": "彩钻颜色3 - 枚举”ZSCZColor3Type“ - 类型:5",
+                    "type": "integer"
+                },
+                "zsczcolor3typedisplay": {
+                    "type": "string"
+                },
+                "zsfluorescencetype1": {
+                    "description": "荧光1 - 枚举”ZSFluorescenceType“ - 类型:1,2,3,4,5",
+                    "type": "integer"
+                },
+                "zsfluorescencetype1display": {
+                    "type": "string"
+                },
+                "zsfluorescencetype2": {
+                    "description": "荧光2 - 枚举”ZSFluorescenceType” - 类型:1,3",
+                    "type": "integer"
+                },
+                "zsfluorescencetype2display": {
+                    "type": "string"
+                },
+                "zspolishtype1": {
+                    "description": "抛光度1 - 枚举”ZSPolishType“ - 类型:1,2,4,5",
+                    "type": "integer"
+                },
+                "zspolishtype1display": {
+                    "type": "string"
+                },
+                "zspolishtype2": {
+                    "description": "抛光度2 - 枚举”ZSPolishType“ - 类型:1",
+                    "type": "integer"
+                },
+                "zspolishtype2display": {
+                    "type": "string"
+                },
+                "zsshapetype": {
+                    "description": "形状 - 枚举”ZSShapeType“ - 类型:1,2,4,5 ;(1为多个,逗号分隔)",
+                    "type": "string"
+                },
+                "zsshapetypedisplay": {
+                    "type": "string"
+                },
+                "zsstyletype": {
+                    "description": "款式 - 类型:4",
+                    "type": "integer"
+                },
+                "zsstyletypedisplay": {
+                    "type": "string"
+                },
+                "zssymmetrytype1": {
+                    "description": "对称度1 - 枚举”ZSSymmetryType“ - 类型:1,2,4,5",
+                    "type": "integer"
+                },
+                "zssymmetrytype1display": {
+                    "type": "string"
+                },
+                "zssymmetrytype2": {
+                    "description": "对称度2 - 枚举”ZSSymmetryType“ - 类型:1",
+                    "type": "integer"
+                },
+                "zssymmetrytype2display": {
+                    "type": "string"
+                }
+            }
+        },
         "models.GZWarehouseinfo": {
             "type": "object",
             "properties": {

+ 306 - 0
docs/swagger.json

@@ -7475,6 +7475,51 @@
                 }
             }
         },
+        "/Guangzuan/GetGoods": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    },
+                    {
+                        "LoginID": []
+                    },
+                    {
+                        "Group": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "获取钻石详情",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "商品编号",
+                        "name": "goodsno",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/models.GZGoods"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryBuyOrder": {
             "get": {
                 "security": [
@@ -26075,6 +26120,267 @@
                 }
             }
         },
+        "models.GZGoods": {
+            "type": "object",
+            "required": [
+                "goodsno"
+            ],
+            "properties": {
+                "cerno": {
+                    "description": "证书编号 - 类型:2,4,5",
+                    "type": "string"
+                },
+                "cpcertno": {
+                    "description": "金伯利证书编号 - 类型:3",
+                    "type": "string"
+                },
+                "goodsno": {
+                    "description": "商品编号",
+                    "type": "string"
+                },
+                "imagepath": {
+                    "description": "商品照片(相对地址)",
+                    "type": "string"
+                },
+                "isvalid": {
+                    "description": "是否有效 - 0:无效 1:有效",
+                    "type": "integer"
+                },
+                "kppath": {
+                    "description": "金伯利证书图片(相对地址) - 类型:3",
+                    "type": "string"
+                },
+                "kpweight": {
+                    "description": "金伯利证书重量 - 类型:3",
+                    "type": "string"
+                },
+                "marketprice": {
+                    "description": "市场价",
+                    "type": "string"
+                },
+                "origin": {
+                    "description": "原产地 - 类型:3",
+                    "type": "string"
+                },
+                "price": {
+                    "description": "总价(价格) - 类型:1,2,3,4,5",
+                    "type": "number"
+                },
+                "priceper": {
+                    "description": "克拉单价 - 类型:1,2,3,5",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "sellmobile": {
+                    "description": "手机号码(加密存储)",
+                    "type": "string"
+                },
+                "sellusername": {
+                    "description": "账户名称(机构名称)",
+                    "type": "string"
+                },
+                "settingmaterial": {
+                    "description": "镶嵌材料 - 类型:4",
+                    "type": "string"
+                },
+                "size1": {
+                    "description": "尺寸1 - 类型:2,4,5",
+                    "type": "string"
+                },
+                "size2": {
+                    "description": "尺寸2 - 类型:2,4,5",
+                    "type": "string"
+                },
+                "size3": {
+                    "description": "尺寸3 - 类型:2,4,5",
+                    "type": "string"
+                },
+                "stonedesc": {
+                    "description": "配石描述 - 类型:4",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "warehouseid": {
+                    "description": "仓库ID",
+                    "type": "integer"
+                },
+                "warehousenamedisplay": {
+                    "type": "string"
+                },
+                "weight": {
+                    "description": "总重量(克拉重量) - 类型:1,2,3,4,5",
+                    "type": "number"
+                },
+                "weightavg": {
+                    "description": "平均单颗重量 - 类型:1,3",
+                    "type": "number"
+                },
+                "wrpath": {
+                    "description": "仓单扫描件(相对地址)",
+                    "type": "string"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "zscategory": {
+                    "description": "钻石分类 - 枚举”ZSCategory“",
+                    "type": "integer"
+                },
+                "zscategorydisplay": {
+                    "type": "string"
+                },
+                "zscerttype": {
+                    "description": "证书类型 - 枚举”ZSCertType“ - 类型:2,4,5",
+                    "type": "integer"
+                },
+                "zscerttypedisplay": {
+                    "type": "string"
+                },
+                "zsclaritytype1": {
+                    "description": "净度1 - 枚举”ZSClarityType“ - 类型:1,2,3,4,5",
+                    "type": "integer"
+                },
+                "zsclaritytype1display": {
+                    "type": "string"
+                },
+                "zsclaritytype2": {
+                    "description": "净度2 - 枚举”ZSClarityType“ - 类型:1,3",
+                    "type": "integer"
+                },
+                "zsclaritytype2display": {
+                    "type": "string"
+                },
+                "zscolortype1": {
+                    "description": "颜色1 - 枚举”ZSColorType“ - 类型:1,2,3,4",
+                    "type": "integer"
+                },
+                "zscolortype1display": {
+                    "type": "string"
+                },
+                "zscolortype2": {
+                    "description": "颜色2 - 枚举”ZSColorType“ -  类型:1,3",
+                    "type": "integer"
+                },
+                "zscolortype2display": {
+                    "type": "string"
+                },
+                "zscrystaltype": {
+                    "description": "晶型范围 - 枚举“ZSCrystalType“ - 类型:3, 多个,逗号分隔",
+                    "type": "string"
+                },
+                "zscrystaltypedisplay": {
+                    "type": "string"
+                },
+                "zscurrencytype": {
+                    "description": "货币类型 - 枚举“ZSCurrencyType”",
+                    "type": "integer"
+                },
+                "zscurrencytypedisplay": {
+                    "type": "string"
+                },
+                "zscurrencytypedisplayunit": {
+                    "type": "string"
+                },
+                "zscuttype1": {
+                    "description": "切工1 - 枚举”ZSCutType“ - 类型:1,2,4,5",
+                    "type": "integer"
+                },
+                "zscuttype1display": {
+                    "type": "string"
+                },
+                "zscuttype2": {
+                    "description": "切工2 - 枚举”ZSCutType“ - 类型:1",
+                    "type": "integer"
+                },
+                "zscuttype2display": {
+                    "type": "string"
+                },
+                "zsczcolor1type": {
+                    "description": "彩钻颜色1 - 枚举”ZSCZColor1Type“ - 类型:5",
+                    "type": "integer"
+                },
+                "zsczcolor1typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor2type": {
+                    "description": "彩钻颜色2 - 枚举”ZSCZColor2Type“ - 类型:5",
+                    "type": "integer"
+                },
+                "zsczcolor2typedisplay": {
+                    "type": "string"
+                },
+                "zsczcolor3type": {
+                    "description": "彩钻颜色3 - 枚举”ZSCZColor3Type“ - 类型:5",
+                    "type": "integer"
+                },
+                "zsczcolor3typedisplay": {
+                    "type": "string"
+                },
+                "zsfluorescencetype1": {
+                    "description": "荧光1 - 枚举”ZSFluorescenceType“ - 类型:1,2,3,4,5",
+                    "type": "integer"
+                },
+                "zsfluorescencetype1display": {
+                    "type": "string"
+                },
+                "zsfluorescencetype2": {
+                    "description": "荧光2 - 枚举”ZSFluorescenceType” - 类型:1,3",
+                    "type": "integer"
+                },
+                "zsfluorescencetype2display": {
+                    "type": "string"
+                },
+                "zspolishtype1": {
+                    "description": "抛光度1 - 枚举”ZSPolishType“ - 类型:1,2,4,5",
+                    "type": "integer"
+                },
+                "zspolishtype1display": {
+                    "type": "string"
+                },
+                "zspolishtype2": {
+                    "description": "抛光度2 - 枚举”ZSPolishType“ - 类型:1",
+                    "type": "integer"
+                },
+                "zspolishtype2display": {
+                    "type": "string"
+                },
+                "zsshapetype": {
+                    "description": "形状 - 枚举”ZSShapeType“ - 类型:1,2,4,5 ;(1为多个,逗号分隔)",
+                    "type": "string"
+                },
+                "zsshapetypedisplay": {
+                    "type": "string"
+                },
+                "zsstyletype": {
+                    "description": "款式 - 类型:4",
+                    "type": "integer"
+                },
+                "zsstyletypedisplay": {
+                    "type": "string"
+                },
+                "zssymmetrytype1": {
+                    "description": "对称度1 - 枚举”ZSSymmetryType“ - 类型:1,2,4,5",
+                    "type": "integer"
+                },
+                "zssymmetrytype1display": {
+                    "type": "string"
+                },
+                "zssymmetrytype2": {
+                    "description": "对称度2 - 枚举”ZSSymmetryType“ - 类型:1",
+                    "type": "integer"
+                },
+                "zssymmetrytype2display": {
+                    "type": "string"
+                }
+            }
+        },
         "models.GZWarehouseinfo": {
             "type": "object",
             "properties": {

+ 215 - 0
docs/swagger.yaml

@@ -9625,6 +9625,195 @@ definitions:
     required:
     - resourcecode
     type: object
+  models.GZGoods:
+    properties:
+      cerno:
+        description: 证书编号 - 类型:2,4,5
+        type: string
+      cpcertno:
+        description: 金伯利证书编号 - 类型:3
+        type: string
+      goodsno:
+        description: 商品编号
+        type: string
+      imagepath:
+        description: 商品照片(相对地址)
+        type: string
+      isvalid:
+        description: 是否有效 - 0:无效 1:有效
+        type: integer
+      kppath:
+        description: 金伯利证书图片(相对地址) - 类型:3
+        type: string
+      kpweight:
+        description: 金伯利证书重量 - 类型:3
+        type: string
+      marketprice:
+        description: 市场价
+        type: string
+      origin:
+        description: 原产地 - 类型:3
+        type: string
+      price:
+        description: 总价(价格) - 类型:1,2,3,4,5
+        type: number
+      priceper:
+        description: 克拉单价 - 类型:1,2,3,5
+        type: string
+      remark:
+        description: 备注
+        type: string
+      sellmobile:
+        description: 手机号码(加密存储)
+        type: string
+      sellusername:
+        description: 账户名称(机构名称)
+        type: string
+      settingmaterial:
+        description: 镶嵌材料 - 类型:4
+        type: string
+      size1:
+        description: 尺寸1 - 类型:2,4,5
+        type: string
+      size2:
+        description: 尺寸2 - 类型:2,4,5
+        type: string
+      size3:
+        description: 尺寸3 - 类型:2,4,5
+        type: string
+      stonedesc:
+        description: 配石描述 - 类型:4
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+      warehouseid:
+        description: 仓库ID
+        type: integer
+      warehousenamedisplay:
+        type: string
+      weight:
+        description: 总重量(克拉重量) - 类型:1,2,3,4,5
+        type: number
+      weightavg:
+        description: 平均单颗重量 - 类型:1,3
+        type: number
+      wrpath:
+        description: 仓单扫描件(相对地址)
+        type: string
+      wrstandardid:
+        description: 现货商品ID
+        type: integer
+      zscategory:
+        description: 钻石分类 - 枚举”ZSCategory“
+        type: integer
+      zscategorydisplay:
+        type: string
+      zscerttype:
+        description: 证书类型 - 枚举”ZSCertType“ - 类型:2,4,5
+        type: integer
+      zscerttypedisplay:
+        type: string
+      zsclaritytype1:
+        description: 净度1 - 枚举”ZSClarityType“ - 类型:1,2,3,4,5
+        type: integer
+      zsclaritytype1display:
+        type: string
+      zsclaritytype2:
+        description: 净度2 - 枚举”ZSClarityType“ - 类型:1,3
+        type: integer
+      zsclaritytype2display:
+        type: string
+      zscolortype1:
+        description: 颜色1 - 枚举”ZSColorType“ - 类型:1,2,3,4
+        type: integer
+      zscolortype1display:
+        type: string
+      zscolortype2:
+        description: 颜色2 - 枚举”ZSColorType“ -  类型:1,3
+        type: integer
+      zscolortype2display:
+        type: string
+      zscrystaltype:
+        description: 晶型范围 - 枚举“ZSCrystalType“ - 类型:3, 多个,逗号分隔
+        type: string
+      zscrystaltypedisplay:
+        type: string
+      zscurrencytype:
+        description: 货币类型 - 枚举“ZSCurrencyType”
+        type: integer
+      zscurrencytypedisplay:
+        type: string
+      zscurrencytypedisplayunit:
+        type: string
+      zscuttype1:
+        description: 切工1 - 枚举”ZSCutType“ - 类型:1,2,4,5
+        type: integer
+      zscuttype1display:
+        type: string
+      zscuttype2:
+        description: 切工2 - 枚举”ZSCutType“ - 类型:1
+        type: integer
+      zscuttype2display:
+        type: string
+      zsczcolor1type:
+        description: 彩钻颜色1 - 枚举”ZSCZColor1Type“ - 类型:5
+        type: integer
+      zsczcolor1typedisplay:
+        type: string
+      zsczcolor2type:
+        description: 彩钻颜色2 - 枚举”ZSCZColor2Type“ - 类型:5
+        type: integer
+      zsczcolor2typedisplay:
+        type: string
+      zsczcolor3type:
+        description: 彩钻颜色3 - 枚举”ZSCZColor3Type“ - 类型:5
+        type: integer
+      zsczcolor3typedisplay:
+        type: string
+      zsfluorescencetype1:
+        description: 荧光1 - 枚举”ZSFluorescenceType“ - 类型:1,2,3,4,5
+        type: integer
+      zsfluorescencetype1display:
+        type: string
+      zsfluorescencetype2:
+        description: 荧光2 - 枚举”ZSFluorescenceType” - 类型:1,3
+        type: integer
+      zsfluorescencetype2display:
+        type: string
+      zspolishtype1:
+        description: 抛光度1 - 枚举”ZSPolishType“ - 类型:1,2,4,5
+        type: integer
+      zspolishtype1display:
+        type: string
+      zspolishtype2:
+        description: 抛光度2 - 枚举”ZSPolishType“ - 类型:1
+        type: integer
+      zspolishtype2display:
+        type: string
+      zsshapetype:
+        description: 形状 - 枚举”ZSShapeType“ - 类型:1,2,4,5 ;(1为多个,逗号分隔)
+        type: string
+      zsshapetypedisplay:
+        type: string
+      zsstyletype:
+        description: 款式 - 类型:4
+        type: integer
+      zsstyletypedisplay:
+        type: string
+      zssymmetrytype1:
+        description: 对称度1 - 枚举”ZSSymmetryType“ - 类型:1,2,4,5
+        type: integer
+      zssymmetrytype1display:
+        type: string
+      zssymmetrytype2:
+        description: 对称度2 - 枚举”ZSSymmetryType“ - 类型:1
+        type: integer
+      zssymmetrytype2display:
+        type: string
+    required:
+    - goodsno
+    type: object
   models.GZWarehouseinfo:
     properties:
       address:
@@ -23465,6 +23654,32 @@ paths:
       summary: 客户信息查询
       tags:
       - 风险管理v3
+  /Guangzuan/GetGoods:
+    get:
+      parameters:
+      - description: 商品编号
+        in: query
+        name: goodsno
+        required: true
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            $ref: '#/definitions/models.GZGoods'
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      - LoginID: []
+      - Group: []
+      summary: 获取钻石详情
+      tags:
+      - 广钻
   /Guangzuan/QueryBuyOrder:
     get:
       parameters:

+ 109 - 2
models/guangzuan.go

@@ -398,7 +398,7 @@ type SellOrder struct {
 	PERFORMANCETEMPLATEID int64     `json:"performancetemplateid" xorm:"PERFORMANCETEMPLATEID"`         // 履约计划模板ID
 	VALIDTYPE             int32     `json:"validtype" xorm:"VALIDTYPE"`                                 // 有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效
 	VALIDTIME             time.Time `json:"validtime" xorm:"VALIDTIME"`                                 // 有效期限
-	ORDERTIME             string    `json:"ordertime" xorm:"ORDERTIME"`                                 // 委托时间
+	ORDERTIME             string    `json:"ordertime" xorm:"ORDERTIME1"`                                // 委托时间
 	CANCELTIME            time.Time `json:"canceltime" xorm:"CANCELTIME"`                               // 撤销时间
 	WRTRADEORDERSTATUS    int32     `json:"wrtradeorderstatus" xorm:"WRTRADEORDERSTATUS"`               // 委托状态 - 参考枚举'WRTradeOrderStatus' - 1:委托请求  2:待冻结  3:委托成功  4:委托失败  5:配对成功  6:已撤  7:部成  8:已成  9:部成部撤  10:成交失败  11:委托拒绝  12:经过摘牌(先摘后挂专用)  13:冻结成功(通道交易专用)  14:通道已撤  15:通道部成部撤  16:成交失败违约(荷兰式竞拍专用)  17:冻结PD成功  18:冻结PD失败  19:冻结能量成功  20:冻结能量失败  21:预约已报价  22:过期未付  23:优惠券处理中  24:仓单生成失败  25:首付扣款失败  26:履约失败  27:撤单解冻贷款失败
 	CLIENTTICKET          string    `json:"-" xorm:"CLIENTTICKET"`                                      // 客户端流水号
@@ -447,7 +447,7 @@ func (r *SellOrder) buildSql() string {
 		q.ZSCATEGORY,
 		q.ZSCURRENCYTYPE,
 		q.GOODSNO, 
-		to_char(t.ORDERTIME, 'yyyy-mm-dd hh24:mi:ss') ORDERTIME,
+		to_char(t.ORDERTIME, 'yyyy-mm-dd hh24:mi:ss') ORDERTIME1,
 		t.*
 	FROM WRTrade_OrderDetail t
 	INNER JOIN View_GZ_WRStandard_Ex_Query q ON t.wrstandardid = q.wrstandardid
@@ -1036,3 +1036,110 @@ func (r *MyDelistingApply) GetDataByPage() (interface{}, error, int, int, int) {
 	}
 	return sData, err, r.Page, r.PageSize, total
 }
+
+// GZGoods 钻石信息
+type GZGoods struct {
+	ZSALLPROPERTIES            string `json:"-" xorm:"ZSALLPROPERTIES"`                                     // 商品(查询字段-模糊查询)
+	SELLUSERNAME               string `json:"sellusername" xorm:"SELLUSERNAME"`                             // 账户名称(机构名称)
+	SELLMOBILE                 string `json:"sellmobile" xorm:"SELLMOBILE"`                                 // 手机号码(加密存储)
+	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"`           //
+
+	WRSTANDARDID        int64   `json:"wrstandardid" xorm:"WRSTANDARDID"`                         // 现货商品ID
+	USERID              int64   `json:"userid" xorm:"USERID"`                                     // 用户ID
+	ZSCATEGORY          int32   `json:"zscategory" xorm:"ZSCATEGORY"`                             // 钻石分类 - 枚举”ZSCategory“
+	ZSCURRENCYTYPE      int32   `json:"zscurrencytype" xorm:"ZSCURRENCYTYPE"`                     // 货币类型 - 枚举“ZSCurrencyType”
+	GOODSNO             string  `json:"goodsno" xorm:"GOODSNO" form:"goodsno" binding:"required"` // 商品编号
+	WAREHOUSEID         int64   `json:"warehouseid" xorm:"WAREHOUSEID"`                           // 仓库ID
+	MARKETPRICE         string  `json:"marketprice" xorm:"MARKETPRICE"`                           // 市场价
+	IMAGEPATH           string  `json:"imagepath" xorm:"IMAGEPATH"`                               // 商品照片(相对地址)
+	WRPATH              string  `json:"wrpath" xorm:"WRPATH"`                                     // 仓单扫描件(相对地址)
+	REMARK              string  `json:"remark" xorm:"REMARK"`                                     // 备注
+	PRICE               float64 `json:"price" xorm:"PRICE"`                                       // 总价(价格) - 类型:1,2,3,4,5
+	WEIGHT              float64 `json:"weight" xorm:"WEIGHT"`                                     // 总重量(克拉重量) - 类型:1,2,3,4,5
+	WEIGHTAVG           float64 `json:"weightavg" xorm:"WEIGHTAVG"`                               // 平均单颗重量 - 类型:1,3
+	PRICEPER            string  `json:"priceper" xorm:"PRICEPER"`                                 // 克拉单价 - 类型:1,2,3,5
+	ZSSHAPETYPE         string  `json:"zsshapetype" xorm:"ZSSHAPETYPE"`                           // 形状 - 枚举”ZSShapeType“ - 类型:1,2,4,5 ;(1为多个,逗号分隔)
+	ZSCOLORTYPE1        int32   `json:"zscolortype1" xorm:"ZSCOLORTYPE1"`                         // 颜色1 - 枚举”ZSColorType“ - 类型:1,2,3,4
+	ZSCOLORTYPE2        int32   `json:"zscolortype2" xorm:"ZSCOLORTYPE2"`                         // 颜色2 - 枚举”ZSColorType“ -  类型:1,3
+	ZSCLARITYTYPE1      int32   `json:"zsclaritytype1" xorm:"ZSCLARITYTYPE1"`                     // 净度1 - 枚举”ZSClarityType“ - 类型:1,2,3,4,5
+	ZSCLARITYTYPE2      int32   `json:"zsclaritytype2" xorm:"ZSCLARITYTYPE2"`                     // 净度2 - 枚举”ZSClarityType“ - 类型:1,3
+	ZSCUTTYPE1          int32   `json:"zscuttype1" xorm:"ZSCUTTYPE1"`                             // 切工1 - 枚举”ZSCutType“ - 类型:1,2,4,5
+	ZSCUTTYPE2          int32   `json:"zscuttype2" xorm:"ZSCUTTYPE2"`                             // 切工2 - 枚举”ZSCutType“ - 类型:1
+	ZSSYMMETRYTYPE1     int32   `json:"zssymmetrytype1" xorm:"ZSSYMMETRYTYPE1"`                   // 对称度1 - 枚举”ZSSymmetryType“ - 类型:1,2,4,5
+	ZSSYMMETRYTYPE2     int32   `json:"zssymmetrytype2" xorm:"ZSSYMMETRYTYPE2"`                   // 对称度2 - 枚举”ZSSymmetryType“ - 类型:1
+	ZSPOLISHTYPE1       int32   `json:"zspolishtype1" xorm:"ZSPOLISHTYPE1"`                       // 抛光度1 - 枚举”ZSPolishType“ - 类型:1,2,4,5
+	ZSPOLISHTYPE2       int32   `json:"zspolishtype2" xorm:"ZSPOLISHTYPE2"`                       // 抛光度2 - 枚举”ZSPolishType“ - 类型:1
+	ZSFLUORESCENCETYPE1 int32   `json:"zsfluorescencetype1" xorm:"ZSFLUORESCENCETYPE1"`           // 荧光1 - 枚举”ZSFluorescenceType“ - 类型:1,2,3,4,5
+	ZSFLUORESCENCETYPE2 int32   `json:"zsfluorescencetype2" xorm:"ZSFLUORESCENCETYPE2"`           // 荧光2 - 枚举”ZSFluorescenceType” - 类型:1,3
+	SIZE1               string  `json:"size1" xorm:"SIZE1"`                                       // 尺寸1 - 类型:2,4,5
+	SIZE2               string  `json:"size2" xorm:"SIZE2"`                                       // 尺寸2 - 类型:2,4,5
+	SIZE3               string  `json:"size3" xorm:"SIZE3"`                                       // 尺寸3 - 类型:2,4,5
+	ZSCERTTYPE          int32   `json:"zscerttype" xorm:"ZSCERTTYPE"`                             // 证书类型 - 枚举”ZSCertType“ - 类型:2,4,5
+	CERNO               string  `json:"cerno" xorm:"CERNO"`                                       // 证书编号 - 类型:2,4,5
+	ZSCRYSTALTYPE       string  `json:"zscrystaltype" xorm:"ZSCRYSTALTYPE"`                       // 晶型范围 - 枚举“ZSCrystalType“ - 类型:3, 多个,逗号分隔
+	CPCERTNO            string  `json:"cpcertno" xorm:"CPCERTNO"`                                 // 金伯利证书编号 - 类型:3
+	ORIGIN              string  `json:"origin" xorm:"ORIGIN"`                                     // 原产地 - 类型:3
+	KPWEIGHT            string  `json:"kpweight" xorm:"KPWEIGHT"`                                 // 金伯利证书重量 - 类型:3
+	KPPATH              string  `json:"kppath" xorm:"KPPATH"`                                     // 金伯利证书图片(相对地址) - 类型:3
+	ZSSTYLETYPE         int32   `json:"zsstyletype" xorm:"ZSSTYLETYPE"`                           // 款式 - 类型:4
+	STONEDESC           string  `json:"stonedesc" xorm:"STONEDESC"`                               // 配石描述 - 类型:4
+	SETTINGMATERIAL     string  `json:"settingmaterial" xorm:"SETTINGMATERIAL"`                   // 镶嵌材料 - 类型:4
+	ZSCZCOLOR1TYPE      int32   `json:"zsczcolor1type" xorm:"ZSCZCOLOR1TYPE"`                     // 彩钻颜色1 - 枚举”ZSCZColor1Type“ - 类型:5
+	ZSCZCOLOR2TYPE      int32   `json:"zsczcolor2type" xorm:"ZSCZCOLOR2TYPE"`                     // 彩钻颜色2 - 枚举”ZSCZColor2Type“ - 类型:5
+	ZSCZCOLOR3TYPE      int32   `json:"zsczcolor3type" xorm:"ZSCZCOLOR3TYPE"`                     // 彩钻颜色3 - 枚举”ZSCZColor3Type“ - 类型:5
+	ISVALID             int32   `json:"isvalid" xorm:"ISVALID"`                                   // 是否有效 - 0:无效 1:有效
+}
+
+func (r *GZGoods) calc() {
+
+}
+
+func (r *GZGoods) buildSql() string {
+	var sqlId utils.SQLVal = `
+	SELECT 
+		t.*
+	FROM View_GZ_WRStandard_Ex_Query t
+	WHERE GOODSNO = '%v'
+	`
+	sqlId.FormatParam(r.GOODSNO)
+
+	return sqlId.String()
+}
+
+// GetDataEx 从数据库中查询数据
+func (r *GZGoods) GetDataEx() (interface{}, error) {
+	e := db.GetEngine()
+	s := e.SQL(r.buildSql())
+	var sData GZGoods
+	has, err := s.Get(&sData)
+	if err != nil {
+		return nil, err
+	}
+	if !has {
+		return struct{}{}, nil
+	}
+	sData.calc()
+	return sData, nil
+}

+ 1 - 0
routers/router.go

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