zou.yingbin hace 4 años
padre
commit
81af2016a4

+ 1 - 1
controllers/ermcp3/qryErmcp3Report.go

@@ -602,7 +602,7 @@ func QryTaFutureDataReport(c *gin.Context) {
 	a.CheckParamF(func() bool {
 		if req.QUERYTYPE == 2 {
 			// 检查报表明细必填字段
-			if req2.CURRENCYID == 0 || req2.GOODSGROUPID == 0 || req2.GOODSID == 0 || req2.BUYORSELL == 0 {
+			if req2.CURRENCYID == 0 || req2.GOODSGROUPID == 0 || req2.GOODSID == 0 {
 				return false
 			}
 		}

+ 1 - 1
controllers/qhj/qryQhj.go

@@ -425,7 +425,7 @@ func QueryParentAreaList(c *gin.Context) {
 		USERID int64 `form:"userid" binding:"required"` // 用户id
 	}{}
 	a.DoBindReq(&req)
-	m := models.QhjParentAreaList{USERID: mtpcache.GetAreaUserId(req.USERID, 0)}
+	m := models.QhjParentAreaList{USERID: req.USERID}
 	a.DoGetDataI(&m)
 }
 

+ 2 - 2
controllers/qhjPCWeb/qryQhjPCWeb.go

@@ -294,7 +294,7 @@ func QueryContract(c *gin.Context) {
 // @Produce json
 // @Security ApiKeyAuth
 // @Param status query string false "状态(可多选,逗号隔开) - 1:正常 2:停用 3:注销"
-// @Success 200 {array} models.QhjPickGoods
+// @Success 200 {array} models.QhjMgrPickGoods
 // @Failure 500 {object} app.Response
 // @Router /QhjMgr/QueryPickGoods [get]
 // @Tags 大连千海金(PCWeb)
@@ -304,7 +304,7 @@ func QueryPickGoods(c *gin.Context) {
 		STATUS string `form:"status"` // 用户id
 	}{}
 	a.DoBindReq(&req)
-	m := models.QhjPickGoods{FilterStatus: req.STATUS}
+	m := models.QhjMgrPickGoods{FilterStatus: req.STATUS}
 	a.DoGetDataI(&m)
 }
 

+ 4 - 0
models/ermcp3.go

@@ -654,6 +654,8 @@ type Ermcp3Contract struct {
 	MERUSERLOGINCODE   string `json:"meruserlogincode"`   // 跟单员登录代码
 	CURRENCYNAME       string `json:"currencyname"`       // 币种名称
 	TRADEUSERNAME      string `json:"tradeusername"`      // 交易员名称
+	SALEUSERNAME       string `json:"saleusername"`       // 业务员名称
+	MERUSERNAME        string `json:"merusername"`        // 跟单员名称
 
 	// 筛选条件
 	QryType   int32 `json:"-"` // 查询类型 1-未提交 2-待审核 3-履约中 4-已完成
@@ -685,6 +687,8 @@ func (r *Ermcp3Contract) calc() {
 	r.MERUSERLOGINCODE = mtpcache.GetLoginCodeByUserId(r.MERUSERID)
 	r.TRADEUSERNAME = mtpcache.GetUserNameByUserId(r.TRADEUSERID)
 	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
+	r.SALEUSERNAME = mtpcache.GetUserNameByUserId(r.SALEUSERID)
+	r.MERUSERNAME = mtpcache.GetUserNameByUserId(r.MERUSERID)
 }
 
 func (r *Ermcp3Contract) buildSql() string {

+ 2 - 1
models/ermcp3Report.go

@@ -1954,7 +1954,7 @@ type Ermcp3TaFutuReDataReport struct {
 
 	OPENAVGPRICE  float64 `json:"openavgprice"`  // 开仓均价
 	CLOSEAVGPRICE float64 `json:"closeavgprice"` // 平仓均价
-	ENUMDICNAME   string  `json:"enumdicname"`   // 单位名称(现货商品)
+	ENUMDICNAME   string  `json:"enumdicname"`   // 单位名称
 	QueryType     int32   `json:"-"`             // 查询类型 1-报表 2-报表明细
 	BeginDate     string  `json:"begindate"`     // 开始交易日
 	EndDate       string  `json:"enddate"`       // 结束交易日
@@ -1968,6 +1968,7 @@ func (r *Ermcp3TaFutuReDataReport) calc() {
 	if r.TODAYCLOSEQTY != 0 {
 		r.CLOSEAVGPRICE = r.TODAYCLOSEAMOUNT / r.TODAYCLOSEQTY
 	}
+	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.GOODUNITID)
 }
 func (r *Ermcp3TaFutuReDataReport) userType() int32 {
 	var userType int32 = 2

+ 3 - 4
models/qhj.go

@@ -1797,10 +1797,9 @@ func (r *QhjParentAreaList) buildSql() string {
 		"  from useraccount t" +
 		" where 1 = 1" +
 		"   and t.accountstatus = 4" +
-		"   and t.usertype = 2" +
-		"   and t.rootuserid = %v" +
-		"    or t.userid = %v"
-	sqlId.FormatParam(r.USERID, r.USERID)
+		"   and t.usertype = 2"
+	sqlId.JoinFormat(" and t.subarealevelpath like '%%,%v,%%'", r.USERID)
+	sqlId.Join(" order by t.userid")
 	return sqlId.String()
 }