ソースを参照

获取钻石详情接口增加仓库地址相关出参

zhou.xiaoning 3 年 前
コミット
6deaf3d0e9
4 ファイル変更92 行追加1 行削除
  1. 24 0
      docs/docs.go
  2. 24 0
      docs/swagger.json
  3. 18 0
      docs/swagger.yaml
  4. 26 1
      models/guangzuan.go

+ 24 - 0
docs/docs.go

@@ -29500,14 +29500,30 @@ const docTemplate = `{
                 "goodsno"
             ],
             "properties": {
+                "address": {
+                    "description": "详细地址",
+                    "type": "string"
+                },
                 "cerno": {
                     "description": "证书编号 - 类型:2,4,5",
                     "type": "string"
                 },
+                "cityname": {
+                    "description": "城市名称",
+                    "type": "string"
+                },
+                "countryname": {
+                    "description": "国家名称",
+                    "type": "string"
+                },
                 "cpcertno": {
                     "description": "金伯利证书编号 - 类型:3",
                     "type": "string"
                 },
+                "districtname": {
+                    "description": "地区名称",
+                    "type": "string"
+                },
                 "goodsno": {
                     "description": "商品编号",
                     "type": "string"
@@ -29552,6 +29568,10 @@ const docTemplate = `{
                     "description": "克拉单价 - 类型:1,2,3,5",
                     "type": "string"
                 },
