|
@@ -647,8 +647,8 @@ func (e *ExtractTask) ExtractDetail(j *ju.Job, isSite bool, codeSite string) {
|
|
|
for key, val := range j.Result {
|
|
|
for i, v := range val {
|
|
|
if v.Field == "project_duration" {
|
|
|
- arr:=clear.ObjToMoney([]interface{}{v.Value, j.Content},j.SpiderCode, j.IsClearnMoney)
|
|
|
- if len(arr)>0 {
|
|
|
+ arr := clear.ObjToMoney([]interface{}{v.Value, j.Content}, j.SpiderCode, j.IsClearnMoney)
|
|
|
+ if len(arr) > 0 {
|
|
|
v.Value = arr[0]
|
|
|
}
|
|
|
}
|
|
@@ -988,7 +988,7 @@ func ExtRuleCoreByReg(extfrom string, doc map[string]interface{}, j *ju.Job, in
|
|
|
AddExtLog("extract", j.SourceMid, nil, extinfo, in, et.TaskInfo) //抽取日志
|
|
|
}
|
|
|
} else if in.Field == "qualifies" {
|
|
|
- extinfo := extRegCoreToResult(extfrom,pretreated.HtmlToText(qu.ObjToString(doc[extfrom]) ), &map[string]string{}, j, in, isSite)
|
|
|
+ extinfo := extRegCoreToResult(extfrom, pretreated.HtmlToText(qu.ObjToString(doc[extfrom])), &map[string]string{}, j, in, isSite)
|
|
|
if len(extinfo) > 0 {
|
|
|
AddExtLog("extract", j.SourceMid, nil, extinfo, in, et.TaskInfo) //抽取日志
|
|
|
}
|
|
@@ -1807,7 +1807,7 @@ func AnalysisSaveResult(j, jf *ju.Job, e *ExtractTask) {
|
|
|
delete(v, "bidamount")
|
|
|
}
|
|
|
j.Winnerorder = nil
|
|
|
- if jf!= nil && jf.Winnerorder!= nil{
|
|
|
+ if jf != nil && jf.Winnerorder != nil {
|
|
|
jf.Winnerorder = nil
|
|
|
}
|
|
|
}
|
|
@@ -1968,7 +1968,7 @@ func AnalysisSaveResult(j, jf *ju.Job, e *ExtractTask) {
|
|
|
if v.Score > -1 {
|
|
|
ffield[v.Field] = v.Value
|
|
|
if tmp[v.Field] == nil {
|
|
|
- if (v.Field == "bidamount" || v.Field == "budget") && v.IsTrue {
|
|
|
+ if (v.Field == "bidamount" || v.Field == "budget") && v.IsTrue && v.Value.(float64) > 100 && v.Value.(float64) < 50000000000 {
|
|
|
tmp[v.Field] = v.Value
|
|
|
break
|
|
|
}
|
|
@@ -2202,7 +2202,7 @@ func checkFields(tmp map[string]interface{}) map[string]interface{} {
|
|
|
}
|
|
|
|
|
|
//工期单位-清理
|
|
|
- if tmp["project_timeunit"]=="年" && tmp["project_duration"] == nil {
|
|
|
+ if tmp["project_timeunit"] == "年" && tmp["project_duration"] == nil {
|
|
|
delete(tmp, "project_timeunit")
|
|
|
}
|
|
|
tmp["repeat"] = 0
|