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

Merge branch 'master' of 192.168.30.132:MTP2.0/MTP20_IF

zhou.xiaoning пре 4 година
родитељ
комит
c48910e2de
6 измењених фајлова са 72 додато и 19 уклоњено
  1. 61 12
      config/pc_menu.json
  2. 1 1
      controllers/tradexx/qryTradexx.go
  3. 7 3
      db/checkConnection.go
  4. 0 1
      models/ermcp3.go
  5. 1 1
      models/tjmd.go
  6. 2 1
      models/tradexx.go

+ 61 - 12
config/pc_menu.json

@@ -472,6 +472,7 @@
               }
             ]
           },
+
           {
             "code": "commodity_contract_commission",
             "title": "委托",
@@ -497,6 +498,54 @@
             ]
           },
           {
+            "code": "commodity_contract_bargain",
+            "title": "议价单",
+            "sort": 1,
+            "type": 4,
+            "rulekey": "",
+            "isshow": true,
+            "url": "",
+            "remark": "",
+            "children": [
+              {
+                "code": "commodity_contract_bargain_cancel_order",
+                "title": "撤单",
+                "sort": 1,
+                "type": 2,
+                "rulekey": "",
+                "isshow": true,
+                "url": "",
+                "remark": "",
+                "children": [
+                ]
+              },
+              {
+                "code": "commodity_contract_bargain_submit_order",
+                "title": "同意",
+                "sort": 1,
+                "type": 2,
+                "rulekey": "",
+                "isshow": true,
+                "url": "",
+                "remark": "",
+                "children": [
+                ]
+              },
+              {
+                "code": "commodity_contract_bargain_refuse_order",
+                "title": "拒绝",
+                "sort": 1,
+                "type": 2,
+                "rulekey": "",
+                "isshow": true,
+                "url": "",
+                "remark": "",
+                "children": [
+                ]
+              }
+            ]
+          },
+          {
             "code": "commodity_contract_make_deal",
             "title": "成交",
             "sort": 1,
@@ -5621,7 +5670,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_gjsxsbb_company_sales_tab",
             "isshow": true,
-            "url": "/qhj/prosaleday/xsrblinit",
+            "url": "/qhj/prosaleday/initview",
             "remark": "",
             "children": []
           },
@@ -5632,7 +5681,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_gjsxsbb_departmental_sale_tab",
             "isshow": true,
-            "url": "/qhj/prosaleday/deptinit",
+            "url": "/qhj/prosaleday/initview",
             "remark": "",
             "children": []
           }
@@ -5655,7 +5704,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_zgxsbb_company_sale_day_tab",
             "isshow": true,
-            "url": "/qhj/prosaleday/zgxsrblinit",
+            "url": "/qhj/prosaleday/zginitview",
             "remark": "",
             "children": []
           },
@@ -5666,7 +5715,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_zgxsbb_company_sale_week_tab",
             "isshow": true,
-            "url": "/qhj/prosaleday/zggsxszbinit",
+            "url": "/qhj/prosaleday/zginitview",
             "remark": "",
             "children": []
           },
@@ -5677,7 +5726,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_zgxsbb_company_sale_month_tab",
             "isshow": true,
-            "url": "/qhj/prosaleday/zggsxsybinit",
+            "url": "/qhj/prosaleday/zginitview",
             "remark": "",
             "children": []
           },
@@ -5688,7 +5737,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_zgxsbb_departmental_sale_week_tab",
             "isshow": true,
-            "url": "/qhj/prosaleday/zgdeptzbinit",
+            "url": "/qhj/prosaleday/zginitview",
             "remark": "",
             "children": []
           },
@@ -5699,7 +5748,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_zgxsbb_departmental_sale_month_tab",
             "isshow": true,
-            "url": "/qhj/prosaleday/zgdeptybinit",
+            "url": "/qhj/prosaleday/zginitview",
             "remark": "",
             "children": []
           },
@@ -5710,7 +5759,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_zgxsbb_product_sale_month_tab",
             "isshow": true,
-            "url": "/qhj/prosaleday/zgproducttybinit",
+            "url": "/qhj/prosaleday/zginitview",
             "remark": "",
             "children": []
           }
@@ -5733,7 +5782,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_kfbb_reach_rate_report_tab",
             "isshow": true,
-            "url": "/qhj/customerservice/dclinit",
+            "url": "/qhj/customerservice/initview",
             "remark": "",
             "children": []
           },
@@ -5744,7 +5793,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_kfbb_team_annualized_performance_ranking_report_tab",
             "isshow": true,
-            "url": "/qhj/customerservice/tdnhyjpxinit",
+            "url": "/qhj/customerservice/initview",
             "remark": "",
             "children": []
           },
@@ -5755,7 +5804,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_kfbb_personal_annualized_performance_ranking_report_tab",
             "isshow": true,
-            "url": "/qhj/customerservice/grnhyjpxinit",
+            "url": "/qhj/customerservice/initview",
             "remark": "",
             "children": []
           },
@@ -5766,7 +5815,7 @@
             "type": 5,
             "rulekey": "client_pc_web_qhj_kfbb_team_manager_annualized_performance_ranking_report_tab",
             "isshow": true,
-            "url": "/qhj/customerservice/tdjlnhyjpxinit",
+            "url": "/qhj/customerservice/initview",
             "remark": "",
             "children": []
           }

+ 1 - 1
controllers/tradexx/qryTradexx.go

@@ -28,7 +28,7 @@ import (
 // @Tags 通用单据
 func QueryTradeHolderDetail(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
-	m := models.TradeHolderDetail{}
+	m := models.TradeHolderDetail{BUYORSELL: -1}
 	a.DoBindReq(&m)
 	a.DoGetDataI(&m)
 }

+ 7 - 3
db/checkConnection.go

@@ -12,27 +12,31 @@ func StartCheckConnection(dbType int) {
 		return
 	}
 
+	fDelay := func() {
+		time.Sleep(time.Duration(30) * time.Second)
+	}
+
 	switch dbType {
 	case 0: // oracle
 		for {
 			if err := GetEngine().Ping(); err != nil {
 				InitDbEngine()
 			}
-			time.Sleep(time.Duration(5000) * time.Millisecond)
+			fDelay()
 		}
 	case 1: // mysql
 		for {
 			if err := GetMySQLEngine().Ping(); err != nil {
 				InitMySQLDbEngine()
 			}
-			time.Sleep(time.Duration(5000) * time.Millisecond)
+			fDelay()
 		}
 	case 2: // mongodb
 		for {
 			if err := GetMongoDB().Session.Ping(); err != nil {
 				InitMongoDB()
 			}
-			time.Sleep(time.Duration(5000) * time.Millisecond)
+			fDelay()
 		}
 	}
 }

Разлика између датотеке није приказан због своје велике величине
+ 0 - 1
models/ermcp3.go


+ 1 - 1
models/tjmd.go

@@ -53,7 +53,7 @@ select g1.goodsid,
     on g1.refgoodsid = g2.goodsid
   left join goodsgroup gp
     on g1.goodsgroupid = gp.goodsgroupid
-  where 1=1
+  where 1=1 and g1.goodsstatus = 3
 `
 	sqlId.JoinEx(r.FtMarketIds != "", fmt.Sprintf(" and gp.marketid in(%v)", r.FtMarketIds))
 

+ 2 - 1
models/tradexx.go

@@ -175,7 +175,7 @@ type TradeHolderDetail struct {
 	MARKETID            int32    `json:"marketid"  xorm:"MARKETID" form:"marketid"`       // 市场ID
 	GOODSID             int32    `json:"goodsid"  xorm:"GOODSID" form:"goodsid"`          // 商品ID
 	ACCOUNTID           int64    `json:"accountid"  xorm:"ACCOUNTID" form:"accountid"`    // 账号ID
-	BUYORSELL           int32    `json:"buyorsell"  xorm:"BUYORSELL"`                     // 方向 - 0:买 1:卖
+	BUYORSELL           int32    `json:"buyorsell"  xorm:"BUYORSELL" form:"buyorsell"`    // 方向 - 0:买 1:卖
 	OPENQTY             SFLOAT64 `json:"openqty"  xorm:"OPENQTY"`                         // 建仓数量
 	HOLDERQTY           SFLOAT64 `json:"holderqty"  xorm:"HOLDERQTY"`                     // 持仓数量
 	FREEZEQTY           SFLOAT64 `json:"freezeqty"  xorm:"FREEZEQTY"`                     // 冻结数量
@@ -285,6 +285,7 @@ SELECT to_char(t.TRADEID) TRADEID,
 
 	sqlId.AndEx("utmp.userid", r.USERID, r.USERID > 0)
 	sqlId.AndEx("t.goodsid", r.GOODSID, r.GOODSID > 0)
+	sqlId.AndEx("t.BUYORSELL", r.BUYORSELL, r.BUYORSELL != -1)
 	sqlId.JoinEx(r.FtTradeMode != "", fmt.Sprintf(" and gtmp.trademode in(%v)", r.FtTradeMode))
 	sqlId.JoinEx(r.FtMarketIDs != "", fmt.Sprintf(" and gtmp.marketid in(%v)", r.FtMarketIDs))
 	sqlId.JoinEx(r.FtAccountIDs != "", fmt.Sprintf(" and t.accountid in(%v)", r.FtAccountIDs))

Неке датотеке нису приказане због велике количине промена