Browse Source

Merge remote-tracking branch 'origin/hotfix/v1.0.4.3' into dev_v1.0.4_wh

# Conflicts:
#	api/common/initconfig.go
WH01243 1 year ago
parent
commit
1da38a8e78

+ 6 - 4
api/common/initconfig.go

@@ -7,11 +7,11 @@ import (
 	"log"
 	"time"
 
-	"app.yhyue.com/moapp/jypkg/middleground"
-
 	. "app.yhyue.com/moapp/jybase/es"
 	"app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jybase/mysql"
+	"app.yhyue.com/moapp/jybase/redis"
+	"app.yhyue.com/moapp/jypkg/middleground"
 	"bp.jydev.jianyu360.cn/BaseService/fileCenter/rpc/filecenter"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/usercenter"
 	"bp.jydev.jianyu360.cn/CRM/application/api/internal/config"
@@ -22,6 +22,7 @@ import (
 	"github.com/ClickHouse/clickhouse-go/v2/lib/driver"
 	"github.com/zeromicro/go-zero/core/conf"
 	"github.com/zeromicro/go-zero/core/logx"
+	"github.com/zeromicro/go-zero/zrpc"
 )
 
 var configFile = flag.String("fs", "etc/crmapplication.yaml", "the config file")
@@ -168,13 +169,14 @@ func InitConf() {
 		log.Println("--初始化 elasticsearch--")
 		NewEs(DB.Es.Version, DB.Es.Addr, DB.Es.Size, DB.Es.UserName, DB.Es.Password)
 	}
+	redis.InitRedis(DB.Redis)
 
-	/*UserCenterRpc = usercenter.NewUserCenter(zrpc.MustNewClient(C.UserCenterRpc))
+	UserCenterRpc = usercenter.NewUserCenter(zrpc.MustNewClient(C.UserCenterRpc))
 	FileCenterRpc = filecenter.NewFileCenter(zrpc.MustNewClient(C.FileCenterRpc))
 	BaseCenterRpc = basecenter.NewBaseCenter(zrpc.MustNewClient(C.BaseCenterRpc))
 	SocialPlatformRpc = social.NewSocial(zrpc.MustNewClient(C.SocialPlatformRpc))
 	Middleground = middleground.NewMiddleground(C.BaseCenterRpc.Etcd.Hosts).
-		RegResourceCenter(C.ResourceCenterKey)*/
+		RegResourceCenter(C.ResourceCenterKey)
 	conf.MustLoad(*pushFile, &Push)
 	ConnectClickhouse(DB.Clickhouse)
 }

+ 2 - 1
api/etc/db.yaml

@@ -71,4 +71,5 @@ clickhouse:
     Password: pwdTopJy123
     DbName: information
     MaxIdleConns: 5
-    MaxOpenConns: 30
+    MaxOpenConns: 30
+redis: newother=192.168.3.149:1712

+ 1 - 0
api/internal/config/config.go

