Преглед изворни кода

1. 查行情增加品种筛选条件
2. 查持有记录问题修复

zou.yingbin пре 4 година
родитељ
комит
08ea6d1f78
4 измењених фајлова са 37 додато и 37 уклоњено
  1. 8 8
      docs/docs.go
  2. 8 8
      docs/swagger.json
  3. 8 8
      docs/swagger.yaml
  4. 13 13
      models/wrTrade2.go

+ 8 - 8
docs/docs.go

@@ -29506,7 +29506,7 @@ var doc = `{
                 },
                 "ladingbillid": {
                     "description": "提单ID(208+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "optioncompare": {
                     "description": "选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较",
@@ -29546,7 +29546,7 @@ var doc = `{
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -29558,7 +29558,7 @@ var doc = `{
                 },
                 "wrid": {
                     "description": "仓单变更ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrstandardcode": {
                     "description": "现货商品代码",
@@ -29679,7 +29679,7 @@ var doc = `{
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -30021,7 +30021,7 @@ var doc = `{
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -30138,7 +30138,7 @@ var doc = `{
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -30271,7 +30271,7 @@ var doc = `{
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -30392,7 +30392,7 @@ var doc = `{
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",

+ 8 - 8
docs/swagger.json

@@ -29490,7 +29490,7 @@
                 },
                 "ladingbillid": {
                     "description": "提单ID(208+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "optioncompare": {
                     "description": "选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较",
@@ -29530,7 +29530,7 @@
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -29542,7 +29542,7 @@
                 },
                 "wrid": {
                     "description": "仓单变更ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrstandardcode": {
                     "description": "现货商品代码",
@@ -29663,7 +29663,7 @@
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -30005,7 +30005,7 @@
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -30122,7 +30122,7 @@
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -30255,7 +30255,7 @@
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",
@@ -30376,7 +30376,7 @@
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrfactortypename": {
                     "description": "仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)",

+ 8 - 8
docs/swagger.yaml

@@ -13379,7 +13379,7 @@ definitions:
         type: number
       ladingbillid:
         description: 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       optioncompare:
         description: 选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
         type: string
@@ -13409,7 +13409,7 @@ definitions:
         type: string
       wrfactortypeid:
         description: 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       wrfactortypename:
         description: 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
         type: string
@@ -13418,7 +13418,7 @@ definitions:
         type: string
       wrid:
         description: 仓单变更ID
-        type: integer
+        type: string
       wrstandardcode:
         description: 现货商品代码
         type: string
@@ -13509,7 +13509,7 @@ definitions:
         type: string
       wrfactortypeid:
         description: 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       wrfactortypename:
         description: 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
         type: string
@@ -13764,7 +13764,7 @@ definitions:
         type: string
       wrfactortypeid:
         description: 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       wrfactortypename:
         description: 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
         type: string
@@ -13853,7 +13853,7 @@ definitions:
         type: string
       wrfactortypeid:
         description: 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       wrfactortypename:
         description: 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
         type: string
@@ -13952,7 +13952,7 @@ definitions:
         type: string
       wrfactortypeid:
         description: 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       wrfactortypename:
         description: 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
         type: string
@@ -14043,7 +14043,7 @@ definitions:
         type: string
       wrfactortypeid:
         description: 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       wrfactortypename:
         description: 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
         type: string

+ 13 - 13
models/wrTrade2.go

@@ -15,7 +15,7 @@ import (
 
 // WrOrderQuote 买卖大厅行情
 type WrOrderQuote struct {
-	WRFACTORTYPEID    int64            `json:"wrfactortypeid"  xorm:"'WRFACTORTYPEID'" form:"wrfactortypeid"` // 仓单要素id
+	WRFACTORTYPEID    string           `json:"wrfactortypeid"  xorm:"'WRFACTORTYPEID'" form:"wrfactortypeid"` // 仓单要素id
 	BUYPRICE          float64          `json:"buyprice"  xorm:"'BUYPRICE'"`                                   // 买价
 	BUYQTY            float64          `json:"buyqty"  xorm:"'BUYQTY'"`                                       // 买量
 	SELLPRICE         float64          `json:"sellprice"  xorm:"'SELLPRICE'"`                                 // 卖价
@@ -52,7 +52,7 @@ func (r *WrOrderQuote) calc() {
 func (r *WrOrderQuote) buildSqlFixedPrice() string {
 	var sqlId utils.SQLVal = "with buyQuote as" +
 		" (" +
-		"  select a.wrfactortypeid, a.fixedprice buyPrice, sum(a.orderqty) buyQty" +
+		"  select to_char(a.wrfactortypeid) wrfactortypeid, a.fixedprice buyPrice, sum(a.orderqty) buyQty" +
 		"    from (select t.wrfactortypeid," +
 		"                  t.marketid," +
 		"                  t.buyorsell," +
@@ -66,7 +66,7 @@ func (r *WrOrderQuote) buildSqlFixedPrice() string {
 		"   group by a.wrfactortypeid, a.fixedprice)," +
 		"sellQuote as" +
 		" (" +
-		"  select a.wrfactortypeid, a.fixedprice sellPrice, sum(a.orderqty) sellQty" +
+		"  select to_char(a.wrfactortypeid) wrfactortypeid, a.fixedprice sellPrice, sum(a.orderqty) sellQty" +
 		"    from (select t.wrfactortypeid," +
 		"                  t.marketid," +
 		"                  t.buyorsell," +
@@ -129,7 +129,7 @@ func (r *WrOrderQuote) buildSqlFixedPrice() string {
 // buildSqlPriceMove 浮动价
 func (r *WrOrderQuote) buildSqlPriceMove() string {
 	var sqlId utils.SQLVal = "with buyQuote as" +
-		" (select a.wrfactortypeid," +
+		" (select to_char(a.wrfactortypeid) wrfactortypeid," +
 		"         a.pricemove buypricemove," +
 		"         sum(a.orderqty) buyQty," +
 		"         a.goodsid," +
@@ -153,7 +153,7 @@ func (r *WrOrderQuote) buildSqlPriceMove() string {
 		"   where a.cnt = 1" +
 		"   group by a.wrfactortypeid, a.pricemove, a.goodsid, a.goodscode, a.deliverymonth)," +
 		"sellQuote as" +
-		" (select a.wrfactortypeid," +
+		" (select to_char(a.wrfactortypeid) wrfactortypeid," +
 		"         a.pricemove sellpricemove," +
 		"         a.goodsid," +
 		"         a.goodscode," +
@@ -268,7 +268,7 @@ func (r *WrOrderQuoteDetail) calc() {
 
 func (r *WrOrderQuoteDetail) buildSql() string {
 	var sqlId utils.SQLVal = "select t.wrtradeorderid," +
-		"       t.wrfactortypeid," +
+		"       to_char(t.wrfactortypeid) wrfactortypeid," +
 		"       t.userid," +
 		"       t.orderqty - t.tradeqty as qty," +
 		"       t.fixedprice as price," +
@@ -324,7 +324,7 @@ func (r *WrOrderQuoteDetail) GetDataByPage() (interface{}, error, int, int, int)
 
 // Wr2FactorType 仓单要素类型
 type Wr2FactorType struct {
-	WRFACTORTYPEID   int64  `json:"wrfactortypeid"  xorm:"WRFACTORTYPEID" form:"wrfactortypeid"`       // 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
+	WRFACTORTYPEID   string `json:"wrfactortypeid"  xorm:"WRFACTORTYPEID" form:"wrfactortypeid"`       // 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
 	WRFACTORTYPENAME string `json:"wrfactortypename"  xorm:"WRFACTORTYPENAME" form:"wrfactortypename"` // 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
 	DELIVERYGOODSID  int32  `json:"deliverygoodsid"  xorm:"DELIVERYGOODSID" form:"deliverygoodsid"`    // 品种ID
 	WAREHOUSEID      int64  `json:"warehouseid"  xorm:"WAREHOUSEID" form:"warehouseid"`                // 仓库ID
@@ -506,7 +506,7 @@ type WrOrderDetail struct {
 	BUYORSELL          int32   `json:"buyorsell"  xorm:"BUYORSELL" form:"buyorsell"`       // 买卖 - 0:买 1:卖(挂牌类型 买为采购 卖为销售)
 	MARKETID           int64   `json:"marketid"  xorm:"MARKETID" form:"marketid"`          // 市场ID
 	USERID             int64   `json:"userid"  xorm:"USERID" form:"userid"`                // 用户ID
-	WRFACTORTYPEID     int64   `json:"wrfactortypeid"  xorm:"WRFACTORTYPEID"`              // 仓单要素类型ID/商品ID(77)
+	WRFACTORTYPEID     string  `json:"wrfactortypeid"  xorm:"WRFACTORTYPEID"`              // 仓单要素类型ID/商品ID(77)
 	ORDERQTY           float64 `json:"orderqty"  xorm:"ORDERQTY" form:"orderqty"`          // 委托数量
 	TRADEQTY           float64 `json:"tradeqty"  xorm:"TRADEQTY" form:"tradeqty"`          // 成交数量
 	CANCELQTY          float64 `json:"cancelqty"  xorm:"CANCELQTY" form:"cancelqty"`       // 撤销数量
@@ -537,7 +537,7 @@ func (r *WrOrderDetail) calc() {
 
 func (r *WrOrderDetail) buildSql() string {
 	var sqlId utils.SQLVal = "with tmp as" +
-		" (select t.wrfactortypeid," +
+		" (select to_char(t.wrfactortypeid) wrfactortypeid," +
 		"         t.wrfactortypename2 wrfactortypename," +
 		"         t.wrstandardid," +
 		"         t.deliverygoodsid," +
@@ -631,7 +631,7 @@ func (r *WrTradeDetail) calc() {
 
 func (r *WrTradeDetail) buildSql() string {
 	var sqlId utils.SQLVal = "with tmp as" +
-		" (select t.wrfactortypeid," +
+		" (select to_char(t.wrfactortypeid) wrfactortypeid," +
 		"         t.wrfactortypename," +
 		"         t.wrstandardid," +
 		"         t.deliverygoodsid," +
@@ -1114,9 +1114,9 @@ func (r *WrPerformancePlan) GetDataEx() (interface{}, error) {
 
 // WrHoldLB 仓单持有记录
 type WrHoldLB struct {
-	LADINGBILLID    int64   `json:"ladingbillid"  xorm:"LADINGBILLID" form:"ladingbillid"`          // 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
+	LADINGBILLID    string  `json:"ladingbillid"  xorm:"LADINGBILLID" form:"ladingbillid"`          // 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
 	SUBNUM          int32   `json:"subnum"  xorm:"SUBNUM" form:"subnum"`                            // 提单子单号
-	WRFACTORTYPEID  int64   `json:"wrfactortypeid"  xorm:"WRFACTORTYPEID" form:"wrfactortypeid"`    // 仓单要素类型ID
+	WRFACTORTYPEID  string  `json:"wrfactortypeid"  xorm:"WRFACTORTYPEID" form:"wrfactortypeid"`    // 仓单要素类型ID
 	DELIVERYGOODSID int32   `json:"deliverygoodsid"  xorm:"DELIVERYGOODSID" form:"deliverygoodsid"` // 品种ID
 	QTY             float64 `json:"qty"  xorm:"QTY" form:"qty"`                                     // 数量
 	FREEZERQTY      float64 `json:"freezerqty"  xorm:"FREEZERQTY" form:"freezerqty"`                // 冻结数量
@@ -1124,7 +1124,7 @@ type WrHoldLB struct {
 	ACCOUNTID       int64   `json:"accountid"  xorm:"ACCOUNTID" form:"accountid"`                   // 持有人帐户ID
 	CREATETIME      string  `json:"createtime"  xorm:"CREATETIME" form:"createtime"`                // 创建时间(过户时间)
 	TRADEDATE       string  `json:"tradedate"  xorm:"TRADEDATE" form:"tradedate"`                   // 交易日(yyyyMMdd)
-	WRID            int64   `json:"wrid"  xorm:"WRID" form:"wrid"`                                  // 仓单变更ID
+	WRID            string  `json:"wrid"  xorm:"WRID" form:"wrid"`                                  // 仓单变更ID
 	PARENTSUBNUM    int32   `json:"parentsubnum"  xorm:"PARENTSUBNUM" form:"parentsubnum"`          // 拆分父子单号
 	PLEDGEQTY       float64 `json:"pledgeqty"  xorm:"'-'"`                                          // 质押数量
 	Wr2FactorType   `xorm:"extends"`