Эх сурвалжийг харах

批量分配增加加入任务车

xuzhiheng 2 жил өмнө
parent
commit
e7915866e6
1 өөрчлөгдсөн 18 нэмэгдсэн , 0 устгасан
  1. 18 0
      service/clue.go

+ 18 - 0
service/clue.go

@@ -101,6 +101,15 @@ func DistributeClueMore(saleMap map[string]map[string]interface{}, distributedAr
 						updateClue["tasktime"] = nowTime
 						updateClue["taskstatus"] = 0
 						updateClue["tasksource"] = "主动分配客户"
+						JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+							"clue_id":     v,
+							"position_id": positionId,
+							"change_type": "加入任务车",
+							"new_value":   "主动分配客户",
+							"createtime":  nowTime,
+							"BCPCID":      common.GetRandom(32),
+							"operator_id": thispositionId,
+						})
 					}
 					ok := JyBiTidb.Update("dwd_f_crm_clue_info", map[string]interface{}{"id": v}, updateClue)
 					// ok := JyBiTidb.Update("dwd_f_crm_private_sea", map[string]interface{}{"clue_id": v}, map[string]interface{}{
@@ -173,6 +182,15 @@ func DistributeClueMore(saleMap map[string]map[string]interface{}, distributedAr
 						updateClue["tasktime"] = nowTime
 						updateClue["taskstatus"] = 0
 						updateClue["tasksource"] = "主动分配客户"
+						JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+							"clue_id":     v,
+							"position_id": positionId,
+							"change_type": "加入任务车",
+							"new_value":   "主动分配客户",
+							"createtime":  nowTime,
+							"BCPCID":      common.GetRandom(32),
+							"operator_id": thispositionId,
+						})
 					}
 					ok := JyBiTidb.Update("dwd_f_crm_clue_info", map[string]interface{}{"id": v}, updateClue)
 					// seaId := JyBiTidb.Insert("dwd_f_crm_private_sea", map[string]interface{}{