|
@@ -57,13 +57,17 @@ func QuaFieldScore(field_tag []string, coll_name string) bool {
|
|
|
|
|
|
//计算字段分
|
|
|
func calculateFieldScore(tmp map[string]interface{}, field_tag []string) map[string]interface{} {
|
|
|
- source := *qu.ObjToMap(tmp["field_source"])
|
|
|
+
|
|
|
+ //所有字段
|
|
|
+ v_baseinfo := *qu.ObjToMap(tmp["v_baseinfo"])
|
|
|
+ source := *qu.ObjToMap(v_baseinfo["field_source"])
|
|
|
+
|
|
|
f_s := qua.FieldSourceScore(source) //打初始分
|
|
|
update_dict := make(map[string]interface{}, 0)
|
|
|
- buyer_s := qua.BuyerFieldScore(tmp, f_s["buyer"])
|
|
|
- budget_s := qua.BudgetFieldScore(tmp, f_s["budget"])
|
|
|
- projectname_s := qua.ProjectnameFieldScore(tmp, f_s["projectname"])
|
|
|
- projectcode_s := qua.ProjectcodeFieldScore(tmp, f_s["projectcode"])
|
|
|
+ buyer_s := qua.BuyerFieldScore(v_baseinfo, f_s["buyer"])
|
|
|
+ budget_s := qua.BudgetFieldScore(v_baseinfo, f_s["budget"])
|
|
|
+ projectname_s := qua.ProjectnameFieldScore(v_baseinfo, f_s["projectname"])
|
|
|
+ projectcode_s := qua.ProjectcodeFieldScore(v_baseinfo, f_s["projectcode"])
|
|
|
|
|
|
update_dict["buyer"] = buyer_s
|
|
|
update_dict["budget"] = budget_s
|
|
@@ -72,9 +76,9 @@ func calculateFieldScore(tmp map[string]interface{}, field_tag []string) map[str
|
|
|
|
|
|
subtype := qu.ObjToString(tmp["subtype"])
|
|
|
if subtype == "中标" || subtype == "成交" || subtype == "合同" {
|
|
|
- s_winner_s := qua.WinnerFieldScore(tmp, f_s["s_winner"])
|
|
|
+ s_winner_s := qua.WinnerFieldScore(v_baseinfo, f_s["s_winner"])
|
|
|
update_dict["s_winner"] = s_winner_s
|
|
|
- bidamount_s := qua.BidamountFieldScore(tmp, f_s["bidamount"])
|
|
|
+ bidamount_s := qua.BidamountFieldScore(v_baseinfo, f_s["bidamount"])
|
|
|
update_dict["bidamount"] = bidamount_s
|
|
|
}
|
|
|
|