+                "provincename": {
+                    "description": "省名称",
+                    "type": "string"
+                },
                 "remainqty": {
                     "description": "剩余重量",
                     "type": "number"
@@ -29580,6 +29600,10 @@ const docTemplate = `{
                     "description": "尺寸3 - 类型:2,4,5",
                     "type": "string"
                 },
+                "sizedisplay": {
+                    "description": "尺寸",
+                    "type": "string"
+                },
                 "stonedesc": {
                     "description": "配石描述 - 类型:4",
                     "type": "string"

+ 24 - 0
docs/swagger.json

@@ -29491,14 +29491,30 @@
                 "goodsno"
             ],
             "properties": {
+                "address": {
+                    "description": "详细地址",
+                    "type": "string"
+                },
                 "cerno": {
                     "description": "证书编号 - 类型:2,4,5",
                     "type": "string"
                 },
+                "cityname": {
+                    "description": "城市名称",
+                    "type": "string"
+                },
+                "countryname": {
+                    "description": "国家名称",
+                    "type": "string"
+                },
                 "cpcertno": {
                     "description": "金伯利证书编号 - 类型:3",
                     "type": "string"
                 },
+                "districtname": {
+                    "description": "地区名称",
+                    "type": "string"
+                },
                 "goodsno": {
                     "description": "商品编号",
                     "type": "string"
@@ -29543,6 +29559,10 @@
                     "description": "克拉单价 - 类型:1,2,3,5",
                     "type": "string"
                 },
+                "provincename": {
+                    "description": "省名称",
+                    "type": "string"
+                },
                 "remainqty": {
                     "description": "剩余重量",
                     "type": "number"
@@ -29571,6 +29591,10 @@
                     "description": "尺寸3 - 类型:2,4,5",
                     "type": "string"
                 },
+                "sizedisplay": {
+                    "description": "尺寸",
+                    "type": "string"
+                },
                 "stonedesc": {
                     "description": "配石描述 - 类型:4",
                     "type": "string"

+ 18 - 0
docs/swagger.yaml

@@ -9645,12 +9645,24 @@ definitions:
     type: object
   models.GZGoods:
     properties:
+      address:
+        description: 详细地址
+        type: string
       cerno:
         description: 证书编号 - 类型:2,4,5
         type: string
+      cityname:
+        description: 城市名称
+        type: string
+      countryname:
+        description: 国家名称
+        type: string
       cpcertno:
         description: 金伯利证书编号 - 类型:3
         type: string
+      districtname:
+        description: 地区名称
+        type: string
       goodsno:
         description: 商品编号
         type: string
@@ -9684,6 +9696,9 @@ definitions:
       priceper:
         description: 克拉单价 - 类型:1,2,3,5
         type: string
+      provincename:
+        description: 省名称
+        type: string
       remainqty:
         description: 剩余重量
         type: number
@@ -9705,6 +9720,9 @@ definitions:
       size3:
         description: 尺寸3 - 类型:2,4,5
         type: string
+      sizedisplay:
+        description: 尺寸
+        type: string
       stonedesc:
         description: 配石描述 - 类型:4
         type: string

+ 26 - 1
models/guangzuan.go

@@ -1865,11 +1865,22 @@ type GZGoods struct {
 	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:有效
+	SIZEDISPLAY         string  `json:"sizedisplay" xorm:"SIZEDISPLAY"`                           // 尺寸
 
 	WRTRADEORDERID        string  `json:"wrtradeorderid" xorm:"WRTRADEORDERID1" form:"wrtradeorderid"` // 仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
 	PERFORMANCETEMPLATEID int64   `json:"performancetemplateid" xorm:"PERFORMANCETEMPLATEID"`          // 履约计划模板ID
 	REMAINQTY             float64 `json:"remainqty" xorm:"REMAINQTY"`                                  // 剩余重量
 
+	ADDRESS      string `json:"address" xorm:"ADDRESS"` // 详细地址
+	COUNTRYID    int32  `json:"-" xorm:"COUNTRYID"`     // 国家
+	PROVINCEID   int32  `json:"-" xorm:"PROVINCEID"`    // 省
+	CITYID       int32  `json:"-" xorm:"CITYID"`        // 市
+	DISTRICTID   int32  `json:"-" xorm:"DISTRICTID"`    // 区
+	COUNTRYNAME  string `json:"countryname"`            // 国家名称
+	CITYNAME     string `json:"cityname"`               // 城市名称
+	PROVINCENAME string `json:"provincename"`           // 省名称
+	DISTRICTNAME string `json:"districtname"`           // 地区名称
+
 	MOBILE string `json:"mobile"` // 手机号码
 }
 
@@ -1883,6 +1894,10 @@ func (r *GZGoods) calc() {
 			}
 		}
 	}
+	r.COUNTRYNAME = mtpcache.GetDivisionName(r.COUNTRYID)
+	r.CITYNAME = mtpcache.GetDivisionName(r.CITYID)
+	r.PROVINCENAME = mtpcache.GetDivisionName(r.PROVINCEID)
+	r.DISTRICTNAME = mtpcache.GetDivisionName(r.DISTRICTID)
 }
 
 func (r *GZGoods) buildSql() string {
@@ -1892,10 +1907,20 @@ func (r *GZGoods) buildSql() string {
 		u.MOBILE,
 		to_char(od.WRTRADEORDERID) WRTRADEORDERID1,
 		od.PERFORMANCETEMPLATEID,
-		((od.ORDERQTY - od.TRADEQTY) / 100) REMAINQTY
+		((od.ORDERQTY - od.TRADEQTY) / 100) REMAINQTY,
+		wh.ADDRESS   ,
+		wh.COUNTRYID ,
+		wh.PROVINCEID,
+		wh.CITYID    ,
+		wh.DISTRICTID,
+		CASE WHEN
+			t.SIZE1 IS NOT NULL AND t.SIZE2 IS NOT NULL AND t.SIZE2 IS NOT NULL THEN t.SIZE1 || '*' || t.SIZE2 || '*' || t.SIZE3
+			ELSE t.SIZE1
+		END AS SIZEDISPLAY
 	FROM View_GZ_WRStandard_Ex_Query t
 	LEFT JOIN userinfo u ON u.USERID = t.USERID
 	LEFT JOIN WRTrade_OrderDetail od ON od.wrstandardid = t.wrstandardid
+	LEFT JOIN WAREHOUSEINFO wh ON wh.AUTOID = t.WAREHOUSEID
 	WHERE GOODSNO = '%v'
 	`
 	sqlId.FormatParam(r.GOODSNO)