|
@@ -34,32 +34,48 @@ var (
|
|
|
Fields = `{"title":1,"summary":1,"detail":1,"contenthtml":1,"site":1,"spidercode":1,"toptype":1,"subtype":1,"bidstatus":1,"area":1,"city":1,"comeintime":1,"publishtime":1,"sensitive":1,"projectinfo":1,"jsondata":1,"href":1,"infoformat":1,"attach_text":1,"dataging":1,"review_experts":1,"purchasing":1}`
|
|
|
//Fields = `{"title":1,"summary":1,"detail":1,"contenthtml":1,"site":1,"spidercode":1,"toptype":1,"subtype":1,"bidstatus":1,"area":1,"city":1,"comeintime":1,"publishtime":1,"sensitive":1,"projectinfo":1,"jsondata":1,"href":1,"infoformat":1,"attach_text":1,"dataging":1,"new_attach_text":1,"createtime":1,"currency":1,"id":1,"company_email":1,"buyerclass":1,"tagname":1,"company_phone":1,"appid":1,"industry":1,"projectscope":1,"item":1,"s_subscopeclass":1,"matchkey":1,"jybxhref":1,"legal_person":1,"matchtype":1,"review_experts":1,"purchasing":1}`
|
|
|
Fields2 = `{"budget":1,"bidamount":1,"title":1,"projectname":1,"winner":1}`
|
|
|
+ /*f = map[string]bool{
|
|
|
+ "T": true,
|
|
|
+ "_d": true,
|
|
|
+ "area": true,
|
|
|
+ "channel": true,
|
|
|
+ "comeintime": true,
|
|
|
+ "competehref": true,
|
|
|
+ "href": true,
|
|
|
+ "l_np_publishtime": true,
|
|
|
+ "publishtime": true,
|
|
|
+ "sendflag": true,
|
|
|
+ "site": true,
|
|
|
+ "spidercode": true,
|
|
|
+ "title": true,
|
|
|
+ "projectname": true,
|
|
|
+ }*/
|
|
|
spidercode = map[string]bool{
|
|
|
- "gd_zhsggzyjyzx_jsgc_fjczbgg":true,
|
|
|
- "js_szgyyqggzyjyzx_jsgc_zjfbgs":true,
|
|
|
- "zj_tzsyhggzyjyzx_jsgc_kbqk":true,
|
|
|
- "hb_tmsggzyjyxxw_jsgc_kbqk":true,
|
|
|
- "zj_nbsyyggzyjyw_jsgc_kbqk":true,
|
|
|
- "zj_zjsggzyjyzx_jyxx_kbjg":true,
|
|
|
- "zj_zjzdgcjyw_ztbjglxx_kbjg":true,
|
|
|
- "zj_lssggzyjyw_jsgc_kbsk":true,
|
|
|
- "zj_qzslyxggzyjyzx_gggs_xkbjl":true,
|
|
|
- "sc_mssggzydzjypt_jsgc_kbjl":true,
|
|
|
- "sc_pzhsggzyjyfwzx_jsgc_kbylb":true,
|
|
|
- "a_zgzbtbggfwpt_wasjgf_ss_kbjl":true,
|
|
|
- "a_hbszbtbggfwpt_kbjl":true,
|
|
|
- "a_szsjsgcjyfwzxbafzx_kbqkgs":true,
|
|
|
- "a_szldzbyxgs_kbxx":true,
|
|
|
- "zj_zssssxggzyjyw_gcjs_kbjggs":true,
|
|
|
- "gd_szszfhjsj_kbqkgs":true,
|
|
|
- "a_gjggzyjypt_gcjs_kbjl":true,
|
|
|
- "a_gjggzyjypt_gcjs_kbjl_new":true,
|
|
|
- "zj_tzsyhggzyjyzx_kbjggg":true,
|
|
|
- "a_zgzbtbggfwpy_wasjgf_kbjl_lsbl":true,
|
|
|
- "ah_czsggzyjyw_jsgc_kbjl":true,
|
|
|
- "ah_czsggzyjyw_zfcg_kbxx":true,
|
|
|
- "ah_whsggzyjyfww_kbxx_cgxm":true,
|
|
|
- "ah_whsggzyjyfww_kbxx_gcxm":true,
|
|
|
+ "gd_zhsggzyjyzx_jsgc_fjczbgg": true,
|
|
|
+ "js_szgyyqggzyjyzx_jsgc_zjfbgs": true,
|
|
|
+ "zj_tzsyhggzyjyzx_jsgc_kbqk": true,
|
|
|
+ "hb_tmsggzyjyxxw_jsgc_kbqk": true,
|
|
|
+ "zj_nbsyyggzyjyw_jsgc_kbqk": true,
|
|
|
+ "zj_zjsggzyjyzx_jyxx_kbjg": true,
|
|
|
+ "zj_zjzdgcjyw_ztbjglxx_kbjg": true,
|
|
|
+ "zj_lssggzyjyw_jsgc_kbsk": true,
|
|
|
+ "zj_qzslyxggzyjyzx_gggs_xkbjl": true,
|
|
|
+ "sc_mssggzydzjypt_jsgc_kbjl": true,
|
|
|
+ "sc_pzhsggzyjyfwzx_jsgc_kbylb": true,
|
|
|
+ "a_zgzbtbggfwpt_wasjgf_ss_kbjl": true,
|
|
|
+ "a_hbszbtbggfwpt_kbjl": true,
|
|
|
+ "a_szsjsgcjyfwzxbafzx_kbqkgs": true,
|
|
|
+ "a_szldzbyxgs_kbxx": true,
|
|
|
+ "zj_zssssxggzyjyw_gcjs_kbjggs": true,
|
|
|
+ "gd_szszfhjsj_kbqkgs": true,
|
|
|
+ "a_gjggzyjypt_gcjs_kbjl": true,
|
|
|
+ "a_gjggzyjypt_gcjs_kbjl_new": true,
|
|
|
+ "zj_tzsyhggzyjyzx_kbjggg": true,
|
|
|
+ "a_zgzbtbggfwpy_wasjgf_kbjl_lsbl": true,
|
|
|
+ "ah_czsggzyjyw_jsgc_kbjl": true,
|
|
|
+ "ah_czsggzyjyw_zfcg_kbxx": true,
|
|
|
+ "ah_whsggzyjyfww_kbxx_cgxm": true,
|
|
|
+ "ah_whsggzyjyfww_kbxx_gcxm": true,
|
|
|
}
|
|
|
)
|
|
|
|
|
@@ -2117,7 +2133,16 @@ func AnalysisSaveResult(j, jf *ju.Job, e *ExtractTask) {
|
|
|
}
|
|
|
}
|
|
|
tmp["dataging"] = j.Dataging
|
|
|
-
|
|
|
+ /*for k, v := range *j.Data {
|
|
|
+ if f[k] {
|
|
|
+ tmp[k] = v
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for k := range tmp {
|
|
|
+ if !f[k]{
|
|
|
+ delete(tmp,k)
|
|
|
+ }
|
|
|
+ }*/
|
|
|
//检查字段
|
|
|
tmp = checkFields(tmp)
|
|
|
if tmp["projectname"] == nil || tmp["projectname"] == "" {
|
|
@@ -2235,13 +2260,23 @@ func checkFields(tmp map[string]interface{}) map[string]interface{} {
|
|
|
}
|
|
|
}
|
|
|
//budget bidamount
|
|
|
- if bg, ok := tmp["budget"].(float64); ok && bg >= 500000000000 {
|
|
|
- tmp["big_budget_err"] = bg
|
|
|
- delete(tmp, "budget")
|
|
|
- }
|
|
|
- if bg, ok := tmp["bidamount"].(float64); ok && bg >= 500000000000 {
|
|
|
- tmp["big_bidamount_err"] = bg
|
|
|
- delete(tmp, "bidamount")
|
|
|
+ if bg, ok := tmp["budget"].(float64); ok {
|
|
|
+ if bg >= 50000000000 {
|
|
|
+ tmp["budget_max_err"] = bg
|
|
|
+ delete(tmp, "budget")
|
|
|
+ } else if bg > 0 && bg < 1000 {
|
|
|
+ tmp["budget_min_err"] = bg
|
|
|
+ delete(tmp, "budget")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if bg, ok := tmp["bidamount"].(float64); ok && bg >= 50000000000 {
|
|
|
+ if bg >= 50000000000 {
|
|
|
+ tmp["bidamount_max_err"] = bg
|
|
|
+ delete(tmp, "bidamount")
|
|
|
+ } else if bg > 0 && bg < 1000 {
|
|
|
+ tmp["bidamount_min_err"] = bg
|
|
|
+ delete(tmp, "bidamount")
|
|
|
+ }
|
|
|
}
|
|
|
return tmp
|
|
|
}
|