Browse Source

动态记录新增

WH01243 5 months ago
parent
commit
2b52d1b1f8
3 changed files with 6 additions and 7 deletions
  1. 1 1
      clueSync/autoTask.go
  2. 1 1
      clueSync/jobutil.go
  3. 4 5
      clueSync/kc.go

+ 1 - 1
clueSync/autoTask.go

@@ -224,7 +224,7 @@ func autoExitSea() {
 				recordId1 := AddChangeRecord(tx, clueId, positionId, "position_id", "所属人变更", GetPositionName(seatNumber), "/", nowTime, "", -1)
 				recordId2 := AddChangeRecord(tx, clueId, positionId, "trailstatus", "基本信息变更", "流失", "空号停机", nowTime, "", -1)
 				recordId3 := AddChangeRecord(tx, clueId, positionId, "", "退出任务车", "空号停机自动从线索池删除", "", nowTime, "", -1)
-				recordId4 := AddChangeRecord(tx, clueId, positionId, "trailstatus", "退出公海", "空号停机自动从线索池删除", "", nowTime, "", -1)
+				recordId4 := AddChangeRecord(tx, clueId, positionId, "", "退出公海", "空号停机自动从线索池删除", "", nowTime, "", -1)
 				return recordId > -1 && recordId1 > -1 && recordId2 > -1 && recordId3 > -1 && recordId4 > -1
 			}) {
 				log.Println("自动退出线索成功")

+ 1 - 1
clueSync/jobutil.go

@@ -113,7 +113,7 @@ func WorkDataHandle(company, phone, demand, name, product string, acceptanceData
 				log.Println("查询不到客成数据", clueId, uId)
 				return false
 			}
-			AddChangeRecord(nil, clueId, gconv.Int64((*customerMap)["position_id"]), "", "加入任务车", "咨询客服转客成", "/", time.Now().Format(date.Date_Full_Layout), "", -1)
+			AddChangeRecord(nil, clueId, gconv.Int64((*customerMap)["position_id"]), "", "加入任务车", "咨询客服转客成", "", time.Now().Format(date.Date_Full_Layout), "", -1)
 		} else {
 			//普通销售
 			if positionId == 0 && lockPositionId == 0 {

+ 4 - 5
clueSync/kc.go

@@ -253,7 +253,7 @@ func kcJob(data map[string]interface{}) int {
 			ok = TiDb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, map[string]interface{}{"is_transfer": 1, "updatetime": nowTime, "name": userName})
 			if customerPositionId > 0 {
 				updateId1 = AddChangeRecord(tx, clueId, customerPositionId, "", "加入任务车", "未建联", "", nowTime, "", -1)
-				updateId3 = AddChangeRecord(tx, clueId, customerPositionId, "position_id", "客户成功经理", "/", customerName, nowTime, "", -1)
+				updateId3 = AddChangeRecord(tx, clueId, customerPositionId, "position_id", "客户成功经理", customerName, "/", nowTime, "", -1)
 			}
 			KcSend(orderCode, customerName)
 			updateId2 := AddChangeRecord(tx, clueId, customerPositionId, "", "成交客户移交", "移交至客户成功组", "", nowTime, "", -1)
@@ -412,11 +412,11 @@ func kcAuto() {
 			taskstatus := common.IntAll(v["taskstatus"])
 			if relationship_building_way != 1 && inventory_way == 1 {
 				tasksources = "2"
-				AddChangeRecord(nil, clueId, positionId, "", "加入任务车", "未盘点", "", "", "", -1)
+				AddChangeRecord(nil, clueId, positionId, "", "加入任务车", "未盘点", "", nowTime, "", -1)
 
 			} else if inventory_way != 1 && training_way == 1 {
 				tasksources = "3"
-				AddChangeRecord(nil, clueId, positionId, "position_id", "加入任务车", "未培训", "", nowTime, "", -1)
+				AddChangeRecord(nil, clueId, positionId, "", "加入任务车", "未培训", "", nowTime, "", -1)
 			}
 			if taskstatus == 1 {
 				tasksource = tasksources
@@ -810,7 +810,7 @@ func refundAuto() {
 						TiDb.UpdateOrDeleteBySql(`UPDATE dwd_f_csm_customer_info SET is_transfer=1 WHERE clue_id = ?`, clueId)
 						if isFull {
 							//新增冻结记录
-							AddChangeRecord(nil, clueId, saleId, "trailstatus", "线索冻结", "销售人员私海已达上限", "", nowTime, "", -1)
+							AddChangeRecord(nil, clueId, saleId, "", "线索冻结", "销售人员私海已达上限", "", nowTime, "", -1)
 							//发送邮件
 							mailContent := ""
 							if cluename != "" {
@@ -1309,7 +1309,6 @@ func kcClue(userId, uId, seatNumber, cluename, top_cluetype, sub_cluetype,
 			"label":                1,
 			"labelChangeTime":      time.Now().Format("2006-01-02"),
 		})
-
 		uodateId1 = AddChangeRecord(tx, clueId, positionId, "", "创建线索", "系统自动创建", "", nowTime, "", -1)
 		uodateId2 = AddChangeRecord(tx, clueId, positionId, "position_id", "所属人变更", saleName, "/", nowTime, "", -1)
 		uodateId3 = AddChangeRecord(tx, clueId, positionId, "trailstatus", "基本信息变更", "新增", "商机线索", nowTime, "", -1)