123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- package main
- import (
- qu "qfw/util"
- "regexp"
- )
- var classScopeReg *regexp.Regexp = regexp.MustCompile("(建筑工程|交通工程|市政设施)")
- //中标金额
- func getCheckDataBidamount(tmp map[string]interface{},update_check *map[string]interface{}) {
- modifycheck := make(map[string]interface{},0)
- if (*update_check)["modifycheck"] != nil {
- modifycheck = *qu.ObjToMap((*update_check)["modifycheck"])
- }
- bidamount := qu.Float64All(tmp["bidamount"])
- spidercode := qu.ObjToString("spidercode")
- //指定网站-数据
- /*
- cq_cqsggzyjyzx_zfcg_zbgs 符合标准 9条
- ln_lnzfcgw_gggs_jggg 符合标准 555条
- a_zgzfcgw_dfgg_zongb_new 中国政府采购网 不太符合
- a_zgzfcgw_bid_tender_new 中国政府采购网 不太符合
- */
- if spidercode=="cq_cqsggzyjyzx_zfcg_zbgs" || spidercode == "ln_lnzfcgw_gggs_jggg" {
- if bidamount>1000000000.0 {
- new_bidamount := bidamount/float64(10000)
- (*update_check)["bidamount"] = new_bidamount
- modifycheck["bidamount"] = "爬虫倍率"
- (*update_check)["modifycheck"] = modifycheck
- return
- }
- }
- //按照行业-划分-太粗糙易出错-省略
- //if topscopeclass, ok := tmp["topscopeclass"].(primitive.A);(bidamount>0.0&&ok&&len(topscopeclass)>0){
- // isTrue := false
- // for _,v := range topscopeclass{
- // if classScopeReg.MatchString(qu.ObjToString(v)) {
- // isTrue = true
- // break
- // }
- // }
- // if !isTrue && bidamount>1000000000.0 {
- // new_bidamount := bidamount/float64(10000)
- // (*update_check)["bidamount"] = new_bidamount
- // modifycheck["bidamount"] = "行业倍率"
- // (*update_check)["modifycheck"] = modifycheck
- // return
- // }
- //}
- }
|