瀏覽代碼

ThjpurchasetransferDetail: 添加返回字段

deng.yinping 3 年之前
父節點
當前提交
8b9b7cfe70
共有 4 個文件被更改,包括 156 次插入10 次删除
  1. 46 2
      docs/docs.go
  2. 46 2
      docs/swagger.json
  3. 35 2
      docs/swagger.yaml
  4. 29 4
      models/ferroalloy.go

+ 46 - 2
docs/docs.go

@@ -44727,7 +44727,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "presalestatus": {
-                    "description": "预状态 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成",
+                    "description": "预状态 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成",
                     "type": "integer"
                 },
                 "remark": {
@@ -44823,6 +44823,14 @@ const docTemplate = `{
                     "description": "受让人",
                     "type": "string"
                 },
+                "contactinfo": {
+                    "description": "联系方式",
+                    "type": "string"
+                },
+                "contactname": {
+                    "description": "联系人姓名",
+                    "type": "string"
+                },
                 "contractaddrbuy": {
                     "description": "贸易合同地址(买家)",
                     "type": "string"
@@ -44831,14 +44839,46 @@ const docTemplate = `{
                     "description": "贸易合同地址(卖家)",
                     "type": "string"
                 },
+                "createtime": {
+                    "description": "转让委托时间",
+                    "type": "string"
+                },
+                "depositrate": {
+                    "description": "定金比例",
+                    "type": "number"
+                },
+                "desaddress": {
+                    "description": "目的地地址",
+                    "type": "string"
+                },
+                "enddate": {
+                    "description": "到期日期(交收日期)",
+                    "type": "string"
+                },
+                "enddatemonth": {
+                    "description": "到期月份",
+                    "type": "string"
+                },
+                "lastprice": {
+                    "description": "[实际价]到期价格",
+                    "type": "number"
+                },
                 "payeddeposit": {
-                    "description": "买方已付定金",
+                    "description": "买方已付定金(预付款(含定金))",
                     "type": "number"
                 },
+                "receiptinfo": {
+                    "description": "发票信息",
+                    "type": "string"
+                },
                 "sellusername": {
                     "description": "转让人",
                     "type": "string"
                 },
+                "thjdeliverymode": {
+                    "description": "交割方式 - 1:平台仓储 2:自提 3:代办运输 (枚举:THJDeliveryMode)",
+                    "type": "integer"
+                },
                 "tradeprice": {
                     "description": "预售价格",
                     "type": "number"
@@ -44863,6 +44903,10 @@ const docTemplate = `{
                     "description": "转让状态 - 1:挂牌中 2:已撤销 3:处理中 4:已转让",
                     "type": "integer"
                 },
+                "transfertradetime": {
+                    "description": "转让成交时间",
+                    "type": "string"
+                },
                 "warehousename": {
                     "description": "仓库名称",
                     "type": "string"

+ 46 - 2
docs/swagger.json

@@ -44718,7 +44718,7 @@
                     "type": "string"
                 },
                 "presalestatus": {
-                    "description": "预状态 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成",
+                    "description": "预状态 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成",
                     "type": "integer"
                 },
                 "remark": {
@@ -44814,6 +44814,14 @@
                     "description": "受让人",
                     "type": "string"
                 },
+                "contactinfo": {
+                    "description": "联系方式",
+                    "type": "string"
+                },
+                "contactname": {
+                    "description": "联系人姓名",
+                    "type": "string"
+                },
                 "contractaddrbuy": {
                     "description": "贸易合同地址(买家)",
                     "type": "string"
@@ -44822,14 +44830,46 @@
                     "description": "贸易合同地址(卖家)",
                     "type": "string"
                 },
+                "createtime": {
+                    "description": "转让委托时间",
+                    "type": "string"
+                },
+                "depositrate": {
+                    "description": "定金比例",
+                    "type": "number"
+                },
+                "desaddress": {
+                    "description": "目的地地址",
+                    "type": "string"
+                },
+                "enddate": {
+                    "description": "到期日期(交收日期)",
+                    "type": "string"
+                },
+                "enddatemonth": {
+                    "description": "到期月份",
+                    "type": "string"
+                },
+                "lastprice": {
+                    "description": "[实际价]到期价格",
+                    "type": "number"
+                },
                 "payeddeposit": {
-                    "description": "买方已付定金",
+                    "description": "买方已付定金(预付款(含定金))",
                     "type": "number"
                 },
+                "receiptinfo": {
+                    "description": "发票信息",
+                    "type": "string"
+                },
                 "sellusername": {
                     "description": "转让人",
                     "type": "string"
                 },
+                "thjdeliverymode": {
+                    "description": "交割方式 - 1:平台仓储 2:自提 3:代办运输 (枚举:THJDeliveryMode)",
+                    "type": "integer"
+                },
                 "tradeprice": {
                     "description": "预售价格",
                     "type": "number"
@@ -44854,6 +44894,10 @@
                     "description": "转让状态 - 1:挂牌中 2:已撤销 3:处理中 4:已转让",
                     "type": "integer"
                 },
+                "transfertradetime": {
+                    "description": "转让成交时间",
+                    "type": "string"
+                },
                 "warehousename": {
                     "description": "仓库名称",
                     "type": "string"

+ 35 - 2
docs/swagger.yaml

@@ -19043,7 +19043,7 @@ definitions:
         description: 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
         type: string
       presalestatus:
-        description: 预状态 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成
+        description: 预状态 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成
         type: integer
       remark:
         description: 备注
@@ -19116,18 +19116,48 @@ definitions:
       buyusername:
         description: 受让人
         type: string
+      contactinfo:
+        description: 联系方式
+        type: string
+      contactname:
+        description: 联系人姓名
+        type: string
       contractaddrbuy:
         description: 贸易合同地址(买家)
         type: string
       contractaddrsell:
         description: 贸易合同地址(卖家)
         type: string
+      createtime:
+        description: 转让委托时间
+        type: string
+      depositrate:
+        description: 定金比例
+        type: number
+      desaddress:
+        description: 目的地地址
+        type: string
+      enddate:
+        description: 到期日期(交收日期)
+        type: string
+      enddatemonth:
+        description: 到期月份
+        type: string
+      lastprice:
+        description: '[实际价]到期价格'
+        type: number
       payeddeposit:
-        description: 买方已付定金
+        description: 买方已付定金(预付款(含定金))
         type: number
+      receiptinfo:
+        description: 发票信息
+        type: string
       sellusername:
         description: 转让人
         type: string
+      thjdeliverymode:
+        description: 交割方式 - 1:平台仓储 2:自提 3:代办运输 (枚举:THJDeliveryMode)
+        type: integer
       tradeprice:
         description: 预售价格
         type: number
@@ -19146,6 +19176,9 @@ definitions:
       transferstatus:
         description: 转让状态 - 1:挂牌中 2:已撤销 3:处理中 4:已转让
         type: integer
+      transfertradetime:
+        description: 转让成交时间
+        type: string
       warehousename:
         description: 仓库名称
         type: string

+ 29 - 4
models/ferroalloy.go

@@ -1299,7 +1299,7 @@ type Thjpurchasetransfer struct {
 	CREATETIME        string `json:"createtime" xorm:"CREATETIME"`               // 转让挂牌时间
 	TRANSFERTRADETIME string `json:"transfertradetime" xorm:"TRANSFERTRADETIME"` // 转让成交时间
 
-	PRESALESTATUS int32 `json:"presalestatus" xorm:"PRESALESTATUS"` // 预状态 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成
+	PRESALESTATUS int32 `json:"presalestatus" xorm:"PRESALESTATUS"` // 预状态 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成
 
 	PageEx `xorm:"extends"` // 页码信息
 }
@@ -1385,7 +1385,7 @@ type ThjpurchasetransferDetail struct {
 	TRANSFERAMOUNT   float64 `json:"transferamount" xorm:"TRANSFERAMOUNT"`           // 转让金额
 	TRANSFERSTATUS   int32   `json:"transferstatus" xorm:"TRANSFERSTATUS"`           // 转让状态 - 1:挂牌中 2:已撤销 3:处理中 4:已转让
 	TRADEPRICE       float64 `json:"tradeprice" xorm:"TRADEPRICE"`                   // 预售价格
-	PAYEDDEPOSIT     float64 `json:"payeddeposit" xorm:"PAYEDDEPOSIT"`               // 买方已付定金
+	PAYEDDEPOSIT     float64 `json:"payeddeposit" xorm:"PAYEDDEPOSIT"`               // 买方已付定金(预付款(含定金))
 	CONTRACTADDRBUY  string  `json:"contractaddrbuy" xorm:"CONTRACTADDRBUY"`         // 贸易合同地址(买家)
 	CONTRACTADDRSELL string  `json:"contractaddrsell" xorm:"CONTRACTADDRSELL"`       // 贸易合同地址(卖家)
 	WRSTANDARDCODE   string  `json:"wrstandardcode" xorm:"WRSTANDARDCODE"`           // 现货商品代码
@@ -1396,6 +1396,18 @@ type ThjpurchasetransferDetail struct {
 
 	TRANSFERQTY int32 `json:"transferqty" xorm:"TRANSFERQTY"` // 转让数量
 
+	DEPOSITRATE       float64 `json:"depositrate" xorm:"DEPOSITRATE"`             // 定金比例
+	LASTPRICE         float64 `json:"lastprice" xorm:"LASTPRICE"`                 // [实际价]到期价格
+	THJDELIVERYMODE   int32   `json:"thjdeliverymode" xorm:"THJDELIVERYMODE"`     // 交割方式 - 1:平台仓储 2:自提 3:代办运输 (枚举:THJDeliveryMode)
+	CONTACTNAME       string  `json:"contactname" xorm:"CONTACTNAME"`             // 联系人姓名
+	CONTACTINFO       string  `json:"contactinfo" xorm:"CONTACTINFO"`             // 联系方式
+	DESADDRESS        string  `json:"desaddress" xorm:"DESADDRESS"`               // 目的地地址
+	RECEIPTINFO       string  `json:"receiptinfo" xorm:"RECEIPTINFO"`             // 发票信息
+	ENDDATEMONTH      string  `json:"enddatemonth" xorm:"ENDDATEMONTH"`           // 到期月份
+	ENDDATE           string  `json:"enddate" xorm:"ENDDATE"`                     // 到期日期(交收日期)
+	CREATETIME        string  `json:"createtime" xorm:"CREATETIME"`               // 转让委托时间
+	TRANSFERTRADETIME string  `json:"transfertradetime" xorm:"TRANSFERTRADETIME"` // 转让成交时间
+
 }
 
 func (r *ThjpurchasetransferDetail) calc() {
@@ -1419,9 +1431,22 @@ func (r *ThjpurchasetransferDetail) buildSql() string {
 		wh.WAREHOUSENAME,
 		u1.accountname BUYUSERNAME,
 		u2.accountname SELLUSERNAME,
-		t.TRANSFERQTY
+		t.TRANSFERQTY,
+		d.DEPOSITRATE,
+		d.PAYEDDEPOSIT,
+		d.LASTPRICE,
+		d.THJDELIVERYMODE,
+		d.CONTACTNAME,
+		d.CONTACTINFO,
+		d.DESADDRESS,
+		d.RECEIPTINFO,
+		to_char(pi.enddate, 'yyyy-MM') ENDDATEMONTH,
+        to_char(pi.enddate, 'yyyy-MM-dd') ENDDATE,
+		to_char(t.CREATETIME, 'yyyy-MM-dd hh24:mm:ss') CREATETIME,
+		to_char(t.TRANSFERTRADETIME, 'yyyy-MM-dd hh24:mm:ss') TRANSFERTRADETIME
 	from THJ_PurchaseTransfer t 
-	inner join THJ_PurchaseTradeDetail d on d.WRTRADEDETAILID = t.WRTRADEDETAILID 
+	inner join THJ_PurchaseTradeDetail d on d.WRTRADEDETAILID = t.WRTRADEDETAILID
+	left join wr_presaleapply pi on pi.presaleapplyid = t.presaleapplyid
 	left join wrstandard wr on wr.wrstandardid = t.wrstandardid
 	left join WAREHOUSEINFO wh on wh.autoid = t.warehouseid
 	left join useraccount u1 on u1.userid = t.buyuserid