Explorar o código

客成移交修改

WH01243 hai 7 meses
pai
achega
edcf4bd10e
Modificáronse 1 ficheiros con 242 adicións e 233 borrados
  1. 242 233
      clueSync/kc.go

+ 242 - 233
clueSync/kc.go

@@ -18,16 +18,16 @@ import (
 
 func kcSync() {
 	log.Println("客户成功系统移交定时任务开始")
-	sql := `select * from dwd_f_userbase_order_info where payable_money > 0 and vip_endtime > "` + time.Now().Format(date.Date_Full_Layout) + `" and autoUpdate > "` + cfg.LastkcTime + `" order by autoUpdate asc`
+	sql := `select * from dwd_f_userbase_order_info where  vip_endtime > "` + time.Now().Format(date.Date_Full_Layout) + `" and autoUpdate > "` + cfg.LastkcTime +
+		` and  order_status =1 and  refund_status!=1 and data_spec!="dhy4" and  (payable_money > 0 or   (payable_money=0  and (filter LIKE "%分期付款补充权益%" or filter LIKE "%原订单不支持开通多项权益" or  filter LIKE "%权益码兑换%") ) )  and  product_type in ("大会员","企业商机管理") " order by autoUpdate asc`
 	data := TiDb.SelectBySql(sql)
 	if data != nil && *data != nil && len(*data) > 0 {
 		for _, v := range *data {
-			product_type := common.ObjToString(v["product_type"])
-			data_spec := common.ObjToString(v["data_spec"])
 			starttime := common.ObjToString(v["vip_starttime"])
-			order_status := common.IntAll(v["order_status"])
-			refund_status := common.IntAll(v["refund_status"])
-			if (product_type == "大会员" || product_type == "企业商机管理") && order_status == 1 && data_spec != "dhy4" && !strings.HasPrefix(starttime, "2099") && refund_status != 1 {
+			order_change := common.IntAll(v["order_change"])
+			endTime := common.ObjToString(v["vip_endtime"])
+			timecount := TimeStrcount(starttime, endTime)
+			if !strings.HasPrefix(starttime, "2099") && (order_change != 1 || timecount > 93) {
 				status := kcJob(v)
 				if status == 0 {
 					break
@@ -44,247 +44,254 @@ func kcJob(data map[string]interface{}) int {
 	nowTime := time.Now().Format(date.Date_Full_Layout)
 	uId, entId, clueId, saveMap, name, positionId, status := common.ObjToString(data["uid"]), fmt.Sprint(data["ent_id"]), int64(0), map[string]interface{}{}, "", int64(0), 1
 	clueData := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", "")
-	if clueData != nil && len(*clueData) > 0 {
-		clueId = common.Int64All((*clueData)["id"])
-		starttime := common.ObjToString(data["vip_starttime"])
-		endtime := common.ObjToString(data["vip_endtime"])
-		// user_role := common.IntAll(data["user_role"])
-		buy_subject := common.IntAll(data["buy_subject"])
-		product_type := common.ObjToString(data["product_type"])
-		data_spec := common.ObjToString(data["data_spec"])
-		userName := common.ObjToString((*clueData)["name"])
-		//phone := common.ObjToString((*clueData)["phone"])
-		product, company_name := 0, common.ObjToString(data["company_name"])
-		productMap := map[string]int{
-			"dhy6":   1,
-			"dhy7":   2,
-			"dhy3":   4,
-			"dhy1":   5,
-			"dhy2":   6,
-			"dhy5":   7,
-			"企业商机管理": 8,
-		}
-		if buy_subject == 1 || buy_subject == 0 {
-			entId = common.ObjToString(data["userid"])
-		}
-		if product_type == "企业商机管理" {
-			product = productMap[product_type]
-			powerData := TiDb.FindOne("dwd_f_data_equity_info", map[string]interface{}{"uid": uId, "product_type": "商机管理"}, "", "comeintime desc")
-			if powerData != nil {
-				starttime = common.ObjToString((*powerData)["starttime"])
-				endtime = common.ObjToString((*powerData)["endtime"])
+	if clueData == nil || len(*clueData) == 0 {
+		//查询是否是客成的单子
+		saleDep, _, salesperson := FindSaleRecord(gconv.String(data["order_code"]))
+		if saleDep == "客户成功组" {
+			//查询是否是管理员
+			//添加线索
+		} else {
+			log.Println("客户未查到线索!!!", uId)
+			if isExists, _ := redis.Exists("bidx", "bidx_uId_"+uId); isExists {
+				redisInt := redis.GetInt("bidx", "bidx_uId_"+uId)
+				if redisInt > 2 {
+					return 1
+				} else {
+					redis.Incr("bidx", "bidx_uId_"+uId)
+					return 0
+				}
 			} else {
-				log.Println("客成移交权限未查到--", uId)
+				redis.Put("bidx", "bidx_uId_"+uId, 1, 3600)
 				return 0
 			}
+		}
+	}
+	clueId = common.Int64All((*clueData)["id"])
+	starttime := common.ObjToString(data["vip_starttime"])
+	endtime := common.ObjToString(data["vip_endtime"])
+	//
+	// user_role := common.IntAll(data["user_role"])
+	buy_subject := common.IntAll(data["buy_subject"])
+	product_type := common.ObjToString(data["product_type"])
+	data_spec := common.ObjToString(data["data_spec"])
+	userName := common.ObjToString((*clueData)["name"])
+	//phone := common.ObjToString((*clueData)["phone"])
+	product, company_name := 0, common.ObjToString(data["company_name"])
+	productMap := map[string]int{
+		"dhy6":   1,
+		"dhy7":   2,
+		"dhy3":   4,
+		"dhy1":   5,
+		"dhy2":   6,
+		"dhy5":   7,
+		"企业商机管理": 8,
+	}
+	if buy_subject == 1 || buy_subject == 0 {
+		entId = common.ObjToString(data["userid"])
+	}
+	if product_type == "企业商机管理" {
+		product = productMap[product_type]
+		powerData := TiDb.FindOne("dwd_f_data_equity_info", map[string]interface{}{"uid": uId, "product_type": "商机管理"}, "", "comeintime desc")
+		if powerData != nil {
+			starttime = common.ObjToString((*powerData)["starttime"])
+			endtime = common.ObjToString((*powerData)["endtime"])
 		} else {
-			if data_spec == "dhy6" {
-				product = 1
-				filter := common.ObjToString(data["filter"])
-				filterMap := map[string]interface{}{}
-				json.Unmarshal([]byte(filter), &filterMap)
-				if len(filterMap) > 0 {
-					areaCount := common.IntAll(filterMap["areaCount"])
-					if areaCount == 1 {
-						product = 3
-					}
+			log.Println("客成移交权限未查到--", uId)
+			return 0
+		}
+	} else {
+		if data_spec == "dhy6" {
+			product = 1
+			filter := common.ObjToString(data["filter"])
+			filterMap := map[string]interface{}{}
+			json.Unmarshal([]byte(filter), &filterMap)
+			if len(filterMap) > 0 {
+				areaCount := common.IntAll(filterMap["areaCount"])
+				if areaCount == 1 {
+					product = 3
 				}
-			} else {
-				product = productMap[data_spec]
 			}
+		} else {
+			product = productMap[data_spec]
 		}
-		//同一公司名称(以客户详情-组织机构-公司名称)下的线索需分配给同1人
-		//合力亿捷线索同步
-		/*customerData := TiDbData.FindOne("customer", map[string]interface{}{"phone": phone}, "", "")
-		if customerData != nil {
-			log.Println("移交客成查询到合力亿捷")
-			status999 := common.ObjToString((*customerData)["status999"])               //线索状态
-			source := common.ObjToString((*customerData)["source"])                     //销售来源
-			customerNeeds := common.ObjToString((*customerData)["customerNeeds"])       //客户需求
-			wantGoods := common.ObjToString((*customerData)["wantGoods"])               //意向产品
-			job := common.ObjToString((*customerData)["job"])                           //职位
-			createTime := common.ObjToString((*customerData)["createTime"])             //创建时间
-			lastUpdateTime := common.ObjToString((*customerData)["lastUpdateTime"])     //更新时间
-			area := common.ObjToString((*customerData)["area"])                         //关注区域
-			customerBudget := common.ObjToString((*customerData)["customerBudget"])     //客户预算
-			isPolicymaker := common.ObjToString((*customerData)["customerBudget"])      //是否为决策人
-			belongToIndustry := common.ObjToString((*customerData)["belongToIndustry"]) //所属行业
-			seatNumber := common.ObjToString((*customerData)["empNo"])                  //坐席号
-			statusMap := map[string]string{
-				"status0":     "08",
-				"status1":     "07",
-				"status2":     "06",
-				"status3":     "05",
-				"status4":     "04",
-				"status6":     "00",
-				"status5":     "01",
-				"spaceNumber": "02",
-				"phoneDown":   "02",
-			}
-			if status999 != "" {
-				status999 = statusMap[status999]
-			} else {
-				status999 = "01"
-			}
-			top_cluetype := "172"
-			sub_cluetype := ""
-			cluetypeData := TiDb.FindOne("dwd_d_crm_cluetype_code", map[string]interface{}{"name": "其他-" + source}, "", "")
-			if cluetypeData != nil {
-				sub_cluetype = common.ObjToString((*cluetypeData)["code"])
-			}
-			wantGoods = strings.ReplaceAll(wantGoods, "剑鱼大会员", "大会员")
-			wantGoods = strings.ReplaceAll(wantGoods, "数据导出", "数据流量包")
-			if isPolicymaker == "是" {
-				isPolicymaker = "决策人"
-			} else {
-				isPolicymaker = "使用人"
-			}
-			areaCodeArr := []string{}
-			areaCode := ""
-			for _, v := range strings.Split(area, ",") {
-				areaCodeArr = append(areaCodeArr, AreaCode[v])
-			}
-			if len(areaCodeArr) > 0 {
-				areaCode = strings.Join(areaCodeArr, ",")
-			}
-			SalePositionId := getSeatNumberPositionId(seatNumber)
-			TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, map[string]interface{}{
-				"position_id":         SalePositionId,
-				"seatNumber":          seatNumber,
-				"is_assign":           -2,
-				"createtime":          createTime,
-				"updatetime":          lastUpdateTime,
-				"top_cluetype":        top_cluetype,
-				"sub_cluetype":        sub_cluetype,
-				"customer_demand":     customerNeeds,
-				"intended_products":   wantGoods,
-				"customer_budget":     customerBudget,
-				"contact_type":        isPolicymaker,
-				"position":            job,
-				"industry":            belongToIndustry,
-				"follow_project_area": areaCode,
-			})
-		}*/
-		//
-		entIds := common.IntAll(data["ent_id"])
-		positionId, name = cAutoDraw(entIds)
-		log.Println("移交客成positionId", positionId, name)
-		saveMap = map[string]interface{}{
-			"clue_id":                   clueId,
-			"transfertime":              nowTime,
-			"position_id":               positionId,
-			"name":                      name,
-			"service_starttime":         starttime,
-			"service_endtime":           endtime,
-			"ent_id":                    entId,
-			"is_task":                   1,
-			"tasktime":                  nowTime,
-			"taskstatus":                0,
-			"tasksource":                "1",
-			"is_admin":                  1,
-			"product_access":            product,
-			"buy_subject":               buy_subject,
-			"relationship_building_way": 1,
-			"inventory_way":             1,
-			"training_way":              1,
-			"is_pre_sales_training":     0,
-			"service_stage":             1,
-			"company_name":              company_name,
+	}
+	//同一公司名称(以客户详情-组织机构-公司名称)下的线索需分配给同1人
+	//合力亿捷线索同步
+	/*customerData := TiDbData.FindOne("customer", map[string]interface{}{"phone": phone}, "", "")
+	if customerData != nil {
+		log.Println("移交客成查询到合力亿捷")
+		status999 := common.ObjToString((*customerData)["status999"])               //线索状态
+		source := common.ObjToString((*customerData)["source"])                     //销售来源
+		customerNeeds := common.ObjToString((*customerData)["customerNeeds"])       //客户需求
+		wantGoods := common.ObjToString((*customerData)["wantGoods"])               //意向产品
+		job := common.ObjToString((*customerData)["job"])                           //职位
+		createTime := common.ObjToString((*customerData)["createTime"])             //创建时间
+		lastUpdateTime := common.ObjToString((*customerData)["lastUpdateTime"])     //更新时间
+		area := common.ObjToString((*customerData)["area"])                         //关注区域
+		customerBudget := common.ObjToString((*customerData)["customerBudget"])     //客户预算
+		isPolicymaker := common.ObjToString((*customerData)["customerBudget"])      //是否为决策人
+		belongToIndustry := common.ObjToString((*customerData)["belongToIndustry"]) //所属行业
+		seatNumber := common.ObjToString((*customerData)["empNo"])                  //坐席号
+		statusMap := map[string]string{
+			"status0":     "08",
+			"status1":     "07",
+			"status2":     "06",
+			"status3":     "05",
+			"status4":     "04",
+			"status6":     "00",
+			"status5":     "01",
+			"spaceNumber": "02",
+			"phoneDown":   "02",
 		}
-		if TiDb.Count("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}) > 0 {
-			csmdata := TiDb.FindOne("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}, "", "")
-			if csmdata != nil && len(*csmdata) > 0 {
-				TiDb.Update("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}, map[string]interface{}{
-					"is_transfer":           0,
-					"is_renewal_protection": 0,
-					"product_access":        product,
-					"buy_subject":           buy_subject,
-					"transfertime":          nowTime,
-					"service_starttime":     starttime,
-					"service_endtime":       endtime,
-					"ent_id":                entId,
-					"company_name":          company_name,
-				})
-				TiDb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
-					"clue_id":     clueId,
-					"position_id": (*csmdata)["position_id"],
-					"change_type": "成交客户移交",
-					"new_value":   "移交至客户成功组",
-					"createtime":  nowTime,
-					"BCPCID":      common.GetRandom(32),
-					"operator_id": -1,
-				})
-				TiDb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
-					"clue_id":      clueId,
-					"position_id":  (*csmdata)["position_id"],
-					"change_field": "position_id",
-					"change_type":  "客户成功经理",
-					"old_value":    "/",
-					"new_value":    (*csmdata)["name"],
-					"createtime":   nowTime,
-					"BCPCID":       common.GetRandom(32),
-					"operator_id":  -1,
-				})
-				TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, map[string]interface{}{"is_transfer": 1, "updatetime": nowTime, "name": userName})
-			}
+		if status999 != "" {
+			status999 = statusMap[status999]
 		} else {
-			cId, ok, updateId1, updateId2, updateId3 := int64(-1), false, int64(-1), int64(-1), int64(-1)
-			if TiDb.ExecTx("保存客户", func(tx *sql.Tx) bool {
-				cId = TiDb.InsertByTx(tx, "dwd_f_csm_customer_info", saveMap)
-				ok = TiDb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, map[string]interface{}{"is_transfer": 1, "updatetime": nowTime, "name": userName})
-				updateId1 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
-					"clue_id":     clueId,
-					"position_id": positionId,
-					"change_type": "加入任务车",
-					"new_value":   "未建联",
-					"createtime":  nowTime,
-					"BCPCID":      common.GetRandom(32),
-					"operator_id": -1,
-				})
-				updateId2 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
-					"clue_id":     clueId,
-					"position_id": positionId,
-					"change_type": "成交客户移交",
-					"new_value":   "移交至客户成功组",
-					"createtime":  nowTime,
-					"BCPCID":      common.GetRandom(32),
-					"operator_id": -1,
-				})
-				updateId3 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
-					"clue_id":      clueId,
-					"position_id":  positionId,
-					"change_field": "position_id",
-					"change_type":  "客户成功经理",
-					"old_value":    "/",
-					"new_value":    name,
-					"createtime":   nowTime,
-					"BCPCID":       common.GetRandom(32),
-					"operator_id":  -1,
-				})
-				return cId > -1 && ok && updateId1 > -1 && updateId2 > -1 && updateId3 > -1
-			}) {
-				TiDb.UpdateOrDeleteBySql(`update dwd_f_csm_customer_autodraw_record set count = count + 1 where name = ?`, name)
-				log.Println("保存客户成功")
-			} else {
-				log.Println("保存客户失败!!!", clueId, cId, ok, updateId1, updateId2, updateId3, " 用户信息 ", name, positionId, uId)
-			}
+			status999 = "01"
+		}
+		top_cluetype := "172"
+		sub_cluetype := ""
+		cluetypeData := TiDb.FindOne("dwd_d_crm_cluetype_code", map[string]interface{}{"name": "其他-" + source}, "", "")
+		if cluetypeData != nil {
+			sub_cluetype = common.ObjToString((*cluetypeData)["code"])
+		}
+		wantGoods = strings.ReplaceAll(wantGoods, "剑鱼大会员", "大会员")
+		wantGoods = strings.ReplaceAll(wantGoods, "数据导出", "数据流量包")
+		if isPolicymaker == "是" {
+			isPolicymaker = "决策人"
+		} else {
+			isPolicymaker = "使用人"
+		}
+		areaCodeArr := []string{}
+		areaCode := ""
+		for _, v := range strings.Split(area, ",") {
+			areaCodeArr = append(areaCodeArr, AreaCode[v])
+		}
+		if len(areaCodeArr) > 0 {
+			areaCode = strings.Join(areaCodeArr, ",")
+		}
+		SalePositionId := getSeatNumberPositionId(seatNumber)
+		TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, map[string]interface{}{
+			"position_id":         SalePositionId,
+			"seatNumber":          seatNumber,
+			"is_assign":           -2,
+			"createtime":          createTime,
+			"updatetime":          lastUpdateTime,
+			"top_cluetype":        top_cluetype,
+			"sub_cluetype":        sub_cluetype,
+			"customer_demand":     customerNeeds,
+			"intended_products":   wantGoods,
+			"customer_budget":     customerBudget,
+			"contact_type":        isPolicymaker,
+			"position":            job,
+			"industry":            belongToIndustry,
+			"follow_project_area": areaCode,
+		})
+	}*/
+	//
+	entIds := common.IntAll(data["ent_id"])
+	positionId, name = cAutoDraw(entIds)
+	log.Println("移交客成positionId", positionId, name)
+	saveMap = map[string]interface{}{
+		"clue_id":                   clueId,
+		"transfertime":              nowTime,
+		"position_id":               positionId,
+		"name":                      name,
+		"service_starttime":         starttime,
+		"service_endtime":           endtime,
+		"ent_id":                    entId,
+		"is_task":                   1,
+		"tasktime":                  nowTime,
+		"taskstatus":                0,
+		"tasksource":                "1",
+		"is_admin":                  1,
+		"product_access":            product,
+		"buy_subject":               buy_subject,
+		"relationship_building_way": 1,
+		"inventory_way":             1,
+		"training_way":              1,
+		"is_pre_sales_training":     0,
+		"service_stage":             1,
+		"company_name":              company_name,
+	}
+	if TiDb.Count("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}) > 0 {
+		csmdata := TiDb.FindOne("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}, "", "")
+		if csmdata != nil && len(*csmdata) > 0 {
+			TiDb.Update("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}, map[string]interface{}{
+				"is_transfer":           0,
+				"is_renewal_protection": 0,
+				"product_access":        product,
+				"buy_subject":           buy_subject,
+				"transfertime":          nowTime,
+				"service_starttime":     starttime,
+				"service_endtime":       endtime,
+				"ent_id":                entId,
+				"company_name":          company_name,
+			})
+			TiDb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+				"clue_id":     clueId,
+				"position_id": (*csmdata)["position_id"],
+				"change_type": "成交客户移交",
+				"new_value":   "移交至客户成功组",
+				"createtime":  nowTime,
+				"BCPCID":      common.GetRandom(32),
+				"operator_id": -1,
+			})
+			TiDb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+				"clue_id":      clueId,
+				"position_id":  (*csmdata)["position_id"],
+				"change_field": "position_id",
+				"change_type":  "客户成功经理",
+				"old_value":    "/",
+				"new_value":    (*csmdata)["name"],
+				"createtime":   nowTime,
+				"BCPCID":       common.GetRandom(32),
+				"operator_id":  -1,
+			})
+			TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, map[string]interface{}{"is_transfer": 1, "updatetime": nowTime, "name": userName})
 		}
-		return status
 	} else {
-		log.Println("客户未查到线索!!!", uId)
-		if isExists, _ := redis.Exists("bidx", "bidx_uId_"+uId); isExists {
-			redisInt := redis.GetInt("bidx", "bidx_uId_"+uId)
-			if redisInt > 2 {
-				return 1
-			} else {
-				redis.Incr("bidx", "bidx_uId_"+uId)
-				return 0
-			}
+		cId, ok, updateId1, updateId2, updateId3 := int64(-1), false, int64(-1), int64(-1), int64(-1)
+		if TiDb.ExecTx("保存客户", func(tx *sql.Tx) bool {
+			cId = TiDb.InsertByTx(tx, "dwd_f_csm_customer_info", saveMap)
+			ok = TiDb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, map[string]interface{}{"is_transfer": 1, "updatetime": nowTime, "name": userName})
+			updateId1 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
+				"clue_id":     clueId,
+				"position_id": positionId,
+				"change_type": "加入任务车",
+				"new_value":   "未建联",
+				"createtime":  nowTime,
+				"BCPCID":      common.GetRandom(32),
+				"operator_id": -1,
+			})
+			updateId2 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
+				"clue_id":     clueId,
+				"position_id": positionId,
+				"change_type": "成交客户移交",
+				"new_value":   "移交至客户成功组",
+				"createtime":  nowTime,
+				"BCPCID":      common.GetRandom(32),
+				"operator_id": -1,
+			})
+			updateId3 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
+				"clue_id":      clueId,
+				"position_id":  positionId,
+				"change_field": "position_id",
+				"change_type":  "客户成功经理",
+				"old_value":    "/",
+				"new_value":    name,
+				"createtime":   nowTime,
+				"BCPCID":       common.GetRandom(32),
+				"operator_id":  -1,
+			})
+			return cId > -1 && ok && updateId1 > -1 && updateId2 > -1 && updateId3 > -1
+		}) {
+			TiDb.UpdateOrDeleteBySql(`update dwd_f_csm_customer_autodraw_record set count = count + 1 where name = ?`, name)
+			log.Println("保存客户成功")
 		} else {
-			redis.Put("bidx", "bidx_uId_"+uId, 1, 3600)
-			return 0
+			log.Println("保存客户失败!!!", clueId, cId, ok, updateId1, updateId2, updateId3, " 用户信息 ", name, positionId, uId)
 		}
 	}
+	return status
 }
 
 func cAutoDraw(entId int) (positionId int64, name string) {
@@ -864,6 +871,8 @@ func FindSaleRecord(orderCode string) (dept string, positionId int64, position s
 			saler_dept = "销售部"
 		} else if strings.Contains(saler_dept, "市场") {
 			saler_dept = "市场部"
+		} else if strings.Contains(saler_dept, "市场") {
+			saler_dept = "客户成功组"
 		} else {
 			saler_dept = ""
 		}