@@ -27,6 +27,7 @@ type Db struct {
 	Mongo      entity.Mongo    `json:"mongo"`
 	Es         entity.EsStruct `json:"es"`
 	Clickhouse *CHouseConfig
+	Redis      string `json:"redis"`
 }
 type CHouseConfig struct {
 	Addr         string

+ 2 - 0
api/internal/logic/salechanceaddlogic.go

@@ -50,6 +50,8 @@ func (l *SaleChanceAddLogic) SaleChanceAdd(req *types.SaleChanceReq) (resp *type
 		CustomId:          req.CustomId,          //客户id
 		CreateName:        req.CreateName,
 		ChanceSource:      req.ChanceSource,
+		OwnerId:           req.OwnerId,
+		BusinessId:        req.BusinessId,
 	}
 
 	status, error_msg := service.CanAdd(req.EntId, "more_create_chance", req.EmployInfoId, req.CustomId, req.PositionId)

+ 17 - 0
api/internal/service/CoopHistoryService.go

@@ -46,6 +46,23 @@ type ResultData struct {
 	IsMonitor        bool    `json:"isMonitor"`
 }
 
+type ResultDatas []*ResultData
+
+func (n *ResultDatas) Len() int {
+	return len(*n)
+}
+
+func (n *ResultDatas) Less(i, j int) bool {
+	if (*n)[i].RecentTime == (*n)[j].RecentTime {
+		return (*n)[i].EntName < (*n)[j].EntName
+	}
+	return (*n)[i].RecentTime > (*n)[j].RecentTime
+}
+
+func (n *ResultDatas) Swap(i, j int) {
+	(*n)[i], (*n)[j] = (*n)[j], (*n)[i]
+}
+
 type ProjectTmp struct {
 	Buyer        string   `ch:"buyer"`
 	BuyerId      string   `ch:"buyer_id"`

+ 123 - 41
api/internal/service/network.go

@@ -4,12 +4,13 @@ import (
 	"context"
 	"database/sql"
 	"fmt"
-	"log"
 	"math"
 	"sort"
 	"strings"
 	"time"
 
+	"app.yhyue.com/moapp/jybase/redis"
+
 	. "app.yhyue.com/moapp/jybase/common"
 	. "app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jybase/encrypt"
@@ -39,27 +40,27 @@ type networkTreeChild struct {
 	CreateTime  string `json:"createTime"`
 }
 
-func (s *networkTree) Len() int {
-	return len(s.Children)
+func (n *networkTree) Len() int {
+	return len(n.Children)
 }
 
-func (s *networkTree) Less(i, j int) bool {
-	if s.Name == "甲方" {
-		return s.Children[i].CompanyName < s.Children[j].CompanyName
+func (n *networkTree) Less(i, j int) bool {
+	if n.Name == "甲方" {
+		return n.Children[i].CompanyName < n.Children[j].CompanyName
 	}
-	it, err1 := time.ParseInLocation(Date_Full_Layout, s.Children[i].CreateTime, time.Local)
+	it, err1 := time.ParseInLocation(Date_Full_Layout, n.Children[i].CreateTime, time.Local)
 	if err1 != nil {
 		return true
 	}
-	jt, err2 := time.ParseInLocation(Date_Full_Layout, s.Children[j].CreateTime, time.Local)
+	jt, err2 := time.ParseInLocation(Date_Full_Layout, n.Children[j].CreateTime, time.Local)
 	if err2 != nil {
 		return true
 	}
 	return it.Unix() < jt.Unix()
 }
 
-func (s *networkTree) Swap(i, j int) {
-	s.Children[i], s.Children[j] = s.Children[j], s.Children[i]
+func (n *networkTree) Swap(i, j int) {
+	n.Children[i], n.Children[j] = n.Children[j], n.Children[i]
 }
 
 type projectInfo struct {
@@ -103,6 +104,40 @@ type myNetwork struct {
 	Create_time       string
 }
 
+type nodeTree struct {
+	NAME      string
+	ID        string
+	SZ_PID0   string
+	SZ_PID1   string
+	SZ_PID2   string
+	SZ_PID3   string
+	CODE      string
+	PCODE     string
+	DATACOUNT int64
+	SZ_LEVEL  int
+	SZ_LEAF   int
+	TYPE      string
+	MYID      string
+	MYTYPE    string
+}
+
+type nodeTrees []*nodeTree
+
+func (n *nodeTrees) Len() int {
+	return len(*n)
+}
+
+func (n *nodeTrees) Less(i, j int) bool {
+	if (*n)[i].PCODE == (*n)[j].PCODE {
+		return (*n)[i].CODE < (*n)[j].CODE
+	}
+	return (*n)[i].PCODE < (*n)[j].PCODE
+}
+
+func (n *nodeTrees) Swap(i, j int) {
+	(*n)[i], (*n)[j] = (*n)[j], (*n)[i]
+}
+
 //人脉库-添加/修改人脉
 func (n *network) AddOrUpdate(in *types.AddOrUpdateReq) *types.Reply {
 	reply := &types.Reply{Data: map[string]interface{}{
@@ -392,19 +427,20 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
 			list[v.Itype-1].Children = append(list[v.Itype-1].Children, ntc)
 		}
 	}
-	convList := []map[string]interface{}{}
+	parentConvList := &nodeTrees{}
+	convList := &nodeTrees{}
 	for _, v := range list {
-		pm := map[string]interface{}{
-			"CODE":      v.Name,
-			"NAME":      v.Name,
-			"SZ_PID0":   v.Name,
-			"SZ_LEVEL":  0,
-			"DATACOUNT": 0,
+		pm := &nodeTree{
+			CODE:      v.Name,
+			NAME:      v.Name,
+			SZ_PID0:   v.Name,
+			SZ_LEVEL:  0,
+			DATACOUNT: 0,
 		}
 		if len(v.Children) > 0 {
-			pm["SZ_LEAF"] = 0
+			pm.SZ_LEAF = 0
 		} else {
-			pm["SZ_LEAF"] = 1
+			pm.SZ_LEAF = 1
 		}
 		sort.Sort(v)
 		id, pType, pMyType, pMyId := "", "", "", ""
@@ -423,7 +459,32 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
 			pMyType += vv.Type
 			myChildIds, myChildTypes := "", ""
 			if in.Id == "" && v.Name == "甲方" {
+				cccNodes := []*nodeTree{}
+				cccIndexMap := map[string]int{}
 				for _, vvv := range firstpartyChild[vv.CompanyId] {
+					cccIndex, cccOk := cccIndexMap[vvv.Name]
+					if cccOk {
+						cccNodes[cccIndex].ID += "," + vvv.CompanyId
+						cccNodes[cccIndex].MYID += "," + vvv.CompanyId
+						cccNodes[cccIndex].TYPE += ",firstparty"
+						cccNodes[cccIndex].MYTYPE += ",firstparty"
+					} else {
+						cccNodes = append(cccNodes, &nodeTree{
+							NAME:     vvv.Name,
+							ID:       vvv.CompanyId,
+							SZ_PID0:  v.Name,
+							SZ_PID1:  v.Name + ":" + myId,
+							SZ_PID2:  v.Name + ":" + myId + ":" + vvv.Name,
+							CODE:     v.Name + ":" + myId + ":" + vvv.Name,
+							PCODE:    v.Name + ":" + myId,
+							SZ_LEVEL: 2,
+							SZ_LEAF:  0,
+							TYPE:     "firstparty",
+							MYID:     vvv.CompanyId,
+							MYTYPE:   "firstparty",
+						})
+						cccIndexMap[vvv.Name] = len(cccNodes) - 1
+					}
 					if id != "" {
 						id += ","
 					}
@@ -440,6 +501,24 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
 						myChildTypes += ","
 					}
 					myChildTypes += vv.Type
+					*convList = append(*convList, &nodeTree{
+						NAME:     vvv.CompanyName,
+						ID:       vvv.CompanyId,
+						SZ_PID0:  v.Name,
+						SZ_PID1:  v.Name + ":" + myId,
+						SZ_PID2:  cccNodes[cccIndex].SZ_PID2,
+						SZ_PID3:  v.Name + ":" + myId + ":" + vvv.Name + ":" + vvv.CompanyId,
+						CODE:     v.Name + ":" + myId + ":" + vvv.Name + ":" + vvv.CompanyId,
+						PCODE:    cccNodes[cccIndex].CODE,
+						SZ_LEVEL: 3,
+						SZ_LEAF:  1,
+						TYPE:     "firstparty",
+						MYID:     vvv.CompanyId,
+						MYTYPE:   "firstparty",
+					})
+				}
+				for _, cccNode := range cccNodes {
+					*convList = append(*convList, cccNode)
 				}
 			} else {
 				if id != "" {
@@ -453,32 +532,34 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
 				myChildIds = myId
 				myChildTypes = vv.Type
 			}
-			cm := map[string]interface{}{
-				"NAME":      vv.CompanyName,
-				"ID":        myChildIds,
-				"SZ_PID0":   v.Name,
-				"SZ_PID1":   v.Name + ":" + myId,
-				"CODE":      v.Name + ":" + myId,
-				"PCODE":     v.Name,
-				"DATACOUNT": vv.Count,
-				"SZ_LEVEL":  1,
-				"SZ_LEAF":   1,
-				"TYPE":      myChildTypes,
-				"MYID":      myId,
-				"MYTYPE":    vv.Type,
+			cm := &nodeTree{
+				NAME:      vv.CompanyName,
+				ID:        myChildIds,
+				SZ_PID0:   v.Name,
+				SZ_PID1:   v.Name + ":" + myId,
+				CODE:      v.Name + ":" + myId,
+				PCODE:     v.Name,
+				DATACOUNT: vv.Count,
+				SZ_LEVEL:  1,
+				SZ_LEAF:   If(myChildIds == "", 1, 0).(int),
+				TYPE:      myChildTypes,
+				MYID:      myId,
+				MYTYPE:    vv.Type,
 			}
-			convList = append(convList, cm)
+			*convList = append(*convList, cm)
 		}
-		pm["ID"] = id
-		pm["TYPE"] = pType
-		pm["MYTYPE"] = pMyType
-		pm["MYID"] = pMyId
-		convList = append(convList, pm)
+		pm.ID = id
+		pm.TYPE = pType
+		pm.MYTYPE = pMyType
+		pm.MYID = pMyId
+		*parentConvList = append(*parentConvList, pm)
 	}
+	sort.Sort(convList)
+	*parentConvList = append(*parentConvList, *convList...)
 	reply = &types.Reply{
 		Data: map[string]interface{}{
 			"count": count,
-			"list":  convList,
+			"list":  parentConvList,
 		},
 	}
 	return reply
@@ -691,7 +772,9 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
 					}
 					exportId += v
 				}
-				export_url = "/subscribepay/network/projectExport?export_id=" + encrypt.SE.EncodeStringByCheck(exportId)
+				md5Id := GetMd5String(exportId)
+				redis.Put("newother", fmt.Sprintf("network_export_%s", md5Id), exportId, 259200)
+				export_url = "/subscribepay/network/projectExport?export_id=" + md5Id
 			}
 			url := ""
 			if v.Qyxy_id != "" && (jump_type == "supplier" || jump_type == "adiffb") {
@@ -860,7 +943,6 @@ func (n *network) Introduce_Firstparty(fpn map[string][]*firstpartyNetwork, entM
 		}
 		result[k].BuyerCount = int64(len(v))
 		for _, vv := range v {
-			log.Println(k, vv.CompanyName)
 			if entMonitor[vv.CompanyName] {
 				result[k].MonitorCount++
 			}

+ 26 - 5
api/internal/service/network_test.go

@@ -112,11 +112,11 @@ func TestAllProject(t *testing.T) {
 	InitConf()
 	res := Network.AllProject(&types.AllprojectReq{
 		EntAccountId: 64,
-		//PositionId:   935,
-		PositionId: 1205591997, //刘苗
+		PositionId:   935,
+		//PositionId: 1205591997, //刘苗
 		//PositionId: 1205592003,//刘亚丽
-		Id:   "009c313ef8e740e59d57432aea777102",
-		Type: "firstparty",
+		//Id:   "009c313ef8e740e59d57432aea777102",
+		//Type: "firstparty",
 	})
 	b, _ := json.Marshal(res.Data)
 	log.Println(string(b))
@@ -169,7 +169,7 @@ func TestCandidateChannel(t *testing.T) {
 		PositionId:   1205591999,
 	}
 	data, a1, a2, a3, a4 := ownerService.CandidateChannel()
-	for _, v := range data {
+	for _, v := range *data {
 		log.Println(fmt.Sprintf("%+v", v))
 	}
 	log.Println(a1)
@@ -185,3 +185,24 @@ func TestProjectHistory(t *testing.T) {
 		log.Println(fmt.Sprintf("%+v", v))
 	}
 }
+func TestChanceAdd(t *testing.T) {
+	chance := &service.SaleChanceService{
+		PositionId:        935,
+		AppId:             "10000",
+		ChanceName:        "王传进的销售机会5",  //机会名称
+		Summary:           "王传进的销售机会5",  //概要信息
+		ChanceClassify:    30,           //机会分类
+		ExpectedOrderTime: 0,            //最初预计落单段时间 时间戳
+		CustomName:        "王传进测试",      //客户全称
+		BusinessType:      3,            //业务类型
+		NextfollowUpTime:  1715097600,   //下次跟进时间戳
+		Types:             1,            //处理方式 1自办;2转办
+		User:              []int64{935}, //企业用户id
+		CustomId:          300069,       //客户id
+		CreateName:        "企业管理员",
+		ChanceSource:      54,
+		BusinessId:        "",
+	}
+	status, _ := chance.Add(context.Background())
+	log.Println(status)
+}

+ 18 - 14
api/internal/service/owner.go

@@ -1088,7 +1088,7 @@ func (t *OwnerService) OwnerCooperate() []map[string]interface{} {
 }
 
 // 候选渠道
-func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
+func (t *OwnerService) CandidateChannel() (*ResultDatas, int, int, int, int) {
 	returnData := []*ResultData{}
 	dataMap := &map[string]map[string]interface{}{}
 	if t.PartyA != "" || t.Supplier != "" || t.Heterotophy != "" || t.Intermediary != "" || t.Agency != "" {
@@ -1111,14 +1111,15 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
 					near, zbtime := LastTimeCoop(buyerId, common.ObjToString(m["name"]), "adiffb")
 					tmp := ResultData{
 						SourceType:  "adiffb",
-						BuyerId:     common.ObjToString(m["nameId"]),
+						EntId:       common.ObjToString(m["nameId"]),
 						EntName:     common.ObjToString(m["name"]),
 						ProjectNum:  common.IntAll(m["coop_size"]),
 						TotalAmount: common.Float64All(m["coop_amount"]),
+						BuyerId:     buyerId,
 						RecentTime:  zbtime,
 						NearlyYears: near,
 					}
-					if tmp.BuyerId == "" {
+					if tmp.EntId == "" || tmp.BuyerId == "" {
 						continue
 					}
 					a1++
@@ -1135,9 +1136,10 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
 						TotalAmount: common.Float64All(m["coop_amount"]),
 						RecentTime:  zbtime,
 						NearlyYears: near,
-						BuyerId:     common.ObjToString(m["nameId"]),
+						EntId:       common.ObjToString(m["nameId"]),
+						BuyerId:     buyerId,
 					}
-					if tmp.BuyerId == "" {
+					if tmp.EntId == "" || tmp.BuyerId == "" {
 						continue
 					}
 					a2++
@@ -1155,9 +1157,10 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
 						EntName:      common.ObjToString(m["b_name"]),
 						EntPerson:    common.ObjToString(m["personName"]),
 						Relationship: "业主的关系人",
-						BuyerId:      common.ObjToString(m["b_id"]),
+						EntId:        common.ObjToString(m["b_id"]),
+						BuyerId:      buyerId,
 					}
-					if tmp.BuyerId == "" {
+					if tmp.EntId == "" || tmp.BuyerId == "" {
 						continue
 					}
 					a3++
@@ -1174,9 +1177,10 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
 						EntName:      common.ObjToString(m["b_name"]),
 						EntPerson:    common.ObjToString(m["personName"]),
 						Relationship: common.ObjToString(m["relationship"]),
-						BuyerId:      common.ObjToString(m["b_id"]),
+						EntId:        common.ObjToString(m["b_id"]),
+						BuyerId:      buyerId,
 					}
-					if tmp.BuyerId == "" {
+					if tmp.EntId == "" || tmp.BuyerId == "" {
 						continue
 					}
 					a4++
@@ -1186,16 +1190,15 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
 		}
 	}
 	//状态处理
-	result := []*ResultData{}
+	result := &ResultDatas{}
 	if len(returnData) > 0 {
 		monitorMap := NetworkCom.EntMonitor(gconv.String(t.PositionId))
 		_, ignoredMap, createdMap := FindStatus(t.PositionId)
 		for k, value := range returnData {
-			buyerId := value.BuyerId
-			if _, ok := ignoredMap[buyerId]; ok {
+			if _, ok := ignoredMap[value.EntId]; ok {
 				value.IsIgnore = true
 			}
-			if _, ok := createdMap[buyerId]; ok {
+			if _, ok := createdMap[value.EntId]; ok {
 				value.IsCreateCustomer = true
 			}
 			if _, ok := monitorMap[value.EntName]; ok {
@@ -1205,8 +1208,9 @@ func (t *OwnerService) CandidateChannel() ([]*ResultData, int, int, int, int) {
 			if t.Type != "" && t.Type != value.SourceType {
 				continue
 			}
-			result = append(result, value)
+			*result = append(*result, value)
 		}
 	}
+	sort.Sort(result)
 	return result, a1, a2, a3, a4
 }

+ 3 - 3
api/internal/service/plistService.go

@@ -181,13 +181,13 @@ func getQuerySql(req *types.ProjectListReq, isPage bool, buyerArr, plist []strin
 	}
 	if req.StartTime > 0 && req.EntTime > 0 {
 		st := req.StartTime + 90*24*60*60
-		et := req.StartTime + 90*24*60*60
+		et := req.EntTime + 90*24*60*60
 		querys = append(querys, fmt.Sprintf("  a.endtime>=%d and a.endtime<=%d", st, et))
 	} else if req.StartTime > 0 && req.EntTime == 0 {
 		st := req.StartTime + 90*24*60*60
 		querys = append(querys, fmt.Sprintf(" a.endtime>=%d", st))
 	} else if req.StartTime == 0 && req.EntTime > 0 {
-		et := req.StartTime + 90*24*60*60
+		et := req.EntTime + 90*24*60*60
 		querys = append(querys, fmt.Sprintf(" a.endtime<=%d", et))
 	}
 	var regionArr = []string{}
@@ -256,7 +256,7 @@ func getQuerySql(req *types.ProjectListReq, isPage bool, buyerArr, plist []strin
 	findSql = "select a.project_id, a.project_name, a.business_type, a.buyer, a.buyer_id, a.area, a.city, a.district, a.zbtime, a.endtime, a.project_money, a.info_id, a.information_id, a.info_ids "
 	if len(querys) > 0 {
 		countSql = fmt.Sprintf("select count(1) from %s a where %s ", "information.transaction_info", strings.Join(querys, " and "))
-		findSql = fmt.Sprintf("%s from %s  a  where  %s order by zbtime", findSql, "information.transaction_info", strings.Join(querys, " and "))
+		findSql = fmt.Sprintf("%s from %s  a  where  %s order by zbtime desc", findSql, "information.transaction_info", strings.Join(querys, " and "))
 	} else {
 		countSql = fmt.Sprintf("select count(1) from %s a ", "information.transaction_info")
 		findSql = fmt.Sprintf("%s from %s a order by zbtime", findSql, "information.transaction_info")

+ 5 - 2
service/sale_chance.go

@@ -5,12 +5,12 @@ import (
 	"database/sql"
 	"fmt"
 	"log"
-	"time"
-
 	"strings"
+	"time"
 
 	qu "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
 	cm "bp.jydev.jianyu360.cn/CRM/application/api/common"
 	"bp.jydev.jianyu360.cn/CRM/application/entity"
@@ -206,6 +206,9 @@ func (this *SaleChanceService) SaveChange(ctx context.Context, argsChange, argsT
 		SalesFunnel := saveSalesFunnel(tx, argsSalesFunnel, this.BusinessType)
 		//人脉保存
 		if ownerId != "" || connectionBusinessId != "" {
+			if connectionBusinessId != "" {
+				connectionBusinessId = encrypt.DecodeArticleId2ByCheck(connectionBusinessId)[0]
+			}
 			SaveConnection(tx, this.PositionId, connectionBusinessId, ownerId, this.EntId, this.EntDeptId, this.EntUserId)
 		}
 		if changeId > 0 && taskId > 0 && ok1 && planId > 0 && SalesFunnel > 0 {