Sfoglia il codice sorgente

销售人员变更处理

WH01243 1 anno fa
parent
commit
e79a64825d
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12 0
      clueSync/job.go

+ 12 - 0
clueSync/job.go

@@ -979,6 +979,18 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
 					"operator_id":  -1,
 				})
 			}
+		} else if (pIsOk && old_cluename == cluename && cluename != "") && is_assign == 1 && positionId != old_position_id {
+			updateId1 = 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":    common.If(oldsaleName != "", oldsaleName, "/"),
+				"new_value":    common.If(saleName != "", saleName, "/"),
+				"createtime":   nowTime,
+				"BCPCID":       common.GetRandom(32),
+				"operator_id":  -1,
+			})
 		}
 		if (trailstatus != "08" && recordCount <= 0) || is_assign == 0 {
 			if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {